diff --git a/go.mod b/go.mod
index 46e6a00016d..5d9426d2b75 100644
--- a/go.mod
+++ b/go.mod
@@ -3,8 +3,8 @@ module github.com/openshift/hive
go 1.16
require (
- github.com/Azure/azure-sdk-for-go v45.0.0+incompatible
- github.com/Azure/go-autorest/autorest v0.11.12
+ github.com/Azure/azure-sdk-for-go v51.2.0+incompatible
+ github.com/Azure/go-autorest/autorest v0.11.18
github.com/Azure/go-autorest/autorest/azure/auth v0.4.1
github.com/Azure/go-autorest/autorest/to v0.4.0
github.com/aws/aws-sdk-go v1.38.41
@@ -16,10 +16,10 @@ require (
github.com/go-bindata/go-bindata v3.1.2+incompatible
github.com/go-logr/logr v0.4.0
github.com/golang/mock v1.4.4
- github.com/golangci/golangci-lint v1.31.0
+ github.com/golangci/golangci-lint v1.32.0
github.com/google/go-cmp v0.5.5
- github.com/google/uuid v1.1.2
- github.com/gophercloud/utils v0.0.0-20210113034859-6f548432055a
+ github.com/google/uuid v1.2.0
+ github.com/gophercloud/utils v0.0.0-20210323225332-7b186010c04f
github.com/heptio/velero v1.0.0
github.com/jonboulle/clockwork v0.1.0
github.com/json-iterator/go v1.1.11
@@ -27,17 +27,16 @@ require (
github.com/modern-go/reflect2 v1.0.1
github.com/onsi/ginkgo v1.16.4
github.com/onsi/gomega v1.13.0
- github.com/openshift/api v3.9.1-0.20191111211345-a27ff30ebf09+incompatible
+ github.com/openshift/api v0.0.0-20210622200201-7740bfb97397
github.com/openshift/build-machinery-go v0.0.0-20210806203541-4ea9b6da3a37
- github.com/openshift/cluster-api v0.0.0-20191129101638-b09907ac6668 // indirect
github.com/openshift/cluster-api-provider-gcp v0.0.1-0.20201203141909-4dc702fd57a5
- github.com/openshift/cluster-api-provider-ovirt v0.1.1-0.20200504092944-27473ea1ae43
+ github.com/openshift/cluster-api-provider-ovirt v0.1.1-0.20210622084102-c4f9f269bcb7
github.com/openshift/cluster-autoscaler-operator v0.0.0-20190521201101-62768a6ba480
github.com/openshift/generic-admission-server v1.14.1-0.20200903115324-4ddcdd976480
github.com/openshift/hive/apis v0.0.0
- github.com/openshift/installer v0.9.0-master.0.20210211002944-d237b9dee575
- github.com/openshift/library-go v0.0.0-20201109112824-093ad3cf6600
- github.com/openshift/machine-api-operator v0.2.1-0.20201111151924-77300d0c997a
+ github.com/openshift/installer v0.9.0-master.0.20210831144123-4050517eead6
+ github.com/openshift/library-go v0.0.0-20210408164723-7a65fdb398e2
+ github.com/openshift/machine-api-operator v0.2.1-0.20210505133115-b7ef098180db
github.com/pkg/errors v0.9.1
github.com/prometheus/client_golang v1.11.0
github.com/prometheus/client_model v0.2.0
@@ -45,8 +44,8 @@ require (
github.com/spf13/cobra v1.1.1
github.com/spf13/pflag v1.0.5
github.com/stretchr/testify v1.7.0
- github.com/vmware/govmomi v0.22.2
- golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83
+ github.com/vmware/govmomi v0.24.0
+ golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2
golang.org/x/lint v0.0.0-20200302205851-738671d3881b
golang.org/x/mod v0.4.0
golang.org/x/net v0.0.0-20210428140749-89ef3d95e781
@@ -80,26 +79,24 @@ replace github.com/openshift/hive/apis => ./apis
// from installer
replace (
+ github.com/IBM-Cloud/terraform-provider-ibm => github.com/openshift/terraform-provider-ibm v1.26.2-openshift-2
github.com/kubevirt/terraform-provider-kubevirt => github.com/nirarg/terraform-provider-kubevirt v0.0.0-20201222125919-101cee051ed3
- github.com/metal3-io/baremetal-operator => github.com/openshift/baremetal-operator v0.0.0-20200715132148-0f91f62a41fe
+ github.com/metal3-io/baremetal-operator => github.com/openshift/baremetal-operator v0.0.0-20210706141527-5240e42f012a
+ github.com/metal3-io/baremetal-operator/apis => github.com/openshift/baremetal-operator/apis v0.0.0-20210706141527-5240e42f012a
github.com/metal3-io/cluster-api-provider-baremetal => github.com/openshift/cluster-api-provider-baremetal v0.0.0-20190821174549-a2a477909c1d
github.com/terraform-providers/terraform-provider-aws => github.com/openshift/terraform-provider-aws v1.60.1-0.20200630224953-76d1fb4e5699
- github.com/terraform-providers/terraform-provider-azurerm => github.com/openshift/terraform-provider-azurerm v1.40.1-0.20200707062554-97ea089cc12a
+ github.com/terraform-providers/terraform-provider-azurerm => github.com/openshift/terraform-provider-azurerm v1.44.1-0.20210224232508-7509319df0f4
github.com/terraform-providers/terraform-provider-ignition/v2 => github.com/community-terraform-providers/terraform-provider-ignition/v2 v2.1.0
kubevirt.io/client-go => kubevirt.io/client-go v0.29.0
- sigs.k8s.io/cluster-api-provider-aws => github.com/openshift/cluster-api-provider-aws v0.2.1-0.20201022175424-d30c7a274820
- sigs.k8s.io/cluster-api-provider-azure => github.com/openshift/cluster-api-provider-azure v0.1.0-alpha.3.0.20201016155852-4090a6970205
- sigs.k8s.io/cluster-api-provider-openstack => github.com/openshift/cluster-api-provider-openstack v0.0.0-20201116051540-155384b859c5
+ sigs.k8s.io/cluster-api-provider-aws => github.com/openshift/cluster-api-provider-aws v0.2.1-0.20210121023454-5ffc5f422a80
+ sigs.k8s.io/cluster-api-provider-azure => github.com/openshift/cluster-api-provider-azure v0.1.0-alpha.3.0.20210626224711-5d94c794092f
+ sigs.k8s.io/cluster-api-provider-openstack => github.com/openshift/cluster-api-provider-openstack v0.0.0-20210302164104-8498241fa4bd
)
// from installer as part of https://github.com/openshift/installer/pull/4350
// Prevent the following modules from upgrading version as result of terraform-provider-kubernetes module
// The following modules need to be locked to compile correctly with terraform-provider-azure and terraform-provider-google
replace (
- github.com/Azure/go-autorest/autorest/adal => github.com/Azure/go-autorest/autorest/adal v0.8.2
- github.com/Azure/go-autorest/autorest/azure/cli => github.com/Azure/go-autorest/autorest/azure/cli v0.3.1
- github.com/Azure/go-autorest/autorest/date => github.com/Azure/go-autorest/autorest/date v0.2.0
- github.com/Azure/go-autorest/autorest/validation => github.com/Azure/go-autorest/autorest/validation v0.2.1-0.20191028180845-3492b2aff503
github.com/apparentlymart/go-cidr => github.com/apparentlymart/go-cidr v1.0.1
github.com/go-openapi/spec => github.com/go-openapi/spec v0.19.0
github.com/googleapis/gnostic => github.com/googleapis/gnostic v0.4.1
diff --git a/go.sum b/go.sum
index 752d5996303..7296f88c0ff 100644
--- a/go.sum
+++ b/go.sum
@@ -1,5 +1,5 @@
-bazil.org/fuse v0.0.0-20160811212531-371fbbdaa898/go.mod h1:Xbm+BRKSBEpa4q4hTSxohYNQpsxXPbPry4JJWOB3LB8=
-bou.ke/monkey v1.0.1/go.mod h1:FgHuK96Rv2Nlf+0u1OOVDpCMdsWyOFmeeketDHE7LIg=
+4d63.com/gochecknoglobals v0.0.0-20201008074935-acfc0b28355a h1:wFEQiK85fRsEVF0CRrPAos5LoAryUsIX1kPW/WrIqFw=
+4d63.com/gochecknoglobals v0.0.0-20201008074935-acfc0b28355a/go.mod h1:wfdC5ZjKSPr7CybKEcgJhUOgeAQW1+7WcyK8OvUilfo=
cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
cloud.google.com/go v0.31.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
@@ -18,6 +18,7 @@ cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6
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.58.0/go.mod h1:W+9FnSUw6nhVwXlFcp1eL+krq5+HQUJeUogSeJZZiWg=
cloud.google.com/go v0.60.0/go.mod h1:yw2G51M9IfRboUH61Us8GqCeF1PzPblB823Mn2q2eAU=
cloud.google.com/go v0.61.0/go.mod h1:XukKJg4Y7QsUu0Hxg3qQKUWR4VuWivmyMK2+rUyxAqw=
cloud.google.com/go v0.64.0/go.mod h1:xfORb36jGvE+6EexW71nMEtL025s3x6xvuYUKM4JLv4=
@@ -40,78 +41,91 @@ cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+
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.3.0/go.mod h1:9IAwXhoyBJ7z9LcAwkj0/7NnPzYaPeZxxVp3zm+5IqA=
cloud.google.com/go/storage v1.4.0/go.mod h1:ZusYJWlOshgSBGbt6K3GnB3MT3H1xs2id9+TCl4fDBA=
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.7.0/go.mod h1:jGMIBwF+L/tL6WN/W5InNgYYu4HP0DvGB6rQ1mufWfs=
cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs=
+cloud.google.com/go/storage v1.9.0/go.mod h1:m+/etGaqZbylxaNT876QGXqEHp4PR2Rq5GMqICWb9bU=
cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0=
cloud.google.com/go/storage v1.11.0/go.mod h1:/PAbprKS+5msVYogBmczjWalDXnQ9mr64yEq9YnyPeo=
code.cloudfoundry.org/gofileutils v0.0.0-20170111115228-4d0c80011a0f/go.mod h1:sk5LnIjB/nIEU7yP5sDQExVm62wu0pBh3yrElngUisI=
contrib.go.opencensus.io/exporter/ocagent v0.4.12/go.mod h1:450APlNTSR6FrvC3CTRqYosuDstRB9un7SOx2k/9ckA=
-contrib.go.opencensus.io/exporter/ocagent v0.6.0/go.mod h1:zmKjrJcdo0aYcVS7bmEeSEBLPA9YJp5bjrofdU3pIXs=
dmitri.shuralyov.com/app/changes v0.0.0-20180602232624-0a106ad413e3/go.mod h1:Yl+fi1br7+Rr3LqpNJf1/uxUdtRUV+Tnj0o93V2B9MU=
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
dmitri.shuralyov.com/html/belt v0.0.0-20180602232347-f7d459c86be0/go.mod h1:JLBrvjyP0v+ecvNYvCpyZgu5/xkfAUhi6wJj28eUfSU=
dmitri.shuralyov.com/service/change v0.0.0-20181023043359-a85b471d5412/go.mod h1:a1inKt/atXimZ4Mv927x+r7UpyzRUf4emIoiiSC2TN4=
dmitri.shuralyov.com/state v0.0.0-20180228185332-28bcc343414c/go.mod h1:0PRwlb0D6DFvNNtx+9ybjezNCa8XF0xaYcETyp6rHWU=
git.apache.org/thrift.git v0.0.0-20180902110319-2566ecd5d999/go.mod h1:fPE2ZNJGynbRyZ4dJvy6G277gSllfV2HJqblrnkyeyg=
-github.com/AlecAivazis/survey/v2 v2.0.5/go.mod h1:WYBhg6f0y/fNYUuesWQc0PKbJcEliGcYHB9sNT3Bg74=
-github.com/Azure/azure-pipeline-go v0.2.1/go.mod h1:UGSo8XybXnIGZ3epmeBw7Jdz+HiUVpqIlpz/HKHylF4=
-github.com/Azure/azure-pipeline-go v0.2.2/go.mod h1:4rQ/NZncSvGqNkkOsNpOU1tgoNuIlp9AfUH5G1tvCHc=
-github.com/Azure/azure-sdk-for-go v16.2.1+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc=
-github.com/Azure/azure-sdk-for-go v21.3.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc=
-github.com/Azure/azure-sdk-for-go v23.2.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc=
+github.com/360EntSecGroup-Skylar/excelize v1.4.1/go.mod h1:vnax29X2usfl7HHkBrX5EvSCJcmH3dT9luvxzu8iGAE=
+github.com/AlecAivazis/survey/v2 v2.2.12 h1:5a07y93zA6SZ09gOa9wLVLznF5zTJMQ+pJ3cZK4IuO8=
+github.com/AlecAivazis/survey/v2 v2.2.12/go.mod h1:6d4saEvBsfSHXeN1a5OA5m2+HJ2LuVokllnC77pAIKI=
github.com/Azure/azure-sdk-for-go v29.0.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc=
github.com/Azure/azure-sdk-for-go v32.5.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc=
+github.com/Azure/azure-sdk-for-go v33.2.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc=
github.com/Azure/azure-sdk-for-go v35.0.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc=
-github.com/Azure/azure-sdk-for-go v36.1.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc=
github.com/Azure/azure-sdk-for-go v36.2.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc=
-github.com/Azure/azure-sdk-for-go v42.0.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc=
github.com/Azure/azure-sdk-for-go v42.1.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc=
-github.com/Azure/azure-sdk-for-go v43.2.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc=
-github.com/Azure/azure-sdk-for-go v45.0.0+incompatible h1:/bZYPaJLCqXeCqQqEeEIQg/p7RNafOhaVFhC6IWxZ/8=
github.com/Azure/azure-sdk-for-go v45.0.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc=
-github.com/Azure/azure-storage-blob-go v0.8.0/go.mod h1:lPI3aLPpuLTeUwh1sViKXFxwl2B6teiRqI0deQUvsw0=
+github.com/Azure/azure-sdk-for-go v47.1.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc=
+github.com/Azure/azure-sdk-for-go v48.0.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc=
+github.com/Azure/azure-sdk-for-go v51.2.0+incompatible h1:qQNk//OOHK0GZcgMMgdJ4tZuuh0zcOeUkpTxjvKFpSQ=
+github.com/Azure/azure-sdk-for-go v51.2.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc=
github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78 h1:w+iIsaOQNcT7OZ575w+acHgRric5iCyQh+xv+KJ4HB8=
github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8=
-github.com/Azure/go-autorest v10.8.1+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24=
-github.com/Azure/go-autorest v10.15.4+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24=
-github.com/Azure/go-autorest v11.2.8+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24=
github.com/Azure/go-autorest v11.7.1+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24=
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 v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI=
github.com/Azure/go-autorest/autorest v0.9.2/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI=
-github.com/Azure/go-autorest/autorest v0.9.3-0.20191028180845-3492b2aff503/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI=
github.com/Azure/go-autorest/autorest v0.10.0/go.mod h1:/FALq9T/kS7b5J5qsQ+RSTUdAmGFqi0vUdVNNx8q630=
github.com/Azure/go-autorest/autorest v0.11.3/go.mod h1:JFgpikqFJ/MleTTxwepExTKnFUKKszPS8UavbQYUMuw=
github.com/Azure/go-autorest/autorest v0.11.6/go.mod h1:V6p3pKZx1KKkJubbxnDWrzNhEIfOy/pTGasLqzHIPHs=
-github.com/Azure/go-autorest/autorest v0.11.12 h1:gI8ytXbxMfI+IVbI9mP2JGCTXIuhHLgRlvQ9X4PsnHE=
+github.com/Azure/go-autorest/autorest v0.11.10/go.mod h1:eipySxLmqSyC5s5k1CLupqet0PSENBEDP93LQ9a8QYw=
github.com/Azure/go-autorest/autorest v0.11.12/go.mod h1:eipySxLmqSyC5s5k1CLupqet0PSENBEDP93LQ9a8QYw=
-github.com/Azure/go-autorest/autorest/adal v0.8.2 h1:O1X4oexUxnZCaEUGsvMnr8ZGj8HI37tNezwY4npRqA0=
+github.com/Azure/go-autorest/autorest v0.11.17/go.mod h1:eipySxLmqSyC5s5k1CLupqet0PSENBEDP93LQ9a8QYw=
+github.com/Azure/go-autorest/autorest v0.11.18 h1:90Y4srNYrwOtAgVo3ndrQkTYn6kf1Eg/AjTFJ8Is2aM=
+github.com/Azure/go-autorest/autorest v0.11.18/go.mod h1:dSiJPy22c3u0OtOKDNttNgqpNFY/GeWa7GH/Pz56QRA=
+github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0=
+github.com/Azure/go-autorest/autorest/adal v0.6.0/go.mod h1:Z6vX6WXXuyieHAXwMj0S6HY6e6wcHn37qQMBQlvY3lc=
+github.com/Azure/go-autorest/autorest/adal v0.8.0/go.mod h1:Z6vX6WXXuyieHAXwMj0S6HY6e6wcHn37qQMBQlvY3lc=
+github.com/Azure/go-autorest/autorest/adal v0.8.1-0.20191028180845-3492b2aff503/go.mod h1:Z6vX6WXXuyieHAXwMj0S6HY6e6wcHn37qQMBQlvY3lc=
github.com/Azure/go-autorest/autorest/adal v0.8.2/go.mod h1:ZjhuQClTqx435SRJ2iMlOxPYt3d2C/T/7TiQCVZSn3Q=
+github.com/Azure/go-autorest/autorest/adal v0.9.0/go.mod h1:/c022QCutn2P7uY+/oQWWNcK9YU+MH96NgK+jErpbcg=
+github.com/Azure/go-autorest/autorest/adal v0.9.4/go.mod h1:/3SMAM86bP6wC9Ev35peQDUeqFZBMH07vvUOmg4z/fE=
+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.10/go.mod h1:B7KF7jKIeC9Mct5spmyCB/A8CG/sEz1vwIRGv/bbw7A=
+github.com/Azure/go-autorest/autorest/adal v0.9.13 h1:Mp5hbtOePIzM8pJVRa3YLrWWmZtoxRXqUEzCfJt3+/Q=
+github.com/Azure/go-autorest/autorest/adal v0.9.13/go.mod h1:W/MM4U6nLxnIskrw4UwWzlHfGjwUS50aOsc/I3yuU8M=
github.com/Azure/go-autorest/autorest/azure/auth v0.4.1 h1:VDSqmaEc8ECZdfavoa1KmVpIVTGTc+v/2jvHGmCYvSE=
github.com/Azure/go-autorest/autorest/azure/auth v0.4.1/go.mod h1:5TgH20II424SXIV9YDBsO4rBCKsh39Vbx9DvhJZZ8rU=
-github.com/Azure/go-autorest/autorest/azure/cli v0.3.1 h1:LXl088ZQlP0SBppGFsRZonW6hSvwgL5gRByMbvUbx8U=
+github.com/Azure/go-autorest/autorest/azure/cli v0.2.0/go.mod h1:WWTbGPvkAg3I4ms2j2s+Zr5xCGwGqTQh+6M2ZqOczkE=
github.com/Azure/go-autorest/autorest/azure/cli v0.3.1/go.mod h1:ZG5p860J94/0kI9mNJVoIoLgXcirM2gF5i2kWloofxw=
-github.com/Azure/go-autorest/autorest/date v0.2.0 h1:yW+Zlqf26583pE43KhfnhFcdmSWlm5Ew6bxipnr/tbM=
+github.com/Azure/go-autorest/autorest/azure/cli v0.4.0/go.mod h1:JljT387FplPzBA31vUcvsetLKF3pec5bdAxjVU4kI2s=
+github.com/Azure/go-autorest/autorest/azure/cli v0.4.1/go.mod h1:JfDgiIO1/RPu6z42AdQTyjOoCM2MFhLqSBDvMEkDgcg=
+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.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA=
github.com/Azure/go-autorest/autorest/date v0.2.0/go.mod h1:vcORJHLJEh643/Ioh9+vPmf1Ij9AEBM5FuBIXLmIy0g=
+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.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0=
github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0=
github.com/Azure/go-autorest/autorest/mocks v0.3.0/go.mod h1:a8FDP3DYzQ4RYfVAxAN3SVSiiO77gL2j2ronKKP0syM=
github.com/Azure/go-autorest/autorest/mocks v0.4.0/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k=
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/to v0.3.0/go.mod h1:MgwOyqaIuKdG4TL/2ywSsIWKAfJfgHDo8ObuUk3t5sA=
-github.com/Azure/go-autorest/autorest/to v0.3.1-0.20191028180845-3492b2aff503/go.mod h1:MgwOyqaIuKdG4TL/2ywSsIWKAfJfgHDo8ObuUk3t5sA=
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.2.1-0.20191028180845-3492b2aff503 h1:RBrGlrkPWapMcLp1M6ywCqyYKOAT5ERI6lYFvGKOThE=
-github.com/Azure/go-autorest/autorest/validation v0.2.1-0.20191028180845-3492b2aff503/go.mod h1:3EEqHnBxQGHXRYq3HT1WyXAvT7LLY3tl70hw6tQIbjI=
+github.com/Azure/go-autorest/autorest/validation v0.2.0/go.mod h1:3EEqHnBxQGHXRYq3HT1WyXAvT7LLY3tl70hw6tQIbjI=
+github.com/Azure/go-autorest/autorest/validation v0.3.0/go.mod h1:yhLgjC0Wda5DYXl6JAsWyUe4KVNffhoDhG0zVzUMo3E=
+github.com/Azure/go-autorest/autorest/validation v0.3.1 h1:AgyqjAd94fwNAoTjl/WQXg4VvFeRFpO+UhNyRXqF1ac=
+github.com/Azure/go-autorest/autorest/validation v0.3.1/go.mod h1:yhLgjC0Wda5DYXl6JAsWyUe4KVNffhoDhG0zVzUMo3E=
github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc=
-github.com/Azure/go-autorest/logger v0.2.0 h1:e4RVHVZKC5p6UANLJHkM4OfR1UKZPj8Wt8Pcx+3oqrE=
github.com/Azure/go-autorest/logger v0.2.0/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8=
+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.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk=
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=
@@ -123,28 +137,56 @@ github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
github.com/ChrisTrenkamp/goxpath v0.0.0-20170922090931-c385f95c6022/go.mod h1:nuWgzSkT5PnyOd+272uUmV0dnAnAn42Mk7PiQC5VzN4=
github.com/ChrisTrenkamp/goxpath v0.0.0-20190607011252-c5096ec8773d/go.mod h1:nuWgzSkT5PnyOd+272uUmV0dnAnAn42Mk7PiQC5VzN4=
-github.com/DATA-DOG/go-sqlmock v1.4.1/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM=
github.com/DataDog/datadog-go v2.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ=
github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ=
github.com/Djarvur/go-err113 v0.0.0-20200410182137-af658d038157/go.mod h1:4UJr5HIiMZrwgkSPdsjy2uOQExX/WEILpIrO9UPGuXs=
github.com/Djarvur/go-err113 v0.0.0-20200511133814-5174e21577d5/go.mod h1:4UJr5HIiMZrwgkSPdsjy2uOQExX/WEILpIrO9UPGuXs=
github.com/Djarvur/go-err113 v0.1.0 h1:uCRZZOdMQ0TZPHYTdYpoC0bLYJKPEHPUJ8MeAa51lNU=
github.com/Djarvur/go-err113 v0.1.0/go.mod h1:4UJr5HIiMZrwgkSPdsjy2uOQExX/WEILpIrO9UPGuXs=
+github.com/IBM-Cloud/bluemix-go v0.0.0-20210611051827-cdc80c935c05/go.mod h1:kqTYO0mts71aa8PVwviaKlCKYud/NbEkFIqU8aHH3/g=
+github.com/IBM-Cloud/ibm-cloud-cli-sdk v0.5.3/go.mod h1:RiUvKuHKTBmBApDMUQzBL14pQUGKcx/IioKQPIcRQjs=
+github.com/IBM-Cloud/power-go-client v1.0.55/go.mod h1:I4r5tCrA8mV5GFqGAJG4/Tn+/JpR+XLnDCLLNVKJxuI=
+github.com/IBM/apigateway-go-sdk v0.0.0-20210714141226-a5d5d49caaca/go.mod h1:IjXrnOcTe92Q4pEBHmui3H/GM1hw5Pd0zXA5cw5/iZU=
+github.com/IBM/appconfiguration-go-admin-sdk v0.1.0/go.mod h1:6x6KbqIwrEi07OvEM1+EnU4Lyk+JFm2O0vrSPPGTleU=
+github.com/IBM/container-registry-go-sdk v0.0.13/go.mod h1:GYi1VN59VaJWWq2xP06o9Vpi6+K8V5vtmji6WjMJf0w=
+github.com/IBM/go-sdk-core v1.1.0/go.mod h1:2pcx9YWsIsZ3I7kH+1amiAkXvLTZtAq9kbxsfXilSoY=
+github.com/IBM/go-sdk-core/v3 v3.0.0/go.mod h1:JI5NS2+iCoY/D8Oq3JNEZNA7qO42agu6fnaUmDsRcJA=
+github.com/IBM/go-sdk-core/v3 v3.2.4/go.mod h1:lk9eOzNbNltPf3CBpcg1Ewkhw4qC3u2QCCKDRsUA2M0=
+github.com/IBM/go-sdk-core/v3 v3.3.1/go.mod h1:lk9eOzNbNltPf3CBpcg1Ewkhw4qC3u2QCCKDRsUA2M0=
+github.com/IBM/go-sdk-core/v4 v4.5.1/go.mod h1:lTUXbqIX6/aAbSCkP6q59+dyFsTwZAc0ewRS2vJWVbg=
+github.com/IBM/go-sdk-core/v4 v4.8.1/go.mod h1:GECJ/p0r9Hs0XcOnCiGjZrt6M/rQc+gW8YkCsGJ+j5U=
+github.com/IBM/go-sdk-core/v4 v4.9.0/go.mod h1:DbQ+3pFoIjxGGTEiA9zQ2V0cemMNmFMkLBBnR729HKg=
+github.com/IBM/go-sdk-core/v4 v4.10.0/go.mod h1:0uz2ca0MZ2DwsBRGl9Jp3EaCTqxmKZTdvV/CkCB7JnI=
+github.com/IBM/go-sdk-core/v5 v5.0.0/go.mod h1:vyNdbFujJtdTj9HbihtvKwwS3k/GKSKpOx9ZIQ6MWDY=
+github.com/IBM/go-sdk-core/v5 v5.0.3/go.mod h1:vyNdbFujJtdTj9HbihtvKwwS3k/GKSKpOx9ZIQ6MWDY=
+github.com/IBM/go-sdk-core/v5 v5.1.0/go.mod h1:vyNdbFujJtdTj9HbihtvKwwS3k/GKSKpOx9ZIQ6MWDY=
+github.com/IBM/go-sdk-core/v5 v5.2.0/go.mod h1:vyNdbFujJtdTj9HbihtvKwwS3k/GKSKpOx9ZIQ6MWDY=
+github.com/IBM/go-sdk-core/v5 v5.4.0/go.mod h1:+MNa5Jbqb9FO7KEevo982Pb/YXr4adkyEffJlPs2TGc=
+github.com/IBM/go-sdk-core/v5 v5.4.2/go.mod h1:Sn+z+qTDREQvCr+UFa22TqqfXNxx3o723y8GsfLV8e0=
+github.com/IBM/go-sdk-core/v5 v5.4.3/go.mod h1:Sn+z+qTDREQvCr+UFa22TqqfXNxx3o723y8GsfLV8e0=
+github.com/IBM/ibm-cos-sdk-go v1.3.1/go.mod h1:YLBAYobEA8bD27P7xpMwSQeNQu6W3DNBtBComXrRzRY=
+github.com/IBM/ibm-cos-sdk-go v1.7.0/go.mod h1:Oi8AC5WNDhmUJgbo1GL2FtBdo0nRgbzE/1HmCL1SERU=
+github.com/IBM/ibm-cos-sdk-go-config v1.2.0/go.mod h1:Wetfgv6m1xyuzpZLQTTLIBsWstxjYa15h+Utj7x53Dk=
+github.com/IBM/keyprotect-go-client v0.7.0/go.mod h1:SVr2ylV/fhSQPDiUjWirN9fsyWFCNNbt8GIT8hPJVjE=
+github.com/IBM/networking-go-sdk v0.14.0/go.mod h1:8f3hEoWVUSYKbaIj7WZhdeJaseYGDSY85Iz+PqxLEbQ=
+github.com/IBM/platform-services-go-sdk v0.18.12/go.mod h1:awc7TZUeGMlToSeMSaWEz34Knf0lQnuGWumcI4pcuoM=
+github.com/IBM/platform-services-go-sdk v0.18.16/go.mod h1:awc7TZUeGMlToSeMSaWEz34Knf0lQnuGWumcI4pcuoM=
+github.com/IBM/push-notifications-go-sdk v0.0.0-20210310100607-5790b96c47f5/go.mod h1:b07XHUVh0XYnQE9s2mqgjYST1h9buaQNqN4EcKhOsX0=
+github.com/IBM/schematics-go-sdk v0.0.2/go.mod h1:ymN1+3uEaWNT0RthwHzExxMiN0AnTh6W3piSY8canjs=
+github.com/IBM/secrets-manager-go-sdk v0.1.19/go.mod h1:eO3dBhzPrHkkt+yPex/jB2xD6qHZxBko+Aw+0tfqHeA=
+github.com/IBM/vpc-go-sdk v0.6.0/go.mod h1:wxicPDnSTPXt1eNxSO/9KNGqOW9RMgxPoSh4gd8KJY4=
+github.com/IBM/vpc-go-sdk v0.7.0/go.mod h1:wxicPDnSTPXt1eNxSO/9KNGqOW9RMgxPoSh4gd8KJY4=
+github.com/IBM/vpc-go-sdk v1.0.1/go.mod h1:bhd7r482lV30UJz46r2oRgYGawGEo+TuS41ZLIY65y0=
github.com/Jeffail/gabs v1.1.1/go.mod h1:6xMvQMK4k33lb7GUUpaAPh6nKMmemQeg5d4gn7/bOXc=
+github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0=
github.com/MakeNowJust/heredoc v0.0.0-20170808103936-bb23615498cd/go.mod h1:64YHyfSL2R96J44Nlwm39UHepQbyR5q10x7iYa1ks2E=
github.com/MakeNowJust/heredoc v1.0.0 h1:cXCdzVdstXyiTqTvfqk9SDHpKNjxuom+DOlyEeQ4pzQ=
github.com/MakeNowJust/heredoc v1.0.0/go.mod h1:mG5amYoWBHf8vpLOuehzbGGw0EHxpZZ6lCpQ4fNJ8LE=
-github.com/Masterminds/goutils v1.1.0/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU=
github.com/Masterminds/semver v1.4.2/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y=
github.com/Masterminds/semver v1.5.0 h1:H65muMkzWKEuNDnfl9d70GUjFniHKHRbFPGBuZ3QEww=
github.com/Masterminds/semver v1.5.0/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y=
-github.com/Masterminds/semver/v3 v3.0.3/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs=
-github.com/Masterminds/sprig/v3 v3.0.2/go.mod h1:oesJ8kPONMONaZgtiHNzUShJbksypC5kWczhZAf6+aU=
-github.com/Masterminds/vcs v1.13.1/go.mod h1:N09YCmOQr6RLxC6UNHzuVwAdodYbbnycGHSmwVJjcKA=
github.com/Microsoft/go-winio v0.4.11/go.mod h1:VhR8bwka0BXejwEJY73c50VrPtXAaKcyvVC4A4RozmA=
github.com/Microsoft/go-winio v0.4.13/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jBhyzoq1bpyYA=
-github.com/Microsoft/go-winio v0.4.15-0.20190919025122-fc70bd9a86b5/go.mod h1:tTuCMEN+UleMWgg9dVx4Hu52b1bJo+59jBh3ajtinzw=
-github.com/Microsoft/hcsshim v0.8.7/go.mod h1:OHd7sQqRFrYd3RmSgbgji+ctCwkbq2wbEYNSzOYtcBQ=
github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ=
github.com/NYTimes/gziphandler v1.1.1 h1:ZUDjpQae29j0ryrS0u/B8HZfJBtBQHjqw2rQ2cqUQ3I=
github.com/NYTimes/gziphandler v1.1.1/go.mod h1:n/CVRwUEOgIxrgPvAQhUUr9oeUtvrhMomdKFjzJNB0c=
@@ -153,10 +195,10 @@ github.com/Netflix/go-expect v0.0.0-20190729225929-0e00d9168667 h1:l2RCK7mjLhjfZ
github.com/Netflix/go-expect v0.0.0-20190729225929-0e00d9168667/go.mod h1:oX5x61PbNXchhh0oikYAH+4Pcfw5LKv21+Jnpr6r6Pc=
github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5/go.mod h1:lmUJ/7eu/Q8D7ML55dXQrVaamCz2vxCfdQBasLZfHKk=
github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU=
-github.com/OneOfOne/xxhash v1.2.6/go.mod h1:eZbhyaAYD41SGSSsnmcpxVoRiQ/MPUTjUdIIOT9Um7Q=
github.com/OpenPeeDeeP/depguard v1.0.0/go.mod h1:7/4sitnI9YlQgTLLk734QlzXT8DuHVnAyztLplQjk+o=
github.com/OpenPeeDeeP/depguard v1.0.1 h1:VlW4R6jmBIv3/u1JNlawEvJMM4J+dPORPaZasQee8Us=
github.com/OpenPeeDeeP/depguard v1.0.1/go.mod h1:xsIw86fROiiwelg+jB2uM9PiKihMMmUx/1V+TNhjQvM=
+github.com/PuerkitoBio/goquery v1.5.0/go.mod h1:qD2PgZ9lccMbQlc7eEOjaeRlFQON7xY8kdmcsrnKqMg=
github.com/PuerkitoBio/purell v1.0.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0=
github.com/PuerkitoBio/purell v1.1.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0=
github.com/PuerkitoBio/purell v1.1.1 h1:WEQqlqaGbrPkxLJWfBwQmfEAE1Z7ONdDLqrN38tNFfI=
@@ -166,12 +208,15 @@ github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 h1:d+Bc7a5rLufV
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE=
github.com/QcloudApi/qcloud_sign_golang v0.0.0-20141224014652-e4130a326409/go.mod h1:1pk82RBxDY/JZnPQrtqHlUFfCctgdorsd9M06fMynOM=
github.com/SAP/go-hdb v0.14.1/go.mod h1:7fdQLVC2lER3urZLjZCm0AuMQfApof92n3aylBPEkMo=
-github.com/Shopify/logrus-bugsnag v0.0.0-20171204204709-577dee27f20d/go.mod h1:HI8ITrYtUY+O+ZhtlqUnD8+KwNPOyugEhfP9fdUIaEQ=
+github.com/ScaleFT/sshkeys v0.0.0-20200327173127-6142f742bca5/go.mod h1:gxOHeajFfvGQh/fxlC8oOKBe23xnnJTif00IFFbiT+o=
github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo=
+github.com/Shopify/sarama v1.27.2/go.mod h1:g5s5osgELxgM+Md9Qni9rzo7Rbt+vvFQI4bt/Mc93II=
github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI=
github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg=
github.com/Unknwon/com v0.0.0-20151008135407-28b053d5a292/go.mod h1:KYCjqMOeHpNuTOiFQU6WEcTG7poCJrUs0YgyHNtn1no=
+github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g=
github.com/abdullin/seq v0.0.0-20160510034733-d5467c17e7af/go.mod h1:5Jv4cbFiHJMsVxt52+i0Ha45fjshj6wxYr1r19tB9bw=
+github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c=
github.com/agext/levenshtein v1.2.1/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558=
github.com/agext/levenshtein v1.2.2/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558=
github.com/agext/levenshtein v1.2.3/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558=
@@ -191,16 +236,17 @@ github.com/aliyun/alibaba-cloud-sdk-go v0.0.0-20190412020505-60e2075261b6/go.mod
github.com/aliyun/alibaba-cloud-sdk-go v0.0.0-20190620160927-9418d7b0cd0f/go.mod h1:myCDvQSzCW+wB1WAlocEru4wMGJxy+vlxHdhegi1CDQ=
github.com/aliyun/aliyun-oss-go-sdk v0.0.0-20190103054945-8205d1f41e70/go.mod h1:T/Aws4fEfogEE9v+HPhhw+CntffsBHJ8nXQCwKr0/g8=
github.com/aliyun/aliyun-oss-go-sdk v0.0.0-20190307165228-86c17b95fcd5/go.mod h1:T/Aws4fEfogEE9v+HPhhw+CntffsBHJ8nXQCwKr0/g8=
-github.com/aliyun/aliyun-oss-go-sdk v2.0.4+incompatible/go.mod h1:T/Aws4fEfogEE9v+HPhhw+CntffsBHJ8nXQCwKr0/g8=
github.com/aliyun/aliyun-tablestore-go-sdk v4.1.2+incompatible/go.mod h1:LDQHRZylxvcg8H7wBIDfvO5g/cy4/sz1iucBlc2l3Jw=
github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8=
github.com/andybalholm/brotli v1.0.0/go.mod h1:loMXtMfwqflxFJPmdbJO0a3KNoPuLBgiu3qAvBg8x/Y=
+github.com/andybalholm/cascadia v1.0.0/go.mod h1:GsXiBklL0woXo1j/WYWtSYYC4ouU9PqHO0sqidkEA4Y=
github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c=
github.com/antchfx/xpath v0.0.0-20190129040759-c8489ed3251e/go.mod h1:Yee4kTMuNiPYJ7nSNorELQMr1J33uOpXDMByNYhvtNk=
github.com/antchfx/xpath v1.1.2/go.mod h1:Yee4kTMuNiPYJ7nSNorELQMr1J33uOpXDMByNYhvtNk=
github.com/antchfx/xquery v0.0.0-20180515051857-ad5b8c7a47b0/go.mod h1:LzD22aAzDP8/dyiCKFp31He4m2GPjl0AFyzDtZzUu9M=
-github.com/antihax/optional v0.0.0-20180407024304-ca021399b1a6/go.mod h1:V8iCPQYkqmusNa815XgQio277wI47sdRh1dUOLdyC6Q=
+github.com/apache/openwhisk-client-go v0.0.0-20200201143223-a804fb82d105/go.mod h1:jLLKYP7+1+LFlIJW1n9U1gqeveLM1HIwa4ZHNOFxjPw=
github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ=
+github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ=
github.com/apparentlymart/go-cidr v1.0.1 h1:NmIwLZ/KdsjIUlhf+/Np40atNXm/+lZ5txfTJ/SpF+U=
github.com/apparentlymart/go-cidr v1.0.1/go.mod h1:EBcsNrHc3zQeuaeCeCtQruQm+n9/YjEn/vI25Lg7Gwc=
github.com/apparentlymart/go-dump v0.0.0-20180507223929-23540a00eaa3/go.mod h1:oL81AME2rN47vu18xqj1S1jPIPuN7afo62yKTNn3XMM=
@@ -222,29 +268,34 @@ github.com/armon/go-proxyproto v0.0.0-20190211145416-68259f75880e/go.mod h1:QmP9
github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8=
github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8=
github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs=
+github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A=
github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY=
github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY=
github.com/asaskevich/govalidator v0.0.0-20200108200545-475eaeb16496/go.mod h1:oGkLhpf+kjZl6xBf758TQhh5XrAeiJv/7FRz/2spLIg=
+github.com/asaskevich/govalidator v0.0.0-20200428143746-21a406dcc535/go.mod h1:oGkLhpf+kjZl6xBf758TQhh5XrAeiJv/7FRz/2spLIg=
+github.com/asaskevich/govalidator v0.0.0-20200907205600-7a23bdc65eef/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw=
+github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw=
github.com/awalterschulze/gographviz v0.0.0-20190522210029-fa59802746ab/go.mod h1:GEV5wmg4YquNw7v1kkyoX9etIk8yVmXj+AkDHuuETHs=
-github.com/aws/aws-sdk-go v1.15.11/go.mod h1:mFuSZ37Z9YOHbQEwBWztmVzqXrEkub65tZoCYDt7FT0=
-github.com/aws/aws-sdk-go v1.15.66/go.mod h1:E3/ieXAlvM0XWO57iftYVDLLvQ824smPP3ATZkfNZeM=
+github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU=
github.com/aws/aws-sdk-go v1.15.78/go.mod h1:E3/ieXAlvM0XWO57iftYVDLLvQ824smPP3ATZkfNZeM=
-github.com/aws/aws-sdk-go v1.17.7/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo=
github.com/aws/aws-sdk-go v1.19.11/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo=
github.com/aws/aws-sdk-go v1.19.39/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo=
github.com/aws/aws-sdk-go v1.25.3/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo=
github.com/aws/aws-sdk-go v1.25.47/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo=
-github.com/aws/aws-sdk-go v1.25.48/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo=
+github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo=
github.com/aws/aws-sdk-go v1.28.8/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo=
github.com/aws/aws-sdk-go v1.30.24/go.mod h1:5zCpMtNQVjRREroY7sYe8lOMRSxkhG6MZveU8YkpAk0=
+github.com/aws/aws-sdk-go v1.30.28/go.mod h1:5zCpMtNQVjRREroY7sYe8lOMRSxkhG6MZveU8YkpAk0=
github.com/aws/aws-sdk-go v1.31.9/go.mod h1:5zCpMtNQVjRREroY7sYe8lOMRSxkhG6MZveU8YkpAk0=
github.com/aws/aws-sdk-go v1.32.3/go.mod h1:5zCpMtNQVjRREroY7sYe8lOMRSxkhG6MZveU8YkpAk0=
github.com/aws/aws-sdk-go v1.34.21/go.mod h1:5zCpMtNQVjRREroY7sYe8lOMRSxkhG6MZveU8YkpAk0=
+github.com/aws/aws-sdk-go v1.34.28/go.mod h1:H7NKnBqNVzoTJpGfLrQkkD+ytBA93eiDYi/+8rV9s48=
+github.com/aws/aws-sdk-go v1.35.20/go.mod h1:tlPOdRjfxPBpNIwqDj61rmsnA85v9jc0Ps9+muhnW+k=
github.com/aws/aws-sdk-go v1.38.41 h1:2Q3XaEPmP2cxUB9D9w8kytQh2CSpbJtMKzMN42HMwEk=
github.com/aws/aws-sdk-go v1.38.41/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro=
+github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g=
github.com/baiyubin/aliyun-sts-go-sdk v0.0.0-20180326062324-cfa1a18b161f/go.mod h1:AuiFmCCPBSrqvVMvuqFuk0qogytodnVFVSN5CeJB8Gc=
github.com/beevik/etree v1.1.0/go.mod h1:r8Aw8JqVegEf0w2fDnATrX9VpkMcyFeM0FhwO62wh+A=
-github.com/beorn7/perks v0.0.0-20160804104726-4c0e84591b9a/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8=
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
@@ -257,9 +308,7 @@ github.com/bflad/tfproviderlint v0.18.0/go.mod h1:0fdh7JywihC58Io8AZ+gpcmQtJggse
github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d/go.mod h1:6QX/PXZ00z/TKoufEY6K/a0k6AhaJrQKdFe6OfVXsa4=
github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs=
github.com/bitly/go-hostpool v0.0.0-20171023180738-a3a6125de932/go.mod h1:NOuUCSz6Q9T7+igc/hlvDOUdtWKryOrtFyIVABv/p7k=
-github.com/bitly/go-simplejson v0.5.0/go.mod h1:cXHtHw4XUPsvGaxgjIAn8PhEWG9NfngEKAMDJEczWVA=
github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84=
-github.com/blang/semver v3.1.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk=
github.com/blang/semver v3.5.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk=
github.com/blang/semver v3.5.1+incompatible h1:cQNTCjp13qL8KC3Nbxr/y2Bqb63oX6wdnnjpJbkM4JQ=
github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk=
@@ -270,34 +319,29 @@ github.com/bmatcuk/doublestar v1.2.1/go.mod h1:wiQtGV+rzVYxB7WIlirSN++5HPtPlXEo9
github.com/bmatcuk/doublestar v1.3.2/go.mod h1:wiQtGV+rzVYxB7WIlirSN++5HPtPlXEo9MEoZQC/PmE=
github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869/go.mod h1:Ekp36dRnpXw/yCqJaO+ZrUyxD+3VXMFFr56k5XYrpB4=
github.com/boltdb/bolt v1.3.1/go.mod h1:clJnj/oiGkjum5o1McbSZDSLxVThjynRyGBgiAx27Ps=
+github.com/bombsimon/wsl v1.2.5 h1:9gTOkIwVtoDZywvX802SDHokeX4kW1cKnV8ZTVAPkRs=
+github.com/bombsimon/wsl v1.2.5/go.mod h1:43lEF/i0kpXbLCeDXL9LMT8c92HyBywXb0AsgMHYngM=
github.com/bombsimon/wsl/v3 v3.0.0/go.mod h1:st10JtZYLE4D5sC7b8xV4zTKZwAQjCH/Hy2Pm1FNZIc=
github.com/bombsimon/wsl/v3 v3.1.0 h1:E5SRssoBgtVFPcYWUOFJEcgaySgdtTNYzsSKDOY7ss8=
github.com/bombsimon/wsl/v3 v3.1.0/go.mod h1:st10JtZYLE4D5sC7b8xV4zTKZwAQjCH/Hy2Pm1FNZIc=
github.com/boombuler/barcode v1.0.1-0.20190219062509-6c824513bacc/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8=
github.com/bradfitz/go-smtpd v0.0.0-20170404230938-deb6d6237625/go.mod h1:HYsPBTaaSFSlLx/70C2HPIMNZpVV8+vt/A+FMnYP11g=
-github.com/bradfitz/gomemcache v0.0.0-20190913173617-a41fca850d0b/go.mod h1:H0wQNHz2YrLsuXOZozoeDmnHXkNCRmMW0gwFWDfEZDA=
github.com/brancz/gojsontoyaml v0.0.0-20190425155809-e8bd32d46b3d/go.mod h1:IyUJYN1gvWjtLF5ZuygmxbnsAyP3aJS6cHzIuZY50B0=
github.com/briankassouf/jose v0.9.2-0.20180619214549-d2569464773f/go.mod h1:HQhVmdUf7dBNwIIdBTivnCDxcf6IZY3/zrb+uKSJz6Y=
-github.com/bshuster-repo/logrus-logstash-hook v0.4.1/go.mod h1:zsTqEiSzDgAa/8GZR7E1qaXrhYNDKBYy5/dWPTIflbk=
github.com/bsm/go-vlq v0.0.0-20150828105119-ec6e8d4f5f4e/go.mod h1:N+BjUcTjSxc2mtRGSCPsat1kze3CUtvJN3/jTXlp29k=
github.com/btubbs/datetime v0.1.0/go.mod h1:n2BZ/2ltnRzNiz27aE3wUb2onNttQdC+WFxAoks5jJM=
github.com/btubbs/datetime v0.1.1/go.mod h1:n2BZ/2ltnRzNiz27aE3wUb2onNttQdC+WFxAoks5jJM=
-github.com/bugsnag/bugsnag-go v0.0.0-20141110184014-b1d153021fcd/go.mod h1:2oa8nejYd4cQ/b0hMIopN0lCRxU0bueqREvZLWFrtK8=
-github.com/bugsnag/osext v0.0.0-20130617224835-0dd3f918b21b/go.mod h1:obH5gd0BsqsP2LwDJ9aOkm/6J86V6lyAXCoQWGw3K50=
-github.com/bugsnag/panicwrap v0.0.0-20151223152923-e2c28503fcd0/go.mod h1:D/8v3kj0zr8ZAKg1AQ6crr+5VwKN5eIywRkfhyM/+dE=
github.com/c4milo/gotoolkit v0.0.0-20170704181456-e37eeabad07e/go.mod h1:txokOny9wavBtq2PWuHmj1P+eFwpCsj+gQeNNANChfU=
github.com/c4milo/gotoolkit v0.0.0-20190525173301-67483a18c17a/go.mod h1:txokOny9wavBtq2PWuHmj1P+eFwpCsj+gQeNNANChfU=
github.com/campoy/embedmd v1.0.0/go.mod h1:oxyr9RCiSXg0M3VJ3ks0UGfp98BpSSGr0kpiX3MzVl8=
-github.com/cenkalti/backoff v0.0.0-20181003080854-62661b46c409/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM=
+github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ=
github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM=
github.com/census-instrumentation/opencensus-proto v0.2.0/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
github.com/centrify/cloud-golang-sdk v0.0.0-20190214225812-119110094d0f/go.mod h1:C0rtzmGXgN78pYR0tGJFhtHgkbAs0lIbHwkB81VxDQE=
github.com/certifi/gocertifi v0.0.0-20180905225744-ee1a9a0726d2/go.mod h1:GJKEexRPVJrBSOjoqN5VNOIKJ5Q3RViH6eu3puDRwx4=
-github.com/cespare/xxhash v0.0.0-20181017004759-096ff4a8a059/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc=
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.0/go.mod h1:dgIUBU3pDso/gPgZ1osOZ0iQf77oPR28Tjxl5dIMyVM=
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/chai2010/gettext-go v0.0.0-20160711120539-c6fed771bfd5 h1:7aWHqerlJ41y6FOsEUvknqgXnGmJyJSbjhAWq5pO4F8=
@@ -310,8 +354,10 @@ github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMn
github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag=
github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I=
github.com/clarketm/json v1.14.1/go.mod h1:ynr2LRfb0fQU34l07csRNBTcivjySLLiY1YzQqKVfdo=
+github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE=
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
github.com/cloudfoundry-community/go-cfclient v0.0.0-20190201205600-f136f9222381/go.mod h1:e5+USP2j8Le2M0Jo3qKPFnNhuo1wueU4nWHCXBOfQ14=
+github.com/cloudfoundry/jibber_jabber v0.0.0-20151120183258-bcc4c8345a21/go.mod h1:po7NpZ/QiTKzBKyrsEAxwnTamCoh8uDk/egRpQ7siIc=
github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
github.com/cockroachdb/apd v1.1.0/go.mod h1:8Sl8LxpKi29FqWXR16WEFZRNSz3SoPzUzeMeY4+DwBQ=
github.com/cockroachdb/cockroach-go v0.0.0-20181001143604-e0a95dfd547c/go.mod h1:XGLbWH/ujMcbPbhZq52Nv6UrCghb1yGn//133kEsvDk=
@@ -320,18 +366,8 @@ github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:z
github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI=
github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0/go.mod h1:4Zcjuz89kmFXt9morQgcfYZAYZ5n8WHjt81YYWIwtTM=
github.com/community-terraform-providers/terraform-provider-ignition/v2 v2.1.0/go.mod h1:0reAZvVLhna+mtZ5RcHH4W8iGwM7ZEAK3Y8TCgn9+ZQ=
-github.com/containerd/cgroups v0.0.0-20190919134610-bf292b21730f/go.mod h1:OApqhQ4XNSNC13gXIwDjhOQxjWa/NxkwZXJ1EvqT0ko=
-github.com/containerd/console v0.0.0-20180822173158-c12b1e7919c1/go.mod h1:Tj/on1eG8kiEhd0+fhSDzsPAFESxzBBvdyEgyryXffw=
-github.com/containerd/containerd v1.2.7/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA=
-github.com/containerd/containerd v1.3.0-beta.2.0.20190828155532-0293cbd26c69/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA=
-github.com/containerd/containerd v1.3.2/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA=
github.com/containerd/continuity v0.0.0-20190426062206-aaeac12a7ffc/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y=
github.com/containerd/continuity v0.0.0-20190827140505-75bee3e2ccb6/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y=
-github.com/containerd/continuity v0.0.0-20200107194136-26c1120b8d41/go.mod h1:Dq467ZllaHgAtVp4p1xUQWBrFXR9s/wyoTpG8zOJGkY=
-github.com/containerd/fifo v0.0.0-20190226154929-a9fb20d87448/go.mod h1:ODA38xgv3Kuk8dQz2ZQXpnv/UZZUHUCL7pnLehbXgQI=
-github.com/containerd/go-runc v0.0.0-20180907222934-5a6d9f37cfa3/go.mod h1:IV7qH3hrUgRmyYrtgEeGWJfWbgcHL9CSRruz2Vqcph0=
-github.com/containerd/ttrpc v0.0.0-20190828154514-0e0f228740de/go.mod h1:PvCDdDGpgqzQIzDW1TphrGLssLDZp2GuS+X5DkEJB8o=
-github.com/containerd/typeurl v0.0.0-20180627222232-a93fcdb778cd/go.mod h1:Cm3kwCdlkCfMSHURc+r6fwoGH6/F1hH3S4sg0rLFWPc=
github.com/containernetworking/cni v0.7.1/go.mod h1:LGwApLUm2FpoOfxTDEeq8T9ipbpZ61X79hmU3w8FmsY=
github.com/containers/image v3.0.2+incompatible/go.mod h1:8Vtij257IWSanUQKe1tAeNOm2sRVkSqQTVQ1IlwI3+M=
github.com/coreos/bbolt v1.3.0/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk=
@@ -361,31 +397,24 @@ github.com/coreos/go-systemd/v22 v22.0.0/go.mod h1:xO0FLkIi5MaZafQlIrOotqXZ90ih+
github.com/coreos/ignition v0.33.0/go.mod h1:WJQapxzEn9DE0ryxsGvm8QnBajm/XsS/PkrDqSpz+bA=
github.com/coreos/ignition v0.34.0/go.mod h1:WJQapxzEn9DE0ryxsGvm8QnBajm/XsS/PkrDqSpz+bA=
github.com/coreos/ignition/v2 v2.3.0/go.mod h1:85dmM/CERMZXNrJsXqtNLIxR/dn8G9qlL1CmEjCugp0=
+github.com/coreos/ignition/v2 v2.9.0/go.mod h1:A5lFFzA2/zvZQPVEvI1lR5WPLWRb7KZ7Q1QOeUMtcAc=
github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA=
github.com/coreos/pkg v0.0.0-20180108230652-97fdf19511ea/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA=
github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f h1:lBNOc5arjvs8E5mO2tbpBpLoyyu8B6e44T7hJy6potg=
github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA=
github.com/coreos/prometheus-operator v0.35.0/go.mod h1:XHYZUStZWcwd1yk/1DjZv/fywqKIyAJ6pSwvIr+v9BQ=
-github.com/coreos/prometheus-operator v0.38.0/go.mod h1:xZC7/TgeC0/mBaJk+1H9dbHaiEvLYHgX6Mi1h40UPh8=
+github.com/coreos/stream-metadata-go v0.0.0-20210225230131-70edb9eb47b3 h1:0JspqV66RwYqYfvi8lCUoL5zUZMh9uN4hx/J5+NRXIE=
+github.com/coreos/stream-metadata-go v0.0.0-20210225230131-70edb9eb47b3/go.mod h1:RTjQyHgO/G37oJ3qnqYK6Z4TPZ5EsaabOtfMjVXmgko=
github.com/coreos/vcontext v0.0.0-20190529201340-22b159166068/go.mod h1:E+6hug9bFSe0KZ2ZAzr8M9F5JlArJjv5D1JS7KSkPKE=
github.com/coreos/vcontext v0.0.0-20200225161404-ee043618d38d/go.mod h1:z4pMVvaUrxs98RROlIYdAQCKhEicjnTirOaVyDRH5h8=
+github.com/coreos/vcontext v0.0.0-20201120045928-b0e13dab675c/go.mod h1:z4pMVvaUrxs98RROlIYdAQCKhEicjnTirOaVyDRH5h8=
github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE=
+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/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY=
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=
-github.com/cyphar/filepath-securejoin v0.2.2/go.mod h1:FpkQEhXnPnOthhzymB7CGsFk2G9VLXONKD9G7QGMM+4=
-github.com/cznic/b v0.0.0-20180115125044-35e9bbe41f07/go.mod h1:URriBxXwVq5ijiJ12C7iIZqlA69nTlI+LgI6/pwftG8=
-github.com/cznic/fileutil v0.0.0-20180108211300-6a051e75936f/go.mod h1:8S58EK26zhXSxzv7NQFpnliaOQsmDUxvoQO3rt154Vg=
-github.com/cznic/golex v0.0.0-20170803123110-4ab7c5e190e4/go.mod h1:+bmmJDNmKlhWNG+gwWCkaBoTy39Fs+bzRxVBzoTQbIc=
-github.com/cznic/internal v0.0.0-20180608152220-f44710a21d00/go.mod h1:olo7eAdKwJdXxb55TKGLiJ6xt1H0/tiiRCWKVLmtjY4=
-github.com/cznic/lldb v1.1.0/go.mod h1:FIZVUmYUVhPwRiPzL8nD/mpFcJ/G7SSXjjXYG4uRI3A=
-github.com/cznic/mathutil v0.0.0-20180504122225-ca4c9f2c1369/go.mod h1:e6NPNENfs9mPDVNRekM7lKScauxd5kXTr1Mfyig6TDM=
-github.com/cznic/ql v1.2.0/go.mod h1:FbpzhyZrqr0PVlK6ury+PoW3T0ODUV22OeWIxcaOrSE=
-github.com/cznic/sortutil v0.0.0-20150617083342-4c7342852e65/go.mod h1:q2w6Bg5jeox1B+QkJ6Wp/+Vn0G/bo3f1uY7Fn3vivIQ=
-github.com/cznic/strutil v0.0.0-20171016134553-529a34b1c186/go.mod h1:AHHPPPXTw0h6pVabbcbyGRK1DckRn7r/STdZEeIDzZc=
-github.com/cznic/zappy v0.0.0-20160723133515-2533cb5b45cc/go.mod h1:Y1SNZ4dRUOKXshKUbwUapqNncRrho4mkjQebgEHZLj8=
github.com/daixiang0/gci v0.2.4 h1:BUCKk5nlK2m+kRIsoj+wb/5hazHvHeZieBKWd9Afa8Q=
github.com/daixiang0/gci v0.2.4/go.mod h1:+AV8KmHTGxxwp/pY84TLQfFKp2vuKXXJVzF3kD/hfR4=
github.com/davecgh/go-spew v0.0.0-20151105211317-5215b55f46b2/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
@@ -396,42 +425,28 @@ github.com/davecgh/go-xdr v0.0.0-20161123171359-e6a2ba005892/go.mod h1:CTDl0pzVz
github.com/davegardnerisme/deephash v0.0.0-20210406090112-6d072427d830 h1:gn7TsPBQ3HoEUaa8oBLbMalIBPf3eeQb7W/8kK3gERk=
github.com/davegardnerisme/deephash v0.0.0-20210406090112-6d072427d830/go.mod h1:ToGe2SdaElKXzEmYLttAgFHy0exxh0wyq9zG7ZjjjYM=
github.com/daviddengcn/go-colortext v0.0.0-20160507010035-511bcaf42ccd/go.mod h1:dv4zxwHi5C/8AeI+4gX4dCWOIvNi7I6JCSX0HvlKPgE=
-github.com/deislabs/oras v0.8.1/go.mod h1:Mx0rMSbBNaNfY9hjpccEnxkOqJL6KGjtxNHPLC4G4As=
+github.com/dchest/bcrypt_pbkdf v0.0.0-20150205184540-83f37f9c154a/go.mod h1:Bw9BbhOJVNR+t0jCqx2GC6zv0TGBsShs56Y3gfSCvl0=
github.com/denis-tingajkin/go-header v0.3.1 h1:ymEpSiFjeItCy1FOP+x0M2KdCELdEAHUsNa8F+hHc6w=
github.com/denis-tingajkin/go-header v0.3.1/go.mod h1:sq/2IxMhaZX+RRcgHfCRx/m0M5na0fBt4/CRe7Lrji0=
github.com/denisenkom/go-mssqldb v0.0.0-20190412130859-3b1d194e553a/go.mod h1:zAg7JM8CkOJ43xKXIj7eRO9kmWm/TW578qo+oDO6tuM=
-github.com/denisenkom/go-mssqldb v0.0.0-20190515213511-eb9f6a1743f3/go.mod h1:zAg7JM8CkOJ43xKXIj7eRO9kmWm/TW578qo+oDO6tuM=
-github.com/denverdino/aliyungo v0.0.0-20190125010748-a747050bb1ba/go.mod h1:dV8lFg6daOBZbT6/BDGIz6Y3WFGn8juu6G+CQ6LHtl0=
-github.com/dgrijalva/jwt-go v0.0.0-20170104182250-a601269ab70c/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM=
github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no=
-github.com/dgryski/go-sip13 v0.0.0-20190329191031-25c5027a8c7b/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no=
-github.com/dhui/dktest v0.3.0/go.mod h1:cyzIUfGsBEbZ6BT7tnXqAShHSXCZhSNmFl70sZ7c1yc=
-github.com/dimchansky/utfbom v1.0.0/go.mod h1:rO41eb7gLfo8SF1jd9F8HplJm1Fewwi4mQvIirEdv+8=
-github.com/dimchansky/utfbom v1.1.0 h1:FcM3g+nofKgUteL8dm/UpdRXNC9KmADgTpLKsu0TRo4=
github.com/dimchansky/utfbom v1.1.0/go.mod h1:rO41eb7gLfo8SF1jd9F8HplJm1Fewwi4mQvIirEdv+8=
-github.com/dmacvicar/terraform-provider-libvirt v0.6.2/go.mod h1:rUzijwUJHukJWZKi6PJXo9aJqGLXeUX6NDEy6O0UATg=
+github.com/dimchansky/utfbom v1.1.1 h1:vV6w1AhK4VMnhBno/TPVCoK9U/LP0PkLCS9tbxHdi/U=
+github.com/dimchansky/utfbom v1.1.1/go.mod h1:SxdoEBH5qIqFocHMyGOXVAybYJdr71b1Q/j0mACtrfE=
+github.com/dmacvicar/terraform-provider-libvirt v0.6.4-0.20201216193629-2b60d7626ff8/go.mod h1:RZqLUAMFQ32TmKpk1Ayb4zeTe7+7k0jfsWpW1UTqVDw=
github.com/dnaeon/go-vcr v0.0.0-20180920040454-5637cf3d8a31/go.mod h1:aBB1+wY4s93YsC3HHjMBMrwTj2R9FHDzUr9KyGc8n1E=
github.com/dnaeon/go-vcr v1.0.1/go.mod h1:aBB1+wY4s93YsC3HHjMBMrwTj2R9FHDzUr9KyGc8n1E=
-github.com/docker/cli v0.0.0-20200130152716-5d0cf8839492/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8=
github.com/docker/distribution v0.0.0-20180920194744-16128bbac47f/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=
-github.com/docker/distribution v0.0.0-20191216044856-a8371794149d/go.mod h1:0+TTO4EOBfRPhZXAeF1Vu+W3hHZ8eLp8PgKVZlcvtFY=
-github.com/docker/distribution v2.7.0+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=
github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=
-github.com/docker/docker v0.7.3-0.20190103212154-2b7e084dc98b/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
github.com/docker/docker v0.7.3-0.20190327010347-be7ac8be2ae0/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
-github.com/docker/docker v0.7.3-0.20190817195342-4760db040282/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
-github.com/docker/docker v1.4.2-0.20200203170920-46ec8731fbce/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
-github.com/docker/docker-credential-helpers v0.6.3/go.mod h1:WRaJzqw3CTB9bk10avuGsjVBZsD05qeibJ1/TYlvc0Y=
github.com/docker/go-connections v0.3.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec=
github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec=
-github.com/docker/go-metrics v0.0.0-20180209012529-399ea8c73916/go.mod h1:/u0gXw0Gay3ceNrsHubL3BtdOL2fHf93USgMTe0W5dI=
github.com/docker/go-metrics v0.0.1/go.mod h1:cG1hvH2utMXtqgqqYE9plW6lDxS3/5ayHzueweSI3Vw=
github.com/docker/go-units v0.3.3/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk=
github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk=
github.com/docker/libnetwork v0.0.0-20190731215715-7f13a5c99f4b/go.mod h1:93m0aTqz6z+g32wla4l4WxTrdtvBRmVzYRkYvasA5Z8=
-github.com/docker/libtrust v0.0.0-20150114040149-fa567046d9b1/go.mod h1:cyGadeNEkKy96OOhEzfZl+yxihPEzKnqJwvfuSUqbZE=
github.com/docker/libtrust v0.0.0-20160708172513-aabc10ec26b7/go.mod h1:cyGadeNEkKy96OOhEzfZl+yxihPEzKnqJwvfuSUqbZE=
github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM=
github.com/docker/spdystream v0.0.0-20181023171402-6480d4af844c/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM=
@@ -445,17 +460,14 @@ github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25Kn
github.com/dustinkirkland/golang-petname v0.0.0-20170105215008-242afa0b4f8a/go.mod h1:V+Qd57rJe8gd4eiGzZyg4h54VLHmYVVw54iMnlAMrF8=
github.com/dustinkirkland/golang-petname v0.0.0-20170921220637-d3c2ba80e75e/go.mod h1:V+Qd57rJe8gd4eiGzZyg4h54VLHmYVVw54iMnlAMrF8=
github.com/dustinkirkland/golang-petname v0.0.0-20191129215211-8e5a1ed0cff0/go.mod h1:V+Qd57rJe8gd4eiGzZyg4h54VLHmYVVw54iMnlAMrF8=
+github.com/dustmop/soup v1.1.2-0.20190516214245-38228baa104e/go.mod h1:CgNC6SGbT+Xb8wGGvzilttZL1mc5sQ/5KkcxsZttMIk=
github.com/dylanmei/iso8601 v0.1.0/go.mod h1:w9KhXSgIyROl1DefbMYIE7UVSIvELTbMrCfx+QkYnoQ=
github.com/dylanmei/winrmtest v0.0.0-20190225150635-99b7fe2fddf1/go.mod h1:lcy9/2gH1jn/VCLouHA6tOEwLoNVd4GW6zhuKLmHC2Y=
github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs=
+github.com/eapache/go-resiliency v1.2.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs=
github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU=
github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I=
-github.com/edsrzf/mmap-go v0.0.0-20170320065105-0bce6a688712/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M=
github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M=
-github.com/elastic/go-sysinfo v1.0.1/go.mod h1:O/D5m1VpYLwGjCYzEt63g3Z1uO3jXfwyzzjiW90t8cY=
-github.com/elastic/go-sysinfo v1.1.1/go.mod h1:i1ZYdU10oLNfRzq4vq62BEwD2fH8KaWh6eh0ikPT9F0=
-github.com/elastic/go-windows v1.0.0/go.mod h1:TsU0Nrp7/y3+VwE82FoZF8gC/XFg/Elz6CcloAxnPgU=
-github.com/elastic/go-windows v1.0.1/go.mod h1:FoVvqWSun28vaDQPbj2Elfc0JahhPB7WQEGa3c814Ss=
github.com/elazarl/go-bindata-assetfs v1.0.0/go.mod h1:v+YaWX3bdea5J/mo8dSETolEo7R71Vk1u8bnjau5yw4=
github.com/elazarl/goproxy v0.0.0-20170405201442-c4fc26588b6e/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc=
github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153 h1:yUdfgN0XgIJw7foRItutHYUIhlcKzcSf5vDpdhQAKTc=
@@ -480,7 +492,6 @@ github.com/evanphx/json-patch v4.11.0+incompatible h1:glyUF9yIYtMHzn8xaKw5rMhdWc
github.com/evanphx/json-patch v4.11.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk=
github.com/exponent-io/jsonpath v0.0.0-20151013193312-d6023ce2651d h1:105gxyaGwCFad8crR9dcMQWvV9Hvulu6hwUh4tWPJnM=
github.com/exponent-io/jsonpath v0.0.0-20151013193312-d6023ce2651d/go.mod h1:ZZMPRZwes7CROmyNKgQzC3XPs6L/G2EJLHddWejkmf4=
-github.com/facette/natsort v0.0.0-20181210072756-2cd4dd1e2dcb/go.mod h1:bH6Xx7IW64qjjJq8M2u4dxNaBiDfKK+z/3eGDpXEQhc=
github.com/fatih/camelcase v1.0.0 h1:hxNvNX/xYBp0ovncs8WyWZrOrpBNub/JfaMvbURyft8=
github.com/fatih/camelcase v1.0.0/go.mod h1:yN2Sb0lFhZJUdVvtELVWefmrXpuZESvPmqwoZc+/fpc=
github.com/fatih/color v1.6.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
@@ -489,16 +500,19 @@ github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL
github.com/fatih/color v1.10.0 h1:s36xzo75JdqLaaWoiEHk767eHiwo0598uUxyfiPkDsg=
github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM=
github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M=
-github.com/fatih/structtag v1.1.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94=
github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc=
+github.com/form3tech-oss/jwt-go v3.2.1+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k=
+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=
github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g=
+github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4=
+github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20=
github.com/frankban/quicktest v1.4.0/go.mod h1:36zfPVQyHxymz4cH7wlDmVwDrJuljRB60qkgn7rorfQ=
github.com/frankban/quicktest v1.4.1/go.mod h1:36zfPVQyHxymz4cH7wlDmVwDrJuljRB60qkgn7rorfQ=
-github.com/frankban/quicktest v1.7.2/go.mod h1:jaStnuzAqU1AJdCO0l53JDCJrVDKcS03DbaAcR7Ks/o=
+github.com/frankban/quicktest v1.10.2/go.mod h1:K+q6oSqb0W0Ininfk863uOk1lMy69l/P6txr3mVT54s=
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
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/fsouza/fake-gcs-server v1.7.0/go.mod h1:5XIRs4YvwNbNoz+1JF8j6KLAyDh7RHGAyAK3EP2EsNk=
github.com/fsouza/go-dockerclient v0.0.0-20171004212419-da3951ba2e9e/go.mod h1:KpcjM623fQYE9MZiTGzKhjfxXAV9wbyX2C1cyRHfhl0=
github.com/fullsailor/pkcs7 v0.0.0-20190404230743-d7302db945fa/go.mod h1:KnogPXtdwXqoenmZCw6S+25EAm2MkxbG0deNDu4cbSA=
github.com/fvbommel/sortorder v1.0.1/go.mod h1:uk88iVf1ovNn1iLfgUVU2F9o5eO30ui720w+kxuqRs0=
@@ -506,7 +520,6 @@ github.com/gammazero/deque v0.0.0-20180920172122-f6adf94963e4/go.mod h1:GeIq9qoE
github.com/gammazero/deque v0.0.0-20190130191400-2afb3858e9c7/go.mod h1:GeIq9qoE43YdGnDXURnmKTnGg15pQz4mYkXSTChbneI=
github.com/gammazero/workerpool v0.0.0-20181230203049-86a96b5d5d92/go.mod h1:w9RqFVO2BM3xwWEcAB8Fwp0OviTBBEiRmSBDfbXnd3w=
github.com/gammazero/workerpool v0.0.0-20190406235159-88d534f22b56/go.mod h1:w9RqFVO2BM3xwWEcAB8Fwp0OviTBBEiRmSBDfbXnd3w=
-github.com/garyburd/redigo v0.0.0-20150301180006-535138d7bcd7/go.mod h1:NR3MbYisc3/PwhQ00EMzDiPmrwpPxAn5GI05/YaO1SY=
github.com/getsentry/raven-go v0.0.0-20190513200303-c977f96e1095/go.mod h1:KungGk8q33+aIAZUIVWZDr2OfAEBsO49PX4NzFV5kcQ=
github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
@@ -520,6 +533,7 @@ github.com/go-asn1-ber/asn1-ber v1.3.1/go.mod h1:hEBeB/ic+5LoWskz+yKT7vGhhPYkPro
github.com/go-bindata/go-bindata v3.1.2+incompatible h1:5vjJMVhowQdPzjE1LdxyFF7YFTXg5IgGVW4gBr5IbvE=
github.com/go-bindata/go-bindata v3.1.2+incompatible/go.mod h1:xK8Dsgwmeed+BBsSy2XTopBn/8uK2HWuGSnA11C3Joo=
github.com/go-critic/go-critic v0.3.5-0.20190526074819-1df300866540/go.mod h1:+sE8vrLDS2M0pZkBk0wy6+nLdKexVDrl/jBqQOTDThA=
+github.com/go-critic/go-critic v0.3.5-0.20190904082202-d79a9f0c64db/go.mod h1:+sE8vrLDS2M0pZkBk0wy6+nLdKexVDrl/jBqQOTDThA=
github.com/go-critic/go-critic v0.4.1/go.mod h1:7/14rZGnZbY6E38VEGk2kVhoq6itzc1E68facVDK23g=
github.com/go-critic/go-critic v0.5.2 h1:3RJdgf6u4NZUumoP8nzbqiiNT8e1tC2Oc7jlgqre/IA=
github.com/go-critic/go-critic v0.5.2/go.mod h1:cc0+HvdE3lFpqLecgqMaJcvWWH77sLdBp+wLGPM1Yyo=
@@ -532,9 +546,9 @@ github.com/go-git/go-git/v5 v5.1.0/go.mod h1:ZKfuPUoY1ZqIG4QG9BDBh3G4gLM5zvPuSJA
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/go-ini/ini v1.25.4/go.mod h1:ByCAeIL28uOIIG0E3PJtZPDL8WnHpFKFOtgjp+3Ies8=
github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
+github.com/go-kit/kit v0.10.0/go.mod h1:xUsJbQ/Fp4kEt7AFgCuvyX4a71u8h9jB8tj/ORgOZ7o=
github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY=
github.com/go-ldap/ldap v3.0.2+incompatible/go.mod h1:qfd9rJvER9Q0/D/Sqn1DfHRoBp40uXYvFoEVrNEPqRc=
github.com/go-ldap/ldap/v3 v3.1.3/go.mod h1:3rbOH3jRS2u6jg2rJnKAMLE/xQyCKIveG2Sa/Cohzb8=
@@ -550,7 +564,6 @@ github.com/go-logr/logr v0.3.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTg
github.com/go-logr/logr v0.4.0 h1:K7/B1jt6fIBQVd4Owv2MqGQClcgf0R266+7C/QjRcLc=
github.com/go-logr/logr v0.4.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU=
github.com/go-logr/zapr v0.1.0/go.mod h1:tabnROwaDl0UNxkVeFRbY8bwB37GwRv0P8lg6aAiEnk=
-github.com/go-logr/zapr v0.1.1/go.mod h1:tabnROwaDl0UNxkVeFRbY8bwB37GwRv0P8lg6aAiEnk=
github.com/go-logr/zapr v0.2.0/go.mod h1:qhKdvif7YF5GI9NWEpyxTSSBdGmzkNguibrdCNVPunU=
github.com/go-logr/zapr v0.4.0 h1:uc1uML3hRYL9/ZZPdgHS/n8Nzo+eaYL/Efxkkamf7OM=
github.com/go-logr/zapr v0.4.0/go.mod h1:tabnROwaDl0UNxkVeFRbY8bwB37GwRv0P8lg6aAiEnk=
@@ -558,63 +571,88 @@ github.com/go-martini/martini v0.0.0-20170121215854-22fa46961aab/go.mod h1:/P9AE
github.com/go-ole/go-ole v1.2.1/go.mod h1:7FAglXiTm7HKlQRDeOQ6ZNUHidzCWXuZWq/1dTyBNF8=
github.com/go-openapi/analysis v0.0.0-20180825180245-b006789cd277/go.mod h1:k70tL6pCuVxPJOHXQ+wIac1FUrvNkHolPie/cLEU6hI=
github.com/go-openapi/analysis v0.17.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik=
-github.com/go-openapi/analysis v0.17.2/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik=
github.com/go-openapi/analysis v0.18.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik=
github.com/go-openapi/analysis v0.19.2/go.mod h1:3P1osvZa9jKjb8ed2TPng3f0i/UY9snX6gxi44djMjk=
+github.com/go-openapi/analysis v0.19.4/go.mod h1:3P1osvZa9jKjb8ed2TPng3f0i/UY9snX6gxi44djMjk=
github.com/go-openapi/analysis v0.19.5/go.mod h1:hkEAkxagaIvIP7VTn8ygJNkd4kAYON2rCu0v0ObL0AU=
+github.com/go-openapi/analysis v0.19.10/go.mod h1:qmhS3VNFxBlquFJ0RGoDtylO9y4pgTAUNE9AEEMdlJQ=
+github.com/go-openapi/analysis v0.19.16/go.mod h1:GLInF007N83Ad3m8a/CbQ5TPzdnGT7workfHwuVjNVk=
github.com/go-openapi/errors v0.17.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0=
-github.com/go-openapi/errors v0.17.2/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0=
github.com/go-openapi/errors v0.18.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0=
github.com/go-openapi/errors v0.19.2/go.mod h1:qX0BLWsyaKfvhluLejVpVNwNRdXZhEbTA4kxxpKBC94=
+github.com/go-openapi/errors v0.19.3/go.mod h1:qX0BLWsyaKfvhluLejVpVNwNRdXZhEbTA4kxxpKBC94=
+github.com/go-openapi/errors v0.19.6/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M=
+github.com/go-openapi/errors v0.19.7/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M=
+github.com/go-openapi/errors v0.19.8/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M=
+github.com/go-openapi/errors v0.19.9/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M=
github.com/go-openapi/jsonpointer v0.0.0-20160704185906-46af16f9f7b1/go.mod h1:+35s3my2LFTysnkMfxsJBAMHj/DoqoB9knIWoYG/Vk0=
github.com/go-openapi/jsonpointer v0.17.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M=
-github.com/go-openapi/jsonpointer v0.17.2/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M=
github.com/go-openapi/jsonpointer v0.18.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M=
github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg=
-github.com/go-openapi/jsonpointer v0.19.3 h1:gihV7YNZK1iK6Tgwwsxo2rJbD1GTbdm72325Bq8FI3w=
github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg=
+github.com/go-openapi/jsonpointer v0.19.5 h1:gZr+CIYByUqjcgeLXnQu2gHYQC9o73G2XUeOFYEICuY=
+github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg=
github.com/go-openapi/jsonreference v0.0.0-20160704190145-13c6e3589ad9/go.mod h1:W3Z9FmVs9qj+KR4zFKmDPGiLdk1D9Rlm7cyMvf57TTg=
github.com/go-openapi/jsonreference v0.17.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I=
-github.com/go-openapi/jsonreference v0.17.2/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I=
github.com/go-openapi/jsonreference v0.18.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I=
github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8=
github.com/go-openapi/jsonreference v0.19.4 h1:3Vw+rh13uq2JFNxgnMTGE1rnoieU9FmyE1gvnyylsYg=
github.com/go-openapi/jsonreference v0.19.4/go.mod h1:RdybgQwPxbL4UEjuAruzK1x3nE69AqPYEJeo/TWfEeg=
github.com/go-openapi/loads v0.17.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU=
-github.com/go-openapi/loads v0.17.2/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU=
github.com/go-openapi/loads v0.18.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU=
github.com/go-openapi/loads v0.19.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU=
github.com/go-openapi/loads v0.19.2/go.mod h1:QAskZPMX5V0C2gvfkGZzJlINuP7Hx/4+ix5jWFxsNPs=
+github.com/go-openapi/loads v0.19.3/go.mod h1:YVfqhUCdahYwR3f3iiwQLhicVRvLlU/WO5WPaZvcvSI=
github.com/go-openapi/loads v0.19.4/go.mod h1:zZVHonKd8DXyxyw4yfnVjPzBjIQcLt0CCsn0N0ZrQsk=
+github.com/go-openapi/loads v0.19.5/go.mod h1:dswLCAdonkRufe/gSUC3gN8nTSaB9uaS2es0x5/IbjY=
+github.com/go-openapi/loads v0.19.6/go.mod h1:brCsvE6j8mnbmGBh103PT/QLHfbyDxA4hsKvYBNEGVc=
+github.com/go-openapi/loads v0.19.7/go.mod h1:brCsvE6j8mnbmGBh103PT/QLHfbyDxA4hsKvYBNEGVc=
+github.com/go-openapi/loads v0.20.0/go.mod h1:2LhKquiE513rN5xC6Aan6lYOSddlL8Mp20AW9kpviM4=
github.com/go-openapi/runtime v0.0.0-20180920151709-4f900dc2ade9/go.mod h1:6v9a6LTXWQCdL8k1AO3cvqx5OtZY/Y9wKTgaoP6YRfA=
-github.com/go-openapi/runtime v0.18.0/go.mod h1:uI6pHuxWYTy94zZxgcwJkUWa9wbIlhteGfloI10GD4U=
github.com/go-openapi/runtime v0.19.0/go.mod h1:OwNfisksmmaZse4+gpV3Ne9AyMOlP1lt4sK4FXt0O64=
github.com/go-openapi/runtime v0.19.4/go.mod h1:X277bwSUBxVlCYR3r7xgZZGKVvBd/29gLDlFGtJ8NL4=
+github.com/go-openapi/runtime v0.19.11/go.mod h1:dhGWCTKRXlAfGnQG0ONViOZpjfg0m2gUt9nTQPQZuoo=
+github.com/go-openapi/runtime v0.19.15/go.mod h1:dhGWCTKRXlAfGnQG0ONViOZpjfg0m2gUt9nTQPQZuoo=
+github.com/go-openapi/runtime v0.19.16/go.mod h1:5P9104EJgYcizotuXhEuUrzVc+j1RiSjahULvYmlv98=
+github.com/go-openapi/runtime v0.19.24/go.mod h1:Lm9YGCeecBnUUkFTxPC4s1+lwrkJ0pthx8YvyjCfkgk=
github.com/go-openapi/spec v0.19.0 h1:A4SZ6IWh3lnjH0rG0Z5lkxazMGBECtrZcbyYQi+64k4=
github.com/go-openapi/spec v0.19.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI=
github.com/go-openapi/strfmt v0.17.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU=
-github.com/go-openapi/strfmt v0.17.2/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU=
github.com/go-openapi/strfmt v0.18.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU=
github.com/go-openapi/strfmt v0.19.0/go.mod h1:+uW+93UVvGGq2qGaZxdDeJqSAqBqBdl+ZPMF/cC8nDY=
github.com/go-openapi/strfmt v0.19.2/go.mod h1:0yX7dbo8mKIvc3XSKp7MNfxw4JytCfCD6+bY1AVL9LU=
github.com/go-openapi/strfmt v0.19.3/go.mod h1:0yX7dbo8mKIvc3XSKp7MNfxw4JytCfCD6+bY1AVL9LU=
+github.com/go-openapi/strfmt v0.19.4/go.mod h1:eftuHTlB/dI8Uq8JJOyRlieZf+WkkxUuk0dgdHXr2Qk=
github.com/go-openapi/strfmt v0.19.5/go.mod h1:eftuHTlB/dI8Uq8JJOyRlieZf+WkkxUuk0dgdHXr2Qk=
+github.com/go-openapi/strfmt v0.19.8/go.mod h1:qBBipho+3EoIqn6YDI+4RnQEtj6jT/IdKm+PAlXxSUc=
+github.com/go-openapi/strfmt v0.19.10/go.mod h1:qBBipho+3EoIqn6YDI+4RnQEtj6jT/IdKm+PAlXxSUc=
+github.com/go-openapi/strfmt v0.19.11/go.mod h1:UukAYgTaQfqJuAFlNxxMWNvMYiwiXtLsF2VwmoFtbtc=
+github.com/go-openapi/strfmt v0.20.0/go.mod h1:UukAYgTaQfqJuAFlNxxMWNvMYiwiXtLsF2VwmoFtbtc=
+github.com/go-openapi/strfmt v0.20.1/go.mod h1:43urheQI9dNtE5lTZQfuFJvjYJKPrxicATpEfZwHUNk=
github.com/go-openapi/swag v0.0.0-20160704191624-1d0bd113de87/go.mod h1:DXUve3Dpr1UfpPtxFw+EFuQ41HhCWZfha5jSVRG7C7I=
github.com/go-openapi/swag v0.17.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg=
-github.com/go-openapi/swag v0.17.2/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg=
github.com/go-openapi/swag v0.18.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg=
github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk=
github.com/go-openapi/swag v0.19.4/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk=
github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk=
-github.com/go-openapi/swag v0.19.9 h1:1IxuqvBUU3S2Bi4YC7tlP9SJF1gVpCvqN0T2Qof4azE=
+github.com/go-openapi/swag v0.19.7/go.mod h1:ao+8BpOPyKdpQz3AOJfbeEVpLmWAvlT1IfTe5McPyhY=
github.com/go-openapi/swag v0.19.9/go.mod h1:ao+8BpOPyKdpQz3AOJfbeEVpLmWAvlT1IfTe5McPyhY=
-github.com/go-openapi/validate v0.17.2/go.mod h1:Uh4HdOzKt19xGIGm1qHf/ofbX1YQ4Y+MYsct2VUrAJ4=
+github.com/go-openapi/swag v0.19.12 h1:Bc0bnY2c3AoF7Gc+IMIAQQsD8fLHjHpc19wXvYuayQI=
+github.com/go-openapi/swag v0.19.12/go.mod h1:eFdyEBkTdoAf/9RXBvj4cr1nH7GD8Kzo5HTt47gr72M=
github.com/go-openapi/validate v0.18.0/go.mod h1:Uh4HdOzKt19xGIGm1qHf/ofbX1YQ4Y+MYsct2VUrAJ4=
github.com/go-openapi/validate v0.19.2/go.mod h1:1tRCw7m3jtI8eNWEEliiAqUIcBztB2KDnRCRMUi7GTA=
+github.com/go-openapi/validate v0.19.3/go.mod h1:90Vh6jjkTn+OT1Eefm0ZixWNFjhtOH7vS9k0lo6zwJo=
github.com/go-openapi/validate v0.19.5/go.mod h1:8DJv2CVJQ6kGNpFW6eV9N3JviE1C85nY1c2z52x1Gk4=
+github.com/go-openapi/validate v0.19.6/go.mod h1:8DJv2CVJQ6kGNpFW6eV9N3JviE1C85nY1c2z52x1Gk4=
github.com/go-openapi/validate v0.19.8/go.mod h1:8DJv2CVJQ6kGNpFW6eV9N3JviE1C85nY1c2z52x1Gk4=
+github.com/go-openapi/validate v0.19.10/go.mod h1:RKEZTUWDkxKQxN2jDT7ZnZi2bhZlbNMAuKvKB+IaGx8=
+github.com/go-openapi/validate v0.19.12/go.mod h1:Rzou8hA/CBw8donlS6WNEUQupNvUZ0waH08tGe6kAQ4=
+github.com/go-openapi/validate v0.19.15/go.mod h1:tbn/fdOwYHgrhPBzidZfJC2MIVvs9GA7monOmWBbeCI=
+github.com/go-openapi/validate v0.20.1/go.mod h1:b60iJT+xNNLfaQJUqLI7946tYiFEOuE9E4k54HpKcJ0=
github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4=
+github.com/go-playground/locales v0.12.1/go.mod h1:IUMDtCfWo/w/mtMfIE/IG2K+Ey3ygWanZIBtBW0W2TM=
github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8=
+github.com/go-playground/universal-translator v0.16.0/go.mod h1:1AnU7NaIRDWWzGEKwgtJRd2xk99HeFyHw3yid4rvQIY=
github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA=
github.com/go-playground/validator/v10 v10.2.0/go.mod h1:uOYAAleCW8F/7oMFd6aG0GOhaH6EGOAJShg8Id5JGkI=
github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w=
@@ -651,26 +689,40 @@ github.com/go-toolsmith/typep v1.0.2 h1:8xdsa1+FSIH/RhEkgnD1j2CJOy5mNllW1Q9tRiYw
github.com/go-toolsmith/typep v1.0.2/go.mod h1:JSQCQMUPdRlMZFswiq3TGpNp1GMktqkR2Ns5AIQkATU=
github.com/go-xmlfmt/xmlfmt v0.0.0-20191208150333-d5b6f63a941b h1:khEcpUM4yFcxg4/FHQWkvVRmgijNXRfzkIDHh23ggEo=
github.com/go-xmlfmt/xmlfmt v0.0.0-20191208150333-d5b6f63a941b/go.mod h1:aUCEOzzezBEjDBbFBoSiya/gduyIiWYRP6CnSFIV8AM=
-github.com/gobuffalo/envy v1.6.5/go.mod h1:N+GkhhZ/93bGZc6ZKhJLP6+m+tCNPKwgSpH9kaifseQ=
+github.com/gobuffalo/attrs v0.0.0-20190224210810-a9411de4debd/go.mod h1:4duuawTqi2wkkpB4ePgWMaai6/Kc6WEz83bhFwpHzj0=
+github.com/gobuffalo/depgen v0.0.0-20190329151759-d478694a28d3/go.mod h1:3STtPUQYuzV0gBVOY3vy6CfMm/ljR4pABfrTeHNLHUY=
+github.com/gobuffalo/depgen v0.1.0/go.mod h1:+ifsuy7fhi15RWncXQQKjWS9JPkdah5sZvtHc2RXGlg=
+github.com/gobuffalo/envy v1.6.15/go.mod h1:n7DRkBerg/aorDM8kbduw5dN3oXGswK5liaSCx4T5NI=
github.com/gobuffalo/envy v1.7.0/go.mod h1:n7DRkBerg/aorDM8kbduw5dN3oXGswK5liaSCx4T5NI=
-github.com/gobuffalo/envy v1.7.1/go.mod h1:FurDp9+EDPE4aIUS3ZLyD+7/9fpx7YRt/ukY6jIHf0w=
+github.com/gobuffalo/flect v0.1.0/go.mod h1:d2ehjJqGOH/Kjqcoz+F7jHTBbmDb38yXA598Hb50EGs=
+github.com/gobuffalo/flect v0.1.1/go.mod h1:8JCgGVbRjJhVgD6399mQr4fx5rRfGKVzFjbj6RE/9UI=
+github.com/gobuffalo/flect v0.1.3/go.mod h1:8JCgGVbRjJhVgD6399mQr4fx5rRfGKVzFjbj6RE/9UI=
github.com/gobuffalo/flect v0.1.5/go.mod h1:W3K3X9ksuZfir8f/LrfVtWmCDQFfayuylOJ7sz/Fj80=
github.com/gobuffalo/flect v0.2.0/go.mod h1:W3K3X9ksuZfir8f/LrfVtWmCDQFfayuylOJ7sz/Fj80=
github.com/gobuffalo/flect v0.2.2 h1:PAVD7sp0KOdfswjAw9BpLCU9hXo7wFSzgpQ+zNeks/A=
github.com/gobuffalo/flect v0.2.2/go.mod h1:vmkQwuZYhN5Pc4ljYQZzP+1sq+NEkK+lh20jmEmX3jc=
+github.com/gobuffalo/genny v0.0.0-20190329151137-27723ad26ef9/go.mod h1:rWs4Z12d1Zbf19rlsn0nurr75KqhYp52EAGGxTbBhNk=
+github.com/gobuffalo/genny v0.0.0-20190403191548-3ca520ef0d9e/go.mod h1:80lIj3kVJWwOrXWWMRzzdhW3DsrdjILVil/SFKBzF28=
+github.com/gobuffalo/genny v0.1.0/go.mod h1:XidbUqzak3lHdS//TPu2OgiFB+51Ur5f7CSnXZ/JDvo=
+github.com/gobuffalo/genny v0.1.1/go.mod h1:5TExbEyY48pfunL4QSXxlDOmdsD44RRq4mVZ0Ex28Xk=
+github.com/gobuffalo/gitgen v0.0.0-20190315122116-cc086187d211/go.mod h1:vEHJk/E9DmhejeLeNt7UVvlSGv3ziL+djtTr3yyzcOw=
+github.com/gobuffalo/gogen v0.0.0-20190315121717-8f38393713f5/go.mod h1:V9QVDIxsgKNZs6L2IYiGR8datgMhB577vzTDqypH360=
+github.com/gobuffalo/gogen v0.1.0/go.mod h1:8NTelM5qd8RZ15VjQTFkAW6qOMx5wBbW4dSCS3BY8gg=
+github.com/gobuffalo/gogen v0.1.1/go.mod h1:y8iBtmHmGc4qa3urIyo1shvOD8JftTtfcKi+71xfDNE=
github.com/gobuffalo/here v0.6.0/go.mod h1:wAG085dHOYqUpf+Ap+WOdrPTp5IYcDAs/x7PLa8Y5fM=
-github.com/gobuffalo/logger v1.0.0/go.mod h1:2zbswyIUa45I+c+FLXuWl9zSWEiVuthsk8ze5s8JvPs=
-github.com/gobuffalo/packd v0.3.0/go.mod h1:zC7QkmNkYVGKPw4tHpBQ+ml7W/3tIebgeo1b36chA3Q=
-github.com/gobuffalo/packr v1.30.1/go.mod h1:ljMyFO2EcrnzsHsN99cvbq055Y9OhRrIaviy289eRuk=
-github.com/gobuffalo/packr/v2 v2.5.1/go.mod h1:8f9c96ITobJlPzI44jj+4tHnEKNt0xXWSVlXRN9X1Iw=
+github.com/gobuffalo/logger v0.0.0-20190315122211-86e12af44bc2/go.mod h1:QdxcLw541hSGtBnhUc4gaNIXRjiDppFGaDqzbrBd3v8=
+github.com/gobuffalo/mapi v1.0.1/go.mod h1:4VAGh89y6rVOvm5A8fKFxYG+wIW6LO1FMTG9hnKStFc=
+github.com/gobuffalo/mapi v1.0.2/go.mod h1:4VAGh89y6rVOvm5A8fKFxYG+wIW6LO1FMTG9hnKStFc=
+github.com/gobuffalo/packd v0.0.0-20190315124812-a385830c7fc0/go.mod h1:M2Juc+hhDXf/PnmBANFCqx4DM3wRbgDvnVWeG2RIxq4=
+github.com/gobuffalo/packd v0.1.0/go.mod h1:M2Juc+hhDXf/PnmBANFCqx4DM3wRbgDvnVWeG2RIxq4=
+github.com/gobuffalo/packr/v2 v2.0.9/go.mod h1:emmyGweYTm6Kdper+iywB6YK5YzuKchGtJQZ0Odn4pQ=
+github.com/gobuffalo/packr/v2 v2.2.0/go.mod h1:CaAwI0GPIAv+5wKLtv8Afwl+Cm78K/I/VCm/3ptBN+0=
+github.com/gobuffalo/syncx v0.0.0-20190224160051-33c29581e754/go.mod h1:HhnNqWY95UYwwW3uSASeV7vtgYkT2t16hJgV3AEPUpw=
github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y=
github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8=
-github.com/gocql/gocql v0.0.0-20190301043612-f6df8288f9b4/go.mod h1:4Fw1eo5iaEhDUs8XyuhSVCVy52Jq3L+/3GJgYkwc+/0=
github.com/gocql/gocql v0.0.0-20190402132108-0e1d5de854df/go.mod h1:4Fw1eo5iaEhDUs8XyuhSVCVy52Jq3L+/3GJgYkwc+/0=
-github.com/godbus/dbus v0.0.0-20190422162347-ade71ed3457e/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4=
github.com/godbus/dbus/v5 v5.0.3/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
github.com/gofrs/flock v0.0.0-20190320160742-5135e617513b/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU=
-github.com/gofrs/flock v0.7.1/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU=
github.com/gofrs/flock v0.8.0 h1:MSdYClljsF3PbENUUEx85nkWfJSGfzYI9yEBZOJz6CY=
github.com/gofrs/flock v0.8.0/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU=
github.com/gofrs/uuid v3.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM=
@@ -687,11 +739,9 @@ github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXP
github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q=
github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=
github.com/goji/httpauth v0.0.0-20160601135302-2da839ab0f4d/go.mod h1:nnjvkQ9ptGaCkuDUx6wNykzzlUixGxvkme+H/lnzb+A=
-github.com/golang-migrate/migrate/v4 v4.6.2/go.mod h1:JYi6reN3+Z734VZ0akNuyOJNcrg45ZL7LDBMW3WGJL0=
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
github.com/golang/groupcache v0.0.0-20180513044358-24b0969c4cb7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
-github.com/golang/groupcache v0.0.0-20181024230925-c65c006176ff/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
github.com/golang/groupcache v0.0.0-20191027212112-611e8accdfc9/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
@@ -747,9 +797,11 @@ github.com/golangci/gofmt v0.0.0-20181222123516-0b8337e80d98/go.mod h1:9qCChq59u
github.com/golangci/gofmt v0.0.0-20190930125516-244bba706f1a h1:iR3fYXUjHCR97qWS8ch1y9zPNsgXThGwjKPrYfqMPks=
github.com/golangci/gofmt v0.0.0-20190930125516-244bba706f1a/go.mod h1:9qCChq59u/eW8im404Q2WWTrnBUQKjpNYKMbU4M7EFU=
github.com/golangci/golangci-lint v1.18.0/go.mod h1:kaqo8l0OZKYPtjNmG4z4HrWLgcYNIJ9B9q3LWri9uLg=
+github.com/golangci/golangci-lint v1.21.0/go.mod h1:phxpHK52q7SE+5KpPnti4oZTdFCEsn/tKN+nFvCKXfk=
github.com/golangci/golangci-lint v1.26.0/go.mod h1:tefbO6RcigFzvTnDC+Y51kntVGgkuCAVsC+mnfbPruc=
-github.com/golangci/golangci-lint v1.31.0 h1:+m9I3LEmxXLpymkXRPkDQGzOVBmBYm16UtDiXqZxWek=
github.com/golangci/golangci-lint v1.31.0/go.mod h1:aMQuNCA+NDU5+4jLL5pEuFHoue0IznKE2+/GsFvvs8A=
+github.com/golangci/golangci-lint v1.32.0 h1:3wL5pvhTpRvlvtosoZecS+hu40IAiJl1qlZQuXIFBAg=
+github.com/golangci/golangci-lint v1.32.0/go.mod h1:aEG8mkR2s0W900N8YVtSAhhemMGLRWZzASgaHc7eLt4=
github.com/golangci/gosec v0.0.0-20190211064107-66fb7fc33547/go.mod h1:0qUabqiIQgfmlAmulqxyiGkkyF6/tOGSnY2cnPVwrzU=
github.com/golangci/ineffassign v0.0.0-20190609212857-42439a7714cc h1:gLLhTLMk2/SutryVJ6D4VZCU3CUqr8YloG7FPIBWFpI=
github.com/golangci/ineffassign v0.0.0-20190609212857-42439a7714cc/go.mod h1:e5tpTHCfVze+7EpLEozzMB3eafxo2KT5veNg1k6byQU=
@@ -795,6 +847,7 @@ github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/
github.com/google/go-github v17.0.0+incompatible/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ=
github.com/google/go-metrics-stackdriver v0.0.0-20190816035513-b52628e82e2a/go.mod h1:o93WzqysX0jP/10Y13hfL6aq9RoUvGaVdkrH5awMksE=
github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck=
+github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU=
github.com/google/gofuzz v0.0.0-20161122191042-44d81051d367/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI=
github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI=
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
@@ -806,7 +859,6 @@ github.com/google/martian v2.1.1-0.20190517191504-25dcb96d9e51+incompatible/go.m
github.com/google/martian/v3 v3.0.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-20190723021845-34ac40c74b70/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=
@@ -818,13 +870,12 @@ github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaU
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ=
github.com/google/uuid v0.0.0-20170306145142-6a5e28554805/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
-github.com/google/uuid v1.1.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
-github.com/google/uuid v1.1.2 h1:EVhdT+1Kseyi1/pUmXKaFxYsDNy9RQYkMWRH68J/W7Y=
github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
+github.com/google/uuid v1.2.0 h1:qJYtXnJRWmpe7m/3XlyhrsLrEURqHRM2kxzoxXqyUDs=
+github.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
+github.com/googleapis/gax-go v2.0.0+incompatible h1:j0GKcs05QVmm7yesiZq2+9cxHkNK9YM6zKx4D2qucQU=
github.com/googleapis/gax-go v2.0.0+incompatible/go.mod h1:SFVmujtThgffbyetf+mdk2eWhX2bMyUtNHzFKcPA9HY=
-github.com/googleapis/gax-go v2.0.2+incompatible h1:silFMLAnr330+NRuag/VjIGF7TLp/LBrV2CJKFLWEww=
-github.com/googleapis/gax-go v2.0.2+incompatible/go.mod h1:SFVmujtThgffbyetf+mdk2eWhX2bMyUtNHzFKcPA9HY=
github.com/googleapis/gax-go/v2 v2.0.3/go.mod h1:LLvjysVCY1JZeum8Z6l8qUty8fiNwE08qbEPm1M08qg=
github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg=
github.com/googleapis/gax-go/v2 v2.0.5 h1:sjZBwGj9Jlw33ImPtvFviGYvseOtDM7hkSKB7+Tv3SM=
@@ -836,45 +887,41 @@ github.com/gookit/color v1.2.5/go.mod h1:AhIE+pS6D4Ql0SQWbBeXPHw7gY0/sjHoA4s/n1K
github.com/gookit/color v1.2.9/go.mod h1:AhIE+pS6D4Ql0SQWbBeXPHw7gY0/sjHoA4s/n1KB7xg=
github.com/gophercloud/gophercloud v0.0.0-20190208042652-bc37892e1968/go.mod h1:3WdhXV3rUYy9p6AUW8d94kr+HS62Y4VL9mBnFxsD8q4=
github.com/gophercloud/gophercloud v0.0.0-20190212181753-892256c46858/go.mod h1:vxM41WHh5uqHVBMZHzuwNOHh8XEoIEcSTewFxm1c5g8=
-github.com/gophercloud/gophercloud v0.2.0/go.mod h1:vxM41WHh5uqHVBMZHzuwNOHh8XEoIEcSTewFxm1c5g8=
-github.com/gophercloud/gophercloud v0.3.0/go.mod h1:vxM41WHh5uqHVBMZHzuwNOHh8XEoIEcSTewFxm1c5g8=
-github.com/gophercloud/gophercloud v0.6.0/go.mod h1:GICNByuaEBibcjmjvI7QvYJSZEbGkcYwAR7EZK2WMqM=
-github.com/gophercloud/gophercloud v0.6.1-0.20191025185032-6ad562af8c1f/go.mod h1:GICNByuaEBibcjmjvI7QvYJSZEbGkcYwAR7EZK2WMqM=
github.com/gophercloud/gophercloud v0.6.1-0.20191122030953-d8ac278c1c9d/go.mod h1:ozGNgr9KYOVATV5jsgHl/ceCDXGuguqOZAzoQ/2vcNM=
github.com/gophercloud/gophercloud v0.10.1-0.20200424014253-c3bfe50899e5/go.mod h1:gmC5oQqMDOMO1t1gq5DquX/yAU808e/4mzjjDA76+Ss=
github.com/gophercloud/gophercloud v0.12.0/go.mod h1:gmC5oQqMDOMO1t1gq5DquX/yAU808e/4mzjjDA76+Ss=
-github.com/gophercloud/gophercloud v0.12.1-0.20200827191144-bb4781e9de45 h1:qvMqZxf8hx1Udiv1dXTp9rmGflhBYvgoVva+AQBJ4XM=
-github.com/gophercloud/gophercloud v0.12.1-0.20200827191144-bb4781e9de45/go.mod h1:w2NJEd88d4igNL1KUHzBsKMvS/ByJTzgltTGWKT7AC8=
-github.com/gophercloud/utils v0.0.0-20190124231947-9c3b9f2457ef/go.mod h1:wjDF8z83zTeg5eMLml5EBSlAhbF7G8DobyI1YsMuyzw=
+github.com/gophercloud/gophercloud v0.14.0/go.mod h1:VX0Ibx85B60B5XOrZr6kaNwrmPUzcmMpwxvQ1WQIIWM=
+github.com/gophercloud/gophercloud v0.15.1-0.20210202035223-633d73521055/go.mod h1:wRtmUelyIIv3CSSDI47aUwbs075O6i+LY+pXsKCBsb4=
+github.com/gophercloud/gophercloud v0.16.0/go.mod h1:wRtmUelyIIv3CSSDI47aUwbs075O6i+LY+pXsKCBsb4=
+github.com/gophercloud/gophercloud v0.17.0 h1:BgVw0saxyeHWH5us/SQe1ltp0GRnytjmOLXDA8pO77E=
+github.com/gophercloud/gophercloud v0.17.0/go.mod h1:wRtmUelyIIv3CSSDI47aUwbs075O6i+LY+pXsKCBsb4=
github.com/gophercloud/utils v0.0.0-20190128072930-fbb6ab446f01/go.mod h1:wjDF8z83zTeg5eMLml5EBSlAhbF7G8DobyI1YsMuyzw=
github.com/gophercloud/utils v0.0.0-20190313033024-0bcc8e728cb5/go.mod h1:SZ9FTKibIotDtCrxAU/evccoyu1yhKST6hgBvwTB5Eg=
github.com/gophercloud/utils v0.0.0-20200423144003-7c72efc7435d/go.mod h1:ehWUbLQJPqS0Ep+CxeD559hsm9pthPXadJNKwZkp43w=
-github.com/gophercloud/utils v0.0.0-20201101202656-8677e053dcf1/go.mod h1:ehWUbLQJPqS0Ep+CxeD559hsm9pthPXadJNKwZkp43w=
-github.com/gophercloud/utils v0.0.0-20201212031956-9dc30e126fea/go.mod h1:ehWUbLQJPqS0Ep+CxeD559hsm9pthPXadJNKwZkp43w=
-github.com/gophercloud/utils v0.0.0-20210113034859-6f548432055a h1:mHU4E3kfxVUhfqjgxrWv4g0mjRF7qA4o5dkMRfS8gd8=
-github.com/gophercloud/utils v0.0.0-20210113034859-6f548432055a/go.mod h1:ehWUbLQJPqS0Ep+CxeD559hsm9pthPXadJNKwZkp43w=
+github.com/gophercloud/utils v0.0.0-20201221031838-d93cf4b3fa50/go.mod h1:ehWUbLQJPqS0Ep+CxeD559hsm9pthPXadJNKwZkp43w=
+github.com/gophercloud/utils v0.0.0-20210202040619-eca783186fc4/go.mod h1:wx8HMD8oQD0Ryhz6+6ykq75PJ79iPyEqYHfwZ4l7OsA=
+github.com/gophercloud/utils v0.0.0-20210323225332-7b186010c04f h1:+SO5iEqu9QjNWL9TfAmOE5u0Uizv1T3jpBuMJfMOVJ0=
+github.com/gophercloud/utils v0.0.0-20210323225332-7b186010c04f/go.mod h1:wx8HMD8oQD0Ryhz6+6ykq75PJ79iPyEqYHfwZ4l7OsA=
github.com/gopherjs/gopherjs v0.0.0-20180628210949-0892b62f0d9f/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
+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/gopherjs/gopherjs v0.0.0-20191106031601-ce3c9ade29de h1:F7WD09S8QB4LrkEpka0dFPLSotH11HRpCsLIbIcJ7sU=
-github.com/gopherjs/gopherjs v0.0.0-20191106031601-ce3c9ade29de/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
github.com/gorhill/cronexpr v0.0.0-20180427100037-88b0669f7d75/go.mod h1:g2644b03hfBX9Ov0ZBDgXXens4rxSxmqFBbhvKv2yVA=
github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg=
-github.com/gorilla/handlers v0.0.0-20150720190736-60c7bfde3e33/go.mod h1:Qkdc/uu4tH4g6mTK6auzZ766c4CA0Ng8+o/OAirnOIQ=
github.com/gorilla/mux v0.0.0-20191024121256-f395758b854c/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So=
github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs=
-github.com/gorilla/mux v1.7.1/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs=
-github.com/gorilla/mux v1.7.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs=
+github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs=
github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ=
github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ=
github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc=
github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
github.com/gostaticanalysis/analysisutil v0.0.0-20190318220348-4088753ea4d3/go.mod h1:eEOZF4jCKGi+aprrirO9e7WKB3beBRtWgqGunKl6pKE=
github.com/gostaticanalysis/analysisutil v0.0.3/go.mod h1:eEOZF4jCKGi+aprrirO9e7WKB3beBRtWgqGunKl6pKE=
+github.com/gostaticanalysis/analysisutil v0.1.0/go.mod h1:dMhHRU9KTiDcuLGdy87/2gTR8WruwYZrKdRq9m1O6uw=
github.com/gostaticanalysis/analysisutil v0.2.1 h1:OfNeM+FV1AOdvwfQY8Iuq2XTQrsc2isCVXw+l3SftP0=
github.com/gostaticanalysis/analysisutil v0.2.1/go.mod h1:18U/DLpRgIUd459wGxVHE0fRgmo1UgHDcbw7F5idXu0=
+github.com/gostaticanalysis/comment v1.3.0/go.mod h1:xMicKDx7XRXYdVwY9f9wQpDJVnqWxw9wCauCMKp+IBI=
github.com/gostaticanalysis/comment v1.4.1 h1:xHopR5L2lRz6OsjH4R2HG5wRhW9ySl3FsHIvi5pcXwc=
github.com/gostaticanalysis/comment v1.4.1/go.mod h1:ih6ZxzTHLdadaiSnF5WY3dxUoXfXAlTaRzuaNDlSado=
-github.com/gosuri/uitable v0.0.4/go.mod h1:tKR86bXuXPZazfOTG1FIzvjIdXzd0mo4Vtn16vt0PJo=
github.com/gotestyourself/gotestyourself v2.2.0+incompatible/go.mod h1:zZKM6oeNM8k+FRljX1mnzVYeS8wiGgQyvST1/GafPbY=
github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA=
github.com/gregjones/httpcache v0.0.0-20181110185634-c63ab54fda8f/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA=
@@ -882,9 +929,8 @@ github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 h1:+ngKgrYPPJr
github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA=
github.com/grpc-ecosystem/go-grpc-middleware v0.0.0-20190222133341-cfaf5686ec79/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs=
github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs=
+github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4 h1:z53tR0945TRRQO/fLEVPI6SMv7ZflF0TEaTAoU7tOzg=
github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs=
-github.com/grpc-ecosystem/go-grpc-middleware v1.1.0 h1:THDBEeQ9xZ8JEaCLyLQqXMMdRqNr0QAUJTIkQAUtFjg=
-github.com/grpc-ecosystem/go-grpc-middleware v1.1.0/go.mod h1:f5nM7jw/oeRSadq3xCzHAvxcr8HZnzsqU6ILg/0NiiE=
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92BcuyuQ/YW4NSIpoGtfXNho=
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk=
github.com/grpc-ecosystem/grpc-gateway v1.3.0/go.mod h1:RSKVYQBd5MCa4OVpNdGskqpgL2+G+NZTnrVHpWWfpdw=
@@ -892,12 +938,10 @@ github.com/grpc-ecosystem/grpc-gateway v1.4.1/go.mod h1:RSKVYQBd5MCa4OVpNdGskqpg
github.com/grpc-ecosystem/grpc-gateway v1.5.0/go.mod h1:RSKVYQBd5MCa4OVpNdGskqpgL2+G+NZTnrVHpWWfpdw=
github.com/grpc-ecosystem/grpc-gateway v1.8.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY=
github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY=
-github.com/grpc-ecosystem/grpc-gateway v1.9.4/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY=
+github.com/grpc-ecosystem/grpc-gateway v1.9.5 h1:UImYN5qQ8tuGpGE16ZmjvcTtTw24zw1QAp/SlnNrZhI=
github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY=
-github.com/grpc-ecosystem/grpc-gateway v1.12.1 h1:zCy2xE9ablevUOrUZc3Dl72Dt+ya2FNAvC2yLYMHzi4=
-github.com/grpc-ecosystem/grpc-gateway v1.12.1/go.mod h1:8XEsbTttt/W+VvjtQhLACqCisSPWTxCZ7sBRjU6iH9c=
-github.com/grpc-ecosystem/grpc-health-probe v0.2.1-0.20181220223928-2bf0a5b182db/go.mod h1:uBKkC2RbarFsvS5jMJHpVhTLvGlGQj9JJwkaePE3FWI=
github.com/h2non/filetype v1.0.12/go.mod h1:319b3zT68BvV+WRj7cwy856M2ehB3HqNOt6sy1HndBY=
+github.com/h2non/parth v0.0.0-20190131123155-b4df798d6542/go.mod h1:Ow0tF8D4Kplbc8s8sSb3V2oUCygFHVp8gC3Dn6U4MNI=
github.com/hailocab/go-hostpool v0.0.0-20160125115350-e80d13ce29ed/go.mod h1:tMWxXQ9wFIaZeTI9F+hmhFiGpFmhOHzyShyFUhRm0H4=
github.com/hashicorp/aws-sdk-go-base v0.4.0/go.mod h1:eRhlz3c4nhqxFZJAahJEFL7gh6Jyj5rQmQc7F9eHFyQ=
github.com/hashicorp/aws-sdk-go-base v0.6.0/go.mod h1:2fRjWDv3jJBeN6mVWFHV6hFTNeFBx2gpDLQaZNxUVAY=
@@ -907,12 +951,13 @@ github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBt
github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE=
github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8=
github.com/hashicorp/consul/sdk v0.3.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8=
-github.com/hashicorp/errwrap v0.0.0-20141028054710-7554cd9344ce/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
github.com/hashicorp/errwrap v0.0.0-20180715044906-d6c0cd880357/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
-github.com/hashicorp/go-azure-helpers v0.4.1/go.mod h1:lu62V//auUow6k0IykxLK2DCNW8qTmpm8KqhYVWattA=
+github.com/hashicorp/go-azure-helpers v0.9.0/go.mod h1:3xdjhbL7qs69rnwxA0UENOzkPJjtTFIRb5aRyrEpbCU=
github.com/hashicorp/go-azure-helpers v0.10.0/go.mod h1:YuAtHxm2v74s+IjQwUG88dHBJPd5jL+cXr5BGVzSKhE=
github.com/hashicorp/go-azure-helpers v0.12.0/go.mod h1:Zc3v4DNeX6PDdy7NljlYpnrdac1++qNW0I4U+ofGwpg=
+github.com/hashicorp/go-azure-helpers v0.13.0/go.mod h1:NifBbLJtyUxdQrRVmIfr0VykEXZIlq3YfHFpFdyp7qY=
+github.com/hashicorp/go-azure-helpers v0.16.5/go.mod h1:kR7+sTDEb9TOp/O80ss1UEJg1t4/BHLD/U8wHLS4BGQ=
github.com/hashicorp/go-checkpoint v0.5.0/go.mod h1:7nfLNL10NsxqO4iWuW6tWW0HjZuDrwkBuEQsVcpCOgg=
github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80=
github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80=
@@ -936,7 +981,6 @@ github.com/hashicorp/go-memdb v1.0.2/go.mod h1:I6dKdmYhZqU0RJSheVEWgTNWdVQH5QvTg
github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM=
github.com/hashicorp/go-msgpack v0.5.4/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM=
github.com/hashicorp/go-msgpack v0.5.5/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM=
-github.com/hashicorp/go-multierror v0.0.0-20161216184304-ed905158d874/go.mod h1:JMRHfdO9jKNzS/+BTlxCjKNQHg/jZAft8U7LloJvN7I=
github.com/hashicorp/go-multierror v0.0.0-20180717150148-3d5d8f294aa0/go.mod h1:JMRHfdO9jKNzS/+BTlxCjKNQHg/jZAft8U7LloJvN7I=
github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk=
github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA=
@@ -947,6 +991,7 @@ github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es
github.com/hashicorp/go-retryablehttp v0.5.4/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs=
github.com/hashicorp/go-retryablehttp v0.6.2/go.mod h1:gEx6HMUGxYYhJScX7W1Il64m6cc2C1mDaW3NQ9sY1FY=
github.com/hashicorp/go-retryablehttp v0.6.4/go.mod h1:vAew36LZh98gCBJNLH42IQ1ER/9wtLZZ8meHqQvEYWY=
+github.com/hashicorp/go-retryablehttp v0.6.6/go.mod h1:vAew36LZh98gCBJNLH42IQ1ER/9wtLZZ8meHqQvEYWY=
github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU=
github.com/hashicorp/go-rootcerts v1.0.1/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8=
github.com/hashicorp/go-safetemp v1.0.0/go.mod h1:oaerMy3BhqiTbVye6QuFhFtIceqFoDHxNAB65b+Rj1I=
@@ -965,6 +1010,7 @@ github.com/hashicorp/go-version v1.0.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09
github.com/hashicorp/go-version v1.1.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA=
github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA=
github.com/hashicorp/go-version v1.2.1/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA=
+github.com/hashicorp/go-version v1.3.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA=
github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90=
github.com/hashicorp/golang-lru v0.0.0-20180201235237-0fb14efe8c47/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
@@ -989,7 +1035,6 @@ github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0m
github.com/hashicorp/memberlist v0.1.0/go.mod h1:ncdBp14cuox2iFOq3kDiquKU6fqsTBc3W6JvZwjxxsE=
github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I=
github.com/hashicorp/memberlist v0.1.4/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I=
-github.com/hashicorp/memberlist v0.1.5/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I=
github.com/hashicorp/nomad/api v0.0.0-20190412184103-1c38ced33adf/go.mod h1:BDngVi1f4UA6aJq9WYTgxhfWSE1+42xshvstLU2fRGk=
github.com/hashicorp/raft v1.0.1/go.mod h1:DVSAWItjLjTOkVbSpWQ0j0kUADIvDaCtBxIcbNAQLkI=
github.com/hashicorp/raft v1.1.2-0.20191002163536-9c6bd3e3eb17/go.mod h1:vPAJM8Asw6u8LxC3eJCUZmRP/E4QmUGE1R7g7k8sG/8=
@@ -998,7 +1043,6 @@ github.com/hashicorp/raft-snapshot v1.0.2-0.20190827162939-8117efcc5aab/go.mod h
github.com/hashicorp/serf v0.0.0-20160124182025-e4ec8cc423bb/go.mod h1:h/Ru6tmZazX7WO/GDmwdpS975F019L4t5ng5IgwbNrE=
github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc=
github.com/hashicorp/serf v0.8.3/go.mod h1:UpNcs7fFbpKIyZaUuSW6EPiH+eZC7OuyFD+wc1oal+k=
-github.com/hashicorp/serf v0.8.5/go.mod h1:UpNcs7fFbpKIyZaUuSW6EPiH+eZC7OuyFD+wc1oal+k=
github.com/hashicorp/terraform v0.12.21/go.mod h1:eJcloDEx5ywM4a1tetIuVrlqklM0bUVRYJBYAh4CYzA=
github.com/hashicorp/terraform v0.13.4/go.mod h1:1H1qcnppNc/bBGc7poOfnmmBeQMlF0stEN3haY3emCU=
github.com/hashicorp/terraform-config-inspect v0.0.0-20190821133035-82a99dc22ef4/go.mod h1:JDmizlhaP5P0rYTTZB0reDMefAiJyfWPEtugV4in1oI=
@@ -1013,6 +1057,7 @@ github.com/hashicorp/terraform-json v0.4.0/go.mod h1:eAbqb4w0pSlRmdvl8fOyHAi/+8j
github.com/hashicorp/terraform-json v0.5.0/go.mod h1:eAbqb4w0pSlRmdvl8fOyHAi/+8jnkVYN28gJkSJrLhU=
github.com/hashicorp/terraform-json v0.6.0/go.mod h1:eAbqb4w0pSlRmdvl8fOyHAi/+8jnkVYN28gJkSJrLhU=
github.com/hashicorp/terraform-plugin-sdk v1.0.0/go.mod h1:NuwtLpEpPsFaKJPJNGtMcn9vlhe6Ofe+Y6NqXhJgV2M=
+github.com/hashicorp/terraform-plugin-sdk v1.1.1/go.mod h1:NuwtLpEpPsFaKJPJNGtMcn9vlhe6Ofe+Y6NqXhJgV2M=
github.com/hashicorp/terraform-plugin-sdk v1.4.0/go.mod h1:H5QLx/uhwfxBZ59Bc5SqT19M4i+fYt7LZjHTpbLZiAg=
github.com/hashicorp/terraform-plugin-sdk v1.6.0/go.mod h1:H5QLx/uhwfxBZ59Bc5SqT19M4i+fYt7LZjHTpbLZiAg=
github.com/hashicorp/terraform-plugin-sdk v1.7.0/go.mod h1:OjgQmey5VxnPej/buEhe+YqKm0KNvV3QqU4hkqHqPCY=
@@ -1020,7 +1065,6 @@ github.com/hashicorp/terraform-plugin-sdk v1.8.0/go.mod h1:OjgQmey5VxnPej/buEhe+
github.com/hashicorp/terraform-plugin-sdk v1.9.0/go.mod h1:C/AXwmDHqbc3h6URiHpIsVKrwV4PS0Sh0+VTaeEkShw=
github.com/hashicorp/terraform-plugin-sdk v1.11.0/go.mod h1:HiWIPD/T9HixIhQUwaSoDQxo4BLFdmiBi/Qz5gjB8Q0=
github.com/hashicorp/terraform-plugin-sdk v1.12.0/go.mod h1:HiWIPD/T9HixIhQUwaSoDQxo4BLFdmiBi/Qz5gjB8Q0=
-github.com/hashicorp/terraform-plugin-sdk v1.13.1/go.mod h1:HiWIPD/T9HixIhQUwaSoDQxo4BLFdmiBi/Qz5gjB8Q0=
github.com/hashicorp/terraform-plugin-sdk v1.14.0/go.mod h1:t62Xy+m7Zjq5tA2vrs8Wuo/TQ0sc9Mx9MjXL3+7MHBQ=
github.com/hashicorp/terraform-plugin-sdk v1.15.0/go.mod h1:PuFTln8urDmRM6mV0II6apOTsyG/iHkxp+5W11eJE58=
github.com/hashicorp/terraform-plugin-sdk v1.16.0/go.mod h1:5sVxrwW6/xzFhZyql+Q9zXCUEJaGWcBIxBbZFLpVXOI=
@@ -1032,6 +1076,7 @@ github.com/hashicorp/terraform-plugin-test/v2 v2.0.0-20200724200815-faa9931ac59e
github.com/hashicorp/terraform-plugin-test/v2 v2.1.2/go.mod h1:jerO5mrd+jVNALy8aiq+VZOg/CR8T2T1QR3jd6JKGOI=
github.com/hashicorp/terraform-provider-google v1.20.1-0.20200824213103-e32ba28ec398/go.mod h1:qc51ZGlewTr4W9ho2SxvlPETQmDyeN/kC27b1mTQuQw=
github.com/hashicorp/terraform-provider-kubernetes v1.13.3/go.mod h1:XSLp2+OcV4wZQ6VhgHswDwz4LJwiwO1/vbJYKt+gqWg=
+github.com/hashicorp/terraform-provider-vsphere v1.24.3/go.mod h1:FgcsrcPpnjLUO4XWpudYiBho9ETIXYRxVXWV7R3Iz6k=
github.com/hashicorp/terraform-svchost v0.0.0-20191011084731-65d371908596/go.mod h1:kNDNcF7sN4DocDLBkQYz73HGKwN1ANB1blq4lIYLYvg=
github.com/hashicorp/terraform-svchost v0.0.0-20191119180714-d2e4933b9136/go.mod h1:kNDNcF7sN4DocDLBkQYz73HGKwN1ANB1blq4lIYLYvg=
github.com/hashicorp/terraform-svchost v0.0.0-20200729002733-f050f53b9734/go.mod h1:kNDNcF7sN4DocDLBkQYz73HGKwN1ANB1blq4lIYLYvg=
@@ -1072,24 +1117,23 @@ github.com/hashicorp/yamux v0.0.0-20180604194846-3520598351bb/go.mod h1:+NfK9FKe
github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM=
github.com/hashicorp/yamux v0.0.0-20190923154419-df201c70410d/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM=
github.com/hashicorp/yamux v0.0.0-20200609203250-aecfd211c9ce/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM=
-github.com/helm/helm-2to3 v0.5.1/go.mod h1:AXFpQX2cSQpss+47ROPEeu7Sm4+CRJ1jKWCEQdHP3/c=
github.com/heptio/velero v1.0.0 h1:5xFd2mieexakJiaxo5SgIAGXfgj+o+9QTIDm0vWpWVs=
github.com/heptio/velero v1.0.0/go.mod h1:Q8aj4N9pmvDNp2hWmqWJ1Z1ybUjEI+iQOP3C9hx2njQ=
github.com/hinshun/vt10x v0.0.0-20180616224451-1954e6464174/go.mod h1:DqJ97dSdRW1W22yXSB90986pcOyQ7r45iio1KN2ez1A=
github.com/hinshun/vt10x v0.0.0-20180809195222-d55458df857c h1:kp3AxgXgDOmIJFR7bIwqFhwJ2qWar8tEQSE5XXhCfVk=
github.com/hinshun/vt10x v0.0.0-20180809195222-d55458df857c/go.mod h1:DqJ97dSdRW1W22yXSB90986pcOyQ7r45iio1KN2ez1A=
+github.com/hokaccha/go-prettyjson v0.0.0-20170213120834-e6b9231a2b1c/go.mod h1:pFlLw2CfqZiIBOx6BuCeRLCrfxBJipTY0nIOF/VbGcI=
github.com/hooklift/assert v0.0.0-20170704181755-9d1defd6d214/go.mod h1:kj6hFWqfwSjFjLnYW5PK1DoxZ4O0uapwHRmd9jhln4E=
github.com/hooklift/iso9660 v1.0.0/go.mod h1:sOC47ru8lB0DlU0EZ7BJ0KCP5rDqOvx0c/5K5ADm8H0=
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
-github.com/huandu/xstrings v1.2.0/go.mod h1:DvyZB1rfVYsBIigL8HwpZgxHwXozlTgGqn63UyNX5k4=
-github.com/iancoleman/strcase v0.0.0-20190422225806-e506e3ef7365/go.mod h1:SK73tn/9oHe+/Y0h39VT4UCxmurVJkR5NA7kMEAOgSE=
+github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg=
github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
github.com/imdario/mergo v0.0.0-20171009183408-7fe0c75c13ab/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA=
github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA=
github.com/imdario/mergo v0.3.6/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA=
github.com/imdario/mergo v0.3.7/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA=
-github.com/imdario/mergo v0.3.8/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA=
github.com/imdario/mergo v0.3.9/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA=
+github.com/imdario/mergo v0.3.10/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA=
github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA=
github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU=
github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA=
@@ -1097,17 +1141,17 @@ github.com/improbable-eng/thanos v0.3.2/go.mod h1:GZewVGILKuJVPNRn7L4Zw+7X96qzFO
github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM=
github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8=
github.com/influxdata/influxdb v0.0.0-20190411212539-d24b7ba8c4c4/go.mod h1:qZna6X/4elxqT3yI9iZYdZrWWdeFOOprn86kgg4+IzY=
-github.com/influxdata/influxdb v1.7.7/go.mod h1:qZna6X/4elxqT3yI9iZYdZrWWdeFOOprn86kgg4+IzY=
+github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo=
github.com/jackc/fake v0.0.0-20150926172116-812a484cc733/go.mod h1:WrMFNQdiFJ80sQsxDoMokWK1W5TQtxBFNpzWTD84ibQ=
-github.com/jackc/pgx v3.2.0+incompatible/go.mod h1:0ZGrqGqkRlliWnWB4zKnWtjbSWbGkVEFm4TeybAXq+I=
github.com/jackc/pgx v3.3.0+incompatible/go.mod h1:0ZGrqGqkRlliWnWB4zKnWtjbSWbGkVEFm4TeybAXq+I=
+github.com/jarcoal/httpmock v1.0.5/go.mod h1:ATjnClrvW/3tijVmpL/va5Z3aAyGvqU3gCT8nX0Txik=
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo=
+github.com/jcmturner/gofork v1.0.0/go.mod h1:MK8+TM0La+2rjBD4jE12Kj1pCCxK7d2LK/UM3ncEo0o=
github.com/jeffchao/backoff v0.0.0-20140404060208-9d7fd7aa17f2/go.mod h1:xkfESuHriIekR+4RoV+fu91j/CfnYM29Zi2tMFw5iD4=
github.com/jefferai/isbadcipher v0.0.0-20190226160619-51d2077c035f/go.mod h1:3J2qVK16Lq8V+wfiL2lPeDZ7UWMxk5LemerHa1p6N00=
github.com/jefferai/jsonx v1.0.0/go.mod h1:OGmqmi2tTeI/PS+qQfBDToLHHJIy/RMp24fPo8vFvoQ=
github.com/jellevandenhooff/dkim v0.0.0-20150330215556-f50fe3d243e1/go.mod h1:E0B/fFc00Y+Rasa88328GlI/XbtyysCtTHZS8h7IrBU=
github.com/jen20/awspolicyequivalence v1.1.0/go.mod h1:PV1fS2xyHhCLp83vbgSMFr2drM4GzG61wkz+k4pOG3E=
-github.com/jessevdk/go-flags v0.0.0-20180331124232-1c38ed7ad0cc/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI=
github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI=
github.com/jhump/protoreflect v1.6.0/go.mod h1:eaTn3RZAmMBcV0fifFvlm6VHNz3wSkYyXYWUh7ymB74=
github.com/jingyugao/rowserrcheck v0.0.0-20191204022205-72ab7603b68a h1:GmsqmapfzSJkm28dhRoHz2tLRbJmqhU86IPgBtN3mmk=
@@ -1117,7 +1161,6 @@ github.com/jirfag/go-printf-func-name v0.0.0-20191110105641-45db9963cdd3/go.mod
github.com/jirfag/go-printf-func-name v0.0.0-20200119135958-7558a9eaa5af h1:KA9BjwUk7KlCh6S9EAGWBt1oExIUv9WyNCiRz5amv48=
github.com/jirfag/go-printf-func-name v0.0.0-20200119135958-7558a9eaa5af/go.mod h1:HEWGJkRDzjJY2sqdDwxccsGicWEf9BQOZsq2tV+xzM0=
github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k=
-github.com/jmespath/go-jmespath v0.0.0-20160803190731-bd40a432e4c7/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k=
github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k=
github.com/jmespath/go-jmespath v0.3.0/go.mod h1:9QtRXoHjLGCJ5IBSaohpXITPlowMeeYCZ7fLUTSywik=
github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg=
@@ -1126,8 +1169,6 @@ github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGw
github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U=
github.com/jmoiron/sqlx v1.2.0/go.mod h1:1FEQNm3xlJgrMD+FBdI9+xvCksHtbpVBBw5dYhBSsks=
github.com/jmoiron/sqlx v1.2.1-0.20190826204134-d7d95172beb5/go.mod h1:1FEQNm3xlJgrMD+FBdI9+xvCksHtbpVBBw5dYhBSsks=
-github.com/joefitzgerald/rainbow-reporter v0.1.0/go.mod h1:481CNgqmVHQZzdIbN52CupLJyoVwB10FQ/IQlF1pdL8=
-github.com/joeshaw/multierror v0.0.0-20140124173710-69b34d4ec901/go.mod h1:Z86h9688Y0wesXCyonoVr47MasHilkuLMqGhRZ4Hpak=
github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg=
github.com/jonboulle/clockwork v0.1.0 h1:VKV+ZcuP6l3yW9doeqz6ziZGgcynBVQO+obU0+0hcPo=
github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo=
@@ -1147,7 +1188,6 @@ github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/
github.com/json-iterator/go v1.1.11 h1:uVUAXhF2To8cbw/3xN3pxj6kk7TYKs98NIrTqPlMWAQ=
github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
github.com/jsonnet-bundler/jsonnet-bundler v0.1.0/go.mod h1:YKsSFc9VFhhLITkJS3X2PrRqWG9u2Jq99udTdDjQLfM=
-github.com/jsonnet-bundler/jsonnet-bundler v0.2.0/go.mod h1:/by7P/OoohkI3q4CgSFqcoFsVY+IaNbzOVDknEsKDeU=
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.2.1+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU=
@@ -1157,7 +1197,8 @@ github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7V
github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM=
github.com/k8snetworkplumbingwg/network-attachment-definition-client v0.0.0-20191119172530-79f836b90111/go.mod h1:MP2HbArq3QT+oVp8pmtHNZnSnkhdkHtDnc7h6nJXmBU=
github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0/go.mod h1:1NbS8ALrpOvjt0rHPNLyCIeMtbizbir8U//inJ+zuB8=
-github.com/karrick/godirwalk v1.10.12/go.mod h1:RoGL9dQei4vP9ilrpETWE8CLOZ1kiN0LhBygSwrAsHA=
+github.com/karrick/godirwalk v1.8.0/go.mod h1:H5KPZjojv4lE+QYImBI8xVtrBRgYrIVsaRPx4tDPEn4=
+github.com/karrick/godirwalk v1.10.3/go.mod h1:RoGL9dQei4vP9ilrpETWE8CLOZ1kiN0LhBygSwrAsHA=
github.com/katbyte/terrafmt v0.2.1-0.20200303174203-e6a3e82cb21b/go.mod h1:WRq5tDmK04tcYbEr400zAUWtOK0jix54e8YeHP3IoQg=
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 h1:Z9n2FFNUXsshfwJMBgNA0RU6/i7WVaAegv3PtuIHPMs=
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8=
@@ -1173,8 +1214,10 @@ github.com/kisielk/gotool v1.0.0 h1:AV2c/EiW3KqPNT9ZKl07ehoAGi4C5/01Cfbblndcapg=
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
github.com/klauspost/compress v1.4.0/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A=
github.com/klauspost/compress v1.4.1/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A=
+github.com/klauspost/compress v1.9.5/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A=
github.com/klauspost/compress v1.10.7/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs=
github.com/klauspost/compress v1.10.10/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs=
+github.com/klauspost/compress v1.11.0/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs=
github.com/klauspost/cpuid v0.0.0-20180405133222-e7e905edc00e/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek=
github.com/klauspost/cpuid v1.2.0/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek=
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
@@ -1189,32 +1232,29 @@ github.com/kr/pty v1.0.0/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/pty v1.1.3/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/pty v1.1.4/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
+github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA=
github.com/kr/pty v1.1.8 h1:AkaSdXYQOWeaO3neb8EM634ahkXXe3jYbVh/F9lq+GI=
github.com/kr/pty v1.1.8/go.mod h1:O1sed60cT9XZ5uDucP5qwvh+TE3NnUj51EiZO/lmSfw=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
-github.com/kshvakov/clickhouse v1.3.5/go.mod h1:DMzX7FxRymoNkVgizH0DWAL8Cur7wHLgx3MUnGwJqpE=
github.com/kubernetes-sigs/kube-storage-version-migrator v0.0.0-20191127225502-51849bc15f17/go.mod h1:enH0BVV+4+DAgWdwSlMefG8bBzTfVMTr1lApzdLZ/cc=
-github.com/kylelemons/godebug v0.0.0-20160406211939-eadb3ce320cb/go.mod h1:B69LEHPfb2qLo0BaaOLcbitczOKLWTsrBG9LczfCD4k=
github.com/kylelemons/godebug v0.0.0-20170820004349-d65d576e9348/go.mod h1:B69LEHPfb2qLo0BaaOLcbitczOKLWTsrBG9LczfCD4k=
github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw=
github.com/kyoh86/exportloopref v0.1.7 h1:u+iHuTbkbTS2D/JP7fCuZDo/t3rBVGo3Hf58Rc+lQVY=
github.com/kyoh86/exportloopref v0.1.7/go.mod h1:h1rDl2Kdj97+Kwh4gdz3ujE7XHmH51Q0lUiZ1z4NLj8=
-github.com/leanovate/gopter v0.2.4/go.mod h1:gNcbPWNEWRe4lm+bycKqxUYoH5uoVje5SkOJ3uoLer8=
github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII=
+github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY=
github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
github.com/libvirt/libvirt-go v4.10.0+incompatible/go.mod h1:34zsnB4iGeOv7Byj6qotuW8Ya4v4Tr43ttjz/F0wjLE=
-github.com/libvirt/libvirt-go v5.0.0+incompatible/go.mod h1:34zsnB4iGeOv7Byj6qotuW8Ya4v4Tr43ttjz/F0wjLE=
github.com/libvirt/libvirt-go v5.10.0+incompatible/go.mod h1:34zsnB4iGeOv7Byj6qotuW8Ya4v4Tr43ttjz/F0wjLE=
github.com/libvirt/libvirt-go-xml v4.10.0+incompatible/go.mod h1:oBlgD3xOA01ihiK5stbhFzvieyW+jVS6kbbsMVF623A=
-github.com/libvirt/libvirt-go-xml v5.0.0+incompatible/go.mod h1:oBlgD3xOA01ihiK5stbhFzvieyW+jVS6kbbsMVF623A=
github.com/libvirt/libvirt-go-xml v5.10.0+incompatible/go.mod h1:oBlgD3xOA01ihiK5stbhFzvieyW+jVS6kbbsMVF623A=
github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de h1:9TO3cAIGXtEhnIaL+V+BEER86oLrvS+kWobKpbJuye0=
github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de/go.mod h1:zAbeS9B/r2mtpb6U+EI2rYA5OAXxsYw6wTamcNW+zcE=
github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM=
-github.com/lightstep/lightstep-tracer-go v0.18.0/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4=
+github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4=
github.com/likexian/gokit v0.0.0-20190309162924-0a377eecf7aa/go.mod h1:QdfYv6y6qPA9pbBA2qXtoT8BMKha6UyNbxWGWl/9Jfk=
github.com/likexian/gokit v0.0.0-20190418170008-ace88ad0983b/go.mod h1:KKqSnk/VVSW8kEyO2vVCXoanzEutKdlBAPohmGXkxCk=
github.com/likexian/gokit v0.0.0-20190501133040-e77ea8b19cdc/go.mod h1:3kvONayqCaj+UgrRZGpgfXzHdMYCAO0KAt4/8n0L57Y=
@@ -1224,7 +1264,6 @@ github.com/likexian/simplejson-go v0.0.0-20190419151922-c1f9f0b4f084/go.mod h1:U
github.com/likexian/simplejson-go v0.0.0-20190502021454-d8787b4bfa0b/go.mod h1:3BWwtmKP9cXWwYCr5bkoVDEfLywacOv0s06OBEDpyt8=
github.com/lithammer/dedent v1.1.0/go.mod h1:jrXYCQtgg0nJiN+StA2KgR7w6CiQNv9Fd/Z9BP0jIOc=
github.com/logrusorgru/aurora v0.0.0-20181002194514-a7b3b318ed4e/go.mod h1:7rIyQOR62GCctdiQpZ/zOJlFyk6y+94wXzv6RNZgaR4=
-github.com/lovoo/gcloud-opentracing v0.3.0/go.mod h1:ZFqk2y38kMDDikZPAK7ynTTGuyt17nSPdS3K5e+ZTBY=
github.com/lusis/go-artifactory v0.0.0-20160115162124-7e4ce345df82/go.mod h1:y54tfGmO3NKssKveTEFFzH8C/akrSOy/iW9qEAUDV84=
github.com/magiconair/properties v1.7.6/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ=
github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ=
@@ -1237,16 +1276,15 @@ github.com/mailru/easyjson v0.0.0-20190312143242-1de009706dbe/go.mod h1:C1wdFJiN
github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
github.com/mailru/easyjson v0.7.0/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs=
+github.com/mailru/easyjson v0.7.1/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs=
github.com/mailru/easyjson v0.7.6 h1:8yTIVnZgCoiM1TgqoeTl+LfU5Jg6/xL3QhGQnimLYnA=
github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc=
-github.com/maorfr/helm-plugin-utils v0.0.0-20200216074820-36d2fcf6ae86/go.mod h1:p3gwmRSFqbWw6plBpR0sKl3n3vpu8kX70gvCJKMvvCA=
github.com/maratori/testpackage v1.0.1 h1:QtJ5ZjqapShm0w5DosRjg0PRlSdAdlx+W6cCKoALdbQ=
github.com/maratori/testpackage v1.0.1/go.mod h1:ddKdw+XG0Phzhx8BFDTKgpWP4i7MpApTE5fXSKAqwDU=
-github.com/markbates/inflect v1.0.4/go.mod h1:1fR9+pO2KHEO9ZRtto13gDwwZaAKstQzferVeWqbgNs=
+github.com/markbates/oncer v0.0.0-20181203154359-bf2de49a0be2/go.mod h1:Ld9puTsIW75CHf65OeIOkyKbteujpZVXDpWK6YGZbxE=
github.com/markbates/pkger v0.17.1/go.mod h1:0JoVlrol20BSywW79rN3kdFFsE5xYM+rSCQDXbLhiuI=
-github.com/marstr/guid v1.1.0/go.mod h1:74gB1z2wpxxInTG6yaqA7KrtM0NZ+RbrcqDvYHefzho=
+github.com/markbates/safe v1.0.1/go.mod h1:nAqgmRi7cY2nqMc92/bSEeQA+R4OheNU2T1kNSCBdG0=
github.com/martini-contrib/render v0.0.0-20150707142108-ec18f8345a11/go.mod h1:Ah2dBMoxZEqk118as2T4u4fjfXarE0pPnMJaArZQZsI=
-github.com/martinlindhe/base36 v1.0.0/go.mod h1:+AtEs8xrBpCeYgSLoY/aJ6Wf37jtBuR0s35750M27+8=
github.com/masterzen/simplexml v0.0.0-20160608183007-4572e39b1ab9/go.mod h1:kCEbxUJlNDEBNbdQMkPSp6yaKcRXVI6f4ddk8Riv4bc=
github.com/masterzen/simplexml v0.0.0-20190410153822-31eea3082786/go.mod h1:kCEbxUJlNDEBNbdQMkPSp6yaKcRXVI6f4ddk8Riv4bc=
github.com/masterzen/winrm v0.0.0-20190223112901-5e5c9a7fe54b/go.mod h1:wr1VqkwW0AB5JS0QLy5GpVMS9E3VtRoSYXUYyVk46KY=
@@ -1263,9 +1301,6 @@ github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope
github.com/mattn/go-colorable v0.1.7/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
github.com/mattn/go-colorable v0.1.8 h1:c1ghPdyEDarC70ftn0y+A/Ee++9zz8ljHG1b13eJ0s8=
github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
-github.com/mattn/go-ieproxy v0.0.0-20190610004146-91bb50d98149/go.mod h1:31jz6HNzdxOmlERGGEc4v/dMssOfmp2p5bT/okiKFFc=
-github.com/mattn/go-ieproxy v0.0.0-20190702010315-6dee0af9227d/go.mod h1:31jz6HNzdxOmlERGGEc4v/dMssOfmp2p5bT/okiKFFc=
-github.com/mattn/go-ieproxy v0.0.0-20191113090002-7c0f6868bffe/go.mod h1:pYabZ6IHcRpFh7vIaLfK7rdcWgFEb3SFJ6/gNWuh88E=
github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
github.com/mattn/go-isatty v0.0.5/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
@@ -1278,19 +1313,18 @@ github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHX
github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=
github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU=
github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU=
-github.com/mattn/go-runewidth v0.0.6/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI=
github.com/mattn/go-runewidth v0.0.7/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI=
+github.com/mattn/go-runewidth v0.0.8/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI=
github.com/mattn/go-shellwords v1.0.4/go.mod h1:3xCvwCdWdlDJUrvuMn7Wuy9eWs4pE8vqg+NOMyg4B2o=
github.com/mattn/go-shellwords v1.0.5/go.mod h1:3xCvwCdWdlDJUrvuMn7Wuy9eWs4pE8vqg+NOMyg4B2o=
-github.com/mattn/go-shellwords v1.0.9/go.mod h1:EZzvwXDESEeg03EKmM+RmDnNOPKG4lLtQsUlTZDWQ8Y=
github.com/mattn/go-sqlite3 v1.9.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc=
-github.com/mattn/go-sqlite3 v1.10.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc=
github.com/mattn/goveralls v0.0.2/go.mod h1:8d1ZMHsd7fW6IRPKQh46F2WRpyib5/X4FOpevwGNQEw=
github.com/matttproud/golang_protobuf_extensions v1.0.0/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 h1:I0XW9+e1XWDxdcEniV4rQAIOPUGDq67JSCiRCgGCZLI=
github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4=
-github.com/maxbrunsfeld/counterfeiter/v6 v6.2.2/go.mod h1:eD9eIE7cdwcMi9rYluz88Jz2VyhSmden33/aXg4oVIY=
+github.com/mbilski/exhaustivestruct v1.0.1 h1:FouWZOuwqC4YFgkbODefMA0lcuTLKArZLLpzKzjCMF0=
+github.com/mbilski/exhaustivestruct v1.0.1/go.mod h1:OeTBVxQWoEmB2J2JCHmXWPJ0aksxSUOUy+nvtVEfzXc=
github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b h1:j7+1HpAFS1zy5+Q4qx1fWh90gTKwiN4QCGoY9TWyyO4=
github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE=
github.com/mholt/archiver v3.1.1+incompatible/go.mod h1:Dh2dOXnSdiLxRiPoVfIr/fI1TwETms9B8CTWfeh7ROU=
@@ -1301,10 +1335,7 @@ github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3N
github.com/miekg/dns v1.1.15/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg=
github.com/miekg/dns v1.1.22 h1:Jm64b3bO9kP43ddLjL2EY3Io6bmy1qGb9Xxz6TqS6rc=
github.com/miekg/dns v1.1.22/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso=
-github.com/mikefarah/yaml/v2 v2.4.0/go.mod h1:ahVqZF4n1W4NqwvVnZzC4es67xsW9uR/RRf2RRxieJU=
-github.com/mikefarah/yq/v2 v2.4.1/go.mod h1:i8SYf1XdgUvY2OFwSqGAtWOOgimD2McJ6iutoxRm4k0=
-github.com/minio/minio-go/v6 v6.0.49/go.mod h1:qD0lajrGW49lKZLtXKtCB4X/qkMf0a5tBvN2PaZg7Gg=
-github.com/minio/sha256-simd v0.1.1/go.mod h1:B5e1o+1/KgNmWrSQK08Y6Z1Vb5pwIktudl0J58iy0KM=
+github.com/minsikl/netscaler-nitro-go v0.0.0-20170827154432-5b14ce3643e3/go.mod h1:jh28TRFZwBumf7OjMQbRb8TNtDuuX7QNAGRjFEt+h6I=
github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc=
github.com/mitchellh/cli v1.1.1/go.mod h1:xcISNoH86gajksDmfB23e/pu+B+GeFRMYmoHXxx3xhI=
github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db/go.mod h1:l0dey0ia/Uv7NcFFVbCLtqEBQbrT4OCwCSKTEv6enCw=
@@ -1333,10 +1364,10 @@ github.com/mitchellh/mapstructure v0.0.0-20180220230111-00c29f56e238/go.mod h1:F
github.com/mitchellh/mapstructure v1.0.0/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
github.com/mitchellh/mapstructure v1.3.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
-github.com/mitchellh/mapstructure v1.3.3 h1:SzB1nHZ2Xi+17FP0zVQBHIZqvwRN9408fJO8h+eeNA8=
+github.com/mitchellh/mapstructure v1.3.2/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
github.com/mitchellh/mapstructure v1.3.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
-github.com/mitchellh/osext v0.0.0-20151018003038-5e2d6d41470f/go.mod h1:OkQIRizQZAeMln+1tSwduZz7+Af5oFlKirV/MSYes2A=
-github.com/mitchellh/packer v1.3.2/go.mod h1:3TnGTkplC/koV8K6bCfCN1NB34Tye7lmUzo55/X5wqw=
+github.com/mitchellh/mapstructure v1.4.0 h1:7ks8ZkOP5/ujthUsT07rNv+nkLXCQWKNHuwzOAesEks=
+github.com/mitchellh/mapstructure v1.4.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
github.com/mitchellh/panicwrap v1.0.0/go.mod h1:pKvZHwWrZowLUzftuFq7coarnxbBXU4aQh3N0BJOeeA=
github.com/mitchellh/pointerstructure v0.0.0-20190430161007-f252a8fd71c8/go.mod h1:k4XwG94++jLVsSiTxo7qdIfXA9pj9EAeo0QsNNJOLZ8=
github.com/mitchellh/prefixedio v0.0.0-20190213213902-5733675afd51/go.mod h1:kB1naBgV9ORnkiTVeyJOI1DavaJkG4oNIq0Af6ZVKUo=
@@ -1355,14 +1386,17 @@ github.com/modern-go/reflect2 v0.0.0-20180320133207-05fbef0ca5da/go.mod h1:bx2lN
github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
github.com/modern-go/reflect2 v1.0.1 h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9AWI=
github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
+github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826/go.mod h1:TaXosZuwdSHYgviHp1DAtfrULt5eUgsSMsZf+YrPgl8=
github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 h1:n6/2gBQ3RWajuToeY6ZtZTIKv2v7ThUy5KKusIT0yc0=
github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00/go.mod h1:Pm3mSP3c5uWn86xMLZ5Sa7JB9GsEZySvHYXCTK4E9q4=
-github.com/morikuni/aec v0.0.0-20170113033406-39771216ff4c/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc=
+github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc=
+github.com/moricho/tparallel v0.2.1 h1:95FytivzT6rYzdJLdtfn6m1bfFJylOJK41+lgv/EHf4=
+github.com/moricho/tparallel v0.2.1/go.mod h1:fXEIZxG2vdfl0ZF8b42f5a78EhjjD5mX8qUplsoSU4k=
github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc=
github.com/mozilla/tls-observatory v0.0.0-20180409132520-8791a200eb40/go.mod h1:SrKMQvPiws7F7iqYp8/TX+IhxCYhzr6N/1yb8cwHsGk=
+github.com/mozilla/tls-observatory v0.0.0-20190404164649-a3c1b6cfecfd/go.mod h1:SrKMQvPiws7F7iqYp8/TX+IhxCYhzr6N/1yb8cwHsGk=
github.com/mozilla/tls-observatory v0.0.0-20200220173314-aae45faa4006/go.mod h1:SrKMQvPiws7F7iqYp8/TX+IhxCYhzr6N/1yb8cwHsGk=
github.com/mozilla/tls-observatory v0.0.0-20200317151703-4fa42e1c2dee/go.mod h1:SrKMQvPiws7F7iqYp8/TX+IhxCYhzr6N/1yb8cwHsGk=
-github.com/mozillazg/go-cos v0.13.0/go.mod h1:Zp6DvvXn0RUOXGJ2chmWt2bLEqRAnJnS3DnAZsJsoaE=
github.com/mozillazg/go-httpheader v0.2.1/go.mod h1:jJ8xECTlalr6ValeXYdOF8fFUISeBAdw6E61aqQma60=
github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ=
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA=
@@ -1372,7 +1406,14 @@ github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRW
github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw=
github.com/nakabonne/nestif v0.3.0 h1:+yOViDGhg8ygGrmII72nV9B/zGxY188TYpfolntsaPw=
github.com/nakabonne/nestif v0.3.0/go.mod h1:dI314BppzXjJ4HsCnbo7XzrJHPszZsjnk5wEBSYHI2c=
-github.com/nakagami/firebirdsql v0.0.0-20190310045651-3c02a58cfed8/go.mod h1:86wM1zFnC6/uDBfZGNwB65O+pR2OFi5q/YQaEUid1qA=
+github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg=
+github.com/nats-io/jwt v0.3.2/go.mod h1:/euKqTS1ZD+zzjYrY7pseZrTtWQSjujC7xjPc8wL6eU=
+github.com/nats-io/nats-server/v2 v2.1.2/go.mod h1:Afk+wRZqkMQs/p45uXdrVLuab3gwv3Z8C4HTBu8GD/k=
+github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzEE/Zbp4w=
+github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w=
+github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w=
+github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c=
+github.com/nbio/st v0.0.0-20140626010706-e9e8d9816f32/go.mod h1:9wM+0iRr9ahx58uYLpLIr5fm8diHn0JbqRycJi6w0Ms=
github.com/nbutton23/zxcvbn-go v0.0.0-20160627004424-a22cb81b2ecd/go.mod h1:o96djdrsSGy3AWPyBgZMAGfxZNfgntdJG+11KU4QvbU=
github.com/nbutton23/zxcvbn-go v0.0.0-20171102151520-eafdab6b0663/go.mod h1:o96djdrsSGy3AWPyBgZMAGfxZNfgntdJG+11KU4QvbU=
github.com/nbutton23/zxcvbn-go v0.0.0-20180912185939-ae427f1e4c1d h1:AREM5mwr4u1ORQBMvzfzBgpsctsbQikCVpvC+tX285E=
@@ -1380,23 +1421,23 @@ github.com/nbutton23/zxcvbn-go v0.0.0-20180912185939-ae427f1e4c1d/go.mod h1:o96d
github.com/ncw/swift v1.0.47/go.mod h1:23YIA4yWVnGwv2dQlN4bB7egfYX6YLn0Yo/S6zZO/ZM=
github.com/neelance/astrewrite v0.0.0-20160511093645-99348263ae86/go.mod h1:kHJEU3ofeGjhHklVoIGuVj85JJwZ6kWPaJwCIxgnFmo=
github.com/neelance/sourcemap v0.0.0-20151028013722-8c68805598ab/go.mod h1:Qr6/a/Q4r9LP1IltGz7tA7iOK1WonHEYhu1HRBA7ZiM=
+github.com/nicksnyder/go-i18n v1.10.0/go.mod h1:HrK7VCrbOvQoUAQ7Vpy7i87N7JZZZ7R2xBGjv0j365Q=
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs=
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno=
github.com/nirarg/terraform-provider-kubevirt v0.0.0-20201222125919-101cee051ed3/go.mod h1:FMugN9a6XOJm9mLFEV/+F4IJzdZmpLn/OaNRa8S/Ens=
-github.com/nishanths/exhaustive v0.0.0-20200811152831-6cf413ae40e0 h1:eMV1t2NQRc3r1k3guWiv/zEeqZZP6kPvpUfy6byfL1g=
github.com/nishanths/exhaustive v0.0.0-20200811152831-6cf413ae40e0/go.mod h1:wBEpHwM2OdmeNpdCvRPUlkEbBuaFmcK4Wv8Q7FuGW3c=
+github.com/nishanths/exhaustive v0.1.0 h1:kVlMw8h2LHPMGUVqUj6230oQjjTMFjwcZrnkhXzFfl8=
+github.com/nishanths/exhaustive v0.1.0/go.mod h1:S1j9110vxV1ECdCudXRkeMnFQ/DQk9ajLT0Uf2MYZQQ=
github.com/nu7hatch/gouuid v0.0.0-20131221200532-179d4d0c4d8d/go.mod h1:YUTz3bUH2ZwIWBy3CJBeOBEugqcmXREj14T+iG/4k4U=
github.com/nwaples/rardecode v1.0.0/go.mod h1:5DzqNKiOdpKKBH87u8VlvAnPZMXcGRhxWkRpHbbfGS0=
github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A=
github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE=
github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU=
+github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs=
github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA=
github.com/oklog/run v1.1.0/go.mod h1:sVPdnTZT1zYwAJeCMu2Th4T21pA3FPOQRfWjQlk7DVU=
-github.com/oklog/ulid v0.0.0-20170117200651-66bb6560562f/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U=
github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U=
github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo=
-github.com/olekukonko/tablewriter v0.0.1/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo=
-github.com/olekukonko/tablewriter v0.0.2/go.mod h1:rSAaSIOAGT9odnlyGlUfAJaoc5w2fSBUmeGDbRWPxyQ=
github.com/olekukonko/tablewriter v0.0.4/go.mod h1:zq6QwlOf5SlnkVbMSr5EoBv3636FWnp+qbPhuoO21uA=
github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
@@ -1409,6 +1450,8 @@ github.com/onsi/ginkgo v1.12.0/go.mod h1:oUhWkIvk5aDxtKvDDuw8gItl8pKl42LzjC9KZE0
github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk=
github.com/onsi/ginkgo v1.13.0/go.mod h1:+REjRxOmWfHCjfv9TTWB1jD1Frx4XydAD3zm1lskyM0=
github.com/onsi/ginkgo v1.14.1/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY=
+github.com/onsi/ginkgo v1.14.2/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY=
+github.com/onsi/ginkgo v1.15.0/go.mod h1:hF8qUzuuC8DJGygJH3726JnCZX4MYbRB8yFfISqnKUg=
github.com/onsi/ginkgo v1.16.2/go.mod h1:CObGmKUOKaSC0RjmoAK7tKyn4Azo5P2IWuoMnvwxz1E=
github.com/onsi/ginkgo v1.16.4 h1:29JGrr5oVBm5ulCWet69zQkzWipVXIol6ygQUe/EzNc=
github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0=
@@ -1423,163 +1466,175 @@ github.com/onsi/gomega v1.8.1/go.mod h1:Ho0h+IUsWyvy1OpqCwxlQ/21gkhVunqlU8fDGcoT
github.com/onsi/gomega v1.9.0/go.mod h1:Ho0h+IUsWyvy1OpqCwxlQ/21gkhVunqlU8fDGcoTdcA=
github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo=
github.com/onsi/gomega v1.10.2/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo=
+github.com/onsi/gomega v1.10.3/go.mod h1:V9xEwhxec5O8UDM77eCW8vLymOMltsqPVYWrpDsH8xc=
+github.com/onsi/gomega v1.10.4/go.mod h1:g/HbgYopi++010VEqkFgJHKC09uJiW9UkXvMUuKHUCQ=
+github.com/onsi/gomega v1.10.5/go.mod h1:gza4q3jKQJijlu05nKWRCW/GavJumGt8aNRxWg7mt48=
github.com/onsi/gomega v1.13.0 h1:7lLHu94wT9Ij0o6EWWclhu0aOh32VxhkwEJvzuWPeak=
github.com/onsi/gomega v1.13.0/go.mod h1:lRk9szgn8TxENtWd0Tp4c3wjlRfMTMH27I+3Je41yGY=
-github.com/opencontainers/go-digest v0.0.0-20170106003457-a6d0ee40d420/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s=
-github.com/opencontainers/go-digest v0.0.0-20180430190053-c9281466c8b2/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s=
+github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk=
github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s=
github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM=
-github.com/opencontainers/image-spec v1.0.0/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0=
github.com/opencontainers/image-spec v1.0.1/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0=
-github.com/opencontainers/runc v0.0.0-20190115041553-12f6a991201f/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U=
github.com/opencontainers/runc v0.0.0-20191031171055-b133feaeeb2e/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U=
github.com/opencontainers/runc v0.1.1/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U=
-github.com/opencontainers/runtime-spec v0.1.2-0.20190507144316-5b71a03e2700/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0=
-github.com/opencontainers/runtime-tools v0.0.0-20181011054405-1d69bd0f9c39/go.mod h1:r3f7wjNzSs2extwzU3Y+6pKfobzPh+kKFJ3ofN+3nfs=
-github.com/openshift-metal3/terraform-provider-ironic v0.2.4/go.mod h1:ux2W6gsCIYsY/fX5N0V0ZgwFEBNN7P8g6RlH6ACi97k=
+github.com/openshift-metal3/terraform-provider-ironic v0.2.6/go.mod h1:ux2W6gsCIYsY/fX5N0V0ZgwFEBNN7P8g6RlH6ACi97k=
github.com/openshift/api v0.0.0-20191219222812-2987a591a72c/go.mod h1:dh9o4Fs58gpFXGSYfnVxGR9PnV53I8TW84pQaJDdGiY=
-github.com/openshift/api v0.0.0-20200205133042-34f0ec8dab87/go.mod h1:fT6U/JfG8uZzemTRwZA2kBDJP5nWz7v05UHnty/D+pk=
github.com/openshift/api v0.0.0-20200326152221-912866ddb162/go.mod h1:RKMJ5CBnljLfnej+BJ/xnOWc3kZDvJUaIAEq2oKSPtE=
github.com/openshift/api v0.0.0-20200424083944-0422dc17083e/go.mod h1:VnbEzX8SAaRj7Yfl836NykdQIlbEjfL6/CD+AaJQg5Q=
github.com/openshift/api v0.0.0-20200827090112-c05698d102cf/go.mod h1:M3xexPhgM8DISzzRpuFUy+jfPjQPIcs9yqEYj17mXV8=
github.com/openshift/api v0.0.0-20200901182017-7ac89ba6b971/go.mod h1:M3xexPhgM8DISzzRpuFUy+jfPjQPIcs9yqEYj17mXV8=
github.com/openshift/api v0.0.0-20201019163320-c6a5ec25f267/go.mod h1:RDvBcRQMGLa3aNuDuejVBbTEQj/2i14NXdpOLqbNBvM=
+github.com/openshift/api v0.0.0-20201214114959-164a2fb63b5f/go.mod h1:aqU5Cq+kqKKPbDMqxo9FojgDeSpNJI7iuskjXjtojDg=
+github.com/openshift/api v0.0.0-20201216151826-78a19e96f9eb/go.mod h1:aqU5Cq+kqKKPbDMqxo9FojgDeSpNJI7iuskjXjtojDg=
github.com/openshift/api v0.0.0-20210216211028-bb81baaf35cd/go.mod h1:aqU5Cq+kqKKPbDMqxo9FojgDeSpNJI7iuskjXjtojDg=
-github.com/openshift/api v3.9.1-0.20191111211345-a27ff30ebf09+incompatible h1:AvJ2SgJ7ekSlEL/wyeVMffxDkbKohp4JLge9wMtT23o=
-github.com/openshift/api v3.9.1-0.20191111211345-a27ff30ebf09+incompatible/go.mod h1:dh9o4Fs58gpFXGSYfnVxGR9PnV53I8TW84pQaJDdGiY=
-github.com/openshift/baremetal-operator v0.0.0-20200715132148-0f91f62a41fe h1:bu99IMkaN6o/JcxpWEb1eT8gDdL9hLcwOmfiVIbXWj8=
-github.com/openshift/baremetal-operator v0.0.0-20200715132148-0f91f62a41fe/go.mod h1:DOgBIuBcXuTD8uub0jL7h6gBdIBt3CFrwz6K2FtfMBA=
+github.com/openshift/api v0.0.0-20210331162552-3e31249e6a55/go.mod h1:dZ4kytOo3svxJHNYd0J55hwe/6IQG5gAUHUE0F3Jkio=
+github.com/openshift/api v0.0.0-20210331193751-3acddb19d360/go.mod h1:dZ4kytOo3svxJHNYd0J55hwe/6IQG5gAUHUE0F3Jkio=
+github.com/openshift/api v0.0.0-20210409143810-a99ffa1cac67/go.mod h1:dZ4kytOo3svxJHNYd0J55hwe/6IQG5gAUHUE0F3Jkio=
+github.com/openshift/api v0.0.0-20210412212256-79bd8cfbbd59/go.mod h1:dZ4kytOo3svxJHNYd0J55hwe/6IQG5gAUHUE0F3Jkio=
+github.com/openshift/api v0.0.0-20210416115537-a60c0dc032fd/go.mod h1:dZ4kytOo3svxJHNYd0J55hwe/6IQG5gAUHUE0F3Jkio=
+github.com/openshift/api v0.0.0-20210622200201-7740bfb97397 h1:wp5My+8d2K2HIZw2yZblsIZawma5UrNQGPVcTev/HSA=
+github.com/openshift/api v0.0.0-20210622200201-7740bfb97397/go.mod h1:izBmoXbUu3z5kUa4FjZhvekTsyzIWiOoaIgJiZBBMQs=
+github.com/openshift/baremetal-operator v0.0.0-20210706141527-5240e42f012a h1:7rEVkEhSyg7wxFsH5BWzG9svhlG3GSY+hhSGNjU20P8=
+github.com/openshift/baremetal-operator v0.0.0-20210706141527-5240e42f012a/go.mod h1:N80LeH5dJtqtrknj5vxwRaXyfF1UdxLm74B/QpH8QI0=
+github.com/openshift/baremetal-operator/apis v0.0.0-20210706141527-5240e42f012a h1:oXPw/sck0Lr0yAarZZCOCFE/3+9+UziPIIhREzhE2SU=
+github.com/openshift/baremetal-operator/apis v0.0.0-20210706141527-5240e42f012a/go.mod h1:b2uTLrpVxUWaXRhQeaONl8jOjPxSjtdmjCNKlgsoGI0=
github.com/openshift/build-machinery-go v0.0.0-20200211121458-5e3d6e570160/go.mod h1:1CkcsT3aVebzRBzVTSbiKSkJMsC/CASqxesfqEMfJEc=
github.com/openshift/build-machinery-go v0.0.0-20200424080330-082bf86082cc/go.mod h1:1CkcsT3aVebzRBzVTSbiKSkJMsC/CASqxesfqEMfJEc=
github.com/openshift/build-machinery-go v0.0.0-20200819073603-48aa266c95f7/go.mod h1:b1BuldmJlbA/xYtdZvKi+7j5YGB44qJUJDZ9zwiNCfE=
github.com/openshift/build-machinery-go v0.0.0-20200917070002-f171684f77ab/go.mod h1:b1BuldmJlbA/xYtdZvKi+7j5YGB44qJUJDZ9zwiNCfE=
+github.com/openshift/build-machinery-go v0.0.0-20210209125900-0da259a2c359/go.mod h1:b1BuldmJlbA/xYtdZvKi+7j5YGB44qJUJDZ9zwiNCfE=
+github.com/openshift/build-machinery-go v0.0.0-20210423112049-9415d7ebd33e/go.mod h1:b1BuldmJlbA/xYtdZvKi+7j5YGB44qJUJDZ9zwiNCfE=
github.com/openshift/build-machinery-go v0.0.0-20210806203541-4ea9b6da3a37 h1:40Nw4fwP1tXx0g1UgIGoLA9eoSdLm7jBUXFH5uVYjBA=
github.com/openshift/build-machinery-go v0.0.0-20210806203541-4ea9b6da3a37/go.mod h1:b1BuldmJlbA/xYtdZvKi+7j5YGB44qJUJDZ9zwiNCfE=
-github.com/openshift/client-go v0.0.0-20190923180330-3b6373338c9b/go.mod h1:6rzn+JTr7+WYS2E1TExP4gByoABxMznR6y2SnUIkmxk=
github.com/openshift/client-go v0.0.0-20191125132246-f6563a70e19a/go.mod h1:6rzn+JTr7+WYS2E1TExP4gByoABxMznR6y2SnUIkmxk=
github.com/openshift/client-go v0.0.0-20200326155132-2a6cd50aedd0/go.mod h1:uUQ4LClRO+fg5MF/P6QxjMCb1C9f7Oh4RKepftDnEJE=
github.com/openshift/client-go v0.0.0-20200827190008-3062137373b5/go.mod h1:5rGmrkQ8DJEUXA+AR3rEjfH+HFyg4/apY9iCQFgvPfE=
-github.com/openshift/client-go v0.0.0-20201020074620-f8fd44879f7c h1:NB9g4Y/aegId7fyNqYyGxEfyNOytYFT5dxWJtfOJFQs=
github.com/openshift/client-go v0.0.0-20201020074620-f8fd44879f7c/go.mod h1:yZ3u8vgWC19I9gbDMRk8//9JwG/0Sth6v7C+m6R8HXs=
+github.com/openshift/client-go v0.0.0-20201214125552-e615e336eb49/go.mod h1:9/jG4I6sh+5QublJpZZ4Zs/P4/QCXMsQQ/K/058bSB8=
+github.com/openshift/client-go v0.0.0-20210331195552-cf6c2669e01f/go.mod h1:hHaRJ6vp2MRd/CpuZ1oJkqnMGy5eEnoAkQmKPZKcUPI=
+github.com/openshift/client-go v0.0.0-20210409155308-a8e62c60e930 h1:t04P0kxrsqAx5Ks75MRHK+mscdy+DD9X/qBPC4yCMUg=
+github.com/openshift/client-go v0.0.0-20210409155308-a8e62c60e930/go.mod h1:uBPbAyIbjMuhPQy4NgF8q1alNGX2qA8bXIkAycsSDc0=
github.com/openshift/cloud-credential-operator v0.0.0-20200316201045-d10080b52c9e h1:2gyl9UVyjHSWzdS56KUXxQwIhENbq2x2olqoMQSA/C8=
github.com/openshift/cloud-credential-operator v0.0.0-20200316201045-d10080b52c9e/go.mod h1:iPn+uhIe7nkP5BMHe2QnbLtg5m/AIQ1xvz9s3cig5ss=
github.com/openshift/cluster-api v0.0.0-20190805113604-f8de78af80fc/go.mod h1:mNsD1dsD4T57kV4/C6zTHke/Ro166xgnyyRZqkamiEU=
-github.com/openshift/cluster-api v0.0.0-20191030113141-9a3a7bbe9258/go.mod h1:T18COkr6nLh9RyZKPMP7YjnwBME7RX8P2ar1SQbBltM=
-github.com/openshift/cluster-api v0.0.0-20191129101638-b09907ac6668 h1:IDZyg/Kye98ptqpc9j9rzPjZJlijjEDe8g7TZ67CmLU=
-github.com/openshift/cluster-api v0.0.0-20191129101638-b09907ac6668/go.mod h1:T18COkr6nLh9RyZKPMP7YjnwBME7RX8P2ar1SQbBltM=
github.com/openshift/cluster-api-actuator-pkg v0.0.0-20190614215203-42228d06a2ca/go.mod h1:KNPaA64x3Ok7z538kvS2acwC5fEwvPfF0RdTx2geQEE=
-github.com/openshift/cluster-api-provider-aws v0.2.1-0.20201022175424-d30c7a274820 h1:KcRhMsepLIShTZT3xVBPUWHfxckNfpPP068Pwpe3U8k=
-github.com/openshift/cluster-api-provider-aws v0.2.1-0.20201022175424-d30c7a274820/go.mod h1:rDwmh/vpz6mUU/l9QLWeaoGpUeC+b3yyI34xnp3tIf8=
-github.com/openshift/cluster-api-provider-azure v0.1.0-alpha.3.0.20201016155852-4090a6970205 h1:CIW1iJdHO6gz30wd+MPZAxrmCKfL/MsixgZeiSlDdRk=
-github.com/openshift/cluster-api-provider-azure v0.1.0-alpha.3.0.20201016155852-4090a6970205/go.mod h1:oOG/TNSBse4brosfLCH/G2Q/42ye+DZQq8VslA5SxOs=
+github.com/openshift/cluster-api-provider-aws v0.2.1-0.20210121023454-5ffc5f422a80 h1:fFHoy/1QCLUcfo/NceEM8jGY2Tafl1BmyLa7tReN328=
+github.com/openshift/cluster-api-provider-aws v0.2.1-0.20210121023454-5ffc5f422a80/go.mod h1:JV7aXj/LZ8B4MwIQdhGxpTO2PCG8+7UKFd6FaOZCSzA=
+github.com/openshift/cluster-api-provider-azure v0.1.0-alpha.3.0.20210626224711-5d94c794092f h1:rQwvVLPZfM5o0USkVY6mrAyJwzMUkhjn9Wz2D5vX81k=
+github.com/openshift/cluster-api-provider-azure v0.1.0-alpha.3.0.20210626224711-5d94c794092f/go.mod h1:GR+ocB8I+Z7JTSBdO+DMu/diBfH66lRlRpnc1KWysUM=
github.com/openshift/cluster-api-provider-baremetal v0.0.0-20190821174549-a2a477909c1d/go.mod h1:S+wtA0Rm2FZ5ccC9zNQXUWUDesR6Jsdn5eb6HjAR+Gs=
github.com/openshift/cluster-api-provider-gcp v0.0.1-0.20200701112720-3a7d727c9a10/go.mod h1:wgkZrOlcIMWTzo8khB4Js2PoDJDlIUUdzCBm7BuDdqw=
github.com/openshift/cluster-api-provider-gcp v0.0.1-0.20200713133651-5c8a640669ac/go.mod h1:XVYX9JE339nKbDDa/W481XD+1GTeqeaBm8bDPr7WE7I=
github.com/openshift/cluster-api-provider-gcp v0.0.1-0.20200901173901-9056dbc8c9b9/go.mod h1:rcwAydGZX+z4l91wtOdbq+fqDwuo6iu0YuFik3UUc+8=
github.com/openshift/cluster-api-provider-gcp v0.0.1-0.20201002065957-9854f7420570/go.mod h1:7NRECVE26rvP1/fs1CbhfY5gsgnnFQNhb9txTFzWmUw=
github.com/openshift/cluster-api-provider-gcp v0.0.1-0.20201027164920-70f2f92e64ab/go.mod h1:S38HjVtBmaX6PHq99updVereupkHcwcOEM5jq6rTILI=
+github.com/openshift/cluster-api-provider-gcp v0.0.1-0.20201201000827-1117a4fc438c/go.mod h1:21N0wWjiTQypZ7WosEYhcGJHr9JoDR1RBFztE0NvdYM=
github.com/openshift/cluster-api-provider-gcp v0.0.1-0.20201203141909-4dc702fd57a5 h1:75U75i/GfStAartlsP/F9v3Gv3MwzuLwqdLTjP1vPeE=
github.com/openshift/cluster-api-provider-gcp v0.0.1-0.20201203141909-4dc702fd57a5/go.mod h1:/XjFaKnqBc8K/jcRXHO7tau39CmzNinqmpxYaQGRvnE=
+github.com/openshift/cluster-api-provider-ibmcloud v0.0.0-20210702173623-676faba9895d/go.mod h1:hIEdP3ZudO/l2J8+gm8IFW0KMHn0YURvMSTZy9luK7w=
github.com/openshift/cluster-api-provider-kubevirt v0.0.0-20201214114543-e5aed9c73f1f/go.mod h1:Moiq8vUJ4IdTaJBxIA756FFJ4GgVXZAiOds7lTpZ1kQ=
github.com/openshift/cluster-api-provider-libvirt v0.2.1-0.20191219173431-2336783d4603/go.mod h1:7pQ9Bzha+ug/5zd+0ufbDEcnn2OnNlPwRwYrzhXk4NM=
-github.com/openshift/cluster-api-provider-openstack v0.0.0-20201116051540-155384b859c5 h1:zTVx8b/+aN2y3IAhM+lmqALLPVeDg5Cr+kKO63o4Odg=
-github.com/openshift/cluster-api-provider-openstack v0.0.0-20201116051540-155384b859c5/go.mod h1:vhv3G5oWIev2paJytOa57cXUYdzEyVgoUMwU3uuOB7Y=
-github.com/openshift/cluster-api-provider-ovirt v0.1.1-0.20200504092944-27473ea1ae43 h1:JO7t5tJcLiE0gk7VrdzKrJAcOv73GirpUxH/OvrOVms=
-github.com/openshift/cluster-api-provider-ovirt v0.1.1-0.20200504092944-27473ea1ae43/go.mod h1:Vl/bvZulLw6PdUADIFWGfoTWH1O4L1B80eN7BtLYEuo=
+github.com/openshift/cluster-api-provider-openstack v0.0.0-20210302164104-8498241fa4bd h1:5mq9/JftiO9u/RknQ5iR9Nkd09R1XFfUPS1nO11Wth0=
+github.com/openshift/cluster-api-provider-openstack v0.0.0-20210302164104-8498241fa4bd/go.mod h1:ONl4R7ziQtgnsBjR59fcZbOLjBEPVeZ69C1TPKevynw=
+github.com/openshift/cluster-api-provider-ovirt v0.1.1-0.20210622084102-c4f9f269bcb7 h1:kvgOB+332tlunQ7WtuF8T1shPBz2NI4/qyzMs7+bBo8=
+github.com/openshift/cluster-api-provider-ovirt v0.1.1-0.20210622084102-c4f9f269bcb7/go.mod h1:XnfUsLLjdZcchZZk2LGluGDjggXQNyF2mHqVc20RBcI=
github.com/openshift/cluster-autoscaler-operator v0.0.0-20190521201101-62768a6ba480 h1:iIrMvq8qRMfmuhw/TVB4usRN/BlH2huBKgtrRjucOU4=
github.com/openshift/cluster-autoscaler-operator v0.0.0-20190521201101-62768a6ba480/go.mod h1:/XmV44Fh28Vo3Ye93qFrxAbcFJ/Uy+7LPD+jGjmfJYc=
github.com/openshift/custom-resource-status v0.0.0-20190822192428-e62f2f3b79f3/go.mod h1:GDjWl0tX6FNIj82vIxeudWeSx2Ff6nDZ8uJn0ohUFvo=
github.com/openshift/generic-admission-server v1.14.1-0.20200903115324-4ddcdd976480 h1:y47BAJFepK8Xls1c+quIOyc46OXiT9LRiqGVjIaMlSA=
github.com/openshift/generic-admission-server v1.14.1-0.20200903115324-4ddcdd976480/go.mod h1:OAHL5WnZphlhVEf5fTdeGLvNwMu1B2zCWpmxJpCA35o=
-github.com/openshift/installer v0.9.0-master.0.20210211002944-d237b9dee575 h1:eSL2Cy/mSGfdJJfxsn5TXGOrW2RZSFy77EuB2tqanMY=
-github.com/openshift/installer v0.9.0-master.0.20210211002944-d237b9dee575/go.mod h1:SWnBsRHNJNZCUJUMyyWbxljcePsR/hCUEY38GwhSIA8=
+github.com/openshift/installer v0.9.0-master.0.20210831144123-4050517eead6 h1:d5Te6muidABCE+Ab3W66wgl5r6vovZqPBwXVhW0qV28=
+github.com/openshift/installer v0.9.0-master.0.20210831144123-4050517eead6/go.mod h1:KtHIsSdQXiuZa4T6QY6y7BvtFYffMrLCTTOrJ6j/Y14=
github.com/openshift/library-go v0.0.0-20200512120242-21a1ff978534/go.mod h1:2kWwXTkpoQJUN3jZ3QW88EIY1hdRMqxgRs2hheEW/pg=
github.com/openshift/library-go v0.0.0-20200909173121-1d055d971916/go.mod h1:6vwp+YhYOIlj8MpkQKkebTTSn2TuYyvgiAFQ206jIEQ=
-github.com/openshift/library-go v0.0.0-20201109112824-093ad3cf6600 h1:BjzxCCiWcRwOq3LAKZxZWmY6wD85D5462KpG1p7zMRw=
github.com/openshift/library-go v0.0.0-20201109112824-093ad3cf6600/go.mod h1:1xYaYQcQsn+AyCRsvOU+Qn5z6GGiCmcblXkT/RZLVfo=
+github.com/openshift/library-go v0.0.0-20201215165635-4ee79b1caed5/go.mod h1:udseDnqxn5ON8i+NBjDp00fBTK0JRu1/6Y6tf6EivDE=
+github.com/openshift/library-go v0.0.0-20210408164723-7a65fdb398e2 h1:eYdrmOSwRqHhfuPK8bhCSkBRUmCNYkgkOLgnImnz3Rs=
+github.com/openshift/library-go v0.0.0-20210408164723-7a65fdb398e2/go.mod h1:pnz961veImKsbn7pQcuFbcVpCQosYiC1fUOjzEDeOLU=
github.com/openshift/machine-api-operator v0.0.0-20190312153711-9650e16c9880/go.mod h1:7HeAh0v04zQn1L+4ItUjvpBQYsm2Nf81WaZLiXTcnkc=
github.com/openshift/machine-api-operator v0.2.1-0.20200611014855-9a69f85c32dd/go.mod h1:6vMi+R3xqznBdq5rgeal9N3ak3sOpy50t0fdRCcQXjE=
github.com/openshift/machine-api-operator v0.2.1-0.20200701225707-950912b03628/go.mod h1:cxjy/RUzv5C2T5FNl1KKXUgtakWsezWQ642B/CD9VQA=
github.com/openshift/machine-api-operator v0.2.1-0.20200722104429-f4f9b84df9b7/go.mod h1:XDsNRAVEJtkI00e51SAZ/PnqNJl1zv0rHXSdl9L1oOY=
github.com/openshift/machine-api-operator v0.2.1-0.20200926044412-b7d860f8074c/go.mod h1:cp/wPVzxHZeLUjOLkNPNqrk4wyyW6HuHd3Kz9+hl5xw=
github.com/openshift/machine-api-operator v0.2.1-0.20201002104344-6abfb5440597/go.mod h1:+oAfoCl+TUd2TM79/6NdqLpFUHIJpmqkKdmiHe2O7mw=
-github.com/openshift/machine-api-operator v0.2.1-0.20201111151924-77300d0c997a h1:luJTCno3mFZ1gGugbbVes1C0oquKP+67eY12kOi/jKM=
github.com/openshift/machine-api-operator v0.2.1-0.20201111151924-77300d0c997a/go.mod h1:XQN83eD5YoXEkla3di+exKIpLYx/ApLAOe0EE66Q+hw=
+github.com/openshift/machine-api-operator v0.2.1-0.20201203125141-79567cb3368e/go.mod h1:Vxdx8K+8sbdcGozW86hSvcVl5JgJOqNFYhLRRhEM9HY=
+github.com/openshift/machine-api-operator v0.2.1-0.20210104142355-8e6ae0acdfcf/go.mod h1:U5eAHChde1XvtQy3s1Zcr7ll4X7heb0SzYpaiAwxmQc=
+github.com/openshift/machine-api-operator v0.2.1-0.20210504014029-a132ec00f7dd/go.mod h1:DFZBMPtC2TYZH5NE9+2JQIpbZAnruqc9F26QmbOm9pw=
+github.com/openshift/machine-api-operator v0.2.1-0.20210505133115-b7ef098180db h1:uxSkm3BCC6jkrygfCxjm0iEJqJvNL8zDTXWQv2gmyZI=
+github.com/openshift/machine-api-operator v0.2.1-0.20210505133115-b7ef098180db/go.mod h1:DFZBMPtC2TYZH5NE9+2JQIpbZAnruqc9F26QmbOm9pw=
github.com/openshift/machine-config-operator v0.0.0/go.mod h1:4IzikyGmUVQwlohScKeaAr5n2YzcWXkZvTMGGxDcU2Q=
-github.com/openshift/origin v0.0.0-20160503220234-8f127d736703/go.mod h1:0Rox5r9C8aQn6j1oAOQ0c1uC86mYbUFObzjBRvUKHII=
github.com/openshift/prom-label-proxy v0.1.1-0.20191016113035-b8153a7f39f1/go.mod h1:p5MuxzsYP1JPsNGwtjtcgRHHlGziCJJfztff91nNixw=
github.com/openshift/terraform-provider-aws v1.60.1-0.20200630224953-76d1fb4e5699/go.mod h1:0U3OgA2uDYSc7gNkdWA92+/BxWXwuYhWqqZ4UhM1RCw=
-github.com/openshift/terraform-provider-azurerm v1.40.1-0.20200707062554-97ea089cc12a/go.mod h1:9VGDn8x+Pz/j5vQ8nseuH+YsKyxpGYx+faT9b9fqCWQ=
-github.com/opentracing-contrib/go-stdlib v0.0.0-20190519235532-cf7a6c988dc9/go.mod h1:PLldrQSroqzH70Xl+1DQcGnefIbqsKR7UDaiux3zV+w=
+github.com/openshift/terraform-provider-azurerm v1.44.1-0.20210224232508-7509319df0f4/go.mod h1:MohWawSEwkGnsTTEW/U/sPVxsgQVHBNg2LsqQPbMa/U=
+github.com/openshift/terraform-provider-ibm v1.26.2-openshift-2/go.mod h1:LnGKkV2HJUeJrIMMPK+/Ka6F+5JIy45mbEj9VpoHHqc=
+github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis=
github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74=
github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o=
github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o=
+github.com/openzipkin-contrib/zipkin-go-opentracing v0.4.5/go.mod h1:/wsWhb9smxSfWAKL3wpBW7V8scJMt8N8gnaMCS9E/cA=
github.com/openzipkin/zipkin-go v0.1.1/go.mod h1:NtoC/o8u3JlF1lSlyPNswIbeQH9bJTmOf0Erfk+hxe8=
github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw=
-github.com/operator-framework/api v0.1.1/go.mod h1:yzNYR7qyJqRGOOp+bT6Z/iYSbSPNxeh3Si93Gx/3OBY=
-github.com/operator-framework/operator-lifecycle-manager v0.0.0-20200321030439-57b580e57e88/go.mod h1:7Ut8p9jJ8C6RZyyhZfZypmlibCIJwK5Wcc+WZDgLkOA=
-github.com/operator-framework/operator-registry v1.5.3/go.mod h1:agrQlkWOo1q8U1SAaLSS2WQ+Z9vswNT2M2HFib9iuLY=
-github.com/operator-framework/operator-registry v1.6.1/go.mod h1:sx4wWMiZtYhlUiaKscg3QQUPPM/c1bkrAs4n4KipDb4=
-github.com/operator-framework/operator-registry v1.6.2-0.20200330184612-11867930adb5/go.mod h1:SHff373z8asEkPo6aWpN0qId4Y/feQTjZxRF8PRhti8=
+github.com/openzipkin/zipkin-go v0.2.1/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4=
+github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4=
github.com/operator-framework/operator-sdk v0.5.1-0.20190301204940-c2efe6f74e7b/go.mod h1:iVyukRkam5JZa8AnjYf+/G3rk7JI1+M6GsU0sq0B9NA=
-github.com/operator-framework/operator-sdk v0.17.0/go.mod h1:wmYi08aoUmtgfoUamURmssI4dkdFGNtSI1Egj+ZfBnk=
github.com/oracle/oci-go-sdk v7.0.0+incompatible/go.mod h1:VQb79nF8Z2cwLkLS35ukwStZIg5F66tcBccjip/j888=
github.com/ory/dockertest v3.3.4+incompatible/go.mod h1:1vX4m9wsvi00u5bseYwXaSnhNrne+V0E6LAcBILJdPs=
-github.com/otiai10/copy v1.0.1/go.mod h1:8bMCJrAqOtN/d9oyh5HR7HhLQMvcGMpGdwRDYsfOCHc=
-github.com/otiai10/copy v1.0.2/go.mod h1:c7RpqBkwMom4bYTSkLSym4VSJz/XtncWRAj/J4PEIMY=
-github.com/otiai10/curr v0.0.0-20150429015615-9b4961190c95/go.mod h1:9qAhocn7zKJG+0mI8eUu6xqkFDYS2kb2saOteoSB3cE=
-github.com/otiai10/curr v0.0.0-20190513014714-f5a3d24e5776/go.mod h1:3HNVkVOU7vZeFXocWuvtcS0XSFLcf2XUSDHkq9t1jU4=
-github.com/otiai10/mint v1.2.3/go.mod h1:YnfyPNhBvnY8bW4SGQHCs/aAFhkgySlMZbrF5U0bOVw=
-github.com/otiai10/mint v1.2.4/go.mod h1:d+b7n/0R3tdyUYYylALXpWQ/kTN+QobSq/4SRGBkR3M=
-github.com/otiai10/mint v1.3.0/go.mod h1:F5AjcsTsWUqX+Na9fpHb52P8pcRX2CI6A3ctIT91xUo=
-github.com/ovirt/go-ovirt v0.0.0-20200428093010-9bcc4fd4e6c0/go.mod h1:fLDxPk1Sf64DBYtwIYxrnx3gPZ1q0xPdWdI1y9vxUaw=
-github.com/ovirt/go-ovirt v0.0.0-20210112072624-e4d3b104de71 h1:rMPlu5YNQomOQ9hXQDcYTfcmFy8rlYgeDJPPl1qgqz8=
-github.com/ovirt/go-ovirt v0.0.0-20210112072624-e4d3b104de71/go.mod h1:fLDxPk1Sf64DBYtwIYxrnx3gPZ1q0xPdWdI1y9vxUaw=
-github.com/ovirt/terraform-provider-ovirt v0.4.3-0.20210118101701-cc657a8c6634/go.mod h1:LDHfgu36xGyr0tUPZpL+a7HRovpRzlcNiu0CmPcxcUI=
+github.com/ovirt/go-ovirt v0.0.0-20210308100159-ac0bcbc88d7c h1:2SbYZedeIawU8sGFnohfrdEcEMBA4V8SDouG6hly+H4=
+github.com/ovirt/go-ovirt v0.0.0-20210308100159-ac0bcbc88d7c/go.mod h1:fLDxPk1Sf64DBYtwIYxrnx3gPZ1q0xPdWdI1y9vxUaw=
+github.com/ovirt/terraform-provider-ovirt v0.99.1-0.20210628083913-78ce17b16709/go.mod h1:wnTGn9+USQJ51TMV5brymzjxUfmYmnOQZuNfYeuqky8=
github.com/oxtoacart/bpool v0.0.0-20150712133111-4e1c5567d7c2/go.mod h1:L3UMQOThbttwfYRNFOWLLVXMhk5Lkio4GGOtw5UrxS0=
github.com/packer-community/winrmcp v0.0.0-20180102160824-81144009af58/go.mod h1:f6Izs6JvFTdnRbziASagjZ2vmf55NSIkC/weStxCHqk=
github.com/packer-community/winrmcp v0.0.0-20180921211025-c76d91c1e7db/go.mod h1:f6Izs6JvFTdnRbziASagjZ2vmf55NSIkC/weStxCHqk=
+github.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIwwtUjcrb0b5/5kLM=
github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc=
github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc=
github.com/patrickmn/go-cache v2.1.0+incompatible/go.mod h1:3Qf8kWWT7OJRJbdiICTKqZju1ZixQ/KpMGzzAfe6+WQ=
+github.com/paulmach/orb v0.1.3/go.mod h1:VFlX/8C+IQ1p6FTRRKzKoOPJnvEtA5G0Veuqwbu//Vk=
github.com/pborman/uuid v0.0.0-20170612153648-e790cca94e6c/go.mod h1:VyrYX9gd7irzKovcSS6BIIEwPRkP2Wm2m9ufcdFSJ34=
github.com/pborman/uuid v0.0.0-20180906182336-adf5a7427709/go.mod h1:VyrYX9gd7irzKovcSS6BIIEwPRkP2Wm2m9ufcdFSJ34=
github.com/pborman/uuid v1.2.0 h1:J7Q5mO4ysT1dv8hyrUGHb9+ooztCXu1D8MY8DZYsu3g=
github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k=
github.com/pelletier/go-toml v1.1.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic=
github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic=
+github.com/pelletier/go-toml v1.4.0/go.mod h1:PN7xzY2wHTK0K9p34ErDQMlFxa51Fk0OUruD3k1mMwo=
+github.com/pelletier/go-toml v1.6.0/go.mod h1:5N711Q9dKgbdkxHL+MEfF31hpT7l0S0s/t2kKREewys=
+github.com/pelletier/go-toml v1.7.0/go.mod h1:vwGMzjaWMwyfHwgIBhI2YUM4fB6nL6lVAvS1LBMMhTE=
github.com/pelletier/go-toml v1.8.0 h1:Keo9qb7iRJs2voHvunFtuuYFsbWeOBh8/P9v/kVMFtw=
github.com/pelletier/go-toml v1.8.0/go.mod h1:D6yutnOGMveHEPV7VQOuvI/gXY61bv+9bAOTRnLElKs=
+github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac=
github.com/peterbourgon/diskv v2.0.1+incompatible h1:UBdAOUP5p4RWqPBg048CAvpKN+vxiaj6gdUUzhl4XmI=
github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU=
github.com/phayes/checkstyle v0.0.0-20170904204023-bfd46e6a821d h1:CdDQnGF8Nq9ocOS/xlSptM1N3BbrA6/kmaep5ggwaIA=
github.com/phayes/checkstyle v0.0.0-20170904204023-bfd46e6a821d/go.mod h1:3OzsM7FXDQlpCiw2j81fOmAwQLnZnLGXVKUzeKQXIAw=
-github.com/phayes/freeport v0.0.0-20180830031419-95f893ade6f2/go.mod h1:iIss55rKnNBTvrwdmkUpLnDpZoAHvWaiq5+iMmen4AE=
+github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc=
github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY=
github.com/pierrec/lz4 v2.2.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY=
github.com/pierrec/lz4 v2.2.6+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY=
+github.com/pierrec/lz4 v2.5.2+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY=
github.com/pin/tftp v2.1.0+incompatible/go.mod h1:xVpZOMCXTy+A5QMjEVN0Glwa1sUvaJhFXbr/aAxuxGY=
github.com/pkg/browser v0.0.0-20180916011732-0a3d74bf9ce4/go.mod h1:4OwLy04Bl9Ef3GJJCoec+30X3LQs/0/m4HFRt/2LUSA=
github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
-github.com/pkg/errors v0.8.1-0.20171018195549-f15c970de5b7/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
+github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA=
github.com/pkg/profile v1.3.0/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA=
github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI=
github.com/pmezard/go-difflib v0.0.0-20151028094244-d8ed2627bdf0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
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/polyfloyd/go-errorlint v0.0.0-20201006195004-351e25ade6e3 h1:Amgs0nbayPhBNGh1qPqqr2e7B2qNAcBgRjnBH/lmn8k=
+github.com/polyfloyd/go-errorlint v0.0.0-20201006195004-351e25ade6e3/go.mod h1:wi9BfjxjF/bwiZ701TzmfKu6UKC357IOAtNr0Td0Lvw=
github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI=
github.com/posener/complete v1.2.1/go.mod h1:6gapUrK/U1TAN7ciCoNRIdVC5sbdBTUh1DKN0g6uH7E=
github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s=
+github.com/posener/complete/v2 v2.0.1-alpha.12/go.mod h1://JlL91cS2JV7rOl6LVHrRqBXoBUecJu3ILQPgbJiMQ=
+github.com/posener/script v1.0.4/go.mod h1:Rg3ijooqulo05aGLyGsHoLmIOUzHUVK19WVgrYBPU/E=
github.com/pquerna/cachecontrol v0.0.0-20171018203845-0dec1b30a021/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA=
github.com/pquerna/cachecontrol v0.0.0-20180517163645-1555304b9b35/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA=
github.com/pquerna/otp v1.2.0/go.mod h1:dkJfzwRKNiegxyNb54X/3fLwhCynbMspSyWKnvi1AEg=
github.com/pquerna/otp v1.2.1-0.20191009055518-468c2dd2b58d/go.mod h1:dkJfzwRKNiegxyNb54X/3fLwhCynbMspSyWKnvi1AEg=
-github.com/prometheus/alertmanager v0.18.0/go.mod h1:WcxHBl40VSPuOaqWae6l6HpnEOVRIycEJ7i9iYkadEE=
-github.com/prometheus/alertmanager v0.20.0/go.mod h1:9g2i48FAyZW6BtbsnvHtMHQXl2aVtrORKwKVCQ+nbrg=
-github.com/prometheus/client_golang v0.0.0-20180209125602-c332b6f63c06/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
github.com/prometheus/client_golang v0.8.0/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
github.com/prometheus/client_golang v0.9.0/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
@@ -1588,59 +1643,51 @@ github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod
github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso=
github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo=
github.com/prometheus/client_golang v1.1.0/go.mod h1:I1FGZT9+L76gKKOs5djB6ezCbFQP1xR9D75/vuwEF3g=
-github.com/prometheus/client_golang v1.2.0/go.mod h1:XMU6Z2MjaRKVu/dC1qupJI9SiNkDYzz3xecMgSW/F+U=
-github.com/prometheus/client_golang v1.2.1/go.mod h1:XMU6Z2MjaRKVu/dC1qupJI9SiNkDYzz3xecMgSW/F+U=
-github.com/prometheus/client_golang v1.5.1/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU=
+github.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeDPbaTKGT+JTgUa3og=
github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M=
+github.com/prometheus/client_golang v1.9.0/go.mod h1:FqZLKOZnGdFAhOK4nqGHa7D66IdsO+O441Eve7ptJDU=
github.com/prometheus/client_golang v1.11.0 h1:HNkLOAEQMIDv/K+04rukrLx6ch7msSRwf3/SASFAGtQ=
github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0=
github.com/prometheus/client_model v0.0.0-20170216185247-6f3806018612/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
-github.com/prometheus/client_model v0.0.0-20171117100541-99fa1f4be8e5/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
+github.com/prometheus/client_model v0.1.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M=
github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
-github.com/prometheus/common v0.0.0-20180110214958-89604d197083/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro=
github.com/prometheus/common v0.0.0-20180518154759-7600349dcfe1/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro=
github.com/prometheus/common v0.0.0-20180801064454-c7de2306084e/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro=
github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro=
github.com/prometheus/common v0.0.0-20181126121408-4724e9255275/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro=
-github.com/prometheus/common v0.1.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4=
github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4=
github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4=
github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4=
github.com/prometheus/common v0.6.0/go.mod h1:eBmuwkDJBwy6iBfxCBob6t6dR6ENT/y+J+Zk0j9GMYc=
github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA=
-github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4=
github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo=
+github.com/prometheus/common v0.15.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s=
github.com/prometheus/common v0.26.0 h1:iMAkS2TDoNWnKM+Kopnx/8tnEStIfpYA0ur0xQzzhMQ=
github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc=
-github.com/prometheus/procfs v0.0.0-20180125133057-cb4147076ac7/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
github.com/prometheus/procfs v0.0.0-20180612222113-7d6f385de8be/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
github.com/prometheus/procfs v0.0.0-20180725123919-05ee40e3a273/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
github.com/prometheus/procfs v0.0.0-20181204211112-1dc9a6cbc91a/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
github.com/prometheus/procfs v0.0.0-20190227231451-bbced9601137/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA=
-github.com/prometheus/procfs v0.0.0-20190425082905-87a4384529e0/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA=
github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA=
github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA=
github.com/prometheus/procfs v0.0.3/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ=
-github.com/prometheus/procfs v0.0.5/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ=
-github.com/prometheus/procfs v0.0.6/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A=
github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A=
github.com/prometheus/procfs v0.0.11/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU=
github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU=
github.com/prometheus/procfs v0.2.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU=
github.com/prometheus/procfs v0.6.0 h1:mxy4L2jP6qMonqmq+aTtOx1ifVWUgG/TAmntgbh3xv4=
github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA=
-github.com/prometheus/prometheus v0.0.0-20180315085919-58e2a31db8de/go.mod h1:oAIUtOny2rjMX0OWN5vPR5/q/twIROJvdqnQKDdil/s=
-github.com/prometheus/prometheus v1.8.2-0.20200110114423-1e64d757f711/go.mod h1:7U90zPoLkWjEIQcy/rweQla82OCTUzxVHE51G3OhJbI=
github.com/prometheus/prometheus v2.3.2+incompatible/go.mod h1:oAIUtOny2rjMX0OWN5vPR5/q/twIROJvdqnQKDdil/s=
github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU=
github.com/prometheus/tsdb v0.8.0/go.mod h1:fSI0j+IUQrDd7+ZtR9WKIGtoYAYAJUKcKhYLG25tN4g=
+github.com/qri-io/starlib v0.4.2-0.20200213133954-ff2e8cd5ef8d/go.mod h1:7DPO4domFU579Ga6E61sB9VFNaniPVwJP5C4bBCu3wA=
github.com/quasilyte/go-consistent v0.0.0-20190521200055-c6f3937de18c/go.mod h1:5STLWrekHfjyYwxBRVRXNOSewLJ3PWfDJd1VyTS21fI=
github.com/quasilyte/go-ruleguard v0.2.0 h1:UOVMyH2EKkxIfzrULvA9n/tO+HtEhqD9mrLSWMr5FwU=
github.com/quasilyte/go-ruleguard v0.2.0/go.mod h1:2RT/tf0Ce0UDj5y243iWKosQogJd8+1G3Rs2fxmlYnw=
@@ -1648,22 +1695,18 @@ github.com/quasilyte/regex/syntax v0.0.0-20200407221936-30656e2c4a95/go.mod h1:r
github.com/quasilyte/regex/syntax v0.0.0-20200805063351-8f842688393c h1:+gtJ/Pwj2dgUGlZgTrNFqajGYKZQc7Piqus/S6DK9CE=
github.com/quasilyte/regex/syntax v0.0.0-20200805063351-8f842688393c/go.mod h1:rlzQ04UMyJXu/aOvhd8qT+hvDrFpiwqp8MRXDY9szc0=
github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4=
+github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4=
github.com/remyoudompheng/bigfft v0.0.0-20170806203942-52369c62f446/go.mod h1:uYEyJGbgTkfkS4+E/PavXkNJcbFIpEtjt2B0KDQ5+9M=
github.com/rickb777/date v1.12.5-0.20200422084442-6300e543c4d9/go.mod h1:L8WrssTzvgYw34/Ppa0JpJfI7KKXZ2cVGI6Djt0brUU=
github.com/rickb777/plural v1.2.0/go.mod h1:UdpyWFCGbo3mvK3f/PfZOAOrkjzJlYN/sD46XNWJ+Es=
-github.com/robfig/cron v0.0.0-20170526150127-736158dc09e1/go.mod h1:JGuDeoQd7Z6yL4zQhZ3OPEVHB7fL6Ka6skscFHfmt2k=
github.com/robfig/cron v1.2.0/go.mod h1:JGuDeoQd7Z6yL4zQhZ3OPEVHB7fL6Ka6skscFHfmt2k=
github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg=
-github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ=
github.com/rogpeppe/go-internal v1.1.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
+github.com/rogpeppe/go-internal v1.2.2/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
-github.com/rogpeppe/go-internal v1.3.2/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc=
-github.com/rogpeppe/go-internal v1.5.0/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc=
github.com/rogpeppe/go-internal v1.5.2/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc=
github.com/rogpeppe/go-internal v1.6.0/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc=
github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc=
-github.com/rs/cors v1.6.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU=
-github.com/rubenv/sql-migrate v0.0.0-20191025130928-9355dd04f4b3/go.mod h1:WS0rl9eEliYI8DPnr3TOwz4439pay+qNgzJoVya/DmY=
github.com/russross/blackfriday v1.5.2 h1:HyvC0ARfnZBqnXwABFeSZHpKvJHJJfPz81GNueLj0oo=
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=
@@ -1677,16 +1720,13 @@ github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFo
github.com/ryanuber/go-glob v0.0.0-20170128012129-256dc444b735/go.mod h1:807d1WSdnB0XRJzKNil9Om6lcp/3a0v4qIHxIXzX/Yc=
github.com/ryanuber/go-glob v1.0.0/go.mod h1:807d1WSdnB0XRJzKNil9Om6lcp/3a0v4qIHxIXzX/Yc=
github.com/samuel/go-zookeeper v0.0.0-20180130194729-c4fab1ac1bec/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E=
-github.com/samuel/go-zookeeper v0.0.0-20190810000440-0ceca61e4d75/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E=
github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E=
-github.com/santhosh-tekuri/jsonschema v1.2.4/go.mod h1:TEAUOeZSmIxTTuHatJzrvARHiuO9LYd+cIxzgEHCQI4=
-github.com/satori/go.uuid v0.0.0-20160603004225-b111a074d5ef/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0=
github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0=
github.com/satori/uuid v0.0.0-20160927100844-b061729afc07/go.mod h1:B8HLsPLik/YNn6KKWVMDJ8nzCL8RP5WyfsnmvnAEwIU=
github.com/satori/uuid v1.2.0/go.mod h1:B8HLsPLik/YNn6KKWVMDJ8nzCL8RP5WyfsnmvnAEwIU=
github.com/sclevine/agouti v3.0.0+incompatible/go.mod h1:b4WX9W9L1sfQKXeJf1mUTLZKJ48R1S7H23Ji7oFO5Bw=
-github.com/sclevine/spec v1.2.0/go.mod h1:W4J29eT/Kzv7/b9IWLB055Z+qvVC9vt0Arko24q7p+U=
github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc=
+github.com/securego/gosec v0.0.0-20191002120514-e680875ea14d/go.mod h1:w5+eXa0mYznDkHaMCXA4XYffjlH+cy1oyKbfzJXa2Do=
github.com/securego/gosec v0.0.0-20200316084457-7da9f46445fd h1:qB+l4fYZsH78xORC1aqVS0zNmgkQp4rkj2rvfxQMtzc=
github.com/securego/gosec v0.0.0-20200316084457-7da9f46445fd/go.mod h1:NurAFZsWJAEZjogSwdVPlHkOZB3DOAU7gsPP8VFZCHc=
github.com/securego/gosec/v2 v2.4.0 h1:ivAoWcY5DMs9n04Abc1VkqZBO0FL0h4ShTcVsC53lCE=
@@ -1725,40 +1765,40 @@ github.com/shurcooL/reactions v0.0.0-20181006231557-f2e0b4ca5b82/go.mod h1:TCR1l
github.com/shurcooL/sanitized_anchor_name v0.0.0-20170918181015-86672fcb3f95/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc=
github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc=
github.com/shurcooL/users v0.0.0-20180125191416-49c67e49c537/go.mod h1:QJTqeLYEDaXHZDBsXlPCDqdhQuJkuw4NOtaxYe3xii4=
-github.com/shurcooL/vfsgen v0.0.0-20180825020608-02ddb050ef6b/go.mod h1:TrYk7fJVaAttu97ZZKrO9UbRa8izdowaMIZcxYMbVaw=
github.com/shurcooL/vfsgen v0.0.0-20181202132449-6a9ea43bcacd h1:ug7PpSOB5RBPK1Kg6qskGBoP3Vnj/aNYFTznWvlkGo0=
github.com/shurcooL/vfsgen v0.0.0-20181202132449-6a9ea43bcacd/go.mod h1:TrYk7fJVaAttu97ZZKrO9UbRa8izdowaMIZcxYMbVaw=
github.com/shurcooL/webdavfs v0.0.0-20170829043945-18c3829fa133/go.mod h1:hKmq5kWdCj2z2KEozexVbfEZIWiTjhE0+UjmZgPqehw=
-github.com/sirupsen/logrus v1.0.4-0.20170822132746-89742aefa4b2/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc=
github.com/sirupsen/logrus v1.0.5/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc=
github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=
+github.com/sirupsen/logrus v1.4.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=
github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q=
github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=
-github.com/sirupsen/logrus v1.5.0/go.mod h1:+F7Ogzej0PZc/94MaYx/nvG9jOFMD2osvC3s+Squfpo=
github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88=
github.com/sirupsen/logrus v1.7.0 h1:ShrD1U9pZB12TX0cVy0DtePoCH97K8EtX+mg7ZARUtM=
github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=
github.com/smartystreets/assertions v0.0.0-20180725160413-e900ae048470/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc=
+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/assertions v1.0.1 h1:voD4ITNjPL5jjBfgR/r8fPIIBrliWrWHeiJApdr3r4w=
-github.com/smartystreets/assertions v1.0.1/go.mod h1:kHHU4qYBaI3q23Pp3VPrmWhuIUrLW/7eUrw0BU5VaoM=
github.com/smartystreets/goconvey v0.0.0-20180222194500-ef6db91d284a/go.mod h1:XDJAKZRPZ1CvBcN2aX5YOUTYGHki24fSF0Iv48Ibg0s=
github.com/smartystreets/goconvey v0.0.0-20190222223459-a17d461953aa/go.mod h1:2RVY1rIf+2J2o/IM9+vPq9RzmHDSseB7FoXiSNIUsoU=
github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA=
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/softlayer/softlayer-go v1.0.3/go.mod h1:6HepcfAXROz0Rf63krk5hPZyHT6qyx2MNvYyHof7ik4=
+github.com/softlayer/xmlrpc v0.0.0-20200409220501-5f089df7cb7e/go.mod h1:fKZCUVdirrxrBpwd9wb+lSoVixvpwAu8eHzbQB2tums=
github.com/soheilhy/cmux v0.1.3/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM=
github.com/soheilhy/cmux v0.1.4 h1:0HKaf1o97UwFjHH9o5XsHUOF+tqmdA7KEzXLpiyaw0E=
github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM=
github.com/sonatard/noctx v0.0.1 h1:VC1Qhl6Oxx9vvWo3UDgrGXYCeKCe3Wbw7qAWL6FrmTY=
github.com/sonatard/noctx v0.0.1/go.mod h1:9D2D/EoULe8Yy2joDHJj7bv3sZoq9AaSb8B4lqBjiZI=
+github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY=
github.com/sourcegraph/annotate v0.0.0-20160123013949-f4cad6c6324d/go.mod h1:UdhH50NIW0fCiwBSr0co2m7BnFLdv4fQTgdqdJTHFeE=
github.com/sourcegraph/go-diff v0.5.1/go.mod h1:j2dHj3m8aZgQO8lMTcTnBcXkRRRqi34cd2MNlA9u1mE=
-github.com/sourcegraph/go-diff v0.6.0 h1:WbN9e/jD8ujU+o0vd9IFN5AEwtfB0rn/zM/AANaClqQ=
github.com/sourcegraph/go-diff v0.6.0/go.mod h1:iBszgVvyxdc8SFZ7gm69go2KDdt3ag071iBaWPF6cjs=
+github.com/sourcegraph/go-diff v0.6.1 h1:hmA1LzxW0n1c3Q4YbrFgg4P99GSnebYa3x8gr0HZqLQ=
+github.com/sourcegraph/go-diff v0.6.1/go.mod h1:iBszgVvyxdc8SFZ7gm69go2KDdt3ag071iBaWPF6cjs=
github.com/sourcegraph/syntaxhighlight v0.0.0-20170531221838-bd320f5d308e/go.mod h1:HuIsMU8RRBOtsCgI77wP899iHVBQpCmg4ErYMZB+2IA=
github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA=
-github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA=
github.com/spf13/afero v1.1.0/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ=
github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ=
github.com/spf13/afero v1.2.1/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk=
@@ -1769,11 +1809,9 @@ github.com/spf13/cast v1.2.0/go.mod h1:r2rcYCSwa1IExKTDiTfzaxqT2FNHs8hODu4LnUfgK
github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE=
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/cobra v0.0.2-0.20171109065643-2da4a54c5cee/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ=
github.com/spf13/cobra v0.0.2/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ=
github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ=
github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU=
-github.com/spf13/cobra v0.0.6/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE=
github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE=
github.com/spf13/cobra v1.1.1 h1:KfztREH0tPxJJ+geloSLaAkaPkr4ki2Er5quFV1TDo4=
github.com/spf13/cobra v1.1.1/go.mod h1:WnodtKOvamDL/PwE2M4iKs8aMDBZ5Q5klgD3qfVJQMI=
@@ -1782,7 +1820,6 @@ github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb6
github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk=
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=
-github.com/spf13/pflag v1.0.1-0.20171106142849-4c012f6dcd95/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
github.com/spf13/pflag v1.0.2/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
@@ -1799,6 +1836,8 @@ github.com/ssgreg/nlreturn/v2 v2.1.0 h1:6/s4Rc49L6Uo6RLjhWZGBpWWjfzk2yrf1nIW8m4w
github.com/ssgreg/nlreturn/v2 v2.1.0/go.mod h1:E/iiPB78hV7Szg2YfRgyIrk1AD6JVMTRkkxBiELzh2I=
github.com/stoewer/go-strcase v1.0.2/go.mod h1:eLfe5bL3qbL7ep/KafHzthxejrOF5J3xmt03uL5tzek=
github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw=
+github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw=
+github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE=
@@ -1807,6 +1846,7 @@ github.com/stretchr/objx v0.3.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoH
github.com/stretchr/testify v0.0.0-20151208002404-e3a8ff8ce365/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
github.com/stretchr/testify v1.2.1/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
+github.com/stretchr/testify v1.2.3-0.20181224173747-660f15d67dbb/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=
@@ -1816,15 +1856,15 @@ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/
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/svanharmelen/jsonapi v0.0.0-20180618144545-0c0828c3f16d/go.mod h1:BSTlc8jOjh0niykqEGVXOLXdi9o0r0kR8tCYiMvjFgw=
-github.com/syndtr/gocapability v0.0.0-20170704070218-db04d3cc01c8/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww=
github.com/tarm/serial v0.0.0-20180830185346-98f6abe2eb07/go.mod h1:kDXzergiv9cbyO7IOYJZWg1U88JhDg3PB6klq9Hg2pA=
github.com/tdakkota/asciicheck v0.0.0-20200416190851-d7f85be797a2/go.mod h1:yHp0ai0Z9gUljN3o0xMhYJnH/IcvkdTBOX2fmJ93JEM=
github.com/tdakkota/asciicheck v0.0.0-20200416200610-e657995f937b h1:HxLVTlqcHhFAz3nWUcuvpH7WuOMv8LQoCWmruLfFH2U=
github.com/tdakkota/asciicheck v0.0.0-20200416200610-e657995f937b/go.mod h1:yHp0ai0Z9gUljN3o0xMhYJnH/IcvkdTBOX2fmJ93JEM=
github.com/tencentcloud/tencentcloud-sdk-go v3.0.82+incompatible/go.mod h1:0PfYow01SHPMhKY31xa+EFz2RStxIqj6JFAJS+IkCi4=
github.com/tencentyun/cos-go-sdk-v5 v0.0.0-20190808065407-f07404cefc8c/go.mod h1:wk2XFUg6egk4tSDNZtXeKfe2G6690UVyt163PuUxBZk=
-github.com/terraform-provider-openstack/terraform-provider-openstack v1.33.0/go.mod h1:NA2Iaq+p8yIzeHAY9DHEedL/SqrT0AInYP9GTqVLe1k=
+github.com/terraform-provider-openstack/terraform-provider-openstack v1.37.0/go.mod h1:tPCEc/DdR9fVX9rmcJiqa85oTG7BUb5Xc0bSY/aOTf8=
github.com/terraform-providers/terraform-provider-azuread v0.9.0/go.mod h1:sSDzB/8CD639+yWo5lZf+NJvGSYQBSS6z+GoET9IrzE=
+github.com/terraform-providers/terraform-provider-azurestack v0.10.0/go.mod h1:J44/RLpDdRgyd8o6rI2e9SSnuaTlLA3BeTSIKB09i/8=
github.com/terraform-providers/terraform-provider-google v1.20.1-0.20200623174414-27107f2ee160/go.mod h1:QxehqxV8Swl+O2JXJUdS6orHYJXWUEr4HFfYH5JV9ew=
github.com/terraform-providers/terraform-provider-ignition v1.2.1/go.mod h1:tUlGVBhkz+z79iffnt7vKISS199MdPd85+l6SNpoS/s=
github.com/terraform-providers/terraform-provider-local v1.4.0/go.mod h1:nbnWkAjiiG0FHlsfYYMRfBwvDbo6eLjorQs/mmRGi14=
@@ -1833,12 +1873,10 @@ github.com/terraform-providers/terraform-provider-openstack v1.15.0/go.mod h1:2a
github.com/terraform-providers/terraform-provider-random v0.0.0-20190925200408-30dac3233094/go.mod h1:F4KE9YftuJyMiBth4W1kCrsyOHndtTjAmZ+ZzjqWY+4=
github.com/terraform-providers/terraform-provider-random v1.3.2-0.20190925210718-83518d96ae4f/go.mod h1:F4KE9YftuJyMiBth4W1kCrsyOHndtTjAmZ+ZzjqWY+4=
github.com/terraform-providers/terraform-provider-template v1.0.0/go.mod h1:/J+B8me5DCMa0rEBH5ic2aKPjhtpWNeScmxFJWxB1EU=
-github.com/terraform-providers/terraform-provider-vsphere v1.16.2/go.mod h1:yTPDOvhy5A/PX5z/sKq0FthWz1m38QKRW+P+SJDYbeo=
github.com/tetafro/godot v0.3.3/go.mod h1:pT6/T8+h6//L/LwQcFc4C0xpfy1euZwzS1sHdrFCms0=
-github.com/tetafro/godot v0.4.8 h1:h61+hQraWhdI6WYqMwAwZYCE5yxL6a9/Orw4REbabSU=
github.com/tetafro/godot v0.4.8/go.mod h1:/7NLHhv08H1+8DNj0MElpAACw1ajsCuf3TKNQxA5S+0=
-github.com/thanos-io/thanos v0.11.0/go.mod h1:N/Yes7J68KqvmY+xM6J5CJqEvWIvKSR5sqGtmuD6wDc=
-github.com/tidwall/pretty v0.0.0-20180105212114-65a9db5fad51/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk=
+github.com/tetafro/godot v0.4.9 h1:dSOiuasshpevY73eeI3+zaqFnXSBKJ3mvxbyhh54VRo=
+github.com/tetafro/godot v0.4.9/go.mod h1:/7NLHhv08H1+8DNj0MElpAACw1ajsCuf3TKNQxA5S+0=
github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk=
github.com/timakin/bodyclose v0.0.0-20190721030226-87058b9bfcec/go.mod h1:Qimiffbc6q9tBWlVV6x0P9sat/ao1xEkREYPPj9hphk=
github.com/timakin/bodyclose v0.0.0-20190930140734-f7f2e9bca95e/go.mod h1:Qimiffbc6q9tBWlVV6x0P9sat/ao1xEkREYPPj9hphk=
@@ -1848,13 +1886,13 @@ github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1
github.com/tmc/grpc-websocket-proxy v0.0.0-20171017195756-830351dc03c6/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U=
github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5 h1:LnC5Kc/wtumK+WB441p7ynQJzVuNRJiqddSIE3IlSEQ=
github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U=
-github.com/tombuildsstuff/giovanni v0.10.0/go.mod h1:WwPhFP2+WnhJzvPYDnsyBab2wOIksMX6xm+Tg+jVvKw=
+github.com/tomarrell/wrapcheck v0.0.0-20200807122107-df9e8bcb914d h1:3EZyvNUMsGD1QA8cu0STNn1L7I77rvhf2IhOcHYQhSw=
+github.com/tomarrell/wrapcheck v0.0.0-20200807122107-df9e8bcb914d/go.mod h1:yiFB6fFoV7saXirUGfuK+cPtUh4NX/Hf5y2WC2lehu0=
github.com/tombuildsstuff/giovanni v0.12.0/go.mod h1:qJ5dpiYWkRsuOSXO8wHbee7+wElkLNfWVolcf59N84E=
+github.com/tombuildsstuff/giovanni v0.15.1/go.mod h1:0TZugJPEtqzPlMpuJHYfXY6Dq2uLPrXf98D2XQSxNbA=
github.com/tommy-muehle/go-mnd v1.3.1-0.20200224220436-e6f9a994e8fa h1:RC4maTWLKKwb7p1cnoygsbKIgNlJqSYBeAFON3Ar8As=
github.com/tommy-muehle/go-mnd v1.3.1-0.20200224220436-e6f9a994e8fa/go.mod h1:dSUh0FtTP8VhvkL1S+gUR1OKd9ZnSaozuI6r3m6wOig=
github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM=
-github.com/uber/jaeger-client-go v2.20.1+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk=
-github.com/uber/jaeger-lib v2.2.0+incompatible/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6+uUTzImX/AauajbLI56U=
github.com/ugorji/go v0.0.0-20180813092308-00b869d2f4a5/go.mod h1:hnLbHMwcvSihnDhEfx2/BzKp2xb0Y+ErdfYcrs9tkJQ=
github.com/ugorji/go v1.1.2/go.mod h1:hnLbHMwcvSihnDhEfx2/BzKp2xb0Y+ErdfYcrs9tkJQ=
github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc=
@@ -1867,16 +1905,20 @@ github.com/ultraware/funlen v0.0.3 h1:5ylVWm8wsNwH5aWo9438pwvsK0QiqVuUrt9bn7S/iL
github.com/ultraware/funlen v0.0.3/go.mod h1:Dp4UiAus7Wdb9KUZsYWZEWiRzGuM2kXM1lPbfaF6xhA=
github.com/ultraware/whitespace v0.0.4 h1:If7Va4cM03mpgrNH9k49/VOicWpGoG70XPBFFODYDsg=
github.com/ultraware/whitespace v0.0.4/go.mod h1:aVMh/gQve5Maj9hQ/hg+F75lr/X5A89uZnzAmWSineA=
-github.com/urfave/cli v0.0.0-20171014202726-7bc6a0acffa5/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA=
github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA=
+github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0=
+github.com/urfave/cli v1.22.2/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0=
+github.com/uudashr/gocognit v0.0.0-20190926065955-1655d0de0517/go.mod h1:j44Ayx2KW4+oB6SWMv8KsmHzZrOInQav7D3cQMJ5JUM=
github.com/uudashr/gocognit v1.0.1 h1:MoG2fZ0b/Eo7NXoIwCVFLG5JED3qgQz5/NEE+rOsjPs=
github.com/uudashr/gocognit v1.0.1/go.mod h1:j44Ayx2KW4+oB6SWMv8KsmHzZrOInQav7D3cQMJ5JUM=
github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc=
github.com/valyala/fasthttp v1.2.0/go.mod h1:4vX61m6KN+xDduDNwXrhIAVZaZaZiQ1luJk8LWSxF3s=
github.com/valyala/fasthttp v1.15.1/go.mod h1:YOKImeEosDdBPnxc0gy7INqi3m1zK6A+xl6TwOBhHCA=
+github.com/valyala/fasthttp v1.16.0/go.mod h1:YOKImeEosDdBPnxc0gy7INqi3m1zK6A+xl6TwOBhHCA=
github.com/valyala/quicktemplate v1.1.1/go.mod h1:EH+4AkTd43SvgIbQHYu59/cJyxDoOVRUAfrukLPuGJ4=
github.com/valyala/quicktemplate v1.2.0/go.mod h1:EH+4AkTd43SvgIbQHYu59/cJyxDoOVRUAfrukLPuGJ4=
github.com/valyala/quicktemplate v1.6.2/go.mod h1:mtEJpQtUiBV0SHhMX6RtiJtqxncgrfmjcUy5T68X8TM=
+github.com/valyala/quicktemplate v1.6.3/go.mod h1:fwPzK2fHuYEODzJ9pkw0ipCPNHZ2tD5KW4lOuSdPKzY=
github.com/valyala/tcplisten v0.0.0-20161114210144-ceec8f93295a/go.mod h1:v3UYOV9WzVtRmSR+PDvWpU/qWl4Wa5LApYYX4ZtKbio=
github.com/vektah/gqlparser v1.1.2/go.mod h1:1ycwN7Ij5njmMkPPAOaRFY4rET2Enx7IkVv3vaXspKw=
github.com/vincent-petithory/dataurl v0.0.0-20160330182126-9a301d65acbb/go.mod h1:FHafX5vmDzyP+1CQATJn7WFKc9CvnvxyvZy6I1MrG/U=
@@ -1888,36 +1930,34 @@ github.com/vmihailenco/msgpack v4.0.1+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6Ac
github.com/vmihailenco/msgpack v4.0.4+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk=
github.com/vmihailenco/msgpack/v4 v4.3.12/go.mod h1:gborTTJjAo/GWTqqRjrLCn9pgNN+NXzzngzBKDPIqw4=
github.com/vmihailenco/tagparser v0.1.1/go.mod h1:OeAg3pn3UbLjkWt+rN9oFYB6u/cQgqMEUPoW2WPyhdI=
-github.com/vmware/govmomi v0.22.1/go.mod h1:Y+Wq4lst78L85Ge/F8+ORXIWiKYqaro1vhAulACy9Lc=
-github.com/vmware/govmomi v0.22.2 h1:hmLv4f+RMTTseqtJRijjOWzwELiaLMIoHv2D6H3bF4I=
+github.com/vmware/govmomi v0.22.2-0.20200523220130-61b30e20be49/go.mod h1:Y+Wq4lst78L85Ge/F8+ORXIWiKYqaro1vhAulACy9Lc=
github.com/vmware/govmomi v0.22.2/go.mod h1:Y+Wq4lst78L85Ge/F8+ORXIWiKYqaro1vhAulACy9Lc=
+github.com/vmware/govmomi v0.24.0 h1:G7YFF6unMTG3OY25Dh278fsomVTKs46m2ENlEFSbmbs=
+github.com/vmware/govmomi v0.24.0/go.mod h1:Y+Wq4lst78L85Ge/F8+ORXIWiKYqaro1vhAulACy9Lc=
github.com/vmware/vmw-guestinfo v0.0.0-20170707015358-25eff159a728/go.mod h1:x9oS4Wk2s2u4tS29nEaDLdzvuHdB19CvSGJjPgkZJNk=
github.com/vmware/vmw-ovflib v0.0.0-20170608004843-1f217b9dc714/go.mod h1:jiPk45kn7klhByRvUq5i2vo1RtHKBHj+iWGFpxbXuuI=
-github.com/xanzy/go-gitlab v0.15.0/go.mod h1:8zdQa/ri1dfn8eS3Ir1SyfvOKlw7WBJ8DVThkpGiXrs=
github.com/xanzy/ssh-agent v0.2.1/go.mod h1:mLlQY/MoOhWBj+gOGMQkOeiEvkx+8pJSI+0Bx9h2kr4=
+github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI=
+github.com/xdg-go/scram v1.0.2/go.mod h1:1WAq6h33pAW+iRreB34OORO2Nf7qel3VV3fjBj+hCSs=
+github.com/xdg-go/stringprep v1.0.2/go.mod h1:8F9zXuvzgwmyT5DUm4GUfZGDdT3W+LCvS6+da4O5kxM=
github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c/go.mod h1:lB8K/P019DLNhemzwFU4jHLhdvlE6uDZjXFejJXr49I=
+github.com/xdg/stringprep v0.0.0-20180714160509-73f8eece6fdc/go.mod h1:Jhud4/sHMO4oL310DaZAKk9ZaJ08SJfe+sJh0HrGL1Y=
github.com/xdg/stringprep v1.0.0/go.mod h1:Jhud4/sHMO4oL310DaZAKk9ZaJ08SJfe+sJh0HrGL1Y=
-github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU=
-github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ=
-github.com/xeipuuv/gojsonschema v0.0.0-20180618132009-1d523034197f/go.mod h1:5yf86TLmAcydyeJq5YvxkGPE2fm/u4myDekKRoLuqhs=
-github.com/xeipuuv/gojsonschema v1.1.0/go.mod h1:5yf86TLmAcydyeJq5YvxkGPE2fm/u4myDekKRoLuqhs=
github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8/go.mod h1:HUYIGzjTL3rfEspMxjDjgmT5uz5wzYJKVo23qUhYTos=
github.com/xiang90/probing v0.0.0-20160813154853-07dd2e8dfe18/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU=
github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2 h1:eY9dn8+vbi4tKz5Qo6v2eYzo7kUS51QINcR5jNpbZS8=
github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU=
github.com/xlab/handysort v0.0.0-20150421192137-fb3537ed64a1/go.mod h1:QcJo0QPSfTONNIgpN5RA8prR7fF8nkF6cTWTcNerRO8=
github.com/xlab/treeprint v0.0.0-20161029104018-1d6e34225557/go.mod h1:ce1O1j6UtZfjr22oyGxGLbauSBp2YVXpARAosm7dHBg=
-github.com/xlab/treeprint v0.0.0-20180616005107-d6fb6747feb6/go.mod h1:ce1O1j6UtZfjr22oyGxGLbauSBp2YVXpARAosm7dHBg=
github.com/xlab/treeprint v0.0.0-20181112141820-a009c3971eca h1:1CFlNzQhALwjS9mBAUkycX616GzgsuYUOCHA5+HSlXI=
github.com/xlab/treeprint v0.0.0-20181112141820-a009c3971eca/go.mod h1:ce1O1j6UtZfjr22oyGxGLbauSBp2YVXpARAosm7dHBg=
github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q=
+github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d/go.mod h1:rHwXgn7JulP+udvsHwJoVG1YGAP6VLg4y9I5dyZdqmA=
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/yvasiyarov/go-metrics v0.0.0-20140926110328-57bccd1ccd43/go.mod h1:aX5oPXxHm3bOH+xeAttToC8pqch2ScQN/JoXYupl6xs=
-github.com/yvasiyarov/gorelic v0.0.0-20141212073537-a9bba5b9ab50/go.mod h1:NUSPSUX/bi6SeDMUh6brw0nXpxHnc96TguQh0+r/ssA=
-github.com/yvasiyarov/newrelic_platform_go v0.0.0-20140908184405-b21fdbd4370f/go.mod h1:GlGEuHIJweS1mbCqG+7vt2nvWLzLLnRHbXz5JKd/Qbg=
+github.com/yujunz/go-getter v1.4.1-lite/go.mod h1:sbmqxXjyLunH1PkF3n7zSlnVeMvmYUuIl9ZVs/7NyCc=
github.com/zclconf/go-cty v1.0.0/go.mod h1:xnAOWiHeOqg2nWS62VtQ7pbOu17FtxJNW8RLEih+O3s=
github.com/zclconf/go-cty v1.1.0/go.mod h1:xnAOWiHeOqg2nWS62VtQ7pbOu17FtxJNW8RLEih+O3s=
github.com/zclconf/go-cty v1.1.1/go.mod h1:xnAOWiHeOqg2nWS62VtQ7pbOu17FtxJNW8RLEih+O3s=
@@ -1928,12 +1968,6 @@ github.com/zclconf/go-cty v1.5.1/go.mod h1:nHzOclRkoj++EU9ZjSrZvRG0BXIWt8c7loYc0
github.com/zclconf/go-cty v1.6.1/go.mod h1:VDR4+I79ubFBGm1uJac1226K5yANQFHeauxPBoP54+o=
github.com/zclconf/go-cty-yaml v1.0.1/go.mod h1:IP3Ylp0wQpYm50IHK8OZWKMu6sPJIUgKa8XhiVHura0=
github.com/zclconf/go-cty-yaml v1.0.2/go.mod h1:IP3Ylp0wQpYm50IHK8OZWKMu6sPJIUgKa8XhiVHura0=
-github.com/ziutek/mymysql v1.5.4/go.mod h1:LMSpPZ6DbqWFxNCHW77HeMg9I646SAhApZ/wKdgO/C0=
-gitlab.com/nyarla/go-crypt v0.0.0-20160106005555-d9a5dc2b789b/go.mod h1:T3BPAOm2cqquPa0MKWeNkmOM5RQsRhkrwMWonFMN7fE=
-go.elastic.co/apm v1.5.0/go.mod h1:OdB9sPtM6Vt7oz3VXt7+KR96i9li74qrxBGHTQygFvk=
-go.elastic.co/apm/module/apmhttp v1.5.0/go.mod h1:1FbmNuyD3ddauwzgVwFB0fqY6KbZt3JkV187tGCYYhY=
-go.elastic.co/apm/module/apmot v1.5.0/go.mod h1:d2KYwhJParTpyw2WnTNy8geNlHKKFX+4oK3YLlsesWE=
-go.elastic.co/fastjson v1.0.0/go.mod h1:PmeUOMMtLHQr9ZS9J9owrAVg0FkaZDRZJEFTTGHtchs=
go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU=
go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU=
go.etcd.io/bbolt v1.3.5 h1:XAzx9gjCb0Rxj7EoqcClPD1d5ZBxZJk0jbuoPHenBt0=
@@ -1944,9 +1978,14 @@ go.etcd.io/etcd v0.5.0-alpha.5.0.20200819165624-17cef6e3e9d5/go.mod h1:skWido08r
go.etcd.io/etcd v0.5.0-alpha.5.0.20200910180754-dd1b699fc489 h1:1JFLBqwIgdyHN1ZtgjTBwO+blA6gVOmZurpiMEsETKo=
go.etcd.io/etcd v0.5.0-alpha.5.0.20200910180754-dd1b699fc489/go.mod h1:yVHk9ub3CSBatqGNg7GRmsnfLWtoW60w4eDYfh7vHDg=
go.mongodb.org/mongo-driver v1.0.3/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM=
-go.mongodb.org/mongo-driver v1.1.0/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM=
go.mongodb.org/mongo-driver v1.1.1/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM=
go.mongodb.org/mongo-driver v1.1.2/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM=
+go.mongodb.org/mongo-driver v1.3.0/go.mod h1:MSWZXKOynuguX+JSvwP8i+58jYCXxbia8HS3gZBapIE=
+go.mongodb.org/mongo-driver v1.3.4/go.mod h1:MSWZXKOynuguX+JSvwP8i+58jYCXxbia8HS3gZBapIE=
+go.mongodb.org/mongo-driver v1.4.2/go.mod h1:WcMNYLx/IlOxLe6JRJiv2uXuCz6zBLndR4SoGjYphSc=
+go.mongodb.org/mongo-driver v1.4.3/go.mod h1:WcMNYLx/IlOxLe6JRJiv2uXuCz6zBLndR4SoGjYphSc=
+go.mongodb.org/mongo-driver v1.4.4/go.mod h1:WcMNYLx/IlOxLe6JRJiv2uXuCz6zBLndR4SoGjYphSc=
+go.mongodb.org/mongo-driver v1.5.1/go.mod h1:gRXCHX4Jo7J0IJ1oDQyUxF7jfy19UfxniMS4xxMmUqw=
go.opencensus.io v0.18.0/go.mod h1:vKdFvxhtzZ9onBp9VKHK8z/sRpBMnKAsufL7wlDrCOA=
go.opencensus.io v0.19.2/go.mod h1:NO/8qkisMZLZ1FCsKNqtJPwc8/TaclWyY0B6wcYNg9M=
go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk=
@@ -1955,8 +1994,10 @@ 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 h1:LYy1Hy3MJdrCdMwwzxA/dRok4ejH+RwNGbuoD9fCjto=
go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
+go.opencensus.io v0.22.5 h1:dntmOdLpSpHlVqbW5Eay97DelsZHe+55D+xC6i0dDS0=
+go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk=
+go.starlark.net v0.0.0-20190528202925-30ae18b8564f/go.mod h1:c1/X6cHgvdXj6pUlmWKMkuqRnW4K8x2vwt6JAaaircg=
go.starlark.net v0.0.0-20200306205701-8dd3e2ee1dd5 h1:+FNtrFTmVw0YZGpBGX56XDee331t6JAXeK2bcyhLOOc=
go.starlark.net v0.0.0-20200306205701-8dd3e2ee1dd5/go.mod h1:nmDLcffg48OtT/PSW0Hg7FvpRQsQh5OSqIylirxKC7o=
go.uber.org/atomic v0.0.0-20181018215023-8dc6146f7569/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
@@ -1966,11 +2007,11 @@ go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ=
go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ=
go.uber.org/atomic v1.7.0 h1:ADUqmZGgLDDfbSL9ZmPxKTybcoEYHgpYfELNoN+7hsw=
go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=
-go.uber.org/automaxprocs v1.2.0/go.mod h1:YfO3fm683kQpzETxlTGZhGIVmXAhaw3gxeBADbpZtnU=
go.uber.org/goleak v1.1.10 h1:z+mqJhf6ss6BSfSM671tgKyZBFPTTJM+HLxnhPC3wu0=
go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A=
go.uber.org/multierr v0.0.0-20180122172545-ddea229ff1df/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0=
go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0=
+go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4=
go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU=
go.uber.org/multierr v1.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4=
go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU=
@@ -1979,20 +2020,20 @@ go.uber.org/zap v0.0.0-20180814183419-67bc79d13d15/go.mod h1:vwi/ZaCAaUcBkycHslx
go.uber.org/zap v1.8.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
go.uber.org/zap v1.9.1/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
-go.uber.org/zap v1.14.1/go.mod h1:Mb2vm2krFEG5DV0W9qcHBYFtp/Wku1cvYaqPsS/WYfc=
+go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM=
+go.uber.org/zap v1.15.0/go.mod h1:Mb2vm2krFEG5DV0W9qcHBYFtp/Wku1cvYaqPsS/WYfc=
+go.uber.org/zap v1.16.0/go.mod h1:MA8QOfq0BHJwdXa996Y4dYkAqRKB8/1K1QMMZVaNZjQ=
go.uber.org/zap v1.17.0 h1:MTjgFu6ZLKvY6Pvaqk97GlxNBuMpV4Hy/3P6tRGlI2U=
go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo=
go4.org v0.0.0-20180809161055-417644f6feb5/go.mod h1:MkTOUMDaeVYJUOUsaDXIhWPZYa1yOyC1qaOBpL57BhE=
go4.org v0.0.0-20191010144846-132d2879e1e9/go.mod h1:MkTOUMDaeVYJUOUsaDXIhWPZYa1yOyC1qaOBpL57BhE=
golang.org/x/build v0.0.0-20190111050920-041ab4dc3f9d/go.mod h1:OWs+y06UdEOHN4y+MfF/py+xQ/tYqIWW03b70/CG9Rw=
golang.org/x/build v0.0.0-20190314133821-5284462c4bec/go.mod h1:atTaCNAy0f16Ah5aV1gMSwgiKVHwu/JncqDpuRr7lS4=
-golang.org/x/crypto v0.0.0-20171113213409-9f005a07e0d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/crypto v0.0.0-20180608092829-8ac0e0d97ce4/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/crypto v0.0.0-20180820150726-614d502a4dac/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/crypto v0.0.0-20181030102418-4d3f4d9ffa16/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
-golang.org/x/crypto v0.0.0-20181112202954-3d3f9f413869/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/crypto v0.0.0-20190211182817-74369b46fc67/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/crypto v0.0.0-20190219172222-a4c6cb3142f2/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
@@ -2003,6 +2044,7 @@ golang.org/x/crypto v0.0.0-20190313024323-a1f597ede03a/go.mod h1:djNgcEr1/C05ACk
golang.org/x/crypto v0.0.0-20190320223903-b7391e95e576/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20190325154230-a5d413f7728c/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20190418165655-df01cb2cc480/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE=
+golang.org/x/crypto v0.0.0-20190422162423-af44ce270edf/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE=
golang.org/x/crypto v0.0.0-20190426145343-a29dc8fdc734/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20190513172903-22d7a77e9e5f/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
@@ -2010,26 +2052,26 @@ golang.org/x/crypto v0.0.0-20190530122614-20be4c3c3ed5/go.mod h1:yigFU9vqHzYiE8U
golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20190617133340-57b3e21c3d56/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
-golang.org/x/crypto v0.0.0-20190621222207-cc06ce4a13d4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
-golang.org/x/crypto v0.0.0-20190911031432-227b76d455e7/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY=
golang.org/x/crypto v0.0.0-20190927123631-a832865fa7ad/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
-golang.org/x/crypto v0.0.0-20191112222119-e1110fd1c708/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20191202143827-86a70503ff7e/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
-golang.org/x/crypto v0.0.0-20200128174031-69ecbb4d6d5d/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20200220183623-bac4c82f6975/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
+golang.org/x/crypto v0.0.0-20200221231518-2aa609cf4a9d/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20200302210943-78000ba7a073/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
+golang.org/x/crypto v0.0.0-20200323165209-0ec3e9974c59/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20200429183012-4b2356b1ed79/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
+golang.org/x/crypto v0.0.0-20201016220609-9e8e0b390897/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I=
-golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83 h1:/ZScEX8SfEmUGRHs0gxpqteO5nfNW6axyZbBdw9A12g=
golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I=
+golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2 h1:It14KIkyBFYkHkwZ7k45minvA9aorojkyjGk9KJ5B/w=
+golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4=
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20190125153040-c74c464bbbf2/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
@@ -2068,6 +2110,7 @@ golang.org/x/mod v0.4.0 h1:8pl+sMODzuvGJkmj2W4kZihvVb5mKm8pB/X44PIQHv8=
golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/net v0.0.0-20170114055629-f2499483f923/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20170915142106-8351a756f30f/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
+golang.org/x/net v0.0.0-20180218175443-cbe0f9307d01/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180530234432-1e491301e022/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180811021610-c39426892332/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
@@ -2076,7 +2119,6 @@ golang.org/x/net v0.0.0-20180911220305-26e67e76b6c3/go.mod h1:mL1N/T3taQHkDXs73r
golang.org/x/net v0.0.0-20181005035420-146acd28ed58/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-20181029044818-c44066c5c816/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
-golang.org/x/net v0.0.0-20181108082009-03003ca0c849/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/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-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
@@ -2088,13 +2130,11 @@ golang.org/x/net v0.0.0-20190228165749-92fc7df08ae7/go.mod h1:mL1N/T3taQHkDXs73r
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190320064053-1272bf9dcd53/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
-golang.org/x/net v0.0.0-20190424112056-4829fb13d2c6/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190502183928-7f726cade0ab/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks=
golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks=
golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
-golang.org/x/net v0.0.0-20190619014844-b5b0513f8c1b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
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=
@@ -2103,11 +2143,8 @@ golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLL
golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20190930134127-c5a3c61f89f3/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
-golang.org/x/net v0.0.0-20191002035440-2ec189313ef0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20191004110552-13f9640d40b9/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20191009170851-d66e71096ffb/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
-golang.org/x/net v0.0.0-20191028085509-fe3aa8a45271/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
-golang.org/x/net v0.0.0-20191112182307-2180aed22343/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20191126235420-ef20fe5d7933/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20191204025024-5ee1b9f4859a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
@@ -2129,10 +2166,13 @@ golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81R
golang.org/x/net v0.0.0-20200813134508-3edf25e44fcc/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
golang.org/x/net v0.0.0-20200904194848-62affa334b73/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
+golang.org/x/net v0.0.0-20201006153459-a7d1128ccaa0/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
golang.org/x/net v0.0.0-20201021035429-f5854403a974/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-20201202161906-c7110b5ffcbb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
+golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
golang.org/x/net v0.0.0-20210224082022-3d97a244fca7/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
+golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
golang.org/x/net v0.0.0-20210428140749-89ef3d95e781 h1:DzZ89McO9/gWPsQXS/FVKAlG02ZjaQ6AlZRBimEYOd0=
golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
@@ -2153,6 +2193,7 @@ golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJ
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-20190412183630-56d357773e84/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=
@@ -2171,7 +2212,6 @@ golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5h
golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
-golang.org/x/sys v0.0.0-20190102155601-82a175fd1598/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190209173611-3b5209105503/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-20190221075227-b4e8571b14e0/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
@@ -2182,22 +2222,19 @@ golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20190321052220-f7bb7a8bee54/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20190419153524-e8e3143a4f4a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20190425145619-16072639606e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20190426135247-a129542de9ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190502175342-a43fa875dd82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190509141414-a5b02f93d862/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190514135907-3a4b5fb9f71f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20190515120540-06a5c4944438/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190523142557-0e01d883c5c5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190530182044-ad28b68e88f1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20190602015325-4c4f7f33c9ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20190531175056-4c3a928424d2/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190712062909-fae7ac547cb7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190730183949-1393eb018365/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
@@ -2206,7 +2243,6 @@ golang.org/x/sys v0.0.0-20190804053845-51ab0e2deafa/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190927073244-c990c680b611/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
@@ -2214,17 +2250,13 @@ golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20191002063906-3421d5a6bb1c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20191010194322-b09406accb47/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191022100944-742c48ecaeb7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20191025021431-6c3a3bfe00ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191110163157-d32e6e3b99c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20191112214154-59a1497f0cea/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20191113165036-4c7a9d0fe056/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191128015809-6d18c012aee9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20191210023423-ac6580df4449/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20191220142924-d4481acd189f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
@@ -2232,6 +2264,7 @@ golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7w
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-20200219091948-cb0a6d8edb6c/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=
@@ -2244,19 +2277,22 @@ golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200602225109-6fdc65e7d980/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200610111108-226ff32320da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200622214017-ed371f2e16b4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200831180312-196b9ba8737a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200909081042-eff7692f9009/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20201009025420-dfb3f7c4e634/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20201018230417-eeed37f84f13/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20201112073958-5cba982894dd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20201202213521-69691e467435/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20201214210602-f9fddec55a1e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210426230700-d19ff857e887/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40 h1:JWgyZ1qgdTaF3N3oxC+MdTV7qvEEgHo3otj+HB5CM7Q=
@@ -2269,12 +2305,12 @@ golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fq
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.0.0-20170915090833-1cbadb444a80/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.20180805044716-cb6730876b98/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.1-0.20181227161524-e6919f6577db/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
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/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.6 h1:aRYxNxv6iGQlyVaZmk6ZgYEDa+Jg18DxebPSrd6bg1M=
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
@@ -2294,45 +2330,44 @@ golang.org/x/tools v0.0.0-20181030000716-a0a13e073c7b/go.mod h1:n7NCudcB/nEzxVGm
golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20181117154741-2ddaf7f79a09/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190110163146-51295c7ec13a/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
-golang.org/x/tools v0.0.0-20190118193359-16909d206f00/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190121143147-24cd39ecf745/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190125232054-d66bd3c5d5a6/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190206041539-40960b6deb8e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190221204921-83362c3779f5/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
+golang.org/x/tools v0.0.0-20190307163923-6a08e3108db3/go.mod h1:25r3+/G6/xytQM8iWZKq3Hn0kr0rgFKPUNVEL/dr3z4=
golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
golang.org/x/tools v0.0.0-20190311215038-5c2858a9cfe5/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-20190322203728-c1a832b0ad89/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
+golang.org/x/tools v0.0.0-20190329151228-23e29df326fe/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
+golang.org/x/tools v0.0.0-20190416151739-9c9e1878f421/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
+golang.org/x/tools v0.0.0-20190420181800-aa740d480789/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
-golang.org/x/tools v0.0.0-20190425222832-ad9eeb80039a/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
golang.org/x/tools v0.0.0-20190521203540-521d6ed310dd/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
+golang.org/x/tools v0.0.0-20190531172133-b3315ee88b7d/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
+golang.org/x/tools v0.0.0-20190614205625-5aca471b1d59/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
golang.org/x/tools v0.0.0-20190617190820-da514acc4774/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-20190624180213-70d37148ca0c/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
golang.org/x/tools v0.0.0-20190624222133-a101b041ded4/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-20190706070813-72ffa07ba3db/go.mod h1:jcCCGcm9btYwXyDqrUWc6MKQKKGJCWEQ3AfLSRIbEuI=
golang.org/x/tools v0.0.0-20190718200317-82a3ea8a504c/go.mod h1:jcCCGcm9btYwXyDqrUWc6MKQKKGJCWEQ3AfLSRIbEuI=
golang.org/x/tools v0.0.0-20190719005602-e377ae9d6386/go.mod h1:jcCCGcm9btYwXyDqrUWc6MKQKKGJCWEQ3AfLSRIbEuI=
-golang.org/x/tools v0.0.0-20190813034749-528a2984e271/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20190907020128-2ca718005c18/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20190909030654-5b82db07426d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20190910044552-dd2b5c81c578/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-20190918214516-5a1a30219888/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20190920225731-5eefd052ad72/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20190930201159-7c411dea38b0/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
+golang.org/x/tools v0.0.0-20191010075000-0337d82405ff/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-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
-golang.org/x/tools v0.0.0-20191030203535-5e247c9ad0a0/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
-golang.org/x/tools v0.0.0-20191111182352-50fa39b762bc/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=
@@ -2343,6 +2378,7 @@ golang.org/x/tools v0.0.0-20191203134012-c197fd4bf371/go.mod h1:b+2E5dAYhXwXZwtn
golang.org/x/tools v0.0.0-20191204011308-9611592c72f6/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-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
golang.org/x/tools v0.0.0-20200115044656-831fdb1e1868/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-20200117220505-0cba7a3a9ee9/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
@@ -2360,23 +2396,26 @@ golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjs
golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw=
golang.org/x/tools v0.0.0-20200321224714-0d839f3cf2ed/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8=
golang.org/x/tools v0.0.0-20200324003944-a576cf524670/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8=
-golang.org/x/tools v0.0.0-20200327195553-82bb89366a1e/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8=
golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8=
golang.org/x/tools v0.0.0-20200409170454-77362c5149f0/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
+golang.org/x/tools v0.0.0-20200410194907-79a7a3126eef/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
golang.org/x/tools v0.0.0-20200414032229-332987a829c3/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
golang.org/x/tools v0.0.0-20200422022333-3d57cf2e726e/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
golang.org/x/tools v0.0.0-20200426102838-f3a5411a4c3b/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
-golang.org/x/tools v0.0.0-20200430192856-2840dafb9ee1/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
golang.org/x/tools v0.0.0-20200505023115-26f46d2f7ef8/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
golang.org/x/tools v0.0.0-20200509030707-2212a7e161a5/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-20200519015757-0d0afa43d58a/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
+golang.org/x/tools v0.0.0-20200601175630-2caf76543d99/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
+golang.org/x/tools v0.0.0-20200606014950-c42cb6316fb6/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
+golang.org/x/tools v0.0.0-20200610160956-3e83d1e96d0e/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
golang.org/x/tools v0.0.0-20200616133436-c1934b75d054/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
golang.org/x/tools v0.0.0-20200616195046-dc31b401abb5/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-20200624225443-88f3c62a19ff/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
golang.org/x/tools v0.0.0-20200625211823-6506e20df31f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
golang.org/x/tools v0.0.0-20200626171337-aa94e735be7f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
golang.org/x/tools v0.0.0-20200701041122-1837592efa10/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
@@ -2389,11 +2428,16 @@ golang.org/x/tools v0.0.0-20200817023811-d00afeaade8f/go.mod h1:njjCfa9FT2d7l9Bc
golang.org/x/tools v0.0.0-20200820010801-b793a1359eac/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
golang.org/x/tools v0.0.0-20200827163409-021d7c6f1ec3/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
+golang.org/x/tools v0.0.0-20200831203904-5a2aa26beb65/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE=
golang.org/x/tools v0.0.0-20200911153331-7ad463ce66dd/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE=
+golang.org/x/tools v0.0.0-20201001104356-43ebab892c4c/go.mod h1:z6u4i615ZeAfBE4XtMziQW1fSVJXACjjbWkB/mvPzlU=
+golang.org/x/tools v0.0.0-20201002184944-ecd9fd270d5d/go.mod h1:z6u4i615ZeAfBE4XtMziQW1fSVJXACjjbWkB/mvPzlU=
+golang.org/x/tools v0.0.0-20201011145850-ed2f50202694/go.mod h1:z6u4i615ZeAfBE4XtMziQW1fSVJXACjjbWkB/mvPzlU=
+golang.org/x/tools v0.0.0-20201013201025-64a9e34f3752/go.mod h1:z6u4i615ZeAfBE4XtMziQW1fSVJXACjjbWkB/mvPzlU=
golang.org/x/tools v0.0.0-20201020123448-f5c826d1900e/go.mod h1:z6u4i615ZeAfBE4XtMziQW1fSVJXACjjbWkB/mvPzlU=
-golang.org/x/tools v0.0.0-20201202200335-bef1c476418a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
+golang.org/x/tools v0.0.0-20210107193943-4ed967dd8eff/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/tools v0.1.0 h1:po9/4sTYwZU9lPhi1tOrb4hCv3qrhiQ77LZfGa2OjwY=
golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
@@ -2402,10 +2446,9 @@ golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8T
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
gomodules.xyz/jsonpatch/v2 v2.0.1/go.mod h1:IhYNNY4jnS53ZnfE4PAmpKtDpTCj1JFXc+3mwe7XcUU=
+gomodules.xyz/jsonpatch/v2 v2.1.0/go.mod h1:IhYNNY4jnS53ZnfE4PAmpKtDpTCj1JFXc+3mwe7XcUU=
gomodules.xyz/jsonpatch/v2 v2.2.0 h1:4pT439QV83L+G9FkcCriY6EkpcK6r6bK+A5FBUMI7qY=
gomodules.xyz/jsonpatch/v2 v2.2.0/go.mod h1:WXp+iVDkoLQqPudfQ9GBlwB2eZ5DKOnjQZCYdOS8GPY=
-gomodules.xyz/jsonpatch/v3 v3.0.1/go.mod h1:CBhndykehEwTOlEfnsfJwvkFQbSN8YZFr9M+cIHAJto=
-gomodules.xyz/orderedmap v0.1.0/go.mod h1:g9/TPUCm1t2gwD3j3zfV8uylyYhVdCNSi+xCEIu7yTU=
gonum.org/v1/gonum v0.0.0-20190331200053-3d26580ed485/go.mod h1:2ltnJ7xHfj0zHS40VVPYEAAMTa3ZGguvHGBSJeRWqE0=
gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw=
gonum.org/v1/netlib v0.0.0-20190331212654-76723241ea4e/go.mod h1:kS+toOQn6AQKjmKJ7gzohV1XkqsFehRA2FbsbkopSuQ=
@@ -2415,14 +2458,12 @@ google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9Ywl
google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
google.golang.org/appengine v1.3.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
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.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 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c=
google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=
-google.golang.org/cloud v0.0.0-20151119220103-975617b05ea8/go.mod h1:0H1ncTHf11KCFhTc/+EFRbzSCOZx+VUbRMk55Yv5MYk=
google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013 h1:+kGHl1aib/qcwaRi1CbqBZ1rk19r85MNUf8HaBghugY=
google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo=
google.golang.org/grpc v1.29.1 h1:EC2SB8S04d2r73uptxphDSUG+kTKVgjRPF+N3xpxRB4=
@@ -2440,26 +2481,25 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
google.golang.org/protobuf v1.26.0 h1:bxAC2xTBsZGibn2RTntX0oH50xLsqy1OxA9tTL3p/lk=
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
-gopkg.in/AlecAivazis/survey.v1 v1.8.9-0.20200217094205-6773bdf39b7f h1:AQkMzsSzHWrgZWqGRpuRaRPDmyNibcXlpGcnQJ7HxZw=
-gopkg.in/AlecAivazis/survey.v1 v1.8.9-0.20200217094205-6773bdf39b7f/go.mod h1:CaHjv79TCgAvXMSFJSVgonHXYWxnhzI3eoHtnX5UgUo=
gopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4K+aSYdM/U=
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
gopkg.in/asn1-ber.v1 v1.0.0-20181015200546-f715ec2f112d/go.mod h1:cuepJuh7vyXfUyUwEgHQXw849cJrilpS5NeIjOWESAw=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
-gopkg.in/check.v1 v1.0.0-20141024133853-64131543e789/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
-gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU=
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
+gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b h1:QRR6H1YWRnHb4Y/HeNFCTJLFVxaq6wH4YuVdsUOr75U=
+gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw=
gopkg.in/cheggaaa/pb.v1 v1.0.27/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw=
gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
-gopkg.in/fsnotify/fsnotify.v1 v1.4.7/go.mod h1:Fyux9zXlo4rWoMSIzpn9fDAYjalPqJ/K1qJ27s+7ltE=
gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o=
gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2/go.mod h1:Xk6kEKp8OKb+X14hQBKWaSkCsqBpgog8nAV2xsGOxlo=
-gopkg.in/gorp.v1 v1.7.2/go.mod h1:Wo3h+DBQZIxATwftsglhdD/62zRFPhGhTiu5jUJmCaw=
-gopkg.in/imdario/mergo.v0 v0.3.7/go.mod h1:9qPP6AGrlC1G2PTNXko614FwGZvorN7MiBU0Eppok+U=
+gopkg.in/go-playground/assert.v1 v1.2.1/go.mod h1:9RXL0bg/zibRAgZUYszZSwO/z8Y/a8bDuhia5mkpMnE=
+gopkg.in/go-playground/validator.v9 v9.30.0/go.mod h1:+c9/zcJMFNgbLvly1L1V+PpxWdVbfP1avr/N00E2vyQ=
+gopkg.in/go-playground/validator.v9 v9.31.0/go.mod h1:+c9/zcJMFNgbLvly1L1V+PpxWdVbfP1avr/N00E2vyQ=
+gopkg.in/h2non/gock.v1 v1.0.15/go.mod h1:sX4zAkdYX1TRGJ2JY156cFspQn4yRWn6p9EMdODlynE=
gopkg.in/inf.v0 v0.9.0/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw=
gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc=
gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw=
@@ -2467,11 +2507,15 @@ gopkg.in/ini.v1 v1.42.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
gopkg.in/ini.v1 v1.61.0 h1:LBCdW4FmFYL4s/vDZD1RQYX7oAR6IjujCYgMdbHBR10=
gopkg.in/ini.v1 v1.61.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
+gopkg.in/jcmturner/aescts.v1 v1.0.1/go.mod h1:nsR8qBOg+OucoIW+WMhB3GspUQXq9XorLnQb9XtvcOo=
+gopkg.in/jcmturner/dnsutils.v1 v1.0.1/go.mod h1:m3v+5svpVOhtFAP/wSz+yzh4Mc0Fg7eRhxkJMWSIz9Q=
+gopkg.in/jcmturner/goidentity.v3 v3.0.0/go.mod h1:oG2kH0IvSYNIu80dVAyu/yoefjq1mNfM5bm88whjWx4=
+gopkg.in/jcmturner/gokrb5.v7 v7.5.0/go.mod h1:l8VISx+WGYp+Fp7KRbsiUuXTTOnxIc3Tuvyavf11/WM=
+gopkg.in/jcmturner/rpc.v1 v1.1.0/go.mod h1:YIdkC4XfD6GXbzje11McwsDuOlZQSb9W4vfLvuNnlv8=
gopkg.in/ldap.v2 v2.5.1/go.mod h1:oI0cpe/D7HRtBQl8aTg+ZmzFUAvu4lsv3eLXMLGFxWk=
gopkg.in/mgo.v2 v2.0.0-20180705113604-9856a29383ce/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA=
gopkg.in/natefinch/lumberjack.v2 v2.0.0 h1:1Lc07Kr7qY4U2YPouBjpCLxpiyxIVoxqXgkXLknAOE8=
gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k=
-gopkg.in/op/go-logging.v1 v1.0.0-20160211212156-b2cb9fa56473/go.mod h1:N1eN2tsCx0Ydtgjl4cqmbRCsY4/+z4cYDeqwZTk6zog=
gopkg.in/ory-am/dockertest.v3 v3.3.4/go.mod h1:s9mmoLkaGeAh97qygnNj4xWkiN7e1SKekYC6CovU+ek=
gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo=
gopkg.in/square/go-jose.v2 v2.2.2/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI=
@@ -2494,7 +2538,9 @@ 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-20190502103701-55513cacd4ae/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.0-20190905181640-827449938966/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
+gopkg.in/yaml.v3 v3.0.0-20200121175148-a6ecf24a6d71/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
+gopkg.in/yaml.v3 v3.0.0-20200605160147-a5ece683394c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/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=
@@ -2504,32 +2550,24 @@ gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk=
gotest.tools/v3 v3.0.3 h1:4AuOwCGf4lLR9u3YOe2awrHygurzhO/HeQ6laiA6Sx0=
gotest.tools/v3 v3.0.3/go.mod h1:Z7Lb0S5l+klDB31fvDQX8ss/FlKDxtlFlw3Oa8Ymbl8=
grpc.go4.org v0.0.0-20170609214715-11d0a25b4919/go.mod h1:77eQGdRu53HpSqPFJFmuJdjuHRquDANNeA4x7B8WQ9o=
-helm.sh/helm/v3 v3.1.0/go.mod h1:WYsFJuMASa/4XUqLyv54s0U/f3mlAaRErGmyy4z921g=
-helm.sh/helm/v3 v3.1.2/go.mod h1:WYsFJuMASa/4XUqLyv54s0U/f3mlAaRErGmyy4z921g=
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=
-honnef.co/go/tools v0.0.1-2020.1.5 h1:nI5egYTGJakVyOryqLs1cQO5dO0ksin5XXs2pspk75k=
honnef.co/go/tools v0.0.1-2020.1.5/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
+honnef.co/go/tools v0.0.1-2020.1.6 h1:W18jzjh8mfPez+AwGLxmOImucz/IFjpNlrKVnaj2YVc=
+honnef.co/go/tools v0.0.1-2020.1.6/go.mod h1:pyyisuGw24ruLjrr1ddx39WE0y9OooInRzEYLhQB2YY=
howett.net/plist v0.0.0-20181124034731-591f970eefbb/go.mod h1:vMygbs4qMhSZSc4lCUl2OEE+rDiIIJAIdR4m7MiMcm0=
k8s.io/api v0.0.0-20181115043458-b799cb063522/go.mod h1:iuAfoD4hCxJ8Onx9kaTIt30j7jUFS00AXQi6QMi99vA=
k8s.io/api v0.0.0-20190409021203-6e4e0e4f393b/go.mod h1:iuAfoD4hCxJ8Onx9kaTIt30j7jUFS00AXQi6QMi99vA=
k8s.io/api v0.0.0-20190409092523-d687e77c8ae9/go.mod h1:FQEUn50aaytlU65qqBn/w+5ugllHwrBzKm7DzbnXdzE=
k8s.io/api v0.0.0-20190620084959-7cf5895f2711/go.mod h1:TBhBqb1AWbBQbW3XRusr7n7E4v2+5ZY8r8sAMnyFC5A=
k8s.io/api v0.0.0-20190725062911-6607c48751ae/go.mod h1:1O0xzX/RAtnm7l+5VEUxZ1ysO2ghatfq/OZED4zM9kA=
-k8s.io/api v0.0.0-20190813020757-36bff7324fb7/go.mod h1:3Iy+myeAORNCLgjd/Xu9ebwN7Vh59Bw0vh9jhoX+V58=
k8s.io/api v0.0.0-20190918155943-95b840bb6a1f/go.mod h1:uWuOHnjmNrtQomJrvEBg0c0HRNyQ+8KTEERVsK0PW48=
-k8s.io/api v0.0.0-20191115095533-47f6de673b26/go.mod h1:iA/8arsvelvo4IDqIhX4IbjTEKBGgvsf2OraTuRtLFU=
k8s.io/api v0.16.4/go.mod h1:AtzMnsR45tccQss5q8RnF+W8L81DH6XwXwo/joEx9u0=
-k8s.io/api v0.16.7/go.mod h1:oUAiGRgo4t+5yqcxjOu5LoHT3wJ8JSbgczkaFYS5L7I=
k8s.io/api v0.17.0/go.mod h1:npsyOePkeP0CPwyGfXDHxvypiYMJxBWAMpQxCaJ4ZxI=
-k8s.io/api v0.17.1/go.mod h1:zxiAc5y8Ngn4fmhWUtSxuUlkfz1ixT7j9wESokELzOg=
-k8s.io/api v0.17.2/go.mod h1:BS9fjjLc4CMuqfSO8vgbHPKMt5+SF0ET6u/RVDihTo4=
-k8s.io/api v0.17.3/go.mod h1:YZ0OTkuw7ipbe305fMpIdf3GLXZKRigjtZaV5gzC2J0=
-k8s.io/api v0.17.4/go.mod h1:5qxx6vjmwUVG2nHQTKGlLts8Tbok8PzHl4vHtVFuZCA=
k8s.io/api v0.18.0-beta.2/go.mod h1:2oeNnWEqcSmaM/ibSh3t7xcIqbkGXhzZdn4ezV9T4m0=
k8s.io/api v0.18.0-rc.1/go.mod h1:ZOh6SbHjOYyaMLlWmB2+UOQKEWDpCnVEVpEyt7S2J9s=
k8s.io/api v0.18.0/go.mod h1:q2HRQkfDzHMBZL9l/y9rH63PkQl4vae0xRT+8prbrK8=
@@ -2538,26 +2576,26 @@ k8s.io/api v0.18.6/go.mod h1:eeyxr+cwCjMdLAmr2W3RyDI0VvTawSg/3RFFBEnmZGI=
k8s.io/api v0.19.0/go.mod h1:I1K45XlvTrDjmj5LoM5LuP/KYrhWbjUKT/SoPG0qTjw=
k8s.io/api v0.19.1/go.mod h1:+u/k4/K/7vp4vsfdT7dyl8Oxk1F26Md4g5F26Tu85PU=
k8s.io/api v0.19.2/go.mod h1:IQpK0zFQ1xc5iNIQPqzgoOwuFugaYHK4iCknlAQP9nI=
-k8s.io/api v0.19.4/go.mod h1:SbtJ2aHCItirzdJ36YslycFNzWADYH3tgOhvBEFtZAk=
k8s.io/api v0.20.0/go.mod h1:HyLC5l5eoS/ygQYl1BXBgFzWNlkHiAuyNAbevIn+FKg=
k8s.io/api v0.20.2/go.mod h1:d7n6Ehyzx+S+cE3VhTGfVNNqtGc/oL9DCdYYahlurV8=
+k8s.io/api v0.21.0-rc.0/go.mod h1:Dkc/ZauWJrgZhjOjeBgW89xZQiTBJA2RaBKYHXPsi2Y=
+k8s.io/api v0.21.0/go.mod h1:+YbrhBBGgsxbF6o6Kj4KJPJnBmAKuXDeS3E18bgHNVU=
+k8s.io/api v0.21.1/go.mod h1:FstGROTmsSHBarKc8bylzXih8BLNYTiS3TZcsoEDg2s=
k8s.io/api v0.21.2 h1:vz7DqmRsXTCSa6pNxXwQ1IYeAZgdIsua+DZU+o+SX3Y=
k8s.io/api v0.21.2/go.mod h1:Lv6UGJZ1rlMI1qusN8ruAp9PUBFyBwpEHAdG24vIsiU=
k8s.io/apiextensions-apiserver v0.0.0-20190409022649-727a075fdec8/go.mod h1:IxkesAMoaCRoLrPJdZNZUQp9NfZnzqaVzLhb2VEQzXE=
k8s.io/apiextensions-apiserver v0.0.0-20190918161926-8f644eb6e783/go.mod h1:xvae1SZB3E17UpV59AWc271W/Ph25N+bjPyR63X6tPY=
k8s.io/apiextensions-apiserver v0.16.4/go.mod h1:HYQwjujEkXmQNhap2C9YDdIVOSskGZ3et0Mvjcyjbto=
-k8s.io/apiextensions-apiserver v0.16.7/go.mod h1:6xYRp4trGp6eT5WZ6tPi/TB2nfWQCzwUvBlpg8iswe0=
k8s.io/apiextensions-apiserver v0.17.0/go.mod h1:XiIFUakZywkUl54fVXa7QTEHcqQz9HG55nHd1DCoHj8=
-k8s.io/apiextensions-apiserver v0.17.2/go.mod h1:4KdMpjkEjjDI2pPfBA15OscyNldHWdBCfsWMDWAmSTs=
-k8s.io/apiextensions-apiserver v0.17.3/go.mod h1:CJbCyMfkKftAd/X/V6OTHYhVn7zXnDdnkUjS1h0GTeY=
-k8s.io/apiextensions-apiserver v0.17.4/go.mod h1:rCbbbaFS/s3Qau3/1HbPlHblrWpFivoaLYccCffvQGI=
k8s.io/apiextensions-apiserver v0.18.0-beta.2/go.mod h1:Hnrg5jx8/PbxRbUoqDGxtQkULjwx8FDW4WYJaKNK+fk=
k8s.io/apiextensions-apiserver v0.18.2/go.mod h1:q3faSnRGmYimiocj6cHQ1I3WpLqmDgJFlKL37fC4ZvY=
k8s.io/apiextensions-apiserver v0.18.6/go.mod h1:lv89S7fUysXjLZO7ke783xOwVTm6lKizADfvUM/SS/M=
k8s.io/apiextensions-apiserver v0.19.0/go.mod h1:znfQxNpjqz/ZehvbfMg5N6fvBJW5Lqu5HVLTJQdP4Fs=
k8s.io/apiextensions-apiserver v0.19.2/go.mod h1:EYNjpqIAvNZe+svXVx9j4uBaVhTB4C94HkY3w058qcg=
-k8s.io/apiextensions-apiserver v0.19.4/go.mod h1:B9rpH/nu4JBCtuUp3zTTk8DEjZUupZTBEec7/2zNRYw=
+k8s.io/apiextensions-apiserver v0.20.0/go.mod h1:ZH+C33L2Bh1LY1+HphoRmN1IQVLTShVcTojivK3N9xg=
k8s.io/apiextensions-apiserver v0.20.2/go.mod h1:F6TXp389Xntt+LUq3vw6HFOLttPa0V8821ogLGwb6Zs=
+k8s.io/apiextensions-apiserver v0.21.0-rc.0/go.mod h1:ItIoMBJU1gy93Qwr/B2699r4b0VmZqAOU+15BvozxMY=
+k8s.io/apiextensions-apiserver v0.21.0/go.mod h1:gsQGNtGkc/YoDG9loKI0V+oLZM4ljRPjc/sql5tmvzc=
k8s.io/apiextensions-apiserver v0.21.2 h1:+exKMRep4pDrphEafRvpEi79wTnCFMqKf8LBtlA3yrE=
k8s.io/apiextensions-apiserver v0.21.2/go.mod h1:+Axoz5/l3AYpGLlhJDfcVQzCerVYq3K3CvDMvw6X1RA=
k8s.io/apimachinery v0.0.0-20181110190943-2a7c93004028/go.mod h1:ccL7Eh7zubPUSh9A3USN90/OzHNSVN6zxzde07TDCL0=
@@ -2565,16 +2603,10 @@ k8s.io/apimachinery v0.0.0-20190404173353-6a84e37a896d/go.mod h1:ccL7Eh7zubPUSh9
k8s.io/apimachinery v0.0.0-20190409092423-760d1845f48b/go.mod h1:FW86P8YXVLsbuplGMZeb20J3jYHscrDqw4jELaFJvRU=
k8s.io/apimachinery v0.0.0-20190612205821-1799e75a0719/go.mod h1:I4A+glKBHiTgiEjQiCCQfCAIcIMFGt291SmsvcrFzJA=
k8s.io/apimachinery v0.0.0-20190719140911-bfcf53abc9f8/go.mod h1:sBJWIJZfxLhp7mRsRyuAE/NfKTr3kXGR1iaqg8O0gJo=
-k8s.io/apimachinery v0.0.0-20190809020650-423f5d784010/go.mod h1:Waf/xTS2FGRrgXCkO5FP3XxTOWh0qLf2QhL1qFZZ/R8=
k8s.io/apimachinery v0.0.0-20190913080033-27d36303b655/go.mod h1:nL6pwRT8NgfF8TT68DBI8uEePRt89cSvoXUVqbkWHq4=
-k8s.io/apimachinery v0.0.0-20191115015347-3c7067801da2/go.mod h1:dXFS2zaQR8fyzuvRdJDHw2Aerij/yVGJSre0bZQSVJA=
k8s.io/apimachinery v0.16.4/go.mod h1:llRdnznGEAqC3DcNm6yEj472xaFVfLM7hnYofMb12tQ=
-k8s.io/apimachinery v0.16.7/go.mod h1:Xk2vD2TRRpuWYLQNM6lT9R7DSFZUYG03SarNkbGrnKE=
k8s.io/apimachinery v0.17.0/go.mod h1:b9qmWdKlLuU9EBh+06BtLcSf/Mu89rWL33naRxs1uZg=
-k8s.io/apimachinery v0.17.1/go.mod h1:b9qmWdKlLuU9EBh+06BtLcSf/Mu89rWL33naRxs1uZg=
-k8s.io/apimachinery v0.17.2/go.mod h1:b9qmWdKlLuU9EBh+06BtLcSf/Mu89rWL33naRxs1uZg=
k8s.io/apimachinery v0.17.3/go.mod h1:gxLnyZcGNdZTCLnq3fgzyg2A5BVCHTNDFrw8AmuJ+0g=
-k8s.io/apimachinery v0.17.4/go.mod h1:gxLnyZcGNdZTCLnq3fgzyg2A5BVCHTNDFrw8AmuJ+0g=
k8s.io/apimachinery v0.18.0-beta.2/go.mod h1:9SnR/e11v5IbyPCGbvJViimtJ0SwHG4nfZFjU77ftcA=
k8s.io/apimachinery v0.18.0-rc.1/go.mod h1:9SnR/e11v5IbyPCGbvJViimtJ0SwHG4nfZFjU77ftcA=
k8s.io/apimachinery v0.18.0/go.mod h1:9SnR/e11v5IbyPCGbvJViimtJ0SwHG4nfZFjU77ftcA=
@@ -2583,36 +2615,33 @@ k8s.io/apimachinery v0.18.6/go.mod h1:OaXp26zu/5J7p0f92ASynJa1pZo06YlV9fG7BoWbCk
k8s.io/apimachinery v0.19.0/go.mod h1:DnPGDnARWFvYa3pMHgSxtbZb7gpzzAZ1pTfaUNDVlmA=
k8s.io/apimachinery v0.19.1/go.mod h1:DnPGDnARWFvYa3pMHgSxtbZb7gpzzAZ1pTfaUNDVlmA=
k8s.io/apimachinery v0.19.2/go.mod h1:DnPGDnARWFvYa3pMHgSxtbZb7gpzzAZ1pTfaUNDVlmA=
-k8s.io/apimachinery v0.19.4/go.mod h1:DnPGDnARWFvYa3pMHgSxtbZb7gpzzAZ1pTfaUNDVlmA=
k8s.io/apimachinery v0.20.0/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU=
k8s.io/apimachinery v0.20.2/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU=
+k8s.io/apimachinery v0.21.0-rc.0/go.mod h1:jbreFvJo3ov9rj7eWT7+sYiRx+qZuCYXwWT1bcDswPY=
+k8s.io/apimachinery v0.21.0/go.mod h1:jbreFvJo3ov9rj7eWT7+sYiRx+qZuCYXwWT1bcDswPY=
+k8s.io/apimachinery v0.21.1/go.mod h1:jbreFvJo3ov9rj7eWT7+sYiRx+qZuCYXwWT1bcDswPY=
k8s.io/apimachinery v0.21.2 h1:vezUc/BHqWlQDnZ+XkrpXSmnANSLbpnlpwo0Lhk0gpc=
k8s.io/apimachinery v0.21.2/go.mod h1:CdTY8fU/BlvAbJ2z/8kBwimGki5Zp8/fbVuLY8gJumM=
k8s.io/apiserver v0.0.0-20190918160949-bfa5e2e684ad/go.mod h1:XPCXEwhjaFN29a8NldXA901ElnKeKLrLtREO9ZhFyhg=
k8s.io/apiserver v0.16.4/go.mod h1:kbLJOak655g6W7C+muqu1F76u9wnEycfKMqbVaXIdAc=
-k8s.io/apiserver v0.16.7/go.mod h1:/5zSatF30/L9zYfMTl55jzzOnx7r/gGv5a5wtRp8yAw=
k8s.io/apiserver v0.17.0/go.mod h1:ABM+9x/prjINN6iiffRVNCBR2Wk7uY4z+EtEGZD48cg=
-k8s.io/apiserver v0.17.2/go.mod h1:lBmw/TtQdtxvrTk0e2cgtOxHizXI+d0mmGQURIHQZlo=
-k8s.io/apiserver v0.17.3/go.mod h1:iJtsPpu1ZpEnHaNawpSV0nYTGBhhX2dUlnn7/QS7QiY=
-k8s.io/apiserver v0.17.4/go.mod h1:5ZDQ6Xr5MNBxyi3iUZXS84QOhZl+W7Oq2us/29c0j9I=
k8s.io/apiserver v0.18.0-beta.2/go.mod h1:bnblMkMoCFnIfVnVftd0SXJPzyvrk3RtaqSbblphF/A=
k8s.io/apiserver v0.18.2/go.mod h1:Xbh066NqrZO8cbsoenCwyDJ1OSi8Ag8I2lezeHxzwzw=
k8s.io/apiserver v0.18.6/go.mod h1:Zt2XvTHuaZjBz6EFYzpp+X4hTmgWGy8AthNVnTdm3Wg=
k8s.io/apiserver v0.19.0/go.mod h1:XvzqavYj73931x7FLtyagh8WibHpePJ1QwWrSJs2CLk=
k8s.io/apiserver v0.19.1/go.mod h1:iRxYIjA0X2XEyoW8KslN4gDhasfH4bWcjj6ckVeZX28=
k8s.io/apiserver v0.19.2/go.mod h1:FreAq0bJ2vtZFj9Ago/X0oNGC51GfubKK/ViOKfVAOA=
-k8s.io/apiserver v0.19.4/go.mod h1:X8WRHCR1UGZDd7HpV0QDc1h/6VbbpAeAGyxSh8yzZXw=
+k8s.io/apiserver v0.20.0/go.mod h1:6gRIWiOkvGvQt12WTYmsiYoUyYW0FXSiMdNl4m+sxY8=
k8s.io/apiserver v0.20.2/go.mod h1:2nKd93WyMhZx4Hp3RfgH2K5PhwyTrprrkWYnI7id7jA=
+k8s.io/apiserver v0.21.0-rc.0/go.mod h1:QlW7+1CZTZtAcKvJ34/n4DIb8sC93FeQpkd1KSU+Sok=
+k8s.io/apiserver v0.21.0/go.mod h1:w2YSn4/WIwYuxG5zJmcqtRdtqgW/J2JRgFAqps3bBpg=
k8s.io/apiserver v0.21.2 h1:vfGLD8biFXHzbcIEXyW3652lDwkV8tZEFJAaS2iuJlw=
k8s.io/apiserver v0.21.2/go.mod h1:lN4yBoGyiNT7SC1dmNk0ue6a5Wi6O3SWOIw91TsucQw=
-k8s.io/autoscaler v0.0.0-20190607113959-1b4f1855cb8e/go.mod h1:QEXezc9uKPT91dwqhSJq3GNI3B1HxFRQHiku9kmrsSA=
-k8s.io/cli-runtime v0.17.2/go.mod h1:aa8t9ziyQdbkuizkNLAw3qe3srSyWh9zlSB7zTqRNPI=
-k8s.io/cli-runtime v0.17.3/go.mod h1:X7idckYphH4SZflgNpOOViSxetiMj6xI0viMAjM81TA=
-k8s.io/cli-runtime v0.17.4/go.mod h1:IVW4zrKKx/8gBgNNkhiUIc7nZbVVNhc1+HcQh+PiNHc=
k8s.io/cli-runtime v0.18.0-rc.1/go.mod h1:yuKZYDG8raONmwjwIkT77lCfIuPwX+Bsp88MKYf1TlU=
k8s.io/cli-runtime v0.19.0/go.mod h1:tun9l0eUklT8IHIM0jors17KmUjcrAxn0myoBYwuNuo=
k8s.io/cli-runtime v0.19.1/go.mod h1:X6g8e4NBiG8GMsKewXsRpo36MO6xrvXa+0wCg7zO4aU=
k8s.io/cli-runtime v0.20.0/go.mod h1:C5tewU1SC1t09D7pmkk83FT4lMAw+bvMDuRxA7f0t2s=
+k8s.io/cli-runtime v0.21.0/go.mod h1:XoaHP93mGPF37MkLbjGVYqg3S1MnsFdKtiA/RZzzxOo=
k8s.io/cli-runtime v0.21.2 h1:x40XY8UqrlWYY/lYH0PwqPk0i/Jo3C/PJM2V5zYkksk=
k8s.io/cli-runtime v0.21.2/go.mod h1:8u/jFcM0QpoI28f6sfrAAIslLCXUYKD5SsPPMWiHYrI=
k8s.io/client-go v0.21.2 h1:Q1j4L/iMN4pTw6Y4DWppBoUxgKO8LbffEMVEV00MUp0=
@@ -2625,12 +2654,7 @@ k8s.io/code-generator v0.0.0-20190717022600-77f3a1fe56bb/go.mod h1:cDx5jQmWH25Ff
k8s.io/code-generator v0.0.0-20190912054826-cd179ad6a269/go.mod h1:V5BD6M4CyaN5m+VthcclXWsVcT1Hu+glwa1bi3MIsyE=
k8s.io/code-generator v0.0.0-20191003035328-700b1226c0bd/go.mod h1:HC9p4y3SBN+txSs8x57qmNPXFZ/CxdCHiDTNnocCSEw=
k8s.io/code-generator v0.16.4/go.mod h1:mJUgkl06XV4kstAnLHAIzJPVCOzVR+ZcfPIv4fUsFCY=
-k8s.io/code-generator v0.16.7/go.mod h1:wFdrXdVi/UC+xIfLi+4l9elsTT/uEF61IfcN2wOLULQ=
k8s.io/code-generator v0.17.0/go.mod h1:DVmfPQgxQENqDIzVR2ddLXMH34qeszkKSdH/N+s+38s=
-k8s.io/code-generator v0.17.1/go.mod h1:DVmfPQgxQENqDIzVR2ddLXMH34qeszkKSdH/N+s+38s=
-k8s.io/code-generator v0.17.2/go.mod h1:DVmfPQgxQENqDIzVR2ddLXMH34qeszkKSdH/N+s+38s=
-k8s.io/code-generator v0.17.3/go.mod h1:l8BLVwASXQZTo2xamW5mQNFCe1XPiAesVq7Y1t7PiQQ=
-k8s.io/code-generator v0.17.4/go.mod h1:l8BLVwASXQZTo2xamW5mQNFCe1XPiAesVq7Y1t7PiQQ=
k8s.io/code-generator v0.18.0-beta.2/go.mod h1:+UHX5rSbxmR8kzS+FAv7um6dtYrZokQvjHpDSYRVkTc=
k8s.io/code-generator v0.18.0-rc.1/go.mod h1:+UHX5rSbxmR8kzS+FAv7um6dtYrZokQvjHpDSYRVkTc=
k8s.io/code-generator v0.18.0/go.mod h1:+UHX5rSbxmR8kzS+FAv7um6dtYrZokQvjHpDSYRVkTc=
@@ -2639,18 +2663,16 @@ k8s.io/code-generator v0.18.6/go.mod h1:TgNEVx9hCyPGpdtCWA34olQYLkh3ok9ar7XfSsr8
k8s.io/code-generator v0.19.0/go.mod h1:moqLn7w0t9cMs4+5CQyxnfA/HV8MF6aAVENF+WZZhgk=
k8s.io/code-generator v0.19.1/go.mod h1:moqLn7w0t9cMs4+5CQyxnfA/HV8MF6aAVENF+WZZhgk=
k8s.io/code-generator v0.19.2/go.mod h1:moqLn7w0t9cMs4+5CQyxnfA/HV8MF6aAVENF+WZZhgk=
-k8s.io/code-generator v0.19.4/go.mod h1:moqLn7w0t9cMs4+5CQyxnfA/HV8MF6aAVENF+WZZhgk=
k8s.io/code-generator v0.20.0/go.mod h1:UsqdF+VX4PU2g46NC2JRs4gc+IfrctnwHb76RNbWHJg=
k8s.io/code-generator v0.20.2/go.mod h1:UsqdF+VX4PU2g46NC2JRs4gc+IfrctnwHb76RNbWHJg=
+k8s.io/code-generator v0.21.0-rc.0/go.mod h1:hUlps5+9QaTrKx+jiM4rmq7YmH8wPOIko64uZCHDh6Q=
+k8s.io/code-generator v0.21.0/go.mod h1:hUlps5+9QaTrKx+jiM4rmq7YmH8wPOIko64uZCHDh6Q=
+k8s.io/code-generator v0.21.1/go.mod h1:hUlps5+9QaTrKx+jiM4rmq7YmH8wPOIko64uZCHDh6Q=
k8s.io/code-generator v0.21.2 h1:EyHysEtLHTsNMoace0b3Yec9feD0qkV+5RZRoeSh+sc=
k8s.io/code-generator v0.21.2/go.mod h1:8mXJDCB7HcRo1xiEQstcguZkbxZaqeUOrO9SsicWs3U=
k8s.io/component-base v0.0.0-20190918160511-547f6c5d7090/go.mod h1:933PBGtQFJky3TEwYx4aEPZ4IxqhWh3R6DCmzqIn1hA=
k8s.io/component-base v0.16.4/go.mod h1:GYQ+4hlkEwdlpAp59Ztc4gYuFhdoZqiAJD1unYDJ3FM=
-k8s.io/component-base v0.16.7/go.mod h1:ikdyfezOFMu5O0qJjy/Y9eXwj+fV3pVwdmt0ulVcIR0=
k8s.io/component-base v0.17.0/go.mod h1:rKuRAokNMY2nn2A6LP/MiwpoaMRHpfRnrPaUJJj1Yoc=
-k8s.io/component-base v0.17.2/go.mod h1:zMPW3g5aH7cHJpKYQ/ZsGMcgbsA/VyhEugF3QT1awLs=
-k8s.io/component-base v0.17.3/go.mod h1:GeQf4BrgelWm64PXkIXiPh/XS0hnO42d9gx9BtbZRp8=
-k8s.io/component-base v0.17.4/go.mod h1:5BRqHMbbQPm2kKu35v3G+CpVq4K0RJKC7TRioF0I9lE=
k8s.io/component-base v0.18.0-beta.2/go.mod h1:HVk5FpRnyzQ/MjBr9//e/yEBjTVa2qjGXCTuUzcD7ks=
k8s.io/component-base v0.18.0-rc.1/go.mod h1:NNlRaxZEdLqTs2+6yXiU2SHl8gKsbcy19Ii+Sfq53RM=
k8s.io/component-base v0.18.2/go.mod h1:kqLlMuhJNHQ9lz8Z7V5bxUUtjFZnrypArGl58gmDfUM=
@@ -2658,30 +2680,29 @@ k8s.io/component-base v0.18.6/go.mod h1:knSVsibPR5K6EW2XOjEHik6sdU5nCvKMrzMt2D4I
k8s.io/component-base v0.19.0/go.mod h1:dKsY8BxkA+9dZIAh2aWJLL/UdASFDNtGYTCItL4LM7Y=
k8s.io/component-base v0.19.1/go.mod h1:b0vDKYa8EdJJ8dHUA6fGPj4z8taqGks5mfZvp3p/jVo=
k8s.io/component-base v0.19.2/go.mod h1:g5LrsiTiabMLZ40AR6Hl45f088DevyGY+cCE2agEIVo=
-k8s.io/component-base v0.19.4/go.mod h1:ZzuSLlsWhajIDEkKF73j64Gz/5o0AgON08FgRbEPI70=
k8s.io/component-base v0.20.0/go.mod h1:wKPj+RHnAr8LW2EIBIK7AxOHPde4gme2lzXwVSoRXeA=
k8s.io/component-base v0.20.2/go.mod h1:pzFtCiwe/ASD0iV7ySMu8SYVJjCapNM9bjvk7ptpKh0=
+k8s.io/component-base v0.21.0-rc.0/go.mod h1:XlP0bM7QJFWRGZYPc5NmphkvsYQ+o7804HWH3GTGjDY=
+k8s.io/component-base v0.21.0/go.mod h1:qvtjz6X0USWXbgmbfXR+Agik4RZ3jv2Bgr5QnZzdPYw=
k8s.io/component-base v0.21.2 h1:EsnmFFoJ86cEywC0DoIkAUiEV6fjgauNugiw1lmIjs4=
k8s.io/component-base v0.21.2/go.mod h1:9lvmIThzdlrJj5Hp8Z/TOgIkdfsNARQ1pT+3PByuiuc=
k8s.io/component-helpers v0.20.0/go.mod h1:nx6NOtfSfGOxnSZsDJxpGbnsVuUA1UXpwDvZIrtigNk=
+k8s.io/component-helpers v0.21.0/go.mod h1:tezqefP7lxfvJyR+0a+6QtVrkZ/wIkyMLK4WcQ3Cj8U=
k8s.io/component-helpers v0.21.2/go.mod h1:DbyFt/A0p6Cv+R5+QOGSJ5f5t4xDfI8Yb89a57DgJlQ=
k8s.io/gengo v0.0.0-20181106084056-51747d6e00da/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0=
k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0=
k8s.io/gengo v0.0.0-20190822140433-26a664648505/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0=
k8s.io/gengo v0.0.0-20190907103519-ebc107f98eab/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0=
-k8s.io/gengo v0.0.0-20191010091904-7fa3014cb28f/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0=
k8s.io/gengo v0.0.0-20200114144118-36b2048a9120/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0=
k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0=
k8s.io/gengo v0.0.0-20200428234225-8167cfdcfc14/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0=
k8s.io/gengo v0.0.0-20201113003025-83324d819ded/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E=
k8s.io/gengo v0.0.0-20201214224949-b6c5ce23f027 h1:Uusb3oh8XcdzDF/ndlI4ToKTYVlkCSJP39SRY2mfRAw=
k8s.io/gengo v0.0.0-20201214224949-b6c5ce23f027/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E=
-k8s.io/helm v2.16.3+incompatible/go.mod h1:LZzlS4LQBHfciFOurYBFkCMTaZ0D1l+p0teMg7TSULI=
k8s.io/klog v0.0.0-20181102134211-b9b56d5dfc92/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk=
k8s.io/klog v0.0.0-20190306015804-8e90cee79f82/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk=
k8s.io/klog v0.3.0/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk=
k8s.io/klog v0.3.1/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk=
-k8s.io/klog v0.3.3/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk=
k8s.io/klog v0.4.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I=
k8s.io/klog v1.0.0 h1:Pt+yjF5aB1xDSVbau4VsWe+dQNzA0qv1LlXdC2dF6Q8=
k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I=
@@ -2692,18 +2713,18 @@ k8s.io/klog/v2 v2.4.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y=
k8s.io/klog/v2 v2.8.0/go.mod h1:hy9LJ/NvuK+iVyP4Ehqva4HxZG/oXyIS3n3Jmire4Ec=
k8s.io/klog/v2 v2.9.0 h1:D7HV+n1V57XeZ0m6tdRkfknthUaM06VFbWldOFh8kzM=
k8s.io/klog/v2 v2.9.0/go.mod h1:hy9LJ/NvuK+iVyP4Ehqva4HxZG/oXyIS3n3Jmire4Ec=
-k8s.io/kube-aggregator v0.17.3/go.mod h1:1dMwMFQbmH76RKF0614L7dNenMl3dwnUJuOOyZ3GMXA=
k8s.io/kube-aggregator v0.18.0-beta.2/go.mod h1:O3Td9mheraINbLHH4pzoFP2gRzG0Wk1COqzdSL4rBPk=
k8s.io/kube-aggregator v0.18.2/go.mod h1:ijq6FnNUoKinA6kKbkN6svdTacSoQVNtKqmQ1+XJEYQ=
k8s.io/kube-aggregator v0.19.0/go.mod h1:1Ln45PQggFAG8xOqWPIYMxUq8WNtpPnYsbUJ39DpF/A=
k8s.io/kube-aggregator v0.19.1/go.mod h1:oAj1kWeSDCh7sdzUOs6XXPn/jbzJY+yGGxDd0QyLJC8=
k8s.io/kube-aggregator v0.19.2/go.mod h1:wVsjy6OTeUrWkgG9WVsGftnjpm8JIY0vJV7LH2j4nhM=
+k8s.io/kube-aggregator v0.20.0/go.mod h1:3Is/gzzWmhhG/rA3CpA1+eVye87lreBQDFGcAGT7gzo=
+k8s.io/kube-aggregator v0.21.0-rc.0/go.mod h1:M+whOmsAeQf8ObJ0/eO9Af1Dz2UQEB9OW9BWmt9b2sU=
k8s.io/kube-aggregator v0.21.2 h1:G7pZL3ajCxU+DUmePW/N+UTkBFtWWx0CmXgVPFQjEtE=
k8s.io/kube-aggregator v0.21.2/go.mod h1:7NgmUXJziySAJ7GxMRBBwcJay7MLUoxms31fw/ICpYk=
k8s.io/kube-openapi v0.0.0-20180731170545-e3762e86a74c/go.mod h1:BXM9ceUBTj2QnfH2MK1odQs778ajze1RxcmP6S8RVVc=
k8s.io/kube-openapi v0.0.0-20181114233023-0317810137be/go.mod h1:BXM9ceUBTj2QnfH2MK1odQs778ajze1RxcmP6S8RVVc=
k8s.io/kube-openapi v0.0.0-20190228160746-b3a7cee44a30/go.mod h1:BXM9ceUBTj2QnfH2MK1odQs778ajze1RxcmP6S8RVVc=
-k8s.io/kube-openapi v0.0.0-20190320154901-5e45bb682580/go.mod h1:BXM9ceUBTj2QnfH2MK1odQs778ajze1RxcmP6S8RVVc=
k8s.io/kube-openapi v0.0.0-20190709113604-33be087ad058/go.mod h1:nfDlWeOsu3pUf4yWGL+ERqohP4YsZcBJXWMK+gkzOA4=
k8s.io/kube-openapi v0.0.0-20190816220812-743ec37842bf/go.mod h1:1TqjTSzOxsLGIKfj0lK8EeCP7K1iUG65v09OM0/WG5E=
k8s.io/kube-openapi v0.0.0-20191107075043-30be4d16710a/go.mod h1:1TqjTSzOxsLGIKfj0lK8EeCP7K1iUG65v09OM0/WG5E=
@@ -2714,32 +2735,23 @@ k8s.io/kube-openapi v0.0.0-20200831175022-64514a1d5d59/go.mod h1:UuqjUnNftUyPE5H
k8s.io/kube-openapi v0.0.0-20201113171705-d219536bb9fd/go.mod h1:WOJ3KddDSol4tAGcJo0Tvi+dK12EcqSLqcWsryKMpfM=
k8s.io/kube-openapi v0.0.0-20210305001622-591a79e4bda7 h1:vEx13qjvaZ4yfObSSXW7BrMc/KQBBT/Jyee8XtLf4x0=
k8s.io/kube-openapi v0.0.0-20210305001622-591a79e4bda7/go.mod h1:wXW5VT87nVfh/iLV8FpR2uDvrFyomxbtb1KivDbvPTE=
-k8s.io/kube-state-metrics v1.7.2/go.mod h1:U2Y6DRi07sS85rmVPmBFlmv+2peBcL8IWGjM+IjYA/E=
-k8s.io/kubectl v0.17.2/go.mod h1:y4rfLV0n6aPmvbRCqZQjvOp3ezxsFgpqL+zF5jH/lxk=
-k8s.io/kubectl v0.17.3/go.mod h1:NUn4IBY7f7yCMwSop2HCXlw/MVYP4HJBiUmOR3n9w28=
-k8s.io/kubectl v0.17.4/go.mod h1:im5QWmh6fvtmJkkNm4HToLe8z9aM3jihYK5X/wOybcY=
k8s.io/kubectl v0.18.0-rc.1/go.mod h1:UpG1w7klD633nyMS73/29cNl2tMdEbXU0nWupttyha4=
k8s.io/kubectl v0.19.0/go.mod h1:gPCjjsmE6unJzgaUNXIFGZGafiUp5jh0If3F/x7/rRg=
k8s.io/kubectl v0.19.1/go.mod h1:jZM7qucrDpQu05OAoSJk0yRRHRZNydya40dILYh8ODc=
k8s.io/kubectl v0.20.0/go.mod h1:8x5GzQkgikz7M2eFGGuu6yOfrenwnw5g4RXOUgbjR1M=
+k8s.io/kubectl v0.21.0/go.mod h1:EU37NukZRXn1TpAkMUoy8Z/B2u6wjHDS4aInsDzVvks=
k8s.io/kubectl v0.21.2 h1:9XPCetvOMDqrIZZXb1Ei+g8t6KrIp9ENJaysQjUuLiE=
k8s.io/kubectl v0.21.2/go.mod h1:PgeUclpG8VVmmQIl8zpLar3IQEpFc9mrmvlwY3CK1xo=
-k8s.io/kubernetes v1.13.0/go.mod h1:ocZa8+6APFNC2tX1DZASIbocyYT5jHzqFVsY5aoB7Jk=
-k8s.io/metrics v0.17.2/go.mod h1:3TkNHET4ROd+NfzNxkjoVfQ0Ob4iZnaHmSEA4vYpwLw=
-k8s.io/metrics v0.17.3/go.mod h1:HEJGy1fhHOjHggW9rMDBJBD3YuGroH3Y1pnIRw9FFaI=
-k8s.io/metrics v0.17.4/go.mod h1:6rylW2iD3M9VppnEAAtJASY1XS8Pt9tcYh+tHxBeV3I=
k8s.io/metrics v0.18.0-rc.1/go.mod h1:ME3EkXCyiZ7mVFEiAYKBfuo3JkpgggeATG+DBUQby5o=
k8s.io/metrics v0.19.0/go.mod h1:WykpW8B60OeAJx1imdwUgyOID2kDljr/Q+1zrPJ98Wo=
k8s.io/metrics v0.19.1/go.mod h1:O/ONCgXDITtJuMveKEDwZSfiqHOiMZTWmyLe/p1BoAA=
k8s.io/metrics v0.20.0/go.mod h1:9yiRhfr8K8sjdj2EthQQE9WvpYDvsXIV3CjN4Ruq4Jw=
+k8s.io/metrics v0.21.0/go.mod h1:L3Ji9EGPP1YBbfm9sPfEXSpnj8i24bfQbAFAsW0NueQ=
k8s.io/metrics v0.21.2/go.mod h1:wzlOINZMCtWq8dR9gHlyaOemmYlOpAoldEIXE82gAhI=
-k8s.io/utils v0.0.0-20190308190857-21c4ce38f2a7/go.mod h1:8k8uAuAQ0rXslZKaEWd0c3oVhZz7sSzSiPnVZayjIX0=
k8s.io/utils v0.0.0-20190506122338-8fab8cb257d5/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew=
k8s.io/utils v0.0.0-20190529001817-6999998975a7/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew=
k8s.io/utils v0.0.0-20190801114015-581e00157fb1/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew=
-k8s.io/utils v0.0.0-20190923111123-69764acb6e8e/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew=
k8s.io/utils v0.0.0-20191114184206-e782cd3c129f/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew=
-k8s.io/utils v0.0.0-20191114200735-6ca3b61696b6/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew=
k8s.io/utils v0.0.0-20200229041039-0a110f9eb7ab/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew=
k8s.io/utils v0.0.0-20200324210504-a9aa75ae1b89/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew=
k8s.io/utils v0.0.0-20200327001022-6496210b90e8/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew=
@@ -2747,7 +2759,9 @@ k8s.io/utils v0.0.0-20200411171748-3d5a2fe318e4/go.mod h1:jPW/WVKK9YHAvNhRxK0md/
k8s.io/utils v0.0.0-20200603063816-c1c6865ac451/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
k8s.io/utils v0.0.0-20200729134348-d5654de09c73/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
k8s.io/utils v0.0.0-20200821003339-5e75c0163111/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
+k8s.io/utils v0.0.0-20200912215256-4140de9c8800/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
+k8s.io/utils v0.0.0-20210111153108-fddb29f9d009/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
k8s.io/utils v0.0.0-20210527160623-6fdb442a123b h1:MSqsVQ3pZvPGTqCjptfimO2WjG7A9un2zcpiHkA6M/s=
k8s.io/utils v0.0.0-20210527160623-6fdb442a123b/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
kubevirt.io/client-go v0.29.0/go.mod h1:JY7hQq+SUT0aLvleXrW/+28fDfZ6BPe4E6f8FyC8jkY=
@@ -2771,23 +2785,22 @@ mvdan.cc/unparam v0.0.0-20190720180237-d51796306d8f/go.mod h1:4G1h5nDURzA3bwVMZI
mvdan.cc/unparam v0.0.0-20200501210554-b37ab49443f7 h1:kAREL6MPwpsk1/PQPFD3Eg7WAQR5mPTWZJaBiG5LDbY=
mvdan.cc/unparam v0.0.0-20200501210554-b37ab49443f7/go.mod h1:HGC5lll35J70Y5v7vCGb9oLhHoScFwkHDJm/05RdSTc=
rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=
-rsc.io/letsencrypt v0.0.3/go.mod h1:buyQKZ6IXrRnB7TdkHP0RyEybLx18HHyOSoTyoOLqNY=
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.7/go.mod h1:PHgbrJT7lCHcxMU+mDHEm+nx46H4zuuHZkDP6icnhu0=
sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.9/go.mod h1:dzAXnQbTRyDlZPJX2SUPEqvnB+j7AJjtlox7PEwigU0=
sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.14/go.mod h1:LEScyzhFmoF5pso/YSeBstl57mOzx9xlU9n85RGrDQg=
+sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.15/go.mod h1:LEScyzhFmoF5pso/YSeBstl57mOzx9xlU9n85RGrDQg=
sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.19 h1:0jaDAAxtqIrrqas4vtTqxct4xS5kHfRNycTRLTyJmVM=
sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.19/go.mod h1:LEScyzhFmoF5pso/YSeBstl57mOzx9xlU9n85RGrDQg=
sigs.k8s.io/controller-runtime v0.0.0-20190520212815-96b67f231945/go.mod h1:TSH2R0nSz4WAlUUlNnOFcOR/VUhfwBLlmtq2X6AiQCA=
-sigs.k8s.io/controller-runtime v0.2.0-beta.2/go.mod h1:TSH2R0nSz4WAlUUlNnOFcOR/VUhfwBLlmtq2X6AiQCA=
-sigs.k8s.io/controller-runtime v0.2.0/go.mod h1:ZHqrRDZi3f6BzONcvlUxkqCKgwasGk5FZrnSv9TVZF4=
-sigs.k8s.io/controller-runtime v0.5.2/go.mod h1:JZUwSMVbxDupo0lTJSSFP5pimEyxGynROImSsqIOx1A=
sigs.k8s.io/controller-runtime v0.6.0/go.mod h1:CpYf5pdNY/B352A1TFLAS2JVSlnGQ5O2cftPHndTroo=
sigs.k8s.io/controller-runtime v0.6.2/go.mod h1:vhcq/rlnENJ09SIRp3EveTaZ0yqH526hjf9iJdbUJ/E=
+sigs.k8s.io/controller-runtime v0.7.0/go.mod h1:pJ3YBrJiAqMAZKi6UVGuE98ZrroV1p+pIhoHsMm9wdU=
+sigs.k8s.io/controller-runtime v0.9.0-alpha.1.0.20210413130450-7ef2da0bc161/go.mod h1:ufPDuvefw2Y1KnBgHQrLdOjueYlj+XJV2AszbT+WTxs=
+sigs.k8s.io/controller-runtime v0.9.0-beta.1.0.20210512131817-ce2f0c92d77e/go.mod h1:ufPDuvefw2Y1KnBgHQrLdOjueYlj+XJV2AszbT+WTxs=
sigs.k8s.io/controller-runtime v0.9.3-0.20210709165254-650ea59f19cc h1:8AoQ9IpA60jFuegjefvh65bRMlf6jcVgF7t1jwssNzQ=
sigs.k8s.io/controller-runtime v0.9.3-0.20210709165254-650ea59f19cc/go.mod h1:TxzMCHyEUpaeuOiZx/bIdc2T81vfs/aKdvJt9wuu0zk=
-sigs.k8s.io/controller-tools v0.2.2-0.20190919191502-76a25b63325a/go.mod h1:8SNGuj163x/sMwydREj7ld5mIMJu1cDanIfnx6xsU70=
sigs.k8s.io/controller-tools v0.2.4/go.mod h1:m/ztfQNocGYBgTTCmFdnK94uVvgxeZeE3LtJvd/jIzA=
sigs.k8s.io/controller-tools v0.2.8/go.mod h1:9VKHPszmf2DHz/QmHkcfZoewO6BL7pPs9uAiBVsaJSE=
sigs.k8s.io/controller-tools v0.3.0/go.mod h1:enhtKGfxZD1GFEoMgP8Fdbu+uKQ/cq1/WGJhdVChfvI=
@@ -2797,28 +2810,37 @@ sigs.k8s.io/controller-tools v0.5.0/go.mod h1:JTsstrMpxs+9BUj6eGuAaEb6SDSPTeVtUy
sigs.k8s.io/kube-storage-version-migrator v0.0.3/go.mod h1:mXfSLkx9xbJHQsgNDDUZK/iQTs2tMbx/hsJlWe6Fthw=
sigs.k8s.io/kustomize v2.0.3+incompatible h1:JUufWFNlI44MdtnjUqVnvh29rR37PQFzPbLXqhyOyX0=
sigs.k8s.io/kustomize v2.0.3+incompatible/go.mod h1:MkjgH3RdOWrievjo6c9T245dYlB5QeXV4WCbnt/PEpU=
+sigs.k8s.io/kustomize/api v0.6.3/go.mod h1:mTwLqPB2uqh7LOcYoJKKHIfP5ioS6t3NfZ8lvia4NJY=
+sigs.k8s.io/kustomize/api v0.8.5/go.mod h1:M377apnKT5ZHJS++6H4rQoCHmWtt6qTpp3mbe7p6OLY=
sigs.k8s.io/kustomize/api v0.8.8 h1:G2z6JPSSjtWWgMeWSoHdXqyftJNmMmyxXpwENGoOtGE=
sigs.k8s.io/kustomize/api v0.8.8/go.mod h1:He1zoK0nk43Pc6NlV085xDXDXTNprtcyKZVm3swsdNY=
+sigs.k8s.io/kustomize/cmd/config v0.8.2/go.mod h1:NfndXLA1moQGfNOOThNeLvHb23nrZtgf9gdM7QPdub0=
+sigs.k8s.io/kustomize/cmd/config v0.9.7/go.mod h1:MvXCpHs77cfyxRmCNUQjIqCmZyYsbn5PyQpWiq44nW0=
sigs.k8s.io/kustomize/cmd/config v0.9.10/go.mod h1:Mrby0WnRH7hA6OwOYnYpfpiY0WJIMgYrEDfwOeFdMK0=
+sigs.k8s.io/kustomize/kustomize/v3 v3.8.5/go.mod h1:R1zsfKSVbn6PZnZ4kAbylYj2AKyugLrk7MddPOJSEiI=
+sigs.k8s.io/kustomize/kustomize/v4 v4.0.5/go.mod h1:C7rYla7sI8EnxHE/xEhRBSHMNfcL91fx0uKmUlUhrBk=
sigs.k8s.io/kustomize/kustomize/v4 v4.1.2/go.mod h1:PxBvo4WGYlCLeRPL+ziT64wBXqbgfcalOS/SXa/tcyo=
+sigs.k8s.io/kustomize/kyaml v0.9.1/go.mod h1:UTm64bSWVdBUA8EQoYCxVOaBQxUdIOr5LKWxA4GNbkw=
+sigs.k8s.io/kustomize/kyaml v0.10.15/go.mod h1:mlQFagmkm1P+W4lZJbJ/yaxMd8PqMRSC4cPcfUVt5Hg=
sigs.k8s.io/kustomize/kyaml v0.10.17 h1:4zrV0ym5AYa0e512q7K3Wp1u7mzoWW0xR3UHJcGWGIg=
sigs.k8s.io/kustomize/kyaml v0.10.17/go.mod h1:mlQFagmkm1P+W4lZJbJ/yaxMd8PqMRSC4cPcfUVt5Hg=
sigs.k8s.io/structured-merge-diff v0.0.0-20190525122527-15d366b2352e/go.mod h1:wWxsB5ozmmv/SG7nM11ayaAW51xMvak/t1r0CSlcokI=
sigs.k8s.io/structured-merge-diff v0.0.0-20190817042607-6149e4549fca/go.mod h1:IIgPezJWb76P0hotTxzDbWsMYB8APh18qZnxkomBpxA=
sigs.k8s.io/structured-merge-diff v1.0.1-0.20191108220359-b1b620dd3f06/go.mod h1:/ULNhyfzRopfcjskuui0cTITekDduZ7ycKN3oUT9R18=
+sigs.k8s.io/structured-merge-diff v1.0.1 h1:LOs1LZWMsz1xs77Phr/pkB4LFaavH7IVq/3+WTN9XTA=
sigs.k8s.io/structured-merge-diff v1.0.1/go.mod h1:IIgPezJWb76P0hotTxzDbWsMYB8APh18qZnxkomBpxA=
-sigs.k8s.io/structured-merge-diff v1.0.2 h1:WiMoyniAVAYm03w+ImfF9IE2G23GLR/SwDnQyaNZvPk=
-sigs.k8s.io/structured-merge-diff v1.0.2/go.mod h1:IIgPezJWb76P0hotTxzDbWsMYB8APh18qZnxkomBpxA=
sigs.k8s.io/structured-merge-diff/v3 v3.0.0-20200116222232-67a7b8c61874/go.mod h1:PlARxl6Hbt/+BC80dRLi1qAmnMqwqDg62YvvVkZjemw=
sigs.k8s.io/structured-merge-diff/v3 v3.0.0/go.mod h1:PlARxl6Hbt/+BC80dRLi1qAmnMqwqDg62YvvVkZjemw=
sigs.k8s.io/structured-merge-diff/v4 v4.0.1/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw=
sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw=
-sigs.k8s.io/structured-merge-diff/v4 v4.1.0 h1:C4r9BgJ98vrKnnVCjwCSXcWjWe0NKcUQkmzDXZXGwH8=
sigs.k8s.io/structured-merge-diff/v4 v4.1.0/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw=
+sigs.k8s.io/structured-merge-diff/v4 v4.1.1 h1:nYqY2A6oy37sKLYuSBXuQhbj4JVclzJK13BOIvJG5XU=
+sigs.k8s.io/structured-merge-diff/v4 v4.1.1/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw=
sigs.k8s.io/testing_frameworks v0.1.1/go.mod h1:VVBKrHmJ6Ekkfz284YKhQePcdycOzNH9qL6ht1zEr/U=
sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o=
sigs.k8s.io/yaml v1.2.0 h1:kr/MCeFWJWTwyaHoR9c8EjH9OumOmoF9YGiZd7lFm/Q=
sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc=
+sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU=
sourcegraph.com/sourcegraph/go-diff v0.5.0/go.mod h1:kuch7UrkMzY0X+p9CRK03kfuPQ2zzQcaEFbx8wA8rck=
sourcegraph.com/sqs/pbtypes v0.0.0-20180604144634-d3ebe8f20ae4/go.mod h1:ketZ/q3QxT9HOBeFhu6RdvsftgpsbFHBF5Cas6cDKZ0=
vbom.ml/util v0.0.0-20160121211510-db5cfe13f5cc/go.mod h1:so/NYdZXCz+E3ZpW0uAoCj6uzU2+8OWDFv/HxUSs7kI=
diff --git a/pkg/controller/clusterversion/clusterversion_controller_test.go b/pkg/controller/clusterversion/clusterversion_controller_test.go
index 2610cf31753..b8dabe79e1c 100644
--- a/pkg/controller/clusterversion/clusterversion_controller_test.go
+++ b/pkg/controller/clusterversion/clusterversion_controller_test.go
@@ -199,7 +199,7 @@ func testRemoteClusterAPIClient() client.Client {
func testRemoteClusterVersionStatus() *configv1.ClusterVersionStatus {
zeroTime := metav1.NewTime(time.Unix(0, 0))
return &configv1.ClusterVersionStatus{
- Desired: configv1.Update{
+ Desired: configv1.Release{
Version: "2.3.4+somebuild",
},
History: []configv1.UpdateHistory{
diff --git a/pkg/controller/hibernation/azure_actuator_test.go b/pkg/controller/hibernation/azure_actuator_test.go
index c2442ed8759..b83cc18322a 100644
--- a/pkg/controller/hibernation/azure_actuator_test.go
+++ b/pkg/controller/hibernation/azure_actuator_test.go
@@ -222,7 +222,8 @@ func setupAzureClientInstances(client *mockazureclient.MockClient, instances map
})
}
}
- result := compute.NewVirtualMachineListResultPage(func(ctx context.Context, result compute.VirtualMachineListResult) (compute.VirtualMachineListResult, error) {
+ cur := compute.VirtualMachineListResult{}
+ result := compute.NewVirtualMachineListResultPage(cur, func(ctx context.Context, result compute.VirtualMachineListResult) (compute.VirtualMachineListResult, error) {
if result.Value == nil {
return compute.VirtualMachineListResult{Value: &vms}, nil
}
diff --git a/pkg/controller/remotemachineset/ovirt.go b/pkg/controller/remotemachineset/ovirt.go
index 4ea3517b4c6..44fb179471e 100644
--- a/pkg/controller/remotemachineset/ovirt.go
+++ b/pkg/controller/remotemachineset/ovirt.go
@@ -2,6 +2,7 @@ package remotemachineset
import (
"fmt"
+ "strings"
"github.com/pkg/errors"
log "github.com/sirupsen/logrus"
@@ -97,10 +98,22 @@ func (a *OvirtActuator) GenerateMachineSets(cd *hivev1.ClusterDeployment, pool *
if err != nil {
return nil, false, errors.Wrap(err, "failed to generate machinesets")
}
+ installerMachineSets = preserveOvirtMachineSetNameSuffix(installerMachineSets)
return installerMachineSets, true, nil
}
+// preserveOvirtMachineSetNameSuffix ensures that machineset names have a "-0" suffix. The suffix was
+// removed from instalovirt.MachineSets so we maintain it here to prevent machineset replacement.
+func preserveOvirtMachineSetNameSuffix(machineSets []*machineapi.MachineSet) []*machineapi.MachineSet {
+ for _, ms := range machineSets {
+ if !strings.HasSuffix(ms.Name, "-0") {
+ ms.Name = fmt.Sprintf("%s-0", ms.Name)
+ }
+ }
+ return machineSets
+}
+
// Get the OS image from an existing master machine.
func getOvirtOSImage(masterMachine *machineapi.Machine, scheme *runtime.Scheme, logger log.FieldLogger) (string, error) {
providerSpec, err := decodeOvirtMachineProviderSpec(masterMachine.Spec.ProviderSpec.Value, scheme)
diff --git a/pkg/remoteclient/fake.go b/pkg/remoteclient/fake.go
index 32b4adfc48c..0daea3c77f4 100644
--- a/pkg/remoteclient/fake.go
+++ b/pkg/remoteclient/fake.go
@@ -48,7 +48,7 @@ func (b *fakeBuilder) Build() (client.Client, error) {
Name: "version",
},
Status: openshiftapiv1.ClusterVersionStatus{
- Desired: openshiftapiv1.Update{
+ Desired: openshiftapiv1.Release{
Version: "4.6.8",
},
},
diff --git a/vendor/4d63.com/gochecknoglobals/LICENSE b/vendor/4d63.com/gochecknoglobals/LICENSE
new file mode 100644
index 00000000000..c401e6608d2
--- /dev/null
+++ b/vendor/4d63.com/gochecknoglobals/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2018 Leigh McCulloch
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+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.
diff --git a/vendor/4d63.com/gochecknoglobals/checknoglobals/check_no_globals.go b/vendor/4d63.com/gochecknoglobals/checknoglobals/check_no_globals.go
new file mode 100644
index 00000000000..5b6325dd94d
--- /dev/null
+++ b/vendor/4d63.com/gochecknoglobals/checknoglobals/check_no_globals.go
@@ -0,0 +1,154 @@
+package checknoglobals
+
+import (
+ "flag"
+ "fmt"
+ "go/ast"
+ "go/token"
+ "strings"
+
+ "golang.org/x/tools/go/analysis"
+)
+
+// allowedExpression is a struct representing packages and methods that will
+// be an allowed combination to use as a global variable, f.ex. Name `regexp`
+// and SelName `MustCompile`.
+type allowedExpression struct {
+ Name string
+ SelName string
+}
+
+const Doc = `check that no global variables exist
+
+This analyzer checks for global variables and errors on any found.
+
+A global variable is a variable declared in package scope and that can be read
+and written to by any function within the package. Global variables can cause
+side effects which are difficult to keep track of. A code in one function may
+change the variables state while another unrelated chunk of code may be
+effected by it.`
+
+// Analyzer provides an Analyzer that checks that there are no global
+// variables, except for errors and variables containing regular
+// expressions.
+func Analyzer() *analysis.Analyzer {
+ return &analysis.Analyzer{
+ Name: "gochecknoglobals",
+ Doc: Doc,
+ Run: checkNoGlobals,
+ Flags: flags(),
+ RunDespiteErrors: true,
+ }
+}
+
+func flags() flag.FlagSet {
+ flags := flag.NewFlagSet("", flag.ExitOnError)
+ flags.Bool("t", false, "Include tests")
+
+ return *flags
+}
+
+func isAllowed(v ast.Node) bool {
+ switch i := v.(type) {
+ case *ast.Ident:
+ return i.Name == "_" || i.Name == "version" || looksLikeError(i)
+ case *ast.CallExpr:
+ if expr, ok := i.Fun.(*ast.SelectorExpr); ok {
+ return isAllowedSelectorExpression(expr)
+ }
+ case *ast.CompositeLit:
+ if expr, ok := i.Type.(*ast.SelectorExpr); ok {
+ return isAllowedSelectorExpression(expr)
+ }
+ }
+
+ return false
+}
+
+func isAllowedSelectorExpression(v *ast.SelectorExpr) bool {
+ x, ok := v.X.(*ast.Ident)
+ if !ok {
+ return false
+ }
+
+ allowList := []allowedExpression{
+ {Name: "regexp", SelName: "MustCompile"},
+ }
+
+ for _, i := range allowList {
+ if x.Name == i.Name && v.Sel.Name == i.SelName {
+ return true
+ }
+ }
+
+ return false
+}
+
+// looksLikeError returns true if the AST identifier starts
+// with 'err' or 'Err', or false otherwise.
+//
+// TODO: https://github.com/leighmcculloch/gochecknoglobals/issues/5
+func looksLikeError(i *ast.Ident) bool {
+ prefix := "err"
+ if i.IsExported() {
+ prefix = "Err"
+ }
+ return strings.HasPrefix(i.Name, prefix)
+}
+
+func checkNoGlobals(pass *analysis.Pass) (interface{}, error) {
+ includeTests := pass.Analyzer.Flags.Lookup("t").Value.(flag.Getter).Get().(bool)
+
+ for _, file := range pass.Files {
+ filename := pass.Fset.Position(file.Pos()).Filename
+ if !strings.HasSuffix(filename, ".go") {
+ continue
+ }
+ if !includeTests && strings.HasSuffix(filename, "_test.go") {
+ continue
+ }
+
+ for _, decl := range file.Decls {
+ genDecl, ok := decl.(*ast.GenDecl)
+ if !ok {
+ continue
+ }
+ if genDecl.Tok != token.VAR {
+ continue
+ }
+ for _, spec := range genDecl.Specs {
+ valueSpec := spec.(*ast.ValueSpec)
+ onlyAllowedValues := false
+
+ for _, vn := range valueSpec.Values {
+ if isAllowed(vn) {
+ onlyAllowedValues = true
+ continue
+ }
+
+ onlyAllowedValues = false
+ break
+ }
+
+ if onlyAllowedValues {
+ continue
+ }
+
+ for _, vn := range valueSpec.Names {
+ if isAllowed(vn) {
+ continue
+ }
+
+ message := fmt.Sprintf("%s is a global variable", vn.Name)
+ pass.Report(analysis.Diagnostic{
+ Pos: vn.Pos(),
+ Category: "global",
+ Message: message,
+ })
+ }
+ }
+ }
+ }
+
+ return nil, nil
+}
diff --git a/vendor/gopkg.in/AlecAivazis/survey.v1/.travis.yml b/vendor/github.com/AlecAivazis/survey/v2/.travis.yml
similarity index 81%
rename from vendor/gopkg.in/AlecAivazis/survey.v1/.travis.yml
rename to vendor/github.com/AlecAivazis/survey/v2/.travis.yml
index 71e47573c79..f96db1ac0e9 100644
--- a/vendor/gopkg.in/AlecAivazis/survey.v1/.travis.yml
+++ b/vendor/github.com/AlecAivazis/survey/v2/.travis.yml
@@ -9,7 +9,7 @@ os:
- osx
- windows
-go_import_path: gopkg.in/AlecAivazis/survey.v1
+go_import_path: github.com/AlecAivazis/survey/v2
before_install:
- go get github.com/alecaivazis/run
diff --git a/vendor/gopkg.in/AlecAivazis/survey.v1/CONTRIBUTING.md b/vendor/github.com/AlecAivazis/survey/v2/CONTRIBUTING.md
similarity index 68%
rename from vendor/gopkg.in/AlecAivazis/survey.v1/CONTRIBUTING.md
rename to vendor/github.com/AlecAivazis/survey/v2/CONTRIBUTING.md
index 24dcca189f2..a84e06061e6 100644
--- a/vendor/gopkg.in/AlecAivazis/survey.v1/CONTRIBUTING.md
+++ b/vendor/github.com/AlecAivazis/survey/v2/CONTRIBUTING.md
@@ -19,11 +19,12 @@ This project and its contibutors are expected to uphold the [Go Community Code o
## Getting help
-Feel free to [open up an issue](https://github.com/AlecAivazis/survey/issues/new) on GitHub when asking a question so others will be able to find it. Please remember to tag the issue with the `Question` label so the maintainers can get to your question as soon as possible. If the question is urgent, feel free to reach out to `@AlecAivazis` directly in the gophers slack channel.
+Feel free to [open up an issue](https://github.com/AlecAivazis/survey/v2/issues/new) on GitHub when asking a question so others will be able to find it. Please remember to tag the issue with the `Question` label so the maintainers can get to your question as soon as possible. If the question is urgent, feel free to reach out to `@AlecAivazis` directly in the gophers slack channel.
## How to file a bug report
Bugs are tracked using the Github Issue tracker. When filing a bug, please remember to label the issue as a `Bug` and answer/provide the following:
+
1. What operating system and terminal are you using?
1. An example that showcases the bug.
1. What did you expect to see?
@@ -31,20 +32,20 @@ Bugs are tracked using the Github Issue tracker. When filing a bug, please remem
## Suggesting an API change
-If you have an idea, I'm more than happy to discuss it. Please open an issue labeled `Discussion` and we can work through it. In order to maintain some sense of stability, additions to the top-level API are taken just as seriously as changes that break it. Adding stuff is much easier than removing it.
+If you have an idea, I'm more than happy to discuss it. Please open an issue and we can work through it. In order to maintain some sense of stability, additions to the top-level API are taken just as seriously as changes that break it. Adding stuff is much easier than removing it.
## Submitting a contribution
-In order to maintain stability, most features get fully integrated in more than one PR. This allows for more opportunity to think through each API change without amassing large amounts of tech debt and API changes at once. If your feature can be broken into separate chunks, it will be able to be reviewed much quicker. For example, if the PR that implemented the `Validate` field was submitted in a PR separately from one that included `survey.Required`, it would be able to get merge without having to decide how many different `Validators` we want to provide as part of `survey`'s API.
+In order to maintain stability, most features get fully integrated in more than one PR. This allows for more opportunity to think through each API change without amassing large amounts of tech debt and API changes at once. If your feature can be broken into separate chunks, it will be able to be reviewed much quicker. For example, if the PR that implemented the `Validate` field was submitted in a PR separately from one that included `survey.Required`, it would be able to get merge without having to decide how many different `Validators` we want to provide as part of `survey`'s API.
When submitting a contribution,
- * Provide a description of the feature or change
- * Reference the ticket addressed by the PR if there is one
- * Following community standards, add comments for all exported members so that all necessary information is available on godocs
- * Remember to update the project README.md with changes to the high-level API
- * Include both positive and negative unit tests (when applicable)
- * Contributions with visual ramifications or interaction changes should be accompanied with the appropriate `go-expect` tests. For more information on writing these tests, see [Writing and Running Tests](#writing-and-running-tests)
+- Provide a description of the feature or change
+- Reference the ticket addressed by the PR if there is one
+- Following community standards, add comments for all exported members so that all necessary information is available on godocs
+- Remember to update the project README.md with changes to the high-level API
+- Include both positive and negative unit tests (when applicable)
+- Contributions with visual ramifications or interaction changes should be accompanied with the appropriate `go-expect` tests. For more information on writing these tests, see [Writing and Running Tests](#writing-and-running-tests)
## Writing and running tests
@@ -74,5 +75,3 @@ For example, you can extend the tests for Input by specifying the following test
If you want to write your own `go-expect` test from scratch, you'll need to instantiate a virtual terminal,
multiplex it into an `*expect.Console`, and hook up its tty with survey's optional stdio. Please see `go-expect`
[documentation](https://godoc.org/github.com/Netflix/go-expect) for more detail.
-
-
diff --git a/vendor/gopkg.in/AlecAivazis/survey.v1/Gopkg.lock b/vendor/github.com/AlecAivazis/survey/v2/Gopkg.lock
similarity index 100%
rename from vendor/gopkg.in/AlecAivazis/survey.v1/Gopkg.lock
rename to vendor/github.com/AlecAivazis/survey/v2/Gopkg.lock
diff --git a/vendor/gopkg.in/AlecAivazis/survey.v1/Gopkg.toml b/vendor/github.com/AlecAivazis/survey/v2/Gopkg.toml
similarity index 100%
rename from vendor/gopkg.in/AlecAivazis/survey.v1/Gopkg.toml
rename to vendor/github.com/AlecAivazis/survey/v2/Gopkg.toml
diff --git a/vendor/gopkg.in/AlecAivazis/survey.v1/LICENSE b/vendor/github.com/AlecAivazis/survey/v2/LICENSE
similarity index 100%
rename from vendor/gopkg.in/AlecAivazis/survey.v1/LICENSE
rename to vendor/github.com/AlecAivazis/survey/v2/LICENSE
diff --git a/vendor/github.com/AlecAivazis/survey/v2/README.md b/vendor/github.com/AlecAivazis/survey/v2/README.md
new file mode 100644
index 00000000000..75f323e76f7
--- /dev/null
+++ b/vendor/github.com/AlecAivazis/survey/v2/README.md
@@ -0,0 +1,478 @@
+# Survey
+
+[](https://travis-ci.org/AlecAivazis/survey)
+[](https://pkg.go.dev/github.com/AlecAivazis/survey/v2)
+
+A library for building interactive prompts on terminals supporting ANSI escape sequences.
+
+
+
+```go
+package main
+
+import (
+ "fmt"
+ "github.com/AlecAivazis/survey/v2"
+)
+
+// the questions to ask
+var qs = []*survey.Question{
+ {
+ Name: "name",
+ Prompt: &survey.Input{Message: "What is your name?"},
+ Validate: survey.Required,
+ Transform: survey.Title,
+ },
+ {
+ Name: "color",
+ Prompt: &survey.Select{
+ Message: "Choose a color:",
+ Options: []string{"red", "blue", "green"},
+ Default: "red",
+ },
+ },
+ {
+ Name: "age",
+ Prompt: &survey.Input{Message: "How old are you?"},
+ },
+}
+
+func main() {
+ // the answers will be written to this struct
+ answers := struct {
+ Name string // survey will match the question and field names
+ FavoriteColor string `survey:"color"` // or you can tag fields to match a specific name
+ Age int // if the types don't match, survey will convert it
+ }{}
+
+ // perform the questions
+ err := survey.Ask(qs, &answers)
+ if err != nil {
+ fmt.Println(err.Error())
+ return
+ }
+
+ fmt.Printf("%s chose %s.", answers.Name, answers.FavoriteColor)
+}
+```
+
+## Table of Contents
+
+1. [Examples](#examples)
+1. [Running the Prompts](#running-the-prompts)
+1. [Prompts](#prompts)
+ 1. [Input](#input)
+ 1. [Suggestion Options](#suggestion-options)
+ 1. [Multiline](#multiline)
+ 1. [Password](#password)
+ 1. [Confirm](#confirm)
+ 1. [Select](#select)
+ 1. [MultiSelect](#multiselect)
+ 1. [Editor](#editor)
+1. [Filtering Options](#filtering-options)
+1. [Validation](#validation)
+ 1. [Built-in Validators](#built-in-validators)
+1. [Help Text](#help-text)
+ 1. [Changing the input rune](#changing-the-input-rune)
+1. [Changing the Icons ](#changing-the-icons)
+1. [Custom Types](#custom-types)
+1. [Testing](#testing)
+1. [FAQ](#faq)
+
+## Examples
+
+Examples can be found in the `examples/` directory. Run them
+to see basic behavior:
+
+```bash
+go get github.com/AlecAivazis/survey/v2
+
+cd $GOPATH/src/github.com/AlecAivazis/survey
+
+go run examples/simple.go
+go run examples/validation.go
+```
+
+## Running the Prompts
+
+There are two primary ways to execute prompts and start collecting information from your users: `Ask` and
+`AskOne`. The primary difference is whether you are interested in collecting a single piece of information
+or if you have a list of questions to ask whose answers should be collected in a single struct.
+For most basic usecases, `Ask` should be enough. However, for surveys with complicated branching logic,
+we recommend that you break out your questions into multiple calls to both of these functions to fit your needs.
+
+### Configuring the Prompts
+
+Most prompts take fine-grained configuration through fields on the structs you instantiate. It is also
+possible to change survey's default behaviors by passing `AskOpts` to either `Ask` or `AskOne`. Examples
+in this document will do both interchangeably:
+
+```golang
+prompt := &Select{
+ Message: "Choose a color:",
+ Options: []string{"red", "blue", "green"},
+ // can pass a validator directly
+ Validate: survey.Required,
+}
+
+// or define a default for the single call to `AskOne`
+// the answer will get written to the color variable
+survey.AskOne(prompt, &color, survey.WithValidator(survey.Required))
+
+// or define a default for every entry in a list of questions
+// the answer will get copied into the matching field of the struct as shown above
+survey.Ask(questions, &answers, survey.WithValidator(survey.Required))
+```
+
+## Prompts
+
+### Input
+
+
+
+```golang
+name := ""
+prompt := &survey.Input{
+ Message: "ping",
+}
+survey.AskOne(prompt, &name)
+```
+
+#### Suggestion Options
+
+
+
+```golang
+file := ""
+prompt := &survey.Input{
+ Message: "inform a file to save:",
+ Suggest: func (toComplete string) []string {
+ files, _ := filepath.Glob(toComplete + "*")
+ return files
+ },
+}
+}
+survey.AskOne(prompt, &file)
+```
+
+### Multiline
+
+
+
+```golang
+text := ""
+prompt := &survey.Multiline{
+ Message: "ping",
+}
+survey.AskOne(prompt, &text)
+```
+
+### Password
+
+
+
+```golang
+password := ""
+prompt := &survey.Password{
+ Message: "Please type your password",
+}
+survey.AskOne(prompt, &password)
+```
+
+### Confirm
+
+
+
+```golang
+name := false
+prompt := &survey.Confirm{
+ Message: "Do you like pie?",
+}
+survey.AskOne(prompt, &name)
+```
+
+### Select
+
+
+
+```golang
+color := ""
+prompt := &survey.Select{
+ Message: "Choose a color:",
+ Options: []string{"red", "blue", "green"},
+}
+survey.AskOne(prompt, &color)
+```
+
+Fields and values that come from a `Select` prompt can be one of two different things. If you pass an `int`
+the field will have the value of the selected index. If you instead pass a string, the string value selected
+will be written to the field.
+
+The user can also press `esc` to toggle the ability cycle through the options with the j and k keys to do down and up respectively.
+
+By default, the select prompt is limited to showing 7 options at a time
+and will paginate lists of options longer than that. This can be changed a number of ways:
+
+```golang
+// as a field on a single select
+prompt := &survey.MultiSelect{..., PageSize: 10}
+
+// or as an option to Ask or AskOne
+survey.AskOne(prompt, &days, survey.WithPageSize(10))
+```
+
+### MultiSelect
+
+
+
+```golang
+days := []string{}
+prompt := &survey.MultiSelect{
+ Message: "What days do you prefer:",
+ Options: []string{"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"},
+}
+survey.AskOne(prompt, &days)
+```
+
+Fields and values that come from a `MultiSelect` prompt can be one of two different things. If you pass an `int`
+the field will have a slice of the selected indices. If you instead pass a string, a slice of the string values
+selected will be written to the field.
+
+The user can also press `esc` to toggle the ability cycle through the options with the j and k keys to do down and up respectively.
+
+By default, the MultiSelect prompt is limited to showing 7 options at a time
+and will paginate lists of options longer than that. This can be changed a number of ways:
+
+```golang
+// as a field on a single select
+prompt := &survey.MultiSelect{..., PageSize: 10}
+
+// or as an option to Ask or AskOne
+survey.AskOne(prompt, &days, survey.WithPageSize(10))
+```
+
+### Editor
+
+Launches the user's preferred editor (defined by the \$VISUAL or \$EDITOR environment variables) on a
+temporary file. Once the user exits their editor, the contents of the temporary file are read in as
+the result. If neither of those are present, notepad (on Windows) or vim (Linux or Mac) is used.
+
+You can also specify a [pattern](https://golang.org/pkg/io/ioutil/#TempFile) for the name of the temporary file. This
+can be useful for ensuring syntax highlighting matches your usecase.
+
+```golang
+prompt := &survey.Editor{
+ Message: "Shell code snippet",
+ FileName: "*.sh",
+}
+
+survey.AskOne(prompt, &content)
+```
+
+## Filtering Options
+
+By default, the user can filter for options in Select and MultiSelects by typing while the prompt
+is active. This will filter out all options that don't contain the typed string anywhere in their name, ignoring case.
+
+A custom filter function can also be provided to change this behavior:
+
+```golang
+func myFilter(filterValue string, optValue string, optIndex int) bool {
+ // only include the option if it includes the filter and has length greater than 5
+ return strings.Contains(optValue, filterValue) && len(optValue) >= 5
+}
+
+// configure it for a specific prompt
+&Select{
+ Message: "Choose a color:",
+ Options: []string{"red", "blue", "green"},
+ Filter: myFilter,
+}
+
+// or define a default for all of the questions
+survey.AskOne(prompt, &color, survey.WithFilter(myFilter))
+```
+
+## Keeping the filter active
+
+By default the filter will disappear if the user selects one of the filtered elements. Once the user selects one element the filter setting is gone.
+
+However the user can prevent this from happening and keep the filter active for multiple selections in a e.g. MultiSelect:
+
+```golang
+// configure it for a specific prompt
+&Select{
+ Message: "Choose a color:",
+ Options: []string{"light-green", "green", "dark-green", "red"},
+ KeepFilter: true,
+}
+
+// or define a default for all of the questions
+survey.AskOne(prompt, &color, survey.WithKeepFilter(true))
+```
+
+## Validation
+
+Validating individual responses for a particular question can be done by defining a
+`Validate` field on the `survey.Question` to be validated. This function takes an
+`interface{}` type and returns an error to show to the user, prompting them for another
+response. Like usual, validators can be provided directly to the prompt or with `survey.WithValidator`:
+
+```golang
+q := &survey.Question{
+ Prompt: &survey.Input{Message: "Hello world validation"},
+ Validate: func (val interface{}) error {
+ // since we are validating an Input, the assertion will always succeed
+ if str, ok := val.(string) ; !ok || len(str) > 10 {
+ return errors.New("This response cannot be longer than 10 characters.")
+ }
+ return nil
+ },
+}
+
+color := ""
+prompt := &survey.Input{ Message: "Whats your name?" }
+
+// you can pass multiple validators here and survey will make sure each one passes
+survey.AskOne(prompt, &color, survey.WithValidator(survey.Required))
+```
+
+### Built-in Validators
+
+`survey` comes prepackaged with a few validators to fit common situations. Currently these
+validators include:
+
+| name | valid types | description | notes |
+| ------------ | ----------- | ----------------------------------------------------------- | ------------------------------------------------------------------------------------- |
+| Required | any | Rejects zero values of the response type | Boolean values pass straight through since the zero value (false) is a valid response |
+| MinLength(n) | string | Enforces that a response is at least the given length | |
+| MaxLength(n) | string | Enforces that a response is no longer than the given length | |
+
+## Help Text
+
+All of the prompts have a `Help` field which can be defined to provide more information to your users:
+
+
+
+```golang
+&survey.Input{
+ Message: "What is your phone number:",
+ Help: "Phone number should include the area code",
+}
+```
+
+### Changing the input rune
+
+In some situations, `?` is a perfectly valid response. To handle this, you can change the rune that survey
+looks for with `WithHelpInput`:
+
+```golang
+import (
+ "github.com/AlecAivazis/survey/v2"
+)
+
+number := ""
+prompt := &survey.Input{
+ Message: "If you have this need, please give me a reasonable message.",
+ Help: "I couldn't come up with one.",
+}
+
+survey.AskOne(prompt, &number, survey.WithHelpInput('^'))
+```
+
+## Changing the Icons
+
+Changing the icons and their color/format can be done by passing the `WithIcons` option. The format
+follows the patterns outlined [here](https://github.com/mgutz/ansi#style-format). For example:
+
+```golang
+import (
+ "github.com/AlecAivazis/survey/v2"
+)
+
+number := ""
+prompt := &survey.Input{
+ Message: "If you have this need, please give me a reasonable message.",
+ Help: "I couldn't come up with one.",
+}
+
+survey.AskOne(prompt, &number, survey.WithIcons(func(icons *survey.IconSet) {
+ // you can set any icons
+ icons.Question.Text = "⁇"
+ // for more information on formatting the icons, see here: https://github.com/mgutz/ansi#style-format
+ icons.Question.Format = "yellow+hb"
+}))
+```
+
+The icons and their default text and format are summarized below:
+
+| name | text | format | description |
+| -------------- | ---- | ---------- | ------------------------------------------------------------- |
+| Error | X | red | Before an error |
+| Help | i | cyan | Before help text |
+| Question | ? | green+hb | Before the message of a prompt |
+| SelectFocus | > | green | Marks the current focus in `Select` and `MultiSelect` prompts |
+| UnmarkedOption | [ ] | default+hb | Marks an unselected option in a `MultiSelect` prompt |
+| MarkedOption | [x] | cyan+b | Marks a chosen selection in a `MultiSelect` prompt |
+
+## Custom Types
+
+survey will assign prompt answers to your custom types if they implement this interface:
+
+```golang
+type Settable interface {
+ WriteAnswer(field string, value interface{}) error
+}
+```
+
+Here is an example how to use them:
+
+```golang
+type MyValue struct {
+ value string
+}
+func (my *MyValue) WriteAnswer(name string, value interface{}) error {
+ my.value = value.(string)
+}
+
+myval := MyValue{}
+survey.AskOne(
+ &survey.Input{
+ Message: "Enter something:",
+ },
+ &myval
+)
+```
+
+## Testing
+
+You can test your program's interactive prompts using [go-expect](https://github.com/Netflix/go-expect). The library
+can be used to expect a match on stdout and respond on stdin. Since `os.Stdout` in a `go test` process is not a TTY,
+if you are manipulating the cursor or using `survey`, you will need a way to interpret terminal / ANSI escape sequences
+for things like `CursorLocation`. `vt10x.NewVT10XConsole` will create a `go-expect` console that also multiplexes
+stdio to an in-memory [virtual terminal](https://github.com/hinshun/vt10x).
+
+For some examples, you can see any of the tests in this repo.
+
+## FAQ
+
+### What kinds of IO are supported by `survey`?
+survey aims to support most terminal emulators; it expects support for ANSI escape sequences.
+This means that reading from piped stdin or writing to piped stdout is **not supported**,
+and likely to break your application in these situations. See [#337](https://github.com/AlecAivazis/survey/pull/337#issue-581351617)
+
+### Why isn't sending a SIGINT (aka. CTRL-C) signal working?
+
+When you send an interrupt signal to the process, it only interrupts the current prompt instead of the entire process. This manifests in a `github.com/AlecAivazis/survey/v2/terminal.InterruptErr` being returned from `Ask` and `AskOne`. If you want to stop the process, handle the returned error in your code:
+
+```go
+err := survey.AskOne(prompt, &myVar)
+if err == terminal.InterruptErr {
+ fmt.Println("interrupted")
+
+ os.Exit(0)
+} else if err != nil {
+ panic(err)
+}
+```
+
diff --git a/vendor/gopkg.in/AlecAivazis/survey.v1/_tasks.hcl b/vendor/github.com/AlecAivazis/survey/v2/_tasks.hcl
similarity index 90%
rename from vendor/gopkg.in/AlecAivazis/survey.v1/_tasks.hcl
rename to vendor/github.com/AlecAivazis/survey/v2/_tasks.hcl
index ae970f33748..aaa47687a4d 100644
--- a/vendor/gopkg.in/AlecAivazis/survey.v1/_tasks.hcl
+++ b/vendor/github.com/AlecAivazis/survey/v2/_tasks.hcl
@@ -8,12 +8,12 @@ task "install-deps" {
task "tests" {
description = "Run the test suite"
command = "go test {{.files}}"
- environment {
+ environment = {
GOFLAGS = "-mod=vendor"
}
}
-variables {
+variables = {
files = "$(go list -v ./... | grep -iEv \"tests|examples\")"
}
diff --git a/vendor/gopkg.in/AlecAivazis/survey.v1/confirm.go b/vendor/github.com/AlecAivazis/survey/v2/confirm.go
similarity index 68%
rename from vendor/gopkg.in/AlecAivazis/survey.v1/confirm.go
rename to vendor/github.com/AlecAivazis/survey/v2/confirm.go
index 5672c52d36e..8e5d7efaaf8 100644
--- a/vendor/gopkg.in/AlecAivazis/survey.v1/confirm.go
+++ b/vendor/github.com/AlecAivazis/survey/v2/confirm.go
@@ -3,13 +3,11 @@ package survey
import (
"fmt"
"regexp"
-
- "gopkg.in/AlecAivazis/survey.v1/core"
)
// Confirm is a regular text input that accept yes/no answers. Response type is a bool.
type Confirm struct {
- core.Renderer
+ Renderer
Message string
Default bool
Help string
@@ -20,17 +18,18 @@ type ConfirmTemplateData struct {
Confirm
Answer string
ShowHelp bool
+ Config *PromptConfig
}
// Templates with Color formatting. See Documentation: https://github.com/mgutz/ansi#style-format
var ConfirmQuestionTemplate = `
-{{- if .ShowHelp }}{{- color "cyan"}}{{ HelpIcon }} {{ .Help }}{{color "reset"}}{{"\n"}}{{end}}
-{{- color "green+hb"}}{{ QuestionIcon }} {{color "reset"}}
+{{- if .ShowHelp }}{{- color .Config.Icons.Help.Format }}{{ .Config.Icons.Help.Text }} {{ .Help }}{{color "reset"}}{{"\n"}}{{end}}
+{{- color .Config.Icons.Question.Format }}{{ .Config.Icons.Question.Text }} {{color "reset"}}
{{- color "default+hb"}}{{ .Message }} {{color "reset"}}
{{- if .Answer}}
{{- color "cyan"}}{{.Answer}}{{color "reset"}}{{"\n"}}
{{- else }}
- {{- if and .Help (not .ShowHelp)}}{{color "cyan"}}[{{ HelpInputRune }} for help]{{color "reset"}} {{end}}
+ {{- if and .Help (not .ShowHelp)}}{{color "cyan"}}[{{ .Config.HelpInput }} for help]{{color "reset"}} {{end}}
{{- color "white"}}{{if .Default}}(Y/n) {{else}}(y/N) {{end}}{{color "reset"}}
{{- end}}`
@@ -47,7 +46,7 @@ func yesNo(t bool) string {
return "No"
}
-func (c *Confirm) getBool(showHelp bool) (bool, error) {
+func (c *Confirm) getBool(showHelp bool, config *PromptConfig) (bool, error) {
cursor := c.NewCursor()
rr := c.NewRuneReader()
rr.SetTermMode()
@@ -72,10 +71,14 @@ func (c *Confirm) getBool(showHelp bool) (bool, error) {
answer = false
case val == "":
answer = c.Default
- case val == string(core.HelpInputRune) && c.Help != "":
+ case val == config.HelpInput && c.Help != "":
err := c.Render(
ConfirmQuestionTemplate,
- ConfirmTemplateData{Confirm: *c, ShowHelp: true},
+ ConfirmTemplateData{
+ Confirm: *c,
+ ShowHelp: true,
+ Config: config,
+ },
)
if err != nil {
// use the default value and bubble up
@@ -85,12 +88,16 @@ func (c *Confirm) getBool(showHelp bool) (bool, error) {
continue
default:
// we didnt get a valid answer, so print error and prompt again
- if err := c.Error(fmt.Errorf("%q is not a valid answer, please try again.", val)); err != nil {
+ if err := c.Error(config, fmt.Errorf("%q is not a valid answer, please try again.", val)); err != nil {
return c.Default, err
}
err := c.Render(
ConfirmQuestionTemplate,
- ConfirmTemplateData{Confirm: *c, ShowHelp: showHelp},
+ ConfirmTemplateData{
+ Confirm: *c,
+ ShowHelp: showHelp,
+ Config: config,
+ },
)
if err != nil {
// use the default value and bubble up
@@ -110,29 +117,37 @@ by a carriage return.
likesPie := false
prompt := &survey.Confirm{ Message: "What is your name?" }
- survey.AskOne(prompt, &likesPie, nil)
+ survey.AskOne(prompt, &likesPie)
*/
-func (c *Confirm) Prompt() (interface{}, error) {
+func (c *Confirm) Prompt(config *PromptConfig) (interface{}, error) {
// render the question template
err := c.Render(
ConfirmQuestionTemplate,
- ConfirmTemplateData{Confirm: *c},
+ ConfirmTemplateData{
+ Confirm: *c,
+ Config: config,
+ },
)
if err != nil {
return "", err
}
// get input and return
- return c.getBool(false)
+ return c.getBool(false, config)
}
// Cleanup overwrite the line with the finalized formatted version
-func (c *Confirm) Cleanup(val interface{}) error {
+func (c *Confirm) Cleanup(config *PromptConfig, val interface{}) error {
// if the value was previously true
ans := yesNo(val.(bool))
+
// render the template
return c.Render(
ConfirmQuestionTemplate,
- ConfirmTemplateData{Confirm: *c, Answer: ans},
+ ConfirmTemplateData{
+ Confirm: *c,
+ Answer: ans,
+ Config: config,
+ },
)
}
diff --git a/vendor/github.com/AlecAivazis/survey/v2/core/template.go b/vendor/github.com/AlecAivazis/survey/v2/core/template.go
new file mode 100644
index 00000000000..24dade33882
--- /dev/null
+++ b/vendor/github.com/AlecAivazis/survey/v2/core/template.go
@@ -0,0 +1,91 @@
+package core
+
+import (
+ "bytes"
+ "sync"
+ "text/template"
+
+ "github.com/mgutz/ansi"
+)
+
+// DisableColor can be used to make testing reliable
+var DisableColor = false
+
+var TemplateFuncsWithColor = map[string]interface{}{
+ // Templates with Color formatting. See Documentation: https://github.com/mgutz/ansi#style-format
+ "color": ansi.ColorCode,
+}
+
+var TemplateFuncsNoColor = map[string]interface{}{
+ // Templates without Color formatting. For layout/ testing.
+ "color": func(color string) string {
+ return ""
+ },
+}
+
+//RunTemplate returns two formatted strings given a template and
+//the data it requires. The first string returned is generated for
+//user-facing output and may or may not contain ANSI escape codes
+//for colored output. The second string does not contain escape codes
+//and can be used by the renderer for layout purposes.
+func RunTemplate(tmpl string, data interface{}) (string, string, error) {
+ tPair, err := getTemplatePair(tmpl)
+ if err != nil {
+ return "", "", err
+ }
+ userBuf := bytes.NewBufferString("")
+ err = tPair[0].Execute(userBuf, data)
+ if err != nil {
+ return "", "", err
+ }
+ layoutBuf := bytes.NewBufferString("")
+ err = tPair[1].Execute(layoutBuf, data)
+ if err != nil {
+ return userBuf.String(), "", err
+ }
+ return userBuf.String(), layoutBuf.String(), err
+}
+
+var (
+ memoizedGetTemplate = map[string][2]*template.Template{}
+
+ memoMutex = &sync.RWMutex{}
+)
+
+//getTemplatePair returns a pair of compiled templates where the
+//first template is generated for user-facing output and the
+//second is generated for use by the renderer. The second
+//template does not contain any color escape codes, whereas
+//the first template may or may not depending on DisableColor.
+func getTemplatePair(tmpl string) ([2]*template.Template, error) {
+ memoMutex.RLock()
+ if t, ok := memoizedGetTemplate[tmpl]; ok {
+ memoMutex.RUnlock()
+ return t, nil
+ }
+ memoMutex.RUnlock()
+
+ templatePair := [2]*template.Template{nil, nil}
+
+ templateNoColor, err := template.New("prompt").Funcs(TemplateFuncsNoColor).Parse(tmpl)
+ if err != nil {
+ return [2]*template.Template{}, err
+ }
+
+ templatePair[1] = templateNoColor
+
+ if DisableColor {
+ templatePair[0] = templatePair[1]
+ } else {
+ templateWithColor, err := template.New("prompt").Funcs(TemplateFuncsWithColor).Parse(tmpl)
+ templatePair[0] = templateWithColor
+ if err != nil {
+ return [2]*template.Template{}, err
+ }
+ }
+
+ memoMutex.Lock()
+ memoizedGetTemplate[tmpl] = templatePair
+ memoMutex.Unlock()
+ return templatePair, nil
+}
diff --git a/vendor/gopkg.in/AlecAivazis/survey.v1/core/write.go b/vendor/github.com/AlecAivazis/survey/v2/core/write.go
similarity index 63%
rename from vendor/gopkg.in/AlecAivazis/survey.v1/core/write.go
rename to vendor/github.com/AlecAivazis/survey/v2/core/write.go
index cef763537ff..47d0e498ca2 100644
--- a/vendor/gopkg.in/AlecAivazis/survey.v1/core/write.go
+++ b/vendor/github.com/AlecAivazis/survey/v2/core/write.go
@@ -6,19 +6,35 @@ import (
"reflect"
"strconv"
"strings"
+ "time"
)
// the tag used to denote the name of the question
const tagName = "survey"
-// add a few interfaces so users can configure how the prompt values are set
-type settable interface {
+// Settable allow for configuration when assigning answers
+type Settable interface {
WriteAnswer(field string, value interface{}) error
}
+// OptionAnswer is the return type of Selects/MultiSelects that lets the appropriate information
+// get copied to the user's struct
+type OptionAnswer struct {
+ Value string
+ Index int
+}
+
+func OptionAnswerList(incoming []string) []OptionAnswer {
+ list := []OptionAnswer{}
+ for i, opt := range incoming {
+ list = append(list, OptionAnswer{Value: opt, Index: i})
+ }
+ return list
+}
+
func WriteAnswer(t interface{}, name string, v interface{}) (err error) {
// if the field is a custom type
- if s, ok := t.(settable); ok {
+ if s, ok := t.(Settable); ok {
// use the interface method
return s.WriteAnswer(name, v)
}
@@ -39,6 +55,13 @@ func WriteAnswer(t interface{}, name string, v interface{}) (err error) {
switch elem.Kind() {
// if we are writing to a struct
case reflect.Struct:
+ // if we are writing to an option answer than we want to treat
+ // it like a single thing and not a place to deposit answers
+ if elem.Type().Name() == "OptionAnswer" {
+ // copy the value over to the normal struct
+ return copy(elem, value)
+ }
+
// get the name of the field that matches the string we were given
fieldIndex, err := findFieldIndex(elem, name)
// if something went wrong
@@ -47,13 +70,13 @@ func WriteAnswer(t interface{}, name string, v interface{}) (err error) {
return err
}
field := elem.Field(fieldIndex)
- // handle references to the settable interface aswell
- if s, ok := field.Interface().(settable); ok {
+ // handle references to the Settable interface aswell
+ if s, ok := field.Interface().(Settable); ok {
// use the interface method
return s.WriteAnswer(name, v)
}
if field.CanAddr() {
- if s, ok := field.Addr().Interface().(settable); ok {
+ if s, ok := field.Addr().Interface().(Settable); ok {
// use the interface method
return s.WriteAnswer(name, v)
}
@@ -63,7 +86,25 @@ func WriteAnswer(t interface{}, name string, v interface{}) (err error) {
return copy(field, value)
case reflect.Map:
mapType := reflect.TypeOf(t).Elem()
- if mapType.Key().Kind() != reflect.String || mapType.Elem().Kind() != reflect.Interface {
+ if mapType.Key().Kind() != reflect.String {
+ return errors.New("answer maps key must be of type string")
+ }
+
+ // copy only string value/index value to map if,
+ // map is not of type interface and is 'OptionAnswer'
+ if value.Type().Name() == "OptionAnswer" {
+ if kval := mapType.Elem().Kind(); kval == reflect.String {
+ mt := *t.(*map[string]string)
+ mt[name] = value.FieldByName("Value").String()
+ return nil
+ } else if kval == reflect.Int {
+ mt := *t.(*map[string]int)
+ mt[name] = int(value.FieldByName("Index").Int())
+ return nil
+ }
+ }
+
+ if mapType.Elem().Kind() != reflect.Interface {
return errors.New("answer maps must be of type map[string]interface")
}
mt := *t.(*map[string]interface{})
@@ -74,6 +115,45 @@ func WriteAnswer(t interface{}, name string, v interface{}) (err error) {
return copy(elem, value)
}
+type errFieldNotMatch struct {
+ questionName string
+}
+
+func (err errFieldNotMatch) Error() string {
+ return fmt.Sprintf("could not find field matching %v", err.questionName)
+}
+
+func (err errFieldNotMatch) Is(target error) bool { // implements the dynamic errors.Is interface.
+ if target != nil {
+ if name, ok := IsFieldNotMatch(target); ok {
+ // if have a filled questionName then perform "deeper" comparison.
+ return name == "" || err.questionName == "" || name == err.questionName
+ }
+ }
+
+ return false
+}
+
+// IsFieldNotMatch reports whether an "err" is caused by a non matching field.
+// It returns the Question.Name that couldn't be matched with a destination field.
+//
+// Usage:
+// err := survey.Ask(qs, &v);
+// if err != nil {
+// if name, ok := core.IsFieldNotMatch(err); ok {
+// [...name is the not matched question name]
+// }
+// }
+func IsFieldNotMatch(err error) (string, bool) {
+ if err != nil {
+ if v, ok := err.(errFieldNotMatch); ok {
+ return v.questionName, true
+ }
+ }
+
+ return "", false
+}
+
// BUG(AlecAivazis): the current implementation might cause weird conflicts if there are
// two fields with same name that only differ by casing.
func findFieldIndex(s reflect.Value, name string) (int, error) {
@@ -106,7 +186,7 @@ func findFieldIndex(s reflect.Value, name string) (int, error) {
}
// we didn't find the field
- return -1, fmt.Errorf("could not find field matching %v", name)
+ return -1, errFieldNotMatch{name}
}
// isList returns true if the element is something we can Len()
@@ -165,7 +245,11 @@ func copy(t reflect.Value, v reflect.Value) (err error) {
castVal = int32(val64)
}
case reflect.Int64:
- castVal, casterr = strconv.ParseInt(vString, 10, 64)
+ if t.Type() == reflect.TypeOf(time.Duration(0)) {
+ castVal, casterr = time.ParseDuration(vString)
+ } else {
+ castVal, casterr = strconv.ParseInt(vString, 10, 64)
+ }
case reflect.Uint:
var val64 uint64
val64, casterr = strconv.ParseUint(vString, 10, 8)
@@ -212,6 +296,32 @@ func copy(t reflect.Value, v reflect.Value) (err error) {
return
}
+ // if we are copying from an OptionAnswer to something
+ if v.Type().Name() == "OptionAnswer" {
+ // copying an option answer to a string
+ if t.Kind() == reflect.String {
+ // copies the Value field of the struct
+ t.Set(reflect.ValueOf(v.FieldByName("Value").Interface()))
+ return
+ }
+
+ // copying an option answer to an int
+ if t.Kind() == reflect.Int {
+ // copies the Index field of the struct
+ t.Set(reflect.ValueOf(v.FieldByName("Index").Interface()))
+ return
+ }
+
+ // copying an OptionAnswer to an OptionAnswer
+ if t.Type().Name() == "OptionAnswer" {
+ t.Set(v)
+ return
+ }
+
+ // we're copying an option answer to an incorrect type
+ return fmt.Errorf("Unable to convert from OptionAnswer to type %s", t.Kind())
+ }
+
// if we are copying from one slice or array to another
if isList(v) && isList(t) {
// loop over every item in the desired value
diff --git a/vendor/gopkg.in/AlecAivazis/survey.v1/editor.go b/vendor/github.com/AlecAivazis/survey/v2/editor.go
similarity index 75%
rename from vendor/gopkg.in/AlecAivazis/survey.v1/editor.go
rename to vendor/github.com/AlecAivazis/survey/v2/editor.go
index 895fe490d84..ec6a1417822 100644
--- a/vendor/gopkg.in/AlecAivazis/survey.v1/editor.go
+++ b/vendor/github.com/AlecAivazis/survey/v2/editor.go
@@ -7,9 +7,8 @@ import (
"os/exec"
"runtime"
+ "github.com/AlecAivazis/survey/v2/terminal"
shellquote "github.com/kballard/go-shellquote"
- "gopkg.in/AlecAivazis/survey.v1/core"
- "gopkg.in/AlecAivazis/survey.v1/terminal"
)
/*
@@ -23,16 +22,17 @@ Response type is a string.
message := ""
prompt := &survey.Editor{ Message: "What is your commit message?" }
- survey.AskOne(prompt, &message, nil)
+ survey.AskOne(prompt, &message)
*/
type Editor struct {
- core.Renderer
+ Renderer
Message string
Default string
Help string
Editor string
HideDefault bool
AppendDefault bool
+ FileName string
}
// data available to the templates when processing
@@ -41,17 +41,18 @@ type EditorTemplateData struct {
Answer string
ShowAnswer bool
ShowHelp bool
+ Config *PromptConfig
}
// Templates with Color formatting. See Documentation: https://github.com/mgutz/ansi#style-format
var EditorQuestionTemplate = `
-{{- if .ShowHelp }}{{- color "cyan"}}{{ HelpIcon }} {{ .Help }}{{color "reset"}}{{"\n"}}{{end}}
-{{- color "green+hb"}}{{ QuestionIcon }} {{color "reset"}}
+{{- if .ShowHelp }}{{- color .Config.Icons.Help.Format }}{{ .Config.Icons.Help.Text }} {{ .Help }}{{color "reset"}}{{"\n"}}{{end}}
+{{- color .Config.Icons.Question.Format }}{{ .Config.Icons.Question.Text }} {{color "reset"}}
{{- color "default+hb"}}{{ .Message }} {{color "reset"}}
{{- if .ShowAnswer}}
{{- color "cyan"}}{{.Answer}}{{color "reset"}}{{"\n"}}
{{- else }}
- {{- if and .Help (not .ShowHelp)}}{{color "cyan"}}[{{ HelpInputRune }} for help]{{color "reset"}} {{end}}
+ {{- if and .Help (not .ShowHelp)}}{{color "cyan"}}[{{ .Config.HelpInput }} for help]{{color "reset"}} {{end}}
{{- if and .Default (not .HideDefault)}}{{color "white"}}({{.Default}}) {{color "reset"}}{{end}}
{{- color "cyan"}}[Enter to launch editor] {{color "reset"}}
{{- end}}`
@@ -72,24 +73,27 @@ func init() {
}
}
-func (e *Editor) PromptAgain(invalid interface{}, err error) (interface{}, error) {
+func (e *Editor) PromptAgain(config *PromptConfig, invalid interface{}, err error) (interface{}, error) {
initialValue := invalid.(string)
- return e.prompt(initialValue)
+ return e.prompt(initialValue, config)
}
-func (e *Editor) Prompt() (interface{}, error) {
+func (e *Editor) Prompt(config *PromptConfig) (interface{}, error) {
initialValue := ""
if e.Default != "" && e.AppendDefault {
initialValue = e.Default
}
- return e.prompt(initialValue)
+ return e.prompt(initialValue, config)
}
-func (e *Editor) prompt(initialValue string) (interface{}, error) {
+func (e *Editor) prompt(initialValue string, config *PromptConfig) (interface{}, error) {
// render the template
err := e.Render(
EditorQuestionTemplate,
- EditorTemplateData{Editor: *e},
+ EditorTemplateData{
+ Editor: *e,
+ Config: config,
+ },
)
if err != nil {
return "", err
@@ -118,10 +122,14 @@ func (e *Editor) prompt(initialValue string) (interface{}, error) {
if r == terminal.KeyEndTransmission {
break
}
- if r == core.HelpInputRune && e.Help != "" {
+ if string(r) == config.HelpInput && e.Help != "" {
err = e.Render(
EditorQuestionTemplate,
- EditorTemplateData{Editor: *e, ShowHelp: true},
+ EditorTemplateData{
+ Editor: *e,
+ ShowHelp: true,
+ Config: config,
+ },
)
if err != nil {
return "", err
@@ -131,7 +139,11 @@ func (e *Editor) prompt(initialValue string) (interface{}, error) {
}
// prepare the temp file
- f, err := ioutil.TempFile("", "survey")
+ pattern := e.FileName
+ if pattern == "" {
+ pattern = "survey*.txt"
+ }
+ f, err := ioutil.TempFile("", pattern)
if err != nil {
return "", err
}
@@ -197,9 +209,14 @@ func (e *Editor) prompt(initialValue string) (interface{}, error) {
return text, nil
}
-func (e *Editor) Cleanup(val interface{}) error {
+func (e *Editor) Cleanup(config *PromptConfig, val interface{}) error {
return e.Render(
EditorQuestionTemplate,
- EditorTemplateData{Editor: *e, Answer: "", ShowAnswer: true},
+ EditorTemplateData{
+ Editor: *e,
+ Answer: "",
+ ShowAnswer: true,
+ Config: config,
+ },
)
}
diff --git a/vendor/github.com/AlecAivazis/survey/v2/filter.go b/vendor/github.com/AlecAivazis/survey/v2/filter.go
new file mode 100644
index 00000000000..56f702678f7
--- /dev/null
+++ b/vendor/github.com/AlecAivazis/survey/v2/filter.go
@@ -0,0 +1 @@
+package survey
diff --git a/vendor/github.com/AlecAivazis/survey/v2/go.mod b/vendor/github.com/AlecAivazis/survey/v2/go.mod
new file mode 100644
index 00000000000..89ea1460860
--- /dev/null
+++ b/vendor/github.com/AlecAivazis/survey/v2/go.mod
@@ -0,0 +1,19 @@
+module github.com/AlecAivazis/survey/v2
+
+require (
+ github.com/Netflix/go-expect v0.0.0-20180615182759-c93bf25de8e8
+ github.com/davecgh/go-spew v1.1.1 // indirect
+ github.com/hinshun/vt10x v0.0.0-20180616224451-1954e6464174
+ github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51
+ github.com/kr/pty v1.1.4
+ github.com/mattn/go-colorable v0.1.2 // indirect
+ github.com/mattn/go-isatty v0.0.8
+ github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b
+ github.com/pmezard/go-difflib v1.0.0 // indirect
+ github.com/stretchr/testify v1.2.1
+ golang.org/x/crypto v0.0.0-20190530122614-20be4c3c3ed5
+ golang.org/x/sys v0.0.0-20190530182044-ad28b68e88f1 // indirect
+ golang.org/x/text v0.3.3
+)
+
+go 1.13
diff --git a/vendor/gopkg.in/AlecAivazis/survey.v1/go.sum b/vendor/github.com/AlecAivazis/survey/v2/go.sum
similarity index 67%
rename from vendor/gopkg.in/AlecAivazis/survey.v1/go.sum
rename to vendor/github.com/AlecAivazis/survey/v2/go.sum
index 882bd9a641b..26bff6b5556 100644
--- a/vendor/gopkg.in/AlecAivazis/survey.v1/go.sum
+++ b/vendor/github.com/AlecAivazis/survey/v2/go.sum
@@ -1,26 +1,15 @@
-github.com/AlecAivazis/survey v1.8.7 h1:QIBq36/0wfYpXxdBqDXNAjKHx1bKnRGu/EDnva27k84=
-github.com/AlecAivazis/survey/v2 v2.0.5 h1:xpZp+Q55wi5C7Iaze+40onHnEkex1jSc34CltJjOoPM=
-github.com/AlecAivazis/survey/v2 v2.0.5/go.mod h1:WYBhg6f0y/fNYUuesWQc0PKbJcEliGcYHB9sNT3Bg74=
github.com/Netflix/go-expect v0.0.0-20180615182759-c93bf25de8e8 h1:xzYJEypr/85nBpB11F9br+3HUrpgb+fcm5iADzXXYEw=
github.com/Netflix/go-expect v0.0.0-20180615182759-c93bf25de8e8/go.mod h1:oX5x61PbNXchhh0oikYAH+4Pcfw5LKv21+Jnpr6r6Pc=
-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/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/hinshun/vt10x v0.0.0-20180616224451-1954e6464174 h1:WlZsjVhE8Af9IcZDGgJGQpNflI3+MJSBhsgT5PCtzBQ=
github.com/hinshun/vt10x v0.0.0-20180616224451-1954e6464174/go.mod h1:DqJ97dSdRW1W22yXSB90986pcOyQ7r45iio1KN2ez1A=
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 h1:Z9n2FFNUXsshfwJMBgNA0RU6/i7WVaAegv3PtuIHPMs=
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8=
-github.com/kr/pty v1.1.1 h1:VkoXIwSboBpnk99O/KFauAEILuNHv5DVFKZMBN/gUgw=
-github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/pty v1.1.4 h1:5Myjjh3JY/NaAi4IsUbHADytDyl1VE1Y9PXDlL+P/VQ=
github.com/kr/pty v1.1.4/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
-github.com/mattn/go-colorable v0.0.9 h1:UVL0vNpWh04HeJXV0KLcaT7r06gOH2l4OW6ddYRUIY4=
-github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU=
github.com/mattn/go-colorable v0.1.2 h1:/bC9yWikZXAL9uJdulbSfyVNIR3n3trXl+v8+1sx8mU=
github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE=
-github.com/mattn/go-isatty v0.0.3 h1:ns/ykhmWi7G9O+8a448SecJU3nSMBXJfqQkl0upE1jI=
-github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
github.com/mattn/go-isatty v0.0.8 h1:HLtExJ+uU2HOZ+wI0Tt5DtUDrx8yhUqDcp7fYERX4CE=
github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b h1:j7+1HpAFS1zy5+Q4qx1fWh90gTKwiN4QCGoY9TWyyO4=
@@ -29,16 +18,19 @@ 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/stretchr/testify v1.2.1 h1:52QO5WkIUcHGIR7EnGagH88x1bUzqGXTC5/1bDTUQ7U=
github.com/stretchr/testify v1.2.1/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
-golang.org/x/crypto v0.0.0-20190123085648-057139ce5d2b h1:Elez2XeF2p9uyVj0yEUDqQ56NFcDtcBNkYP7yv8YbUE=
-golang.org/x/crypto v0.0.0-20190123085648-057139ce5d2b/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-20190530122614-20be4c3c3ed5 h1:8dUaAV7K4uHsF56JQWkprecIQKdPHtR9jCHF5nB8uzc=
golang.org/x/crypto v0.0.0-20190530122614-20be4c3c3ed5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
+golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3 h1:0GoQqolDA55aaLxZyTzK/Y2ePZzZTUrRacwib7cNsYQ=
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
-golang.org/x/sys v0.0.0-20180606202747-9527bec2660b h1:5rOiLYVqtE+JehJPVJTXQJaP8aT3cpJC1Iy22+5WLFU=
-golang.org/x/sys v0.0.0-20180606202747-9527bec2660b/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-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190530182044-ad28b68e88f1 h1:R4dVlxdmKenVdMRS/tTspEpSTRWINYrHD8ySIU9yCIU=
golang.org/x/sys v0.0.0-20190530182044-ad28b68e88f1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
+golang.org/x/text v0.3.3 h1:cokOdA+Jmi5PJGXLlLllQSgYigAEfHXJAERHVMaCc2k=
+golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
+golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e h1:FDhOuMEY4JVRztM/gsbk+IKUQ8kj74bxZrgw87eMMVc=
+golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
diff --git a/vendor/github.com/AlecAivazis/survey/v2/input.go b/vendor/github.com/AlecAivazis/survey/v2/input.go
new file mode 100644
index 00000000000..9c1a293abb6
--- /dev/null
+++ b/vendor/github.com/AlecAivazis/survey/v2/input.go
@@ -0,0 +1,212 @@
+package survey
+
+import (
+ "github.com/AlecAivazis/survey/v2/core"
+ "github.com/AlecAivazis/survey/v2/terminal"
+)
+
+/*
+Input is a regular text input that prints each character the user types on the screen
+and accepts the input with the enter key. Response type is a string.
+
+ name := ""
+ prompt := &survey.Input{ Message: "What is your name?" }
+ survey.AskOne(prompt, &name)
+*/
+type Input struct {
+ Renderer
+ Message string
+ Default string
+ Help string
+ Suggest func(toComplete string) []string
+ typedAnswer string
+ answer string
+ options []core.OptionAnswer
+ selectedIndex int
+ showingHelp bool
+}
+
+// data available to the templates when processing
+type InputTemplateData struct {
+ Input
+ ShowAnswer bool
+ ShowHelp bool
+ Answer string
+ PageEntries []core.OptionAnswer
+ SelectedIndex int
+ Config *PromptConfig
+}
+
+// Templates with Color formatting. See Documentation: https://github.com/mgutz/ansi#style-format
+var InputQuestionTemplate = `
+{{- if .ShowHelp }}{{- color .Config.Icons.Help.Format }}{{ .Config.Icons.Help.Text }} {{ .Help }}{{color "reset"}}{{"\n"}}{{end}}
+{{- color .Config.Icons.Question.Format }}{{ .Config.Icons.Question.Text }} {{color "reset"}}
+{{- color "default+hb"}}{{ .Message }} {{color "reset"}}
+{{- if .ShowAnswer}}
+ {{- color "cyan"}}{{.Answer}}{{color "reset"}}{{"\n"}}
+{{- else if .PageEntries -}}
+ {{- .Answer}} [Use arrows to move, enter to select, type to continue]
+ {{- "\n"}}
+ {{- range $ix, $choice := .PageEntries}}
+ {{- if eq $ix $.SelectedIndex }}{{color $.Config.Icons.SelectFocus.Format }}{{ $.Config.Icons.SelectFocus.Text }} {{else}}{{color "default"}} {{end}}
+ {{- $choice.Value}}
+ {{- color "reset"}}{{"\n"}}
+ {{- end}}
+{{- else }}
+ {{- if or (and .Help (not .ShowHelp)) .Suggest }}{{color "cyan"}}[
+ {{- if and .Help (not .ShowHelp)}}{{ print .Config.HelpInput }} for help {{- if and .Suggest}}, {{end}}{{end -}}
+ {{- if and .Suggest }}{{color "cyan"}}{{ print .Config.SuggestInput }} for suggestions{{end -}}
+ ]{{color "reset"}} {{end}}
+ {{- if .Default}}{{color "white"}}({{.Default}}) {{color "reset"}}{{end}}
+ {{- .Answer -}}
+{{- end}}`
+
+func (i *Input) OnChange(key rune, config *PromptConfig) (bool, error) {
+ if key == terminal.KeyEnter || key == '\n' {
+ if i.answer != config.HelpInput || i.Help == "" {
+ // we're done
+ return true, nil
+ } else {
+ i.answer = ""
+ i.showingHelp = true
+ }
+ } else if key == terminal.KeyDeleteWord || key == terminal.KeyDeleteLine {
+ i.answer = ""
+ } else if key == terminal.KeyEscape && i.Suggest != nil {
+ if len(i.options) > 0 {
+ i.answer = i.typedAnswer
+ }
+ i.options = nil
+ } else if key == terminal.KeyArrowUp && len(i.options) > 0 {
+ if i.selectedIndex == 0 {
+ i.selectedIndex = len(i.options) - 1
+ } else {
+ i.selectedIndex--
+ }
+ i.answer = i.options[i.selectedIndex].Value
+ } else if (key == terminal.KeyArrowDown || key == terminal.KeyTab) && len(i.options) > 0 {
+ if i.selectedIndex == len(i.options)-1 {
+ i.selectedIndex = 0
+ } else {
+ i.selectedIndex++
+ }
+ i.answer = i.options[i.selectedIndex].Value
+ } else if key == terminal.KeyTab && i.Suggest != nil {
+ options := i.Suggest(i.answer)
+ i.selectedIndex = 0
+ i.typedAnswer = i.answer
+ if len(options) > 0 {
+ i.answer = options[0]
+ if len(options) == 1 {
+ i.options = nil
+ } else {
+ i.options = core.OptionAnswerList(options)
+ }
+ }
+ } else if key == terminal.KeyDelete || key == terminal.KeyBackspace {
+ if i.answer != "" {
+ runeAnswer := []rune(i.answer)
+ i.answer = string(runeAnswer[0 : len(runeAnswer)-1])
+ }
+ } else if key >= terminal.KeySpace {
+ i.answer += string(key)
+ i.typedAnswer = i.answer
+ i.options = nil
+ }
+
+ pageSize := config.PageSize
+ opts, idx := paginate(pageSize, i.options, i.selectedIndex)
+ err := i.Render(
+ InputQuestionTemplate,
+ InputTemplateData{
+ Input: *i,
+ Answer: i.answer,
+ ShowHelp: i.showingHelp,
+ SelectedIndex: idx,
+ PageEntries: opts,
+ Config: config,
+ },
+ )
+
+ return err != nil, err
+}
+
+func (i *Input) Prompt(config *PromptConfig) (interface{}, error) {
+ // render the template
+ err := i.Render(
+ InputQuestionTemplate,
+ InputTemplateData{
+ Input: *i,
+ Config: config,
+ },
+ )
+ if err != nil {
+ return "", err
+ }
+
+ // start reading runes from the standard in
+ rr := i.NewRuneReader()
+ rr.SetTermMode()
+ defer rr.RestoreTermMode()
+
+ cursor := i.NewCursor()
+ if !config.ShowCursor {
+ cursor.Hide() // hide the cursor
+ defer cursor.Show() // show the cursor when we're done
+ }
+
+ // start waiting for input
+ for {
+ r, _, err := rr.ReadRune()
+ if err != nil {
+ return "", err
+ }
+ if r == terminal.KeyInterrupt {
+ return "", terminal.InterruptErr
+ }
+ if r == terminal.KeyEndTransmission {
+ break
+ }
+
+ b, err := i.OnChange(r, config)
+ if err != nil {
+ return "", err
+ }
+
+ if b {
+ break
+ }
+ }
+
+ // if the line is empty
+ if len(i.answer) == 0 {
+ // use the default value
+ return i.Default, err
+ }
+
+ lineStr := i.answer
+
+ i.AppendRenderedText(lineStr)
+
+ // we're done
+ return lineStr, err
+}
+
+func (i *Input) Cleanup(config *PromptConfig, val interface{}) error {
+ // use the default answer when cleaning up the prompt if necessary
+ ans := i.answer
+ if ans == "" && i.Default != "" {
+ ans = i.Default
+ }
+
+ // render the cleanup
+ return i.Render(
+ InputQuestionTemplate,
+ InputTemplateData{
+ Input: *i,
+ ShowAnswer: true,
+ Config: config,
+ Answer: ans,
+ },
+ )
+}
diff --git a/vendor/gopkg.in/AlecAivazis/survey.v1/multiline.go b/vendor/github.com/AlecAivazis/survey/v2/multiline.go
similarity index 73%
rename from vendor/gopkg.in/AlecAivazis/survey.v1/multiline.go
rename to vendor/github.com/AlecAivazis/survey/v2/multiline.go
index 6007f0561d2..d0523b7eb42 100644
--- a/vendor/gopkg.in/AlecAivazis/survey.v1/multiline.go
+++ b/vendor/github.com/AlecAivazis/survey/v2/multiline.go
@@ -1,15 +1,13 @@
package survey
import (
- "fmt"
"strings"
- "gopkg.in/AlecAivazis/survey.v1/core"
- "gopkg.in/AlecAivazis/survey.v1/terminal"
+ "github.com/AlecAivazis/survey/v2/terminal"
)
type Multiline struct {
- core.Renderer
+ Renderer
Message string
Default string
Help string
@@ -21,12 +19,13 @@ type MultilineTemplateData struct {
Answer string
ShowAnswer bool
ShowHelp bool
+ Config *PromptConfig
}
// Templates with Color formatting. See Documentation: https://github.com/mgutz/ansi#style-format
var MultilineQuestionTemplate = `
-{{- if .ShowHelp }}{{- color "cyan"}}{{ HelpIcon }} {{ .Help }}{{color "reset"}}{{"\n"}}{{end}}
-{{- color "green+hb"}}{{ QuestionIcon }} {{color "reset"}}
+{{- if .ShowHelp }}{{- color .Config.Icons.Help.Format }}{{ .Config.Icons.Help.Text }} {{ .Help }}{{color "reset"}}{{"\n"}}{{end}}
+{{- color .Config.Icons.Question.Format }}{{ .Config.Icons.Question.Text }} {{color "reset"}}
{{- color "default+hb"}}{{ .Message }} {{color "reset"}}
{{- if .ShowAnswer}}
{{- "\n"}}{{color "cyan"}}{{.Answer}}{{color "reset"}}
@@ -36,16 +35,18 @@ var MultilineQuestionTemplate = `
{{- color "cyan"}}[Enter 2 empty lines to finish]{{color "reset"}}
{{- end}}`
-func (i *Multiline) Prompt() (interface{}, error) {
+func (i *Multiline) Prompt(config *PromptConfig) (interface{}, error) {
// render the template
err := i.Render(
MultilineQuestionTemplate,
- MultilineTemplateData{Multiline: *i},
+ MultilineTemplateData{
+ Multiline: *i,
+ Config: config,
+ },
)
if err != nil {
return "", err
}
- fmt.Println()
// start reading runes from the standard in
rr := i.NewRuneReader()
@@ -92,13 +93,18 @@ func (i *Multiline) Prompt() (interface{}, error) {
return i.Default, err
}
- // we're done
+ i.AppendRenderedText(val)
return val, err
}
-func (i *Multiline) Cleanup(val interface{}) error {
+func (i *Multiline) Cleanup(config *PromptConfig, val interface{}) error {
return i.Render(
MultilineQuestionTemplate,
- MultilineTemplateData{Multiline: *i, Answer: val.(string), ShowAnswer: true},
+ MultilineTemplateData{
+ Multiline: *i,
+ Answer: val.(string),
+ ShowAnswer: true,
+ Config: config,
+ },
)
}
diff --git a/vendor/github.com/AlecAivazis/survey/v2/multiselect.go b/vendor/github.com/AlecAivazis/survey/v2/multiselect.go
new file mode 100644
index 00000000000..3d4f95b9309
--- /dev/null
+++ b/vendor/github.com/AlecAivazis/survey/v2/multiselect.go
@@ -0,0 +1,331 @@
+package survey
+
+import (
+ "errors"
+ "fmt"
+
+ "github.com/AlecAivazis/survey/v2/core"
+ "github.com/AlecAivazis/survey/v2/terminal"
+)
+
+/*
+MultiSelect is a prompt that presents a list of various options to the user
+for them to select using the arrow keys and enter. Response type is a slice of strings.
+
+ days := []string{}
+ prompt := &survey.MultiSelect{
+ Message: "What days do you prefer:",
+ Options: []string{"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"},
+ }
+ survey.AskOne(prompt, &days)
+*/
+type MultiSelect struct {
+ Renderer
+ Message string
+ Options []string
+ Default interface{}
+ Help string
+ PageSize int
+ VimMode bool
+ FilterMessage string
+ Filter func(filter string, value string, index int) bool
+ filter string
+ selectedIndex int
+ checked map[int]bool
+ showingHelp bool
+}
+
+// data available to the templates when processing
+type MultiSelectTemplateData struct {
+ MultiSelect
+ Answer string
+ ShowAnswer bool
+ Checked map[int]bool
+ SelectedIndex int
+ ShowHelp bool
+ PageEntries []core.OptionAnswer
+ Config *PromptConfig
+}
+
+var MultiSelectQuestionTemplate = `
+{{- if .ShowHelp }}{{- color .Config.Icons.Help.Format }}{{ .Config.Icons.Help.Text }} {{ .Help }}{{color "reset"}}{{"\n"}}{{end}}
+{{- color .Config.Icons.Question.Format }}{{ .Config.Icons.Question.Text }} {{color "reset"}}
+{{- color "default+hb"}}{{ .Message }}{{ .FilterMessage }}{{color "reset"}}
+{{- if .ShowAnswer}}{{color "cyan"}} {{.Answer}}{{color "reset"}}{{"\n"}}
+{{- else }}
+ {{- " "}}{{- color "cyan"}}[Use arrows to move, space to select, to all, to none, type to filter{{- if and .Help (not .ShowHelp)}}, {{ .Config.HelpInput }} for more help{{end}}]{{color "reset"}}
+ {{- "\n"}}
+ {{- range $ix, $option := .PageEntries}}
+ {{- if eq $ix $.SelectedIndex }}{{color $.Config.Icons.SelectFocus.Format }}{{ $.Config.Icons.SelectFocus.Text }}{{color "reset"}}{{else}} {{end}}
+ {{- if index $.Checked $option.Index }}{{color $.Config.Icons.MarkedOption.Format }} {{ $.Config.Icons.MarkedOption.Text }} {{else}}{{color $.Config.Icons.UnmarkedOption.Format }} {{ $.Config.Icons.UnmarkedOption.Text }} {{end}}
+ {{- color "reset"}}
+ {{- " "}}{{$option.Value}}{{"\n"}}
+ {{- end}}
+{{- end}}`
+
+// OnChange is called on every keypress.
+func (m *MultiSelect) OnChange(key rune, config *PromptConfig) {
+ options := m.filterOptions(config)
+ oldFilter := m.filter
+
+ if key == terminal.KeyArrowUp || (m.VimMode && key == 'k') {
+ // if we are at the top of the list
+ if m.selectedIndex == 0 {
+ // go to the bottom
+ m.selectedIndex = len(options) - 1
+ } else {
+ // decrement the selected index
+ m.selectedIndex--
+ }
+ } else if key == terminal.KeyTab || key == terminal.KeyArrowDown || (m.VimMode && key == 'j') {
+ // if we are at the bottom of the list
+ if m.selectedIndex == len(options)-1 {
+ // start at the top
+ m.selectedIndex = 0
+ } else {
+ // increment the selected index
+ m.selectedIndex++
+ }
+ // if the user pressed down and there is room to move
+ } else if key == terminal.KeySpace {
+ // the option they have selected
+ if m.selectedIndex < len(options) {
+ selectedOpt := options[m.selectedIndex]
+
+ // if we haven't seen this index before
+ if old, ok := m.checked[selectedOpt.Index]; !ok {
+ // set the value to true
+ m.checked[selectedOpt.Index] = true
+ } else {
+ // otherwise just invert the current value
+ m.checked[selectedOpt.Index] = !old
+ }
+ if !config.KeepFilter {
+ m.filter = ""
+ }
+ }
+ // only show the help message if we have one to show
+ } else if string(key) == config.HelpInput && m.Help != "" {
+ m.showingHelp = true
+ } else if key == terminal.KeyEscape {
+ m.VimMode = !m.VimMode
+ } else if key == terminal.KeyDeleteWord || key == terminal.KeyDeleteLine {
+ m.filter = ""
+ } else if key == terminal.KeyDelete || key == terminal.KeyBackspace {
+ if m.filter != "" {
+ runeFilter := []rune(m.filter)
+ m.filter = string(runeFilter[0 : len(runeFilter)-1])
+ }
+ } else if key >= terminal.KeySpace {
+ m.filter += string(key)
+ m.VimMode = false
+ } else if key == terminal.KeyArrowRight {
+ for _, v := range options {
+ m.checked[v.Index] = true
+ }
+ if !config.KeepFilter {
+ m.filter = ""
+ }
+ } else if key == terminal.KeyArrowLeft {
+ for _, v := range options {
+ m.checked[v.Index] = false
+ }
+ if !config.KeepFilter {
+ m.filter = ""
+ }
+ }
+
+ m.FilterMessage = ""
+ if m.filter != "" {
+ m.FilterMessage = " " + m.filter
+ }
+ if oldFilter != m.filter {
+ // filter changed
+ options = m.filterOptions(config)
+ if len(options) > 0 && len(options) <= m.selectedIndex {
+ m.selectedIndex = len(options) - 1
+ }
+ }
+ // paginate the options
+ // figure out the page size
+ pageSize := m.PageSize
+ // if we dont have a specific one
+ if pageSize == 0 {
+ // grab the global value
+ pageSize = config.PageSize
+ }
+
+ // TODO if we have started filtering and were looking at the end of a list
+ // and we have modified the filter then we should move the page back!
+ opts, idx := paginate(pageSize, options, m.selectedIndex)
+
+ // render the options
+ m.Render(
+ MultiSelectQuestionTemplate,
+ MultiSelectTemplateData{
+ MultiSelect: *m,
+ SelectedIndex: idx,
+ Checked: m.checked,
+ ShowHelp: m.showingHelp,
+ PageEntries: opts,
+ Config: config,
+ },
+ )
+}
+
+func (m *MultiSelect) filterOptions(config *PromptConfig) []core.OptionAnswer {
+ // the filtered list
+ answers := []core.OptionAnswer{}
+
+ // if there is no filter applied
+ if m.filter == "" {
+ // return all of the options
+ return core.OptionAnswerList(m.Options)
+ }
+
+ // the filter to apply
+ filter := m.Filter
+ if filter == nil {
+ filter = config.Filter
+ }
+
+ // apply the filter to each option
+ for i, opt := range m.Options {
+ // i the filter says to include the option
+ if filter(m.filter, opt, i) {
+ answers = append(answers, core.OptionAnswer{
+ Index: i,
+ Value: opt,
+ })
+ }
+ }
+
+ // we're done here
+ return answers
+}
+
+func (m *MultiSelect) Prompt(config *PromptConfig) (interface{}, error) {
+ // compute the default state
+ m.checked = make(map[int]bool)
+ // if there is a default
+ if m.Default != nil {
+ // if the default is string values
+ if defaultValues, ok := m.Default.([]string); ok {
+ for _, dflt := range defaultValues {
+ for i, opt := range m.Options {
+ // if the option corresponds to the default
+ if opt == dflt {
+ // we found our initial value
+ m.checked[i] = true
+ // stop looking
+ break
+ }
+ }
+ }
+ // if the default value is index values
+ } else if defaultIndices, ok := m.Default.([]int); ok {
+ // go over every index we need to enable by default
+ for _, idx := range defaultIndices {
+ // and enable it
+ m.checked[idx] = true
+ }
+ }
+ }
+
+ // if there are no options to render
+ if len(m.Options) == 0 {
+ // we failed
+ return "", errors.New("please provide options to select from")
+ }
+
+ // figure out the page size
+ pageSize := m.PageSize
+ // if we dont have a specific one
+ if pageSize == 0 {
+ // grab the global value
+ pageSize = config.PageSize
+ }
+ // paginate the options
+ // build up a list of option answers
+ opts, idx := paginate(pageSize, core.OptionAnswerList(m.Options), m.selectedIndex)
+
+ cursor := m.NewCursor()
+ cursor.Hide() // hide the cursor
+ defer cursor.Show() // show the cursor when we're done
+
+ // ask the question
+ err := m.Render(
+ MultiSelectQuestionTemplate,
+ MultiSelectTemplateData{
+ MultiSelect: *m,
+ SelectedIndex: idx,
+ Checked: m.checked,
+ PageEntries: opts,
+ Config: config,
+ },
+ )
+ if err != nil {
+ return "", err
+ }
+
+ rr := m.NewRuneReader()
+ rr.SetTermMode()
+ defer rr.RestoreTermMode()
+
+ // start waiting for input
+ for {
+ r, _, err := rr.ReadRune()
+ if err != nil {
+ return "", err
+ }
+ if r == '\r' || r == '\n' {
+ break
+ }
+ if r == terminal.KeyInterrupt {
+ return "", terminal.InterruptErr
+ }
+ if r == terminal.KeyEndTransmission {
+ break
+ }
+ m.OnChange(r, config)
+ }
+ m.filter = ""
+ m.FilterMessage = ""
+
+ answers := []core.OptionAnswer{}
+ for i, option := range m.Options {
+ if val, ok := m.checked[i]; ok && val {
+ answers = append(answers, core.OptionAnswer{Value: option, Index: i})
+ }
+ }
+
+ return answers, nil
+}
+
+// Cleanup removes the options section, and renders the ask like a normal question.
+func (m *MultiSelect) Cleanup(config *PromptConfig, val interface{}) error {
+ // the answer to show
+ answer := ""
+ for _, ans := range val.([]core.OptionAnswer) {
+ answer = fmt.Sprintf("%s, %s", answer, ans.Value)
+ }
+
+ // if we answered anything
+ if len(answer) > 2 {
+ // remove the precending commas
+ answer = answer[2:]
+ }
+
+ // execute the output summary template with the answer
+ return m.Render(
+ MultiSelectQuestionTemplate,
+ MultiSelectTemplateData{
+ MultiSelect: *m,
+ SelectedIndex: m.selectedIndex,
+ Checked: m.checked,
+ Answer: answer,
+ ShowAnswer: true,
+ Config: config,
+ },
+ )
+}
diff --git a/vendor/github.com/AlecAivazis/survey/v2/password.go b/vendor/github.com/AlecAivazis/survey/v2/password.go
new file mode 100644
index 00000000000..285bff5e750
--- /dev/null
+++ b/vendor/github.com/AlecAivazis/survey/v2/password.go
@@ -0,0 +1,101 @@
+package survey
+
+import (
+ "fmt"
+ "strings"
+
+ "github.com/AlecAivazis/survey/v2/core"
+ "github.com/AlecAivazis/survey/v2/terminal"
+)
+
+/*
+Password is like a normal Input but the text shows up as *'s and there is no default. Response
+type is a string.
+
+ password := ""
+ prompt := &survey.Password{ Message: "Please type your password" }
+ survey.AskOne(prompt, &password)
+*/
+type Password struct {
+ Renderer
+ Message string
+ Help string
+}
+
+type PasswordTemplateData struct {
+ Password
+ ShowHelp bool
+ Config *PromptConfig
+}
+
+// PasswordQuestionTemplate is a template with color formatting. See Documentation: https://github.com/mgutz/ansi#style-format
+var PasswordQuestionTemplate = `
+{{- if .ShowHelp }}{{- color .Config.Icons.Help.Format }}{{ .Config.Icons.Help.Text }} {{ .Help }}{{color "reset"}}{{"\n"}}{{end}}
+{{- color .Config.Icons.Question.Format }}{{ .Config.Icons.Question.Text }} {{color "reset"}}
+{{- color "default+hb"}}{{ .Message }} {{color "reset"}}
+{{- if and .Help (not .ShowHelp)}}{{color "cyan"}}[{{ .Config.HelpInput }} for help]{{color "reset"}} {{end}}`
+
+func (p *Password) Prompt(config *PromptConfig) (interface{}, error) {
+ // render the question template
+ userOut, _, err := core.RunTemplate(
+ PasswordQuestionTemplate,
+ PasswordTemplateData{
+ Password: *p,
+ Config: config,
+ },
+ )
+ fmt.Fprint(terminal.NewAnsiStdout(p.Stdio().Out), userOut)
+ if err != nil {
+ return "", err
+ }
+
+ rr := p.NewRuneReader()
+ rr.SetTermMode()
+ defer rr.RestoreTermMode()
+
+ // no help msg? Just return any response
+ if p.Help == "" {
+ line, err := rr.ReadLine('*')
+ return string(line), err
+ }
+
+ cursor := p.NewCursor()
+
+ line := []rune{}
+ // process answers looking for help prompt answer
+ for {
+ line, err = rr.ReadLine('*')
+ if err != nil {
+ return string(line), err
+ }
+
+ if string(line) == config.HelpInput {
+ // terminal will echo the \n so we need to jump back up one row
+ cursor.PreviousLine(1)
+
+ err = p.Render(
+ PasswordQuestionTemplate,
+ PasswordTemplateData{
+ Password: *p,
+ ShowHelp: true,
+ Config: config,
+ },
+ )
+ if err != nil {
+ return "", err
+ }
+ continue
+ }
+
+ break
+ }
+
+ lineStr := string(line)
+ p.AppendRenderedText(strings.Repeat("*", len(lineStr)))
+ return lineStr, err
+}
+
+// Cleanup hides the string with a fixed number of characters.
+func (prompt *Password) Cleanup(config *PromptConfig, val interface{}) error {
+ return nil
+}
diff --git a/vendor/github.com/AlecAivazis/survey/v2/renderer.go b/vendor/github.com/AlecAivazis/survey/v2/renderer.go
new file mode 100644
index 00000000000..54251213f30
--- /dev/null
+++ b/vendor/github.com/AlecAivazis/survey/v2/renderer.go
@@ -0,0 +1,164 @@
+package survey
+
+import (
+ "bytes"
+ "fmt"
+ "unicode/utf8"
+
+ "github.com/AlecAivazis/survey/v2/core"
+ "github.com/AlecAivazis/survey/v2/terminal"
+ goterm "golang.org/x/crypto/ssh/terminal"
+)
+
+type Renderer struct {
+ stdio terminal.Stdio
+ renderedErrors bytes.Buffer
+ renderedText bytes.Buffer
+}
+
+type ErrorTemplateData struct {
+ Error error
+ Icon Icon
+}
+
+var ErrorTemplate = `{{color .Icon.Format }}{{ .Icon.Text }} Sorry, your reply was invalid: {{ .Error.Error }}{{color "reset"}}
+`
+
+func (r *Renderer) WithStdio(stdio terminal.Stdio) {
+ r.stdio = stdio
+}
+
+func (r *Renderer) Stdio() terminal.Stdio {
+ return r.stdio
+}
+
+func (r *Renderer) NewRuneReader() *terminal.RuneReader {
+ return terminal.NewRuneReader(r.stdio)
+}
+
+func (r *Renderer) NewCursor() *terminal.Cursor {
+ return &terminal.Cursor{
+ In: r.stdio.In,
+ Out: r.stdio.Out,
+ }
+}
+
+func (r *Renderer) Error(config *PromptConfig, invalid error) error {
+ // cleanup the currently rendered errors
+ r.resetPrompt(r.countLines(r.renderedErrors))
+ r.renderedErrors.Reset()
+
+ // cleanup the rest of the prompt
+ r.resetPrompt(r.countLines(r.renderedText))
+ r.renderedText.Reset()
+
+ userOut, layoutOut, err := core.RunTemplate(ErrorTemplate, &ErrorTemplateData{
+ Error: invalid,
+ Icon: config.Icons.Error,
+ })
+ if err != nil {
+ return err
+ }
+
+ // send the message to the user
+ fmt.Fprint(terminal.NewAnsiStdout(r.stdio.Out), userOut)
+
+ // add the printed text to the rendered error buffer so we can cleanup later
+ r.appendRenderedError(layoutOut)
+
+ return nil
+}
+
+func (r *Renderer) Render(tmpl string, data interface{}) error {
+ // cleanup the currently rendered text
+ lineCount := r.countLines(r.renderedText)
+ r.resetPrompt(lineCount)
+ r.renderedText.Reset()
+
+ // render the template summarizing the current state
+ userOut, layoutOut, err := core.RunTemplate(tmpl, data)
+ if err != nil {
+ return err
+ }
+
+ // print the summary
+ fmt.Fprint(terminal.NewAnsiStdout(r.stdio.Out), userOut)
+
+ // add the printed text to the rendered text buffer so we can cleanup later
+ r.AppendRenderedText(layoutOut)
+
+ // nothing went wrong
+ return nil
+}
+
+// appendRenderedError appends text to the renderer's error buffer
+// which is used to track what has been printed. It is not exported
+// as errors should only be displayed via Error(config, error).
+func (r *Renderer) appendRenderedError(text string) {
+ r.renderedErrors.WriteString(text)
+}
+
+// AppendRenderedText appends text to the renderer's text buffer
+// which is used to track of what has been printed. The buffer is used
+// to calculate how many lines to erase before updating the prompt.
+func (r *Renderer) AppendRenderedText(text string) {
+ r.renderedText.WriteString(text)
+}
+
+func (r *Renderer) resetPrompt(lines int) {
+ // clean out current line in case tmpl didnt end in newline
+ cursor := r.NewCursor()
+ cursor.HorizontalAbsolute(0)
+ terminal.EraseLine(r.stdio.Out, terminal.ERASE_LINE_ALL)
+ // clean up what we left behind last time
+ for i := 0; i < lines; i++ {
+ cursor.PreviousLine(1)
+ terminal.EraseLine(r.stdio.Out, terminal.ERASE_LINE_ALL)
+ }
+}
+
+func (r *Renderer) termWidth() (int, error) {
+ fd := int(r.stdio.Out.Fd())
+ termWidth, _, err := goterm.GetSize(fd)
+ return termWidth, err
+}
+
+// countLines will return the count of `\n` with the addition of any
+// lines that have wrapped due to narrow terminal width
+func (r *Renderer) countLines(buf bytes.Buffer) int {
+ w, err := r.termWidth()
+ if err != nil || w == 0 {
+ // if we got an error due to terminal.GetSize not being supported
+ // on current platform then just assume a very wide terminal
+ w = 10000
+ }
+
+ bufBytes := buf.Bytes()
+
+ count := 0
+ curr := 0
+ delim := -1
+ for curr < len(bufBytes) {
+ // read until the next newline or the end of the string
+ relDelim := bytes.IndexRune(bufBytes[curr:], '\n')
+ if relDelim != -1 {
+ count += 1 // new line found, add it to the count
+ delim = curr + relDelim
+ } else {
+ delim = len(bufBytes) // no new line found, read rest of text
+ }
+
+ if lineWidth := utf8.RuneCount(bufBytes[curr:delim]); lineWidth > w {
+ // account for word wrapping
+ count += lineWidth / w
+ if (lineWidth % w) == 0 {
+ // content whose width is exactly a multiplier of available width should not
+ // count as having wrapped on the last line
+ count -= 1
+ }
+ }
+ curr = delim + 1
+ }
+
+ return count
+}
diff --git a/vendor/gopkg.in/AlecAivazis/survey.v1/select.go b/vendor/github.com/AlecAivazis/survey/v2/select.go
similarity index 55%
rename from vendor/gopkg.in/AlecAivazis/survey.v1/select.go
rename to vendor/github.com/AlecAivazis/survey/v2/select.go
index aee53231788..fdce0381732 100644
--- a/vendor/gopkg.in/AlecAivazis/survey.v1/select.go
+++ b/vendor/github.com/AlecAivazis/survey/v2/select.go
@@ -3,8 +3,8 @@ package survey
import (
"errors"
- "gopkg.in/AlecAivazis/survey.v1/core"
- "gopkg.in/AlecAivazis/survey.v1/terminal"
+ "github.com/AlecAivazis/survey/v2/core"
+ "github.com/AlecAivazis/survey/v2/terminal"
)
/*
@@ -16,61 +16,69 @@ for them to select using the arrow keys and enter. Response type is a string.
Message: "Choose a color:",
Options: []string{"red", "blue", "green"},
}
- survey.AskOne(prompt, &color, nil)
+ survey.AskOne(prompt, &color)
*/
type Select struct {
- core.Renderer
+ Renderer
Message string
Options []string
- Default string
+ Default interface{}
Help string
PageSize int
VimMode bool
FilterMessage string
- FilterFn func(string, []string) []string
+ Filter func(filter string, value string, index int) bool
filter string
selectedIndex int
useDefault bool
showingHelp bool
}
-// the data available to the templates when processing
+// SelectTemplateData is the data available to the templates when processing
type SelectTemplateData struct {
Select
- PageEntries []string
+ PageEntries []core.OptionAnswer
SelectedIndex int
Answer string
ShowAnswer bool
ShowHelp bool
+ Config *PromptConfig
}
var SelectQuestionTemplate = `
-{{- if .ShowHelp }}{{- color "cyan"}}{{ HelpIcon }} {{ .Help }}{{color "reset"}}{{"\n"}}{{end}}
-{{- color "green+hb"}}{{ QuestionIcon }} {{color "reset"}}
+{{- if .ShowHelp }}{{- color .Config.Icons.Help.Format }}{{ .Config.Icons.Help.Text }} {{ .Help }}{{color "reset"}}{{"\n"}}{{end}}
+{{- color .Config.Icons.Question.Format }}{{ .Config.Icons.Question.Text }} {{color "reset"}}
{{- color "default+hb"}}{{ .Message }}{{ .FilterMessage }}{{color "reset"}}
{{- if .ShowAnswer}}{{color "cyan"}} {{.Answer}}{{color "reset"}}{{"\n"}}
{{- else}}
- {{- " "}}{{- color "cyan"}}[Use arrows to move, enter to select, type to filter{{- if and .Help (not .ShowHelp)}}, {{ HelpInputRune }} for more help{{end}}]{{color "reset"}}
+ {{- " "}}{{- color "cyan"}}[Use arrows to move, type to filter{{- if and .Help (not .ShowHelp)}}, {{ .Config.HelpInput }} for more help{{end}}]{{color "reset"}}
{{- "\n"}}
{{- range $ix, $choice := .PageEntries}}
- {{- if eq $ix $.SelectedIndex}}{{color "cyan+b"}}{{ SelectFocusIcon }} {{else}}{{color "default+hb"}} {{end}}
- {{- $choice}}
+ {{- if eq $ix $.SelectedIndex }}{{color $.Config.Icons.SelectFocus.Format }}{{ $.Config.Icons.SelectFocus.Text }} {{else}}{{color "default"}} {{end}}
+ {{- $choice.Value}}
{{- color "reset"}}{{"\n"}}
{{- end}}
{{- end}}`
// OnChange is called on every keypress.
-func (s *Select) OnChange(line []rune, pos int, key rune) (newLine []rune, newPos int, ok bool) {
- options := s.filterOptions()
+func (s *Select) OnChange(key rune, config *PromptConfig) bool {
+ options := s.filterOptions(config)
oldFilter := s.filter
- // if the user pressed the enter key
- if key == terminal.KeyEnter {
- if s.selectedIndex < len(options) {
- return []rune(options[s.selectedIndex]), 0, true
+ // if the user pressed the enter key and the index is a valid option
+ if key == terminal.KeyEnter || key == '\n' {
+ // if the selected index is a valid option
+ if len(options) > 0 && s.selectedIndex < len(options) {
+
+ // we're done (stop prompting the user)
+ return true
}
+
+ // we're not done (keep prompting)
+ return false
+
// if the user pressed the up arrow or 'k' to emulate vim
- } else if key == terminal.KeyArrowUp || (s.VimMode && key == 'k') && len(options) > 0 {
+ } else if (key == terminal.KeyArrowUp || (s.VimMode && key == 'k')) && len(options) > 0 {
s.useDefault = false
// if we are at the top of the list
@@ -83,7 +91,7 @@ func (s *Select) OnChange(line []rune, pos int, key rune) (newLine []rune, newPo
}
// if the user pressed down or 'j' to emulate vim
- } else if key == terminal.KeyArrowDown || (s.VimMode && key == 'j') && len(options) > 0 {
+ } else if (key == terminal.KeyTab || key == terminal.KeyArrowDown || (s.VimMode && key == 'j')) && len(options) > 0 {
s.useDefault = false
// if we are at the bottom of the list
if s.selectedIndex == len(options)-1 {
@@ -94,7 +102,7 @@ func (s *Select) OnChange(line []rune, pos int, key rune) (newLine []rune, newPo
s.selectedIndex++
}
// only show the help message if we have one
- } else if key == core.HelpInputRune && s.Help != "" {
+ } else if string(key) == config.HelpInput && s.Help != "" {
s.showingHelp = true
// if the user wants to toggle vim mode on/off
} else if key == terminal.KeyEscape {
@@ -106,8 +114,9 @@ func (s *Select) OnChange(line []rune, pos int, key rune) (newLine []rune, newPo
} else if key == terminal.KeyDelete || key == terminal.KeyBackspace {
// if there is content in the filter to delete
if s.filter != "" {
+ runeFilter := []rune(s.filter)
// subtract a line from the current filter
- s.filter = s.filter[0 : len(s.filter)-1]
+ s.filter = string(runeFilter[0 : len(runeFilter)-1])
// we removed the last value in the filter
}
} else if key >= terminal.KeySpace {
@@ -124,17 +133,24 @@ func (s *Select) OnChange(line []rune, pos int, key rune) (newLine []rune, newPo
}
if oldFilter != s.filter {
// filter changed
- options = s.filterOptions()
+ options = s.filterOptions(config)
if len(options) > 0 && len(options) <= s.selectedIndex {
s.selectedIndex = len(options) - 1
}
}
// figure out the options and index to render
+ // figure out the page size
+ pageSize := s.PageSize
+ // if we dont have a specific one
+ if pageSize == 0 {
+ // grab the global value
+ pageSize = config.PageSize
+ }
// TODO if we have started filtering and were looking at the end of a list
// and we have modified the filter then we should move the page back!
- opts, idx := paginate(s.PageSize, options, s.selectedIndex)
+ opts, idx := paginate(pageSize, options, s.selectedIndex)
// render the options
s.Render(
@@ -144,33 +160,45 @@ func (s *Select) OnChange(line []rune, pos int, key rune) (newLine []rune, newPo
SelectedIndex: idx,
ShowHelp: s.showingHelp,
PageEntries: opts,
+ Config: config,
},
)
- // if we are not pressing ent
- if len(options) <= s.selectedIndex {
- return []rune{}, 0, false
- }
-
- // s.selectedIndex should not be a negative number
- if s.selectedIndex < 0 {
- return []rune{}, 0, false
- }
-
- return []rune(options[s.selectedIndex]), 0, true
+ // keep prompting
+ return false
}
-func (s *Select) filterOptions() []string {
+func (s *Select) filterOptions(config *PromptConfig) []core.OptionAnswer {
+ // the filtered list
+ answers := []core.OptionAnswer{}
+
+ // if there is no filter applied
if s.filter == "" {
- return s.Options
+ return core.OptionAnswerList(s.Options)
+ }
+
+ // the filter to apply
+ filter := s.Filter
+ if filter == nil {
+ filter = config.Filter
}
- if s.FilterFn != nil {
- return s.FilterFn(s.filter, s.Options)
+
+ //
+ for i, opt := range s.Options {
+ // i the filter says to include the option
+ if filter(s.filter, opt, i) {
+ answers = append(answers, core.OptionAnswer{
+ Index: i,
+ Value: opt,
+ })
+ }
}
- return DefaultFilterFn(s.filter, s.Options)
+
+ // return the list of answers
+ return answers
}
-func (s *Select) Prompt() (interface{}, error) {
+func (s *Select) Prompt(config *PromptConfig) (interface{}, error) {
// if there are no options to render
if len(s.Options) == 0 {
// we failed
@@ -195,8 +223,16 @@ func (s *Select) Prompt() (interface{}, error) {
// save the selected index
s.selectedIndex = sel
+ // figure out the page size
+ pageSize := s.PageSize
+ // if we dont have a specific one
+ if pageSize == 0 {
+ // grab the global value
+ pageSize = config.PageSize
+ }
+
// figure out the options and index to render
- opts, idx := paginate(s.PageSize, s.Options, sel)
+ opts, idx := paginate(pageSize, core.OptionAnswerList(s.Options), sel)
// ask the question
err := s.Render(
@@ -205,6 +241,7 @@ func (s *Select) Prompt() (interface{}, error) {
Select: *s,
PageEntries: opts,
SelectedIndex: idx,
+ Config: config,
},
)
if err != nil {
@@ -228,47 +265,65 @@ func (s *Select) Prompt() (interface{}, error) {
if err != nil {
return "", err
}
- if r == '\r' || r == '\n' {
- break
- }
if r == terminal.KeyInterrupt {
return "", terminal.InterruptErr
}
if r == terminal.KeyEndTransmission {
break
}
- s.OnChange(nil, 0, r)
+ if s.OnChange(r, config) {
+ break
+ }
}
- options := s.filterOptions()
+ options := s.filterOptions(config)
s.filter = ""
s.FilterMessage = ""
+ // the index to report
var val string
// if we are supposed to use the default value
if s.useDefault || s.selectedIndex >= len(options) {
// if there is a default value
- if s.Default != "" {
- // use the default value
- val = s.Default
+ if s.Default != nil {
+ // if the default is a string
+ if defaultString, ok := s.Default.(string); ok {
+ // use the default value
+ val = defaultString
+ // the default value could also be an interpret which is interpretted as the index
+ } else if defaultIndex, ok := s.Default.(int); ok {
+ val = s.Options[defaultIndex]
+ } else {
+ return val, errors.New("default value of select must be an int or string")
+ }
} else if len(options) > 0 {
// there is no default value so use the first
- val = options[0]
+ val = options[0].Value
}
// otherwise the selected index points to the value
- } else if s.selectedIndex >= 0 && s.selectedIndex < len(options) {
+ } else if s.selectedIndex < len(options) {
// the
- val = options[s.selectedIndex]
+ val = options[s.selectedIndex].Value
+ }
+
+ // now that we have the value lets go hunt down the right index to return
+ idx = -1
+ for i, optionValue := range s.Options {
+ if optionValue == val {
+ idx = i
+ }
}
- return val, err
+
+ return core.OptionAnswer{Value: val, Index: idx}, err
}
-func (s *Select) Cleanup(val interface{}) error {
+func (s *Select) Cleanup(config *PromptConfig, val interface{}) error {
return s.Render(
SelectQuestionTemplate,
SelectTemplateData{
Select: *s,
- Answer: val.(string),
+ Answer: val.(core.OptionAnswer).Value,
ShowAnswer: true,
+ Config: config,
},
)
}
diff --git a/vendor/github.com/AlecAivazis/survey/v2/survey.go b/vendor/github.com/AlecAivazis/survey/v2/survey.go
new file mode 100644
index 00000000000..1944ffc5c6d
--- /dev/null
+++ b/vendor/github.com/AlecAivazis/survey/v2/survey.go
@@ -0,0 +1,413 @@
+package survey
+
+import (
+ "errors"
+ "io"
+ "os"
+ "strings"
+
+ "github.com/AlecAivazis/survey/v2/core"
+ "github.com/AlecAivazis/survey/v2/terminal"
+)
+
+// DefaultAskOptions is the default options on ask, using the OS stdio.
+func defaultAskOptions() *AskOptions {
+ return &AskOptions{
+ Stdio: terminal.Stdio{
+ In: os.Stdin,
+ Out: os.Stdout,
+ Err: os.Stderr,
+ },
+ PromptConfig: PromptConfig{
+ PageSize: 7,
+ HelpInput: "?",
+ SuggestInput: "tab",
+ Icons: IconSet{
+ Error: Icon{
+ Text: "X",
+ Format: "red",
+ },
+ Help: Icon{
+ Text: "?",
+ Format: "cyan",
+ },
+ Question: Icon{
+ Text: "?",
+ Format: "green+hb",
+ },
+ MarkedOption: Icon{
+ Text: "[x]",
+ Format: "green",
+ },
+ UnmarkedOption: Icon{
+ Text: "[ ]",
+ Format: "default+hb",
+ },
+ SelectFocus: Icon{
+ Text: ">",
+ Format: "cyan+b",
+ },
+ },
+ Filter: func(filter string, value string, index int) (include bool) {
+ filter = strings.ToLower(filter)
+
+ // include this option if it matches
+ return strings.Contains(strings.ToLower(value), filter)
+ },
+ KeepFilter: false,
+ ShowCursor: false,
+ },
+ }
+}
+func defaultPromptConfig() *PromptConfig {
+ return &defaultAskOptions().PromptConfig
+}
+
+func defaultIcons() *IconSet {
+ return &defaultPromptConfig().Icons
+}
+
+// OptionAnswer is an ergonomic alias for core.OptionAnswer
+type OptionAnswer = core.OptionAnswer
+
+// Icon holds the text and format to show for a particular icon
+type Icon struct {
+ Text string
+ Format string
+}
+
+// IconSet holds the icons to use for various prompts
+type IconSet struct {
+ HelpInput Icon
+ Error Icon
+ Help Icon
+ Question Icon
+ MarkedOption Icon
+ UnmarkedOption Icon
+ SelectFocus Icon
+}
+
+// Validator is a function passed to a Question after a user has provided a response.
+// If the function returns an error, then the user will be prompted again for another
+// response.
+type Validator func(ans interface{}) error
+
+// Transformer is a function passed to a Question after a user has provided a response.
+// The function can be used to implement a custom logic that will result to return
+// a different representation of the given answer.
+//
+// Look `TransformString`, `ToLower` `Title` and `ComposeTransformers` for more.
+type Transformer func(ans interface{}) (newAns interface{})
+
+// Question is the core data structure for a survey questionnaire.
+type Question struct {
+ Name string
+ Prompt Prompt
+ Validate Validator
+ Transform Transformer
+}
+
+// PromptConfig holds the global configuration for a prompt
+type PromptConfig struct {
+ PageSize int
+ Icons IconSet
+ HelpInput string
+ SuggestInput string
+ Filter func(filter string, option string, index int) bool
+ KeepFilter bool
+ ShowCursor bool
+}
+
+// Prompt is the primary interface for the objects that can take user input
+// and return a response.
+type Prompt interface {
+ Prompt(config *PromptConfig) (interface{}, error)
+ Cleanup(*PromptConfig, interface{}) error
+ Error(*PromptConfig, error) error
+}
+
+// PromptAgainer Interface for Prompts that support prompting again after invalid input
+type PromptAgainer interface {
+ PromptAgain(config *PromptConfig, invalid interface{}, err error) (interface{}, error)
+}
+
+// AskOpt allows setting optional ask options.
+type AskOpt func(options *AskOptions) error
+
+// AskOptions provides additional options on ask.
+type AskOptions struct {
+ Stdio terminal.Stdio
+ Validators []Validator
+ PromptConfig PromptConfig
+}
+
+// WithStdio specifies the standard input, output and error files survey
+// interacts with. By default, these are os.Stdin, os.Stdout, and os.Stderr.
+func WithStdio(in terminal.FileReader, out terminal.FileWriter, err io.Writer) AskOpt {
+ return func(options *AskOptions) error {
+ options.Stdio.In = in
+ options.Stdio.Out = out
+ options.Stdio.Err = err
+ return nil
+ }
+}
+
+// WithFilter specifies the default filter to use when asking questions.
+func WithFilter(filter func(filter string, value string, index int) (include bool)) AskOpt {
+ return func(options *AskOptions) error {
+ // save the filter internally
+ options.PromptConfig.Filter = filter
+
+ return nil
+ }
+}
+
+// WithKeepFilter sets the if the filter is kept after selections
+func WithKeepFilter(KeepFilter bool) AskOpt {
+ return func(options *AskOptions) error {
+ // set the page size
+ options.PromptConfig.KeepFilter = KeepFilter
+
+ // nothing went wrong
+ return nil
+ }
+}
+
+// WithValidator specifies a validator to use while prompting the user
+func WithValidator(v Validator) AskOpt {
+ return func(options *AskOptions) error {
+ // add the provided validator to the list
+ options.Validators = append(options.Validators, v)
+
+ // nothing went wrong
+ return nil
+ }
+}
+
+type wantsStdio interface {
+ WithStdio(terminal.Stdio)
+}
+
+// WithPageSize sets the default page size used by prompts
+func WithPageSize(pageSize int) AskOpt {
+ return func(options *AskOptions) error {
+ // set the page size
+ options.PromptConfig.PageSize = pageSize
+
+ // nothing went wrong
+ return nil
+ }
+}
+
+// WithHelpInput changes the character that prompts look for to give the user helpful information.
+func WithHelpInput(r rune) AskOpt {
+ return func(options *AskOptions) error {
+ // set the input character
+ options.PromptConfig.HelpInput = string(r)
+
+ // nothing went wrong
+ return nil
+ }
+}
+
+// WithIcons sets the icons that will be used when prompting the user
+func WithIcons(setIcons func(*IconSet)) AskOpt {
+ return func(options *AskOptions) error {
+ // update the default icons with whatever the user says
+ setIcons(&options.PromptConfig.Icons)
+
+ // nothing went wrong
+ return nil
+ }
+}
+
+// WithShowCursor sets the show cursor behavior when prompting the user
+func WithShowCursor(ShowCursor bool) AskOpt {
+ return func(options *AskOptions) error {
+ // set the page size
+ options.PromptConfig.ShowCursor = ShowCursor
+
+ // nothing went wrong
+ return nil
+ }
+}
+
+/*
+AskOne performs the prompt for a single prompt and asks for validation if required.
+Response types should be something that can be casted from the response type designated
+in the documentation. For example:
+
+ name := ""
+ prompt := &survey.Input{
+ Message: "name",
+ }
+
+ survey.AskOne(prompt, &name)
+
+*/
+func AskOne(p Prompt, response interface{}, opts ...AskOpt) error {
+ err := Ask([]*Question{{Prompt: p}}, response, opts...)
+ if err != nil {
+ return err
+ }
+
+ return nil
+}
+
+/*
+Ask performs the prompt loop, asking for validation when appropriate. The response
+type can be one of two options. If a struct is passed, the answer will be written to
+the field whose name matches the Name field on the corresponding question. Field types
+should be something that can be casted from the response type designated in the
+documentation. Note, a survey tag can also be used to identify a Otherwise, a
+map[string]interface{} can be passed, responses will be written to the key with the
+matching name. For example:
+
+ qs := []*survey.Question{
+ {
+ Name: "name",
+ Prompt: &survey.Input{Message: "What is your name?"},
+ Validate: survey.Required,
+ Transform: survey.Title,
+ },
+ }
+
+ answers := struct{ Name string }{}
+
+
+ err := survey.Ask(qs, &answers)
+*/
+func Ask(qs []*Question, response interface{}, opts ...AskOpt) error {
+ // build up the configuration options
+ options := defaultAskOptions()
+ for _, opt := range opts {
+ if opt == nil {
+ continue
+ }
+ if err := opt(options); err != nil {
+ return err
+ }
+ }
+
+ // if we weren't passed a place to record the answers
+ if response == nil {
+ // we can't go any further
+ return errors.New("cannot call Ask() with a nil reference to record the answers")
+ }
+
+ // go over every question
+ for _, q := range qs {
+ // If Prompt implements controllable stdio, pass in specified stdio.
+ if p, ok := q.Prompt.(wantsStdio); ok {
+ p.WithStdio(options.Stdio)
+ }
+
+ // grab the user input and save it
+ ans, err := q.Prompt.Prompt(&options.PromptConfig)
+ // if there was a problem
+ if err != nil {
+ return err
+ }
+
+ // build up a list of validators that we have to apply to this question
+ validators := []Validator{}
+
+ // make sure to include the question specific one
+ if q.Validate != nil {
+ validators = append(validators, q.Validate)
+ }
+ // add any "global" validators
+ for _, validator := range options.Validators {
+ validators = append(validators, validator)
+ }
+
+ // apply every validator to thte response
+ for _, validator := range validators {
+ // wait for a valid response
+ for invalid := validator(ans); invalid != nil; invalid = validator(ans) {
+ err := q.Prompt.Error(&options.PromptConfig, invalid)
+ // if there was a problem
+ if err != nil {
+ return err
+ }
+
+ // ask for more input
+ if promptAgainer, ok := q.Prompt.(PromptAgainer); ok {
+ ans, err = promptAgainer.PromptAgain(&options.PromptConfig, ans, invalid)
+ } else {
+ ans, err = q.Prompt.Prompt(&options.PromptConfig)
+ }
+ // if there was a problem
+ if err != nil {
+ return err
+ }
+ }
+ }
+
+ if q.Transform != nil {
+ // check if we have a transformer available, if so
+ // then try to acquire the new representation of the
+ // answer, if the resulting answer is not nil.
+ if newAns := q.Transform(ans); newAns != nil {
+ ans = newAns
+ }
+ }
+
+ // tell the prompt to cleanup with the validated value
+ q.Prompt.Cleanup(&options.PromptConfig, ans)
+
+ // if something went wrong
+ if err != nil {
+ // stop listening
+ return err
+ }
+
+ // add it to the map
+ err = core.WriteAnswer(response, q.Name, ans)
+ // if something went wrong
+ if err != nil {
+ return err
+ }
+
+ }
+
+ // return the response
+ return nil
+}
+
+// paginate returns a single page of choices given the page size, the total list of
+// possible choices, and the current selected index in the total list.
+func paginate(pageSize int, choices []core.OptionAnswer, sel int) ([]core.OptionAnswer, int) {
+ var start, end, cursor int
+
+ if len(choices) < pageSize {
+ // if we dont have enough options to fill a page
+ start = 0
+ end = len(choices)
+ cursor = sel
+
+ } else if sel < pageSize/2 {
+ // if we are in the first half page
+ start = 0
+ end = pageSize
+ cursor = sel
+
+ } else if len(choices)-sel-1 < pageSize/2 {
+ // if we are in the last half page
+ start = len(choices) - pageSize
+ end = len(choices)
+ cursor = sel - start
+
+ } else {
+ // somewhere in the middle
+ above := pageSize / 2
+ below := pageSize - above
+
+ cursor = pageSize / 2
+ start = sel - above
+ end = sel + below
+ }
+
+ // return the subset we care about and the index
+ return choices[start:end], cursor
+}
diff --git a/vendor/gopkg.in/AlecAivazis/survey.v1/terminal/LICENSE.txt b/vendor/github.com/AlecAivazis/survey/v2/terminal/LICENSE.txt
similarity index 100%
rename from vendor/gopkg.in/AlecAivazis/survey.v1/terminal/LICENSE.txt
rename to vendor/github.com/AlecAivazis/survey/v2/terminal/LICENSE.txt
diff --git a/vendor/gopkg.in/AlecAivazis/survey.v1/terminal/README.md b/vendor/github.com/AlecAivazis/survey/v2/terminal/README.md
similarity index 100%
rename from vendor/gopkg.in/AlecAivazis/survey.v1/terminal/README.md
rename to vendor/github.com/AlecAivazis/survey/v2/terminal/README.md
diff --git a/vendor/gopkg.in/AlecAivazis/survey.v1/terminal/buffered_reader.go b/vendor/github.com/AlecAivazis/survey/v2/terminal/buffered_reader.go
similarity index 100%
rename from vendor/gopkg.in/AlecAivazis/survey.v1/terminal/buffered_reader.go
rename to vendor/github.com/AlecAivazis/survey/v2/terminal/buffered_reader.go
diff --git a/vendor/gopkg.in/AlecAivazis/survey.v1/terminal/cursor.go b/vendor/github.com/AlecAivazis/survey/v2/terminal/cursor.go
similarity index 95%
rename from vendor/gopkg.in/AlecAivazis/survey.v1/terminal/cursor.go
rename to vendor/github.com/AlecAivazis/survey/v2/terminal/cursor.go
index 4c3b176fc53..1ac74fd6f55 100644
--- a/vendor/gopkg.in/AlecAivazis/survey.v1/terminal/cursor.go
+++ b/vendor/github.com/AlecAivazis/survey/v2/terminal/cursor.go
@@ -42,12 +42,14 @@ func (c *Cursor) Back(n int) {
// NextLine moves cursor to beginning of the line n lines down.
func (c *Cursor) NextLine(n int) {
- fmt.Fprintf(c.Out, "\x1b[%dE", n)
+ c.Down(1)
+ c.HorizontalAbsolute(0)
}
// PreviousLine moves cursor to beginning of the line n lines up.
func (c *Cursor) PreviousLine(n int) {
- fmt.Fprintf(c.Out, "\x1b[%dF", n)
+ c.Up(1)
+ c.HorizontalAbsolute(0)
}
// HorizontalAbsolute moves cursor horizontally to x.
@@ -167,8 +169,11 @@ func (c *Cursor) Size(buf *bytes.Buffer) (*Coord, error) {
// hide the cursor (so it doesn't blink when getting the size of the terminal)
c.Hide()
+ defer c.Show()
+
// save the current location of the cursor
c.Save()
+ defer c.Restore()
// move the cursor to the very bottom of the terminal
c.Move(999, 999)
@@ -179,12 +184,7 @@ func (c *Cursor) Size(buf *bytes.Buffer) (*Coord, error) {
return nil, err
}
- // move back where we began
- c.Restore()
-
- // show the cursor
- c.Show()
- // sice the bottom was calcuated in the lower right corner, it
+ // since the bottom was calculated in the lower right corner, it
// is the dimensions we are looking for
return bottom, nil
}
diff --git a/vendor/gopkg.in/AlecAivazis/survey.v1/terminal/cursor_windows.go b/vendor/github.com/AlecAivazis/survey/v2/terminal/cursor_windows.go
similarity index 100%
rename from vendor/gopkg.in/AlecAivazis/survey.v1/terminal/cursor_windows.go
rename to vendor/github.com/AlecAivazis/survey/v2/terminal/cursor_windows.go
diff --git a/vendor/gopkg.in/AlecAivazis/survey.v1/terminal/display.go b/vendor/github.com/AlecAivazis/survey/v2/terminal/display.go
similarity index 100%
rename from vendor/gopkg.in/AlecAivazis/survey.v1/terminal/display.go
rename to vendor/github.com/AlecAivazis/survey/v2/terminal/display.go
diff --git a/vendor/gopkg.in/AlecAivazis/survey.v1/terminal/display_posix.go b/vendor/github.com/AlecAivazis/survey/v2/terminal/display_posix.go
similarity index 100%
rename from vendor/gopkg.in/AlecAivazis/survey.v1/terminal/display_posix.go
rename to vendor/github.com/AlecAivazis/survey/v2/terminal/display_posix.go
diff --git a/vendor/gopkg.in/AlecAivazis/survey.v1/terminal/display_windows.go b/vendor/github.com/AlecAivazis/survey/v2/terminal/display_windows.go
similarity index 100%
rename from vendor/gopkg.in/AlecAivazis/survey.v1/terminal/display_windows.go
rename to vendor/github.com/AlecAivazis/survey/v2/terminal/display_windows.go
diff --git a/vendor/gopkg.in/AlecAivazis/survey.v1/terminal/error.go b/vendor/github.com/AlecAivazis/survey/v2/terminal/error.go
similarity index 100%
rename from vendor/gopkg.in/AlecAivazis/survey.v1/terminal/error.go
rename to vendor/github.com/AlecAivazis/survey/v2/terminal/error.go
diff --git a/vendor/gopkg.in/AlecAivazis/survey.v1/terminal/output.go b/vendor/github.com/AlecAivazis/survey/v2/terminal/output.go
similarity index 100%
rename from vendor/gopkg.in/AlecAivazis/survey.v1/terminal/output.go
rename to vendor/github.com/AlecAivazis/survey/v2/terminal/output.go
diff --git a/vendor/gopkg.in/AlecAivazis/survey.v1/terminal/output_windows.go b/vendor/github.com/AlecAivazis/survey/v2/terminal/output_windows.go
similarity index 100%
rename from vendor/gopkg.in/AlecAivazis/survey.v1/terminal/output_windows.go
rename to vendor/github.com/AlecAivazis/survey/v2/terminal/output_windows.go
diff --git a/vendor/gopkg.in/AlecAivazis/survey.v1/terminal/runereader.go b/vendor/github.com/AlecAivazis/survey/v2/terminal/runereader.go
similarity index 93%
rename from vendor/gopkg.in/AlecAivazis/survey.v1/terminal/runereader.go
rename to vendor/github.com/AlecAivazis/survey/v2/terminal/runereader.go
index 74f3d8355f2..05e91014c27 100644
--- a/vendor/gopkg.in/AlecAivazis/survey.v1/terminal/runereader.go
+++ b/vendor/github.com/AlecAivazis/survey/v2/terminal/runereader.go
@@ -3,6 +3,8 @@ package terminal
import (
"fmt"
"unicode"
+
+ "golang.org/x/text/width"
)
type RuneReader struct {
@@ -92,13 +94,15 @@ func (rr *RuneReader) ReadLine(mask rune) ([]rune, error) {
// if we are at the end of the word
if index == len(line) {
// just remove the last letter from the internal representation
+ // also count the number of cells the rune before the cursor occupied
+ cells := runeWidth(line[len(line)-1])
line = line[:len(line)-1]
// go back one
if cursorCurrent.X == 1 {
cursor.PreviousLine(1)
cursor.Forward(int(terminalSize.X))
} else {
- cursor.Back(1)
+ cursor.Back(cells)
}
// clear the rest of the line
@@ -106,6 +110,8 @@ func (rr *RuneReader) ReadLine(mask rune) ([]rune, error) {
} else {
// we need to remove a character from the middle of the word
+ cells := runeWidth(line[index-1])
+
// remove the current index from the list
line = append(line[:index-1], line[index:]...)
@@ -115,7 +121,7 @@ func (rr *RuneReader) ReadLine(mask rune) ([]rune, error) {
cursor.Save()
// clear the rest of the line
- cursor.Back(1)
+ cursor.Back(cells)
// print what comes after
for _, char := range line[index-1:] {
@@ -136,7 +142,7 @@ func (rr *RuneReader) ReadLine(mask rune) ([]rune, error) {
cursor.PreviousLine(1)
cursor.Forward(int(terminalSize.X))
} else {
- cursor.Back(1)
+ cursor.Back(cells)
}
}
@@ -160,7 +166,7 @@ func (rr *RuneReader) ReadLine(mask rune) ([]rune, error) {
cursor.PreviousLine(1)
cursor.Forward(int(terminalSize.X))
} else {
- cursor.Back(1)
+ cursor.Back(runeWidth(line[index-1]))
}
//decrement the index
index--
@@ -183,7 +189,7 @@ func (rr *RuneReader) ReadLine(mask rune) ([]rune, error) {
if cursorCurrent.CursorIsAtLineEnd(terminalSize) {
cursor.NextLine(1)
} else {
- cursor.Forward(1)
+ cursor.Forward(runeWidth(line[index]))
}
index++
@@ -206,7 +212,7 @@ func (rr *RuneReader) ReadLine(mask rune) ([]rune, error) {
cursorCurrent.Y--
} else {
- cursor.Back(1)
+ cursor.Back(runeWidth(line[index-1]))
cursorCurrent.X--
}
index--
@@ -221,7 +227,7 @@ func (rr *RuneReader) ReadLine(mask rune) ([]rune, error) {
cursorCurrent.Y++
} else {
- cursor.Forward(1)
+ cursor.Forward(runeWidth(line[index]))
cursorCurrent.X++
}
index++
@@ -296,7 +302,7 @@ func (rr *RuneReader) ReadLine(mask rune) ([]rune, error) {
// restore the position of the cursor horizontally
cursor.Restore()
// restore the position of the cursor vertically
- cursor.Up(1)
+ cursor.PreviousLine(1)
} else {
// restore cursor
cursor.Restore()
@@ -306,7 +312,7 @@ func (rr *RuneReader) ReadLine(mask rune) ([]rune, error) {
if cursorCurrent.CursorIsAtLineEnd(terminalSize) {
cursor.NextLine(1)
} else {
- cursor.Forward(1)
+ cursor.Forward(runeWidth(r))
}
// increment the index
index++
@@ -314,3 +320,11 @@ func (rr *RuneReader) ReadLine(mask rune) ([]rune, error) {
}
}
}
+
+func runeWidth(r rune) int {
+ switch width.LookupRune(r).Kind() {
+ case width.EastAsianWide, width.EastAsianFullwidth:
+ return 2
+ }
+ return 1
+}
diff --git a/vendor/gopkg.in/AlecAivazis/survey.v1/terminal/runereader_bsd.go b/vendor/github.com/AlecAivazis/survey/v2/terminal/runereader_bsd.go
similarity index 100%
rename from vendor/gopkg.in/AlecAivazis/survey.v1/terminal/runereader_bsd.go
rename to vendor/github.com/AlecAivazis/survey/v2/terminal/runereader_bsd.go
diff --git a/vendor/gopkg.in/AlecAivazis/survey.v1/terminal/runereader_linux.go b/vendor/github.com/AlecAivazis/survey/v2/terminal/runereader_linux.go
similarity index 100%
rename from vendor/gopkg.in/AlecAivazis/survey.v1/terminal/runereader_linux.go
rename to vendor/github.com/AlecAivazis/survey/v2/terminal/runereader_linux.go
diff --git a/vendor/gopkg.in/AlecAivazis/survey.v1/terminal/runereader_posix.go b/vendor/github.com/AlecAivazis/survey/v2/terminal/runereader_posix.go
similarity index 100%
rename from vendor/gopkg.in/AlecAivazis/survey.v1/terminal/runereader_posix.go
rename to vendor/github.com/AlecAivazis/survey/v2/terminal/runereader_posix.go
diff --git a/vendor/gopkg.in/AlecAivazis/survey.v1/terminal/runereader_ppc64le.go b/vendor/github.com/AlecAivazis/survey/v2/terminal/runereader_ppc64le.go
similarity index 100%
rename from vendor/gopkg.in/AlecAivazis/survey.v1/terminal/runereader_ppc64le.go
rename to vendor/github.com/AlecAivazis/survey/v2/terminal/runereader_ppc64le.go
diff --git a/vendor/gopkg.in/AlecAivazis/survey.v1/terminal/runereader_windows.go b/vendor/github.com/AlecAivazis/survey/v2/terminal/runereader_windows.go
similarity index 100%
rename from vendor/gopkg.in/AlecAivazis/survey.v1/terminal/runereader_windows.go
rename to vendor/github.com/AlecAivazis/survey/v2/terminal/runereader_windows.go
diff --git a/vendor/gopkg.in/AlecAivazis/survey.v1/terminal/sequences.go b/vendor/github.com/AlecAivazis/survey/v2/terminal/sequences.go
similarity index 95%
rename from vendor/gopkg.in/AlecAivazis/survey.v1/terminal/sequences.go
rename to vendor/github.com/AlecAivazis/survey/v2/terminal/sequences.go
index a9158c63277..6d9e87755b4 100644
--- a/vendor/gopkg.in/AlecAivazis/survey.v1/terminal/sequences.go
+++ b/vendor/github.com/AlecAivazis/survey/v2/terminal/sequences.go
@@ -23,6 +23,7 @@ const (
SpecialKeyEnd = '\x11'
SpecialKeyDelete = '\x12'
IgnoreKey = '\000'
+ KeyTab = '\t'
)
func soundBell(out io.Writer) {
diff --git a/vendor/gopkg.in/AlecAivazis/survey.v1/terminal/stdio.go b/vendor/github.com/AlecAivazis/survey/v2/terminal/stdio.go
similarity index 100%
rename from vendor/gopkg.in/AlecAivazis/survey.v1/terminal/stdio.go
rename to vendor/github.com/AlecAivazis/survey/v2/terminal/stdio.go
diff --git a/vendor/gopkg.in/AlecAivazis/survey.v1/terminal/syscall_windows.go b/vendor/github.com/AlecAivazis/survey/v2/terminal/syscall_windows.go
similarity index 100%
rename from vendor/gopkg.in/AlecAivazis/survey.v1/terminal/syscall_windows.go
rename to vendor/github.com/AlecAivazis/survey/v2/terminal/syscall_windows.go
diff --git a/vendor/gopkg.in/AlecAivazis/survey.v1/terminal/terminal.go b/vendor/github.com/AlecAivazis/survey/v2/terminal/terminal.go
similarity index 100%
rename from vendor/gopkg.in/AlecAivazis/survey.v1/terminal/terminal.go
rename to vendor/github.com/AlecAivazis/survey/v2/terminal/terminal.go
diff --git a/vendor/gopkg.in/AlecAivazis/survey.v1/transform.go b/vendor/github.com/AlecAivazis/survey/v2/transform.go
similarity index 89%
rename from vendor/gopkg.in/AlecAivazis/survey.v1/transform.go
rename to vendor/github.com/AlecAivazis/survey/v2/transform.go
index ccc75e08431..58d5193b03f 100644
--- a/vendor/gopkg.in/AlecAivazis/survey.v1/transform.go
+++ b/vendor/github.com/AlecAivazis/survey/v2/transform.go
@@ -18,18 +18,21 @@ func TransformString(f func(s string) string) Transformer {
return func(ans interface{}) interface{} {
// if the answer value passed in is the zero value of the appropriate type
if isZero(reflect.ValueOf(ans)) {
- // skip this `Transformer` by returning a nil value.
+ // skip this `Transformer` by returning a zero value of string.
// The original answer will be not affected,
// see survey.go#L125.
- return nil
+ // A zero value of string should be returned to be handled by
+ // next Transformer in a composed Tranformer,
+ // see tranform.go#L75
+ return ""
}
// "ans" is never nil here, so we don't have to check that
- // see survey.go#L97 for more.
+ // see survey.go#L338 for more.
// Make sure that the the answer's value was a typeof string.
s, ok := ans.(string)
if !ok {
- return nil
+ return ""
}
return f(s)
diff --git a/vendor/gopkg.in/AlecAivazis/survey.v1/validate.go b/vendor/github.com/AlecAivazis/survey/v2/validate.go
similarity index 100%
rename from vendor/gopkg.in/AlecAivazis/survey.v1/validate.go
rename to vendor/github.com/AlecAivazis/survey/v2/validate.go
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/profiles/2018-03-01/compute/mgmt/compute/models.go b/vendor/github.com/Azure/azure-sdk-for-go/profiles/2018-03-01/compute/mgmt/compute/models.go
new file mode 100644
index 00000000000..93898641f8b
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/profiles/2018-03-01/compute/mgmt/compute/models.go
@@ -0,0 +1,823 @@
+// +build go1.9
+
+// Copyright 2021 Microsoft Corporation
+//
+// 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.
+
+// This code was auto-generated by:
+// github.com/Azure/azure-sdk-for-go/tools/profileBuilder
+
+package compute
+
+import (
+ "context"
+
+ original "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2017-03-30/compute"
+)
+
+const (
+ DefaultBaseURI = original.DefaultBaseURI
+)
+
+type AccessLevel = original.AccessLevel
+
+const (
+ None AccessLevel = original.None
+ Read AccessLevel = original.Read
+)
+
+type CachingTypes = original.CachingTypes
+
+const (
+ CachingTypesNone CachingTypes = original.CachingTypesNone
+ CachingTypesReadOnly CachingTypes = original.CachingTypesReadOnly
+ CachingTypesReadWrite CachingTypes = original.CachingTypesReadWrite
+)
+
+type ComponentNames = original.ComponentNames
+
+const (
+ MicrosoftWindowsShellSetup ComponentNames = original.MicrosoftWindowsShellSetup
+)
+
+type DiskCreateOption = original.DiskCreateOption
+
+const (
+ Attach DiskCreateOption = original.Attach
+ Copy DiskCreateOption = original.Copy
+ Empty DiskCreateOption = original.Empty
+ FromImage DiskCreateOption = original.FromImage
+ Import DiskCreateOption = original.Import
+)
+
+type DiskCreateOptionTypes = original.DiskCreateOptionTypes
+
+const (
+ DiskCreateOptionTypesAttach DiskCreateOptionTypes = original.DiskCreateOptionTypesAttach
+ DiskCreateOptionTypesEmpty DiskCreateOptionTypes = original.DiskCreateOptionTypesEmpty
+ DiskCreateOptionTypesFromImage DiskCreateOptionTypes = original.DiskCreateOptionTypesFromImage
+)
+
+type IPVersion = original.IPVersion
+
+const (
+ IPv4 IPVersion = original.IPv4
+ IPv6 IPVersion = original.IPv6
+)
+
+type InstanceViewTypes = original.InstanceViewTypes
+
+const (
+ InstanceView InstanceViewTypes = original.InstanceView
+)
+
+type MaintenanceOperationResultCodeTypes = original.MaintenanceOperationResultCodeTypes
+
+const (
+ MaintenanceOperationResultCodeTypesMaintenanceAborted MaintenanceOperationResultCodeTypes = original.MaintenanceOperationResultCodeTypesMaintenanceAborted
+ MaintenanceOperationResultCodeTypesMaintenanceCompleted MaintenanceOperationResultCodeTypes = original.MaintenanceOperationResultCodeTypesMaintenanceCompleted
+ MaintenanceOperationResultCodeTypesNone MaintenanceOperationResultCodeTypes = original.MaintenanceOperationResultCodeTypesNone
+ MaintenanceOperationResultCodeTypesRetryLater MaintenanceOperationResultCodeTypes = original.MaintenanceOperationResultCodeTypesRetryLater
+)
+
+type OperatingSystemStateTypes = original.OperatingSystemStateTypes
+
+const (
+ Generalized OperatingSystemStateTypes = original.Generalized
+ Specialized OperatingSystemStateTypes = original.Specialized
+)
+
+type OperatingSystemTypes = original.OperatingSystemTypes
+
+const (
+ Linux OperatingSystemTypes = original.Linux
+ Windows OperatingSystemTypes = original.Windows
+)
+
+type PassNames = original.PassNames
+
+const (
+ OobeSystem PassNames = original.OobeSystem
+)
+
+type ProtocolTypes = original.ProtocolTypes
+
+const (
+ HTTP ProtocolTypes = original.HTTP
+ HTTPS ProtocolTypes = original.HTTPS
+)
+
+type ResourceIdentityType = original.ResourceIdentityType
+
+const (
+ SystemAssigned ResourceIdentityType = original.SystemAssigned
+)
+
+type ResourceSkuCapacityScaleType = original.ResourceSkuCapacityScaleType
+
+const (
+ ResourceSkuCapacityScaleTypeAutomatic ResourceSkuCapacityScaleType = original.ResourceSkuCapacityScaleTypeAutomatic
+ ResourceSkuCapacityScaleTypeManual ResourceSkuCapacityScaleType = original.ResourceSkuCapacityScaleTypeManual
+ ResourceSkuCapacityScaleTypeNone ResourceSkuCapacityScaleType = original.ResourceSkuCapacityScaleTypeNone
+)
+
+type ResourceSkuRestrictionsReasonCode = original.ResourceSkuRestrictionsReasonCode
+
+const (
+ NotAvailableForSubscription ResourceSkuRestrictionsReasonCode = original.NotAvailableForSubscription
+ QuotaID ResourceSkuRestrictionsReasonCode = original.QuotaID
+)
+
+type ResourceSkuRestrictionsType = original.ResourceSkuRestrictionsType
+
+const (
+ Location ResourceSkuRestrictionsType = original.Location
+)
+
+type RollingUpgradeActionType = original.RollingUpgradeActionType
+
+const (
+ Cancel RollingUpgradeActionType = original.Cancel
+ Start RollingUpgradeActionType = original.Start
+)
+
+type RollingUpgradeStatusCode = original.RollingUpgradeStatusCode
+
+const (
+ Cancelled RollingUpgradeStatusCode = original.Cancelled
+ Completed RollingUpgradeStatusCode = original.Completed
+ Faulted RollingUpgradeStatusCode = original.Faulted
+ RollingForward RollingUpgradeStatusCode = original.RollingForward
+)
+
+type SettingNames = original.SettingNames
+
+const (
+ AutoLogon SettingNames = original.AutoLogon
+ FirstLogonCommands SettingNames = original.FirstLogonCommands
+)
+
+type StatusLevelTypes = original.StatusLevelTypes
+
+const (
+ Error StatusLevelTypes = original.Error
+ Info StatusLevelTypes = original.Info
+ Warning StatusLevelTypes = original.Warning
+)
+
+type StorageAccountTypes = original.StorageAccountTypes
+
+const (
+ PremiumLRS StorageAccountTypes = original.PremiumLRS
+ StandardLRS StorageAccountTypes = original.StandardLRS
+)
+
+type UpgradeMode = original.UpgradeMode
+
+const (
+ Automatic UpgradeMode = original.Automatic
+ Manual UpgradeMode = original.Manual
+ Rolling UpgradeMode = original.Rolling
+)
+
+type VirtualMachineScaleSetSkuScaleType = original.VirtualMachineScaleSetSkuScaleType
+
+const (
+ VirtualMachineScaleSetSkuScaleTypeAutomatic VirtualMachineScaleSetSkuScaleType = original.VirtualMachineScaleSetSkuScaleTypeAutomatic
+ VirtualMachineScaleSetSkuScaleTypeNone VirtualMachineScaleSetSkuScaleType = original.VirtualMachineScaleSetSkuScaleTypeNone
+)
+
+type VirtualMachineSizeTypes = original.VirtualMachineSizeTypes
+
+const (
+ BasicA0 VirtualMachineSizeTypes = original.BasicA0
+ BasicA1 VirtualMachineSizeTypes = original.BasicA1
+ BasicA2 VirtualMachineSizeTypes = original.BasicA2
+ BasicA3 VirtualMachineSizeTypes = original.BasicA3
+ BasicA4 VirtualMachineSizeTypes = original.BasicA4
+ StandardA0 VirtualMachineSizeTypes = original.StandardA0
+ StandardA1 VirtualMachineSizeTypes = original.StandardA1
+ StandardA10 VirtualMachineSizeTypes = original.StandardA10
+ StandardA11 VirtualMachineSizeTypes = original.StandardA11
+ StandardA1V2 VirtualMachineSizeTypes = original.StandardA1V2
+ StandardA2 VirtualMachineSizeTypes = original.StandardA2
+ StandardA2mV2 VirtualMachineSizeTypes = original.StandardA2mV2
+ StandardA2V2 VirtualMachineSizeTypes = original.StandardA2V2
+ StandardA3 VirtualMachineSizeTypes = original.StandardA3
+ StandardA4 VirtualMachineSizeTypes = original.StandardA4
+ StandardA4mV2 VirtualMachineSizeTypes = original.StandardA4mV2
+ StandardA4V2 VirtualMachineSizeTypes = original.StandardA4V2
+ StandardA5 VirtualMachineSizeTypes = original.StandardA5
+ StandardA6 VirtualMachineSizeTypes = original.StandardA6
+ StandardA7 VirtualMachineSizeTypes = original.StandardA7
+ StandardA8 VirtualMachineSizeTypes = original.StandardA8
+ StandardA8mV2 VirtualMachineSizeTypes = original.StandardA8mV2
+ StandardA8V2 VirtualMachineSizeTypes = original.StandardA8V2
+ StandardA9 VirtualMachineSizeTypes = original.StandardA9
+ StandardD1 VirtualMachineSizeTypes = original.StandardD1
+ StandardD11 VirtualMachineSizeTypes = original.StandardD11
+ StandardD11V2 VirtualMachineSizeTypes = original.StandardD11V2
+ StandardD12 VirtualMachineSizeTypes = original.StandardD12
+ StandardD12V2 VirtualMachineSizeTypes = original.StandardD12V2
+ StandardD13 VirtualMachineSizeTypes = original.StandardD13
+ StandardD13V2 VirtualMachineSizeTypes = original.StandardD13V2
+ StandardD14 VirtualMachineSizeTypes = original.StandardD14
+ StandardD14V2 VirtualMachineSizeTypes = original.StandardD14V2
+ StandardD15V2 VirtualMachineSizeTypes = original.StandardD15V2
+ StandardD1V2 VirtualMachineSizeTypes = original.StandardD1V2
+ StandardD2 VirtualMachineSizeTypes = original.StandardD2
+ StandardD2V2 VirtualMachineSizeTypes = original.StandardD2V2
+ StandardD3 VirtualMachineSizeTypes = original.StandardD3
+ StandardD3V2 VirtualMachineSizeTypes = original.StandardD3V2
+ StandardD4 VirtualMachineSizeTypes = original.StandardD4
+ StandardD4V2 VirtualMachineSizeTypes = original.StandardD4V2
+ StandardD5V2 VirtualMachineSizeTypes = original.StandardD5V2
+ StandardDS1 VirtualMachineSizeTypes = original.StandardDS1
+ StandardDS11 VirtualMachineSizeTypes = original.StandardDS11
+ StandardDS11V2 VirtualMachineSizeTypes = original.StandardDS11V2
+ StandardDS12 VirtualMachineSizeTypes = original.StandardDS12
+ StandardDS12V2 VirtualMachineSizeTypes = original.StandardDS12V2
+ StandardDS13 VirtualMachineSizeTypes = original.StandardDS13
+ StandardDS13V2 VirtualMachineSizeTypes = original.StandardDS13V2
+ StandardDS14 VirtualMachineSizeTypes = original.StandardDS14
+ StandardDS14V2 VirtualMachineSizeTypes = original.StandardDS14V2
+ StandardDS15V2 VirtualMachineSizeTypes = original.StandardDS15V2
+ StandardDS1V2 VirtualMachineSizeTypes = original.StandardDS1V2
+ StandardDS2 VirtualMachineSizeTypes = original.StandardDS2
+ StandardDS2V2 VirtualMachineSizeTypes = original.StandardDS2V2
+ StandardDS3 VirtualMachineSizeTypes = original.StandardDS3
+ StandardDS3V2 VirtualMachineSizeTypes = original.StandardDS3V2
+ StandardDS4 VirtualMachineSizeTypes = original.StandardDS4
+ StandardDS4V2 VirtualMachineSizeTypes = original.StandardDS4V2
+ StandardDS5V2 VirtualMachineSizeTypes = original.StandardDS5V2
+ StandardF1 VirtualMachineSizeTypes = original.StandardF1
+ StandardF16 VirtualMachineSizeTypes = original.StandardF16
+ StandardF16s VirtualMachineSizeTypes = original.StandardF16s
+ StandardF1s VirtualMachineSizeTypes = original.StandardF1s
+ StandardF2 VirtualMachineSizeTypes = original.StandardF2
+ StandardF2s VirtualMachineSizeTypes = original.StandardF2s
+ StandardF4 VirtualMachineSizeTypes = original.StandardF4
+ StandardF4s VirtualMachineSizeTypes = original.StandardF4s
+ StandardF8 VirtualMachineSizeTypes = original.StandardF8
+ StandardF8s VirtualMachineSizeTypes = original.StandardF8s
+ StandardG1 VirtualMachineSizeTypes = original.StandardG1
+ StandardG2 VirtualMachineSizeTypes = original.StandardG2
+ StandardG3 VirtualMachineSizeTypes = original.StandardG3
+ StandardG4 VirtualMachineSizeTypes = original.StandardG4
+ StandardG5 VirtualMachineSizeTypes = original.StandardG5
+ StandardGS1 VirtualMachineSizeTypes = original.StandardGS1
+ StandardGS2 VirtualMachineSizeTypes = original.StandardGS2
+ StandardGS3 VirtualMachineSizeTypes = original.StandardGS3
+ StandardGS4 VirtualMachineSizeTypes = original.StandardGS4
+ StandardGS5 VirtualMachineSizeTypes = original.StandardGS5
+ StandardH16 VirtualMachineSizeTypes = original.StandardH16
+ StandardH16m VirtualMachineSizeTypes = original.StandardH16m
+ StandardH16mr VirtualMachineSizeTypes = original.StandardH16mr
+ StandardH16r VirtualMachineSizeTypes = original.StandardH16r
+ StandardH8 VirtualMachineSizeTypes = original.StandardH8
+ StandardH8m VirtualMachineSizeTypes = original.StandardH8m
+ StandardL16s VirtualMachineSizeTypes = original.StandardL16s
+ StandardL32s VirtualMachineSizeTypes = original.StandardL32s
+ StandardL4s VirtualMachineSizeTypes = original.StandardL4s
+ StandardL8s VirtualMachineSizeTypes = original.StandardL8s
+ StandardNC12 VirtualMachineSizeTypes = original.StandardNC12
+ StandardNC24 VirtualMachineSizeTypes = original.StandardNC24
+ StandardNC24r VirtualMachineSizeTypes = original.StandardNC24r
+ StandardNC6 VirtualMachineSizeTypes = original.StandardNC6
+ StandardNV12 VirtualMachineSizeTypes = original.StandardNV12
+ StandardNV24 VirtualMachineSizeTypes = original.StandardNV24
+ StandardNV6 VirtualMachineSizeTypes = original.StandardNV6
+)
+
+type APIEntityReference = original.APIEntityReference
+type APIError = original.APIError
+type APIErrorBase = original.APIErrorBase
+type AccessURI = original.AccessURI
+type AccessURIOutput = original.AccessURIOutput
+type AccessURIRaw = original.AccessURIRaw
+type AdditionalUnattendContent = original.AdditionalUnattendContent
+type AvailabilitySet = original.AvailabilitySet
+type AvailabilitySetListResult = original.AvailabilitySetListResult
+type AvailabilitySetListResultIterator = original.AvailabilitySetListResultIterator
+type AvailabilitySetListResultPage = original.AvailabilitySetListResultPage
+type AvailabilitySetProperties = original.AvailabilitySetProperties
+type AvailabilitySetsClient = original.AvailabilitySetsClient
+type BaseClient = original.BaseClient
+type BootDiagnostics = original.BootDiagnostics
+type BootDiagnosticsInstanceView = original.BootDiagnosticsInstanceView
+type CreationData = original.CreationData
+type DataDisk = original.DataDisk
+type DataDiskImage = original.DataDiskImage
+type DiagnosticsProfile = original.DiagnosticsProfile
+type Disk = original.Disk
+type DiskEncryptionSettings = original.DiskEncryptionSettings
+type DiskInstanceView = original.DiskInstanceView
+type DiskList = original.DiskList
+type DiskListIterator = original.DiskListIterator
+type DiskListPage = original.DiskListPage
+type DiskProperties = original.DiskProperties
+type DiskSku = original.DiskSku
+type DiskUpdate = original.DiskUpdate
+type DiskUpdateProperties = original.DiskUpdateProperties
+type DisksClient = original.DisksClient
+type DisksCreateOrUpdateFuture = original.DisksCreateOrUpdateFuture
+type DisksDeleteFuture = original.DisksDeleteFuture
+type DisksGrantAccessFuture = original.DisksGrantAccessFuture
+type DisksRevokeAccessFuture = original.DisksRevokeAccessFuture
+type DisksUpdateFuture = original.DisksUpdateFuture
+type EncryptionSettings = original.EncryptionSettings
+type GrantAccessData = original.GrantAccessData
+type HardwareProfile = original.HardwareProfile
+type Image = original.Image
+type ImageDataDisk = original.ImageDataDisk
+type ImageDiskReference = original.ImageDiskReference
+type ImageListResult = original.ImageListResult
+type ImageListResultIterator = original.ImageListResultIterator
+type ImageListResultPage = original.ImageListResultPage
+type ImageOSDisk = original.ImageOSDisk
+type ImageProperties = original.ImageProperties
+type ImageReference = original.ImageReference
+type ImageStorageProfile = original.ImageStorageProfile
+type ImagesClient = original.ImagesClient
+type ImagesCreateOrUpdateFuture = original.ImagesCreateOrUpdateFuture
+type ImagesDeleteFuture = original.ImagesDeleteFuture
+type InnerError = original.InnerError
+type InstanceViewStatus = original.InstanceViewStatus
+type KeyVaultAndKeyReference = original.KeyVaultAndKeyReference
+type KeyVaultAndSecretReference = original.KeyVaultAndSecretReference
+type KeyVaultKeyReference = original.KeyVaultKeyReference
+type KeyVaultSecretReference = original.KeyVaultSecretReference
+type LinuxConfiguration = original.LinuxConfiguration
+type ListUsagesResult = original.ListUsagesResult
+type ListUsagesResultIterator = original.ListUsagesResultIterator
+type ListUsagesResultPage = original.ListUsagesResultPage
+type ListVirtualMachineExtensionImage = original.ListVirtualMachineExtensionImage
+type ListVirtualMachineImageResource = original.ListVirtualMachineImageResource
+type LongRunningOperationProperties = original.LongRunningOperationProperties
+type MaintenanceRedeployStatus = original.MaintenanceRedeployStatus
+type ManagedDiskParameters = original.ManagedDiskParameters
+type NetworkInterfaceReference = original.NetworkInterfaceReference
+type NetworkInterfaceReferenceProperties = original.NetworkInterfaceReferenceProperties
+type NetworkProfile = original.NetworkProfile
+type OSDisk = original.OSDisk
+type OSDiskImage = original.OSDiskImage
+type OSProfile = original.OSProfile
+type OperationStatusResponse = original.OperationStatusResponse
+type Plan = original.Plan
+type PurchasePlan = original.PurchasePlan
+type Resource = original.Resource
+type ResourceSku = original.ResourceSku
+type ResourceSkuCapabilities = original.ResourceSkuCapabilities
+type ResourceSkuCapacity = original.ResourceSkuCapacity
+type ResourceSkuCosts = original.ResourceSkuCosts
+type ResourceSkuRestrictions = original.ResourceSkuRestrictions
+type ResourceSkusClient = original.ResourceSkusClient
+type ResourceSkusResult = original.ResourceSkusResult
+type ResourceSkusResultIterator = original.ResourceSkusResultIterator
+type ResourceSkusResultPage = original.ResourceSkusResultPage
+type ResourceUpdate = original.ResourceUpdate
+type RollingUpgradePolicy = original.RollingUpgradePolicy
+type RollingUpgradeProgressInfo = original.RollingUpgradeProgressInfo
+type RollingUpgradeRunningStatus = original.RollingUpgradeRunningStatus
+type RollingUpgradeStatusInfo = original.RollingUpgradeStatusInfo
+type RollingUpgradeStatusInfoProperties = original.RollingUpgradeStatusInfoProperties
+type RunCommandDocument = original.RunCommandDocument
+type RunCommandDocumentBase = original.RunCommandDocumentBase
+type RunCommandInput = original.RunCommandInput
+type RunCommandInputParameter = original.RunCommandInputParameter
+type RunCommandListResult = original.RunCommandListResult
+type RunCommandListResultIterator = original.RunCommandListResultIterator
+type RunCommandListResultPage = original.RunCommandListResultPage
+type RunCommandParameterDefinition = original.RunCommandParameterDefinition
+type RunCommandResult = original.RunCommandResult
+type RunCommandResultProperties = original.RunCommandResultProperties
+type SSHConfiguration = original.SSHConfiguration
+type SSHPublicKey = original.SSHPublicKey
+type Sku = original.Sku
+type Snapshot = original.Snapshot
+type SnapshotList = original.SnapshotList
+type SnapshotListIterator = original.SnapshotListIterator
+type SnapshotListPage = original.SnapshotListPage
+type SnapshotUpdate = original.SnapshotUpdate
+type SnapshotsClient = original.SnapshotsClient
+type SnapshotsCreateOrUpdateFuture = original.SnapshotsCreateOrUpdateFuture
+type SnapshotsDeleteFuture = original.SnapshotsDeleteFuture
+type SnapshotsGrantAccessFuture = original.SnapshotsGrantAccessFuture
+type SnapshotsRevokeAccessFuture = original.SnapshotsRevokeAccessFuture
+type SnapshotsUpdateFuture = original.SnapshotsUpdateFuture
+type SourceVault = original.SourceVault
+type StorageProfile = original.StorageProfile
+type SubResource = original.SubResource
+type SubResourceReadOnly = original.SubResourceReadOnly
+type UpdateResource = original.UpdateResource
+type UpgradePolicy = original.UpgradePolicy
+type Usage = original.Usage
+type UsageClient = original.UsageClient
+type UsageName = original.UsageName
+type VaultCertificate = original.VaultCertificate
+type VaultSecretGroup = original.VaultSecretGroup
+type VirtualHardDisk = original.VirtualHardDisk
+type VirtualMachine = original.VirtualMachine
+type VirtualMachineAgentInstanceView = original.VirtualMachineAgentInstanceView
+type VirtualMachineCaptureParameters = original.VirtualMachineCaptureParameters
+type VirtualMachineCaptureResult = original.VirtualMachineCaptureResult
+type VirtualMachineCaptureResultProperties = original.VirtualMachineCaptureResultProperties
+type VirtualMachineExtension = original.VirtualMachineExtension
+type VirtualMachineExtensionHandlerInstanceView = original.VirtualMachineExtensionHandlerInstanceView
+type VirtualMachineExtensionImage = original.VirtualMachineExtensionImage
+type VirtualMachineExtensionImageProperties = original.VirtualMachineExtensionImageProperties
+type VirtualMachineExtensionImagesClient = original.VirtualMachineExtensionImagesClient
+type VirtualMachineExtensionInstanceView = original.VirtualMachineExtensionInstanceView
+type VirtualMachineExtensionProperties = original.VirtualMachineExtensionProperties
+type VirtualMachineExtensionUpdate = original.VirtualMachineExtensionUpdate
+type VirtualMachineExtensionUpdateProperties = original.VirtualMachineExtensionUpdateProperties
+type VirtualMachineExtensionsClient = original.VirtualMachineExtensionsClient
+type VirtualMachineExtensionsCreateOrUpdateFuture = original.VirtualMachineExtensionsCreateOrUpdateFuture
+type VirtualMachineExtensionsDeleteFuture = original.VirtualMachineExtensionsDeleteFuture
+type VirtualMachineExtensionsListResult = original.VirtualMachineExtensionsListResult
+type VirtualMachineExtensionsUpdateFuture = original.VirtualMachineExtensionsUpdateFuture
+type VirtualMachineHealthStatus = original.VirtualMachineHealthStatus
+type VirtualMachineIdentity = original.VirtualMachineIdentity
+type VirtualMachineImage = original.VirtualMachineImage
+type VirtualMachineImageProperties = original.VirtualMachineImageProperties
+type VirtualMachineImageResource = original.VirtualMachineImageResource
+type VirtualMachineImagesClient = original.VirtualMachineImagesClient
+type VirtualMachineInstanceView = original.VirtualMachineInstanceView
+type VirtualMachineListResult = original.VirtualMachineListResult
+type VirtualMachineListResultIterator = original.VirtualMachineListResultIterator
+type VirtualMachineListResultPage = original.VirtualMachineListResultPage
+type VirtualMachineProperties = original.VirtualMachineProperties
+type VirtualMachineRunCommandsClient = original.VirtualMachineRunCommandsClient
+type VirtualMachineScaleSet = original.VirtualMachineScaleSet
+type VirtualMachineScaleSetDataDisk = original.VirtualMachineScaleSetDataDisk
+type VirtualMachineScaleSetExtension = original.VirtualMachineScaleSetExtension
+type VirtualMachineScaleSetExtensionListResult = original.VirtualMachineScaleSetExtensionListResult
+type VirtualMachineScaleSetExtensionListResultIterator = original.VirtualMachineScaleSetExtensionListResultIterator
+type VirtualMachineScaleSetExtensionListResultPage = original.VirtualMachineScaleSetExtensionListResultPage
+type VirtualMachineScaleSetExtensionProfile = original.VirtualMachineScaleSetExtensionProfile
+type VirtualMachineScaleSetExtensionProperties = original.VirtualMachineScaleSetExtensionProperties
+type VirtualMachineScaleSetExtensionsClient = original.VirtualMachineScaleSetExtensionsClient
+type VirtualMachineScaleSetExtensionsCreateOrUpdateFuture = original.VirtualMachineScaleSetExtensionsCreateOrUpdateFuture
+type VirtualMachineScaleSetExtensionsDeleteFuture = original.VirtualMachineScaleSetExtensionsDeleteFuture
+type VirtualMachineScaleSetIPConfiguration = original.VirtualMachineScaleSetIPConfiguration
+type VirtualMachineScaleSetIPConfigurationProperties = original.VirtualMachineScaleSetIPConfigurationProperties
+type VirtualMachineScaleSetIdentity = original.VirtualMachineScaleSetIdentity
+type VirtualMachineScaleSetInstanceView = original.VirtualMachineScaleSetInstanceView
+type VirtualMachineScaleSetInstanceViewStatusesSummary = original.VirtualMachineScaleSetInstanceViewStatusesSummary
+type VirtualMachineScaleSetListResult = original.VirtualMachineScaleSetListResult
+type VirtualMachineScaleSetListResultIterator = original.VirtualMachineScaleSetListResultIterator
+type VirtualMachineScaleSetListResultPage = original.VirtualMachineScaleSetListResultPage
+type VirtualMachineScaleSetListSkusResult = original.VirtualMachineScaleSetListSkusResult
+type VirtualMachineScaleSetListSkusResultIterator = original.VirtualMachineScaleSetListSkusResultIterator
+type VirtualMachineScaleSetListSkusResultPage = original.VirtualMachineScaleSetListSkusResultPage
+type VirtualMachineScaleSetListWithLinkResult = original.VirtualMachineScaleSetListWithLinkResult
+type VirtualMachineScaleSetListWithLinkResultIterator = original.VirtualMachineScaleSetListWithLinkResultIterator
+type VirtualMachineScaleSetListWithLinkResultPage = original.VirtualMachineScaleSetListWithLinkResultPage
+type VirtualMachineScaleSetManagedDiskParameters = original.VirtualMachineScaleSetManagedDiskParameters
+type VirtualMachineScaleSetNetworkConfiguration = original.VirtualMachineScaleSetNetworkConfiguration
+type VirtualMachineScaleSetNetworkConfigurationDNSSettings = original.VirtualMachineScaleSetNetworkConfigurationDNSSettings
+type VirtualMachineScaleSetNetworkConfigurationProperties = original.VirtualMachineScaleSetNetworkConfigurationProperties
+type VirtualMachineScaleSetNetworkProfile = original.VirtualMachineScaleSetNetworkProfile
+type VirtualMachineScaleSetOSDisk = original.VirtualMachineScaleSetOSDisk
+type VirtualMachineScaleSetOSProfile = original.VirtualMachineScaleSetOSProfile
+type VirtualMachineScaleSetProperties = original.VirtualMachineScaleSetProperties
+type VirtualMachineScaleSetPublicIPAddressConfiguration = original.VirtualMachineScaleSetPublicIPAddressConfiguration
+type VirtualMachineScaleSetPublicIPAddressConfigurationDNSSettings = original.VirtualMachineScaleSetPublicIPAddressConfigurationDNSSettings
+type VirtualMachineScaleSetPublicIPAddressConfigurationProperties = original.VirtualMachineScaleSetPublicIPAddressConfigurationProperties
+type VirtualMachineScaleSetRollingUpgradesCancelFuture = original.VirtualMachineScaleSetRollingUpgradesCancelFuture
+type VirtualMachineScaleSetRollingUpgradesClient = original.VirtualMachineScaleSetRollingUpgradesClient
+type VirtualMachineScaleSetRollingUpgradesStartOSUpgradeFuture = original.VirtualMachineScaleSetRollingUpgradesStartOSUpgradeFuture
+type VirtualMachineScaleSetSku = original.VirtualMachineScaleSetSku
+type VirtualMachineScaleSetSkuCapacity = original.VirtualMachineScaleSetSkuCapacity
+type VirtualMachineScaleSetStorageProfile = original.VirtualMachineScaleSetStorageProfile
+type VirtualMachineScaleSetUpdate = original.VirtualMachineScaleSetUpdate
+type VirtualMachineScaleSetUpdateIPConfiguration = original.VirtualMachineScaleSetUpdateIPConfiguration
+type VirtualMachineScaleSetUpdateIPConfigurationProperties = original.VirtualMachineScaleSetUpdateIPConfigurationProperties
+type VirtualMachineScaleSetUpdateNetworkConfiguration = original.VirtualMachineScaleSetUpdateNetworkConfiguration
+type VirtualMachineScaleSetUpdateNetworkConfigurationProperties = original.VirtualMachineScaleSetUpdateNetworkConfigurationProperties
+type VirtualMachineScaleSetUpdateNetworkProfile = original.VirtualMachineScaleSetUpdateNetworkProfile
+type VirtualMachineScaleSetUpdateOSDisk = original.VirtualMachineScaleSetUpdateOSDisk
+type VirtualMachineScaleSetUpdateOSProfile = original.VirtualMachineScaleSetUpdateOSProfile
+type VirtualMachineScaleSetUpdateProperties = original.VirtualMachineScaleSetUpdateProperties
+type VirtualMachineScaleSetUpdatePublicIPAddressConfiguration = original.VirtualMachineScaleSetUpdatePublicIPAddressConfiguration
+type VirtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties = original.VirtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties
+type VirtualMachineScaleSetUpdateStorageProfile = original.VirtualMachineScaleSetUpdateStorageProfile
+type VirtualMachineScaleSetUpdateVMProfile = original.VirtualMachineScaleSetUpdateVMProfile
+type VirtualMachineScaleSetVM = original.VirtualMachineScaleSetVM
+type VirtualMachineScaleSetVMExtensionsSummary = original.VirtualMachineScaleSetVMExtensionsSummary
+type VirtualMachineScaleSetVMInstanceIDs = original.VirtualMachineScaleSetVMInstanceIDs
+type VirtualMachineScaleSetVMInstanceRequiredIDs = original.VirtualMachineScaleSetVMInstanceRequiredIDs
+type VirtualMachineScaleSetVMInstanceView = original.VirtualMachineScaleSetVMInstanceView
+type VirtualMachineScaleSetVMListResult = original.VirtualMachineScaleSetVMListResult
+type VirtualMachineScaleSetVMListResultIterator = original.VirtualMachineScaleSetVMListResultIterator
+type VirtualMachineScaleSetVMListResultPage = original.VirtualMachineScaleSetVMListResultPage
+type VirtualMachineScaleSetVMProfile = original.VirtualMachineScaleSetVMProfile
+type VirtualMachineScaleSetVMProperties = original.VirtualMachineScaleSetVMProperties
+type VirtualMachineScaleSetVMsClient = original.VirtualMachineScaleSetVMsClient
+type VirtualMachineScaleSetVMsDeallocateFuture = original.VirtualMachineScaleSetVMsDeallocateFuture
+type VirtualMachineScaleSetVMsDeleteFuture = original.VirtualMachineScaleSetVMsDeleteFuture
+type VirtualMachineScaleSetVMsPowerOffFuture = original.VirtualMachineScaleSetVMsPowerOffFuture
+type VirtualMachineScaleSetVMsReimageAllFuture = original.VirtualMachineScaleSetVMsReimageAllFuture
+type VirtualMachineScaleSetVMsReimageFuture = original.VirtualMachineScaleSetVMsReimageFuture
+type VirtualMachineScaleSetVMsRestartFuture = original.VirtualMachineScaleSetVMsRestartFuture
+type VirtualMachineScaleSetVMsStartFuture = original.VirtualMachineScaleSetVMsStartFuture
+type VirtualMachineScaleSetsClient = original.VirtualMachineScaleSetsClient
+type VirtualMachineScaleSetsCreateOrUpdateFuture = original.VirtualMachineScaleSetsCreateOrUpdateFuture
+type VirtualMachineScaleSetsDeallocateFuture = original.VirtualMachineScaleSetsDeallocateFuture
+type VirtualMachineScaleSetsDeleteFuture = original.VirtualMachineScaleSetsDeleteFuture
+type VirtualMachineScaleSetsDeleteInstancesFuture = original.VirtualMachineScaleSetsDeleteInstancesFuture
+type VirtualMachineScaleSetsPowerOffFuture = original.VirtualMachineScaleSetsPowerOffFuture
+type VirtualMachineScaleSetsReimageAllFuture = original.VirtualMachineScaleSetsReimageAllFuture
+type VirtualMachineScaleSetsReimageFuture = original.VirtualMachineScaleSetsReimageFuture
+type VirtualMachineScaleSetsRestartFuture = original.VirtualMachineScaleSetsRestartFuture
+type VirtualMachineScaleSetsStartFuture = original.VirtualMachineScaleSetsStartFuture
+type VirtualMachineScaleSetsUpdateFuture = original.VirtualMachineScaleSetsUpdateFuture
+type VirtualMachineScaleSetsUpdateInstancesFuture = original.VirtualMachineScaleSetsUpdateInstancesFuture
+type VirtualMachineSize = original.VirtualMachineSize
+type VirtualMachineSizeListResult = original.VirtualMachineSizeListResult
+type VirtualMachineSizesClient = original.VirtualMachineSizesClient
+type VirtualMachineStatusCodeCount = original.VirtualMachineStatusCodeCount
+type VirtualMachinesCaptureFuture = original.VirtualMachinesCaptureFuture
+type VirtualMachinesClient = original.VirtualMachinesClient
+type VirtualMachinesConvertToManagedDisksFuture = original.VirtualMachinesConvertToManagedDisksFuture
+type VirtualMachinesCreateOrUpdateFuture = original.VirtualMachinesCreateOrUpdateFuture
+type VirtualMachinesDeallocateFuture = original.VirtualMachinesDeallocateFuture
+type VirtualMachinesDeleteFuture = original.VirtualMachinesDeleteFuture
+type VirtualMachinesPerformMaintenanceFuture = original.VirtualMachinesPerformMaintenanceFuture
+type VirtualMachinesPowerOffFuture = original.VirtualMachinesPowerOffFuture
+type VirtualMachinesRedeployFuture = original.VirtualMachinesRedeployFuture
+type VirtualMachinesRestartFuture = original.VirtualMachinesRestartFuture
+type VirtualMachinesRunCommandFuture = original.VirtualMachinesRunCommandFuture
+type VirtualMachinesStartFuture = original.VirtualMachinesStartFuture
+type WinRMConfiguration = original.WinRMConfiguration
+type WinRMListener = original.WinRMListener
+type WindowsConfiguration = original.WindowsConfiguration
+
+func New(subscriptionID string) BaseClient {
+ return original.New(subscriptionID)
+}
+func NewAvailabilitySetListResultIterator(page AvailabilitySetListResultPage) AvailabilitySetListResultIterator {
+ return original.NewAvailabilitySetListResultIterator(page)
+}
+func NewAvailabilitySetListResultPage(cur AvailabilitySetListResult, getNextPage func(context.Context, AvailabilitySetListResult) (AvailabilitySetListResult, error)) AvailabilitySetListResultPage {
+ return original.NewAvailabilitySetListResultPage(cur, getNextPage)
+}
+func NewAvailabilitySetsClient(subscriptionID string) AvailabilitySetsClient {
+ return original.NewAvailabilitySetsClient(subscriptionID)
+}
+func NewAvailabilitySetsClientWithBaseURI(baseURI string, subscriptionID string) AvailabilitySetsClient {
+ return original.NewAvailabilitySetsClientWithBaseURI(baseURI, subscriptionID)
+}
+func NewDiskListIterator(page DiskListPage) DiskListIterator {
+ return original.NewDiskListIterator(page)
+}
+func NewDiskListPage(cur DiskList, getNextPage func(context.Context, DiskList) (DiskList, error)) DiskListPage {
+ return original.NewDiskListPage(cur, getNextPage)
+}
+func NewDisksClient(subscriptionID string) DisksClient {
+ return original.NewDisksClient(subscriptionID)
+}
+func NewDisksClientWithBaseURI(baseURI string, subscriptionID string) DisksClient {
+ return original.NewDisksClientWithBaseURI(baseURI, subscriptionID)
+}
+func NewImageListResultIterator(page ImageListResultPage) ImageListResultIterator {
+ return original.NewImageListResultIterator(page)
+}
+func NewImageListResultPage(cur ImageListResult, getNextPage func(context.Context, ImageListResult) (ImageListResult, error)) ImageListResultPage {
+ return original.NewImageListResultPage(cur, getNextPage)
+}
+func NewImagesClient(subscriptionID string) ImagesClient {
+ return original.NewImagesClient(subscriptionID)
+}
+func NewImagesClientWithBaseURI(baseURI string, subscriptionID string) ImagesClient {
+ return original.NewImagesClientWithBaseURI(baseURI, subscriptionID)
+}
+func NewListUsagesResultIterator(page ListUsagesResultPage) ListUsagesResultIterator {
+ return original.NewListUsagesResultIterator(page)
+}
+func NewListUsagesResultPage(cur ListUsagesResult, getNextPage func(context.Context, ListUsagesResult) (ListUsagesResult, error)) ListUsagesResultPage {
+ return original.NewListUsagesResultPage(cur, getNextPage)
+}
+func NewResourceSkusClient(subscriptionID string) ResourceSkusClient {
+ return original.NewResourceSkusClient(subscriptionID)
+}
+func NewResourceSkusClientWithBaseURI(baseURI string, subscriptionID string) ResourceSkusClient {
+ return original.NewResourceSkusClientWithBaseURI(baseURI, subscriptionID)
+}
+func NewResourceSkusResultIterator(page ResourceSkusResultPage) ResourceSkusResultIterator {
+ return original.NewResourceSkusResultIterator(page)
+}
+func NewResourceSkusResultPage(cur ResourceSkusResult, getNextPage func(context.Context, ResourceSkusResult) (ResourceSkusResult, error)) ResourceSkusResultPage {
+ return original.NewResourceSkusResultPage(cur, getNextPage)
+}
+func NewRunCommandListResultIterator(page RunCommandListResultPage) RunCommandListResultIterator {
+ return original.NewRunCommandListResultIterator(page)
+}
+func NewRunCommandListResultPage(cur RunCommandListResult, getNextPage func(context.Context, RunCommandListResult) (RunCommandListResult, error)) RunCommandListResultPage {
+ return original.NewRunCommandListResultPage(cur, getNextPage)
+}
+func NewSnapshotListIterator(page SnapshotListPage) SnapshotListIterator {
+ return original.NewSnapshotListIterator(page)
+}
+func NewSnapshotListPage(cur SnapshotList, getNextPage func(context.Context, SnapshotList) (SnapshotList, error)) SnapshotListPage {
+ return original.NewSnapshotListPage(cur, getNextPage)
+}
+func NewSnapshotsClient(subscriptionID string) SnapshotsClient {
+ return original.NewSnapshotsClient(subscriptionID)
+}
+func NewSnapshotsClientWithBaseURI(baseURI string, subscriptionID string) SnapshotsClient {
+ return original.NewSnapshotsClientWithBaseURI(baseURI, subscriptionID)
+}
+func NewUsageClient(subscriptionID string) UsageClient {
+ return original.NewUsageClient(subscriptionID)
+}
+func NewUsageClientWithBaseURI(baseURI string, subscriptionID string) UsageClient {
+ return original.NewUsageClientWithBaseURI(baseURI, subscriptionID)
+}
+func NewVirtualMachineExtensionImagesClient(subscriptionID string) VirtualMachineExtensionImagesClient {
+ return original.NewVirtualMachineExtensionImagesClient(subscriptionID)
+}
+func NewVirtualMachineExtensionImagesClientWithBaseURI(baseURI string, subscriptionID string) VirtualMachineExtensionImagesClient {
+ return original.NewVirtualMachineExtensionImagesClientWithBaseURI(baseURI, subscriptionID)
+}
+func NewVirtualMachineExtensionsClient(subscriptionID string) VirtualMachineExtensionsClient {
+ return original.NewVirtualMachineExtensionsClient(subscriptionID)
+}
+func NewVirtualMachineExtensionsClientWithBaseURI(baseURI string, subscriptionID string) VirtualMachineExtensionsClient {
+ return original.NewVirtualMachineExtensionsClientWithBaseURI(baseURI, subscriptionID)
+}
+func NewVirtualMachineImagesClient(subscriptionID string) VirtualMachineImagesClient {
+ return original.NewVirtualMachineImagesClient(subscriptionID)
+}
+func NewVirtualMachineImagesClientWithBaseURI(baseURI string, subscriptionID string) VirtualMachineImagesClient {
+ return original.NewVirtualMachineImagesClientWithBaseURI(baseURI, subscriptionID)
+}
+func NewVirtualMachineListResultIterator(page VirtualMachineListResultPage) VirtualMachineListResultIterator {
+ return original.NewVirtualMachineListResultIterator(page)
+}
+func NewVirtualMachineListResultPage(cur VirtualMachineListResult, getNextPage func(context.Context, VirtualMachineListResult) (VirtualMachineListResult, error)) VirtualMachineListResultPage {
+ return original.NewVirtualMachineListResultPage(cur, getNextPage)
+}
+func NewVirtualMachineRunCommandsClient(subscriptionID string) VirtualMachineRunCommandsClient {
+ return original.NewVirtualMachineRunCommandsClient(subscriptionID)
+}
+func NewVirtualMachineRunCommandsClientWithBaseURI(baseURI string, subscriptionID string) VirtualMachineRunCommandsClient {
+ return original.NewVirtualMachineRunCommandsClientWithBaseURI(baseURI, subscriptionID)
+}
+func NewVirtualMachineScaleSetExtensionListResultIterator(page VirtualMachineScaleSetExtensionListResultPage) VirtualMachineScaleSetExtensionListResultIterator {
+ return original.NewVirtualMachineScaleSetExtensionListResultIterator(page)
+}
+func NewVirtualMachineScaleSetExtensionListResultPage(cur VirtualMachineScaleSetExtensionListResult, getNextPage func(context.Context, VirtualMachineScaleSetExtensionListResult) (VirtualMachineScaleSetExtensionListResult, error)) VirtualMachineScaleSetExtensionListResultPage {
+ return original.NewVirtualMachineScaleSetExtensionListResultPage(cur, getNextPage)
+}
+func NewVirtualMachineScaleSetExtensionsClient(subscriptionID string) VirtualMachineScaleSetExtensionsClient {
+ return original.NewVirtualMachineScaleSetExtensionsClient(subscriptionID)
+}
+func NewVirtualMachineScaleSetExtensionsClientWithBaseURI(baseURI string, subscriptionID string) VirtualMachineScaleSetExtensionsClient {
+ return original.NewVirtualMachineScaleSetExtensionsClientWithBaseURI(baseURI, subscriptionID)
+}
+func NewVirtualMachineScaleSetListResultIterator(page VirtualMachineScaleSetListResultPage) VirtualMachineScaleSetListResultIterator {
+ return original.NewVirtualMachineScaleSetListResultIterator(page)
+}
+func NewVirtualMachineScaleSetListResultPage(cur VirtualMachineScaleSetListResult, getNextPage func(context.Context, VirtualMachineScaleSetListResult) (VirtualMachineScaleSetListResult, error)) VirtualMachineScaleSetListResultPage {
+ return original.NewVirtualMachineScaleSetListResultPage(cur, getNextPage)
+}
+func NewVirtualMachineScaleSetListSkusResultIterator(page VirtualMachineScaleSetListSkusResultPage) VirtualMachineScaleSetListSkusResultIterator {
+ return original.NewVirtualMachineScaleSetListSkusResultIterator(page)
+}
+func NewVirtualMachineScaleSetListSkusResultPage(cur VirtualMachineScaleSetListSkusResult, getNextPage func(context.Context, VirtualMachineScaleSetListSkusResult) (VirtualMachineScaleSetListSkusResult, error)) VirtualMachineScaleSetListSkusResultPage {
+ return original.NewVirtualMachineScaleSetListSkusResultPage(cur, getNextPage)
+}
+func NewVirtualMachineScaleSetListWithLinkResultIterator(page VirtualMachineScaleSetListWithLinkResultPage) VirtualMachineScaleSetListWithLinkResultIterator {
+ return original.NewVirtualMachineScaleSetListWithLinkResultIterator(page)
+}
+func NewVirtualMachineScaleSetListWithLinkResultPage(cur VirtualMachineScaleSetListWithLinkResult, getNextPage func(context.Context, VirtualMachineScaleSetListWithLinkResult) (VirtualMachineScaleSetListWithLinkResult, error)) VirtualMachineScaleSetListWithLinkResultPage {
+ return original.NewVirtualMachineScaleSetListWithLinkResultPage(cur, getNextPage)
+}
+func NewVirtualMachineScaleSetRollingUpgradesClient(subscriptionID string) VirtualMachineScaleSetRollingUpgradesClient {
+ return original.NewVirtualMachineScaleSetRollingUpgradesClient(subscriptionID)
+}
+func NewVirtualMachineScaleSetRollingUpgradesClientWithBaseURI(baseURI string, subscriptionID string) VirtualMachineScaleSetRollingUpgradesClient {
+ return original.NewVirtualMachineScaleSetRollingUpgradesClientWithBaseURI(baseURI, subscriptionID)
+}
+func NewVirtualMachineScaleSetVMListResultIterator(page VirtualMachineScaleSetVMListResultPage) VirtualMachineScaleSetVMListResultIterator {
+ return original.NewVirtualMachineScaleSetVMListResultIterator(page)
+}
+func NewVirtualMachineScaleSetVMListResultPage(cur VirtualMachineScaleSetVMListResult, getNextPage func(context.Context, VirtualMachineScaleSetVMListResult) (VirtualMachineScaleSetVMListResult, error)) VirtualMachineScaleSetVMListResultPage {
+ return original.NewVirtualMachineScaleSetVMListResultPage(cur, getNextPage)
+}
+func NewVirtualMachineScaleSetVMsClient(subscriptionID string) VirtualMachineScaleSetVMsClient {
+ return original.NewVirtualMachineScaleSetVMsClient(subscriptionID)
+}
+func NewVirtualMachineScaleSetVMsClientWithBaseURI(baseURI string, subscriptionID string) VirtualMachineScaleSetVMsClient {
+ return original.NewVirtualMachineScaleSetVMsClientWithBaseURI(baseURI, subscriptionID)
+}
+func NewVirtualMachineScaleSetsClient(subscriptionID string) VirtualMachineScaleSetsClient {
+ return original.NewVirtualMachineScaleSetsClient(subscriptionID)
+}
+func NewVirtualMachineScaleSetsClientWithBaseURI(baseURI string, subscriptionID string) VirtualMachineScaleSetsClient {
+ return original.NewVirtualMachineScaleSetsClientWithBaseURI(baseURI, subscriptionID)
+}
+func NewVirtualMachineSizesClient(subscriptionID string) VirtualMachineSizesClient {
+ return original.NewVirtualMachineSizesClient(subscriptionID)
+}
+func NewVirtualMachineSizesClientWithBaseURI(baseURI string, subscriptionID string) VirtualMachineSizesClient {
+ return original.NewVirtualMachineSizesClientWithBaseURI(baseURI, subscriptionID)
+}
+func NewVirtualMachinesClient(subscriptionID string) VirtualMachinesClient {
+ return original.NewVirtualMachinesClient(subscriptionID)
+}
+func NewVirtualMachinesClientWithBaseURI(baseURI string, subscriptionID string) VirtualMachinesClient {
+ return original.NewVirtualMachinesClientWithBaseURI(baseURI, subscriptionID)
+}
+func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient {
+ return original.NewWithBaseURI(baseURI, subscriptionID)
+}
+func PossibleAccessLevelValues() []AccessLevel {
+ return original.PossibleAccessLevelValues()
+}
+func PossibleCachingTypesValues() []CachingTypes {
+ return original.PossibleCachingTypesValues()
+}
+func PossibleComponentNamesValues() []ComponentNames {
+ return original.PossibleComponentNamesValues()
+}
+func PossibleDiskCreateOptionTypesValues() []DiskCreateOptionTypes {
+ return original.PossibleDiskCreateOptionTypesValues()
+}
+func PossibleDiskCreateOptionValues() []DiskCreateOption {
+ return original.PossibleDiskCreateOptionValues()
+}
+func PossibleIPVersionValues() []IPVersion {
+ return original.PossibleIPVersionValues()
+}
+func PossibleInstanceViewTypesValues() []InstanceViewTypes {
+ return original.PossibleInstanceViewTypesValues()
+}
+func PossibleMaintenanceOperationResultCodeTypesValues() []MaintenanceOperationResultCodeTypes {
+ return original.PossibleMaintenanceOperationResultCodeTypesValues()
+}
+func PossibleOperatingSystemStateTypesValues() []OperatingSystemStateTypes {
+ return original.PossibleOperatingSystemStateTypesValues()
+}
+func PossibleOperatingSystemTypesValues() []OperatingSystemTypes {
+ return original.PossibleOperatingSystemTypesValues()
+}
+func PossiblePassNamesValues() []PassNames {
+ return original.PossiblePassNamesValues()
+}
+func PossibleProtocolTypesValues() []ProtocolTypes {
+ return original.PossibleProtocolTypesValues()
+}
+func PossibleResourceIdentityTypeValues() []ResourceIdentityType {
+ return original.PossibleResourceIdentityTypeValues()
+}
+func PossibleResourceSkuCapacityScaleTypeValues() []ResourceSkuCapacityScaleType {
+ return original.PossibleResourceSkuCapacityScaleTypeValues()
+}
+func PossibleResourceSkuRestrictionsReasonCodeValues() []ResourceSkuRestrictionsReasonCode {
+ return original.PossibleResourceSkuRestrictionsReasonCodeValues()
+}
+func PossibleResourceSkuRestrictionsTypeValues() []ResourceSkuRestrictionsType {
+ return original.PossibleResourceSkuRestrictionsTypeValues()
+}
+func PossibleRollingUpgradeActionTypeValues() []RollingUpgradeActionType {
+ return original.PossibleRollingUpgradeActionTypeValues()
+}
+func PossibleRollingUpgradeStatusCodeValues() []RollingUpgradeStatusCode {
+ return original.PossibleRollingUpgradeStatusCodeValues()
+}
+func PossibleSettingNamesValues() []SettingNames {
+ return original.PossibleSettingNamesValues()
+}
+func PossibleStatusLevelTypesValues() []StatusLevelTypes {
+ return original.PossibleStatusLevelTypesValues()
+}
+func PossibleStorageAccountTypesValues() []StorageAccountTypes {
+ return original.PossibleStorageAccountTypesValues()
+}
+func PossibleUpgradeModeValues() []UpgradeMode {
+ return original.PossibleUpgradeModeValues()
+}
+func PossibleVirtualMachineScaleSetSkuScaleTypeValues() []VirtualMachineScaleSetSkuScaleType {
+ return original.PossibleVirtualMachineScaleSetSkuScaleTypeValues()
+}
+func PossibleVirtualMachineSizeTypesValues() []VirtualMachineSizeTypes {
+ return original.PossibleVirtualMachineSizeTypesValues()
+}
+func UserAgent() string {
+ return original.UserAgent() + " profiles/2018-03-01"
+}
+func Version() string {
+ return original.Version()
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/profiles/2018-03-01/dns/mgmt/dns/models.go b/vendor/github.com/Azure/azure-sdk-for-go/profiles/2018-03-01/dns/mgmt/dns/models.go
new file mode 100644
index 00000000000..b370194533d
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/profiles/2018-03-01/dns/mgmt/dns/models.go
@@ -0,0 +1,183 @@
+// +build go1.9
+
+// Copyright 2021 Microsoft Corporation
+//
+// 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.
+
+// This code was auto-generated by:
+// github.com/Azure/azure-sdk-for-go/tools/profileBuilder
+
+package dns
+
+import (
+ "context"
+
+ original "github.com/Azure/azure-sdk-for-go/services/dns/mgmt/2016-04-01/dns"
+)
+
+const (
+ DefaultBaseURI = original.DefaultBaseURI
+)
+
+type HTTPStatusCode = original.HTTPStatusCode
+
+const (
+ Accepted HTTPStatusCode = original.Accepted
+ Ambiguous HTTPStatusCode = original.Ambiguous
+ BadGateway HTTPStatusCode = original.BadGateway
+ BadRequest HTTPStatusCode = original.BadRequest
+ Conflict HTTPStatusCode = original.Conflict
+ Continue HTTPStatusCode = original.Continue
+ Created HTTPStatusCode = original.Created
+ ExpectationFailed HTTPStatusCode = original.ExpectationFailed
+ Forbidden HTTPStatusCode = original.Forbidden
+ Found HTTPStatusCode = original.Found
+ GatewayTimeout HTTPStatusCode = original.GatewayTimeout
+ Gone HTTPStatusCode = original.Gone
+ HTTPVersionNotSupported HTTPStatusCode = original.HTTPVersionNotSupported
+ InternalServerError HTTPStatusCode = original.InternalServerError
+ LengthRequired HTTPStatusCode = original.LengthRequired
+ MethodNotAllowed HTTPStatusCode = original.MethodNotAllowed
+ Moved HTTPStatusCode = original.Moved
+ MovedPermanently HTTPStatusCode = original.MovedPermanently
+ MultipleChoices HTTPStatusCode = original.MultipleChoices
+ NoContent HTTPStatusCode = original.NoContent
+ NonAuthoritativeInformation HTTPStatusCode = original.NonAuthoritativeInformation
+ NotAcceptable HTTPStatusCode = original.NotAcceptable
+ NotFound HTTPStatusCode = original.NotFound
+ NotImplemented HTTPStatusCode = original.NotImplemented
+ NotModified HTTPStatusCode = original.NotModified
+ OK HTTPStatusCode = original.OK
+ PartialContent HTTPStatusCode = original.PartialContent
+ PaymentRequired HTTPStatusCode = original.PaymentRequired
+ PreconditionFailed HTTPStatusCode = original.PreconditionFailed
+ ProxyAuthenticationRequired HTTPStatusCode = original.ProxyAuthenticationRequired
+ Redirect HTTPStatusCode = original.Redirect
+ RedirectKeepVerb HTTPStatusCode = original.RedirectKeepVerb
+ RedirectMethod HTTPStatusCode = original.RedirectMethod
+ RequestedRangeNotSatisfiable HTTPStatusCode = original.RequestedRangeNotSatisfiable
+ RequestEntityTooLarge HTTPStatusCode = original.RequestEntityTooLarge
+ RequestTimeout HTTPStatusCode = original.RequestTimeout
+ RequestURITooLong HTTPStatusCode = original.RequestURITooLong
+ ResetContent HTTPStatusCode = original.ResetContent
+ SeeOther HTTPStatusCode = original.SeeOther
+ ServiceUnavailable HTTPStatusCode = original.ServiceUnavailable
+ SwitchingProtocols HTTPStatusCode = original.SwitchingProtocols
+ TemporaryRedirect HTTPStatusCode = original.TemporaryRedirect
+ Unauthorized HTTPStatusCode = original.Unauthorized
+ UnsupportedMediaType HTTPStatusCode = original.UnsupportedMediaType
+ Unused HTTPStatusCode = original.Unused
+ UpgradeRequired HTTPStatusCode = original.UpgradeRequired
+ UseProxy HTTPStatusCode = original.UseProxy
+)
+
+type OperationStatus = original.OperationStatus
+
+const (
+ Failed OperationStatus = original.Failed
+ InProgress OperationStatus = original.InProgress
+ Succeeded OperationStatus = original.Succeeded
+)
+
+type RecordType = original.RecordType
+
+const (
+ A RecordType = original.A
+ AAAA RecordType = original.AAAA
+ CNAME RecordType = original.CNAME
+ MX RecordType = original.MX
+ NS RecordType = original.NS
+ PTR RecordType = original.PTR
+ SOA RecordType = original.SOA
+ SRV RecordType = original.SRV
+ TXT RecordType = original.TXT
+)
+
+type ARecord = original.ARecord
+type AaaaRecord = original.AaaaRecord
+type AzureEntityResource = original.AzureEntityResource
+type BaseClient = original.BaseClient
+type CloudError = original.CloudError
+type CloudErrorBody = original.CloudErrorBody
+type CnameRecord = original.CnameRecord
+type MxRecord = original.MxRecord
+type NsRecord = original.NsRecord
+type ProxyResource = original.ProxyResource
+type PtrRecord = original.PtrRecord
+type RecordSet = original.RecordSet
+type RecordSetListResult = original.RecordSetListResult
+type RecordSetListResultIterator = original.RecordSetListResultIterator
+type RecordSetListResultPage = original.RecordSetListResultPage
+type RecordSetProperties = original.RecordSetProperties
+type RecordSetUpdateParameters = original.RecordSetUpdateParameters
+type RecordSetsClient = original.RecordSetsClient
+type Resource = original.Resource
+type SoaRecord = original.SoaRecord
+type SrvRecord = original.SrvRecord
+type SubResource = original.SubResource
+type TrackedResource = original.TrackedResource
+type TxtRecord = original.TxtRecord
+type Zone = original.Zone
+type ZoneDeleteResult = original.ZoneDeleteResult
+type ZoneListResult = original.ZoneListResult
+type ZoneListResultIterator = original.ZoneListResultIterator
+type ZoneListResultPage = original.ZoneListResultPage
+type ZoneProperties = original.ZoneProperties
+type ZonesClient = original.ZonesClient
+type ZonesDeleteFuture = original.ZonesDeleteFuture
+
+func New(subscriptionID string) BaseClient {
+ return original.New(subscriptionID)
+}
+func NewRecordSetListResultIterator(page RecordSetListResultPage) RecordSetListResultIterator {
+ return original.NewRecordSetListResultIterator(page)
+}
+func NewRecordSetListResultPage(cur RecordSetListResult, getNextPage func(context.Context, RecordSetListResult) (RecordSetListResult, error)) RecordSetListResultPage {
+ return original.NewRecordSetListResultPage(cur, getNextPage)
+}
+func NewRecordSetsClient(subscriptionID string) RecordSetsClient {
+ return original.NewRecordSetsClient(subscriptionID)
+}
+func NewRecordSetsClientWithBaseURI(baseURI string, subscriptionID string) RecordSetsClient {
+ return original.NewRecordSetsClientWithBaseURI(baseURI, subscriptionID)
+}
+func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient {
+ return original.NewWithBaseURI(baseURI, subscriptionID)
+}
+func NewZoneListResultIterator(page ZoneListResultPage) ZoneListResultIterator {
+ return original.NewZoneListResultIterator(page)
+}
+func NewZoneListResultPage(cur ZoneListResult, getNextPage func(context.Context, ZoneListResult) (ZoneListResult, error)) ZoneListResultPage {
+ return original.NewZoneListResultPage(cur, getNextPage)
+}
+func NewZonesClient(subscriptionID string) ZonesClient {
+ return original.NewZonesClient(subscriptionID)
+}
+func NewZonesClientWithBaseURI(baseURI string, subscriptionID string) ZonesClient {
+ return original.NewZonesClientWithBaseURI(baseURI, subscriptionID)
+}
+func PossibleHTTPStatusCodeValues() []HTTPStatusCode {
+ return original.PossibleHTTPStatusCodeValues()
+}
+func PossibleOperationStatusValues() []OperationStatus {
+ return original.PossibleOperationStatusValues()
+}
+func PossibleRecordTypeValues() []RecordType {
+ return original.PossibleRecordTypeValues()
+}
+func UserAgent() string {
+ return original.UserAgent() + " profiles/2018-03-01"
+}
+func Version() string {
+ return original.Version()
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/profiles/2018-03-01/network/mgmt/network/models.go b/vendor/github.com/Azure/azure-sdk-for-go/profiles/2018-03-01/network/mgmt/network/models.go
new file mode 100644
index 00000000000..550a7b88248
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/profiles/2018-03-01/network/mgmt/network/models.go
@@ -0,0 +1,1746 @@
+// +build go1.9
+
+// Copyright 2021 Microsoft Corporation
+//
+// 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.
+
+// This code was auto-generated by:
+// github.com/Azure/azure-sdk-for-go/tools/profileBuilder
+
+package network
+
+import (
+ "context"
+
+ original "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network"
+)
+
+const (
+ DefaultBaseURI = original.DefaultBaseURI
+)
+
+type Access = original.Access
+
+const (
+ Allow Access = original.Allow
+ Deny Access = original.Deny
+)
+
+type ApplicationGatewayBackendHealthServerHealth = original.ApplicationGatewayBackendHealthServerHealth
+
+const (
+ Down ApplicationGatewayBackendHealthServerHealth = original.Down
+ Draining ApplicationGatewayBackendHealthServerHealth = original.Draining
+ Partial ApplicationGatewayBackendHealthServerHealth = original.Partial
+ Unknown ApplicationGatewayBackendHealthServerHealth = original.Unknown
+ Up ApplicationGatewayBackendHealthServerHealth = original.Up
+)
+
+type ApplicationGatewayCookieBasedAffinity = original.ApplicationGatewayCookieBasedAffinity
+
+const (
+ Disabled ApplicationGatewayCookieBasedAffinity = original.Disabled
+ Enabled ApplicationGatewayCookieBasedAffinity = original.Enabled
+)
+
+type ApplicationGatewayFirewallMode = original.ApplicationGatewayFirewallMode
+
+const (
+ Detection ApplicationGatewayFirewallMode = original.Detection
+ Prevention ApplicationGatewayFirewallMode = original.Prevention
+)
+
+type ApplicationGatewayOperationalState = original.ApplicationGatewayOperationalState
+
+const (
+ Running ApplicationGatewayOperationalState = original.Running
+ Starting ApplicationGatewayOperationalState = original.Starting
+ Stopped ApplicationGatewayOperationalState = original.Stopped
+ Stopping ApplicationGatewayOperationalState = original.Stopping
+)
+
+type ApplicationGatewayProtocol = original.ApplicationGatewayProtocol
+
+const (
+ HTTP ApplicationGatewayProtocol = original.HTTP
+ HTTPS ApplicationGatewayProtocol = original.HTTPS
+)
+
+type ApplicationGatewayRedirectType = original.ApplicationGatewayRedirectType
+
+const (
+ Found ApplicationGatewayRedirectType = original.Found
+ Permanent ApplicationGatewayRedirectType = original.Permanent
+ SeeOther ApplicationGatewayRedirectType = original.SeeOther
+ Temporary ApplicationGatewayRedirectType = original.Temporary
+)
+
+type ApplicationGatewayRequestRoutingRuleType = original.ApplicationGatewayRequestRoutingRuleType
+
+const (
+ Basic ApplicationGatewayRequestRoutingRuleType = original.Basic
+ PathBasedRouting ApplicationGatewayRequestRoutingRuleType = original.PathBasedRouting
+)
+
+type ApplicationGatewaySkuName = original.ApplicationGatewaySkuName
+
+const (
+ StandardLarge ApplicationGatewaySkuName = original.StandardLarge
+ StandardMedium ApplicationGatewaySkuName = original.StandardMedium
+ StandardSmall ApplicationGatewaySkuName = original.StandardSmall
+ WAFLarge ApplicationGatewaySkuName = original.WAFLarge
+ WAFMedium ApplicationGatewaySkuName = original.WAFMedium
+)
+
+type ApplicationGatewaySslCipherSuite = original.ApplicationGatewaySslCipherSuite
+
+const (
+ TLSDHEDSSWITH3DESEDECBCSHA ApplicationGatewaySslCipherSuite = original.TLSDHEDSSWITH3DESEDECBCSHA
+ TLSDHEDSSWITHAES128CBCSHA ApplicationGatewaySslCipherSuite = original.TLSDHEDSSWITHAES128CBCSHA
+ TLSDHEDSSWITHAES128CBCSHA256 ApplicationGatewaySslCipherSuite = original.TLSDHEDSSWITHAES128CBCSHA256
+ TLSDHEDSSWITHAES256CBCSHA ApplicationGatewaySslCipherSuite = original.TLSDHEDSSWITHAES256CBCSHA
+ TLSDHEDSSWITHAES256CBCSHA256 ApplicationGatewaySslCipherSuite = original.TLSDHEDSSWITHAES256CBCSHA256
+ TLSDHERSAWITHAES128CBCSHA ApplicationGatewaySslCipherSuite = original.TLSDHERSAWITHAES128CBCSHA
+ TLSDHERSAWITHAES128GCMSHA256 ApplicationGatewaySslCipherSuite = original.TLSDHERSAWITHAES128GCMSHA256
+ TLSDHERSAWITHAES256CBCSHA ApplicationGatewaySslCipherSuite = original.TLSDHERSAWITHAES256CBCSHA
+ TLSDHERSAWITHAES256GCMSHA384 ApplicationGatewaySslCipherSuite = original.TLSDHERSAWITHAES256GCMSHA384
+ TLSECDHEECDSAWITHAES128CBCSHA ApplicationGatewaySslCipherSuite = original.TLSECDHEECDSAWITHAES128CBCSHA
+ TLSECDHEECDSAWITHAES128CBCSHA256 ApplicationGatewaySslCipherSuite = original.TLSECDHEECDSAWITHAES128CBCSHA256
+ TLSECDHEECDSAWITHAES128GCMSHA256 ApplicationGatewaySslCipherSuite = original.TLSECDHEECDSAWITHAES128GCMSHA256
+ TLSECDHEECDSAWITHAES256CBCSHA ApplicationGatewaySslCipherSuite = original.TLSECDHEECDSAWITHAES256CBCSHA
+ TLSECDHEECDSAWITHAES256CBCSHA384 ApplicationGatewaySslCipherSuite = original.TLSECDHEECDSAWITHAES256CBCSHA384
+ TLSECDHEECDSAWITHAES256GCMSHA384 ApplicationGatewaySslCipherSuite = original.TLSECDHEECDSAWITHAES256GCMSHA384
+ TLSECDHERSAWITHAES128CBCSHA ApplicationGatewaySslCipherSuite = original.TLSECDHERSAWITHAES128CBCSHA
+ TLSECDHERSAWITHAES128CBCSHA256 ApplicationGatewaySslCipherSuite = original.TLSECDHERSAWITHAES128CBCSHA256
+ TLSECDHERSAWITHAES128GCMSHA256 ApplicationGatewaySslCipherSuite = original.TLSECDHERSAWITHAES128GCMSHA256
+ TLSECDHERSAWITHAES256CBCSHA ApplicationGatewaySslCipherSuite = original.TLSECDHERSAWITHAES256CBCSHA
+ TLSECDHERSAWITHAES256CBCSHA384 ApplicationGatewaySslCipherSuite = original.TLSECDHERSAWITHAES256CBCSHA384
+ TLSECDHERSAWITHAES256GCMSHA384 ApplicationGatewaySslCipherSuite = original.TLSECDHERSAWITHAES256GCMSHA384
+ TLSRSAWITH3DESEDECBCSHA ApplicationGatewaySslCipherSuite = original.TLSRSAWITH3DESEDECBCSHA
+ TLSRSAWITHAES128CBCSHA ApplicationGatewaySslCipherSuite = original.TLSRSAWITHAES128CBCSHA
+ TLSRSAWITHAES128CBCSHA256 ApplicationGatewaySslCipherSuite = original.TLSRSAWITHAES128CBCSHA256
+ TLSRSAWITHAES128GCMSHA256 ApplicationGatewaySslCipherSuite = original.TLSRSAWITHAES128GCMSHA256
+ TLSRSAWITHAES256CBCSHA ApplicationGatewaySslCipherSuite = original.TLSRSAWITHAES256CBCSHA
+ TLSRSAWITHAES256CBCSHA256 ApplicationGatewaySslCipherSuite = original.TLSRSAWITHAES256CBCSHA256
+ TLSRSAWITHAES256GCMSHA384 ApplicationGatewaySslCipherSuite = original.TLSRSAWITHAES256GCMSHA384
+)
+
+type ApplicationGatewaySslPolicyName = original.ApplicationGatewaySslPolicyName
+
+const (
+ AppGwSslPolicy20150501 ApplicationGatewaySslPolicyName = original.AppGwSslPolicy20150501
+ AppGwSslPolicy20170401 ApplicationGatewaySslPolicyName = original.AppGwSslPolicy20170401
+ AppGwSslPolicy20170401S ApplicationGatewaySslPolicyName = original.AppGwSslPolicy20170401S
+)
+
+type ApplicationGatewaySslPolicyType = original.ApplicationGatewaySslPolicyType
+
+const (
+ Custom ApplicationGatewaySslPolicyType = original.Custom
+ Predefined ApplicationGatewaySslPolicyType = original.Predefined
+)
+
+type ApplicationGatewaySslProtocol = original.ApplicationGatewaySslProtocol
+
+const (
+ TLSv10 ApplicationGatewaySslProtocol = original.TLSv10
+ TLSv11 ApplicationGatewaySslProtocol = original.TLSv11
+ TLSv12 ApplicationGatewaySslProtocol = original.TLSv12
+)
+
+type ApplicationGatewayTier = original.ApplicationGatewayTier
+
+const (
+ Standard ApplicationGatewayTier = original.Standard
+ WAF ApplicationGatewayTier = original.WAF
+)
+
+type AssociationType = original.AssociationType
+
+const (
+ Associated AssociationType = original.Associated
+ Contains AssociationType = original.Contains
+)
+
+type AuthenticationMethod = original.AuthenticationMethod
+
+const (
+ EAPMSCHAPv2 AuthenticationMethod = original.EAPMSCHAPv2
+ EAPTLS AuthenticationMethod = original.EAPTLS
+)
+
+type AuthorizationUseStatus = original.AuthorizationUseStatus
+
+const (
+ Available AuthorizationUseStatus = original.Available
+ InUse AuthorizationUseStatus = original.InUse
+)
+
+type BgpPeerState = original.BgpPeerState
+
+const (
+ BgpPeerStateConnected BgpPeerState = original.BgpPeerStateConnected
+ BgpPeerStateConnecting BgpPeerState = original.BgpPeerStateConnecting
+ BgpPeerStateIdle BgpPeerState = original.BgpPeerStateIdle
+ BgpPeerStateStopped BgpPeerState = original.BgpPeerStateStopped
+ BgpPeerStateUnknown BgpPeerState = original.BgpPeerStateUnknown
+)
+
+type ConnectionState = original.ConnectionState
+
+const (
+ ConnectionStateReachable ConnectionState = original.ConnectionStateReachable
+ ConnectionStateUnknown ConnectionState = original.ConnectionStateUnknown
+ ConnectionStateUnreachable ConnectionState = original.ConnectionStateUnreachable
+)
+
+type ConnectionStatus = original.ConnectionStatus
+
+const (
+ ConnectionStatusConnected ConnectionStatus = original.ConnectionStatusConnected
+ ConnectionStatusDegraded ConnectionStatus = original.ConnectionStatusDegraded
+ ConnectionStatusDisconnected ConnectionStatus = original.ConnectionStatusDisconnected
+ ConnectionStatusUnknown ConnectionStatus = original.ConnectionStatusUnknown
+)
+
+type DhGroup = original.DhGroup
+
+const (
+ DHGroup1 DhGroup = original.DHGroup1
+ DHGroup14 DhGroup = original.DHGroup14
+ DHGroup2 DhGroup = original.DHGroup2
+ DHGroup2048 DhGroup = original.DHGroup2048
+ DHGroup24 DhGroup = original.DHGroup24
+ ECP256 DhGroup = original.ECP256
+ ECP384 DhGroup = original.ECP384
+ None DhGroup = original.None
+)
+
+type Direction = original.Direction
+
+const (
+ Inbound Direction = original.Inbound
+ Outbound Direction = original.Outbound
+)
+
+type EffectiveRouteSource = original.EffectiveRouteSource
+
+const (
+ EffectiveRouteSourceDefault EffectiveRouteSource = original.EffectiveRouteSourceDefault
+ EffectiveRouteSourceUnknown EffectiveRouteSource = original.EffectiveRouteSourceUnknown
+ EffectiveRouteSourceUser EffectiveRouteSource = original.EffectiveRouteSourceUser
+ EffectiveRouteSourceVirtualNetworkGateway EffectiveRouteSource = original.EffectiveRouteSourceVirtualNetworkGateway
+)
+
+type EffectiveRouteState = original.EffectiveRouteState
+
+const (
+ Active EffectiveRouteState = original.Active
+ Invalid EffectiveRouteState = original.Invalid
+)
+
+type EffectiveSecurityRuleProtocol = original.EffectiveSecurityRuleProtocol
+
+const (
+ All EffectiveSecurityRuleProtocol = original.All
+ TCP EffectiveSecurityRuleProtocol = original.TCP
+ UDP EffectiveSecurityRuleProtocol = original.UDP
+)
+
+type EvaluationState = original.EvaluationState
+
+const (
+ Completed EvaluationState = original.Completed
+ InProgress EvaluationState = original.InProgress
+ NotStarted EvaluationState = original.NotStarted
+)
+
+type ExpressRouteCircuitPeeringAdvertisedPublicPrefixState = original.ExpressRouteCircuitPeeringAdvertisedPublicPrefixState
+
+const (
+ Configured ExpressRouteCircuitPeeringAdvertisedPublicPrefixState = original.Configured
+ Configuring ExpressRouteCircuitPeeringAdvertisedPublicPrefixState = original.Configuring
+ NotConfigured ExpressRouteCircuitPeeringAdvertisedPublicPrefixState = original.NotConfigured
+ ValidationNeeded ExpressRouteCircuitPeeringAdvertisedPublicPrefixState = original.ValidationNeeded
+)
+
+type ExpressRouteCircuitPeeringState = original.ExpressRouteCircuitPeeringState
+
+const (
+ ExpressRouteCircuitPeeringStateDisabled ExpressRouteCircuitPeeringState = original.ExpressRouteCircuitPeeringStateDisabled
+ ExpressRouteCircuitPeeringStateEnabled ExpressRouteCircuitPeeringState = original.ExpressRouteCircuitPeeringStateEnabled
+)
+
+type ExpressRouteCircuitPeeringType = original.ExpressRouteCircuitPeeringType
+
+const (
+ AzurePrivatePeering ExpressRouteCircuitPeeringType = original.AzurePrivatePeering
+ AzurePublicPeering ExpressRouteCircuitPeeringType = original.AzurePublicPeering
+ MicrosoftPeering ExpressRouteCircuitPeeringType = original.MicrosoftPeering
+)
+
+type ExpressRouteCircuitSkuFamily = original.ExpressRouteCircuitSkuFamily
+
+const (
+ MeteredData ExpressRouteCircuitSkuFamily = original.MeteredData
+ UnlimitedData ExpressRouteCircuitSkuFamily = original.UnlimitedData
+)
+
+type ExpressRouteCircuitSkuTier = original.ExpressRouteCircuitSkuTier
+
+const (
+ ExpressRouteCircuitSkuTierPremium ExpressRouteCircuitSkuTier = original.ExpressRouteCircuitSkuTierPremium
+ ExpressRouteCircuitSkuTierStandard ExpressRouteCircuitSkuTier = original.ExpressRouteCircuitSkuTierStandard
+)
+
+type IPAllocationMethod = original.IPAllocationMethod
+
+const (
+ Dynamic IPAllocationMethod = original.Dynamic
+ Static IPAllocationMethod = original.Static
+)
+
+type IPVersion = original.IPVersion
+
+const (
+ IPv4 IPVersion = original.IPv4
+ IPv6 IPVersion = original.IPv6
+)
+
+type IkeEncryption = original.IkeEncryption
+
+const (
+ AES128 IkeEncryption = original.AES128
+ AES192 IkeEncryption = original.AES192
+ AES256 IkeEncryption = original.AES256
+ DES IkeEncryption = original.DES
+ DES3 IkeEncryption = original.DES3
+)
+
+type IkeIntegrity = original.IkeIntegrity
+
+const (
+ MD5 IkeIntegrity = original.MD5
+ SHA1 IkeIntegrity = original.SHA1
+ SHA256 IkeIntegrity = original.SHA256
+ SHA384 IkeIntegrity = original.SHA384
+)
+
+type IpsecEncryption = original.IpsecEncryption
+
+const (
+ IpsecEncryptionAES128 IpsecEncryption = original.IpsecEncryptionAES128
+ IpsecEncryptionAES192 IpsecEncryption = original.IpsecEncryptionAES192
+ IpsecEncryptionAES256 IpsecEncryption = original.IpsecEncryptionAES256
+ IpsecEncryptionDES IpsecEncryption = original.IpsecEncryptionDES
+ IpsecEncryptionDES3 IpsecEncryption = original.IpsecEncryptionDES3
+ IpsecEncryptionGCMAES128 IpsecEncryption = original.IpsecEncryptionGCMAES128
+ IpsecEncryptionGCMAES192 IpsecEncryption = original.IpsecEncryptionGCMAES192
+ IpsecEncryptionGCMAES256 IpsecEncryption = original.IpsecEncryptionGCMAES256
+ IpsecEncryptionNone IpsecEncryption = original.IpsecEncryptionNone
+)
+
+type IpsecIntegrity = original.IpsecIntegrity
+
+const (
+ IpsecIntegrityGCMAES128 IpsecIntegrity = original.IpsecIntegrityGCMAES128
+ IpsecIntegrityGCMAES192 IpsecIntegrity = original.IpsecIntegrityGCMAES192
+ IpsecIntegrityGCMAES256 IpsecIntegrity = original.IpsecIntegrityGCMAES256
+ IpsecIntegrityMD5 IpsecIntegrity = original.IpsecIntegrityMD5
+ IpsecIntegritySHA1 IpsecIntegrity = original.IpsecIntegritySHA1
+ IpsecIntegritySHA256 IpsecIntegrity = original.IpsecIntegritySHA256
+)
+
+type IssueType = original.IssueType
+
+const (
+ IssueTypeAgentStopped IssueType = original.IssueTypeAgentStopped
+ IssueTypeDNSResolution IssueType = original.IssueTypeDNSResolution
+ IssueTypeGuestFirewall IssueType = original.IssueTypeGuestFirewall
+ IssueTypeNetworkSecurityRule IssueType = original.IssueTypeNetworkSecurityRule
+ IssueTypePlatform IssueType = original.IssueTypePlatform
+ IssueTypePortThrottled IssueType = original.IssueTypePortThrottled
+ IssueTypeSocketBind IssueType = original.IssueTypeSocketBind
+ IssueTypeUnknown IssueType = original.IssueTypeUnknown
+ IssueTypeUserDefinedRoute IssueType = original.IssueTypeUserDefinedRoute
+)
+
+type LoadBalancerSkuName = original.LoadBalancerSkuName
+
+const (
+ LoadBalancerSkuNameBasic LoadBalancerSkuName = original.LoadBalancerSkuNameBasic
+ LoadBalancerSkuNameStandard LoadBalancerSkuName = original.LoadBalancerSkuNameStandard
+)
+
+type LoadDistribution = original.LoadDistribution
+
+const (
+ Default LoadDistribution = original.Default
+ SourceIP LoadDistribution = original.SourceIP
+ SourceIPProtocol LoadDistribution = original.SourceIPProtocol
+)
+
+type NextHopType = original.NextHopType
+
+const (
+ NextHopTypeHyperNetGateway NextHopType = original.NextHopTypeHyperNetGateway
+ NextHopTypeInternet NextHopType = original.NextHopTypeInternet
+ NextHopTypeNone NextHopType = original.NextHopTypeNone
+ NextHopTypeVirtualAppliance NextHopType = original.NextHopTypeVirtualAppliance
+ NextHopTypeVirtualNetworkGateway NextHopType = original.NextHopTypeVirtualNetworkGateway
+ NextHopTypeVnetLocal NextHopType = original.NextHopTypeVnetLocal
+)
+
+type OperationStatus = original.OperationStatus
+
+const (
+ OperationStatusFailed OperationStatus = original.OperationStatusFailed
+ OperationStatusInProgress OperationStatus = original.OperationStatusInProgress
+ OperationStatusSucceeded OperationStatus = original.OperationStatusSucceeded
+)
+
+type Origin = original.Origin
+
+const (
+ OriginInbound Origin = original.OriginInbound
+ OriginLocal Origin = original.OriginLocal
+ OriginOutbound Origin = original.OriginOutbound
+)
+
+type PcError = original.PcError
+
+const (
+ AgentStopped PcError = original.AgentStopped
+ CaptureFailed PcError = original.CaptureFailed
+ InternalError PcError = original.InternalError
+ LocalFileFailed PcError = original.LocalFileFailed
+ StorageFailed PcError = original.StorageFailed
+)
+
+type PcProtocol = original.PcProtocol
+
+const (
+ PcProtocolAny PcProtocol = original.PcProtocolAny
+ PcProtocolTCP PcProtocol = original.PcProtocolTCP
+ PcProtocolUDP PcProtocol = original.PcProtocolUDP
+)
+
+type PcStatus = original.PcStatus
+
+const (
+ PcStatusError PcStatus = original.PcStatusError
+ PcStatusNotStarted PcStatus = original.PcStatusNotStarted
+ PcStatusRunning PcStatus = original.PcStatusRunning
+ PcStatusStopped PcStatus = original.PcStatusStopped
+ PcStatusUnknown PcStatus = original.PcStatusUnknown
+)
+
+type PfsGroup = original.PfsGroup
+
+const (
+ PfsGroupECP256 PfsGroup = original.PfsGroupECP256
+ PfsGroupECP384 PfsGroup = original.PfsGroupECP384
+ PfsGroupNone PfsGroup = original.PfsGroupNone
+ PfsGroupPFS1 PfsGroup = original.PfsGroupPFS1
+ PfsGroupPFS2 PfsGroup = original.PfsGroupPFS2
+ PfsGroupPFS2048 PfsGroup = original.PfsGroupPFS2048
+ PfsGroupPFS24 PfsGroup = original.PfsGroupPFS24
+)
+
+type ProbeProtocol = original.ProbeProtocol
+
+const (
+ ProbeProtocolHTTP ProbeProtocol = original.ProbeProtocolHTTP
+ ProbeProtocolTCP ProbeProtocol = original.ProbeProtocolTCP
+)
+
+type ProcessorArchitecture = original.ProcessorArchitecture
+
+const (
+ Amd64 ProcessorArchitecture = original.Amd64
+ X86 ProcessorArchitecture = original.X86
+)
+
+type Protocol = original.Protocol
+
+const (
+ ProtocolTCP Protocol = original.ProtocolTCP
+ ProtocolUDP Protocol = original.ProtocolUDP
+)
+
+type ProvisioningState = original.ProvisioningState
+
+const (
+ Deleting ProvisioningState = original.Deleting
+ Failed ProvisioningState = original.Failed
+ Succeeded ProvisioningState = original.Succeeded
+ Updating ProvisioningState = original.Updating
+)
+
+type PublicIPAddressSkuName = original.PublicIPAddressSkuName
+
+const (
+ PublicIPAddressSkuNameBasic PublicIPAddressSkuName = original.PublicIPAddressSkuNameBasic
+ PublicIPAddressSkuNameStandard PublicIPAddressSkuName = original.PublicIPAddressSkuNameStandard
+)
+
+type RouteNextHopType = original.RouteNextHopType
+
+const (
+ RouteNextHopTypeInternet RouteNextHopType = original.RouteNextHopTypeInternet
+ RouteNextHopTypeNone RouteNextHopType = original.RouteNextHopTypeNone
+ RouteNextHopTypeVirtualAppliance RouteNextHopType = original.RouteNextHopTypeVirtualAppliance
+ RouteNextHopTypeVirtualNetworkGateway RouteNextHopType = original.RouteNextHopTypeVirtualNetworkGateway
+ RouteNextHopTypeVnetLocal RouteNextHopType = original.RouteNextHopTypeVnetLocal
+)
+
+type SecurityRuleAccess = original.SecurityRuleAccess
+
+const (
+ SecurityRuleAccessAllow SecurityRuleAccess = original.SecurityRuleAccessAllow
+ SecurityRuleAccessDeny SecurityRuleAccess = original.SecurityRuleAccessDeny
+)
+
+type SecurityRuleDirection = original.SecurityRuleDirection
+
+const (
+ SecurityRuleDirectionInbound SecurityRuleDirection = original.SecurityRuleDirectionInbound
+ SecurityRuleDirectionOutbound SecurityRuleDirection = original.SecurityRuleDirectionOutbound
+)
+
+type SecurityRuleProtocol = original.SecurityRuleProtocol
+
+const (
+ SecurityRuleProtocolAsterisk SecurityRuleProtocol = original.SecurityRuleProtocolAsterisk
+ SecurityRuleProtocolTCP SecurityRuleProtocol = original.SecurityRuleProtocolTCP
+ SecurityRuleProtocolUDP SecurityRuleProtocol = original.SecurityRuleProtocolUDP
+)
+
+type ServiceProviderProvisioningState = original.ServiceProviderProvisioningState
+
+const (
+ Deprovisioning ServiceProviderProvisioningState = original.Deprovisioning
+ NotProvisioned ServiceProviderProvisioningState = original.NotProvisioned
+ Provisioned ServiceProviderProvisioningState = original.Provisioned
+ Provisioning ServiceProviderProvisioningState = original.Provisioning
+)
+
+type Severity = original.Severity
+
+const (
+ SeverityError Severity = original.SeverityError
+ SeverityWarning Severity = original.SeverityWarning
+)
+
+type TransportProtocol = original.TransportProtocol
+
+const (
+ TransportProtocolAll TransportProtocol = original.TransportProtocolAll
+ TransportProtocolTCP TransportProtocol = original.TransportProtocolTCP
+ TransportProtocolUDP TransportProtocol = original.TransportProtocolUDP
+)
+
+type VirtualNetworkGatewayConnectionStatus = original.VirtualNetworkGatewayConnectionStatus
+
+const (
+ VirtualNetworkGatewayConnectionStatusConnected VirtualNetworkGatewayConnectionStatus = original.VirtualNetworkGatewayConnectionStatusConnected
+ VirtualNetworkGatewayConnectionStatusConnecting VirtualNetworkGatewayConnectionStatus = original.VirtualNetworkGatewayConnectionStatusConnecting
+ VirtualNetworkGatewayConnectionStatusNotConnected VirtualNetworkGatewayConnectionStatus = original.VirtualNetworkGatewayConnectionStatusNotConnected
+ VirtualNetworkGatewayConnectionStatusUnknown VirtualNetworkGatewayConnectionStatus = original.VirtualNetworkGatewayConnectionStatusUnknown
+)
+
+type VirtualNetworkGatewayConnectionType = original.VirtualNetworkGatewayConnectionType
+
+const (
+ ExpressRoute VirtualNetworkGatewayConnectionType = original.ExpressRoute
+ IPsec VirtualNetworkGatewayConnectionType = original.IPsec
+ Vnet2Vnet VirtualNetworkGatewayConnectionType = original.Vnet2Vnet
+ VPNClient VirtualNetworkGatewayConnectionType = original.VPNClient
+)
+
+type VirtualNetworkGatewaySkuName = original.VirtualNetworkGatewaySkuName
+
+const (
+ VirtualNetworkGatewaySkuNameBasic VirtualNetworkGatewaySkuName = original.VirtualNetworkGatewaySkuNameBasic
+ VirtualNetworkGatewaySkuNameHighPerformance VirtualNetworkGatewaySkuName = original.VirtualNetworkGatewaySkuNameHighPerformance
+ VirtualNetworkGatewaySkuNameStandard VirtualNetworkGatewaySkuName = original.VirtualNetworkGatewaySkuNameStandard
+ VirtualNetworkGatewaySkuNameUltraPerformance VirtualNetworkGatewaySkuName = original.VirtualNetworkGatewaySkuNameUltraPerformance
+ VirtualNetworkGatewaySkuNameVpnGw1 VirtualNetworkGatewaySkuName = original.VirtualNetworkGatewaySkuNameVpnGw1
+ VirtualNetworkGatewaySkuNameVpnGw2 VirtualNetworkGatewaySkuName = original.VirtualNetworkGatewaySkuNameVpnGw2
+ VirtualNetworkGatewaySkuNameVpnGw3 VirtualNetworkGatewaySkuName = original.VirtualNetworkGatewaySkuNameVpnGw3
+)
+
+type VirtualNetworkGatewaySkuTier = original.VirtualNetworkGatewaySkuTier
+
+const (
+ VirtualNetworkGatewaySkuTierBasic VirtualNetworkGatewaySkuTier = original.VirtualNetworkGatewaySkuTierBasic
+ VirtualNetworkGatewaySkuTierHighPerformance VirtualNetworkGatewaySkuTier = original.VirtualNetworkGatewaySkuTierHighPerformance
+ VirtualNetworkGatewaySkuTierStandard VirtualNetworkGatewaySkuTier = original.VirtualNetworkGatewaySkuTierStandard
+ VirtualNetworkGatewaySkuTierUltraPerformance VirtualNetworkGatewaySkuTier = original.VirtualNetworkGatewaySkuTierUltraPerformance
+ VirtualNetworkGatewaySkuTierVpnGw1 VirtualNetworkGatewaySkuTier = original.VirtualNetworkGatewaySkuTierVpnGw1
+ VirtualNetworkGatewaySkuTierVpnGw2 VirtualNetworkGatewaySkuTier = original.VirtualNetworkGatewaySkuTierVpnGw2
+ VirtualNetworkGatewaySkuTierVpnGw3 VirtualNetworkGatewaySkuTier = original.VirtualNetworkGatewaySkuTierVpnGw3
+)
+
+type VirtualNetworkGatewayType = original.VirtualNetworkGatewayType
+
+const (
+ VirtualNetworkGatewayTypeExpressRoute VirtualNetworkGatewayType = original.VirtualNetworkGatewayTypeExpressRoute
+ VirtualNetworkGatewayTypeVpn VirtualNetworkGatewayType = original.VirtualNetworkGatewayTypeVpn
+)
+
+type VirtualNetworkPeeringState = original.VirtualNetworkPeeringState
+
+const (
+ Connected VirtualNetworkPeeringState = original.Connected
+ Disconnected VirtualNetworkPeeringState = original.Disconnected
+ Initiated VirtualNetworkPeeringState = original.Initiated
+)
+
+type VpnClientProtocol = original.VpnClientProtocol
+
+const (
+ IkeV2 VpnClientProtocol = original.IkeV2
+ SSTP VpnClientProtocol = original.SSTP
+)
+
+type VpnType = original.VpnType
+
+const (
+ PolicyBased VpnType = original.PolicyBased
+ RouteBased VpnType = original.RouteBased
+)
+
+type AddressSpace = original.AddressSpace
+type ApplicationGateway = original.ApplicationGateway
+type ApplicationGatewayAuthenticationCertificate = original.ApplicationGatewayAuthenticationCertificate
+type ApplicationGatewayAuthenticationCertificatePropertiesFormat = original.ApplicationGatewayAuthenticationCertificatePropertiesFormat
+type ApplicationGatewayAvailableSslOptions = original.ApplicationGatewayAvailableSslOptions
+type ApplicationGatewayAvailableSslOptionsPropertiesFormat = original.ApplicationGatewayAvailableSslOptionsPropertiesFormat
+type ApplicationGatewayAvailableSslPredefinedPolicies = original.ApplicationGatewayAvailableSslPredefinedPolicies
+type ApplicationGatewayAvailableSslPredefinedPoliciesIterator = original.ApplicationGatewayAvailableSslPredefinedPoliciesIterator
+type ApplicationGatewayAvailableSslPredefinedPoliciesPage = original.ApplicationGatewayAvailableSslPredefinedPoliciesPage
+type ApplicationGatewayAvailableWafRuleSetsResult = original.ApplicationGatewayAvailableWafRuleSetsResult
+type ApplicationGatewayBackendAddress = original.ApplicationGatewayBackendAddress
+type ApplicationGatewayBackendAddressPool = original.ApplicationGatewayBackendAddressPool
+type ApplicationGatewayBackendAddressPoolPropertiesFormat = original.ApplicationGatewayBackendAddressPoolPropertiesFormat
+type ApplicationGatewayBackendHTTPSettings = original.ApplicationGatewayBackendHTTPSettings
+type ApplicationGatewayBackendHTTPSettingsPropertiesFormat = original.ApplicationGatewayBackendHTTPSettingsPropertiesFormat
+type ApplicationGatewayBackendHealth = original.ApplicationGatewayBackendHealth
+type ApplicationGatewayBackendHealthHTTPSettings = original.ApplicationGatewayBackendHealthHTTPSettings
+type ApplicationGatewayBackendHealthPool = original.ApplicationGatewayBackendHealthPool
+type ApplicationGatewayBackendHealthServer = original.ApplicationGatewayBackendHealthServer
+type ApplicationGatewayConnectionDraining = original.ApplicationGatewayConnectionDraining
+type ApplicationGatewayFirewallDisabledRuleGroup = original.ApplicationGatewayFirewallDisabledRuleGroup
+type ApplicationGatewayFirewallRule = original.ApplicationGatewayFirewallRule
+type ApplicationGatewayFirewallRuleGroup = original.ApplicationGatewayFirewallRuleGroup
+type ApplicationGatewayFirewallRuleSet = original.ApplicationGatewayFirewallRuleSet
+type ApplicationGatewayFirewallRuleSetPropertiesFormat = original.ApplicationGatewayFirewallRuleSetPropertiesFormat
+type ApplicationGatewayFrontendIPConfiguration = original.ApplicationGatewayFrontendIPConfiguration
+type ApplicationGatewayFrontendIPConfigurationPropertiesFormat = original.ApplicationGatewayFrontendIPConfigurationPropertiesFormat
+type ApplicationGatewayFrontendPort = original.ApplicationGatewayFrontendPort
+type ApplicationGatewayFrontendPortPropertiesFormat = original.ApplicationGatewayFrontendPortPropertiesFormat
+type ApplicationGatewayHTTPListener = original.ApplicationGatewayHTTPListener
+type ApplicationGatewayHTTPListenerPropertiesFormat = original.ApplicationGatewayHTTPListenerPropertiesFormat
+type ApplicationGatewayIPConfiguration = original.ApplicationGatewayIPConfiguration
+type ApplicationGatewayIPConfigurationPropertiesFormat = original.ApplicationGatewayIPConfigurationPropertiesFormat
+type ApplicationGatewayListResult = original.ApplicationGatewayListResult
+type ApplicationGatewayListResultIterator = original.ApplicationGatewayListResultIterator
+type ApplicationGatewayListResultPage = original.ApplicationGatewayListResultPage
+type ApplicationGatewayPathRule = original.ApplicationGatewayPathRule
+type ApplicationGatewayPathRulePropertiesFormat = original.ApplicationGatewayPathRulePropertiesFormat
+type ApplicationGatewayProbe = original.ApplicationGatewayProbe
+type ApplicationGatewayProbeHealthResponseMatch = original.ApplicationGatewayProbeHealthResponseMatch
+type ApplicationGatewayProbePropertiesFormat = original.ApplicationGatewayProbePropertiesFormat
+type ApplicationGatewayPropertiesFormat = original.ApplicationGatewayPropertiesFormat
+type ApplicationGatewayRedirectConfiguration = original.ApplicationGatewayRedirectConfiguration
+type ApplicationGatewayRedirectConfigurationPropertiesFormat = original.ApplicationGatewayRedirectConfigurationPropertiesFormat
+type ApplicationGatewayRequestRoutingRule = original.ApplicationGatewayRequestRoutingRule
+type ApplicationGatewayRequestRoutingRulePropertiesFormat = original.ApplicationGatewayRequestRoutingRulePropertiesFormat
+type ApplicationGatewaySku = original.ApplicationGatewaySku
+type ApplicationGatewaySslCertificate = original.ApplicationGatewaySslCertificate
+type ApplicationGatewaySslCertificatePropertiesFormat = original.ApplicationGatewaySslCertificatePropertiesFormat
+type ApplicationGatewaySslPolicy = original.ApplicationGatewaySslPolicy
+type ApplicationGatewaySslPredefinedPolicy = original.ApplicationGatewaySslPredefinedPolicy
+type ApplicationGatewaySslPredefinedPolicyPropertiesFormat = original.ApplicationGatewaySslPredefinedPolicyPropertiesFormat
+type ApplicationGatewayURLPathMap = original.ApplicationGatewayURLPathMap
+type ApplicationGatewayURLPathMapPropertiesFormat = original.ApplicationGatewayURLPathMapPropertiesFormat
+type ApplicationGatewayWebApplicationFirewallConfiguration = original.ApplicationGatewayWebApplicationFirewallConfiguration
+type ApplicationGatewaysBackendHealthFuture = original.ApplicationGatewaysBackendHealthFuture
+type ApplicationGatewaysClient = original.ApplicationGatewaysClient
+type ApplicationGatewaysCreateOrUpdateFuture = original.ApplicationGatewaysCreateOrUpdateFuture
+type ApplicationGatewaysDeleteFuture = original.ApplicationGatewaysDeleteFuture
+type ApplicationGatewaysStartFuture = original.ApplicationGatewaysStartFuture
+type ApplicationGatewaysStopFuture = original.ApplicationGatewaysStopFuture
+type ApplicationGatewaysUpdateTagsFuture = original.ApplicationGatewaysUpdateTagsFuture
+type ApplicationSecurityGroup = original.ApplicationSecurityGroup
+type ApplicationSecurityGroupListResult = original.ApplicationSecurityGroupListResult
+type ApplicationSecurityGroupListResultIterator = original.ApplicationSecurityGroupListResultIterator
+type ApplicationSecurityGroupListResultPage = original.ApplicationSecurityGroupListResultPage
+type ApplicationSecurityGroupPropertiesFormat = original.ApplicationSecurityGroupPropertiesFormat
+type ApplicationSecurityGroupsClient = original.ApplicationSecurityGroupsClient
+type ApplicationSecurityGroupsCreateOrUpdateFuture = original.ApplicationSecurityGroupsCreateOrUpdateFuture
+type ApplicationSecurityGroupsDeleteFuture = original.ApplicationSecurityGroupsDeleteFuture
+type AuthorizationListResult = original.AuthorizationListResult
+type AuthorizationListResultIterator = original.AuthorizationListResultIterator
+type AuthorizationListResultPage = original.AuthorizationListResultPage
+type AuthorizationPropertiesFormat = original.AuthorizationPropertiesFormat
+type Availability = original.Availability
+type AvailableEndpointServicesClient = original.AvailableEndpointServicesClient
+type AvailableProvidersList = original.AvailableProvidersList
+type AvailableProvidersListCity = original.AvailableProvidersListCity
+type AvailableProvidersListCountry = original.AvailableProvidersListCountry
+type AvailableProvidersListParameters = original.AvailableProvidersListParameters
+type AvailableProvidersListState = original.AvailableProvidersListState
+type AzureAsyncOperationResult = original.AzureAsyncOperationResult
+type AzureReachabilityReport = original.AzureReachabilityReport
+type AzureReachabilityReportItem = original.AzureReachabilityReportItem
+type AzureReachabilityReportLatencyInfo = original.AzureReachabilityReportLatencyInfo
+type AzureReachabilityReportLocation = original.AzureReachabilityReportLocation
+type AzureReachabilityReportParameters = original.AzureReachabilityReportParameters
+type BGPCommunity = original.BGPCommunity
+type BackendAddressPool = original.BackendAddressPool
+type BackendAddressPoolPropertiesFormat = original.BackendAddressPoolPropertiesFormat
+type BaseClient = original.BaseClient
+type BgpPeerStatus = original.BgpPeerStatus
+type BgpPeerStatusListResult = original.BgpPeerStatusListResult
+type BgpServiceCommunitiesClient = original.BgpServiceCommunitiesClient
+type BgpServiceCommunity = original.BgpServiceCommunity
+type BgpServiceCommunityListResult = original.BgpServiceCommunityListResult
+type BgpServiceCommunityListResultIterator = original.BgpServiceCommunityListResultIterator
+type BgpServiceCommunityListResultPage = original.BgpServiceCommunityListResultPage
+type BgpServiceCommunityPropertiesFormat = original.BgpServiceCommunityPropertiesFormat
+type BgpSettings = original.BgpSettings
+type ConnectionMonitor = original.ConnectionMonitor
+type ConnectionMonitorDestination = original.ConnectionMonitorDestination
+type ConnectionMonitorListResult = original.ConnectionMonitorListResult
+type ConnectionMonitorParameters = original.ConnectionMonitorParameters
+type ConnectionMonitorQueryResult = original.ConnectionMonitorQueryResult
+type ConnectionMonitorResult = original.ConnectionMonitorResult
+type ConnectionMonitorResultProperties = original.ConnectionMonitorResultProperties
+type ConnectionMonitorSource = original.ConnectionMonitorSource
+type ConnectionMonitorsClient = original.ConnectionMonitorsClient
+type ConnectionMonitorsCreateOrUpdateFuture = original.ConnectionMonitorsCreateOrUpdateFuture
+type ConnectionMonitorsDeleteFuture = original.ConnectionMonitorsDeleteFuture
+type ConnectionMonitorsQueryFuture = original.ConnectionMonitorsQueryFuture
+type ConnectionMonitorsStartFuture = original.ConnectionMonitorsStartFuture
+type ConnectionMonitorsStopFuture = original.ConnectionMonitorsStopFuture
+type ConnectionResetSharedKey = original.ConnectionResetSharedKey
+type ConnectionSharedKey = original.ConnectionSharedKey
+type ConnectionStateSnapshot = original.ConnectionStateSnapshot
+type ConnectivityDestination = original.ConnectivityDestination
+type ConnectivityHop = original.ConnectivityHop
+type ConnectivityInformation = original.ConnectivityInformation
+type ConnectivityIssue = original.ConnectivityIssue
+type ConnectivityParameters = original.ConnectivityParameters
+type ConnectivitySource = original.ConnectivitySource
+type DNSNameAvailabilityResult = original.DNSNameAvailabilityResult
+type DefaultSecurityRulesClient = original.DefaultSecurityRulesClient
+type DhcpOptions = original.DhcpOptions
+type Dimension = original.Dimension
+type EffectiveNetworkSecurityGroup = original.EffectiveNetworkSecurityGroup
+type EffectiveNetworkSecurityGroupAssociation = original.EffectiveNetworkSecurityGroupAssociation
+type EffectiveNetworkSecurityGroupListResult = original.EffectiveNetworkSecurityGroupListResult
+type EffectiveNetworkSecurityRule = original.EffectiveNetworkSecurityRule
+type EffectiveRoute = original.EffectiveRoute
+type EffectiveRouteListResult = original.EffectiveRouteListResult
+type EndpointServiceResult = original.EndpointServiceResult
+type EndpointServicesListResult = original.EndpointServicesListResult
+type EndpointServicesListResultIterator = original.EndpointServicesListResultIterator
+type EndpointServicesListResultPage = original.EndpointServicesListResultPage
+type Error = original.Error
+type ErrorDetails = original.ErrorDetails
+type ExpressRouteCircuit = original.ExpressRouteCircuit
+type ExpressRouteCircuitArpTable = original.ExpressRouteCircuitArpTable
+type ExpressRouteCircuitAuthorization = original.ExpressRouteCircuitAuthorization
+type ExpressRouteCircuitAuthorizationsClient = original.ExpressRouteCircuitAuthorizationsClient
+type ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture = original.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture
+type ExpressRouteCircuitAuthorizationsDeleteFuture = original.ExpressRouteCircuitAuthorizationsDeleteFuture
+type ExpressRouteCircuitListResult = original.ExpressRouteCircuitListResult
+type ExpressRouteCircuitListResultIterator = original.ExpressRouteCircuitListResultIterator
+type ExpressRouteCircuitListResultPage = original.ExpressRouteCircuitListResultPage
+type ExpressRouteCircuitPeering = original.ExpressRouteCircuitPeering
+type ExpressRouteCircuitPeeringConfig = original.ExpressRouteCircuitPeeringConfig
+type ExpressRouteCircuitPeeringListResult = original.ExpressRouteCircuitPeeringListResult
+type ExpressRouteCircuitPeeringListResultIterator = original.ExpressRouteCircuitPeeringListResultIterator
+type ExpressRouteCircuitPeeringListResultPage = original.ExpressRouteCircuitPeeringListResultPage
+type ExpressRouteCircuitPeeringPropertiesFormat = original.ExpressRouteCircuitPeeringPropertiesFormat
+type ExpressRouteCircuitPeeringsClient = original.ExpressRouteCircuitPeeringsClient
+type ExpressRouteCircuitPeeringsCreateOrUpdateFuture = original.ExpressRouteCircuitPeeringsCreateOrUpdateFuture
+type ExpressRouteCircuitPeeringsDeleteFuture = original.ExpressRouteCircuitPeeringsDeleteFuture
+type ExpressRouteCircuitPropertiesFormat = original.ExpressRouteCircuitPropertiesFormat
+type ExpressRouteCircuitRoutesTable = original.ExpressRouteCircuitRoutesTable
+type ExpressRouteCircuitRoutesTableSummary = original.ExpressRouteCircuitRoutesTableSummary
+type ExpressRouteCircuitServiceProviderProperties = original.ExpressRouteCircuitServiceProviderProperties
+type ExpressRouteCircuitSku = original.ExpressRouteCircuitSku
+type ExpressRouteCircuitStats = original.ExpressRouteCircuitStats
+type ExpressRouteCircuitsArpTableListResult = original.ExpressRouteCircuitsArpTableListResult
+type ExpressRouteCircuitsClient = original.ExpressRouteCircuitsClient
+type ExpressRouteCircuitsCreateOrUpdateFuture = original.ExpressRouteCircuitsCreateOrUpdateFuture
+type ExpressRouteCircuitsDeleteFuture = original.ExpressRouteCircuitsDeleteFuture
+type ExpressRouteCircuitsListArpTableFuture = original.ExpressRouteCircuitsListArpTableFuture
+type ExpressRouteCircuitsListRoutesTableFuture = original.ExpressRouteCircuitsListRoutesTableFuture
+type ExpressRouteCircuitsListRoutesTableSummaryFuture = original.ExpressRouteCircuitsListRoutesTableSummaryFuture
+type ExpressRouteCircuitsRoutesTableListResult = original.ExpressRouteCircuitsRoutesTableListResult
+type ExpressRouteCircuitsRoutesTableSummaryListResult = original.ExpressRouteCircuitsRoutesTableSummaryListResult
+type ExpressRouteCircuitsUpdateTagsFuture = original.ExpressRouteCircuitsUpdateTagsFuture
+type ExpressRouteServiceProvider = original.ExpressRouteServiceProvider
+type ExpressRouteServiceProviderBandwidthsOffered = original.ExpressRouteServiceProviderBandwidthsOffered
+type ExpressRouteServiceProviderListResult = original.ExpressRouteServiceProviderListResult
+type ExpressRouteServiceProviderListResultIterator = original.ExpressRouteServiceProviderListResultIterator
+type ExpressRouteServiceProviderListResultPage = original.ExpressRouteServiceProviderListResultPage
+type ExpressRouteServiceProviderPropertiesFormat = original.ExpressRouteServiceProviderPropertiesFormat
+type ExpressRouteServiceProvidersClient = original.ExpressRouteServiceProvidersClient
+type FlowLogInformation = original.FlowLogInformation
+type FlowLogProperties = original.FlowLogProperties
+type FlowLogStatusParameters = original.FlowLogStatusParameters
+type FrontendIPConfiguration = original.FrontendIPConfiguration
+type FrontendIPConfigurationPropertiesFormat = original.FrontendIPConfigurationPropertiesFormat
+type GatewayRoute = original.GatewayRoute
+type GatewayRouteListResult = original.GatewayRouteListResult
+type IPAddressAvailabilityResult = original.IPAddressAvailabilityResult
+type IPConfiguration = original.IPConfiguration
+type IPConfigurationPropertiesFormat = original.IPConfigurationPropertiesFormat
+type InboundNatPool = original.InboundNatPool
+type InboundNatPoolPropertiesFormat = original.InboundNatPoolPropertiesFormat
+type InboundNatRule = original.InboundNatRule
+type InboundNatRuleListResult = original.InboundNatRuleListResult
+type InboundNatRuleListResultIterator = original.InboundNatRuleListResultIterator
+type InboundNatRuleListResultPage = original.InboundNatRuleListResultPage
+type InboundNatRulePropertiesFormat = original.InboundNatRulePropertiesFormat
+type InboundNatRulesClient = original.InboundNatRulesClient
+type InboundNatRulesCreateOrUpdateFuture = original.InboundNatRulesCreateOrUpdateFuture
+type InboundNatRulesDeleteFuture = original.InboundNatRulesDeleteFuture
+type Interface = original.Interface
+type InterfaceAssociation = original.InterfaceAssociation
+type InterfaceDNSSettings = original.InterfaceDNSSettings
+type InterfaceIPConfiguration = original.InterfaceIPConfiguration
+type InterfaceIPConfigurationListResult = original.InterfaceIPConfigurationListResult
+type InterfaceIPConfigurationListResultIterator = original.InterfaceIPConfigurationListResultIterator
+type InterfaceIPConfigurationListResultPage = original.InterfaceIPConfigurationListResultPage
+type InterfaceIPConfigurationPropertiesFormat = original.InterfaceIPConfigurationPropertiesFormat
+type InterfaceIPConfigurationsClient = original.InterfaceIPConfigurationsClient
+type InterfaceListResult = original.InterfaceListResult
+type InterfaceListResultIterator = original.InterfaceListResultIterator
+type InterfaceListResultPage = original.InterfaceListResultPage
+type InterfaceLoadBalancerListResult = original.InterfaceLoadBalancerListResult
+type InterfaceLoadBalancerListResultIterator = original.InterfaceLoadBalancerListResultIterator
+type InterfaceLoadBalancerListResultPage = original.InterfaceLoadBalancerListResultPage
+type InterfaceLoadBalancersClient = original.InterfaceLoadBalancersClient
+type InterfacePropertiesFormat = original.InterfacePropertiesFormat
+type InterfacesClient = original.InterfacesClient
+type InterfacesCreateOrUpdateFuture = original.InterfacesCreateOrUpdateFuture
+type InterfacesDeleteFuture = original.InterfacesDeleteFuture
+type InterfacesGetEffectiveRouteTableFuture = original.InterfacesGetEffectiveRouteTableFuture
+type InterfacesListEffectiveNetworkSecurityGroupsFuture = original.InterfacesListEffectiveNetworkSecurityGroupsFuture
+type InterfacesUpdateTagsFuture = original.InterfacesUpdateTagsFuture
+type IpsecPolicy = original.IpsecPolicy
+type Ipv6ExpressRouteCircuitPeeringConfig = original.Ipv6ExpressRouteCircuitPeeringConfig
+type LoadBalancer = original.LoadBalancer
+type LoadBalancerBackendAddressPoolListResult = original.LoadBalancerBackendAddressPoolListResult
+type LoadBalancerBackendAddressPoolListResultIterator = original.LoadBalancerBackendAddressPoolListResultIterator
+type LoadBalancerBackendAddressPoolListResultPage = original.LoadBalancerBackendAddressPoolListResultPage
+type LoadBalancerBackendAddressPoolsClient = original.LoadBalancerBackendAddressPoolsClient
+type LoadBalancerFrontendIPConfigurationListResult = original.LoadBalancerFrontendIPConfigurationListResult
+type LoadBalancerFrontendIPConfigurationListResultIterator = original.LoadBalancerFrontendIPConfigurationListResultIterator
+type LoadBalancerFrontendIPConfigurationListResultPage = original.LoadBalancerFrontendIPConfigurationListResultPage
+type LoadBalancerFrontendIPConfigurationsClient = original.LoadBalancerFrontendIPConfigurationsClient
+type LoadBalancerListResult = original.LoadBalancerListResult
+type LoadBalancerListResultIterator = original.LoadBalancerListResultIterator
+type LoadBalancerListResultPage = original.LoadBalancerListResultPage
+type LoadBalancerLoadBalancingRuleListResult = original.LoadBalancerLoadBalancingRuleListResult
+type LoadBalancerLoadBalancingRuleListResultIterator = original.LoadBalancerLoadBalancingRuleListResultIterator
+type LoadBalancerLoadBalancingRuleListResultPage = original.LoadBalancerLoadBalancingRuleListResultPage
+type LoadBalancerLoadBalancingRulesClient = original.LoadBalancerLoadBalancingRulesClient
+type LoadBalancerNetworkInterfacesClient = original.LoadBalancerNetworkInterfacesClient
+type LoadBalancerProbeListResult = original.LoadBalancerProbeListResult
+type LoadBalancerProbeListResultIterator = original.LoadBalancerProbeListResultIterator
+type LoadBalancerProbeListResultPage = original.LoadBalancerProbeListResultPage
+type LoadBalancerProbesClient = original.LoadBalancerProbesClient
+type LoadBalancerPropertiesFormat = original.LoadBalancerPropertiesFormat
+type LoadBalancerSku = original.LoadBalancerSku
+type LoadBalancersClient = original.LoadBalancersClient
+type LoadBalancersCreateOrUpdateFuture = original.LoadBalancersCreateOrUpdateFuture
+type LoadBalancersDeleteFuture = original.LoadBalancersDeleteFuture
+type LoadBalancersUpdateTagsFuture = original.LoadBalancersUpdateTagsFuture
+type LoadBalancingRule = original.LoadBalancingRule
+type LoadBalancingRulePropertiesFormat = original.LoadBalancingRulePropertiesFormat
+type LocalNetworkGateway = original.LocalNetworkGateway
+type LocalNetworkGatewayListResult = original.LocalNetworkGatewayListResult
+type LocalNetworkGatewayListResultIterator = original.LocalNetworkGatewayListResultIterator
+type LocalNetworkGatewayListResultPage = original.LocalNetworkGatewayListResultPage
+type LocalNetworkGatewayPropertiesFormat = original.LocalNetworkGatewayPropertiesFormat
+type LocalNetworkGatewaysClient = original.LocalNetworkGatewaysClient
+type LocalNetworkGatewaysCreateOrUpdateFuture = original.LocalNetworkGatewaysCreateOrUpdateFuture
+type LocalNetworkGatewaysDeleteFuture = original.LocalNetworkGatewaysDeleteFuture
+type LocalNetworkGatewaysUpdateTagsFuture = original.LocalNetworkGatewaysUpdateTagsFuture
+type LogSpecification = original.LogSpecification
+type MetricSpecification = original.MetricSpecification
+type NextHopParameters = original.NextHopParameters
+type NextHopResult = original.NextHopResult
+type Operation = original.Operation
+type OperationDisplay = original.OperationDisplay
+type OperationListResult = original.OperationListResult
+type OperationListResultIterator = original.OperationListResultIterator
+type OperationListResultPage = original.OperationListResultPage
+type OperationPropertiesFormat = original.OperationPropertiesFormat
+type OperationPropertiesFormatServiceSpecification = original.OperationPropertiesFormatServiceSpecification
+type OperationsClient = original.OperationsClient
+type OutboundNatRule = original.OutboundNatRule
+type OutboundNatRulePropertiesFormat = original.OutboundNatRulePropertiesFormat
+type PacketCapture = original.PacketCapture
+type PacketCaptureFilter = original.PacketCaptureFilter
+type PacketCaptureListResult = original.PacketCaptureListResult
+type PacketCaptureParameters = original.PacketCaptureParameters
+type PacketCaptureQueryStatusResult = original.PacketCaptureQueryStatusResult
+type PacketCaptureResult = original.PacketCaptureResult
+type PacketCaptureResultProperties = original.PacketCaptureResultProperties
+type PacketCaptureStorageLocation = original.PacketCaptureStorageLocation
+type PacketCapturesClient = original.PacketCapturesClient
+type PacketCapturesCreateFuture = original.PacketCapturesCreateFuture
+type PacketCapturesDeleteFuture = original.PacketCapturesDeleteFuture
+type PacketCapturesGetStatusFuture = original.PacketCapturesGetStatusFuture
+type PacketCapturesStopFuture = original.PacketCapturesStopFuture
+type PatchRouteFilter = original.PatchRouteFilter
+type PatchRouteFilterRule = original.PatchRouteFilterRule
+type Probe = original.Probe
+type ProbePropertiesFormat = original.ProbePropertiesFormat
+type PublicIPAddress = original.PublicIPAddress
+type PublicIPAddressDNSSettings = original.PublicIPAddressDNSSettings
+type PublicIPAddressListResult = original.PublicIPAddressListResult
+type PublicIPAddressListResultIterator = original.PublicIPAddressListResultIterator
+type PublicIPAddressListResultPage = original.PublicIPAddressListResultPage
+type PublicIPAddressPropertiesFormat = original.PublicIPAddressPropertiesFormat
+type PublicIPAddressSku = original.PublicIPAddressSku
+type PublicIPAddressesClient = original.PublicIPAddressesClient
+type PublicIPAddressesCreateOrUpdateFuture = original.PublicIPAddressesCreateOrUpdateFuture
+type PublicIPAddressesDeleteFuture = original.PublicIPAddressesDeleteFuture
+type PublicIPAddressesUpdateTagsFuture = original.PublicIPAddressesUpdateTagsFuture
+type QueryTroubleshootingParameters = original.QueryTroubleshootingParameters
+type Resource = original.Resource
+type ResourceNavigationLink = original.ResourceNavigationLink
+type ResourceNavigationLinkFormat = original.ResourceNavigationLinkFormat
+type RetentionPolicyParameters = original.RetentionPolicyParameters
+type Route = original.Route
+type RouteFilter = original.RouteFilter
+type RouteFilterListResult = original.RouteFilterListResult
+type RouteFilterListResultIterator = original.RouteFilterListResultIterator
+type RouteFilterListResultPage = original.RouteFilterListResultPage
+type RouteFilterPropertiesFormat = original.RouteFilterPropertiesFormat
+type RouteFilterRule = original.RouteFilterRule
+type RouteFilterRuleListResult = original.RouteFilterRuleListResult
+type RouteFilterRuleListResultIterator = original.RouteFilterRuleListResultIterator
+type RouteFilterRuleListResultPage = original.RouteFilterRuleListResultPage
+type RouteFilterRulePropertiesFormat = original.RouteFilterRulePropertiesFormat
+type RouteFilterRulesClient = original.RouteFilterRulesClient
+type RouteFilterRulesCreateOrUpdateFuture = original.RouteFilterRulesCreateOrUpdateFuture
+type RouteFilterRulesDeleteFuture = original.RouteFilterRulesDeleteFuture
+type RouteFilterRulesUpdateFuture = original.RouteFilterRulesUpdateFuture
+type RouteFiltersClient = original.RouteFiltersClient
+type RouteFiltersCreateOrUpdateFuture = original.RouteFiltersCreateOrUpdateFuture
+type RouteFiltersDeleteFuture = original.RouteFiltersDeleteFuture
+type RouteFiltersUpdateFuture = original.RouteFiltersUpdateFuture
+type RouteListResult = original.RouteListResult
+type RouteListResultIterator = original.RouteListResultIterator
+type RouteListResultPage = original.RouteListResultPage
+type RoutePropertiesFormat = original.RoutePropertiesFormat
+type RouteTable = original.RouteTable
+type RouteTableListResult = original.RouteTableListResult
+type RouteTableListResultIterator = original.RouteTableListResultIterator
+type RouteTableListResultPage = original.RouteTableListResultPage
+type RouteTablePropertiesFormat = original.RouteTablePropertiesFormat
+type RouteTablesClient = original.RouteTablesClient
+type RouteTablesCreateOrUpdateFuture = original.RouteTablesCreateOrUpdateFuture
+type RouteTablesDeleteFuture = original.RouteTablesDeleteFuture
+type RouteTablesUpdateTagsFuture = original.RouteTablesUpdateTagsFuture
+type RoutesClient = original.RoutesClient
+type RoutesCreateOrUpdateFuture = original.RoutesCreateOrUpdateFuture
+type RoutesDeleteFuture = original.RoutesDeleteFuture
+type SecurityGroup = original.SecurityGroup
+type SecurityGroupListResult = original.SecurityGroupListResult
+type SecurityGroupListResultIterator = original.SecurityGroupListResultIterator
+type SecurityGroupListResultPage = original.SecurityGroupListResultPage
+type SecurityGroupNetworkInterface = original.SecurityGroupNetworkInterface
+type SecurityGroupPropertiesFormat = original.SecurityGroupPropertiesFormat
+type SecurityGroupViewParameters = original.SecurityGroupViewParameters
+type SecurityGroupViewResult = original.SecurityGroupViewResult
+type SecurityGroupsClient = original.SecurityGroupsClient
+type SecurityGroupsCreateOrUpdateFuture = original.SecurityGroupsCreateOrUpdateFuture
+type SecurityGroupsDeleteFuture = original.SecurityGroupsDeleteFuture
+type SecurityGroupsUpdateTagsFuture = original.SecurityGroupsUpdateTagsFuture
+type SecurityRule = original.SecurityRule
+type SecurityRuleAssociations = original.SecurityRuleAssociations
+type SecurityRuleListResult = original.SecurityRuleListResult
+type SecurityRuleListResultIterator = original.SecurityRuleListResultIterator
+type SecurityRuleListResultPage = original.SecurityRuleListResultPage
+type SecurityRulePropertiesFormat = original.SecurityRulePropertiesFormat
+type SecurityRulesClient = original.SecurityRulesClient
+type SecurityRulesCreateOrUpdateFuture = original.SecurityRulesCreateOrUpdateFuture
+type SecurityRulesDeleteFuture = original.SecurityRulesDeleteFuture
+type ServiceEndpointPropertiesFormat = original.ServiceEndpointPropertiesFormat
+type String = original.String
+type SubResource = original.SubResource
+type Subnet = original.Subnet
+type SubnetAssociation = original.SubnetAssociation
+type SubnetListResult = original.SubnetListResult
+type SubnetListResultIterator = original.SubnetListResultIterator
+type SubnetListResultPage = original.SubnetListResultPage
+type SubnetPropertiesFormat = original.SubnetPropertiesFormat
+type SubnetsClient = original.SubnetsClient
+type SubnetsCreateOrUpdateFuture = original.SubnetsCreateOrUpdateFuture
+type SubnetsDeleteFuture = original.SubnetsDeleteFuture
+type TagsObject = original.TagsObject
+type Topology = original.Topology
+type TopologyAssociation = original.TopologyAssociation
+type TopologyParameters = original.TopologyParameters
+type TopologyResource = original.TopologyResource
+type TroubleshootingDetails = original.TroubleshootingDetails
+type TroubleshootingParameters = original.TroubleshootingParameters
+type TroubleshootingProperties = original.TroubleshootingProperties
+type TroubleshootingRecommendedActions = original.TroubleshootingRecommendedActions
+type TroubleshootingResult = original.TroubleshootingResult
+type TunnelConnectionHealth = original.TunnelConnectionHealth
+type Usage = original.Usage
+type UsageName = original.UsageName
+type UsagesClient = original.UsagesClient
+type UsagesListResult = original.UsagesListResult
+type UsagesListResultIterator = original.UsagesListResultIterator
+type UsagesListResultPage = original.UsagesListResultPage
+type VerificationIPFlowParameters = original.VerificationIPFlowParameters
+type VerificationIPFlowResult = original.VerificationIPFlowResult
+type VirtualNetwork = original.VirtualNetwork
+type VirtualNetworkConnectionGatewayReference = original.VirtualNetworkConnectionGatewayReference
+type VirtualNetworkGateway = original.VirtualNetworkGateway
+type VirtualNetworkGatewayConnection = original.VirtualNetworkGatewayConnection
+type VirtualNetworkGatewayConnectionListEntity = original.VirtualNetworkGatewayConnectionListEntity
+type VirtualNetworkGatewayConnectionListEntityPropertiesFormat = original.VirtualNetworkGatewayConnectionListEntityPropertiesFormat
+type VirtualNetworkGatewayConnectionListResult = original.VirtualNetworkGatewayConnectionListResult
+type VirtualNetworkGatewayConnectionListResultIterator = original.VirtualNetworkGatewayConnectionListResultIterator
+type VirtualNetworkGatewayConnectionListResultPage = original.VirtualNetworkGatewayConnectionListResultPage
+type VirtualNetworkGatewayConnectionPropertiesFormat = original.VirtualNetworkGatewayConnectionPropertiesFormat
+type VirtualNetworkGatewayConnectionsClient = original.VirtualNetworkGatewayConnectionsClient
+type VirtualNetworkGatewayConnectionsCreateOrUpdateFuture = original.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture
+type VirtualNetworkGatewayConnectionsDeleteFuture = original.VirtualNetworkGatewayConnectionsDeleteFuture
+type VirtualNetworkGatewayConnectionsResetSharedKeyFuture = original.VirtualNetworkGatewayConnectionsResetSharedKeyFuture
+type VirtualNetworkGatewayConnectionsSetSharedKeyFuture = original.VirtualNetworkGatewayConnectionsSetSharedKeyFuture
+type VirtualNetworkGatewayConnectionsUpdateTagsFuture = original.VirtualNetworkGatewayConnectionsUpdateTagsFuture
+type VirtualNetworkGatewayIPConfiguration = original.VirtualNetworkGatewayIPConfiguration
+type VirtualNetworkGatewayIPConfigurationPropertiesFormat = original.VirtualNetworkGatewayIPConfigurationPropertiesFormat
+type VirtualNetworkGatewayListConnectionsResult = original.VirtualNetworkGatewayListConnectionsResult
+type VirtualNetworkGatewayListConnectionsResultIterator = original.VirtualNetworkGatewayListConnectionsResultIterator
+type VirtualNetworkGatewayListConnectionsResultPage = original.VirtualNetworkGatewayListConnectionsResultPage
+type VirtualNetworkGatewayListResult = original.VirtualNetworkGatewayListResult
+type VirtualNetworkGatewayListResultIterator = original.VirtualNetworkGatewayListResultIterator
+type VirtualNetworkGatewayListResultPage = original.VirtualNetworkGatewayListResultPage
+type VirtualNetworkGatewayPropertiesFormat = original.VirtualNetworkGatewayPropertiesFormat
+type VirtualNetworkGatewaySku = original.VirtualNetworkGatewaySku
+type VirtualNetworkGatewaysClient = original.VirtualNetworkGatewaysClient
+type VirtualNetworkGatewaysCreateOrUpdateFuture = original.VirtualNetworkGatewaysCreateOrUpdateFuture
+type VirtualNetworkGatewaysDeleteFuture = original.VirtualNetworkGatewaysDeleteFuture
+type VirtualNetworkGatewaysGenerateVpnProfileFuture = original.VirtualNetworkGatewaysGenerateVpnProfileFuture
+type VirtualNetworkGatewaysGeneratevpnclientpackageFuture = original.VirtualNetworkGatewaysGeneratevpnclientpackageFuture
+type VirtualNetworkGatewaysGetAdvertisedRoutesFuture = original.VirtualNetworkGatewaysGetAdvertisedRoutesFuture
+type VirtualNetworkGatewaysGetBgpPeerStatusFuture = original.VirtualNetworkGatewaysGetBgpPeerStatusFuture
+type VirtualNetworkGatewaysGetLearnedRoutesFuture = original.VirtualNetworkGatewaysGetLearnedRoutesFuture
+type VirtualNetworkGatewaysGetVpnProfilePackageURLFuture = original.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture
+type VirtualNetworkGatewaysResetFuture = original.VirtualNetworkGatewaysResetFuture
+type VirtualNetworkGatewaysUpdateTagsFuture = original.VirtualNetworkGatewaysUpdateTagsFuture
+type VirtualNetworkListResult = original.VirtualNetworkListResult
+type VirtualNetworkListResultIterator = original.VirtualNetworkListResultIterator
+type VirtualNetworkListResultPage = original.VirtualNetworkListResultPage
+type VirtualNetworkListUsageResult = original.VirtualNetworkListUsageResult
+type VirtualNetworkListUsageResultIterator = original.VirtualNetworkListUsageResultIterator
+type VirtualNetworkListUsageResultPage = original.VirtualNetworkListUsageResultPage
+type VirtualNetworkPeering = original.VirtualNetworkPeering
+type VirtualNetworkPeeringListResult = original.VirtualNetworkPeeringListResult
+type VirtualNetworkPeeringListResultIterator = original.VirtualNetworkPeeringListResultIterator
+type VirtualNetworkPeeringListResultPage = original.VirtualNetworkPeeringListResultPage
+type VirtualNetworkPeeringPropertiesFormat = original.VirtualNetworkPeeringPropertiesFormat
+type VirtualNetworkPeeringsClient = original.VirtualNetworkPeeringsClient
+type VirtualNetworkPeeringsCreateOrUpdateFuture = original.VirtualNetworkPeeringsCreateOrUpdateFuture
+type VirtualNetworkPeeringsDeleteFuture = original.VirtualNetworkPeeringsDeleteFuture
+type VirtualNetworkPropertiesFormat = original.VirtualNetworkPropertiesFormat
+type VirtualNetworkUsage = original.VirtualNetworkUsage
+type VirtualNetworkUsageName = original.VirtualNetworkUsageName
+type VirtualNetworksClient = original.VirtualNetworksClient
+type VirtualNetworksCreateOrUpdateFuture = original.VirtualNetworksCreateOrUpdateFuture
+type VirtualNetworksDeleteFuture = original.VirtualNetworksDeleteFuture
+type VirtualNetworksUpdateTagsFuture = original.VirtualNetworksUpdateTagsFuture
+type VpnClientConfiguration = original.VpnClientConfiguration
+type VpnClientParameters = original.VpnClientParameters
+type VpnClientRevokedCertificate = original.VpnClientRevokedCertificate
+type VpnClientRevokedCertificatePropertiesFormat = original.VpnClientRevokedCertificatePropertiesFormat
+type VpnClientRootCertificate = original.VpnClientRootCertificate
+type VpnClientRootCertificatePropertiesFormat = original.VpnClientRootCertificatePropertiesFormat
+type VpnDeviceScriptParameters = original.VpnDeviceScriptParameters
+type Watcher = original.Watcher
+type WatcherListResult = original.WatcherListResult
+type WatcherPropertiesFormat = original.WatcherPropertiesFormat
+type WatchersCheckConnectivityFuture = original.WatchersCheckConnectivityFuture
+type WatchersClient = original.WatchersClient
+type WatchersDeleteFuture = original.WatchersDeleteFuture
+type WatchersGetAzureReachabilityReportFuture = original.WatchersGetAzureReachabilityReportFuture
+type WatchersGetFlowLogStatusFuture = original.WatchersGetFlowLogStatusFuture
+type WatchersGetNextHopFuture = original.WatchersGetNextHopFuture
+type WatchersGetTroubleshootingFuture = original.WatchersGetTroubleshootingFuture
+type WatchersGetTroubleshootingResultFuture = original.WatchersGetTroubleshootingResultFuture
+type WatchersGetVMSecurityRulesFuture = original.WatchersGetVMSecurityRulesFuture
+type WatchersListAvailableProvidersFuture = original.WatchersListAvailableProvidersFuture
+type WatchersSetFlowLogConfigurationFuture = original.WatchersSetFlowLogConfigurationFuture
+type WatchersVerifyIPFlowFuture = original.WatchersVerifyIPFlowFuture
+
+func New(subscriptionID string) BaseClient {
+ return original.New(subscriptionID)
+}
+func NewApplicationGatewayAvailableSslPredefinedPoliciesIterator(page ApplicationGatewayAvailableSslPredefinedPoliciesPage) ApplicationGatewayAvailableSslPredefinedPoliciesIterator {
+ return original.NewApplicationGatewayAvailableSslPredefinedPoliciesIterator(page)
+}
+func NewApplicationGatewayAvailableSslPredefinedPoliciesPage(cur ApplicationGatewayAvailableSslPredefinedPolicies, getNextPage func(context.Context, ApplicationGatewayAvailableSslPredefinedPolicies) (ApplicationGatewayAvailableSslPredefinedPolicies, error)) ApplicationGatewayAvailableSslPredefinedPoliciesPage {
+ return original.NewApplicationGatewayAvailableSslPredefinedPoliciesPage(cur, getNextPage)
+}
+func NewApplicationGatewayListResultIterator(page ApplicationGatewayListResultPage) ApplicationGatewayListResultIterator {
+ return original.NewApplicationGatewayListResultIterator(page)
+}
+func NewApplicationGatewayListResultPage(cur ApplicationGatewayListResult, getNextPage func(context.Context, ApplicationGatewayListResult) (ApplicationGatewayListResult, error)) ApplicationGatewayListResultPage {
+ return original.NewApplicationGatewayListResultPage(cur, getNextPage)
+}
+func NewApplicationGatewaysClient(subscriptionID string) ApplicationGatewaysClient {
+ return original.NewApplicationGatewaysClient(subscriptionID)
+}
+func NewApplicationGatewaysClientWithBaseURI(baseURI string, subscriptionID string) ApplicationGatewaysClient {
+ return original.NewApplicationGatewaysClientWithBaseURI(baseURI, subscriptionID)
+}
+func NewApplicationSecurityGroupListResultIterator(page ApplicationSecurityGroupListResultPage) ApplicationSecurityGroupListResultIterator {
+ return original.NewApplicationSecurityGroupListResultIterator(page)
+}
+func NewApplicationSecurityGroupListResultPage(cur ApplicationSecurityGroupListResult, getNextPage func(context.Context, ApplicationSecurityGroupListResult) (ApplicationSecurityGroupListResult, error)) ApplicationSecurityGroupListResultPage {
+ return original.NewApplicationSecurityGroupListResultPage(cur, getNextPage)
+}
+func NewApplicationSecurityGroupsClient(subscriptionID string) ApplicationSecurityGroupsClient {
+ return original.NewApplicationSecurityGroupsClient(subscriptionID)
+}
+func NewApplicationSecurityGroupsClientWithBaseURI(baseURI string, subscriptionID string) ApplicationSecurityGroupsClient {
+ return original.NewApplicationSecurityGroupsClientWithBaseURI(baseURI, subscriptionID)
+}
+func NewAuthorizationListResultIterator(page AuthorizationListResultPage) AuthorizationListResultIterator {
+ return original.NewAuthorizationListResultIterator(page)
+}
+func NewAuthorizationListResultPage(cur AuthorizationListResult, getNextPage func(context.Context, AuthorizationListResult) (AuthorizationListResult, error)) AuthorizationListResultPage {
+ return original.NewAuthorizationListResultPage(cur, getNextPage)
+}
+func NewAvailableEndpointServicesClient(subscriptionID string) AvailableEndpointServicesClient {
+ return original.NewAvailableEndpointServicesClient(subscriptionID)
+}
+func NewAvailableEndpointServicesClientWithBaseURI(baseURI string, subscriptionID string) AvailableEndpointServicesClient {
+ return original.NewAvailableEndpointServicesClientWithBaseURI(baseURI, subscriptionID)
+}
+func NewBgpServiceCommunitiesClient(subscriptionID string) BgpServiceCommunitiesClient {
+ return original.NewBgpServiceCommunitiesClient(subscriptionID)
+}
+func NewBgpServiceCommunitiesClientWithBaseURI(baseURI string, subscriptionID string) BgpServiceCommunitiesClient {
+ return original.NewBgpServiceCommunitiesClientWithBaseURI(baseURI, subscriptionID)
+}
+func NewBgpServiceCommunityListResultIterator(page BgpServiceCommunityListResultPage) BgpServiceCommunityListResultIterator {
+ return original.NewBgpServiceCommunityListResultIterator(page)
+}
+func NewBgpServiceCommunityListResultPage(cur BgpServiceCommunityListResult, getNextPage func(context.Context, BgpServiceCommunityListResult) (BgpServiceCommunityListResult, error)) BgpServiceCommunityListResultPage {
+ return original.NewBgpServiceCommunityListResultPage(cur, getNextPage)
+}
+func NewConnectionMonitorsClient(subscriptionID string) ConnectionMonitorsClient {
+ return original.NewConnectionMonitorsClient(subscriptionID)
+}
+func NewConnectionMonitorsClientWithBaseURI(baseURI string, subscriptionID string) ConnectionMonitorsClient {
+ return original.NewConnectionMonitorsClientWithBaseURI(baseURI, subscriptionID)
+}
+func NewDefaultSecurityRulesClient(subscriptionID string) DefaultSecurityRulesClient {
+ return original.NewDefaultSecurityRulesClient(subscriptionID)
+}
+func NewDefaultSecurityRulesClientWithBaseURI(baseURI string, subscriptionID string) DefaultSecurityRulesClient {
+ return original.NewDefaultSecurityRulesClientWithBaseURI(baseURI, subscriptionID)
+}
+func NewEndpointServicesListResultIterator(page EndpointServicesListResultPage) EndpointServicesListResultIterator {
+ return original.NewEndpointServicesListResultIterator(page)
+}
+func NewEndpointServicesListResultPage(cur EndpointServicesListResult, getNextPage func(context.Context, EndpointServicesListResult) (EndpointServicesListResult, error)) EndpointServicesListResultPage {
+ return original.NewEndpointServicesListResultPage(cur, getNextPage)
+}
+func NewExpressRouteCircuitAuthorizationsClient(subscriptionID string) ExpressRouteCircuitAuthorizationsClient {
+ return original.NewExpressRouteCircuitAuthorizationsClient(subscriptionID)
+}
+func NewExpressRouteCircuitAuthorizationsClientWithBaseURI(baseURI string, subscriptionID string) ExpressRouteCircuitAuthorizationsClient {
+ return original.NewExpressRouteCircuitAuthorizationsClientWithBaseURI(baseURI, subscriptionID)
+}
+func NewExpressRouteCircuitListResultIterator(page ExpressRouteCircuitListResultPage) ExpressRouteCircuitListResultIterator {
+ return original.NewExpressRouteCircuitListResultIterator(page)
+}
+func NewExpressRouteCircuitListResultPage(cur ExpressRouteCircuitListResult, getNextPage func(context.Context, ExpressRouteCircuitListResult) (ExpressRouteCircuitListResult, error)) ExpressRouteCircuitListResultPage {
+ return original.NewExpressRouteCircuitListResultPage(cur, getNextPage)
+}
+func NewExpressRouteCircuitPeeringListResultIterator(page ExpressRouteCircuitPeeringListResultPage) ExpressRouteCircuitPeeringListResultIterator {
+ return original.NewExpressRouteCircuitPeeringListResultIterator(page)
+}
+func NewExpressRouteCircuitPeeringListResultPage(cur ExpressRouteCircuitPeeringListResult, getNextPage func(context.Context, ExpressRouteCircuitPeeringListResult) (ExpressRouteCircuitPeeringListResult, error)) ExpressRouteCircuitPeeringListResultPage {
+ return original.NewExpressRouteCircuitPeeringListResultPage(cur, getNextPage)
+}
+func NewExpressRouteCircuitPeeringsClient(subscriptionID string) ExpressRouteCircuitPeeringsClient {
+ return original.NewExpressRouteCircuitPeeringsClient(subscriptionID)
+}
+func NewExpressRouteCircuitPeeringsClientWithBaseURI(baseURI string, subscriptionID string) ExpressRouteCircuitPeeringsClient {
+ return original.NewExpressRouteCircuitPeeringsClientWithBaseURI(baseURI, subscriptionID)
+}
+func NewExpressRouteCircuitsClient(subscriptionID string) ExpressRouteCircuitsClient {
+ return original.NewExpressRouteCircuitsClient(subscriptionID)
+}
+func NewExpressRouteCircuitsClientWithBaseURI(baseURI string, subscriptionID string) ExpressRouteCircuitsClient {
+ return original.NewExpressRouteCircuitsClientWithBaseURI(baseURI, subscriptionID)
+}
+func NewExpressRouteServiceProviderListResultIterator(page ExpressRouteServiceProviderListResultPage) ExpressRouteServiceProviderListResultIterator {
+ return original.NewExpressRouteServiceProviderListResultIterator(page)
+}
+func NewExpressRouteServiceProviderListResultPage(cur ExpressRouteServiceProviderListResult, getNextPage func(context.Context, ExpressRouteServiceProviderListResult) (ExpressRouteServiceProviderListResult, error)) ExpressRouteServiceProviderListResultPage {
+ return original.NewExpressRouteServiceProviderListResultPage(cur, getNextPage)
+}
+func NewExpressRouteServiceProvidersClient(subscriptionID string) ExpressRouteServiceProvidersClient {
+ return original.NewExpressRouteServiceProvidersClient(subscriptionID)
+}
+func NewExpressRouteServiceProvidersClientWithBaseURI(baseURI string, subscriptionID string) ExpressRouteServiceProvidersClient {
+ return original.NewExpressRouteServiceProvidersClientWithBaseURI(baseURI, subscriptionID)
+}
+func NewInboundNatRuleListResultIterator(page InboundNatRuleListResultPage) InboundNatRuleListResultIterator {
+ return original.NewInboundNatRuleListResultIterator(page)
+}
+func NewInboundNatRuleListResultPage(cur InboundNatRuleListResult, getNextPage func(context.Context, InboundNatRuleListResult) (InboundNatRuleListResult, error)) InboundNatRuleListResultPage {
+ return original.NewInboundNatRuleListResultPage(cur, getNextPage)
+}
+func NewInboundNatRulesClient(subscriptionID string) InboundNatRulesClient {
+ return original.NewInboundNatRulesClient(subscriptionID)
+}
+func NewInboundNatRulesClientWithBaseURI(baseURI string, subscriptionID string) InboundNatRulesClient {
+ return original.NewInboundNatRulesClientWithBaseURI(baseURI, subscriptionID)
+}
+func NewInterfaceIPConfigurationListResultIterator(page InterfaceIPConfigurationListResultPage) InterfaceIPConfigurationListResultIterator {
+ return original.NewInterfaceIPConfigurationListResultIterator(page)
+}
+func NewInterfaceIPConfigurationListResultPage(cur InterfaceIPConfigurationListResult, getNextPage func(context.Context, InterfaceIPConfigurationListResult) (InterfaceIPConfigurationListResult, error)) InterfaceIPConfigurationListResultPage {
+ return original.NewInterfaceIPConfigurationListResultPage(cur, getNextPage)
+}
+func NewInterfaceIPConfigurationsClient(subscriptionID string) InterfaceIPConfigurationsClient {
+ return original.NewInterfaceIPConfigurationsClient(subscriptionID)
+}
+func NewInterfaceIPConfigurationsClientWithBaseURI(baseURI string, subscriptionID string) InterfaceIPConfigurationsClient {
+ return original.NewInterfaceIPConfigurationsClientWithBaseURI(baseURI, subscriptionID)
+}
+func NewInterfaceListResultIterator(page InterfaceListResultPage) InterfaceListResultIterator {
+ return original.NewInterfaceListResultIterator(page)
+}
+func NewInterfaceListResultPage(cur InterfaceListResult, getNextPage func(context.Context, InterfaceListResult) (InterfaceListResult, error)) InterfaceListResultPage {
+ return original.NewInterfaceListResultPage(cur, getNextPage)
+}
+func NewInterfaceLoadBalancerListResultIterator(page InterfaceLoadBalancerListResultPage) InterfaceLoadBalancerListResultIterator {
+ return original.NewInterfaceLoadBalancerListResultIterator(page)
+}
+func NewInterfaceLoadBalancerListResultPage(cur InterfaceLoadBalancerListResult, getNextPage func(context.Context, InterfaceLoadBalancerListResult) (InterfaceLoadBalancerListResult, error)) InterfaceLoadBalancerListResultPage {
+ return original.NewInterfaceLoadBalancerListResultPage(cur, getNextPage)
+}
+func NewInterfaceLoadBalancersClient(subscriptionID string) InterfaceLoadBalancersClient {
+ return original.NewInterfaceLoadBalancersClient(subscriptionID)
+}
+func NewInterfaceLoadBalancersClientWithBaseURI(baseURI string, subscriptionID string) InterfaceLoadBalancersClient {
+ return original.NewInterfaceLoadBalancersClientWithBaseURI(baseURI, subscriptionID)
+}
+func NewInterfacesClient(subscriptionID string) InterfacesClient {
+ return original.NewInterfacesClient(subscriptionID)
+}
+func NewInterfacesClientWithBaseURI(baseURI string, subscriptionID string) InterfacesClient {
+ return original.NewInterfacesClientWithBaseURI(baseURI, subscriptionID)
+}
+func NewLoadBalancerBackendAddressPoolListResultIterator(page LoadBalancerBackendAddressPoolListResultPage) LoadBalancerBackendAddressPoolListResultIterator {
+ return original.NewLoadBalancerBackendAddressPoolListResultIterator(page)
+}
+func NewLoadBalancerBackendAddressPoolListResultPage(cur LoadBalancerBackendAddressPoolListResult, getNextPage func(context.Context, LoadBalancerBackendAddressPoolListResult) (LoadBalancerBackendAddressPoolListResult, error)) LoadBalancerBackendAddressPoolListResultPage {
+ return original.NewLoadBalancerBackendAddressPoolListResultPage(cur, getNextPage)
+}
+func NewLoadBalancerBackendAddressPoolsClient(subscriptionID string) LoadBalancerBackendAddressPoolsClient {
+ return original.NewLoadBalancerBackendAddressPoolsClient(subscriptionID)
+}
+func NewLoadBalancerBackendAddressPoolsClientWithBaseURI(baseURI string, subscriptionID string) LoadBalancerBackendAddressPoolsClient {
+ return original.NewLoadBalancerBackendAddressPoolsClientWithBaseURI(baseURI, subscriptionID)
+}
+func NewLoadBalancerFrontendIPConfigurationListResultIterator(page LoadBalancerFrontendIPConfigurationListResultPage) LoadBalancerFrontendIPConfigurationListResultIterator {
+ return original.NewLoadBalancerFrontendIPConfigurationListResultIterator(page)
+}
+func NewLoadBalancerFrontendIPConfigurationListResultPage(cur LoadBalancerFrontendIPConfigurationListResult, getNextPage func(context.Context, LoadBalancerFrontendIPConfigurationListResult) (LoadBalancerFrontendIPConfigurationListResult, error)) LoadBalancerFrontendIPConfigurationListResultPage {
+ return original.NewLoadBalancerFrontendIPConfigurationListResultPage(cur, getNextPage)
+}
+func NewLoadBalancerFrontendIPConfigurationsClient(subscriptionID string) LoadBalancerFrontendIPConfigurationsClient {
+ return original.NewLoadBalancerFrontendIPConfigurationsClient(subscriptionID)
+}
+func NewLoadBalancerFrontendIPConfigurationsClientWithBaseURI(baseURI string, subscriptionID string) LoadBalancerFrontendIPConfigurationsClient {
+ return original.NewLoadBalancerFrontendIPConfigurationsClientWithBaseURI(baseURI, subscriptionID)
+}
+func NewLoadBalancerListResultIterator(page LoadBalancerListResultPage) LoadBalancerListResultIterator {
+ return original.NewLoadBalancerListResultIterator(page)
+}
+func NewLoadBalancerListResultPage(cur LoadBalancerListResult, getNextPage func(context.Context, LoadBalancerListResult) (LoadBalancerListResult, error)) LoadBalancerListResultPage {
+ return original.NewLoadBalancerListResultPage(cur, getNextPage)
+}
+func NewLoadBalancerLoadBalancingRuleListResultIterator(page LoadBalancerLoadBalancingRuleListResultPage) LoadBalancerLoadBalancingRuleListResultIterator {
+ return original.NewLoadBalancerLoadBalancingRuleListResultIterator(page)
+}
+func NewLoadBalancerLoadBalancingRuleListResultPage(cur LoadBalancerLoadBalancingRuleListResult, getNextPage func(context.Context, LoadBalancerLoadBalancingRuleListResult) (LoadBalancerLoadBalancingRuleListResult, error)) LoadBalancerLoadBalancingRuleListResultPage {
+ return original.NewLoadBalancerLoadBalancingRuleListResultPage(cur, getNextPage)
+}
+func NewLoadBalancerLoadBalancingRulesClient(subscriptionID string) LoadBalancerLoadBalancingRulesClient {
+ return original.NewLoadBalancerLoadBalancingRulesClient(subscriptionID)
+}
+func NewLoadBalancerLoadBalancingRulesClientWithBaseURI(baseURI string, subscriptionID string) LoadBalancerLoadBalancingRulesClient {
+ return original.NewLoadBalancerLoadBalancingRulesClientWithBaseURI(baseURI, subscriptionID)
+}
+func NewLoadBalancerNetworkInterfacesClient(subscriptionID string) LoadBalancerNetworkInterfacesClient {
+ return original.NewLoadBalancerNetworkInterfacesClient(subscriptionID)
+}
+func NewLoadBalancerNetworkInterfacesClientWithBaseURI(baseURI string, subscriptionID string) LoadBalancerNetworkInterfacesClient {
+ return original.NewLoadBalancerNetworkInterfacesClientWithBaseURI(baseURI, subscriptionID)
+}
+func NewLoadBalancerProbeListResultIterator(page LoadBalancerProbeListResultPage) LoadBalancerProbeListResultIterator {
+ return original.NewLoadBalancerProbeListResultIterator(page)
+}
+func NewLoadBalancerProbeListResultPage(cur LoadBalancerProbeListResult, getNextPage func(context.Context, LoadBalancerProbeListResult) (LoadBalancerProbeListResult, error)) LoadBalancerProbeListResultPage {
+ return original.NewLoadBalancerProbeListResultPage(cur, getNextPage)
+}
+func NewLoadBalancerProbesClient(subscriptionID string) LoadBalancerProbesClient {
+ return original.NewLoadBalancerProbesClient(subscriptionID)
+}
+func NewLoadBalancerProbesClientWithBaseURI(baseURI string, subscriptionID string) LoadBalancerProbesClient {
+ return original.NewLoadBalancerProbesClientWithBaseURI(baseURI, subscriptionID)
+}
+func NewLoadBalancersClient(subscriptionID string) LoadBalancersClient {
+ return original.NewLoadBalancersClient(subscriptionID)
+}
+func NewLoadBalancersClientWithBaseURI(baseURI string, subscriptionID string) LoadBalancersClient {
+ return original.NewLoadBalancersClientWithBaseURI(baseURI, subscriptionID)
+}
+func NewLocalNetworkGatewayListResultIterator(page LocalNetworkGatewayListResultPage) LocalNetworkGatewayListResultIterator {
+ return original.NewLocalNetworkGatewayListResultIterator(page)
+}
+func NewLocalNetworkGatewayListResultPage(cur LocalNetworkGatewayListResult, getNextPage func(context.Context, LocalNetworkGatewayListResult) (LocalNetworkGatewayListResult, error)) LocalNetworkGatewayListResultPage {
+ return original.NewLocalNetworkGatewayListResultPage(cur, getNextPage)
+}
+func NewLocalNetworkGatewaysClient(subscriptionID string) LocalNetworkGatewaysClient {
+ return original.NewLocalNetworkGatewaysClient(subscriptionID)
+}
+func NewLocalNetworkGatewaysClientWithBaseURI(baseURI string, subscriptionID string) LocalNetworkGatewaysClient {
+ return original.NewLocalNetworkGatewaysClientWithBaseURI(baseURI, subscriptionID)
+}
+func NewOperationListResultIterator(page OperationListResultPage) OperationListResultIterator {
+ return original.NewOperationListResultIterator(page)
+}
+func NewOperationListResultPage(cur OperationListResult, getNextPage func(context.Context, OperationListResult) (OperationListResult, error)) OperationListResultPage {
+ return original.NewOperationListResultPage(cur, getNextPage)
+}
+func NewOperationsClient(subscriptionID string) OperationsClient {
+ return original.NewOperationsClient(subscriptionID)
+}
+func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) OperationsClient {
+ return original.NewOperationsClientWithBaseURI(baseURI, subscriptionID)
+}
+func NewPacketCapturesClient(subscriptionID string) PacketCapturesClient {
+ return original.NewPacketCapturesClient(subscriptionID)
+}
+func NewPacketCapturesClientWithBaseURI(baseURI string, subscriptionID string) PacketCapturesClient {
+ return original.NewPacketCapturesClientWithBaseURI(baseURI, subscriptionID)
+}
+func NewPublicIPAddressListResultIterator(page PublicIPAddressListResultPage) PublicIPAddressListResultIterator {
+ return original.NewPublicIPAddressListResultIterator(page)
+}
+func NewPublicIPAddressListResultPage(cur PublicIPAddressListResult, getNextPage func(context.Context, PublicIPAddressListResult) (PublicIPAddressListResult, error)) PublicIPAddressListResultPage {
+ return original.NewPublicIPAddressListResultPage(cur, getNextPage)
+}
+func NewPublicIPAddressesClient(subscriptionID string) PublicIPAddressesClient {
+ return original.NewPublicIPAddressesClient(subscriptionID)
+}
+func NewPublicIPAddressesClientWithBaseURI(baseURI string, subscriptionID string) PublicIPAddressesClient {
+ return original.NewPublicIPAddressesClientWithBaseURI(baseURI, subscriptionID)
+}
+func NewRouteFilterListResultIterator(page RouteFilterListResultPage) RouteFilterListResultIterator {
+ return original.NewRouteFilterListResultIterator(page)
+}
+func NewRouteFilterListResultPage(cur RouteFilterListResult, getNextPage func(context.Context, RouteFilterListResult) (RouteFilterListResult, error)) RouteFilterListResultPage {
+ return original.NewRouteFilterListResultPage(cur, getNextPage)
+}
+func NewRouteFilterRuleListResultIterator(page RouteFilterRuleListResultPage) RouteFilterRuleListResultIterator {
+ return original.NewRouteFilterRuleListResultIterator(page)
+}
+func NewRouteFilterRuleListResultPage(cur RouteFilterRuleListResult, getNextPage func(context.Context, RouteFilterRuleListResult) (RouteFilterRuleListResult, error)) RouteFilterRuleListResultPage {
+ return original.NewRouteFilterRuleListResultPage(cur, getNextPage)
+}
+func NewRouteFilterRulesClient(subscriptionID string) RouteFilterRulesClient {
+ return original.NewRouteFilterRulesClient(subscriptionID)
+}
+func NewRouteFilterRulesClientWithBaseURI(baseURI string, subscriptionID string) RouteFilterRulesClient {
+ return original.NewRouteFilterRulesClientWithBaseURI(baseURI, subscriptionID)
+}
+func NewRouteFiltersClient(subscriptionID string) RouteFiltersClient {
+ return original.NewRouteFiltersClient(subscriptionID)
+}
+func NewRouteFiltersClientWithBaseURI(baseURI string, subscriptionID string) RouteFiltersClient {
+ return original.NewRouteFiltersClientWithBaseURI(baseURI, subscriptionID)
+}
+func NewRouteListResultIterator(page RouteListResultPage) RouteListResultIterator {
+ return original.NewRouteListResultIterator(page)
+}
+func NewRouteListResultPage(cur RouteListResult, getNextPage func(context.Context, RouteListResult) (RouteListResult, error)) RouteListResultPage {
+ return original.NewRouteListResultPage(cur, getNextPage)
+}
+func NewRouteTableListResultIterator(page RouteTableListResultPage) RouteTableListResultIterator {
+ return original.NewRouteTableListResultIterator(page)
+}
+func NewRouteTableListResultPage(cur RouteTableListResult, getNextPage func(context.Context, RouteTableListResult) (RouteTableListResult, error)) RouteTableListResultPage {
+ return original.NewRouteTableListResultPage(cur, getNextPage)
+}
+func NewRouteTablesClient(subscriptionID string) RouteTablesClient {
+ return original.NewRouteTablesClient(subscriptionID)
+}
+func NewRouteTablesClientWithBaseURI(baseURI string, subscriptionID string) RouteTablesClient {
+ return original.NewRouteTablesClientWithBaseURI(baseURI, subscriptionID)
+}
+func NewRoutesClient(subscriptionID string) RoutesClient {
+ return original.NewRoutesClient(subscriptionID)
+}
+func NewRoutesClientWithBaseURI(baseURI string, subscriptionID string) RoutesClient {
+ return original.NewRoutesClientWithBaseURI(baseURI, subscriptionID)
+}
+func NewSecurityGroupListResultIterator(page SecurityGroupListResultPage) SecurityGroupListResultIterator {
+ return original.NewSecurityGroupListResultIterator(page)
+}
+func NewSecurityGroupListResultPage(cur SecurityGroupListResult, getNextPage func(context.Context, SecurityGroupListResult) (SecurityGroupListResult, error)) SecurityGroupListResultPage {
+ return original.NewSecurityGroupListResultPage(cur, getNextPage)
+}
+func NewSecurityGroupsClient(subscriptionID string) SecurityGroupsClient {
+ return original.NewSecurityGroupsClient(subscriptionID)
+}
+func NewSecurityGroupsClientWithBaseURI(baseURI string, subscriptionID string) SecurityGroupsClient {
+ return original.NewSecurityGroupsClientWithBaseURI(baseURI, subscriptionID)
+}
+func NewSecurityRuleListResultIterator(page SecurityRuleListResultPage) SecurityRuleListResultIterator {
+ return original.NewSecurityRuleListResultIterator(page)
+}
+func NewSecurityRuleListResultPage(cur SecurityRuleListResult, getNextPage func(context.Context, SecurityRuleListResult) (SecurityRuleListResult, error)) SecurityRuleListResultPage {
+ return original.NewSecurityRuleListResultPage(cur, getNextPage)
+}
+func NewSecurityRulesClient(subscriptionID string) SecurityRulesClient {
+ return original.NewSecurityRulesClient(subscriptionID)
+}
+func NewSecurityRulesClientWithBaseURI(baseURI string, subscriptionID string) SecurityRulesClient {
+ return original.NewSecurityRulesClientWithBaseURI(baseURI, subscriptionID)
+}
+func NewSubnetListResultIterator(page SubnetListResultPage) SubnetListResultIterator {
+ return original.NewSubnetListResultIterator(page)
+}
+func NewSubnetListResultPage(cur SubnetListResult, getNextPage func(context.Context, SubnetListResult) (SubnetListResult, error)) SubnetListResultPage {
+ return original.NewSubnetListResultPage(cur, getNextPage)
+}
+func NewSubnetsClient(subscriptionID string) SubnetsClient {
+ return original.NewSubnetsClient(subscriptionID)
+}
+func NewSubnetsClientWithBaseURI(baseURI string, subscriptionID string) SubnetsClient {
+ return original.NewSubnetsClientWithBaseURI(baseURI, subscriptionID)
+}
+func NewUsagesClient(subscriptionID string) UsagesClient {
+ return original.NewUsagesClient(subscriptionID)
+}
+func NewUsagesClientWithBaseURI(baseURI string, subscriptionID string) UsagesClient {
+ return original.NewUsagesClientWithBaseURI(baseURI, subscriptionID)
+}
+func NewUsagesListResultIterator(page UsagesListResultPage) UsagesListResultIterator {
+ return original.NewUsagesListResultIterator(page)
+}
+func NewUsagesListResultPage(cur UsagesListResult, getNextPage func(context.Context, UsagesListResult) (UsagesListResult, error)) UsagesListResultPage {
+ return original.NewUsagesListResultPage(cur, getNextPage)
+}
+func NewVirtualNetworkGatewayConnectionListResultIterator(page VirtualNetworkGatewayConnectionListResultPage) VirtualNetworkGatewayConnectionListResultIterator {
+ return original.NewVirtualNetworkGatewayConnectionListResultIterator(page)
+}
+func NewVirtualNetworkGatewayConnectionListResultPage(cur VirtualNetworkGatewayConnectionListResult, getNextPage func(context.Context, VirtualNetworkGatewayConnectionListResult) (VirtualNetworkGatewayConnectionListResult, error)) VirtualNetworkGatewayConnectionListResultPage {
+ return original.NewVirtualNetworkGatewayConnectionListResultPage(cur, getNextPage)
+}
+func NewVirtualNetworkGatewayConnectionsClient(subscriptionID string) VirtualNetworkGatewayConnectionsClient {
+ return original.NewVirtualNetworkGatewayConnectionsClient(subscriptionID)
+}
+func NewVirtualNetworkGatewayConnectionsClientWithBaseURI(baseURI string, subscriptionID string) VirtualNetworkGatewayConnectionsClient {
+ return original.NewVirtualNetworkGatewayConnectionsClientWithBaseURI(baseURI, subscriptionID)
+}
+func NewVirtualNetworkGatewayListConnectionsResultIterator(page VirtualNetworkGatewayListConnectionsResultPage) VirtualNetworkGatewayListConnectionsResultIterator {
+ return original.NewVirtualNetworkGatewayListConnectionsResultIterator(page)
+}
+func NewVirtualNetworkGatewayListConnectionsResultPage(cur VirtualNetworkGatewayListConnectionsResult, getNextPage func(context.Context, VirtualNetworkGatewayListConnectionsResult) (VirtualNetworkGatewayListConnectionsResult, error)) VirtualNetworkGatewayListConnectionsResultPage {
+ return original.NewVirtualNetworkGatewayListConnectionsResultPage(cur, getNextPage)
+}
+func NewVirtualNetworkGatewayListResultIterator(page VirtualNetworkGatewayListResultPage) VirtualNetworkGatewayListResultIterator {
+ return original.NewVirtualNetworkGatewayListResultIterator(page)
+}
+func NewVirtualNetworkGatewayListResultPage(cur VirtualNetworkGatewayListResult, getNextPage func(context.Context, VirtualNetworkGatewayListResult) (VirtualNetworkGatewayListResult, error)) VirtualNetworkGatewayListResultPage {
+ return original.NewVirtualNetworkGatewayListResultPage(cur, getNextPage)
+}
+func NewVirtualNetworkGatewaysClient(subscriptionID string) VirtualNetworkGatewaysClient {
+ return original.NewVirtualNetworkGatewaysClient(subscriptionID)
+}
+func NewVirtualNetworkGatewaysClientWithBaseURI(baseURI string, subscriptionID string) VirtualNetworkGatewaysClient {
+ return original.NewVirtualNetworkGatewaysClientWithBaseURI(baseURI, subscriptionID)
+}
+func NewVirtualNetworkListResultIterator(page VirtualNetworkListResultPage) VirtualNetworkListResultIterator {
+ return original.NewVirtualNetworkListResultIterator(page)
+}
+func NewVirtualNetworkListResultPage(cur VirtualNetworkListResult, getNextPage func(context.Context, VirtualNetworkListResult) (VirtualNetworkListResult, error)) VirtualNetworkListResultPage {
+ return original.NewVirtualNetworkListResultPage(cur, getNextPage)
+}
+func NewVirtualNetworkListUsageResultIterator(page VirtualNetworkListUsageResultPage) VirtualNetworkListUsageResultIterator {
+ return original.NewVirtualNetworkListUsageResultIterator(page)
+}
+func NewVirtualNetworkListUsageResultPage(cur VirtualNetworkListUsageResult, getNextPage func(context.Context, VirtualNetworkListUsageResult) (VirtualNetworkListUsageResult, error)) VirtualNetworkListUsageResultPage {
+ return original.NewVirtualNetworkListUsageResultPage(cur, getNextPage)
+}
+func NewVirtualNetworkPeeringListResultIterator(page VirtualNetworkPeeringListResultPage) VirtualNetworkPeeringListResultIterator {
+ return original.NewVirtualNetworkPeeringListResultIterator(page)
+}
+func NewVirtualNetworkPeeringListResultPage(cur VirtualNetworkPeeringListResult, getNextPage func(context.Context, VirtualNetworkPeeringListResult) (VirtualNetworkPeeringListResult, error)) VirtualNetworkPeeringListResultPage {
+ return original.NewVirtualNetworkPeeringListResultPage(cur, getNextPage)
+}
+func NewVirtualNetworkPeeringsClient(subscriptionID string) VirtualNetworkPeeringsClient {
+ return original.NewVirtualNetworkPeeringsClient(subscriptionID)
+}
+func NewVirtualNetworkPeeringsClientWithBaseURI(baseURI string, subscriptionID string) VirtualNetworkPeeringsClient {
+ return original.NewVirtualNetworkPeeringsClientWithBaseURI(baseURI, subscriptionID)
+}
+func NewVirtualNetworksClient(subscriptionID string) VirtualNetworksClient {
+ return original.NewVirtualNetworksClient(subscriptionID)
+}
+func NewVirtualNetworksClientWithBaseURI(baseURI string, subscriptionID string) VirtualNetworksClient {
+ return original.NewVirtualNetworksClientWithBaseURI(baseURI, subscriptionID)
+}
+func NewWatchersClient(subscriptionID string) WatchersClient {
+ return original.NewWatchersClient(subscriptionID)
+}
+func NewWatchersClientWithBaseURI(baseURI string, subscriptionID string) WatchersClient {
+ return original.NewWatchersClientWithBaseURI(baseURI, subscriptionID)
+}
+func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient {
+ return original.NewWithBaseURI(baseURI, subscriptionID)
+}
+func PossibleAccessValues() []Access {
+ return original.PossibleAccessValues()
+}
+func PossibleApplicationGatewayBackendHealthServerHealthValues() []ApplicationGatewayBackendHealthServerHealth {
+ return original.PossibleApplicationGatewayBackendHealthServerHealthValues()
+}
+func PossibleApplicationGatewayCookieBasedAffinityValues() []ApplicationGatewayCookieBasedAffinity {
+ return original.PossibleApplicationGatewayCookieBasedAffinityValues()
+}
+func PossibleApplicationGatewayFirewallModeValues() []ApplicationGatewayFirewallMode {
+ return original.PossibleApplicationGatewayFirewallModeValues()
+}
+func PossibleApplicationGatewayOperationalStateValues() []ApplicationGatewayOperationalState {
+ return original.PossibleApplicationGatewayOperationalStateValues()
+}
+func PossibleApplicationGatewayProtocolValues() []ApplicationGatewayProtocol {
+ return original.PossibleApplicationGatewayProtocolValues()
+}
+func PossibleApplicationGatewayRedirectTypeValues() []ApplicationGatewayRedirectType {
+ return original.PossibleApplicationGatewayRedirectTypeValues()
+}
+func PossibleApplicationGatewayRequestRoutingRuleTypeValues() []ApplicationGatewayRequestRoutingRuleType {
+ return original.PossibleApplicationGatewayRequestRoutingRuleTypeValues()
+}
+func PossibleApplicationGatewaySkuNameValues() []ApplicationGatewaySkuName {
+ return original.PossibleApplicationGatewaySkuNameValues()
+}
+func PossibleApplicationGatewaySslCipherSuiteValues() []ApplicationGatewaySslCipherSuite {
+ return original.PossibleApplicationGatewaySslCipherSuiteValues()
+}
+func PossibleApplicationGatewaySslPolicyNameValues() []ApplicationGatewaySslPolicyName {
+ return original.PossibleApplicationGatewaySslPolicyNameValues()
+}
+func PossibleApplicationGatewaySslPolicyTypeValues() []ApplicationGatewaySslPolicyType {
+ return original.PossibleApplicationGatewaySslPolicyTypeValues()
+}
+func PossibleApplicationGatewaySslProtocolValues() []ApplicationGatewaySslProtocol {
+ return original.PossibleApplicationGatewaySslProtocolValues()
+}
+func PossibleApplicationGatewayTierValues() []ApplicationGatewayTier {
+ return original.PossibleApplicationGatewayTierValues()
+}
+func PossibleAssociationTypeValues() []AssociationType {
+ return original.PossibleAssociationTypeValues()
+}
+func PossibleAuthenticationMethodValues() []AuthenticationMethod {
+ return original.PossibleAuthenticationMethodValues()
+}
+func PossibleAuthorizationUseStatusValues() []AuthorizationUseStatus {
+ return original.PossibleAuthorizationUseStatusValues()
+}
+func PossibleBgpPeerStateValues() []BgpPeerState {
+ return original.PossibleBgpPeerStateValues()
+}
+func PossibleConnectionStateValues() []ConnectionState {
+ return original.PossibleConnectionStateValues()
+}
+func PossibleConnectionStatusValues() []ConnectionStatus {
+ return original.PossibleConnectionStatusValues()
+}
+func PossibleDhGroupValues() []DhGroup {
+ return original.PossibleDhGroupValues()
+}
+func PossibleDirectionValues() []Direction {
+ return original.PossibleDirectionValues()
+}
+func PossibleEffectiveRouteSourceValues() []EffectiveRouteSource {
+ return original.PossibleEffectiveRouteSourceValues()
+}
+func PossibleEffectiveRouteStateValues() []EffectiveRouteState {
+ return original.PossibleEffectiveRouteStateValues()
+}
+func PossibleEffectiveSecurityRuleProtocolValues() []EffectiveSecurityRuleProtocol {
+ return original.PossibleEffectiveSecurityRuleProtocolValues()
+}
+func PossibleEvaluationStateValues() []EvaluationState {
+ return original.PossibleEvaluationStateValues()
+}
+func PossibleExpressRouteCircuitPeeringAdvertisedPublicPrefixStateValues() []ExpressRouteCircuitPeeringAdvertisedPublicPrefixState {
+ return original.PossibleExpressRouteCircuitPeeringAdvertisedPublicPrefixStateValues()
+}
+func PossibleExpressRouteCircuitPeeringStateValues() []ExpressRouteCircuitPeeringState {
+ return original.PossibleExpressRouteCircuitPeeringStateValues()
+}
+func PossibleExpressRouteCircuitPeeringTypeValues() []ExpressRouteCircuitPeeringType {
+ return original.PossibleExpressRouteCircuitPeeringTypeValues()
+}
+func PossibleExpressRouteCircuitSkuFamilyValues() []ExpressRouteCircuitSkuFamily {
+ return original.PossibleExpressRouteCircuitSkuFamilyValues()
+}
+func PossibleExpressRouteCircuitSkuTierValues() []ExpressRouteCircuitSkuTier {
+ return original.PossibleExpressRouteCircuitSkuTierValues()
+}
+func PossibleIPAllocationMethodValues() []IPAllocationMethod {
+ return original.PossibleIPAllocationMethodValues()
+}
+func PossibleIPVersionValues() []IPVersion {
+ return original.PossibleIPVersionValues()
+}
+func PossibleIkeEncryptionValues() []IkeEncryption {
+ return original.PossibleIkeEncryptionValues()
+}
+func PossibleIkeIntegrityValues() []IkeIntegrity {
+ return original.PossibleIkeIntegrityValues()
+}
+func PossibleIpsecEncryptionValues() []IpsecEncryption {
+ return original.PossibleIpsecEncryptionValues()
+}
+func PossibleIpsecIntegrityValues() []IpsecIntegrity {
+ return original.PossibleIpsecIntegrityValues()
+}
+func PossibleIssueTypeValues() []IssueType {
+ return original.PossibleIssueTypeValues()
+}
+func PossibleLoadBalancerSkuNameValues() []LoadBalancerSkuName {
+ return original.PossibleLoadBalancerSkuNameValues()
+}
+func PossibleLoadDistributionValues() []LoadDistribution {
+ return original.PossibleLoadDistributionValues()
+}
+func PossibleNextHopTypeValues() []NextHopType {
+ return original.PossibleNextHopTypeValues()
+}
+func PossibleOperationStatusValues() []OperationStatus {
+ return original.PossibleOperationStatusValues()
+}
+func PossibleOriginValues() []Origin {
+ return original.PossibleOriginValues()
+}
+func PossiblePcErrorValues() []PcError {
+ return original.PossiblePcErrorValues()
+}
+func PossiblePcProtocolValues() []PcProtocol {
+ return original.PossiblePcProtocolValues()
+}
+func PossiblePcStatusValues() []PcStatus {
+ return original.PossiblePcStatusValues()
+}
+func PossiblePfsGroupValues() []PfsGroup {
+ return original.PossiblePfsGroupValues()
+}
+func PossibleProbeProtocolValues() []ProbeProtocol {
+ return original.PossibleProbeProtocolValues()
+}
+func PossibleProcessorArchitectureValues() []ProcessorArchitecture {
+ return original.PossibleProcessorArchitectureValues()
+}
+func PossibleProtocolValues() []Protocol {
+ return original.PossibleProtocolValues()
+}
+func PossibleProvisioningStateValues() []ProvisioningState {
+ return original.PossibleProvisioningStateValues()
+}
+func PossiblePublicIPAddressSkuNameValues() []PublicIPAddressSkuName {
+ return original.PossiblePublicIPAddressSkuNameValues()
+}
+func PossibleRouteNextHopTypeValues() []RouteNextHopType {
+ return original.PossibleRouteNextHopTypeValues()
+}
+func PossibleSecurityRuleAccessValues() []SecurityRuleAccess {
+ return original.PossibleSecurityRuleAccessValues()
+}
+func PossibleSecurityRuleDirectionValues() []SecurityRuleDirection {
+ return original.PossibleSecurityRuleDirectionValues()
+}
+func PossibleSecurityRuleProtocolValues() []SecurityRuleProtocol {
+ return original.PossibleSecurityRuleProtocolValues()
+}
+func PossibleServiceProviderProvisioningStateValues() []ServiceProviderProvisioningState {
+ return original.PossibleServiceProviderProvisioningStateValues()
+}
+func PossibleSeverityValues() []Severity {
+ return original.PossibleSeverityValues()
+}
+func PossibleTransportProtocolValues() []TransportProtocol {
+ return original.PossibleTransportProtocolValues()
+}
+func PossibleVirtualNetworkGatewayConnectionStatusValues() []VirtualNetworkGatewayConnectionStatus {
+ return original.PossibleVirtualNetworkGatewayConnectionStatusValues()
+}
+func PossibleVirtualNetworkGatewayConnectionTypeValues() []VirtualNetworkGatewayConnectionType {
+ return original.PossibleVirtualNetworkGatewayConnectionTypeValues()
+}
+func PossibleVirtualNetworkGatewaySkuNameValues() []VirtualNetworkGatewaySkuName {
+ return original.PossibleVirtualNetworkGatewaySkuNameValues()
+}
+func PossibleVirtualNetworkGatewaySkuTierValues() []VirtualNetworkGatewaySkuTier {
+ return original.PossibleVirtualNetworkGatewaySkuTierValues()
+}
+func PossibleVirtualNetworkGatewayTypeValues() []VirtualNetworkGatewayType {
+ return original.PossibleVirtualNetworkGatewayTypeValues()
+}
+func PossibleVirtualNetworkPeeringStateValues() []VirtualNetworkPeeringState {
+ return original.PossibleVirtualNetworkPeeringStateValues()
+}
+func PossibleVpnClientProtocolValues() []VpnClientProtocol {
+ return original.PossibleVpnClientProtocolValues()
+}
+func PossibleVpnTypeValues() []VpnType {
+ return original.PossibleVpnTypeValues()
+}
+func UserAgent() string {
+ return original.UserAgent() + " profiles/2018-03-01"
+}
+func Version() string {
+ return original.Version()
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/profiles/2018-03-01/resources/mgmt/resources/models.go b/vendor/github.com/Azure/azure-sdk-for-go/profiles/2018-03-01/resources/mgmt/resources/models.go
new file mode 100644
index 00000000000..d254810f6f3
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/profiles/2018-03-01/resources/mgmt/resources/models.go
@@ -0,0 +1,230 @@
+// +build go1.9
+
+// Copyright 2021 Microsoft Corporation
+//
+// 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.
+
+// This code was auto-generated by:
+// github.com/Azure/azure-sdk-for-go/tools/profileBuilder
+
+package resources
+
+import (
+ "context"
+
+ original "github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-02-01/resources"
+)
+
+const (
+ DefaultBaseURI = original.DefaultBaseURI
+)
+
+type DeploymentMode = original.DeploymentMode
+
+const (
+ Complete DeploymentMode = original.Complete
+ Incremental DeploymentMode = original.Incremental
+)
+
+type OnErrorDeploymentType = original.OnErrorDeploymentType
+
+const (
+ LastSuccessful OnErrorDeploymentType = original.LastSuccessful
+ SpecificDeployment OnErrorDeploymentType = original.SpecificDeployment
+)
+
+type ResourceIdentityType = original.ResourceIdentityType
+
+const (
+ None ResourceIdentityType = original.None
+ SystemAssigned ResourceIdentityType = original.SystemAssigned
+ SystemAssignedUserAssigned ResourceIdentityType = original.SystemAssignedUserAssigned
+ UserAssigned ResourceIdentityType = original.UserAssigned
+)
+
+type AliasPathType = original.AliasPathType
+type AliasType = original.AliasType
+type BaseClient = original.BaseClient
+type BasicDependency = original.BasicDependency
+type Client = original.Client
+type CloudError = original.CloudError
+type CreateOrUpdateByIDFuture = original.CreateOrUpdateByIDFuture
+type CreateOrUpdateFuture = original.CreateOrUpdateFuture
+type DebugSetting = original.DebugSetting
+type DeleteByIDFuture = original.DeleteByIDFuture
+type DeleteFuture = original.DeleteFuture
+type Dependency = original.Dependency
+type Deployment = original.Deployment
+type DeploymentExportResult = original.DeploymentExportResult
+type DeploymentExtended = original.DeploymentExtended
+type DeploymentExtendedFilter = original.DeploymentExtendedFilter
+type DeploymentListResult = original.DeploymentListResult
+type DeploymentListResultIterator = original.DeploymentListResultIterator
+type DeploymentListResultPage = original.DeploymentListResultPage
+type DeploymentOperation = original.DeploymentOperation
+type DeploymentOperationProperties = original.DeploymentOperationProperties
+type DeploymentOperationsClient = original.DeploymentOperationsClient
+type DeploymentOperationsListResult = original.DeploymentOperationsListResult
+type DeploymentOperationsListResultIterator = original.DeploymentOperationsListResultIterator
+type DeploymentOperationsListResultPage = original.DeploymentOperationsListResultPage
+type DeploymentProperties = original.DeploymentProperties
+type DeploymentPropertiesExtended = original.DeploymentPropertiesExtended
+type DeploymentValidateResult = original.DeploymentValidateResult
+type DeploymentsClient = original.DeploymentsClient
+type DeploymentsCreateOrUpdateFuture = original.DeploymentsCreateOrUpdateFuture
+type DeploymentsDeleteFuture = original.DeploymentsDeleteFuture
+type ErrorAdditionalInfo = original.ErrorAdditionalInfo
+type ErrorResponse = original.ErrorResponse
+type ExportTemplateRequest = original.ExportTemplateRequest
+type GenericResource = original.GenericResource
+type GenericResourceExpanded = original.GenericResourceExpanded
+type GenericResourceFilter = original.GenericResourceFilter
+type Group = original.Group
+type GroupExportResult = original.GroupExportResult
+type GroupFilter = original.GroupFilter
+type GroupListResult = original.GroupListResult
+type GroupListResultIterator = original.GroupListResultIterator
+type GroupListResultPage = original.GroupListResultPage
+type GroupPatchable = original.GroupPatchable
+type GroupProperties = original.GroupProperties
+type GroupsClient = original.GroupsClient
+type GroupsDeleteFuture = original.GroupsDeleteFuture
+type HTTPMessage = original.HTTPMessage
+type Identity = original.Identity
+type ListResult = original.ListResult
+type ListResultIterator = original.ListResultIterator
+type ListResultPage = original.ListResultPage
+type ManagementErrorWithDetails = original.ManagementErrorWithDetails
+type MoveInfo = original.MoveInfo
+type MoveResourcesFuture = original.MoveResourcesFuture
+type OnErrorDeployment = original.OnErrorDeployment
+type OnErrorDeploymentExtended = original.OnErrorDeploymentExtended
+type ParametersLink = original.ParametersLink
+type Plan = original.Plan
+type Provider = original.Provider
+type ProviderListResult = original.ProviderListResult
+type ProviderListResultIterator = original.ProviderListResultIterator
+type ProviderListResultPage = original.ProviderListResultPage
+type ProviderOperationDisplayProperties = original.ProviderOperationDisplayProperties
+type ProviderResourceType = original.ProviderResourceType
+type ProvidersClient = original.ProvidersClient
+type Resource = original.Resource
+type Sku = original.Sku
+type SubResource = original.SubResource
+type TagCount = original.TagCount
+type TagDetails = original.TagDetails
+type TagValue = original.TagValue
+type TagsClient = original.TagsClient
+type TagsListResult = original.TagsListResult
+type TagsListResultIterator = original.TagsListResultIterator
+type TagsListResultPage = original.TagsListResultPage
+type TargetResource = original.TargetResource
+type TemplateHashResult = original.TemplateHashResult
+type TemplateLink = original.TemplateLink
+type UpdateByIDFuture = original.UpdateByIDFuture
+type UpdateFuture = original.UpdateFuture
+type ValidateMoveResourcesFuture = original.ValidateMoveResourcesFuture
+
+func New(subscriptionID string) BaseClient {
+ return original.New(subscriptionID)
+}
+func NewClient(subscriptionID string) Client {
+ return original.NewClient(subscriptionID)
+}
+func NewClientWithBaseURI(baseURI string, subscriptionID string) Client {
+ return original.NewClientWithBaseURI(baseURI, subscriptionID)
+}
+func NewDeploymentListResultIterator(page DeploymentListResultPage) DeploymentListResultIterator {
+ return original.NewDeploymentListResultIterator(page)
+}
+func NewDeploymentListResultPage(cur DeploymentListResult, getNextPage func(context.Context, DeploymentListResult) (DeploymentListResult, error)) DeploymentListResultPage {
+ return original.NewDeploymentListResultPage(cur, getNextPage)
+}
+func NewDeploymentOperationsClient(subscriptionID string) DeploymentOperationsClient {
+ return original.NewDeploymentOperationsClient(subscriptionID)
+}
+func NewDeploymentOperationsClientWithBaseURI(baseURI string, subscriptionID string) DeploymentOperationsClient {
+ return original.NewDeploymentOperationsClientWithBaseURI(baseURI, subscriptionID)
+}
+func NewDeploymentOperationsListResultIterator(page DeploymentOperationsListResultPage) DeploymentOperationsListResultIterator {
+ return original.NewDeploymentOperationsListResultIterator(page)
+}
+func NewDeploymentOperationsListResultPage(cur DeploymentOperationsListResult, getNextPage func(context.Context, DeploymentOperationsListResult) (DeploymentOperationsListResult, error)) DeploymentOperationsListResultPage {
+ return original.NewDeploymentOperationsListResultPage(cur, getNextPage)
+}
+func NewDeploymentsClient(subscriptionID string) DeploymentsClient {
+ return original.NewDeploymentsClient(subscriptionID)
+}
+func NewDeploymentsClientWithBaseURI(baseURI string, subscriptionID string) DeploymentsClient {
+ return original.NewDeploymentsClientWithBaseURI(baseURI, subscriptionID)
+}
+func NewGroupListResultIterator(page GroupListResultPage) GroupListResultIterator {
+ return original.NewGroupListResultIterator(page)
+}
+func NewGroupListResultPage(cur GroupListResult, getNextPage func(context.Context, GroupListResult) (GroupListResult, error)) GroupListResultPage {
+ return original.NewGroupListResultPage(cur, getNextPage)
+}
+func NewGroupsClient(subscriptionID string) GroupsClient {
+ return original.NewGroupsClient(subscriptionID)
+}
+func NewGroupsClientWithBaseURI(baseURI string, subscriptionID string) GroupsClient {
+ return original.NewGroupsClientWithBaseURI(baseURI, subscriptionID)
+}
+func NewListResultIterator(page ListResultPage) ListResultIterator {
+ return original.NewListResultIterator(page)
+}
+func NewListResultPage(cur ListResult, getNextPage func(context.Context, ListResult) (ListResult, error)) ListResultPage {
+ return original.NewListResultPage(cur, getNextPage)
+}
+func NewProviderListResultIterator(page ProviderListResultPage) ProviderListResultIterator {
+ return original.NewProviderListResultIterator(page)
+}
+func NewProviderListResultPage(cur ProviderListResult, getNextPage func(context.Context, ProviderListResult) (ProviderListResult, error)) ProviderListResultPage {
+ return original.NewProviderListResultPage(cur, getNextPage)
+}
+func NewProvidersClient(subscriptionID string) ProvidersClient {
+ return original.NewProvidersClient(subscriptionID)
+}
+func NewProvidersClientWithBaseURI(baseURI string, subscriptionID string) ProvidersClient {
+ return original.NewProvidersClientWithBaseURI(baseURI, subscriptionID)
+}
+func NewTagsClient(subscriptionID string) TagsClient {
+ return original.NewTagsClient(subscriptionID)
+}
+func NewTagsClientWithBaseURI(baseURI string, subscriptionID string) TagsClient {
+ return original.NewTagsClientWithBaseURI(baseURI, subscriptionID)
+}
+func NewTagsListResultIterator(page TagsListResultPage) TagsListResultIterator {
+ return original.NewTagsListResultIterator(page)
+}
+func NewTagsListResultPage(cur TagsListResult, getNextPage func(context.Context, TagsListResult) (TagsListResult, error)) TagsListResultPage {
+ return original.NewTagsListResultPage(cur, getNextPage)
+}
+func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient {
+ return original.NewWithBaseURI(baseURI, subscriptionID)
+}
+func PossibleDeploymentModeValues() []DeploymentMode {
+ return original.PossibleDeploymentModeValues()
+}
+func PossibleOnErrorDeploymentTypeValues() []OnErrorDeploymentType {
+ return original.PossibleOnErrorDeploymentTypeValues()
+}
+func PossibleResourceIdentityTypeValues() []ResourceIdentityType {
+ return original.PossibleResourceIdentityTypeValues()
+}
+func UserAgent() string {
+ return original.UserAgent() + " profiles/2018-03-01"
+}
+func Version() string {
+ return original.Version()
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/profiles/2018-03-01/resources/mgmt/subscriptions/models.go b/vendor/github.com/Azure/azure-sdk-for-go/profiles/2018-03-01/resources/mgmt/subscriptions/models.go
new file mode 100644
index 00000000000..befa9ecfdc0
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/profiles/2018-03-01/resources/mgmt/subscriptions/models.go
@@ -0,0 +1,138 @@
+// +build go1.9
+
+// Copyright 2021 Microsoft Corporation
+//
+// 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.
+
+// This code was auto-generated by:
+// github.com/Azure/azure-sdk-for-go/tools/profileBuilder
+
+package subscriptions
+
+import (
+ "context"
+
+ original "github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2016-06-01/subscriptions"
+)
+
+const (
+ DefaultBaseURI = original.DefaultBaseURI
+)
+
+type ResourceNameStatus = original.ResourceNameStatus
+
+const (
+ Allowed ResourceNameStatus = original.Allowed
+ Reserved ResourceNameStatus = original.Reserved
+)
+
+type SpendingLimit = original.SpendingLimit
+
+const (
+ CurrentPeriodOff SpendingLimit = original.CurrentPeriodOff
+ Off SpendingLimit = original.Off
+ On SpendingLimit = original.On
+)
+
+type State = original.State
+
+const (
+ Deleted State = original.Deleted
+ Disabled State = original.Disabled
+ Enabled State = original.Enabled
+ PastDue State = original.PastDue
+ Warned State = original.Warned
+)
+
+type BaseClient = original.BaseClient
+type CheckResourceNameResult = original.CheckResourceNameResult
+type Client = original.Client
+type ErrorDefinition = original.ErrorDefinition
+type ErrorResponse = original.ErrorResponse
+type ListResult = original.ListResult
+type ListResultIterator = original.ListResultIterator
+type ListResultPage = original.ListResultPage
+type Location = original.Location
+type LocationListResult = original.LocationListResult
+type Operation = original.Operation
+type OperationDisplay = original.OperationDisplay
+type OperationListResult = original.OperationListResult
+type OperationListResultIterator = original.OperationListResultIterator
+type OperationListResultPage = original.OperationListResultPage
+type OperationsClient = original.OperationsClient
+type Policies = original.Policies
+type ResourceName = original.ResourceName
+type Subscription = original.Subscription
+type TenantIDDescription = original.TenantIDDescription
+type TenantListResult = original.TenantListResult
+type TenantListResultIterator = original.TenantListResultIterator
+type TenantListResultPage = original.TenantListResultPage
+type TenantsClient = original.TenantsClient
+
+func New() BaseClient {
+ return original.New()
+}
+func NewClient() Client {
+ return original.NewClient()
+}
+func NewClientWithBaseURI(baseURI string) Client {
+ return original.NewClientWithBaseURI(baseURI)
+}
+func NewListResultIterator(page ListResultPage) ListResultIterator {
+ return original.NewListResultIterator(page)
+}
+func NewListResultPage(cur ListResult, getNextPage func(context.Context, ListResult) (ListResult, error)) ListResultPage {
+ return original.NewListResultPage(cur, getNextPage)
+}
+func NewOperationListResultIterator(page OperationListResultPage) OperationListResultIterator {
+ return original.NewOperationListResultIterator(page)
+}
+func NewOperationListResultPage(cur OperationListResult, getNextPage func(context.Context, OperationListResult) (OperationListResult, error)) OperationListResultPage {
+ return original.NewOperationListResultPage(cur, getNextPage)
+}
+func NewOperationsClient() OperationsClient {
+ return original.NewOperationsClient()
+}
+func NewOperationsClientWithBaseURI(baseURI string) OperationsClient {
+ return original.NewOperationsClientWithBaseURI(baseURI)
+}
+func NewTenantListResultIterator(page TenantListResultPage) TenantListResultIterator {
+ return original.NewTenantListResultIterator(page)
+}
+func NewTenantListResultPage(cur TenantListResult, getNextPage func(context.Context, TenantListResult) (TenantListResult, error)) TenantListResultPage {
+ return original.NewTenantListResultPage(cur, getNextPage)
+}
+func NewTenantsClient() TenantsClient {
+ return original.NewTenantsClient()
+}
+func NewTenantsClientWithBaseURI(baseURI string) TenantsClient {
+ return original.NewTenantsClientWithBaseURI(baseURI)
+}
+func NewWithBaseURI(baseURI string) BaseClient {
+ return original.NewWithBaseURI(baseURI)
+}
+func PossibleResourceNameStatusValues() []ResourceNameStatus {
+ return original.PossibleResourceNameStatusValues()
+}
+func PossibleSpendingLimitValues() []SpendingLimit {
+ return original.PossibleSpendingLimitValues()
+}
+func PossibleStateValues() []State {
+ return original.PossibleStateValues()
+}
+func UserAgent() string {
+ return original.UserAgent() + " profiles/2018-03-01"
+}
+func Version() string {
+ return original.Version()
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/profiles/latest/dns/mgmt/dns/models.go b/vendor/github.com/Azure/azure-sdk-for-go/profiles/latest/dns/mgmt/dns/models.go
deleted file mode 100644
index 0165635bc3f..00000000000
--- a/vendor/github.com/Azure/azure-sdk-for-go/profiles/latest/dns/mgmt/dns/models.go
+++ /dev/null
@@ -1,138 +0,0 @@
-// +build go1.9
-
-// Copyright 2020 Microsoft Corporation
-//
-// 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.
-
-// This code was auto-generated by:
-// github.com/Azure/azure-sdk-for-go/tools/profileBuilder
-
-package dns
-
-import (
- "context"
-
- original "github.com/Azure/azure-sdk-for-go/services/dns/mgmt/2018-05-01/dns"
-)
-
-const (
- DefaultBaseURI = original.DefaultBaseURI
-)
-
-type RecordType = original.RecordType
-
-const (
- A RecordType = original.A
- AAAA RecordType = original.AAAA
- CAA RecordType = original.CAA
- CNAME RecordType = original.CNAME
- MX RecordType = original.MX
- NS RecordType = original.NS
- PTR RecordType = original.PTR
- SOA RecordType = original.SOA
- SRV RecordType = original.SRV
- TXT RecordType = original.TXT
-)
-
-type ZoneType = original.ZoneType
-
-const (
- Private ZoneType = original.Private
- Public ZoneType = original.Public
-)
-
-type ARecord = original.ARecord
-type AaaaRecord = original.AaaaRecord
-type BaseClient = original.BaseClient
-type CaaRecord = original.CaaRecord
-type CloudError = original.CloudError
-type CloudErrorBody = original.CloudErrorBody
-type CnameRecord = original.CnameRecord
-type MxRecord = original.MxRecord
-type NsRecord = original.NsRecord
-type PtrRecord = original.PtrRecord
-type RecordSet = original.RecordSet
-type RecordSetListResult = original.RecordSetListResult
-type RecordSetListResultIterator = original.RecordSetListResultIterator
-type RecordSetListResultPage = original.RecordSetListResultPage
-type RecordSetProperties = original.RecordSetProperties
-type RecordSetUpdateParameters = original.RecordSetUpdateParameters
-type RecordSetsClient = original.RecordSetsClient
-type Resource = original.Resource
-type ResourceReference = original.ResourceReference
-type ResourceReferenceClient = original.ResourceReferenceClient
-type ResourceReferenceRequest = original.ResourceReferenceRequest
-type ResourceReferenceRequestProperties = original.ResourceReferenceRequestProperties
-type ResourceReferenceResult = original.ResourceReferenceResult
-type ResourceReferenceResultProperties = original.ResourceReferenceResultProperties
-type SoaRecord = original.SoaRecord
-type SrvRecord = original.SrvRecord
-type SubResource = original.SubResource
-type TxtRecord = original.TxtRecord
-type Zone = original.Zone
-type ZoneListResult = original.ZoneListResult
-type ZoneListResultIterator = original.ZoneListResultIterator
-type ZoneListResultPage = original.ZoneListResultPage
-type ZoneProperties = original.ZoneProperties
-type ZoneUpdate = original.ZoneUpdate
-type ZonesClient = original.ZonesClient
-type ZonesDeleteFuture = original.ZonesDeleteFuture
-
-func New(subscriptionID string) BaseClient {
- return original.New(subscriptionID)
-}
-func NewRecordSetListResultIterator(page RecordSetListResultPage) RecordSetListResultIterator {
- return original.NewRecordSetListResultIterator(page)
-}
-func NewRecordSetListResultPage(getNextPage func(context.Context, RecordSetListResult) (RecordSetListResult, error)) RecordSetListResultPage {
- return original.NewRecordSetListResultPage(getNextPage)
-}
-func NewRecordSetsClient(subscriptionID string) RecordSetsClient {
- return original.NewRecordSetsClient(subscriptionID)
-}
-func NewRecordSetsClientWithBaseURI(baseURI string, subscriptionID string) RecordSetsClient {
- return original.NewRecordSetsClientWithBaseURI(baseURI, subscriptionID)
-}
-func NewResourceReferenceClient(subscriptionID string) ResourceReferenceClient {
- return original.NewResourceReferenceClient(subscriptionID)
-}
-func NewResourceReferenceClientWithBaseURI(baseURI string, subscriptionID string) ResourceReferenceClient {
- return original.NewResourceReferenceClientWithBaseURI(baseURI, subscriptionID)
-}
-func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient {
- return original.NewWithBaseURI(baseURI, subscriptionID)
-}
-func NewZoneListResultIterator(page ZoneListResultPage) ZoneListResultIterator {
- return original.NewZoneListResultIterator(page)
-}
-func NewZoneListResultPage(getNextPage func(context.Context, ZoneListResult) (ZoneListResult, error)) ZoneListResultPage {
- return original.NewZoneListResultPage(getNextPage)
-}
-func NewZonesClient(subscriptionID string) ZonesClient {
- return original.NewZonesClient(subscriptionID)
-}
-func NewZonesClientWithBaseURI(baseURI string, subscriptionID string) ZonesClient {
- return original.NewZonesClientWithBaseURI(baseURI, subscriptionID)
-}
-func PossibleRecordTypeValues() []RecordType {
- return original.PossibleRecordTypeValues()
-}
-func PossibleZoneTypeValues() []ZoneType {
- return original.PossibleZoneTypeValues()
-}
-func UserAgent() string {
- return original.UserAgent() + " profiles/latest"
-}
-func Version() string {
- return original.Version()
-}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2017-03-30/compute/CHANGELOG.md b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2017-03-30/compute/CHANGELOG.md
new file mode 100644
index 00000000000..548902e19e4
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2017-03-30/compute/CHANGELOG.md
@@ -0,0 +1,5 @@
+Generated from https://github.com/Azure/azure-rest-api-specs/tree/3c764635e7d442b3e74caf593029fcd440b3ef82//specification/compute/resource-manager/readme.md tag: `package-compute-2017-03`
+
+Code generator @microsoft.azure/autorest.go@2.1.171
+
+
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2017-03-30/compute/availabilitysets.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2017-03-30/compute/availabilitysets.go
new file mode 100644
index 00000000000..0cbd93cde2c
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2017-03-30/compute/availabilitysets.go
@@ -0,0 +1,585 @@
+package compute
+
+// Copyright (c) Microsoft and contributors. All rights reserved.
+//
+// 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 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 = "2017-03-30"
+ 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 OperationStatusResponse, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AvailabilitySetsClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.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 = autorest.Response{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 = "2017-03-30"
+ 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 OperationStatusResponse, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{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 = "2017-03-30"
+ 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 = "2017-03-30"
+ 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 = "2017-03-30"
+ 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 = "2017-03-30"
+ 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
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2017-03-30/compute/client.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2017-03-30/compute/client.go
new file mode 100644
index 00000000000..f682ae02aaf
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2017-03-30/compute/client.go
@@ -0,0 +1,52 @@
+// Package compute implements the Azure ARM Compute service API version 2017-03-30.
+//
+// Compute Client
+package compute
+
+// Copyright (c) Microsoft and contributors. All rights reserved.
+//
+// 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 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/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2017-03-30/compute/disks.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2017-03-30/compute/disks.go
new file mode 100644
index 00000000000..ad57a5a0804
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2017-03-30/compute/disks.go
@@ -0,0 +1,902 @@
+package compute
+
+// Copyright (c) Microsoft and contributors. All rights reserved.
+//
+// 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 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.Response() != nil {
+ sc = result.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.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.EncryptionSettings", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "disk.DiskProperties.EncryptionSettings.DiskEncryptionKey", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "disk.DiskProperties.EncryptionSettings.DiskEncryptionKey.SourceVault", Name: validation.Null, Rule: true, Chain: nil},
+ {Target: "disk.DiskProperties.EncryptionSettings.DiskEncryptionKey.SecretURL", Name: validation.Null, Rule: true, Chain: nil},
+ }},
+ {Target: "disk.DiskProperties.EncryptionSettings.KeyEncryptionKey", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "disk.DiskProperties.EncryptionSettings.KeyEncryptionKey.SourceVault", Name: validation.Null, Rule: true, Chain: nil},
+ {Target: "disk.DiskProperties.EncryptionSettings.KeyEncryptionKey.KeyURL", 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", nil, "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 = "2017-03-30"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ disk.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/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
+ 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 = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.DisksCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ d.Response.Response, err = future.GetResult(sender)
+ if d.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "compute.DisksCreateOrUpdateFuture", "Result", nil, "received nil response and error")
+ }
+ if 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
+ }
+ 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.Response() != nil {
+ sc = result.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", nil, "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 = "2017-03-30"
+ 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
+ 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 = func(client DisksClient) (osr OperationStatusResponse, 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 {
+ err = azure.NewAsyncOpIncompleteError("compute.DisksDeleteFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ osr.Response.Response, err = future.GetResult(sender)
+ if osr.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "compute.DisksDeleteFuture", "Result", nil, "received nil response and error")
+ }
+ if err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.DeleteResponder(osr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DisksDeleteFuture", "Result", osr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+ }
+ 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 OperationStatusResponse, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{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 = "2017-03-30"
+ 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.Response() != nil {
+ sc = result.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", nil, "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 = "2017-03-30"
+ 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
+ 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 = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.DisksGrantAccessFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ au.Response.Response, err = future.GetResult(sender)
+ if au.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "compute.DisksGrantAccessFuture", "Result", nil, "received nil response and error")
+ }
+ if 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
+ }
+ 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 = "2017-03-30"
+ 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 = "2017-03-30"
+ 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.Response() != nil {
+ sc = result.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", nil, "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 = "2017-03-30"
+ 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
+ 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 = func(client DisksClient) (osr OperationStatusResponse, 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 {
+ err = azure.NewAsyncOpIncompleteError("compute.DisksRevokeAccessFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ osr.Response.Response, err = future.GetResult(sender)
+ if osr.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "compute.DisksRevokeAccessFuture", "Result", nil, "received nil response and error")
+ }
+ if err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.RevokeAccessResponder(osr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DisksRevokeAccessFuture", "Result", osr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+ }
+ 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 OperationStatusResponse, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{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.Response() != nil {
+ sc = result.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", nil, "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 = "2017-03-30"
+ 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
+ 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 = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.DisksUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ d.Response.Response, err = future.GetResult(sender)
+ if d.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "compute.DisksUpdateFuture", "Result", nil, "received nil response and error")
+ }
+ if 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
+ }
+ 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/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2017-03-30/compute/enums.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2017-03-30/compute/enums.go
new file mode 100644
index 00000000000..96b6beeba70
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2017-03-30/compute/enums.go
@@ -0,0 +1,582 @@
+package compute
+
+// Copyright (c) Microsoft and contributors. All rights reserved.
+//
+// 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 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 (
+ // None ...
+ None AccessLevel = "None"
+ // Read ...
+ Read AccessLevel = "Read"
+)
+
+// PossibleAccessLevelValues returns an array of possible values for the AccessLevel const type.
+func PossibleAccessLevelValues() []AccessLevel {
+ return []AccessLevel{None, Read}
+}
+
+// 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}
+}
+
+// ComponentNames enumerates the values for component names.
+type ComponentNames string
+
+const (
+ // MicrosoftWindowsShellSetup ...
+ MicrosoftWindowsShellSetup ComponentNames = "Microsoft-Windows-Shell-Setup"
+)
+
+// PossibleComponentNamesValues returns an array of possible values for the ComponentNames const type.
+func PossibleComponentNamesValues() []ComponentNames {
+ return []ComponentNames{MicrosoftWindowsShellSetup}
+}
+
+// DiskCreateOption enumerates the values for disk create option.
+type DiskCreateOption string
+
+const (
+ // Attach ...
+ Attach DiskCreateOption = "Attach"
+ // Copy ...
+ Copy DiskCreateOption = "Copy"
+ // Empty ...
+ Empty DiskCreateOption = "Empty"
+ // FromImage ...
+ FromImage DiskCreateOption = "FromImage"
+ // Import ...
+ Import DiskCreateOption = "Import"
+)
+
+// PossibleDiskCreateOptionValues returns an array of possible values for the DiskCreateOption const type.
+func PossibleDiskCreateOptionValues() []DiskCreateOption {
+ return []DiskCreateOption{Attach, Copy, Empty, FromImage, Import}
+}
+
+// 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}
+}
+
+// InstanceViewTypes enumerates the values for instance view types.
+type InstanceViewTypes string
+
+const (
+ // InstanceView ...
+ InstanceView InstanceViewTypes = "instanceView"
+)
+
+// PossibleInstanceViewTypesValues returns an array of possible values for the InstanceViewTypes const type.
+func PossibleInstanceViewTypesValues() []InstanceViewTypes {
+ return []InstanceViewTypes{InstanceView}
+}
+
+// IPVersion enumerates the values for ip version.
+type IPVersion string
+
+const (
+ // IPv4 ...
+ IPv4 IPVersion = "IPv4"
+ // IPv6 ...
+ IPv6 IPVersion = "IPv6"
+)
+
+// PossibleIPVersionValues returns an array of possible values for the IPVersion const type.
+func PossibleIPVersionValues() []IPVersion {
+ return []IPVersion{IPv4, IPv6}
+}
+
+// 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}
+}
+
+// OperatingSystemStateTypes enumerates the values for operating system state types.
+type OperatingSystemStateTypes string
+
+const (
+ // Generalized ...
+ Generalized OperatingSystemStateTypes = "Generalized"
+ // Specialized ...
+ Specialized OperatingSystemStateTypes = "Specialized"
+)
+
+// PossibleOperatingSystemStateTypesValues returns an array of possible values for the OperatingSystemStateTypes const type.
+func PossibleOperatingSystemStateTypesValues() []OperatingSystemStateTypes {
+ return []OperatingSystemStateTypes{Generalized, Specialized}
+}
+
+// OperatingSystemTypes enumerates the values for operating system types.
+type OperatingSystemTypes string
+
+const (
+ // Linux ...
+ Linux OperatingSystemTypes = "Linux"
+ // Windows ...
+ Windows OperatingSystemTypes = "Windows"
+)
+
+// PossibleOperatingSystemTypesValues returns an array of possible values for the OperatingSystemTypes const type.
+func PossibleOperatingSystemTypesValues() []OperatingSystemTypes {
+ return []OperatingSystemTypes{Linux, Windows}
+}
+
+// PassNames enumerates the values for pass names.
+type PassNames string
+
+const (
+ // OobeSystem ...
+ OobeSystem PassNames = "OobeSystem"
+)
+
+// PossiblePassNamesValues returns an array of possible values for the PassNames const type.
+func PossiblePassNamesValues() []PassNames {
+ return []PassNames{OobeSystem}
+}
+
+// ProtocolTypes enumerates the values for protocol types.
+type ProtocolTypes string
+
+const (
+ // HTTP ...
+ HTTP ProtocolTypes = "Http"
+ // HTTPS ...
+ HTTPS ProtocolTypes = "Https"
+)
+
+// PossibleProtocolTypesValues returns an array of possible values for the ProtocolTypes const type.
+func PossibleProtocolTypesValues() []ProtocolTypes {
+ return []ProtocolTypes{HTTP, HTTPS}
+}
+
+// ResourceIdentityType enumerates the values for resource identity type.
+type ResourceIdentityType string
+
+const (
+ // SystemAssigned ...
+ SystemAssigned ResourceIdentityType = "SystemAssigned"
+)
+
+// PossibleResourceIdentityTypeValues returns an array of possible values for the ResourceIdentityType const type.
+func PossibleResourceIdentityTypeValues() []ResourceIdentityType {
+ return []ResourceIdentityType{SystemAssigned}
+}
+
+// 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 (
+ // NotAvailableForSubscription ...
+ NotAvailableForSubscription ResourceSkuRestrictionsReasonCode = "NotAvailableForSubscription"
+ // QuotaID ...
+ QuotaID ResourceSkuRestrictionsReasonCode = "QuotaId"
+)
+
+// PossibleResourceSkuRestrictionsReasonCodeValues returns an array of possible values for the ResourceSkuRestrictionsReasonCode const type.
+func PossibleResourceSkuRestrictionsReasonCodeValues() []ResourceSkuRestrictionsReasonCode {
+ return []ResourceSkuRestrictionsReasonCode{NotAvailableForSubscription, QuotaID}
+}
+
+// ResourceSkuRestrictionsType enumerates the values for resource sku restrictions type.
+type ResourceSkuRestrictionsType string
+
+const (
+ // Location ...
+ Location ResourceSkuRestrictionsType = "Location"
+)
+
+// PossibleResourceSkuRestrictionsTypeValues returns an array of possible values for the ResourceSkuRestrictionsType const type.
+func PossibleResourceSkuRestrictionsTypeValues() []ResourceSkuRestrictionsType {
+ return []ResourceSkuRestrictionsType{Location}
+}
+
+// RollingUpgradeActionType enumerates the values for rolling upgrade action type.
+type RollingUpgradeActionType string
+
+const (
+ // Cancel ...
+ Cancel RollingUpgradeActionType = "Cancel"
+ // Start ...
+ Start RollingUpgradeActionType = "Start"
+)
+
+// PossibleRollingUpgradeActionTypeValues returns an array of possible values for the RollingUpgradeActionType const type.
+func PossibleRollingUpgradeActionTypeValues() []RollingUpgradeActionType {
+ return []RollingUpgradeActionType{Cancel, Start}
+}
+
+// RollingUpgradeStatusCode enumerates the values for rolling upgrade status code.
+type RollingUpgradeStatusCode string
+
+const (
+ // Cancelled ...
+ Cancelled RollingUpgradeStatusCode = "Cancelled"
+ // Completed ...
+ Completed RollingUpgradeStatusCode = "Completed"
+ // Faulted ...
+ Faulted RollingUpgradeStatusCode = "Faulted"
+ // RollingForward ...
+ RollingForward RollingUpgradeStatusCode = "RollingForward"
+)
+
+// PossibleRollingUpgradeStatusCodeValues returns an array of possible values for the RollingUpgradeStatusCode const type.
+func PossibleRollingUpgradeStatusCodeValues() []RollingUpgradeStatusCode {
+ return []RollingUpgradeStatusCode{Cancelled, Completed, Faulted, RollingForward}
+}
+
+// SettingNames enumerates the values for setting names.
+type SettingNames string
+
+const (
+ // AutoLogon ...
+ AutoLogon SettingNames = "AutoLogon"
+ // FirstLogonCommands ...
+ FirstLogonCommands SettingNames = "FirstLogonCommands"
+)
+
+// PossibleSettingNamesValues returns an array of possible values for the SettingNames const type.
+func PossibleSettingNamesValues() []SettingNames {
+ return []SettingNames{AutoLogon, FirstLogonCommands}
+}
+
+// StatusLevelTypes enumerates the values for status level types.
+type StatusLevelTypes string
+
+const (
+ // Error ...
+ Error StatusLevelTypes = "Error"
+ // Info ...
+ Info StatusLevelTypes = "Info"
+ // Warning ...
+ Warning StatusLevelTypes = "Warning"
+)
+
+// PossibleStatusLevelTypesValues returns an array of possible values for the StatusLevelTypes const type.
+func PossibleStatusLevelTypesValues() []StatusLevelTypes {
+ return []StatusLevelTypes{Error, Info, Warning}
+}
+
+// StorageAccountTypes enumerates the values for storage account types.
+type StorageAccountTypes string
+
+const (
+ // PremiumLRS ...
+ PremiumLRS StorageAccountTypes = "Premium_LRS"
+ // StandardLRS ...
+ StandardLRS StorageAccountTypes = "Standard_LRS"
+)
+
+// PossibleStorageAccountTypesValues returns an array of possible values for the StorageAccountTypes const type.
+func PossibleStorageAccountTypesValues() []StorageAccountTypes {
+ return []StorageAccountTypes{PremiumLRS, StandardLRS}
+}
+
+// UpgradeMode enumerates the values for upgrade mode.
+type UpgradeMode string
+
+const (
+ // Automatic ...
+ Automatic UpgradeMode = "Automatic"
+ // Manual ...
+ Manual UpgradeMode = "Manual"
+ // Rolling ...
+ Rolling UpgradeMode = "Rolling"
+)
+
+// PossibleUpgradeModeValues returns an array of possible values for the UpgradeMode const type.
+func PossibleUpgradeModeValues() []UpgradeMode {
+ return []UpgradeMode{Automatic, Manual, Rolling}
+}
+
+// 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 (
+ // 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"
+ // 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"
+ // StandardD1V2 ...
+ StandardD1V2 VirtualMachineSizeTypes = "Standard_D1_v2"
+ // StandardD2 ...
+ StandardD2 VirtualMachineSizeTypes = "Standard_D2"
+ // StandardD2V2 ...
+ StandardD2V2 VirtualMachineSizeTypes = "Standard_D2_v2"
+ // StandardD3 ...
+ StandardD3 VirtualMachineSizeTypes = "Standard_D3"
+ // StandardD3V2 ...
+ StandardD3V2 VirtualMachineSizeTypes = "Standard_D3_v2"
+ // StandardD4 ...
+ StandardD4 VirtualMachineSizeTypes = "Standard_D4"
+ // StandardD4V2 ...
+ StandardD4V2 VirtualMachineSizeTypes = "Standard_D4_v2"
+ // StandardD5V2 ...
+ StandardD5V2 VirtualMachineSizeTypes = "Standard_D5_v2"
+ // 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"
+ // StandardDS13V2 ...
+ StandardDS13V2 VirtualMachineSizeTypes = "Standard_DS13_v2"
+ // StandardDS14 ...
+ StandardDS14 VirtualMachineSizeTypes = "Standard_DS14"
+ // 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"
+ // StandardF1 ...
+ StandardF1 VirtualMachineSizeTypes = "Standard_F1"
+ // StandardF16 ...
+ StandardF16 VirtualMachineSizeTypes = "Standard_F16"
+ // StandardF16s ...
+ StandardF16s VirtualMachineSizeTypes = "Standard_F16s"
+ // StandardF1s ...
+ StandardF1s VirtualMachineSizeTypes = "Standard_F1s"
+ // StandardF2 ...
+ StandardF2 VirtualMachineSizeTypes = "Standard_F2"
+ // StandardF2s ...
+ StandardF2s VirtualMachineSizeTypes = "Standard_F2s"
+ // StandardF4 ...
+ StandardF4 VirtualMachineSizeTypes = "Standard_F4"
+ // StandardF4s ...
+ StandardF4s VirtualMachineSizeTypes = "Standard_F4s"
+ // StandardF8 ...
+ StandardF8 VirtualMachineSizeTypes = "Standard_F8"
+ // StandardF8s ...
+ StandardF8s VirtualMachineSizeTypes = "Standard_F8s"
+ // 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"
+ // StandardGS5 ...
+ StandardGS5 VirtualMachineSizeTypes = "Standard_GS5"
+ // 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"
+ // StandardNC12 ...
+ StandardNC12 VirtualMachineSizeTypes = "Standard_NC12"
+ // StandardNC24 ...
+ StandardNC24 VirtualMachineSizeTypes = "Standard_NC24"
+ // StandardNC24r ...
+ StandardNC24r VirtualMachineSizeTypes = "Standard_NC24r"
+ // StandardNC6 ...
+ StandardNC6 VirtualMachineSizeTypes = "Standard_NC6"
+ // StandardNV12 ...
+ StandardNV12 VirtualMachineSizeTypes = "Standard_NV12"
+ // StandardNV24 ...
+ StandardNV24 VirtualMachineSizeTypes = "Standard_NV24"
+ // StandardNV6 ...
+ StandardNV6 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, StandardD1, StandardD11, StandardD11V2, StandardD12, StandardD12V2, StandardD13, StandardD13V2, StandardD14, StandardD14V2, StandardD15V2, StandardD1V2, StandardD2, StandardD2V2, StandardD3, StandardD3V2, StandardD4, StandardD4V2, StandardD5V2, StandardDS1, StandardDS11, StandardDS11V2, StandardDS12, StandardDS12V2, StandardDS13, StandardDS13V2, StandardDS14, StandardDS14V2, StandardDS15V2, StandardDS1V2, StandardDS2, StandardDS2V2, StandardDS3, StandardDS3V2, StandardDS4, StandardDS4V2, StandardDS5V2, StandardF1, StandardF16, StandardF16s, StandardF1s, StandardF2, StandardF2s, StandardF4, StandardF4s, StandardF8, StandardF8s, StandardG1, StandardG2, StandardG3, StandardG4, StandardG5, StandardGS1, StandardGS2, StandardGS3, StandardGS4, StandardGS5, StandardH16, StandardH16m, StandardH16mr, StandardH16r, StandardH8, StandardH8m, StandardL16s, StandardL32s, StandardL4s, StandardL8s, StandardNC12, StandardNC24, StandardNC24r, StandardNC6, StandardNV12, StandardNV24, StandardNV6}
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2017-03-30/compute/images.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2017-03-30/compute/images.go
new file mode 100644
index 00000000000..488e72564ab
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2017-03-30/compute/images.go
@@ -0,0 +1,567 @@
+package compute
+
+// Copyright (c) Microsoft and contributors. All rights reserved.
+//
+// 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 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"
+)
+
+// 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.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: parameters,
+ Constraints: []validation.Constraint{{Target: "parameters.ImageProperties", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.ImageProperties.StorageProfile", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.ImageProperties.StorageProfile.OsDisk", Name: validation.Null, Rule: true, Chain: nil}}},
+ }}}}}); err != nil {
+ return result, validation.NewError("compute.ImagesClient", "CreateOrUpdate", err.Error())
+ }
+
+ 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", nil, "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 = "2017-03-30"
+ 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
+ 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 = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.ImagesCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ i.Response.Response, err = future.GetResult(sender)
+ if i.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "compute.ImagesCreateOrUpdateFuture", "Result", nil, "received nil response and error")
+ }
+ if 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
+ }
+ 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.Response() != nil {
+ sc = result.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", nil, "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 = "2017-03-30"
+ 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
+ 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 = func(client ImagesClient) (osr OperationStatusResponse, 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 {
+ err = azure.NewAsyncOpIncompleteError("compute.ImagesDeleteFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ osr.Response.Response, err = future.GetResult(sender)
+ if osr.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "compute.ImagesDeleteFuture", "Result", nil, "received nil response and error")
+ }
+ if err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.DeleteResponder(osr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.ImagesDeleteFuture", "Result", osr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+ }
+ 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 OperationStatusResponse, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{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 = "2017-03-30"
+ 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 = "2017-03-30"
+ 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 = "2017-03-30"
+ 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
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2017-03-30/compute/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2017-03-30/compute/models.go
new file mode 100644
index 00000000000..3207d9ac9e4
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2017-03-30/compute/models.go
@@ -0,0 +1,6659 @@
+package compute
+
+// Copyright (c) Microsoft and contributors. All rights reserved.
+//
+// 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 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/compute/mgmt/2017-03-30/compute"
+
+// AccessURI a disk access SAS uri.
+type AccessURI struct {
+ autorest.Response `json:"-"`
+ // AccessURIOutput - Operation output data (raw JSON)
+ *AccessURIOutput `json:"properties,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for AccessURI.
+func (au AccessURI) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if au.AccessURIOutput != nil {
+ objectMap["properties"] = au.AccessURIOutput
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for AccessURI struct.
+func (au *AccessURI) 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 accessURIOutput AccessURIOutput
+ err = json.Unmarshal(*v, &accessURIOutput)
+ if err != nil {
+ return err
+ }
+ au.AccessURIOutput = &accessURIOutput
+ }
+ }
+ }
+
+ return nil
+}
+
+// AccessURIOutput azure properties, including output.
+type AccessURIOutput struct {
+ // AccessURIRaw - Operation output data (raw JSON)
+ *AccessURIRaw `json:"output,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for AccessURIOutput.
+func (auo AccessURIOutput) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if auo.AccessURIRaw != nil {
+ objectMap["output"] = auo.AccessURIRaw
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for AccessURIOutput struct.
+func (auo *AccessURIOutput) 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 "output":
+ if v != nil {
+ var accessURIRaw AccessURIRaw
+ err = json.Unmarshal(*v, &accessURIRaw)
+ if err != nil {
+ return err
+ }
+ auo.AccessURIRaw = &accessURIRaw
+ }
+ }
+ }
+
+ return nil
+}
+
+// AccessURIRaw this object gets 'bubbled up' through flattening.
+type AccessURIRaw struct {
+ // AccessSAS - READ-ONLY; A SAS uri for accessing a disk.
+ AccessSAS *string `json:"accessSAS,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: 'OobeSystem'
+ PassName PassNames `json:"passName,omitempty"`
+ // ComponentName - The component name. Currently, the only allowable value is Microsoft-Windows-Shell-Setup. Possible values include: 'MicrosoftWindowsShellSetup'
+ 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 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"`
+}
+
+// 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 [Manage the availability of
+// virtual
+// machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json).
+//
For more information on Azure planned maintenance, see [Planned maintenance for virtual
+// machines in
+// Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json)
+//
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
+ 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"`
+ // 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
+ }
+ return json.Marshal(objectMap)
+}
+
+// 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.
+ 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.
+ ConsoleScreenshotBlobURI *string `json:"consoleScreenshotBlobUri,omitempty"`
+ // SerialConsoleLogBlobURI - READ-ONLY; The Linux serial console log blob Uri.
+ SerialConsoleLogBlobURI *string `json:"serialConsoleLogBlobUri,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: 'Empty', 'Attach', 'FromImage', 'Import', 'Copy'
+ CreateOption DiskCreateOption `json:"createOption,omitempty"`
+ // StorageAccountID - If createOption is Import, the Azure Resource Manager identifier of the storage account containing the blob to import as a disk. Required only if the blob is in a different subscription
+ StorageAccountID *string `json:"storageAccountId,omitempty"`
+ // ImageReference - Disk source information.
+ ImageReference *ImageDiskReference `json:"imageReference,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"`
+}
+
+// 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"`
+ // 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"`
+}
+
+// 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"`
+}
+
+// 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"`
+}
+
+// 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"`
+ Sku *DiskSku `json:"sku,omitempty"`
+ // Zones - The Logical zone list for Disk.
+ Zones *[]string `json:"zones,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.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 "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 "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
+}
+
+// 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"`
+}
+
+// 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: 'Windows', 'Linux'
+ OsType OperatingSystemTypes `json:"osType,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 VHD 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"`
+ // EncryptionSettings - Encryption settings for disk or snapshot
+ EncryptionSettings *EncryptionSettings `json:"encryptionSettings,omitempty"`
+ // ProvisioningState - READ-ONLY; The disk provisioning state.
+ ProvisioningState *string `json:"provisioningState,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.CreationData != nil {
+ objectMap["creationData"] = dp.CreationData
+ }
+ if dp.DiskSizeGB != nil {
+ objectMap["diskSizeGB"] = dp.DiskSizeGB
+ }
+ if dp.EncryptionSettings != nil {
+ objectMap["encryptionSettings"] = dp.EncryptionSettings
+ }
+ return json.Marshal(objectMap)
+}
+
+// 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)
+}
+
+// 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) (OperationStatusResponse, error)
+}
+
+// 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)
+}
+
+// DiskSku the disks and snapshots sku name. Can be Standard_LRS or Premium_LRS.
+type DiskSku struct {
+ // Name - The sku name. Possible values include: 'StandardLRS', 'PremiumLRS'
+ Name StorageAccountTypes `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) (OperationStatusResponse, error)
+}
+
+// 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)
+}
+
+// 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: 'Windows', 'Linux'
+ OsType OperatingSystemTypes `json:"osType,omitempty"`
+ // DiskSizeGB - If creationData.createOption is Empty, this field is mandatory and it indicates the size of the VHD 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"`
+ // EncryptionSettings - Encryption settings for disk or snapshot
+ EncryptionSettings *EncryptionSettings `json:"encryptionSettings,omitempty"`
+}
+
+// EncryptionSettings encryption settings for disk or snapshot
+type EncryptionSettings 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"`
+ // 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 *KeyVaultAndKeyReference `json:"keyEncryptionKey,omitempty"`
+}
+
+// GrantAccessData data used for requesting a SAS.
+type GrantAccessData struct {
+ // Access - Possible values include: 'None', 'Read'
+ 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. For more information about virtual machine sizes, see [Sizes for virtual machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-sizes?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json).
The available VM sizes depend on region and availability set. For a list of available sizes use 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/virtualmachinesizes/list)
[List all available virtual machine sizes for resizing](https://docs.microsoft.com/rest/api/compute/virtualmachines/listavailablesizes). 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', 'StandardD1', 'StandardD2', 'StandardD3', 'StandardD4', 'StandardD11', 'StandardD12', 'StandardD13', 'StandardD14', 'StandardD1V2', 'StandardD2V2', 'StandardD3V2', 'StandardD4V2', 'StandardD5V2', 'StandardD11V2', 'StandardD12V2', 'StandardD13V2', 'StandardD14V2', 'StandardD15V2', 'StandardDS1', 'StandardDS2', 'StandardDS3', 'StandardDS4', 'StandardDS11', 'StandardDS12', 'StandardDS13', 'StandardDS14', 'StandardDS1V2', 'StandardDS2V2', 'StandardDS3V2', 'StandardDS4V2', 'StandardDS5V2', 'StandardDS11V2', 'StandardDS12V2', 'StandardDS13V2', 'StandardDS14V2', 'StandardDS15V2', 'StandardF1', 'StandardF2', 'StandardF4', 'StandardF8', 'StandardF16', 'StandardF1s', 'StandardF2s', 'StandardF4s', 'StandardF8s', 'StandardF16s', 'StandardG1', 'StandardG2', 'StandardG3', 'StandardG4', 'StandardG5', 'StandardGS1', 'StandardGS2', 'StandardGS3', 'StandardGS4', 'StandardGS5', 'StandardH8', 'StandardH16', 'StandardH8m', 'StandardH16m', 'StandardH16r', 'StandardH16mr', 'StandardL4s', 'StandardL8s', 'StandardL16s', 'StandardL32s', 'StandardNC6', 'StandardNC12', 'StandardNC24', 'StandardNC24r', 'StandardNV6', 'StandardNV12', 'StandardNV24'
+ VMSize VirtualMachineSizeTypes `json:"vmSize,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"`
+ // 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.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 "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. Possible values are: Standard_LRS or Premium_LRS. Possible values include: 'StandardLRS', 'PremiumLRS'
+ StorageAccountType StorageAccountTypes `json:"storageAccountType,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: 'Windows', 'Linux'
+ OsType OperatingSystemTypes `json:"osType,omitempty"`
+ // OsState - The OS State. Possible values include: 'Generalized', 'Specialized'
+ 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. Possible values are: Standard_LRS or Premium_LRS. Possible values include: 'StandardLRS', 'PremiumLRS'
+ StorageAccountType StorageAccountTypes `json:"storageAccountType,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"`
+}
+
+// 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
+ }
+ return json.Marshal(objectMap)
+}
+
+// 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"`
+ // ID - Resource Id
+ ID *string `json:"id,omitempty"`
+}
+
+// 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)
+}
+
+// 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) (OperationStatusResponse, error)
+}
+
+// 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/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json).
+ 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/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json).
+ DataDisks *[]ImageDataDisk `json:"dataDisks,omitempty"`
+}
+
+// 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"`
+}
+
+// InstanceViewStatus instance view status.
+type InstanceViewStatus struct {
+ // Code - The status code.
+ Code *string `json:"code,omitempty"`
+ // Level - The level code. Possible values include: 'Info', 'Warning', 'Error'
+ 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"`
+}
+
+// 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"`
+}
+
+// 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/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
+//
For running non-endorsed distributions, see [Information for Non-Endorsed
+// Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json).
+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"`
+}
+
+// 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"`
+}
+
+// LongRunningOperationProperties compute-specific operation properties, including output
+type LongRunningOperationProperties struct {
+ // Output - Operation output data (raw JSON)
+ Output interface{} `json:"output,omitempty"`
+}
+
+// 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"`
+}
+
+// ManagedDiskParameters the parameters of a managed disk.
+type ManagedDiskParameters struct {
+ // StorageAccountType - Specifies the storage account type for the managed disk. Possible values are: Standard_LRS or Premium_LRS. Possible values include: 'StandardLRS', 'PremiumLRS'
+ StorageAccountType StorageAccountTypes `json:"storageAccountType,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"`
+}
+
+// NetworkProfile specifies the network interfaces 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"`
+}
+
+// OperationStatusResponse operation status response
+type OperationStatusResponse struct {
+ autorest.Response `json:"-"`
+ // Name - READ-ONLY; Operation ID
+ Name *string `json:"name,omitempty"`
+ // Status - READ-ONLY; Operation status
+ Status *string `json:"status,omitempty"`
+ // StartTime - READ-ONLY; Start time of the operation
+ StartTime *date.Time `json:"startTime,omitempty"`
+ // EndTime - READ-ONLY; End time of the operation
+ EndTime *date.Time `json:"endTime,omitempty"`
+ // Error - READ-ONLY; Api error
+ Error *APIError `json:"error,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/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 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"`
+ // 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"`
+}
+
+// OSDiskImage contains the os disk image information.
+type OSDiskImage struct {
+ // OperatingSystem - The operating system of the osDiskImage. Possible values include: 'Windows', 'Linux'
+ OperatingSystem OperatingSystemTypes `json:"operatingSystem,omitempty"`
+}
+
+// OSProfile specifies the operating system settings for the virtual machine.
+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/virtual-machines/virtual-machines-linux-infrastructure-subscription-accounts-guidelines?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#1-naming-conventions).
+ ComputerName *string `json:"computerName,omitempty"`
+ // AdminUsername - Specifies the name of the administrator account.
For root access to the Linux VM, see [Using root privileges on Linux virtual machines in Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
For a list of built-in system users on Linux that should not be used in this field, see [Selecting User Names for Linux on Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
+ 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_])
For resetting the password, see [How to reset the Remote Desktop service or its login password in a Windows VM](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-reset-rdp?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json)
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/azure/virtual-machines/virtual-machines-linux-using-vmaccess-extension?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#reset-root-password)
+ 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/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
+ 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/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
For running non-endorsed distributions, see [Information for Non-Endorsed Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json).
+ LinuxConfiguration *LinuxConfiguration `json:"linuxConfiguration,omitempty"`
+ // Secrets - Specifies set of certificates that should be installed onto the virtual machine.
+ Secrets *[]VaultSecretGroup `json:"secrets,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**.
+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"`
+}
+
+// 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"`
+}
+
+// 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)
+}
+
+// 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"`
+ // 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"`
+}
+
+// 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"`
+}
+
+// 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"`
+}
+
+// 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"`
+}
+
+// ResourceSkuRestrictions describes scaling information of a SKU.
+type ResourceSkuRestrictions struct {
+ // Type - READ-ONLY; The type of restrictions. Possible values include: 'Location'
+ 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"`
+ // ReasonCode - READ-ONLY; The reason for restriction. Possible values include: 'QuotaID', 'NotAvailableForSubscription'
+ ReasonCode ResourceSkuRestrictionsReasonCode `json:"reasonCode,omitempty"`
+}
+
+// ResourceSkusResult the Compute List 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 Compute Skus. Call ListNext() with this to fetch the next page of VMSS 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,
+ }
+}
+
+// ResourceUpdate the Resource model definition.
+type ResourceUpdate struct {
+ // Tags - Resource tags
+ Tags map[string]*string `json:"tags"`
+ Sku *DiskSku `json:"sku,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for ResourceUpdate.
+func (ru ResourceUpdate) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if ru.Tags != nil {
+ objectMap["tags"] = ru.Tags
+ }
+ if ru.Sku != nil {
+ objectMap["sku"] = ru.Sku
+ }
+ 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"`
+}
+
+// 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"`
+}
+
+// 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: 'RollingForward', 'Cancelled', 'Completed', 'Faulted'
+ 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 RollingUpgradeActionType `json:"lastAction,omitempty"`
+ // LastActionTime - READ-ONLY; Last action time of the upgrade.
+ LastActionTime *date.Time `json:"lastActionTime,omitempty"`
+}
+
+// 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"`
+}
+
+// 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: 'Windows', 'Linux'
+ 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: 'Windows', 'Linux'
+ 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 run command operation response.
+type RunCommandResult struct {
+ autorest.Response `json:"-"`
+ *RunCommandResultProperties `json:"properties,omitempty"`
+ // Name - READ-ONLY; Operation ID
+ Name *string `json:"name,omitempty"`
+ // Status - READ-ONLY; Operation status
+ Status *string `json:"status,omitempty"`
+ // StartTime - READ-ONLY; Start time of the operation
+ StartTime *date.Time `json:"startTime,omitempty"`
+ // EndTime - READ-ONLY; End time of the operation
+ EndTime *date.Time `json:"endTime,omitempty"`
+ // Error - READ-ONLY; Api error
+ Error *APIError `json:"error,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for RunCommandResult.
+func (rcr RunCommandResult) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if rcr.RunCommandResultProperties != nil {
+ objectMap["properties"] = rcr.RunCommandResultProperties
+ }
+ 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 "properties":
+ if v != nil {
+ var runCommandResultProperties RunCommandResultProperties
+ err = json.Unmarshal(*v, &runCommandResultProperties)
+ if err != nil {
+ return err
+ }
+ rcr.RunCommandResultProperties = &runCommandResultProperties
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ rcr.Name = &name
+ }
+ case "status":
+ if v != nil {
+ var status string
+ err = json.Unmarshal(*v, &status)
+ if err != nil {
+ return err
+ }
+ rcr.Status = &status
+ }
+ case "startTime":
+ if v != nil {
+ var startTime date.Time
+ err = json.Unmarshal(*v, &startTime)
+ if err != nil {
+ return err
+ }
+ rcr.StartTime = &startTime
+ }
+ case "endTime":
+ if v != nil {
+ var endTime date.Time
+ err = json.Unmarshal(*v, &endTime)
+ if err != nil {
+ return err
+ }
+ rcr.EndTime = &endTime
+ }
+ case "error":
+ if v != nil {
+ var errorVar APIError
+ err = json.Unmarshal(*v, &errorVar)
+ if err != nil {
+ return err
+ }
+ rcr.Error = &errorVar
+ }
+ }
+ }
+
+ return nil
+}
+
+// RunCommandResultProperties compute-specific operation properties, including output
+type RunCommandResultProperties struct {
+ // Output - Operation output data (raw JSON)
+ Output interface{} `json:"output,omitempty"`
+}
+
+// Sku describes a virtual machine scale set sku.
+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. 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.
+ 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 *DiskSku `json:"sku,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 Snapshot.
+func (s Snapshot) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if s.Sku != nil {
+ objectMap["sku"] = s.Sku
+ }
+ if s.DiskProperties != nil {
+ objectMap["properties"] = s.DiskProperties
+ }
+ 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 DiskSku
+ err = json.Unmarshal(*v, &sku)
+ if err != nil {
+ return err
+ }
+ s.Sku = &sku
+ }
+ case "properties":
+ if v != nil {
+ var diskProperties DiskProperties
+ err = json.Unmarshal(*v, &diskProperties)
+ if err != nil {
+ return err
+ }
+ s.DiskProperties = &diskProperties
+ }
+ 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,
+ }
+}
+
+// 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)
+}
+
+// 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) (OperationStatusResponse, error)
+}
+
+// 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)
+}
+
+// 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) (OperationStatusResponse, error)
+}
+
+// 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)
+}
+
+// SnapshotUpdate snapshot update resource.
+type SnapshotUpdate 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 SnapshotUpdate.
+func (su SnapshotUpdate) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if su.DiskUpdateProperties != nil {
+ objectMap["properties"] = su.DiskUpdateProperties
+ }
+ 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 diskUpdateProperties DiskUpdateProperties
+ err = json.Unmarshal(*v, &diskUpdateProperties)
+ if err != nil {
+ return err
+ }
+ su.DiskUpdateProperties = &diskUpdateProperties
+ }
+ 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 DiskSku
+ err = json.Unmarshal(*v, &sku)
+ if err != nil {
+ return err
+ }
+ su.Sku = &sku
+ }
+ }
+ }
+
+ return nil
+}
+
+// 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"`
+}
+
+// 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/virtual-machines-linux-mac-create-ssh-keys?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json).
+ KeyData *string `json:"keyData,omitempty"`
+}
+
+// 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/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json).
+ 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/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json).
+ 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"`
+}
+
+// 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)
+}
+
+// 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 UpgradeMode `json:"mode,omitempty"`
+ // RollingUpgradePolicy - The configuration parameters used while performing a rolling upgrade.
+ RollingUpgradePolicy *RollingUpgradePolicy `json:"rollingUpgradePolicy,omitempty"`
+ // AutomaticOSUpgrade - Whether OS upgrades should automatically be applied to scale set instances in a rolling fashion when a newer version of the image becomes available.
+ AutomaticOSUpgrade *bool `json:"automaticOSUpgrade,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"`
+}
+
+// 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":"" }
+ 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"`
+ // 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.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 "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"`
+}
+
+// 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 resource Id.
+type VirtualMachineCaptureResult struct {
+ autorest.Response `json:"-"`
+ *VirtualMachineCaptureResultProperties `json:"properties,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.VirtualMachineCaptureResultProperties != nil {
+ objectMap["properties"] = vmcr.VirtualMachineCaptureResultProperties
+ }
+ if vmcr.ID != nil {
+ objectMap["id"] = vmcr.ID
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for VirtualMachineCaptureResult struct.
+func (vmcr *VirtualMachineCaptureResult) 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 virtualMachineCaptureResultProperties VirtualMachineCaptureResultProperties
+ err = json.Unmarshal(*v, &virtualMachineCaptureResultProperties)
+ if err != nil {
+ return err
+ }
+ vmcr.VirtualMachineCaptureResultProperties = &virtualMachineCaptureResultProperties
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ vmcr.ID = &ID
+ }
+ }
+ }
+
+ return nil
+}
+
+// VirtualMachineCaptureResultProperties compute-specific operation properties, including output
+type VirtualMachineCaptureResultProperties struct {
+ // Output - Operation output data (raw JSON)
+ Output interface{} `json:"output,omitempty"`
+}
+
+// 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"`
+ // 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"`
+}
+
+// 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.Settings != nil {
+ objectMap["settings"] = vmep.Settings
+ }
+ if vmep.ProtectedSettings != nil {
+ objectMap["protectedSettings"] = vmep.ProtectedSettings
+ }
+ if vmep.InstanceView != nil {
+ objectMap["instanceView"] = vmep.InstanceView
+ }
+ 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)
+}
+
+// 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) (OperationStatusResponse, error)
+}
+
+// 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)
+}
+
+// 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"`
+ // 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"`
+}
+
+// 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"`
+}
+
+// VirtualMachineIdentity identity for the virtual machine.
+type VirtualMachineIdentity struct {
+ // PrincipalID - READ-ONLY; The principal id of virtual machine identity.
+ PrincipalID *string `json:"principalId,omitempty"`
+ // TenantID - READ-ONLY; The tenant id associated with the virtual machine.
+ TenantID *string `json:"tenantId,omitempty"`
+ // Type - The type of identity used for the virtual machine. Currently, the only supported type is 'SystemAssigned', which implicitly creates an identity. Possible values include: 'SystemAssigned'
+ Type ResourceIdentityType `json:"type,omitempty"`
+}
+
+// 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
+ }
+ 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"`
+ // 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.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 "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ vmi.ID = &ID
+ }
+ }
+ }
+
+ return nil
+}
+
+// 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"`
+}
+
+// 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"`
+ // 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.ID != nil {
+ objectMap["id"] = vmir.ID
+ }
+ 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"`
+ // 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"`
+ // 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"`
+}
+
+// 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,
+ }
+}
+
+// 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"`
+ // OsProfile - Specifies the operating system settings for the virtual machine.
+ OsProfile *OSProfile `json:"osProfile,omitempty"`
+ // NetworkProfile - Specifies the network interfaces of the virtual machine.
+ NetworkProfile *NetworkProfile `json:"networkProfile,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 [Manage the availability of virtual machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json).
For more information on Azure planned maintenance, see [Planned maintenance for virtual machines in Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json)
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"`
+ // 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. This element is only used for images that contain the Windows Server operating system.
Possible values are:
Windows_Client
Windows_Server
If this element is included in a request for an update, the value must match the initial value. This value cannot be updated.
For more information, see [Azure Hybrid Use Benefit for Windows Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json)
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"`
+}
+
+// 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.OsProfile != nil {
+ objectMap["osProfile"] = vmp.OsProfile
+ }
+ if vmp.NetworkProfile != nil {
+ objectMap["networkProfile"] = vmp.NetworkProfile
+ }
+ if vmp.DiagnosticsProfile != nil {
+ objectMap["diagnosticsProfile"] = vmp.DiagnosticsProfile
+ }
+ if vmp.AvailabilitySet != nil {
+ objectMap["availabilitySet"] = vmp.AvailabilitySet
+ }
+ if vmp.LicenseType != nil {
+ objectMap["licenseType"] = vmp.LicenseType
+ }
+ return json.Marshal(objectMap)
+}
+
+// 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"`
+ // 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.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 "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"`
+ // 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"`
+}
+
+// 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"`
+ *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 "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"`
+}
+
+// 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"`
+ // 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"`
+}
+
+// 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.Settings != nil {
+ objectMap["settings"] = vmssep.Settings
+ }
+ if vmssep.ProtectedSettings != nil {
+ objectMap["protectedSettings"] = vmssep.ProtectedSettings
+ }
+ 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)
+}
+
+// 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) (OperationStatusResponse, error)
+}
+
+// VirtualMachineScaleSetIdentity identity for the virtual machine scale set.
+type VirtualMachineScaleSetIdentity struct {
+ // PrincipalID - READ-ONLY; The principal id of virtual machine scale set identity.
+ PrincipalID *string `json:"principalId,omitempty"`
+ // TenantID - READ-ONLY; The tenant id associated with the virtual machine scale set.
+ TenantID *string `json:"tenantId,omitempty"`
+ // Type - The type of identity used for the virtual machine scale set. Currently, the only supported type is 'SystemAssigned', which implicitly creates an identity. Possible values include: 'SystemAssigned'
+ Type ResourceIdentityType `json:"type,omitempty"`
+}
+
+// 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
+ }
+ 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"`
+}
+
+// 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"`
+}
+
+// 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: 'IPv4', 'IPv6'
+ 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"`
+ // 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 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 load balancer
+ LoadBalancerInboundNatPools *[]SubResource `json:"loadBalancerInboundNatPools,omitempty"`
+}
+
+// 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. Possible values are: Standard_LRS or Premium_LRS. Possible values include: 'StandardLRS', 'PremiumLRS'
+ StorageAccountType StorageAccountTypes `json:"storageAccountType,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"`
+ // 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"`
+}
+
+// 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"`
+}
+
+// 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"`
+ // 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"`
+ // 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 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.
For root access to the Linux VM, see [Using root privileges on Linux virtual machines in Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
For a list of built-in system users on Linux that should not be used in this field, see [Selecting User Names for Linux on Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
+ 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_])
For resetting the password, see [How to reset the Remote Desktop service or its login password in a Windows VM](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-reset-rdp?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json)
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/azure/virtual-machines/virtual-machines-linux-using-vmaccess-extension?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#reset-root-password)
+ 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/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
+ 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/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
For running non-endorsed distributions, see [Information for Non-Endorsed Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json).
+ LinuxConfiguration *LinuxConfiguration `json:"linuxConfiguration,omitempty"`
+ // Secrets - Specifies set of certificates that should be installed onto the virtual machines in the scale set.
+ 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"`
+ // 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"`
+ // 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.
+ SinglePlacementGroup *bool `json:"singlePlacementGroup,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.VirtualMachineProfile != nil {
+ objectMap["virtualMachineProfile"] = vmssp.VirtualMachineProfile
+ }
+ if vmssp.Overprovision != nil {
+ objectMap["overprovision"] = vmssp.Overprovision
+ }
+ if vmssp.SinglePlacementGroup != nil {
+ objectMap["singlePlacementGroup"] = vmssp.SinglePlacementGroup
+ }
+ 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"`
+}
+
+// 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
+ }
+ 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
+ }
+ }
+ }
+
+ 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"`
+}
+
+// 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) (OperationStatusResponse, error)
+}
+
+// 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) (OperationStatusResponse, error)
+}
+
+// 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)
+}
+
+// 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) (OperationStatusResponse, error)
+}
+
+// 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) (OperationStatusResponse, error)
+}
+
+// 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) (OperationStatusResponse, error)
+}
+
+// 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"`
+}
+
+// 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"`
+}
+
+// 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) (OperationStatusResponse, error)
+}
+
+// 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) (OperationStatusResponse, error)
+}
+
+// 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) (OperationStatusResponse, error)
+}
+
+// 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) (OperationStatusResponse, error)
+}
+
+// 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) (OperationStatusResponse, error)
+}
+
+// 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/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json).
+ 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/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json).
+ 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)
+}
+
+// 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) (OperationStatusResponse, error)
+}
+
+// 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.
+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. 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 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: 'IPv4', 'IPv6'
+ PrivateIPAddressVersion IPVersion `json:"privateIPAddressVersion,omitempty"`
+ // ApplicationGatewayBackendAddressPools - The application gateway backend address pools.
+ ApplicationGatewayBackendAddressPools *[]SubResource `json:"applicationGatewayBackendAddressPools,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"`
+ // 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"`
+}
+
+// VirtualMachineScaleSetUpdateNetworkProfile describes a virtual machine scale set network profile.
+type VirtualMachineScaleSetUpdateNetworkProfile struct {
+ // NetworkInterfaceConfigurations - The list of network configurations.
+ NetworkInterfaceConfigurations *[]VirtualMachineScaleSetUpdateNetworkConfiguration `json:"networkInterfaceConfigurations,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"`
+ // 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"`
+ // 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"`
+ // 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"`
+}
+
+// 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"`
+}
+
+// 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"`
+ // 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"`
+}
+
+// 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"`
+ // 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 "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
+}
+
+// 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"`
+}
+
+// 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"`
+ // 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"`
+ // 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.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,
+ }
+}
+
+// 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"`
+ // 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. This element is only used for images that contain the Windows Server operating system.
Possible values are:
Windows_Client
Windows_Server
If this element is included in a request for an update, the value must match the initial value. This value cannot be updated.
For more information, see [Azure Hybrid Use Benefit for Windows Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json)
Minimum api-version: 2015-06-15
+ LicenseType *string `json:"licenseType,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"`
+ // OsProfile - Specifies the operating system settings for the virtual machine.
+ OsProfile *OSProfile `json:"osProfile,omitempty"`
+ // NetworkProfile - Specifies the network interfaces of the virtual machine.
+ NetworkProfile *NetworkProfile `json:"networkProfile,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 [Manage the availability of virtual machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json).
For more information on Azure planned maintenance, see [Planned maintenance for virtual machines in Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json)
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. This element is only used for images that contain the Windows Server operating system.
Possible values are:
Windows_Client
Windows_Server
If this element is included in a request for an update, the value must match the initial value. This value cannot be updated.
For more information, see [Azure Hybrid Use Benefit for Windows Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json)
Minimum api-version: 2015-06-15
+ LicenseType *string `json:"licenseType,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.OsProfile != nil {
+ objectMap["osProfile"] = vmssvp.OsProfile
+ }
+ if vmssvp.NetworkProfile != nil {
+ objectMap["networkProfile"] = vmssvp.NetworkProfile
+ }
+ if vmssvp.DiagnosticsProfile != nil {
+ objectMap["diagnosticsProfile"] = vmssvp.DiagnosticsProfile
+ }
+ if vmssvp.AvailabilitySet != nil {
+ objectMap["availabilitySet"] = vmssvp.AvailabilitySet
+ }
+ if vmssvp.LicenseType != nil {
+ objectMap["licenseType"] = vmssvp.LicenseType
+ }
+ return json.Marshal(objectMap)
+}
+
+// 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) (OperationStatusResponse, error)
+}
+
+// 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) (OperationStatusResponse, error)
+}
+
+// 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) (OperationStatusResponse, error)
+}
+
+// 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) (OperationStatusResponse, error)
+}
+
+// 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) (OperationStatusResponse, error)
+}
+
+// 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) (OperationStatusResponse, error)
+}
+
+// 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) (OperationStatusResponse, error)
+}
+
+// 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)
+}
+
+// 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) (OperationStatusResponse, error)
+}
+
+// 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)
+}
+
+// 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) (OperationStatusResponse, error)
+}
+
+// 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) (OperationStatusResponse, error)
+}
+
+// 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.
+ 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"`
+}
+
+// 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) (OperationStatusResponse, error)
+}
+
+// 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) (OperationStatusResponse, error)
+}
+
+// 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) (OperationStatusResponse, error)
+}
+
+// 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) (OperationStatusResponse, error)
+}
+
+// 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)
+}
+
+// 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) (OperationStatusResponse, error)
+}
+
+// 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"`
+}
+
+// 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 virtual machine is enabled for automatic updates.
+ EnableAutomaticUpdates *bool `json:"enableAutomaticUpdates,omitempty"`
+ // TimeZone - Specifies the time zone of the virtual machine. e.g. "Pacific Standard Time"
+ 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"`
+ // WinRM - Specifies the Windows Remote Management listeners. This enables remote Windows PowerShell.
+ WinRM *WinRMConfiguration `json:"winRM,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 listener.
Possible values are: **http**
**https**. Possible values include: 'HTTP', 'HTTPS'
+ 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/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-05-01/resources/operations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2017-03-30/compute/resourceskus.go
similarity index 52%
rename from vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-05-01/resources/operations.go
rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2017-03-30/compute/resourceskus.go
index 58f10b9ce11..3127e4c2b10 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-05-01/resources/operations.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2017-03-30/compute/resourceskus.go
@@ -1,4 +1,4 @@
-package resources
+package compute
// Copyright (c) Microsoft and contributors. All rights reserved.
//
@@ -25,30 +25,30 @@ import (
"net/http"
)
-// OperationsClient is the provides operations for working with resources and resource groups.
-type OperationsClient struct {
+// ResourceSkusClient is the compute Client
+type ResourceSkusClient struct {
BaseClient
}
-// NewOperationsClient creates an instance of the OperationsClient client.
-func NewOperationsClient(subscriptionID string) OperationsClient {
- return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID)
+// NewResourceSkusClient creates an instance of the ResourceSkusClient client.
+func NewResourceSkusClient(subscriptionID string) ResourceSkusClient {
+ return NewResourceSkusClientWithBaseURI(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)}
+// 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 lists all of the available Microsoft.Resources REST API operations.
-func (client OperationsClient) List(ctx context.Context) (result OperationListResultPage, err error) {
+// List gets the list of Microsoft.Compute SKUs available for your Subscription.
+func (client ResourceSkusClient) List(ctx context.Context) (result ResourceSkusResultPage, err error) {
if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/OperationsClient.List")
+ ctx = tracing.StartSpan(ctx, fqdn+"/ResourceSkusClient.List")
defer func() {
sc := -1
- if result.olr.Response.Response != nil {
- sc = result.olr.Response.Response.StatusCode
+ if result.rsr.Response.Response != nil {
+ sc = result.rsr.Response.Response.StatusCode
}
tracing.EndSpan(ctx, sc, err)
}()
@@ -56,31 +56,37 @@ func (client OperationsClient) List(ctx context.Context) (result OperationListRe
result.fn = client.listNextResults
req, err := client.ListPreparer(ctx)
if err != nil {
- err = autorest.NewErrorWithError(err, "resources.OperationsClient", "List", nil, "Failure preparing request")
+ err = autorest.NewErrorWithError(err, "compute.ResourceSkusClient", "List", nil, "Failure preparing request")
return
}
resp, err := client.ListSender(req)
if err != nil {
- result.olr.Response = autorest.Response{Response: resp}
- err = autorest.NewErrorWithError(err, "resources.OperationsClient", "List", resp, "Failure sending request")
+ result.rsr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.ResourceSkusClient", "List", resp, "Failure sending request")
return
}
- result.olr, err = client.ListResponder(resp)
+ result.rsr, err = client.ListResponder(resp)
if err != nil {
- err = autorest.NewErrorWithError(err, "resources.OperationsClient", "List", resp, "Failure responding to request")
+ err = autorest.NewErrorWithError(err, "compute.ResourceSkusClient", "List", resp, "Failure responding to request")
+ return
}
- if result.olr.hasNextLink() && result.olr.IsEmpty() {
+ if result.rsr.hasNextLink() && result.rsr.IsEmpty() {
err = result.NextWithContext(ctx)
+ return
}
return
}
// ListPreparer prepares the List request.
-func (client OperationsClient) ListPreparer(ctx context.Context) (*http.Request, error) {
- const APIVersion = "2019-05-01"
+func (client ResourceSkusClient) ListPreparer(ctx context.Context) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2017-03-30"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -88,20 +94,20 @@ func (client OperationsClient) ListPreparer(ctx context.Context) (*http.Request,
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
- autorest.WithPath("/providers/Microsoft.Resources/operations"),
+ 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 OperationsClient) ListSender(req *http.Request) (*http.Response, error) {
- return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+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 OperationsClient) ListResponder(resp *http.Response) (result OperationListResult, err error) {
+func (client ResourceSkusClient) ListResponder(resp *http.Response) (result ResourceSkusResult, err error) {
err = autorest.Respond(
resp,
azure.WithErrorUnlessStatusCode(http.StatusOK),
@@ -112,10 +118,10 @@ func (client OperationsClient) ListResponder(resp *http.Response) (result Operat
}
// listNextResults retrieves the next set of results, if any.
-func (client OperationsClient) listNextResults(ctx context.Context, lastResults OperationListResult) (result OperationListResult, err error) {
- req, err := lastResults.operationListResultPreparer(ctx)
+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, "resources.OperationsClient", "listNextResults", nil, "Failure preparing next results request")
+ return result, autorest.NewErrorWithError(err, "compute.ResourceSkusClient", "listNextResults", nil, "Failure preparing next results request")
}
if req == nil {
return
@@ -123,19 +129,19 @@ func (client OperationsClient) listNextResults(ctx context.Context, lastResults
resp, err := client.ListSender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
- return result, autorest.NewErrorWithError(err, "resources.OperationsClient", "listNextResults", resp, "Failure sending next results request")
+ 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, "resources.OperationsClient", "listNextResults", resp, "Failure responding to next results request")
+ 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 OperationsClient) ListComplete(ctx context.Context) (result OperationListResultIterator, err error) {
+func (client ResourceSkusClient) ListComplete(ctx context.Context) (result ResourceSkusResultIterator, err error) {
if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/OperationsClient.List")
+ ctx = tracing.StartSpan(ctx, fqdn+"/ResourceSkusClient.List")
defer func() {
sc := -1
if result.Response().Response.Response != nil {
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2017-03-30/compute/snapshots.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2017-03-30/compute/snapshots.go
new file mode 100644
index 00000000000..3d8f73a3bb7
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2017-03-30/compute/snapshots.go
@@ -0,0 +1,896 @@
+package compute
+
+// Copyright (c) Microsoft and contributors. All rights reserved.
+//
+// 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 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.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: snapshot,
+ Constraints: []validation.Constraint{{Target: "snapshot.DiskProperties", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "snapshot.DiskProperties.CreationData", Name: validation.Null, Rule: true,
+ Chain: []validation.Constraint{{Target: "snapshot.DiskProperties.CreationData.ImageReference", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "snapshot.DiskProperties.CreationData.ImageReference.ID", Name: validation.Null, Rule: true, Chain: nil}}},
+ }},
+ {Target: "snapshot.DiskProperties.EncryptionSettings", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "snapshot.DiskProperties.EncryptionSettings.DiskEncryptionKey", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "snapshot.DiskProperties.EncryptionSettings.DiskEncryptionKey.SourceVault", Name: validation.Null, Rule: true, Chain: nil},
+ {Target: "snapshot.DiskProperties.EncryptionSettings.DiskEncryptionKey.SecretURL", Name: validation.Null, Rule: true, Chain: nil},
+ }},
+ {Target: "snapshot.DiskProperties.EncryptionSettings.KeyEncryptionKey", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "snapshot.DiskProperties.EncryptionSettings.KeyEncryptionKey.SourceVault", Name: validation.Null, Rule: true, Chain: nil},
+ {Target: "snapshot.DiskProperties.EncryptionSettings.KeyEncryptionKey.KeyURL", 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", nil, "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 = "2017-03-30"
+ 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
+ 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 = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.SnapshotsCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ s.Response.Response, err = future.GetResult(sender)
+ if s.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "compute.SnapshotsCreateOrUpdateFuture", "Result", nil, "received nil response and error")
+ }
+ if 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
+ }
+ 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.Response() != nil {
+ sc = result.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", nil, "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 = "2017-03-30"
+ 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
+ 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 = func(client SnapshotsClient) (osr OperationStatusResponse, 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 {
+ err = azure.NewAsyncOpIncompleteError("compute.SnapshotsDeleteFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ osr.Response.Response, err = future.GetResult(sender)
+ if osr.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "compute.SnapshotsDeleteFuture", "Result", nil, "received nil response and error")
+ }
+ if err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.DeleteResponder(osr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.SnapshotsDeleteFuture", "Result", osr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+ }
+ 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 OperationStatusResponse, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{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 = "2017-03-30"
+ 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.Response() != nil {
+ sc = result.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", nil, "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 = "2017-03-30"
+ 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
+ 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 = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.SnapshotsGrantAccessFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ au.Response.Response, err = future.GetResult(sender)
+ if au.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "compute.SnapshotsGrantAccessFuture", "Result", nil, "received nil response and error")
+ }
+ if 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
+ }
+ 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 = "2017-03-30"
+ 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 = "2017-03-30"
+ 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.Response() != nil {
+ sc = result.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", nil, "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 = "2017-03-30"
+ 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
+ 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 = func(client SnapshotsClient) (osr OperationStatusResponse, 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 {
+ err = azure.NewAsyncOpIncompleteError("compute.SnapshotsRevokeAccessFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ osr.Response.Response, err = future.GetResult(sender)
+ if osr.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "compute.SnapshotsRevokeAccessFuture", "Result", nil, "received nil response and error")
+ }
+ if err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.RevokeAccessResponder(osr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.SnapshotsRevokeAccessFuture", "Result", osr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+ }
+ 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 OperationStatusResponse, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{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.Response() != nil {
+ sc = result.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", nil, "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 = "2017-03-30"
+ 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
+ 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 = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.SnapshotsUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ s.Response.Response, err = future.GetResult(sender)
+ if s.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "compute.SnapshotsUpdateFuture", "Result", nil, "received nil response and error")
+ }
+ if 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
+ }
+ 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/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2017-03-30/compute/usage.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2017-03-30/compute/usage.go
new file mode 100644
index 00000000000..08213ae38b1
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2017-03-30/compute/usage.go
@@ -0,0 +1,166 @@
+package compute
+
+// Copyright (c) Microsoft and contributors. All rights reserved.
+//
+// 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 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 = "2017-03-30"
+ 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/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2017-03-30/compute/version.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2017-03-30/compute/version.go
new file mode 100644
index 00000000000..f7e3d85da74
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2017-03-30/compute/version.go
@@ -0,0 +1,30 @@
+package compute
+
+import "github.com/Azure/azure-sdk-for-go/version"
+
+// Copyright (c) Microsoft and contributors. All rights reserved.
+//
+// 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 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/2017-03-30"
+}
+
+// Version returns the semantic version (see http://semver.org) of the client.
+func Version() string {
+ return version.Number
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2017-03-30/compute/virtualmachineextensionimages.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2017-03-30/compute/virtualmachineextensionimages.go
new file mode 100644
index 00000000000..f1098e4f0ca
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2017-03-30/compute/virtualmachineextensionimages.go
@@ -0,0 +1,281 @@
+package compute
+
+// Copyright (c) Microsoft and contributors. All rights reserved.
+//
+// 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 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 = "2017-03-30"
+ 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 = "2017-03-30"
+ 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 = "2017-03-30"
+ 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/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2017-03-30/compute/virtualmachineextensions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2017-03-30/compute/virtualmachineextensions.go
new file mode 100644
index 00000000000..e20f33bdbf1
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2017-03-30/compute/virtualmachineextensions.go
@@ -0,0 +1,440 @@
+package compute
+
+// Copyright (c) Microsoft and contributors. All rights reserved.
+//
+// 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 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.Response() != nil {
+ sc = result.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", nil, "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 = "2017-03-30"
+ 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
+ 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 = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineExtensionsCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ vme.Response.Response, err = future.GetResult(sender)
+ if vme.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsCreateOrUpdateFuture", "Result", nil, "received nil response and error")
+ }
+ if 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
+ }
+ 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.Response() != nil {
+ sc = result.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", nil, "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 = "2017-03-30"
+ 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
+ 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 = func(client VirtualMachineExtensionsClient) (osr OperationStatusResponse, 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 {
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineExtensionsDeleteFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ osr.Response.Response, err = future.GetResult(sender)
+ if osr.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsDeleteFuture", "Result", nil, "received nil response and error")
+ }
+ if err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.DeleteResponder(osr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsDeleteFuture", "Result", osr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+ }
+ 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 OperationStatusResponse, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{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 = "2017-03-30"
+ 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
+}
+
+// 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.Response() != nil {
+ sc = result.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", nil, "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 = "2017-03-30"
+ 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
+ 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 = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineExtensionsUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ vme.Response.Response, err = future.GetResult(sender)
+ if vme.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsUpdateFuture", "Result", nil, "received nil response and error")
+ }
+ if 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
+ }
+ 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/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2017-03-30/compute/virtualmachineimages.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2017-03-30/compute/virtualmachineimages.go
new file mode 100644
index 00000000000..e55f93dc3ab
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2017-03-30/compute/virtualmachineimages.go
@@ -0,0 +1,443 @@
+package compute
+
+// Copyright (c) Microsoft and contributors. All rights reserved.
+//
+// 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 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 = "2017-03-30"
+ 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 = "2017-03-30"
+ 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 = "2017-03-30"
+ 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 = "2017-03-30"
+ 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 = "2017-03-30"
+ 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/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2017-03-30/compute/virtualmachineruncommands.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2017-03-30/compute/virtualmachineruncommands.go
new file mode 100644
index 00000000000..6a36dc83ca6
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2017-03-30/compute/virtualmachineruncommands.go
@@ -0,0 +1,248 @@
+package compute
+
+// Copyright (c) Microsoft and contributors. All rights reserved.
+//
+// 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 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)}
+}
+
+// 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 = "2017-03-30"
+ 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
+}
+
+// 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 = "2017-03-30"
+ 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
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2017-03-30/compute/virtualmachines.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2017-03-30/compute/virtualmachines.go
new file mode 100644
index 00000000000..d7c34945506
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2017-03-30/compute/virtualmachines.go
@@ -0,0 +1,1944 @@
+package compute
+
+// Copyright (c) Microsoft and contributors. All rights reserved.
+//
+// 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 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)}
+}
+
+// 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.Response() != nil {
+ sc = result.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", nil, "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 = "2017-03-30"
+ 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
+ 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 = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesCaptureFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ vmcr.Response.Response, err = future.GetResult(sender)
+ if vmcr.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesCaptureFuture", "Result", nil, "received nil response and error")
+ }
+ if 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
+ }
+ 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.Response() != nil {
+ sc = result.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", nil, "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 = "2017-03-30"
+ 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
+ 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 = func(client VirtualMachinesClient) (osr OperationStatusResponse, 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 {
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesConvertToManagedDisksFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ osr.Response.Response, err = future.GetResult(sender)
+ if osr.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesConvertToManagedDisksFuture", "Result", nil, "received nil response and error")
+ }
+ if err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.ConvertToManagedDisksResponder(osr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesConvertToManagedDisksFuture", "Result", osr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+ }
+ 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 OperationStatusResponse, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// CreateOrUpdate the operation to create or update a virtual machine.
+// 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.Response() != nil {
+ sc = result.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", nil, "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 = "2017-03-30"
+ 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
+ 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 = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ VM.Response.Response, err = future.GetResult(sender)
+ if VM.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesCreateOrUpdateFuture", "Result", nil, "received nil response and error")
+ }
+ if 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
+ }
+ 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.
+func (client VirtualMachinesClient) Deallocate(ctx context.Context, resourceGroupName string, VMName string) (result VirtualMachinesDeallocateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.Deallocate")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.DeallocatePreparer(ctx, resourceGroupName, VMName)
+ 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", nil, "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// DeallocatePreparer prepares the Deallocate request.
+func (client VirtualMachinesClient) DeallocatePreparer(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 = "2017-03-30"
+ 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}/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
+ 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 = func(client VirtualMachinesClient) (osr OperationStatusResponse, 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 {
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesDeallocateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ osr.Response.Response, err = future.GetResult(sender)
+ if osr.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesDeallocateFuture", "Result", nil, "received nil response and error")
+ }
+ if err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.DeallocateResponder(osr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesDeallocateFuture", "Result", osr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+ }
+ 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 OperationStatusResponse, 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 the operation to delete a virtual machine.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMName - the name of the virtual machine.
+func (client VirtualMachinesClient) Delete(ctx context.Context, resourceGroupName string, VMName string) (result VirtualMachinesDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.DeletePreparer(ctx, resourceGroupName, VMName)
+ 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", nil, "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client VirtualMachinesClient) DeletePreparer(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 = "2017-03-30"
+ 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}", 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
+ 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 = func(client VirtualMachinesClient) (osr OperationStatusResponse, 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 {
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesDeleteFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ osr.Response.Response, err = future.GetResult(sender)
+ if osr.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesDeleteFuture", "Result", nil, "received nil response and error")
+ }
+ if err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.DeleteResponder(osr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesDeleteFuture", "Result", osr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+ }
+ 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 OperationStatusResponse, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// Generalize sets the state of the virtual machine to generalized.
+// 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 OperationStatusResponse, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.Generalize")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.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 = autorest.Response{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 = "2017-03-30"
+ 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 OperationStatusResponse, 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 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.
+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 = "2017-03-30"
+ 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
+}
+
+// GetExtensions 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 VirtualMachinesClient) GetExtensions(ctx context.Context, resourceGroupName string, VMName string, expand string) (result VirtualMachineExtensionsListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.GetExtensions")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.GetExtensionsPreparer(ctx, resourceGroupName, VMName, expand)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "GetExtensions", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetExtensionsSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "GetExtensions", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetExtensionsResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "GetExtensions", resp, "Failure responding to request")
+ return
+ }
+
+ return
+}
+
+// GetExtensionsPreparer prepares the GetExtensions request.
+func (client VirtualMachinesClient) GetExtensionsPreparer(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 = "2017-03-30"
+ 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))
+}
+
+// GetExtensionsSender sends the GetExtensions request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachinesClient) GetExtensionsSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetExtensionsResponder handles the response to the GetExtensions request. The method always
+// closes the http.Response Body.
+func (client VirtualMachinesClient) GetExtensionsResponder(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
+}
+
+// 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 = "2017-03-30"
+ 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 = "2017-03-30"
+ 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.
+func (client VirtualMachinesClient) ListAll(ctx context.Context) (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)
+ 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) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2017-03-30"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ 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) (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)
+ 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 = "2017-03-30"
+ 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 = "2017-03-30"
+ 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.Response() != nil {
+ sc = result.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", nil, "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 = "2017-03-30"
+ 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
+ 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 = func(client VirtualMachinesClient) (osr OperationStatusResponse, 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 {
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesPerformMaintenanceFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ osr.Response.Response, err = future.GetResult(sender)
+ if osr.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesPerformMaintenanceFuture", "Result", nil, "received nil response and error")
+ }
+ if err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.PerformMaintenanceResponder(osr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesPerformMaintenanceFuture", "Result", osr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+ }
+ 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 OperationStatusResponse, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{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.
+func (client VirtualMachinesClient) PowerOff(ctx context.Context, resourceGroupName string, VMName string) (result VirtualMachinesPowerOffFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.PowerOff")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.PowerOffPreparer(ctx, resourceGroupName, VMName)
+ 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", nil, "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// PowerOffPreparer prepares the PowerOff request.
+func (client VirtualMachinesClient) PowerOffPreparer(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 = "2017-03-30"
+ 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}/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
+ 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 = func(client VirtualMachinesClient) (osr OperationStatusResponse, 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 {
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesPowerOffFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ osr.Response.Response, err = future.GetResult(sender)
+ if osr.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesPowerOffFuture", "Result", nil, "received nil response and error")
+ }
+ if err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.PowerOffResponder(osr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesPowerOffFuture", "Result", osr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+ }
+ 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 OperationStatusResponse, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{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.Response() != nil {
+ sc = result.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", nil, "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 = "2017-03-30"
+ 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
+ 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 = func(client VirtualMachinesClient) (osr OperationStatusResponse, 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 {
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesRedeployFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ osr.Response.Response, err = future.GetResult(sender)
+ if osr.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesRedeployFuture", "Result", nil, "received nil response and error")
+ }
+ if err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.RedeployResponder(osr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesRedeployFuture", "Result", osr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+ }
+ 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 OperationStatusResponse, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{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.Response() != nil {
+ sc = result.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", nil, "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 = "2017-03-30"
+ 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
+ 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 = func(client VirtualMachinesClient) (osr OperationStatusResponse, 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 {
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesRestartFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ osr.Response.Response, err = future.GetResult(sender)
+ if osr.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesRestartFuture", "Result", nil, "received nil response and error")
+ }
+ if err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.RestartResponder(osr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesRestartFuture", "Result", osr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+ }
+ 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 OperationStatusResponse, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
+ 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.Response() != nil {
+ sc = result.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", nil, "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 = "2017-03-30"
+ 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
+ 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 = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesRunCommandFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ rcr.Response.Response, err = future.GetResult(sender)
+ if rcr.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesRunCommandFuture", "Result", nil, "received nil response and error")
+ }
+ if 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
+ }
+ 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
+}
+
+// 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.Response() != nil {
+ sc = result.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", nil, "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 = "2017-03-30"
+ 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
+ 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 = func(client VirtualMachinesClient) (osr OperationStatusResponse, 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 {
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesStartFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ osr.Response.Response, err = future.GetResult(sender)
+ if osr.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesStartFuture", "Result", nil, "received nil response and error")
+ }
+ if err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.StartResponder(osr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesStartFuture", "Result", osr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+ }
+ 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 OperationStatusResponse, 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/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2017-03-30/compute/virtualmachinescalesetextensions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2017-03-30/compute/virtualmachinescalesetextensions.go
new file mode 100644
index 00000000000..a92c4554b53
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2017-03-30/compute/virtualmachinescalesetextensions.go
@@ -0,0 +1,452 @@
+package compute
+
+// Copyright (c) Microsoft and contributors. All rights reserved.
+//
+// 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 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.Response() != nil {
+ sc = result.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", nil, "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 = "2017-03-30"
+ 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}/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
+ 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 = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetExtensionsCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ vmsse.Response.Response, err = future.GetResult(sender)
+ if vmsse.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsCreateOrUpdateFuture", "Result", nil, "received nil response and error")
+ }
+ if 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
+ }
+ 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.Response() != nil {
+ sc = result.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", nil, "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 = "2017-03-30"
+ 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
+ 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 = func(client VirtualMachineScaleSetExtensionsClient) (osr OperationStatusResponse, 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 {
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetExtensionsDeleteFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ osr.Response.Response, err = future.GetResult(sender)
+ if osr.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsDeleteFuture", "Result", nil, "received nil response and error")
+ }
+ if err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.DeleteResponder(osr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsDeleteFuture", "Result", osr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+ }
+ 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 OperationStatusResponse, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{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 = "2017-03-30"
+ 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 = "2017-03-30"
+ 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
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2017-03-30/compute/virtualmachinescalesetrollingupgrades.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2017-03-30/compute/virtualmachinescalesetrollingupgrades.go
new file mode 100644
index 00000000000..c7e26fd164e
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2017-03-30/compute/virtualmachinescalesetrollingupgrades.go
@@ -0,0 +1,323 @@
+package compute
+
+// Copyright (c) Microsoft and contributors. All rights reserved.
+//
+// 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 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.Response() != nil {
+ sc = result.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", nil, "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 = "2017-03-30"
+ 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
+ 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 = func(client VirtualMachineScaleSetRollingUpgradesClient) (osr OperationStatusResponse, 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 {
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetRollingUpgradesCancelFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ osr.Response.Response, err = future.GetResult(sender)
+ if osr.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesCancelFuture", "Result", nil, "received nil response and error")
+ }
+ if err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.CancelResponder(osr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesCancelFuture", "Result", osr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+ }
+ 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 OperationStatusResponse, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{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 = "2017-03-30"
+ 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
+}
+
+// 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.Response() != nil {
+ sc = result.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", nil, "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 = "2017-03-30"
+ 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
+ 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 = func(client VirtualMachineScaleSetRollingUpgradesClient) (osr OperationStatusResponse, 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 {
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetRollingUpgradesStartOSUpgradeFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ osr.Response.Response, err = future.GetResult(sender)
+ if osr.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesStartOSUpgradeFuture", "Result", nil, "received nil response and error")
+ }
+ if err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.StartOSUpgradeResponder(osr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesStartOSUpgradeFuture", "Result", osr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+ }
+ 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 OperationStatusResponse, 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/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2017-03-30/compute/virtualmachinescalesets.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2017-03-30/compute/virtualmachinescalesets.go
new file mode 100644
index 00000000000..44b8756df59
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2017-03-30/compute/virtualmachinescalesets.go
@@ -0,0 +1,1743 @@
+package compute
+
+// Copyright (c) Microsoft and contributors. All rights reserved.
+//
+// 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 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)}
+}
+
+// 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.Response() != nil {
+ sc = result.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", nil, "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 = "2017-03-30"
+ 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
+ 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 = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ vmss.Response.Response, err = future.GetResult(sender)
+ if vmss.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsCreateOrUpdateFuture", "Result", nil, "received nil response and error")
+ }
+ if 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
+ }
+ 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.Response() != nil {
+ sc = result.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", nil, "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 = "2017-03-30"
+ 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
+ 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 = func(client VirtualMachineScaleSetsClient) (osr OperationStatusResponse, 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 {
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsDeallocateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ osr.Response.Response, err = future.GetResult(sender)
+ if osr.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsDeallocateFuture", "Result", nil, "received nil response and error")
+ }
+ if err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.DeallocateResponder(osr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsDeallocateFuture", "Result", osr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+ }
+ 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 OperationStatusResponse, 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 VM scale set.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMScaleSetName - the name of the VM scale set.
+func (client VirtualMachineScaleSetsClient) Delete(ctx context.Context, resourceGroupName string, VMScaleSetName string) (result VirtualMachineScaleSetsDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.DeletePreparer(ctx, resourceGroupName, VMScaleSetName)
+ 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", nil, "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client VirtualMachineScaleSetsClient) DeletePreparer(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 = "2017-03-30"
+ 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}", 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
+ 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 = func(client VirtualMachineScaleSetsClient) (osr OperationStatusResponse, 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 {
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsDeleteFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ osr.Response.Response, err = future.GetResult(sender)
+ if osr.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsDeleteFuture", "Result", nil, "received nil response and error")
+ }
+ if err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.DeleteResponder(osr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsDeleteFuture", "Result", osr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+ }
+ 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 OperationStatusResponse, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{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.
+func (client VirtualMachineScaleSetsClient) DeleteInstances(ctx context.Context, resourceGroupName string, VMScaleSetName string, VMInstanceIDs VirtualMachineScaleSetVMInstanceRequiredIDs) (result VirtualMachineScaleSetsDeleteInstancesFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.DeleteInstances")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.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)
+ 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", nil, "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// DeleteInstancesPreparer prepares the DeleteInstances request.
+func (client VirtualMachineScaleSetsClient) DeleteInstancesPreparer(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 = "2017-03-30"
+ 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}/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
+ 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 = func(client VirtualMachineScaleSetsClient) (osr OperationStatusResponse, 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 {
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsDeleteInstancesFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ osr.Response.Response, err = future.GetResult(sender)
+ if osr.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsDeleteInstancesFuture", "Result", nil, "received nil response and error")
+ }
+ if err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.DeleteInstancesResponder(osr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsDeleteInstancesFuture", "Result", osr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+ }
+ 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 OperationStatusResponse, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
+ 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.
+func (client VirtualMachineScaleSetsClient) Get(ctx context.Context, resourceGroupName string, VMScaleSetName string) (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)
+ 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) (*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 = "2017-03-30"
+ 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}", 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 = "2017-03-30"
+ 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
+}
+
+// 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 = "2017-03-30"
+ 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 = "2017-03-30"
+ 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
+}
+
+// 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 = "2017-03-30"
+ 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
+}
+
+// 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.
+func (client VirtualMachineScaleSetsClient) PowerOff(ctx context.Context, resourceGroupName string, VMScaleSetName string, VMInstanceIDs *VirtualMachineScaleSetVMInstanceIDs) (result VirtualMachineScaleSetsPowerOffFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.PowerOff")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.PowerOffPreparer(ctx, resourceGroupName, VMScaleSetName, VMInstanceIDs)
+ 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", nil, "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// PowerOffPreparer prepares the PowerOff request.
+func (client VirtualMachineScaleSetsClient) PowerOffPreparer(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 = "2017-03-30"
+ 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}/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
+ 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 = func(client VirtualMachineScaleSetsClient) (osr OperationStatusResponse, 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 {
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsPowerOffFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ osr.Response.Response, err = future.GetResult(sender)
+ if osr.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsPowerOffFuture", "Result", nil, "received nil response and error")
+ }
+ if err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.PowerOffResponder(osr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsPowerOffFuture", "Result", osr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+ }
+ 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 OperationStatusResponse, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// Reimage reimages (upgrade the operating system) 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) Reimage(ctx context.Context, resourceGroupName string, VMScaleSetName string, VMInstanceIDs *VirtualMachineScaleSetVMInstanceIDs) (result VirtualMachineScaleSetsReimageFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.Reimage")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.ReimagePreparer(ctx, resourceGroupName, VMScaleSetName, VMInstanceIDs)
+ 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", nil, "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// ReimagePreparer prepares the Reimage request.
+func (client VirtualMachineScaleSetsClient) ReimagePreparer(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 = "2017-03-30"
+ 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 VMInstanceIDs != nil {
+ preparer = autorest.DecoratePreparer(preparer,
+ autorest.WithJSON(VMInstanceIDs))
+ }
+ 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
+ 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 = func(client VirtualMachineScaleSetsClient) (osr OperationStatusResponse, 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 {
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsReimageFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ osr.Response.Response, err = future.GetResult(sender)
+ if osr.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsReimageFuture", "Result", nil, "received nil response and error")
+ }
+ if err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.ReimageResponder(osr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsReimageFuture", "Result", osr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+ }
+ 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 OperationStatusResponse, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{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.Response() != nil {
+ sc = result.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", nil, "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 = "2017-03-30"
+ 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
+ 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 = func(client VirtualMachineScaleSetsClient) (osr OperationStatusResponse, 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 {
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsReimageAllFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ osr.Response.Response, err = future.GetResult(sender)
+ if osr.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsReimageAllFuture", "Result", nil, "received nil response and error")
+ }
+ if err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.ReimageAllResponder(osr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsReimageAllFuture", "Result", osr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+ }
+ 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 OperationStatusResponse, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{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.Response() != nil {
+ sc = result.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", nil, "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 = "2017-03-30"
+ 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
+ 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 = func(client VirtualMachineScaleSetsClient) (osr OperationStatusResponse, 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 {
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsRestartFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ osr.Response.Response, err = future.GetResult(sender)
+ if osr.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsRestartFuture", "Result", nil, "received nil response and error")
+ }
+ if err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.RestartResponder(osr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsRestartFuture", "Result", osr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+ }
+ 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 OperationStatusResponse, 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 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.Response() != nil {
+ sc = result.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", nil, "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 = "2017-03-30"
+ 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
+ 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 = func(client VirtualMachineScaleSetsClient) (osr OperationStatusResponse, 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 {
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsStartFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ osr.Response.Response, err = future.GetResult(sender)
+ if osr.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsStartFuture", "Result", nil, "received nil response and error")
+ }
+ if err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.StartResponder(osr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsStartFuture", "Result", osr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+ }
+ 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 OperationStatusResponse, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{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.Response() != nil {
+ sc = result.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", nil, "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 = "2017-03-30"
+ 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
+ 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 = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ vmss.Response.Response, err = future.GetResult(sender)
+ if vmss.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsUpdateFuture", "Result", nil, "received nil response and error")
+ }
+ if 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
+ }
+ 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.Response() != nil {
+ sc = result.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", nil, "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 = "2017-03-30"
+ 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
+ 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 = func(client VirtualMachineScaleSetsClient) (osr OperationStatusResponse, 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 {
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsUpdateInstancesFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ osr.Response.Response, err = future.GetResult(sender)
+ if osr.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsUpdateInstancesFuture", "Result", nil, "received nil response and error")
+ }
+ if err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.UpdateInstancesResponder(osr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsUpdateInstancesFuture", "Result", osr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+ }
+ 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 OperationStatusResponse, 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/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2017-03-30/compute/virtualmachinescalesetvms.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2017-03-30/compute/virtualmachinescalesetvms.go
new file mode 100644
index 00000000000..a13025d0887
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2017-03-30/compute/virtualmachinescalesetvms.go
@@ -0,0 +1,1055 @@
+package compute
+
+// Copyright (c) Microsoft and contributors. All rights reserved.
+//
+// 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 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"
+)
+
+// 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.Response() != nil {
+ sc = result.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", nil, "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 = "2017-03-30"
+ 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
+ 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 = func(client VirtualMachineScaleSetVMsClient) (osr OperationStatusResponse, 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 {
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsDeallocateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ osr.Response.Response, err = future.GetResult(sender)
+ if osr.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsDeallocateFuture", "Result", nil, "received nil response and error")
+ }
+ if err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.DeallocateResponder(osr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsDeallocateFuture", "Result", osr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+ }
+ 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 OperationStatusResponse, 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 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) Delete(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string) (result VirtualMachineScaleSetVMsDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMsClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.DeletePreparer(ctx, resourceGroupName, VMScaleSetName, instanceID)
+ 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", nil, "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client VirtualMachineScaleSetVMsClient) DeletePreparer(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 = "2017-03-30"
+ 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}", 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
+ 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 = func(client VirtualMachineScaleSetVMsClient) (osr OperationStatusResponse, 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 {
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsDeleteFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ osr.Response.Response, err = future.GetResult(sender)
+ if osr.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsDeleteFuture", "Result", nil, "received nil response and error")
+ }
+ if err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.DeleteResponder(osr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsDeleteFuture", "Result", osr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+ }
+ 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 OperationStatusResponse, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{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.
+func (client VirtualMachineScaleSetVMsClient) Get(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string) (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)
+ 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) (*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 = "2017-03-30"
+ 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}", 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 = "2017-03-30"
+ 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 = "2017-03-30"
+ 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
+}
+
+// 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.
+func (client VirtualMachineScaleSetVMsClient) PowerOff(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string) (result VirtualMachineScaleSetVMsPowerOffFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMsClient.PowerOff")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.PowerOffPreparer(ctx, resourceGroupName, VMScaleSetName, instanceID)
+ 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", nil, "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// PowerOffPreparer prepares the PowerOff request.
+func (client VirtualMachineScaleSetVMsClient) PowerOffPreparer(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 = "2017-03-30"
+ 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}/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
+ 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 = func(client VirtualMachineScaleSetVMsClient) (osr OperationStatusResponse, 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 {
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsPowerOffFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ osr.Response.Response, err = future.GetResult(sender)
+ if osr.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsPowerOffFuture", "Result", nil, "received nil response and error")
+ }
+ if err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.PowerOffResponder(osr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsPowerOffFuture", "Result", osr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+ }
+ 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 OperationStatusResponse, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{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.
+func (client VirtualMachineScaleSetVMsClient) Reimage(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string) (result VirtualMachineScaleSetVMsReimageFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMsClient.Reimage")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.ReimagePreparer(ctx, resourceGroupName, VMScaleSetName, instanceID)
+ 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", nil, "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// ReimagePreparer prepares the Reimage request.
+func (client VirtualMachineScaleSetVMsClient) ReimagePreparer(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 = "2017-03-30"
+ 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}/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 VirtualMachineScaleSetVMsClient) ReimageSender(req *http.Request) (future VirtualMachineScaleSetVMsReimageFuture, err error) {
+ var resp *http.Response
+ 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 = func(client VirtualMachineScaleSetVMsClient) (osr OperationStatusResponse, 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 {
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsReimageFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ osr.Response.Response, err = future.GetResult(sender)
+ if osr.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsReimageFuture", "Result", nil, "received nil response and error")
+ }
+ if err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.ReimageResponder(osr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsReimageFuture", "Result", osr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+ }
+ 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 OperationStatusResponse, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{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.Response() != nil {
+ sc = result.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", nil, "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 = "2017-03-30"
+ 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
+ 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 = func(client VirtualMachineScaleSetVMsClient) (osr OperationStatusResponse, 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 {
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsReimageAllFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ osr.Response.Response, err = future.GetResult(sender)
+ if osr.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsReimageAllFuture", "Result", nil, "received nil response and error")
+ }
+ if err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.ReimageAllResponder(osr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsReimageAllFuture", "Result", osr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+ }
+ 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 OperationStatusResponse, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{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.Response() != nil {
+ sc = result.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", nil, "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 = "2017-03-30"
+ 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
+ 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 = func(client VirtualMachineScaleSetVMsClient) (osr OperationStatusResponse, 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 {
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsRestartFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ osr.Response.Response, err = future.GetResult(sender)
+ if osr.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsRestartFuture", "Result", nil, "received nil response and error")
+ }
+ if err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.RestartResponder(osr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsRestartFuture", "Result", osr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+ }
+ 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 OperationStatusResponse, 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 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.Response() != nil {
+ sc = result.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", nil, "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 = "2017-03-30"
+ 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
+ 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 = func(client VirtualMachineScaleSetVMsClient) (osr OperationStatusResponse, 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 {
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsStartFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ osr.Response.Response, err = future.GetResult(sender)
+ if osr.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsStartFuture", "Result", nil, "received nil response and error")
+ }
+ if err == nil && osr.Response.Response.StatusCode != http.StatusNoContent {
+ osr, err = client.StartResponder(osr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsStartFuture", "Result", osr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+ }
+ 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 OperationStatusResponse, 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/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2017-03-30/compute/virtualmachinesizes.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2017-03-30/compute/virtualmachinesizes.go
new file mode 100644
index 00000000000..cb7d73ddb57
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2017-03-30/compute/virtualmachinesizes.go
@@ -0,0 +1,124 @@
+package compute
+
+// Copyright (c) Microsoft and contributors. All rights reserved.
+//
+// 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 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 lists all available virtual machine sizes for a subscription in a location.
+// 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 = "2017-03-30"
+ 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/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute/CHANGELOG.md b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute/CHANGELOG.md
new file mode 100644
index 00000000000..dde4f83553e
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute/CHANGELOG.md
@@ -0,0 +1,5 @@
+Generated from https://github.com/Azure/azure-rest-api-specs/tree/3c764635e7d442b3e74caf593029fcd440b3ef82//specification/compute/resource-manager/readme.md tag: `package-2018-10-01`
+
+Code generator @microsoft.azure/autorest.go@2.1.171
+
+
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute/availabilitysets.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute/availabilitysets.go
index 196610acdd9..2dc4fb8d762 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute/availabilitysets.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute/availabilitysets.go
@@ -74,6 +74,7 @@ func (client AvailabilitySetsClient) CreateOrUpdate(ctx context.Context, resourc
result, err = client.CreateOrUpdateResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.AvailabilitySetsClient", "CreateOrUpdate", resp, "Failure responding to request")
+ return
}
return
@@ -151,6 +152,7 @@ func (client AvailabilitySetsClient) Delete(ctx context.Context, resourceGroupNa
result, err = client.DeleteResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.AvailabilitySetsClient", "Delete", resp, "Failure responding to request")
+ return
}
return
@@ -225,6 +227,7 @@ func (client AvailabilitySetsClient) Get(ctx context.Context, resourceGroupName
result, err = client.GetResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.AvailabilitySetsClient", "Get", resp, "Failure responding to request")
+ return
}
return
@@ -300,9 +303,11 @@ func (client AvailabilitySetsClient) List(ctx context.Context, resourceGroupName
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
@@ -415,6 +420,7 @@ func (client AvailabilitySetsClient) ListAvailableSizes(ctx context.Context, res
result, err = client.ListAvailableSizesResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.AvailabilitySetsClient", "ListAvailableSizes", resp, "Failure responding to request")
+ return
}
return
@@ -490,9 +496,11 @@ func (client AvailabilitySetsClient) ListBySubscription(ctx context.Context, exp
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
@@ -607,6 +615,7 @@ func (client AvailabilitySetsClient) Update(ctx context.Context, resourceGroupNa
result, err = client.UpdateResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.AvailabilitySetsClient", "Update", resp, "Failure responding to request")
+ return
}
return
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute/containerservices.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute/containerservices.go
index 92208281f44..680e8cb6064 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute/containerservices.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute/containerservices.go
@@ -99,7 +99,7 @@ func (client ContainerServicesClient) CreateOrUpdate(ctx context.Context, resour
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.ContainerServicesClient", "CreateOrUpdate", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.ContainerServicesClient", "CreateOrUpdate", nil, "Failure sending request")
return
}
@@ -137,7 +137,33 @@ func (client ContainerServicesClient) CreateOrUpdateSender(req *http.Request) (f
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(client ContainerServicesClient) (cs ContainerService, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.ContainerServicesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("compute.ContainerServicesCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ cs.Response.Response, err = future.GetResult(sender)
+ if cs.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "compute.ContainerServicesCreateOrUpdateFuture", "Result", nil, "received nil response and error")
+ }
+ if err == nil && cs.Response.Response.StatusCode != http.StatusNoContent {
+ cs, err = client.CreateOrUpdateResponder(cs.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.ContainerServicesCreateOrUpdateFuture", "Result", cs.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+ }
return
}
@@ -179,7 +205,7 @@ func (client ContainerServicesClient) Delete(ctx context.Context, resourceGroupN
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.ContainerServicesClient", "Delete", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.ContainerServicesClient", "Delete", nil, "Failure sending request")
return
}
@@ -215,7 +241,23 @@ func (client ContainerServicesClient) DeleteSender(req *http.Request) (future Co
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(client ContainerServicesClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.ContainerServicesDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("compute.ContainerServicesDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
return
}
@@ -263,6 +305,7 @@ func (client ContainerServicesClient) Get(ctx context.Context, resourceGroupName
result, err = client.GetResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.ContainerServicesClient", "Get", resp, "Failure responding to request")
+ return
}
return
@@ -337,9 +380,11 @@ func (client ContainerServicesClient) List(ctx context.Context) (result Containe
result.cslr, err = client.ListResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.ContainerServicesClient", "List", resp, "Failure responding to request")
+ return
}
if result.cslr.hasNextLink() && result.cslr.IsEmpty() {
err = result.NextWithContext(ctx)
+ return
}
return
@@ -452,9 +497,11 @@ func (client ContainerServicesClient) ListByResourceGroup(ctx context.Context, r
result.cslr, err = client.ListByResourceGroupResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.ContainerServicesClient", "ListByResourceGroup", resp, "Failure responding to request")
+ return
}
if result.cslr.hasNextLink() && result.cslr.IsEmpty() {
err = result.NextWithContext(ctx)
+ return
}
return
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute/disks.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute/disks.go
index 9a38365c577..60c9311ed3e 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute/disks.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute/disks.go
@@ -89,7 +89,7 @@ func (client DisksClient) CreateOrUpdate(ctx context.Context, resourceGroupName
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.DisksClient", "CreateOrUpdate", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.DisksClient", "CreateOrUpdate", nil, "Failure sending request")
return
}
@@ -128,7 +128,33 @@ func (client DisksClient) CreateOrUpdateSender(req *http.Request) (future DisksC
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.DisksCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ d.Response.Response, err = future.GetResult(sender)
+ if d.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "compute.DisksCreateOrUpdateFuture", "Result", nil, "received nil response and error")
+ }
+ if 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
+ }
return
}
@@ -169,7 +195,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", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.DisksClient", "Delete", nil, "Failure sending request")
return
}
@@ -205,7 +231,23 @@ func (client DisksClient) DeleteSender(req *http.Request) (future DisksDeleteFut
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.DisksDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
return
}
@@ -253,6 +295,7 @@ func (client DisksClient) Get(ctx context.Context, resourceGroupName string, dis
result, err = client.GetResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.DisksClient", "Get", resp, "Failure responding to request")
+ return
}
return
@@ -329,7 +372,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", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.DisksClient", "GrantAccess", nil, "Failure sending request")
return
}
@@ -367,7 +410,33 @@ func (client DisksClient) GrantAccessSender(req *http.Request) (future DisksGran
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.DisksGrantAccessFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ au.Response.Response, err = future.GetResult(sender)
+ if au.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "compute.DisksGrantAccessFuture", "Result", nil, "received nil response and error")
+ }
+ if 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
+ }
return
}
@@ -412,9 +481,11 @@ func (client DisksClient) List(ctx context.Context) (result DiskListPage, err er
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
@@ -525,9 +596,11 @@ func (client DisksClient) ListByResourceGroup(ctx context.Context, resourceGroup
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
@@ -633,7 +706,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", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.DisksClient", "RevokeAccess", nil, "Failure sending request")
return
}
@@ -669,7 +742,23 @@ func (client DisksClient) RevokeAccessSender(req *http.Request) (future DisksRev
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.DisksRevokeAccessFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
return
}
@@ -710,7 +799,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", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.DisksClient", "Update", nil, "Failure sending request")
return
}
@@ -748,7 +837,33 @@ func (client DisksClient) UpdateSender(req *http.Request) (future DisksUpdateFut
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.DisksUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ d.Response.Response, err = future.GetResult(sender)
+ if d.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "compute.DisksUpdateFuture", "Result", nil, "received nil response and error")
+ }
+ if 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
+ }
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute/galleries.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute/galleries.go
index 52fb83882cb..0547f5038f5 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute/galleries.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute/galleries.go
@@ -66,7 +66,7 @@ func (client GalleriesClient) CreateOrUpdate(ctx context.Context, resourceGroupN
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.GalleriesClient", "CreateOrUpdate", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.GalleriesClient", "CreateOrUpdate", nil, "Failure sending request")
return
}
@@ -104,7 +104,33 @@ func (client GalleriesClient) CreateOrUpdateSender(req *http.Request) (future Ga
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.GalleriesCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ g.Response.Response, err = future.GetResult(sender)
+ if g.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleriesCreateOrUpdateFuture", "Result", nil, "received nil response and error")
+ }
+ if 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
+ }
return
}
@@ -143,7 +169,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", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.GalleriesClient", "Delete", nil, "Failure sending request")
return
}
@@ -179,7 +205,23 @@ func (client GalleriesClient) DeleteSender(req *http.Request) (future GalleriesD
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.GalleriesDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
return
}
@@ -225,6 +267,7 @@ func (client GalleriesClient) Get(ctx context.Context, resourceGroupName string,
result, err = client.GetResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.GalleriesClient", "Get", resp, "Failure responding to request")
+ return
}
return
@@ -298,9 +341,11 @@ func (client GalleriesClient) List(ctx context.Context) (result GalleryListPage,
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
@@ -411,9 +456,11 @@ func (client GalleriesClient) ListByResourceGroup(ctx context.Context, resourceG
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
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute/galleryimages.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute/galleryimages.go
index f3b5c266048..90cea06aecb 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute/galleryimages.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute/galleryimages.go
@@ -81,7 +81,7 @@ func (client GalleryImagesClient) CreateOrUpdate(ctx context.Context, resourceGr
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.GalleryImagesClient", "CreateOrUpdate", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.GalleryImagesClient", "CreateOrUpdate", nil, "Failure sending request")
return
}
@@ -120,7 +120,33 @@ func (client GalleryImagesClient) CreateOrUpdateSender(req *http.Request) (futur
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.GalleryImagesCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ gi.Response.Response, err = future.GetResult(sender)
+ if gi.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryImagesCreateOrUpdateFuture", "Result", nil, "received nil response and error")
+ }
+ if 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
+ }
return
}
@@ -160,7 +186,7 @@ func (client GalleryImagesClient) Delete(ctx context.Context, resourceGroupName
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.GalleryImagesClient", "Delete", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.GalleryImagesClient", "Delete", nil, "Failure sending request")
return
}
@@ -197,7 +223,23 @@ func (client GalleryImagesClient) DeleteSender(req *http.Request) (future Galler
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.GalleryImagesDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
return
}
@@ -244,6 +286,7 @@ func (client GalleryImagesClient) Get(ctx context.Context, resourceGroupName str
result, err = client.GetResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.GalleryImagesClient", "Get", resp, "Failure responding to request")
+ return
}
return
@@ -321,9 +364,11 @@ func (client GalleryImagesClient) ListByGallery(ctx context.Context, resourceGro
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
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute/galleryimageversions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute/galleryimageversions.go
index c9179e2ad0a..70bdbd0c091 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute/galleryimageversions.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute/galleryimageversions.go
@@ -78,7 +78,7 @@ func (client GalleryImageVersionsClient) CreateOrUpdate(ctx context.Context, res
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsClient", "CreateOrUpdate", nil, "Failure sending request")
return
}
@@ -118,7 +118,33 @@ func (client GalleryImageVersionsClient) CreateOrUpdateSender(req *http.Request)
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.GalleryImageVersionsCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ giv.Response.Response, err = future.GetResult(sender)
+ if giv.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsCreateOrUpdateFuture", "Result", nil, "received nil response and error")
+ }
+ if 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
+ }
return
}
@@ -159,7 +185,7 @@ func (client GalleryImageVersionsClient) Delete(ctx context.Context, resourceGro
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsClient", "Delete", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsClient", "Delete", nil, "Failure sending request")
return
}
@@ -197,7 +223,23 @@ func (client GalleryImageVersionsClient) DeleteSender(req *http.Request) (future
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.GalleryImageVersionsDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
return
}
@@ -246,6 +288,7 @@ func (client GalleryImageVersionsClient) Get(ctx context.Context, resourceGroupN
result, err = client.GetResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsClient", "Get", resp, "Failure responding to request")
+ return
}
return
@@ -329,9 +372,11 @@ func (client GalleryImageVersionsClient) ListByGalleryImage(ctx context.Context,
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
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute/images.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute/images.go
index 6262e21c10e..40328b3268e 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute/images.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute/images.go
@@ -65,7 +65,7 @@ func (client ImagesClient) CreateOrUpdate(ctx context.Context, resourceGroupName
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.ImagesClient", "CreateOrUpdate", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.ImagesClient", "CreateOrUpdate", nil, "Failure sending request")
return
}
@@ -103,7 +103,33 @@ func (client ImagesClient) CreateOrUpdateSender(req *http.Request) (future Image
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.ImagesCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ i.Response.Response, err = future.GetResult(sender)
+ if i.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "compute.ImagesCreateOrUpdateFuture", "Result", nil, "received nil response and error")
+ }
+ if 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
+ }
return
}
@@ -142,7 +168,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", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.ImagesClient", "Delete", nil, "Failure sending request")
return
}
@@ -178,7 +204,23 @@ func (client ImagesClient) DeleteSender(req *http.Request) (future ImagesDeleteF
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.ImagesDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
return
}
@@ -225,6 +267,7 @@ func (client ImagesClient) Get(ctx context.Context, resourceGroupName string, im
result, err = client.GetResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.ImagesClient", "Get", resp, "Failure responding to request")
+ return
}
return
@@ -302,9 +345,11 @@ func (client ImagesClient) List(ctx context.Context) (result ImageListResultPage
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
@@ -415,9 +460,11 @@ func (client ImagesClient) ListByResourceGroup(ctx context.Context, resourceGrou
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
@@ -522,7 +569,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", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.ImagesClient", "Update", nil, "Failure sending request")
return
}
@@ -560,7 +607,33 @@ func (client ImagesClient) UpdateSender(req *http.Request) (future ImagesUpdateF
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.ImagesUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ i.Response.Response, err = future.GetResult(sender)
+ if i.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "compute.ImagesUpdateFuture", "Result", nil, "received nil response and error")
+ }
+ if 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
+ }
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute/loganalytics.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute/loganalytics.go
index 126ee7a3b78..d39d948879e 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute/loganalytics.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute/loganalytics.go
@@ -72,7 +72,7 @@ func (client LogAnalyticsClient) ExportRequestRateByInterval(ctx context.Context
result, err = client.ExportRequestRateByIntervalSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.LogAnalyticsClient", "ExportRequestRateByInterval", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.LogAnalyticsClient", "ExportRequestRateByInterval", nil, "Failure sending request")
return
}
@@ -109,7 +109,33 @@ func (client LogAnalyticsClient) ExportRequestRateByIntervalSender(req *http.Req
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.LogAnalyticsExportRequestRateByIntervalFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ laor.Response.Response, err = future.GetResult(sender)
+ if laor.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "compute.LogAnalyticsExportRequestRateByIntervalFuture", "Result", nil, "received nil response and error")
+ }
+ if 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
+ }
return
}
@@ -155,7 +181,7 @@ func (client LogAnalyticsClient) ExportThrottledRequests(ctx context.Context, pa
result, err = client.ExportThrottledRequestsSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.LogAnalyticsClient", "ExportThrottledRequests", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.LogAnalyticsClient", "ExportThrottledRequests", nil, "Failure sending request")
return
}
@@ -192,7 +218,33 @@ func (client LogAnalyticsClient) ExportThrottledRequestsSender(req *http.Request
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.LogAnalyticsExportThrottledRequestsFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ laor.Response.Response, err = future.GetResult(sender)
+ if laor.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "compute.LogAnalyticsExportThrottledRequestsFuture", "Result", nil, "received nil response and error")
+ }
+ if 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
+ }
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute/models.go
index 84f3f4c6bff..af95666d786 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute/models.go
@@ -38,15 +38,16 @@ type AccessURI struct {
AccessSAS *string `json:"accessSAS,omitempty"`
}
-// AdditionalCapabilities enables or disables a capability on the virtual machine or virtual machine scale set.
+// 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"`
}
// 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.
+// 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 PassNames `json:"passName,omitempty"`
@@ -102,8 +103,8 @@ type AutomaticOSUpgradeProperties struct {
AutomaticOSUpgradeSupported *bool `json:"automaticOSUpgradeSupported,omitempty"`
}
-// AutomaticRepairsPolicy specifies the configuration parameters for automatic repairs on the virtual machine
-// scale set.
+// 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"`
@@ -111,14 +112,16 @@ type AutomaticRepairsPolicy struct {
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 [Manage the availability of virtual
+// 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 [Manage the availability of
+// virtual
// machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json).
-//
For more information on Azure planned maintenance, see [Planned maintenance for virtual machines in
+//
For more information on Azure planned maintenance, see [Planned maintenance for virtual
+// machines in
// Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json)
-//
Currently, a VM can only be added to availability set at creation time. An existing VM cannot be
-// added to an availability set.
+//
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"`
@@ -384,8 +387,11 @@ func (page AvailabilitySetListResultPage) Values() []AvailabilitySet {
}
// Creates a new instance of the AvailabilitySetListResultPage type.
-func NewAvailabilitySetListResultPage(getNextPage func(context.Context, AvailabilitySetListResult) (AvailabilitySetListResult, error)) AvailabilitySetListResultPage {
- return AvailabilitySetListResultPage{fn: getNextPage}
+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.
@@ -420,8 +426,8 @@ func (asp AvailabilitySetProperties) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// AvailabilitySetUpdate specifies information about the availability set that the virtual machine should be
-// assigned to. Only tags may be updated.
+// 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
@@ -816,8 +822,11 @@ func (page ContainerServiceListResultPage) Values() []ContainerService {
}
// Creates a new instance of the ContainerServiceListResultPage type.
-func NewContainerServiceListResultPage(getNextPage func(context.Context, ContainerServiceListResult) (ContainerServiceListResult, error)) ContainerServiceListResultPage {
- return ContainerServiceListResultPage{fn: getNextPage}
+func NewContainerServiceListResultPage(cur ContainerServiceListResult, getNextPage func(context.Context, ContainerServiceListResult) (ContainerServiceListResult, error)) ContainerServiceListResultPage {
+ return ContainerServiceListResultPage{
+ fn: getNextPage,
+ cslr: cur,
+ }
}
// ContainerServiceMasterProfile profile for the container service master.
@@ -903,57 +912,23 @@ func (csp ContainerServiceProperties) MarshalJSON() ([]byte, error) {
// ContainerServicesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type ContainerServicesCreateOrUpdateFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *ContainerServicesCreateOrUpdateFuture) Result(client ContainerServicesClient) (cs ContainerService, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.ContainerServicesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("compute.ContainerServicesCreateOrUpdateFuture")
- 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.ContainerServicesCreateOrUpdateFuture", "Result", cs.Response.Response, "Failure responding to request")
- }
- }
- return
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(ContainerServicesClient) (ContainerService, error)
}
// ContainerServicesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
// operation.
type ContainerServicesDeleteFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *ContainerServicesDeleteFuture) Result(client ContainerServicesClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.ContainerServicesDeleteFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("compute.ContainerServicesDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(ContainerServicesClient) (autorest.Response, error)
}
-// ContainerServiceServicePrincipalProfile information about a service principal identity for the cluster to
-// use for manipulating Azure APIs.
+// ContainerServiceServicePrincipalProfile information about a service principal identity for the cluster
+// to use for manipulating Azure APIs.
type ContainerServiceServicePrincipalProfile struct {
// ClientID - The ID for the service principal.
ClientID *string `json:"clientId,omitempty"`
@@ -1040,7 +1015,8 @@ type DataDiskImage struct {
Lun *int32 `json:"lun,omitempty"`
}
-// 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"`
@@ -1369,8 +1345,11 @@ func (page DiskListPage) Values() []Disk {
}
// Creates a new instance of the DiskListPage type.
-func NewDiskListPage(getNextPage func(context.Context, DiskList) (DiskList, error)) DiskListPage {
- return DiskListPage{fn: getNextPage}
+func NewDiskListPage(cur DiskList, getNextPage func(context.Context, DiskList) (DiskList, error)) DiskListPage {
+ return DiskListPage{
+ fn: getNextPage,
+ dl: cur,
+ }
}
// DiskProperties disk resource properties.
@@ -1420,80 +1399,27 @@ func (dp DiskProperties) MarshalJSON() ([]byte, error) {
// DisksCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
// operation.
type DisksCreateOrUpdateFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- 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
+ 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)
}
// DisksDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type DisksDeleteFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- err = azure.NewAsyncOpIncompleteError("compute.DisksDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
+ 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)
}
-// DisksGrantAccessFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+// DisksGrantAccessFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
type DisksGrantAccessFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- 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
+ 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)
}
// DiskSku the disks sku name. Can be Standard_LRS, Premium_LRS, StandardSSD_LRS, or UltraSSD_LRS.
@@ -1516,52 +1442,18 @@ func (ds DiskSku) MarshalJSON() ([]byte, error) {
// DisksRevokeAccessFuture an abstraction for monitoring and retrieving the results of a long-running
// operation.
type DisksRevokeAccessFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- err = azure.NewAsyncOpIncompleteError("compute.DisksRevokeAccessFuture")
- return
- }
- ar.Response = future.Response()
- return
+ 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)
}
// DisksUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type DisksUpdateFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- 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
+ 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)
}
// DiskUpdate disk update resource.
@@ -1656,52 +1548,19 @@ type EncryptionSettings struct {
// GalleriesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
// operation.
type GalleriesCreateOrUpdateFuture struct {
- azure.Future
+ 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)
}
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- 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.
+// GalleriesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
type GalleriesDeleteFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- err = azure.NewAsyncOpIncompleteError("compute.GalleriesDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
+ 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)
}
// Gallery specifies information about the Shared Image Gallery that you want to create or update.
@@ -2102,8 +1961,11 @@ func (page GalleryImageListPage) Values() []GalleryImage {
}
// Creates a new instance of the GalleryImageListPage type.
-func NewGalleryImageListPage(getNextPage func(context.Context, GalleryImageList) (GalleryImageList, error)) GalleryImageListPage {
- return GalleryImageListPage{fn: getNextPage}
+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.
@@ -2169,59 +2031,26 @@ func (gip GalleryImageProperties) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// GalleryImagesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
+// GalleryImagesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
type GalleryImagesCreateOrUpdateFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- 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
+ 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)
}
// GalleryImagesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
// operation.
type GalleryImagesDeleteFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- err = azure.NewAsyncOpIncompleteError("compute.GalleryImagesDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
+ 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)
}
-// GalleryImageVersion specifies information about the gallery Image Version that you want to create or update.
+// 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"`
@@ -2473,8 +2302,11 @@ func (page GalleryImageVersionListPage) Values() []GalleryImageVersion {
}
// Creates a new instance of the GalleryImageVersionListPage type.
-func NewGalleryImageVersionListPage(getNextPage func(context.Context, GalleryImageVersionList) (GalleryImageVersionList, error)) GalleryImageVersionListPage {
- return GalleryImageVersionListPage{fn: getNextPage}
+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.
@@ -2536,53 +2368,19 @@ func (givpp GalleryImageVersionPublishingProfile) MarshalJSON() ([]byte, error)
// GalleryImageVersionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type GalleryImageVersionsCreateOrUpdateFuture struct {
- azure.Future
+ 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)
}
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- 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.
+// GalleryImageVersionsDeleteFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
type GalleryImageVersionsDeleteFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- err = azure.NewAsyncOpIncompleteError("compute.GalleryImageVersionsDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
+ 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)
}
// GalleryImageVersionStorageProfile this is the storage profile of a gallery Image Version.
@@ -2745,8 +2543,11 @@ func (page GalleryListPage) Values() []Gallery {
}
// Creates a new instance of the GalleryListPage type.
-func NewGalleryListPage(getNextPage func(context.Context, GalleryList) (GalleryList, error)) GalleryListPage {
- return GalleryListPage{fn: getNextPage}
+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.
@@ -2792,8 +2593,9 @@ type HardwareProfile struct {
VMSize VirtualMachineSizeTypes `json:"vmSize,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 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"`
@@ -3071,8 +2873,11 @@ func (page ImageListResultPage) Values() []Image {
}
// Creates a new instance of the ImageListResultPage type.
-func NewImageListResultPage(getNextPage func(context.Context, ImageListResult) (ImageListResult, error)) ImageListResultPage {
- return ImageListResultPage{fn: getNextPage}
+func NewImageListResultPage(cur ImageListResult, getNextPage func(context.Context, ImageListResult) (ImageListResult, error)) ImageListResultPage {
+ return ImageListResultPage{
+ fn: getNextPage,
+ ilr: cur,
+ }
}
// ImageOSDisk describes an Operating System disk.
@@ -3117,7 +2922,8 @@ func (IP ImageProperties) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// ImagePurchasePlan describes the gallery Image Definition purchase plan. This is used by marketplace images.
+// 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"`
@@ -3129,8 +2935,8 @@ type ImagePurchasePlan 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.
-// NOTE: Image reference publisher and offer can only be set when you create the scale set.
+// 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"`
@@ -3147,52 +2953,18 @@ type ImageReference struct {
// ImagesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
// operation.
type ImagesCreateOrUpdateFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- 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
+ 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)
}
// ImagesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ImagesDeleteFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- err = azure.NewAsyncOpIncompleteError("compute.ImagesDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
+ 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)
}
// ImageStorageProfile describes a storage profile.
@@ -3207,30 +2979,10 @@ type ImageStorageProfile struct {
// ImagesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ImagesUpdateFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- 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
+ 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)
}
// ImageUpdate the source user image virtual hard disk. Only tags may be updated.
@@ -3307,8 +3059,8 @@ type InstanceViewStatus struct {
Time *date.Time `json:"time,omitempty"`
}
-// KeyVaultAndKeyReference key Vault Key Url and vault id of KeK, KeK is optional and when provided is used to
-// unwrap the encryptionKey
+// 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"`
@@ -3340,8 +3092,8 @@ type KeyVaultSecretReference struct {
SourceVault *SubResource `json:"sourceVault,omitempty"`
}
-// LinuxConfiguration specifies the Linux operating system settings on the virtual machine.
For a list
-// of supported Linux distributions, see [Linux on Azure-Endorsed
+// 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/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
//
For running non-endorsed distributions, see [Information for Non-Endorsed
// Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json).
@@ -3506,8 +3258,11 @@ func (page ListUsagesResultPage) Values() []Usage {
}
// Creates a new instance of the ListUsagesResultPage type.
-func NewListUsagesResultPage(getNextPage func(context.Context, ListUsagesResult) (ListUsagesResult, error)) ListUsagesResultPage {
- return ListUsagesResultPage{fn: getNextPage}
+func NewListUsagesResultPage(cur ListUsagesResult, getNextPage func(context.Context, ListUsagesResult) (ListUsagesResult, error)) ListUsagesResultPage {
+ return ListUsagesResultPage{
+ fn: getNextPage,
+ lur: cur,
+ }
}
// ListVirtualMachineExtensionImage ...
@@ -3522,62 +3277,22 @@ type ListVirtualMachineImageResource struct {
Value *[]VirtualMachineImageResource `json:"value,omitempty"`
}
-// LogAnalyticsExportRequestRateByIntervalFuture an abstraction for monitoring and retrieving the results of a
-// long-running operation.
+// LogAnalyticsExportRequestRateByIntervalFuture an abstraction for monitoring and retrieving the results
+// of a long-running operation.
type LogAnalyticsExportRequestRateByIntervalFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- 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
+ 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)
}
// LogAnalyticsExportThrottledRequestsFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type LogAnalyticsExportThrottledRequestsFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- 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
+ 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)
}
// LogAnalyticsInputBase api input base class for LogAnalytics Api.
@@ -3784,8 +3499,8 @@ type OperationValueDisplay struct {
Provider *string `json:"provider,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
+// 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/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'
@@ -3838,11 +3553,11 @@ type OSProfile struct {
AllowExtensionOperations *bool `json:"allowExtensionOperations,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 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"`
@@ -3964,8 +3679,8 @@ type ProximityPlacementGroupListResult struct {
NextLink *string `json:"nextLink,omitempty"`
}
-// ProximityPlacementGroupListResultIterator provides access to a complete listing of ProximityPlacementGroup
-// values.
+// ProximityPlacementGroupListResultIterator provides access to a complete listing of
+// ProximityPlacementGroup values.
type ProximityPlacementGroupListResultIterator struct {
i int
page ProximityPlacementGroupListResultPage
@@ -4108,8 +3823,11 @@ func (page ProximityPlacementGroupListResultPage) Values() []ProximityPlacementG
}
// Creates a new instance of the ProximityPlacementGroupListResultPage type.
-func NewProximityPlacementGroupListResultPage(getNextPage func(context.Context, ProximityPlacementGroupListResult) (ProximityPlacementGroupListResult, error)) ProximityPlacementGroupListResultPage {
- return ProximityPlacementGroupListResultPage{fn: getNextPage}
+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.
@@ -4158,8 +3876,8 @@ type PurchasePlan struct {
Product *string `json:"product,omitempty"`
}
-// RecommendedMachineConfiguration the properties describe the recommended machine configuration for this Image
-// Definition. These properties are updatable.
+// 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"`
@@ -4486,8 +4204,11 @@ func (page ResourceSkusResultPage) Values() []ResourceSku {
}
// Creates a new instance of the ResourceSkusResultPage type.
-func NewResourceSkusResultPage(getNextPage func(context.Context, ResourceSkusResult) (ResourceSkusResult, error)) ResourceSkusResultPage {
- return ResourceSkusResultPage{fn: getNextPage}
+func NewResourceSkusResultPage(cur ResourceSkusResult, getNextPage func(context.Context, ResourceSkusResult) (ResourceSkusResult, error)) ResourceSkusResultPage {
+ return ResourceSkusResultPage{
+ fn: getNextPage,
+ rsr: cur,
+ }
}
// RollbackStatusInfo information about rollback on failed VM instances after a OS Upgrade operation.
@@ -4512,7 +4233,8 @@ type RollingUpgradePolicy struct {
PauseTimeBetweenBatches *string `json:"pauseTimeBetweenBatches,omitempty"`
}
-// RollingUpgradeProgressInfo information about the number of virtual machine instances in each upgrade state.
+// 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"`
@@ -4851,8 +4573,11 @@ func (page RunCommandListResultPage) Values() []RunCommandDocumentBase {
}
// Creates a new instance of the RunCommandListResultPage type.
-func NewRunCommandListResultPage(getNextPage func(context.Context, RunCommandListResult) (RunCommandListResult, error)) RunCommandListResultPage {
- return RunCommandListResultPage{fn: getNextPage}
+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.
@@ -4874,8 +4599,9 @@ type RunCommandResult struct {
Value *[]InstanceViewStatus `json:"value,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.
+// 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"`
@@ -5161,8 +4887,11 @@ func (page SnapshotListPage) Values() []Snapshot {
}
// Creates a new instance of the SnapshotListPage type.
-func NewSnapshotListPage(getNextPage func(context.Context, SnapshotList) (SnapshotList, error)) SnapshotListPage {
- return SnapshotListPage{fn: getNextPage}
+func NewSnapshotListPage(cur SnapshotList, getNextPage func(context.Context, SnapshotList) (SnapshotList, error)) SnapshotListPage {
+ return SnapshotListPage{
+ fn: getNextPage,
+ sl: cur,
+ }
}
// SnapshotProperties snapshot resource properties.
@@ -5202,81 +4931,28 @@ func (sp SnapshotProperties) MarshalJSON() ([]byte, error) {
// SnapshotsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
// operation.
type SnapshotsCreateOrUpdateFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- 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
+ 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)
}
-// SnapshotsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+// SnapshotsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
type SnapshotsDeleteFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- err = azure.NewAsyncOpIncompleteError("compute.SnapshotsDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
+ 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)
}
// SnapshotsGrantAccessFuture an abstraction for monitoring and retrieving the results of a long-running
// operation.
type SnapshotsGrantAccessFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- 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
+ 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)
}
// SnapshotSku the snapshots sku name. Can be Standard_LRS, Premium_LRS, or Standard_ZRS.
@@ -5299,52 +4975,19 @@ func (ss SnapshotSku) MarshalJSON() ([]byte, error) {
// SnapshotsRevokeAccessFuture an abstraction for monitoring and retrieving the results of a long-running
// operation.
type SnapshotsRevokeAccessFuture struct {
- azure.Future
+ 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)
}
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- 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.
+// SnapshotsUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
type SnapshotsUpdateFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- 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
+ 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)
}
// SnapshotUpdate snapshot update resource.
@@ -5435,8 +5078,8 @@ type SSHConfiguration struct {
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.
+// 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"`
@@ -5515,7 +5158,8 @@ type UpgradeOperationHistoricalStatusInfo struct {
Location *string `json:"location,omitempty"`
}
-// UpgradeOperationHistoricalStatusInfoProperties describes each OS upgrade on the Virtual Machine Scale Set.
+// 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"`
@@ -5571,8 +5215,8 @@ type UsageName struct {
LocalizedValue *string `json:"localizedValue,omitempty"`
}
-// VaultCertificate describes a single certificate reference in a Key Vault, and where the certificate should
-// reside on the VM.
+// 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":"" }
CertificateURL *string `json:"certificateUrl,omitempty"`
@@ -6081,56 +5725,22 @@ func (vmep VirtualMachineExtensionProperties) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// VirtualMachineExtensionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
-// long-running operation.
+// VirtualMachineExtensionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of
+// a long-running operation.
type VirtualMachineExtensionsCreateOrUpdateFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- 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
+ 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)
}
// VirtualMachineExtensionsDeleteFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type VirtualMachineExtensionsDeleteFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineExtensionsDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
+ 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)
}
// VirtualMachineExtensionsListResult the List Extension operation response
@@ -6143,30 +5753,10 @@ type VirtualMachineExtensionsListResult struct {
// VirtualMachineExtensionsUpdateFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type VirtualMachineExtensionsUpdateFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- 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
+ 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)
}
// VirtualMachineExtensionUpdate describes a Virtual Machine Extension.
@@ -6591,8 +6181,11 @@ func (page VirtualMachineListResultPage) Values() []VirtualMachine {
}
// Creates a new instance of the VirtualMachineListResultPage type.
-func NewVirtualMachineListResultPage(getNextPage func(context.Context, VirtualMachineListResult) (VirtualMachineListResult, error)) VirtualMachineListResultPage {
- return VirtualMachineListResultPage{fn: getNextPage}
+func NewVirtualMachineListResultPage(cur VirtualMachineListResult, getNextPage func(context.Context, VirtualMachineListResult) (VirtualMachineListResult, error)) VirtualMachineListResultPage {
+ return VirtualMachineListResultPage{
+ fn: getNextPage,
+ vmlr: cur,
+ }
}
// VirtualMachineProperties describes the properties of a Virtual Machine.
@@ -6656,8 +6249,8 @@ func (vmp VirtualMachineProperties) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// VirtualMachineReimageParameters parameters for Reimaging Virtual Machine. NOTE: Virtual Machine OS disk will
-// always be reimaged
+// 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"`
@@ -7054,8 +6647,11 @@ func (page VirtualMachineScaleSetExtensionListResultPage) Values() []VirtualMach
}
// Creates a new instance of the VirtualMachineScaleSetExtensionListResultPage type.
-func NewVirtualMachineScaleSetExtensionListResultPage(getNextPage func(context.Context, VirtualMachineScaleSetExtensionListResult) (VirtualMachineScaleSetExtensionListResult, error)) VirtualMachineScaleSetExtensionListResultPage {
- return VirtualMachineScaleSetExtensionListResultPage{fn: getNextPage}
+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.
@@ -7064,7 +6660,8 @@ type VirtualMachineScaleSetExtensionProfile struct {
Extensions *[]VirtualMachineScaleSetExtension `json:"extensions,omitempty"`
}
-// VirtualMachineScaleSetExtensionProperties describes the properties of a Virtual Machine Scale Set Extension.
+// 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"`
@@ -7119,53 +6716,19 @@ func (vmssep VirtualMachineScaleSetExtensionProperties) MarshalJSON() ([]byte, e
// VirtualMachineScaleSetExtensionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
// results of a long-running operation.
type VirtualMachineScaleSetExtensionsCreateOrUpdateFuture struct {
- azure.Future
+ 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)
}
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- 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.
+// VirtualMachineScaleSetExtensionsDeleteFuture an abstraction for monitoring and retrieving the results of
+// a long-running operation.
type VirtualMachineScaleSetExtensionsDeleteFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetExtensionsDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
+ 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)
}
// VirtualMachineScaleSetIdentity identity for the virtual machine scale set.
@@ -7220,8 +6783,8 @@ func (vmssiv VirtualMachineScaleSetInstanceView) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// VirtualMachineScaleSetInstanceViewStatusesSummary instance view statuses summary for virtual machines of a
-// virtual machine scale set.
+// 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"`
@@ -7294,8 +6857,8 @@ func (vmssic *VirtualMachineScaleSetIPConfiguration) UnmarshalJSON(body []byte)
return nil
}
-// VirtualMachineScaleSetIPConfigurationProperties describes a virtual machine scale set network profile's IP
-// configuration properties.
+// 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"`
@@ -7323,8 +6886,8 @@ type VirtualMachineScaleSetIPTag struct {
Tag *string `json:"tag,omitempty"`
}
-// VirtualMachineScaleSetListOSUpgradeHistory list of Virtual Machine Scale Set OS Upgrade History operation
-// response.
+// 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.
@@ -7478,8 +7041,11 @@ func (page VirtualMachineScaleSetListOSUpgradeHistoryPage) Values() []UpgradeOpe
}
// Creates a new instance of the VirtualMachineScaleSetListOSUpgradeHistoryPage type.
-func NewVirtualMachineScaleSetListOSUpgradeHistoryPage(getNextPage func(context.Context, VirtualMachineScaleSetListOSUpgradeHistory) (VirtualMachineScaleSetListOSUpgradeHistory, error)) VirtualMachineScaleSetListOSUpgradeHistoryPage {
- return VirtualMachineScaleSetListOSUpgradeHistoryPage{fn: getNextPage}
+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.
@@ -7635,8 +7201,11 @@ func (page VirtualMachineScaleSetListResultPage) Values() []VirtualMachineScaleS
}
// Creates a new instance of the VirtualMachineScaleSetListResultPage type.
-func NewVirtualMachineScaleSetListResultPage(getNextPage func(context.Context, VirtualMachineScaleSetListResult) (VirtualMachineScaleSetListResult, error)) VirtualMachineScaleSetListResultPage {
- return VirtualMachineScaleSetListResultPage{fn: getNextPage}
+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.
@@ -7792,8 +7361,11 @@ func (page VirtualMachineScaleSetListSkusResultPage) Values() []VirtualMachineSc
}
// Creates a new instance of the VirtualMachineScaleSetListSkusResultPage type.
-func NewVirtualMachineScaleSetListSkusResultPage(getNextPage func(context.Context, VirtualMachineScaleSetListSkusResult) (VirtualMachineScaleSetListSkusResult, error)) VirtualMachineScaleSetListSkusResultPage {
- return VirtualMachineScaleSetListSkusResultPage{fn: getNextPage}
+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.
@@ -7949,8 +7521,11 @@ func (page VirtualMachineScaleSetListWithLinkResultPage) Values() []VirtualMachi
}
// Creates a new instance of the VirtualMachineScaleSetListWithLinkResultPage type.
-func NewVirtualMachineScaleSetListWithLinkResultPage(getNextPage func(context.Context, VirtualMachineScaleSetListWithLinkResult) (VirtualMachineScaleSetListWithLinkResult, error)) VirtualMachineScaleSetListWithLinkResultPage {
- return VirtualMachineScaleSetListWithLinkResultPage{fn: getNextPage}
+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.
@@ -7959,8 +7534,8 @@ type VirtualMachineScaleSetManagedDiskParameters struct {
StorageAccountType StorageAccountTypes `json:"storageAccountType,omitempty"`
}
-// VirtualMachineScaleSetNetworkConfiguration describes a virtual machine scale set network profile's network
-// configurations.
+// 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"`
@@ -8033,8 +7608,8 @@ type VirtualMachineScaleSetNetworkConfigurationDNSSettings struct {
DNSServers *[]string `json:"dnsServers,omitempty"`
}
-// VirtualMachineScaleSetNetworkConfigurationProperties describes a virtual machine scale set network profile's
-// IP configuration.
+// 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"`
@@ -8159,8 +7734,8 @@ func (vmssp VirtualMachineScaleSetProperties) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// VirtualMachineScaleSetPublicIPAddressConfiguration describes a virtual machines scale set IP Configuration's
-// PublicIPAddress configuration
+// 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"`
@@ -8240,171 +7815,67 @@ type VirtualMachineScaleSetReimageParameters struct {
TempDisk *bool `json:"tempDisk,omitempty"`
}
-// VirtualMachineScaleSetRollingUpgradesCancelFuture an abstraction for monitoring and retrieving the results
-// of a long-running operation.
+// VirtualMachineScaleSetRollingUpgradesCancelFuture an abstraction for monitoring and retrieving the
+// results of a long-running operation.
type VirtualMachineScaleSetRollingUpgradesCancelFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetRollingUpgradesCancelFuture")
- return
- }
- ar.Response = future.Response()
- return
+ 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)
}
// VirtualMachineScaleSetRollingUpgradesStartExtensionUpgradeFuture an abstraction for monitoring and
// retrieving the results of a long-running operation.
type VirtualMachineScaleSetRollingUpgradesStartExtensionUpgradeFuture struct {
- azure.Future
+ 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)
}
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- 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.
+// VirtualMachineScaleSetRollingUpgradesStartOSUpgradeFuture an abstraction for monitoring and retrieving
+// the results of a long-running operation.
type VirtualMachineScaleSetRollingUpgradesStartOSUpgradeFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetRollingUpgradesStartOSUpgradeFuture")
- return
- }
- ar.Response = future.Response()
- return
+ 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)
}
-// VirtualMachineScaleSetsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
-// long-running operation.
+// VirtualMachineScaleSetsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of
+// a long-running operation.
type VirtualMachineScaleSetsCreateOrUpdateFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- 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
+ 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)
}
// VirtualMachineScaleSetsDeallocateFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type VirtualMachineScaleSetsDeallocateFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsDeallocateFuture")
- return
- }
- ar.Response = future.Response()
- return
+ 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)
}
// VirtualMachineScaleSetsDeleteFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type VirtualMachineScaleSetsDeleteFuture struct {
- azure.Future
+ 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)
}
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- 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.
+// VirtualMachineScaleSetsDeleteInstancesFuture an abstraction for monitoring and retrieving the results of
+// a long-running operation.
type VirtualMachineScaleSetsDeleteInstancesFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsDeleteInstancesFuture")
- return
- }
- ar.Response = future.Response()
- return
+ 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)
}
// VirtualMachineScaleSetSku describes an available virtual machine scale set sku.
@@ -8429,165 +7900,67 @@ type VirtualMachineScaleSetSkuCapacity struct {
ScaleType VirtualMachineScaleSetSkuScaleType `json:"scaleType,omitempty"`
}
-// VirtualMachineScaleSetsPerformMaintenanceFuture an abstraction for monitoring and retrieving the results of
-// a long-running operation.
+// VirtualMachineScaleSetsPerformMaintenanceFuture an abstraction for monitoring and retrieving the results
+// of a long-running operation.
type VirtualMachineScaleSetsPerformMaintenanceFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsPerformMaintenanceFuture")
- return
- }
- ar.Response = future.Response()
- return
+ 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)
}
// VirtualMachineScaleSetsPowerOffFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type VirtualMachineScaleSetsPowerOffFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsPowerOffFuture")
- return
- }
- ar.Response = future.Response()
- return
+ 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)
}
// VirtualMachineScaleSetsRedeployFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type VirtualMachineScaleSetsRedeployFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsRedeployFuture")
- return
- }
- ar.Response = future.Response()
- return
+ 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)
}
// VirtualMachineScaleSetsReimageAllFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type VirtualMachineScaleSetsReimageAllFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsReimageAllFuture")
- return
- }
- ar.Response = future.Response()
- return
+ 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)
}
// VirtualMachineScaleSetsReimageFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type VirtualMachineScaleSetsReimageFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsReimageFuture")
- return
- }
- ar.Response = future.Response()
- return
+ 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)
}
// VirtualMachineScaleSetsRestartFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type VirtualMachineScaleSetsRestartFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsRestartFuture")
- return
- }
- ar.Response = future.Response()
- return
+ 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)
}
// VirtualMachineScaleSetsStartFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type VirtualMachineScaleSetsStartFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsStartFuture")
- return
- }
- ar.Response = future.Response()
- return
+ 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)
}
// VirtualMachineScaleSetStorageProfile describes a virtual machine scale set storage profile.
@@ -8603,53 +7976,19 @@ type VirtualMachineScaleSetStorageProfile struct {
// VirtualMachineScaleSetsUpdateFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type VirtualMachineScaleSetsUpdateFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- 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
+ 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)
}
-// VirtualMachineScaleSetsUpdateInstancesFuture an abstraction for monitoring and retrieving the results of a
-// long-running operation.
+// VirtualMachineScaleSetsUpdateInstancesFuture an abstraction for monitoring and retrieving the results of
+// a long-running operation.
type VirtualMachineScaleSetsUpdateInstancesFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsUpdateInstancesFuture")
- return
- }
- ar.Response = future.Response()
- return
+ 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)
}
// VirtualMachineScaleSetUpdate describes a Virtual Machine Scale Set.
@@ -8902,8 +8241,9 @@ func (vmssunc *VirtualMachineScaleSetUpdateNetworkConfiguration) UnmarshalJSON(b
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.
+// 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"`
@@ -8925,8 +8265,8 @@ type VirtualMachineScaleSetUpdateNetworkProfile struct {
NetworkInterfaceConfigurations *[]VirtualMachineScaleSetUpdateNetworkConfiguration `json:"networkInterfaceConfigurations,omitempty"`
}
-// VirtualMachineScaleSetUpdateOSDisk describes virtual machine scale set operating system disk Update Object.
-// This should be used for Updating VMSS OS Disk.
+// 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"`
@@ -9025,8 +8365,8 @@ func (vmssupiac *VirtualMachineScaleSetUpdatePublicIPAddressConfiguration) Unmar
return nil
}
-// VirtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties describes a virtual machines scale set IP
-// Configuration's PublicIPAddress configuration
+// 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"`
@@ -9218,8 +8558,8 @@ func (vmssv *VirtualMachineScaleSetVM) UnmarshalJSON(body []byte) error {
return nil
}
-// VirtualMachineScaleSetVMExtensionsSummary extensions summary for virtual machines of a virtual machine scale
-// set.
+// 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"`
@@ -9227,7 +8567,8 @@ type VirtualMachineScaleSetVMExtensionsSummary struct {
StatusesSummary *[]VirtualMachineStatusCodeCount `json:"statusesSummary,omitempty"`
}
-// VirtualMachineScaleSetVMInstanceIDs specifies a list of virtual machine instance IDs from the VM scale set.
+// 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"`
@@ -9312,8 +8653,8 @@ type VirtualMachineScaleSetVMListResult struct {
NextLink *string `json:"nextLink,omitempty"`
}
-// VirtualMachineScaleSetVMListResultIterator provides access to a complete listing of VirtualMachineScaleSetVM
-// values.
+// VirtualMachineScaleSetVMListResultIterator provides access to a complete listing of
+// VirtualMachineScaleSetVM values.
type VirtualMachineScaleSetVMListResultIterator struct {
i int
page VirtualMachineScaleSetVMListResultPage
@@ -9456,8 +8797,11 @@ func (page VirtualMachineScaleSetVMListResultPage) Values() []VirtualMachineScal
}
// Creates a new instance of the VirtualMachineScaleSetVMListResultPage type.
-func NewVirtualMachineScaleSetVMListResultPage(getNextPage func(context.Context, VirtualMachineScaleSetVMListResult) (VirtualMachineScaleSetVMListResult, error)) VirtualMachineScaleSetVMListResultPage {
- return VirtualMachineScaleSetVMListResultPage{fn: getNextPage}
+func NewVirtualMachineScaleSetVMListResultPage(cur VirtualMachineScaleSetVMListResult, getNextPage func(context.Context, VirtualMachineScaleSetVMListResult) (VirtualMachineScaleSetVMListResult, error)) VirtualMachineScaleSetVMListResultPage {
+ return VirtualMachineScaleSetVMListResultPage{
+ fn: getNextPage,
+ vmssvlr: cur,
+ }
}
// VirtualMachineScaleSetVMProfile describes a virtual machine scale set virtual machine profile.
@@ -9482,7 +8826,8 @@ type VirtualMachineScaleSetVMProfile struct {
EvictionPolicy VirtualMachineEvictionPolicyTypes `json:"evictionPolicy,omitempty"`
}
-// VirtualMachineScaleSetVMProperties describes the properties of a virtual machine scale set virtual machine.
+// 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"`
@@ -9549,393 +8894,145 @@ type VirtualMachineScaleSetVMReimageParameters struct {
// VirtualMachineScaleSetVMsDeallocateFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type VirtualMachineScaleSetVMsDeallocateFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsDeallocateFuture")
- return
- }
- ar.Response = future.Response()
- return
+ 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)
}
// VirtualMachineScaleSetVMsDeleteFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type VirtualMachineScaleSetVMsDeleteFuture struct {
- azure.Future
+ 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)
}
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- 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.
+// VirtualMachineScaleSetVMsPerformMaintenanceFuture an abstraction for monitoring and retrieving the
+// results of a long-running operation.
type VirtualMachineScaleSetVMsPerformMaintenanceFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsPerformMaintenanceFuture")
- return
- }
- ar.Response = future.Response()
- return
+ 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)
}
// VirtualMachineScaleSetVMsPowerOffFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type VirtualMachineScaleSetVMsPowerOffFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsPowerOffFuture")
- return
- }
- ar.Response = future.Response()
- return
+ 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)
}
// VirtualMachineScaleSetVMsRedeployFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type VirtualMachineScaleSetVMsRedeployFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsRedeployFuture")
- return
- }
- ar.Response = future.Response()
- return
+ 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)
}
// VirtualMachineScaleSetVMsReimageAllFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type VirtualMachineScaleSetVMsReimageAllFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsReimageAllFuture")
- return
- }
- ar.Response = future.Response()
- return
+ 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)
}
// VirtualMachineScaleSetVMsReimageFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type VirtualMachineScaleSetVMsReimageFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsReimageFuture")
- return
- }
- ar.Response = future.Response()
- return
+ 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)
}
// VirtualMachineScaleSetVMsRestartFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type VirtualMachineScaleSetVMsRestartFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsRestartFuture")
- return
- }
- ar.Response = future.Response()
- return
+ 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)
}
// VirtualMachineScaleSetVMsRunCommandFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type VirtualMachineScaleSetVMsRunCommandFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- 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
+ 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)
}
// VirtualMachineScaleSetVMsStartFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type VirtualMachineScaleSetVMsStartFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsStartFuture")
- return
- }
- ar.Response = future.Response()
- return
+ 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)
}
// VirtualMachineScaleSetVMsUpdateFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type VirtualMachineScaleSetVMsUpdateFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- 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
+ 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)
}
// VirtualMachinesCaptureFuture an abstraction for monitoring and retrieving the results of a long-running
// operation.
type VirtualMachinesCaptureFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- 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
+ 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)
}
// VirtualMachinesConvertToManagedDisksFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type VirtualMachinesConvertToManagedDisksFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesConvertToManagedDisksFuture")
- return
- }
- ar.Response = future.Response()
- return
+ 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)
}
// VirtualMachinesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type VirtualMachinesCreateOrUpdateFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- 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
+ 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)
}
-// VirtualMachinesDeallocateFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
+// VirtualMachinesDeallocateFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
type VirtualMachinesDeallocateFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesDeallocateFuture")
- return
- }
- ar.Response = future.Response()
- return
+ 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)
}
// VirtualMachinesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
// operation.
type VirtualMachinesDeleteFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
+ 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)
}
// VirtualMachineSize describes the properties of a VM size.
@@ -9964,168 +9061,64 @@ type VirtualMachineSizeListResult struct {
// VirtualMachinesPerformMaintenanceFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type VirtualMachinesPerformMaintenanceFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesPerformMaintenanceFuture")
- return
- }
- ar.Response = future.Response()
- return
+ 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)
}
// VirtualMachinesPowerOffFuture an abstraction for monitoring and retrieving the results of a long-running
// operation.
type VirtualMachinesPowerOffFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesPowerOffFuture")
- return
- }
- ar.Response = future.Response()
- return
+ 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)
}
// VirtualMachinesRedeployFuture an abstraction for monitoring and retrieving the results of a long-running
// operation.
type VirtualMachinesRedeployFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesRedeployFuture")
- return
- }
- ar.Response = future.Response()
- return
+ 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)
}
// VirtualMachinesReimageFuture an abstraction for monitoring and retrieving the results of a long-running
// operation.
type VirtualMachinesReimageFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesReimageFuture")
- return
- }
- ar.Response = future.Response()
- return
+ 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)
}
// VirtualMachinesRestartFuture an abstraction for monitoring and retrieving the results of a long-running
// operation.
type VirtualMachinesRestartFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesRestartFuture")
- return
- }
- ar.Response = future.Response()
- return
+ 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)
}
-// VirtualMachinesRunCommandFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
+// VirtualMachinesRunCommandFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
type VirtualMachinesRunCommandFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- 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
+ 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)
}
// VirtualMachinesStartFuture an abstraction for monitoring and retrieving the results of a long-running
// operation.
type VirtualMachinesStartFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesStartFuture")
- return
- }
- ar.Response = future.Response()
- return
+ 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)
}
// VirtualMachineStatusCodeCount the status code and count of the virtual machine scale set instance view
@@ -10140,30 +9133,10 @@ type VirtualMachineStatusCodeCount struct {
// VirtualMachinesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
// operation.
type VirtualMachinesUpdateFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- 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
+ 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)
}
// VirtualMachineUpdate describes a Virtual Machine Update.
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute/operations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute/operations.go
index 12d1ed0b165..ecd3c13f4f8 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute/operations.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute/operations.go
@@ -69,6 +69,7 @@ func (client OperationsClient) List(ctx context.Context) (result OperationListRe
result, err = client.ListResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.OperationsClient", "List", resp, "Failure responding to request")
+ return
}
return
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute/proximityplacementgroups.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute/proximityplacementgroups.go
index 2396bda59b6..b4096fa1a69 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute/proximityplacementgroups.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute/proximityplacementgroups.go
@@ -74,6 +74,7 @@ func (client ProximityPlacementGroupsClient) CreateOrUpdate(ctx context.Context,
result, err = client.CreateOrUpdateResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.ProximityPlacementGroupsClient", "CreateOrUpdate", resp, "Failure responding to request")
+ return
}
return
@@ -151,6 +152,7 @@ func (client ProximityPlacementGroupsClient) Delete(ctx context.Context, resourc
result, err = client.DeleteResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.ProximityPlacementGroupsClient", "Delete", resp, "Failure responding to request")
+ return
}
return
@@ -225,6 +227,7 @@ func (client ProximityPlacementGroupsClient) Get(ctx context.Context, resourceGr
result, err = client.GetResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.ProximityPlacementGroupsClient", "Get", resp, "Failure responding to request")
+ return
}
return
@@ -300,9 +303,11 @@ func (client ProximityPlacementGroupsClient) ListByResourceGroup(ctx context.Con
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
@@ -412,9 +417,11 @@ func (client ProximityPlacementGroupsClient) ListBySubscription(ctx context.Cont
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
@@ -526,6 +533,7 @@ func (client ProximityPlacementGroupsClient) Update(ctx context.Context, resourc
result, err = client.UpdateResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.ProximityPlacementGroupsClient", "Update", resp, "Failure responding to request")
+ return
}
return
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute/resourceskus.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute/resourceskus.go
index 61027f6ccde..ba9243e02ad 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute/resourceskus.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute/resourceskus.go
@@ -70,9 +70,11 @@ func (client ResourceSkusClient) List(ctx context.Context) (result ResourceSkusR
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
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute/snapshots.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute/snapshots.go
index c11e93745bd..0830a9a642d 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute/snapshots.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute/snapshots.go
@@ -88,7 +88,7 @@ func (client SnapshotsClient) CreateOrUpdate(ctx context.Context, resourceGroupN
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "CreateOrUpdate", nil, "Failure sending request")
return
}
@@ -127,7 +127,33 @@ func (client SnapshotsClient) CreateOrUpdateSender(req *http.Request) (future Sn
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.SnapshotsCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ s.Response.Response, err = future.GetResult(sender)
+ if s.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "compute.SnapshotsCreateOrUpdateFuture", "Result", nil, "received nil response and error")
+ }
+ if 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
+ }
return
}
@@ -167,7 +193,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", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "Delete", nil, "Failure sending request")
return
}
@@ -203,7 +229,23 @@ func (client SnapshotsClient) DeleteSender(req *http.Request) (future SnapshotsD
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.SnapshotsDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
return
}
@@ -250,6 +292,7 @@ func (client SnapshotsClient) Get(ctx context.Context, resourceGroupName string,
result, err = client.GetResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "Get", resp, "Failure responding to request")
+ return
}
return
@@ -325,7 +368,7 @@ func (client SnapshotsClient) GrantAccess(ctx context.Context, resourceGroupName
result, err = client.GrantAccessSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "GrantAccess", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "GrantAccess", nil, "Failure sending request")
return
}
@@ -363,7 +406,33 @@ func (client SnapshotsClient) GrantAccessSender(req *http.Request) (future Snaps
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.SnapshotsGrantAccessFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ au.Response.Response, err = future.GetResult(sender)
+ if au.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "compute.SnapshotsGrantAccessFuture", "Result", nil, "received nil response and error")
+ }
+ if 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
+ }
return
}
@@ -408,9 +477,11 @@ func (client SnapshotsClient) List(ctx context.Context) (result SnapshotListPage
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
@@ -521,9 +592,11 @@ func (client SnapshotsClient) ListByResourceGroup(ctx context.Context, resourceG
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
@@ -628,7 +701,7 @@ func (client SnapshotsClient) RevokeAccess(ctx context.Context, resourceGroupNam
result, err = client.RevokeAccessSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "RevokeAccess", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "RevokeAccess", nil, "Failure sending request")
return
}
@@ -664,7 +737,23 @@ func (client SnapshotsClient) RevokeAccessSender(req *http.Request) (future Snap
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.SnapshotsRevokeAccessFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
return
}
@@ -704,7 +793,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", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "Update", nil, "Failure sending request")
return
}
@@ -742,7 +831,33 @@ func (client SnapshotsClient) UpdateSender(req *http.Request) (future SnapshotsU
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.SnapshotsUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ s.Response.Response, err = future.GetResult(sender)
+ if s.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "compute.SnapshotsUpdateFuture", "Result", nil, "received nil response and error")
+ }
+ if 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
+ }
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute/usage.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute/usage.go
index 2658d2e0dc4..9872fc35a9f 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute/usage.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute/usage.go
@@ -80,9 +80,11 @@ func (client UsageClient) List(ctx context.Context, location string) (result Lis
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
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute/virtualmachineextensionimages.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute/virtualmachineextensionimages.go
index d1e24cac24f..f0f0d077607 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute/virtualmachineextensionimages.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute/virtualmachineextensionimages.go
@@ -72,6 +72,7 @@ func (client VirtualMachineExtensionImagesClient) Get(ctx context.Context, locat
result, err = client.GetResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionImagesClient", "Get", resp, "Failure responding to request")
+ return
}
return
@@ -148,6 +149,7 @@ func (client VirtualMachineExtensionImagesClient) ListTypes(ctx context.Context,
result, err = client.ListTypesResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionImagesClient", "ListTypes", resp, "Failure responding to request")
+ return
}
return
@@ -223,6 +225,7 @@ func (client VirtualMachineExtensionImagesClient) ListVersions(ctx context.Conte
result, err = client.ListVersionsResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionImagesClient", "ListVersions", resp, "Failure responding to request")
+ return
}
return
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute/virtualmachineextensions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute/virtualmachineextensions.go
index 58814d0c3bc..08e9a18f00d 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute/virtualmachineextensions.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute/virtualmachineextensions.go
@@ -67,7 +67,7 @@ func (client VirtualMachineExtensionsClient) CreateOrUpdate(ctx context.Context,
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsClient", "CreateOrUpdate", nil, "Failure sending request")
return
}
@@ -106,7 +106,33 @@ func (client VirtualMachineExtensionsClient) CreateOrUpdateSender(req *http.Requ
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineExtensionsCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ vme.Response.Response, err = future.GetResult(sender)
+ if vme.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsCreateOrUpdateFuture", "Result", nil, "received nil response and error")
+ }
+ if 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
+ }
return
}
@@ -146,7 +172,7 @@ func (client VirtualMachineExtensionsClient) Delete(ctx context.Context, resourc
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsClient", "Delete", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsClient", "Delete", nil, "Failure sending request")
return
}
@@ -183,7 +209,23 @@ func (client VirtualMachineExtensionsClient) DeleteSender(req *http.Request) (fu
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineExtensionsDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
return
}
@@ -231,6 +273,7 @@ func (client VirtualMachineExtensionsClient) Get(ctx context.Context, resourceGr
result, err = client.GetResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsClient", "Get", resp, "Failure responding to request")
+ return
}
return
@@ -311,6 +354,7 @@ func (client VirtualMachineExtensionsClient) List(ctx context.Context, resourceG
result, err = client.ListResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsClient", "List", resp, "Failure responding to request")
+ return
}
return
@@ -383,7 +427,7 @@ func (client VirtualMachineExtensionsClient) Update(ctx context.Context, resourc
result, err = client.UpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsClient", "Update", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsClient", "Update", nil, "Failure sending request")
return
}
@@ -422,7 +466,33 @@ func (client VirtualMachineExtensionsClient) UpdateSender(req *http.Request) (fu
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineExtensionsUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ vme.Response.Response, err = future.GetResult(sender)
+ if vme.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsUpdateFuture", "Result", nil, "received nil response and error")
+ }
+ if 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
+ }
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute/virtualmachineimages.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute/virtualmachineimages.go
index 07a28904a26..6e027eb368a 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute/virtualmachineimages.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute/virtualmachineimages.go
@@ -76,6 +76,7 @@ func (client VirtualMachineImagesClient) Get(ctx context.Context, location strin
result, err = client.GetResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachineImagesClient", "Get", resp, "Failure responding to request")
+ return
}
return
@@ -157,6 +158,7 @@ func (client VirtualMachineImagesClient) List(ctx context.Context, location stri
result, err = client.ListResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachineImagesClient", "List", resp, "Failure responding to request")
+ return
}
return
@@ -243,6 +245,7 @@ func (client VirtualMachineImagesClient) ListOffers(ctx context.Context, locatio
result, err = client.ListOffersResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachineImagesClient", "ListOffers", resp, "Failure responding to request")
+ return
}
return
@@ -317,6 +320,7 @@ func (client VirtualMachineImagesClient) ListPublishers(ctx context.Context, loc
result, err = client.ListPublishersResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachineImagesClient", "ListPublishers", resp, "Failure responding to request")
+ return
}
return
@@ -392,6 +396,7 @@ func (client VirtualMachineImagesClient) ListSkus(ctx context.Context, location
result, err = client.ListSkusResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachineImagesClient", "ListSkus", resp, "Failure responding to request")
+ return
}
return
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute/virtualmachineruncommands.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute/virtualmachineruncommands.go
index f919701d77d..851d0869ea0 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute/virtualmachineruncommands.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute/virtualmachineruncommands.go
@@ -80,6 +80,7 @@ func (client VirtualMachineRunCommandsClient) Get(ctx context.Context, location
result, err = client.GetResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachineRunCommandsClient", "Get", resp, "Failure responding to request")
+ return
}
return
@@ -161,9 +162,11 @@ func (client VirtualMachineRunCommandsClient) List(ctx context.Context, location
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
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute/virtualmachines.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute/virtualmachines.go
index 83be0841d67..6286a379136 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute/virtualmachines.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute/virtualmachines.go
@@ -75,7 +75,7 @@ func (client VirtualMachinesClient) Capture(ctx context.Context, resourceGroupNa
result, err = client.CaptureSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Capture", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Capture", nil, "Failure sending request")
return
}
@@ -113,7 +113,33 @@ func (client VirtualMachinesClient) CaptureSender(req *http.Request) (future Vir
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesCaptureFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ vmcr.Response.Response, err = future.GetResult(sender)
+ if vmcr.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesCaptureFuture", "Result", nil, "received nil response and error")
+ }
+ if 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
+ }
return
}
@@ -153,7 +179,7 @@ func (client VirtualMachinesClient) ConvertToManagedDisks(ctx context.Context, r
result, err = client.ConvertToManagedDisksSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "ConvertToManagedDisks", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "ConvertToManagedDisks", nil, "Failure sending request")
return
}
@@ -189,7 +215,23 @@ func (client VirtualMachinesClient) ConvertToManagedDisksSender(req *http.Reques
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesConvertToManagedDisksFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
return
}
@@ -249,7 +291,7 @@ func (client VirtualMachinesClient) CreateOrUpdate(ctx context.Context, resource
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "CreateOrUpdate", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "CreateOrUpdate", nil, "Failure sending request")
return
}
@@ -288,7 +330,33 @@ func (client VirtualMachinesClient) CreateOrUpdateSender(req *http.Request) (fut
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ VM.Response.Response, err = future.GetResult(sender)
+ if VM.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesCreateOrUpdateFuture", "Result", nil, "received nil response and error")
+ }
+ if 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
+ }
return
}
@@ -328,7 +396,7 @@ func (client VirtualMachinesClient) Deallocate(ctx context.Context, resourceGrou
result, err = client.DeallocateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Deallocate", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Deallocate", nil, "Failure sending request")
return
}
@@ -364,7 +432,23 @@ func (client VirtualMachinesClient) DeallocateSender(req *http.Request) (future
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesDeallocateFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
return
}
@@ -402,7 +486,7 @@ func (client VirtualMachinesClient) Delete(ctx context.Context, resourceGroupNam
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Delete", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Delete", nil, "Failure sending request")
return
}
@@ -438,7 +522,23 @@ func (client VirtualMachinesClient) DeleteSender(req *http.Request) (future Virt
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
return
}
@@ -484,6 +584,7 @@ func (client VirtualMachinesClient) Generalize(ctx context.Context, resourceGrou
result, err = client.GeneralizeResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Generalize", resp, "Failure responding to request")
+ return
}
return
@@ -559,6 +660,7 @@ func (client VirtualMachinesClient) Get(ctx context.Context, resourceGroupName s
result, err = client.GetResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Get", resp, "Failure responding to request")
+ return
}
return
@@ -637,6 +739,7 @@ func (client VirtualMachinesClient) InstanceView(ctx context.Context, resourceGr
result, err = client.InstanceViewResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "InstanceView", resp, "Failure responding to request")
+ return
}
return
@@ -713,9 +816,11 @@ func (client VirtualMachinesClient) List(ctx context.Context, resourceGroupName
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
@@ -826,9 +931,11 @@ func (client VirtualMachinesClient) ListAll(ctx context.Context) (result Virtual
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
@@ -939,6 +1046,7 @@ func (client VirtualMachinesClient) ListAvailableSizes(ctx context.Context, reso
result, err = client.ListAvailableSizesResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "ListAvailableSizes", resp, "Failure responding to request")
+ return
}
return
@@ -1020,9 +1128,11 @@ func (client VirtualMachinesClient) ListByLocation(ctx context.Context, location
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
@@ -1126,7 +1236,7 @@ func (client VirtualMachinesClient) PerformMaintenance(ctx context.Context, reso
result, err = client.PerformMaintenanceSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "PerformMaintenance", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "PerformMaintenance", nil, "Failure sending request")
return
}
@@ -1162,7 +1272,23 @@ func (client VirtualMachinesClient) PerformMaintenanceSender(req *http.Request)
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesPerformMaintenanceFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
return
}
@@ -1201,7 +1327,7 @@ func (client VirtualMachinesClient) PowerOff(ctx context.Context, resourceGroupN
result, err = client.PowerOffSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "PowerOff", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "PowerOff", nil, "Failure sending request")
return
}
@@ -1237,7 +1363,23 @@ func (client VirtualMachinesClient) PowerOffSender(req *http.Request) (future Vi
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesPowerOffFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
return
}
@@ -1275,7 +1417,7 @@ func (client VirtualMachinesClient) Redeploy(ctx context.Context, resourceGroupN
result, err = client.RedeploySender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Redeploy", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Redeploy", nil, "Failure sending request")
return
}
@@ -1311,7 +1453,23 @@ func (client VirtualMachinesClient) RedeploySender(req *http.Request) (future Vi
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesRedeployFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
return
}
@@ -1350,7 +1508,7 @@ func (client VirtualMachinesClient) Reimage(ctx context.Context, resourceGroupNa
result, err = client.ReimageSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Reimage", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Reimage", nil, "Failure sending request")
return
}
@@ -1391,7 +1549,23 @@ func (client VirtualMachinesClient) ReimageSender(req *http.Request) (future Vir
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesReimageFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
return
}
@@ -1429,7 +1603,7 @@ func (client VirtualMachinesClient) Restart(ctx context.Context, resourceGroupNa
result, err = client.RestartSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Restart", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Restart", nil, "Failure sending request")
return
}
@@ -1465,7 +1639,23 @@ func (client VirtualMachinesClient) RestartSender(req *http.Request) (future Vir
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesRestartFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
return
}
@@ -1510,7 +1700,7 @@ func (client VirtualMachinesClient) RunCommand(ctx context.Context, resourceGrou
result, err = client.RunCommandSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "RunCommand", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "RunCommand", nil, "Failure sending request")
return
}
@@ -1548,7 +1738,33 @@ func (client VirtualMachinesClient) RunCommandSender(req *http.Request) (future
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesRunCommandFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ rcr.Response.Response, err = future.GetResult(sender)
+ if rcr.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesRunCommandFuture", "Result", nil, "received nil response and error")
+ }
+ if 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
+ }
return
}
@@ -1587,7 +1803,7 @@ func (client VirtualMachinesClient) Start(ctx context.Context, resourceGroupName
result, err = client.StartSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Start", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Start", nil, "Failure sending request")
return
}
@@ -1623,7 +1839,23 @@ func (client VirtualMachinesClient) StartSender(req *http.Request) (future Virtu
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesStartFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
return
}
@@ -1662,7 +1894,7 @@ func (client VirtualMachinesClient) Update(ctx context.Context, resourceGroupNam
result, err = client.UpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Update", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Update", nil, "Failure sending request")
return
}
@@ -1700,7 +1932,33 @@ func (client VirtualMachinesClient) UpdateSender(req *http.Request) (future Virt
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ VM.Response.Response, err = future.GetResult(sender)
+ if VM.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesUpdateFuture", "Result", nil, "received nil response and error")
+ }
+ if 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
+ }
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute/virtualmachinescalesetextensions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute/virtualmachinescalesetextensions.go
index 5e35c286599..f273a2f4a81 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute/virtualmachinescalesetextensions.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute/virtualmachinescalesetextensions.go
@@ -67,7 +67,7 @@ func (client VirtualMachineScaleSetExtensionsClient) CreateOrUpdate(ctx context.
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsClient", "CreateOrUpdate", nil, "Failure sending request")
return
}
@@ -106,7 +106,33 @@ func (client VirtualMachineScaleSetExtensionsClient) CreateOrUpdateSender(req *h
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetExtensionsCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ vmsse.Response.Response, err = future.GetResult(sender)
+ if vmsse.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsCreateOrUpdateFuture", "Result", nil, "received nil response and error")
+ }
+ if 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
+ }
return
}
@@ -146,7 +172,7 @@ func (client VirtualMachineScaleSetExtensionsClient) Delete(ctx context.Context,
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsClient", "Delete", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsClient", "Delete", nil, "Failure sending request")
return
}
@@ -183,7 +209,23 @@ func (client VirtualMachineScaleSetExtensionsClient) DeleteSender(req *http.Requ
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetExtensionsDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
return
}
@@ -231,6 +273,7 @@ func (client VirtualMachineScaleSetExtensionsClient) Get(ctx context.Context, re
result, err = client.GetResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsClient", "Get", resp, "Failure responding to request")
+ return
}
return
@@ -311,9 +354,11 @@ func (client VirtualMachineScaleSetExtensionsClient) List(ctx context.Context, r
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
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute/virtualmachinescalesetrollingupgrades.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute/virtualmachinescalesetrollingupgrades.go
index d41790d19c4..011b1fcdaed 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute/virtualmachinescalesetrollingupgrades.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute/virtualmachinescalesetrollingupgrades.go
@@ -66,7 +66,7 @@ func (client VirtualMachineScaleSetRollingUpgradesClient) Cancel(ctx context.Con
result, err = client.CancelSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesClient", "Cancel", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesClient", "Cancel", nil, "Failure sending request")
return
}
@@ -102,7 +102,23 @@ func (client VirtualMachineScaleSetRollingUpgradesClient) CancelSender(req *http
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetRollingUpgradesCancelFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
return
}
@@ -148,6 +164,7 @@ func (client VirtualMachineScaleSetRollingUpgradesClient) GetLatest(ctx context.
result, err = client.GetLatestResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesClient", "GetLatest", resp, "Failure responding to request")
+ return
}
return
@@ -217,7 +234,7 @@ func (client VirtualMachineScaleSetRollingUpgradesClient) StartExtensionUpgrade(
result, err = client.StartExtensionUpgradeSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesClient", "StartExtensionUpgrade", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesClient", "StartExtensionUpgrade", nil, "Failure sending request")
return
}
@@ -253,7 +270,23 @@ func (client VirtualMachineScaleSetRollingUpgradesClient) StartExtensionUpgradeS
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetRollingUpgradesStartExtensionUpgradeFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
return
}
@@ -292,7 +325,7 @@ func (client VirtualMachineScaleSetRollingUpgradesClient) StartOSUpgrade(ctx con
result, err = client.StartOSUpgradeSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesClient", "StartOSUpgrade", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesClient", "StartOSUpgrade", nil, "Failure sending request")
return
}
@@ -328,7 +361,23 @@ func (client VirtualMachineScaleSetRollingUpgradesClient) StartOSUpgradeSender(r
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetRollingUpgradesStartOSUpgradeFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute/virtualmachinescalesets.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute/virtualmachinescalesets.go
index 8ce53cbffc7..cf033e6a846 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute/virtualmachinescalesets.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute/virtualmachinescalesets.go
@@ -90,7 +90,7 @@ func (client VirtualMachineScaleSetsClient) CreateOrUpdate(ctx context.Context,
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "CreateOrUpdate", nil, "Failure sending request")
return
}
@@ -128,7 +128,33 @@ func (client VirtualMachineScaleSetsClient) CreateOrUpdateSender(req *http.Reque
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ vmss.Response.Response, err = future.GetResult(sender)
+ if vmss.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsCreateOrUpdateFuture", "Result", nil, "received nil response and error")
+ }
+ if 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
+ }
return
}
@@ -169,7 +195,7 @@ func (client VirtualMachineScaleSetsClient) Deallocate(ctx context.Context, reso
result, err = client.DeallocateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Deallocate", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Deallocate", nil, "Failure sending request")
return
}
@@ -210,7 +236,23 @@ func (client VirtualMachineScaleSetsClient) DeallocateSender(req *http.Request)
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsDeallocateFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
return
}
@@ -248,7 +290,7 @@ func (client VirtualMachineScaleSetsClient) Delete(ctx context.Context, resource
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Delete", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Delete", nil, "Failure sending request")
return
}
@@ -284,7 +326,23 @@ func (client VirtualMachineScaleSetsClient) DeleteSender(req *http.Request) (fut
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
return
}
@@ -329,7 +387,7 @@ func (client VirtualMachineScaleSetsClient) DeleteInstances(ctx context.Context,
result, err = client.DeleteInstancesSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "DeleteInstances", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "DeleteInstances", nil, "Failure sending request")
return
}
@@ -367,7 +425,23 @@ func (client VirtualMachineScaleSetsClient) DeleteInstancesSender(req *http.Requ
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsDeleteInstancesFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
return
}
@@ -415,6 +489,7 @@ func (client VirtualMachineScaleSetsClient) ForceRecoveryServiceFabricPlatformUp
result, err = client.ForceRecoveryServiceFabricPlatformUpdateDomainWalkResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "ForceRecoveryServiceFabricPlatformUpdateDomainWalk", resp, "Failure responding to request")
+ return
}
return
@@ -491,6 +566,7 @@ func (client VirtualMachineScaleSetsClient) Get(ctx context.Context, resourceGro
result, err = client.GetResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Get", resp, "Failure responding to request")
+ return
}
return
@@ -566,6 +642,7 @@ func (client VirtualMachineScaleSetsClient) GetInstanceView(ctx context.Context,
result, err = client.GetInstanceViewResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "GetInstanceView", resp, "Failure responding to request")
+ return
}
return
@@ -642,9 +719,11 @@ func (client VirtualMachineScaleSetsClient) GetOSUpgradeHistory(ctx context.Cont
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
@@ -757,9 +836,11 @@ func (client VirtualMachineScaleSetsClient) List(ctx context.Context, resourceGr
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
@@ -871,9 +952,11 @@ func (client VirtualMachineScaleSetsClient) ListAll(ctx context.Context) (result
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
@@ -986,9 +1069,11 @@ func (client VirtualMachineScaleSetsClient) ListSkus(ctx context.Context, resour
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
@@ -1096,7 +1181,7 @@ func (client VirtualMachineScaleSetsClient) PerformMaintenance(ctx context.Conte
result, err = client.PerformMaintenanceSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "PerformMaintenance", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "PerformMaintenance", nil, "Failure sending request")
return
}
@@ -1137,7 +1222,23 @@ func (client VirtualMachineScaleSetsClient) PerformMaintenanceSender(req *http.R
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsPerformMaintenanceFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
return
}
@@ -1177,7 +1278,7 @@ func (client VirtualMachineScaleSetsClient) PowerOff(ctx context.Context, resour
result, err = client.PowerOffSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "PowerOff", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "PowerOff", nil, "Failure sending request")
return
}
@@ -1218,7 +1319,23 @@ func (client VirtualMachineScaleSetsClient) PowerOffSender(req *http.Request) (f
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsPowerOffFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
return
}
@@ -1258,7 +1375,7 @@ func (client VirtualMachineScaleSetsClient) Redeploy(ctx context.Context, resour
result, err = client.RedeploySender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Redeploy", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Redeploy", nil, "Failure sending request")
return
}
@@ -1299,7 +1416,23 @@ func (client VirtualMachineScaleSetsClient) RedeploySender(req *http.Request) (f
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsRedeployFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
return
}
@@ -1339,7 +1472,7 @@ func (client VirtualMachineScaleSetsClient) Reimage(ctx context.Context, resourc
result, err = client.ReimageSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Reimage", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Reimage", nil, "Failure sending request")
return
}
@@ -1380,7 +1513,23 @@ func (client VirtualMachineScaleSetsClient) ReimageSender(req *http.Request) (fu
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsReimageFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
return
}
@@ -1420,7 +1569,7 @@ func (client VirtualMachineScaleSetsClient) ReimageAll(ctx context.Context, reso
result, err = client.ReimageAllSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "ReimageAll", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "ReimageAll", nil, "Failure sending request")
return
}
@@ -1461,7 +1610,23 @@ func (client VirtualMachineScaleSetsClient) ReimageAllSender(req *http.Request)
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsReimageAllFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
return
}
@@ -1500,7 +1665,7 @@ func (client VirtualMachineScaleSetsClient) Restart(ctx context.Context, resourc
result, err = client.RestartSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Restart", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Restart", nil, "Failure sending request")
return
}
@@ -1541,7 +1706,23 @@ func (client VirtualMachineScaleSetsClient) RestartSender(req *http.Request) (fu
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsRestartFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
return
}
@@ -1580,7 +1761,7 @@ func (client VirtualMachineScaleSetsClient) Start(ctx context.Context, resourceG
result, err = client.StartSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Start", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Start", nil, "Failure sending request")
return
}
@@ -1621,7 +1802,23 @@ func (client VirtualMachineScaleSetsClient) StartSender(req *http.Request) (futu
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsStartFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
return
}
@@ -1660,7 +1857,7 @@ func (client VirtualMachineScaleSetsClient) Update(ctx context.Context, resource
result, err = client.UpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Update", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Update", nil, "Failure sending request")
return
}
@@ -1698,7 +1895,33 @@ func (client VirtualMachineScaleSetsClient) UpdateSender(req *http.Request) (fut
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ vmss.Response.Response, err = future.GetResult(sender)
+ if vmss.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsUpdateFuture", "Result", nil, "received nil response and error")
+ }
+ if 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
+ }
return
}
@@ -1744,7 +1967,7 @@ func (client VirtualMachineScaleSetsClient) UpdateInstances(ctx context.Context,
result, err = client.UpdateInstancesSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "UpdateInstances", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "UpdateInstances", nil, "Failure sending request")
return
}
@@ -1782,7 +2005,23 @@ func (client VirtualMachineScaleSetsClient) UpdateInstancesSender(req *http.Requ
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsUpdateInstancesFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute/virtualmachinescalesetvms.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute/virtualmachinescalesetvms.go
index 05f327f7309..30fc71301d8 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute/virtualmachinescalesetvms.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute/virtualmachinescalesetvms.go
@@ -69,7 +69,7 @@ func (client VirtualMachineScaleSetVMsClient) Deallocate(ctx context.Context, re
result, err = client.DeallocateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Deallocate", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Deallocate", nil, "Failure sending request")
return
}
@@ -106,7 +106,23 @@ func (client VirtualMachineScaleSetVMsClient) DeallocateSender(req *http.Request
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsDeallocateFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
return
}
@@ -145,7 +161,7 @@ func (client VirtualMachineScaleSetVMsClient) Delete(ctx context.Context, resour
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Delete", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Delete", nil, "Failure sending request")
return
}
@@ -182,7 +198,23 @@ func (client VirtualMachineScaleSetVMsClient) DeleteSender(req *http.Request) (f
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
return
}
@@ -229,6 +261,7 @@ func (client VirtualMachineScaleSetVMsClient) Get(ctx context.Context, resourceG
result, err = client.GetResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Get", resp, "Failure responding to request")
+ return
}
return
@@ -306,6 +339,7 @@ func (client VirtualMachineScaleSetVMsClient) GetInstanceView(ctx context.Contex
result, err = client.GetInstanceViewResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "GetInstanceView", resp, "Failure responding to request")
+ return
}
return
@@ -387,9 +421,11 @@ func (client VirtualMachineScaleSetVMsClient) List(ctx context.Context, resource
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
@@ -504,7 +540,7 @@ func (client VirtualMachineScaleSetVMsClient) PerformMaintenance(ctx context.Con
result, err = client.PerformMaintenanceSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "PerformMaintenance", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "PerformMaintenance", nil, "Failure sending request")
return
}
@@ -541,7 +577,23 @@ func (client VirtualMachineScaleSetVMsClient) PerformMaintenanceSender(req *http
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsPerformMaintenanceFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
return
}
@@ -581,7 +633,7 @@ func (client VirtualMachineScaleSetVMsClient) PowerOff(ctx context.Context, reso
result, err = client.PowerOffSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "PowerOff", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "PowerOff", nil, "Failure sending request")
return
}
@@ -618,7 +670,23 @@ func (client VirtualMachineScaleSetVMsClient) PowerOffSender(req *http.Request)
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsPowerOffFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
return
}
@@ -658,7 +726,7 @@ func (client VirtualMachineScaleSetVMsClient) Redeploy(ctx context.Context, reso
result, err = client.RedeploySender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Redeploy", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Redeploy", nil, "Failure sending request")
return
}
@@ -695,7 +763,23 @@ func (client VirtualMachineScaleSetVMsClient) RedeploySender(req *http.Request)
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsRedeployFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
return
}
@@ -735,7 +819,7 @@ func (client VirtualMachineScaleSetVMsClient) Reimage(ctx context.Context, resou
result, err = client.ReimageSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Reimage", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Reimage", nil, "Failure sending request")
return
}
@@ -777,7 +861,23 @@ func (client VirtualMachineScaleSetVMsClient) ReimageSender(req *http.Request) (
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsReimageFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
return
}
@@ -817,7 +917,7 @@ func (client VirtualMachineScaleSetVMsClient) ReimageAll(ctx context.Context, re
result, err = client.ReimageAllSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "ReimageAll", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "ReimageAll", nil, "Failure sending request")
return
}
@@ -854,7 +954,23 @@ func (client VirtualMachineScaleSetVMsClient) ReimageAllSender(req *http.Request
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsReimageAllFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
return
}
@@ -893,7 +1009,7 @@ func (client VirtualMachineScaleSetVMsClient) Restart(ctx context.Context, resou
result, err = client.RestartSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Restart", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Restart", nil, "Failure sending request")
return
}
@@ -930,7 +1046,23 @@ func (client VirtualMachineScaleSetVMsClient) RestartSender(req *http.Request) (
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsRestartFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
return
}
@@ -976,7 +1108,7 @@ func (client VirtualMachineScaleSetVMsClient) RunCommand(ctx context.Context, re
result, err = client.RunCommandSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "RunCommand", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "RunCommand", nil, "Failure sending request")
return
}
@@ -1015,7 +1147,33 @@ func (client VirtualMachineScaleSetVMsClient) RunCommandSender(req *http.Request
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsRunCommandFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ rcr.Response.Response, err = future.GetResult(sender)
+ if rcr.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsRunCommandFuture", "Result", nil, "received nil response and error")
+ }
+ if 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
+ }
return
}
@@ -1055,7 +1213,7 @@ func (client VirtualMachineScaleSetVMsClient) Start(ctx context.Context, resourc
result, err = client.StartSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Start", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Start", nil, "Failure sending request")
return
}
@@ -1092,7 +1250,23 @@ func (client VirtualMachineScaleSetVMsClient) StartSender(req *http.Request) (fu
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsStartFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
return
}
@@ -1153,7 +1327,7 @@ func (client VirtualMachineScaleSetVMsClient) Update(ctx context.Context, resour
result, err = client.UpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Update", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Update", nil, "Failure sending request")
return
}
@@ -1196,7 +1370,33 @@ func (client VirtualMachineScaleSetVMsClient) UpdateSender(req *http.Request) (f
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ vmssv.Response.Response, err = future.GetResult(sender)
+ if vmssv.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsUpdateFuture", "Result", nil, "received nil response and error")
+ }
+ if 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
+ }
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute/virtualmachinesizes.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute/virtualmachinesizes.go
index cc5424e324e..c06436e05eb 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute/virtualmachinesizes.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute/virtualmachinesizes.go
@@ -80,6 +80,7 @@ func (client VirtualMachineSizesClient) List(ctx context.Context, location strin
result, err = client.ListResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachineSizesClient", "List", resp, "Failure responding to request")
+ return
}
return
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/CHANGELOG.md b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/CHANGELOG.md
new file mode 100644
index 00000000000..508427db51f
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/CHANGELOG.md
@@ -0,0 +1,5 @@
+Generated from https://github.com/Azure/azure-rest-api-specs/tree/3c764635e7d442b3e74caf593029fcd440b3ef82//specification/compute/resource-manager/readme.md tag: `package-2019-12-01`
+
+Code generator @microsoft.azure/autorest.go@2.1.171
+
+
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/availabilitysets.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/availabilitysets.go
index def48314528..84f686be844 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/availabilitysets.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/availabilitysets.go
@@ -74,6 +74,7 @@ func (client AvailabilitySetsClient) CreateOrUpdate(ctx context.Context, resourc
result, err = client.CreateOrUpdateResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.AvailabilitySetsClient", "CreateOrUpdate", resp, "Failure responding to request")
+ return
}
return
@@ -151,6 +152,7 @@ func (client AvailabilitySetsClient) Delete(ctx context.Context, resourceGroupNa
result, err = client.DeleteResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.AvailabilitySetsClient", "Delete", resp, "Failure responding to request")
+ return
}
return
@@ -225,6 +227,7 @@ func (client AvailabilitySetsClient) Get(ctx context.Context, resourceGroupName
result, err = client.GetResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.AvailabilitySetsClient", "Get", resp, "Failure responding to request")
+ return
}
return
@@ -300,9 +303,11 @@ func (client AvailabilitySetsClient) List(ctx context.Context, resourceGroupName
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
@@ -415,6 +420,7 @@ func (client AvailabilitySetsClient) ListAvailableSizes(ctx context.Context, res
result, err = client.ListAvailableSizesResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.AvailabilitySetsClient", "ListAvailableSizes", resp, "Failure responding to request")
+ return
}
return
@@ -490,9 +496,11 @@ func (client AvailabilitySetsClient) ListBySubscription(ctx context.Context, exp
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
@@ -607,6 +615,7 @@ func (client AvailabilitySetsClient) Update(ctx context.Context, resourceGroupNa
result, err = client.UpdateResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.AvailabilitySetsClient", "Update", resp, "Failure responding to request")
+ return
}
return
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/containerservices.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/containerservices.go
index 92208281f44..680e8cb6064 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/containerservices.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/containerservices.go
@@ -99,7 +99,7 @@ func (client ContainerServicesClient) CreateOrUpdate(ctx context.Context, resour
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.ContainerServicesClient", "CreateOrUpdate", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.ContainerServicesClient", "CreateOrUpdate", nil, "Failure sending request")
return
}
@@ -137,7 +137,33 @@ func (client ContainerServicesClient) CreateOrUpdateSender(req *http.Request) (f
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(client ContainerServicesClient) (cs ContainerService, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.ContainerServicesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("compute.ContainerServicesCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ cs.Response.Response, err = future.GetResult(sender)
+ if cs.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "compute.ContainerServicesCreateOrUpdateFuture", "Result", nil, "received nil response and error")
+ }
+ if err == nil && cs.Response.Response.StatusCode != http.StatusNoContent {
+ cs, err = client.CreateOrUpdateResponder(cs.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.ContainerServicesCreateOrUpdateFuture", "Result", cs.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+ }
return
}
@@ -179,7 +205,7 @@ func (client ContainerServicesClient) Delete(ctx context.Context, resourceGroupN
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.ContainerServicesClient", "Delete", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.ContainerServicesClient", "Delete", nil, "Failure sending request")
return
}
@@ -215,7 +241,23 @@ func (client ContainerServicesClient) DeleteSender(req *http.Request) (future Co
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(client ContainerServicesClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.ContainerServicesDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("compute.ContainerServicesDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
return
}
@@ -263,6 +305,7 @@ func (client ContainerServicesClient) Get(ctx context.Context, resourceGroupName
result, err = client.GetResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.ContainerServicesClient", "Get", resp, "Failure responding to request")
+ return
}
return
@@ -337,9 +380,11 @@ func (client ContainerServicesClient) List(ctx context.Context) (result Containe
result.cslr, err = client.ListResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.ContainerServicesClient", "List", resp, "Failure responding to request")
+ return
}
if result.cslr.hasNextLink() && result.cslr.IsEmpty() {
err = result.NextWithContext(ctx)
+ return
}
return
@@ -452,9 +497,11 @@ func (client ContainerServicesClient) ListByResourceGroup(ctx context.Context, r
result.cslr, err = client.ListByResourceGroupResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.ContainerServicesClient", "ListByResourceGroup", resp, "Failure responding to request")
+ return
}
if result.cslr.hasNextLink() && result.cslr.IsEmpty() {
err = result.NextWithContext(ctx)
+ return
}
return
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/dedicatedhostgroups.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/dedicatedhostgroups.go
index a4dbcd355a6..2915086e243 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/dedicatedhostgroups.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/dedicatedhostgroups.go
@@ -87,6 +87,7 @@ func (client DedicatedHostGroupsClient) CreateOrUpdate(ctx context.Context, reso
result, err = client.CreateOrUpdateResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.DedicatedHostGroupsClient", "CreateOrUpdate", resp, "Failure responding to request")
+ return
}
return
@@ -164,6 +165,7 @@ func (client DedicatedHostGroupsClient) Delete(ctx context.Context, resourceGrou
result, err = client.DeleteResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.DedicatedHostGroupsClient", "Delete", resp, "Failure responding to request")
+ return
}
return
@@ -238,6 +240,7 @@ func (client DedicatedHostGroupsClient) Get(ctx context.Context, resourceGroupNa
result, err = client.GetResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.DedicatedHostGroupsClient", "Get", resp, "Failure responding to request")
+ return
}
return
@@ -314,9 +317,11 @@ func (client DedicatedHostGroupsClient) ListByResourceGroup(ctx context.Context,
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
@@ -427,9 +432,11 @@ func (client DedicatedHostGroupsClient) ListBySubscription(ctx context.Context)
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
@@ -541,6 +548,7 @@ func (client DedicatedHostGroupsClient) Update(ctx context.Context, resourceGrou
result, err = client.UpdateResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.DedicatedHostGroupsClient", "Update", resp, "Failure responding to request")
+ return
}
return
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/dedicatedhosts.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/dedicatedhosts.go
index 104ac3cfe03..e9ee7f63bfb 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/dedicatedhosts.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/dedicatedhosts.go
@@ -79,7 +79,7 @@ func (client DedicatedHostsClient) CreateOrUpdate(ctx context.Context, resourceG
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.DedicatedHostsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.DedicatedHostsClient", "CreateOrUpdate", nil, "Failure sending request")
return
}
@@ -118,7 +118,33 @@ func (client DedicatedHostsClient) CreateOrUpdateSender(req *http.Request) (futu
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.DedicatedHostsCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ dh.Response.Response, err = future.GetResult(sender)
+ if dh.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "compute.DedicatedHostsCreateOrUpdateFuture", "Result", nil, "received nil response and error")
+ }
+ if 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
+ }
return
}
@@ -158,7 +184,7 @@ func (client DedicatedHostsClient) Delete(ctx context.Context, resourceGroupName
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.DedicatedHostsClient", "Delete", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.DedicatedHostsClient", "Delete", nil, "Failure sending request")
return
}
@@ -195,7 +221,23 @@ func (client DedicatedHostsClient) DeleteSender(req *http.Request) (future Dedic
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.DedicatedHostsDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
return
}
@@ -243,6 +285,7 @@ func (client DedicatedHostsClient) Get(ctx context.Context, resourceGroupName st
result, err = client.GetResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.DedicatedHostsClient", "Get", resp, "Failure responding to request")
+ return
}
return
@@ -324,9 +367,11 @@ func (client DedicatedHostsClient) ListByHostGroup(ctx context.Context, resource
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
@@ -433,7 +478,7 @@ func (client DedicatedHostsClient) Update(ctx context.Context, resourceGroupName
result, err = client.UpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.DedicatedHostsClient", "Update", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.DedicatedHostsClient", "Update", nil, "Failure sending request")
return
}
@@ -472,7 +517,33 @@ func (client DedicatedHostsClient) UpdateSender(req *http.Request) (future Dedic
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.DedicatedHostsUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ dh.Response.Response, err = future.GetResult(sender)
+ if dh.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "compute.DedicatedHostsUpdateFuture", "Result", nil, "received nil response and error")
+ }
+ if 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
+ }
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/diskencryptionsets.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/diskencryptionsets.go
index cd9fea1050f..91582c52f25 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/diskencryptionsets.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/diskencryptionsets.go
@@ -81,7 +81,7 @@ func (client DiskEncryptionSetsClient) CreateOrUpdate(ctx context.Context, resou
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsClient", "CreateOrUpdate", nil, "Failure sending request")
return
}
@@ -119,7 +119,33 @@ func (client DiskEncryptionSetsClient) CreateOrUpdateSender(req *http.Request) (
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.DiskEncryptionSetsCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ desVar.Response.Response, err = future.GetResult(sender)
+ if desVar.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsCreateOrUpdateFuture", "Result", nil, "received nil response and error")
+ }
+ if 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
+ }
return
}
@@ -160,7 +186,7 @@ func (client DiskEncryptionSetsClient) Delete(ctx context.Context, resourceGroup
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsClient", "Delete", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsClient", "Delete", nil, "Failure sending request")
return
}
@@ -196,7 +222,23 @@ func (client DiskEncryptionSetsClient) DeleteSender(req *http.Request) (future D
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.DiskEncryptionSetsDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
return
}
@@ -244,6 +286,7 @@ func (client DiskEncryptionSetsClient) Get(ctx context.Context, resourceGroupNam
result, err = client.GetResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsClient", "Get", resp, "Failure responding to request")
+ return
}
return
@@ -317,9 +360,11 @@ func (client DiskEncryptionSetsClient) List(ctx context.Context) (result DiskEnc
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
@@ -430,9 +475,11 @@ func (client DiskEncryptionSetsClient) ListByResourceGroup(ctx context.Context,
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
@@ -540,7 +587,7 @@ func (client DiskEncryptionSetsClient) Update(ctx context.Context, resourceGroup
result, err = client.UpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsClient", "Update", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsClient", "Update", nil, "Failure sending request")
return
}
@@ -578,7 +625,33 @@ func (client DiskEncryptionSetsClient) UpdateSender(req *http.Request) (future D
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.DiskEncryptionSetsUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ desVar.Response.Response, err = future.GetResult(sender)
+ if desVar.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsUpdateFuture", "Result", nil, "received nil response and error")
+ }
+ if 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
+ }
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/disks.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/disks.go
index b214d782776..88bfc2bb33f 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/disks.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/disks.go
@@ -83,7 +83,7 @@ func (client DisksClient) CreateOrUpdate(ctx context.Context, resourceGroupName
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.DisksClient", "CreateOrUpdate", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.DisksClient", "CreateOrUpdate", nil, "Failure sending request")
return
}
@@ -123,7 +123,33 @@ func (client DisksClient) CreateOrUpdateSender(req *http.Request) (future DisksC
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.DisksCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ d.Response.Response, err = future.GetResult(sender)
+ if d.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "compute.DisksCreateOrUpdateFuture", "Result", nil, "received nil response and error")
+ }
+ if 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
+ }
return
}
@@ -164,7 +190,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", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.DisksClient", "Delete", nil, "Failure sending request")
return
}
@@ -200,7 +226,23 @@ func (client DisksClient) DeleteSender(req *http.Request) (future DisksDeleteFut
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.DisksDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
return
}
@@ -248,6 +290,7 @@ func (client DisksClient) Get(ctx context.Context, resourceGroupName string, dis
result, err = client.GetResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.DisksClient", "Get", resp, "Failure responding to request")
+ return
}
return
@@ -324,7 +367,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", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.DisksClient", "GrantAccess", nil, "Failure sending request")
return
}
@@ -362,7 +405,33 @@ func (client DisksClient) GrantAccessSender(req *http.Request) (future DisksGran
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.DisksGrantAccessFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ au.Response.Response, err = future.GetResult(sender)
+ if au.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "compute.DisksGrantAccessFuture", "Result", nil, "received nil response and error")
+ }
+ if 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
+ }
return
}
@@ -407,9 +476,11 @@ func (client DisksClient) List(ctx context.Context) (result DiskListPage, err er
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
@@ -520,9 +591,11 @@ func (client DisksClient) ListByResourceGroup(ctx context.Context, resourceGroup
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
@@ -628,7 +701,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", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.DisksClient", "RevokeAccess", nil, "Failure sending request")
return
}
@@ -664,7 +737,23 @@ func (client DisksClient) RevokeAccessSender(req *http.Request) (future DisksRev
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.DisksRevokeAccessFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
return
}
@@ -705,7 +794,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", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.DisksClient", "Update", nil, "Failure sending request")
return
}
@@ -743,7 +832,33 @@ func (client DisksClient) UpdateSender(req *http.Request) (future DisksUpdateFut
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.DisksUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ d.Response.Response, err = future.GetResult(sender)
+ if d.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "compute.DisksUpdateFuture", "Result", nil, "received nil response and error")
+ }
+ if 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
+ }
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/galleries.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/galleries.go
index 8ff8463708a..cd50b6e7cde 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/galleries.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/galleries.go
@@ -66,7 +66,7 @@ func (client GalleriesClient) CreateOrUpdate(ctx context.Context, resourceGroupN
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.GalleriesClient", "CreateOrUpdate", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.GalleriesClient", "CreateOrUpdate", nil, "Failure sending request")
return
}
@@ -104,7 +104,33 @@ func (client GalleriesClient) CreateOrUpdateSender(req *http.Request) (future Ga
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.GalleriesCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ g.Response.Response, err = future.GetResult(sender)
+ if g.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleriesCreateOrUpdateFuture", "Result", nil, "received nil response and error")
+ }
+ if 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
+ }
return
}
@@ -143,7 +169,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", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.GalleriesClient", "Delete", nil, "Failure sending request")
return
}
@@ -179,7 +205,23 @@ func (client GalleriesClient) DeleteSender(req *http.Request) (future GalleriesD
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.GalleriesDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
return
}
@@ -225,6 +267,7 @@ func (client GalleriesClient) Get(ctx context.Context, resourceGroupName string,
result, err = client.GetResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.GalleriesClient", "Get", resp, "Failure responding to request")
+ return
}
return
@@ -298,9 +341,11 @@ func (client GalleriesClient) List(ctx context.Context) (result GalleryListPage,
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
@@ -411,9 +456,11 @@ func (client GalleriesClient) ListByResourceGroup(ctx context.Context, resourceG
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
@@ -519,7 +566,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", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.GalleriesClient", "Update", nil, "Failure sending request")
return
}
@@ -557,7 +604,33 @@ func (client GalleriesClient) UpdateSender(req *http.Request) (future GalleriesU
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.GalleriesUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ g.Response.Response, err = future.GetResult(sender)
+ if g.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleriesUpdateFuture", "Result", nil, "received nil response and error")
+ }
+ if 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
+ }
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/galleryapplications.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/galleryapplications.go
index 92f75e58c6b..b619984ec73 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/galleryapplications.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/galleryapplications.go
@@ -70,7 +70,7 @@ func (client GalleryApplicationsClient) CreateOrUpdate(ctx context.Context, reso
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.GalleryApplicationsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.GalleryApplicationsClient", "CreateOrUpdate", nil, "Failure sending request")
return
}
@@ -109,7 +109,33 @@ func (client GalleryApplicationsClient) CreateOrUpdateSender(req *http.Request)
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.GalleryApplicationsCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ ga.Response.Response, err = future.GetResult(sender)
+ if ga.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryApplicationsCreateOrUpdateFuture", "Result", nil, "received nil response and error")
+ }
+ if 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
+ }
return
}
@@ -150,7 +176,7 @@ func (client GalleryApplicationsClient) Delete(ctx context.Context, resourceGrou
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.GalleryApplicationsClient", "Delete", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.GalleryApplicationsClient", "Delete", nil, "Failure sending request")
return
}
@@ -187,7 +213,23 @@ func (client GalleryApplicationsClient) DeleteSender(req *http.Request) (future
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.GalleryApplicationsDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
return
}
@@ -235,6 +277,7 @@ func (client GalleryApplicationsClient) Get(ctx context.Context, resourceGroupNa
result, err = client.GetResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.GalleryApplicationsClient", "Get", resp, "Failure responding to request")
+ return
}
return
@@ -313,9 +356,11 @@ func (client GalleryApplicationsClient) ListByGallery(ctx context.Context, resou
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
@@ -425,7 +470,7 @@ func (client GalleryApplicationsClient) Update(ctx context.Context, resourceGrou
result, err = client.UpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.GalleryApplicationsClient", "Update", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.GalleryApplicationsClient", "Update", nil, "Failure sending request")
return
}
@@ -464,7 +509,33 @@ func (client GalleryApplicationsClient) UpdateSender(req *http.Request) (future
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.GalleryApplicationsUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ ga.Response.Response, err = future.GetResult(sender)
+ if ga.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryApplicationsUpdateFuture", "Result", nil, "received nil response and error")
+ }
+ if 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
+ }
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/galleryapplicationversions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/galleryapplicationversions.go
index 34c359c696f..69e21fa73d9 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/galleryapplicationversions.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/galleryapplicationversions.go
@@ -86,7 +86,7 @@ func (client GalleryApplicationVersionsClient) CreateOrUpdate(ctx context.Contex
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsClient", "CreateOrUpdate", nil, "Failure sending request")
return
}
@@ -126,7 +126,33 @@ func (client GalleryApplicationVersionsClient) CreateOrUpdateSender(req *http.Re
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.GalleryApplicationVersionsCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ gav.Response.Response, err = future.GetResult(sender)
+ if gav.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsCreateOrUpdateFuture", "Result", nil, "received nil response and error")
+ }
+ if 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
+ }
return
}
@@ -168,7 +194,7 @@ func (client GalleryApplicationVersionsClient) Delete(ctx context.Context, resou
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsClient", "Delete", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsClient", "Delete", nil, "Failure sending request")
return
}
@@ -206,7 +232,23 @@ func (client GalleryApplicationVersionsClient) DeleteSender(req *http.Request) (
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.GalleryApplicationVersionsDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
return
}
@@ -256,6 +298,7 @@ func (client GalleryApplicationVersionsClient) Get(ctx context.Context, resource
result, err = client.GetResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsClient", "Get", resp, "Failure responding to request")
+ return
}
return
@@ -339,9 +382,11 @@ func (client GalleryApplicationVersionsClient) ListByGalleryApplication(ctx cont
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
@@ -453,7 +498,7 @@ func (client GalleryApplicationVersionsClient) Update(ctx context.Context, resou
result, err = client.UpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsClient", "Update", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsClient", "Update", nil, "Failure sending request")
return
}
@@ -493,7 +538,33 @@ func (client GalleryApplicationVersionsClient) UpdateSender(req *http.Request) (
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.GalleryApplicationVersionsUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ gav.Response.Response, err = future.GetResult(sender)
+ if gav.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsUpdateFuture", "Result", nil, "received nil response and error")
+ }
+ if 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
+ }
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/galleryimages.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/galleryimages.go
index cee5e9bbee8..d78be85feed 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/galleryimages.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/galleryimages.go
@@ -81,7 +81,7 @@ func (client GalleryImagesClient) CreateOrUpdate(ctx context.Context, resourceGr
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.GalleryImagesClient", "CreateOrUpdate", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.GalleryImagesClient", "CreateOrUpdate", nil, "Failure sending request")
return
}
@@ -120,7 +120,33 @@ func (client GalleryImagesClient) CreateOrUpdateSender(req *http.Request) (futur
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.GalleryImagesCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ gi.Response.Response, err = future.GetResult(sender)
+ if gi.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryImagesCreateOrUpdateFuture", "Result", nil, "received nil response and error")
+ }
+ if 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
+ }
return
}
@@ -160,7 +186,7 @@ func (client GalleryImagesClient) Delete(ctx context.Context, resourceGroupName
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.GalleryImagesClient", "Delete", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.GalleryImagesClient", "Delete", nil, "Failure sending request")
return
}
@@ -197,7 +223,23 @@ func (client GalleryImagesClient) DeleteSender(req *http.Request) (future Galler
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.GalleryImagesDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
return
}
@@ -244,6 +286,7 @@ func (client GalleryImagesClient) Get(ctx context.Context, resourceGroupName str
result, err = client.GetResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.GalleryImagesClient", "Get", resp, "Failure responding to request")
+ return
}
return
@@ -321,9 +364,11 @@ func (client GalleryImagesClient) ListByGallery(ctx context.Context, resourceGro
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
@@ -432,7 +477,7 @@ func (client GalleryImagesClient) Update(ctx context.Context, resourceGroupName
result, err = client.UpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.GalleryImagesClient", "Update", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.GalleryImagesClient", "Update", nil, "Failure sending request")
return
}
@@ -471,7 +516,33 @@ func (client GalleryImagesClient) UpdateSender(req *http.Request) (future Galler
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.GalleryImagesUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ gi.Response.Response, err = future.GetResult(sender)
+ if gi.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryImagesUpdateFuture", "Result", nil, "received nil response and error")
+ }
+ if 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
+ }
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/galleryimageversions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/galleryimageversions.go
index 7d105a7475d..452642970e0 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/galleryimageversions.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/galleryimageversions.go
@@ -78,7 +78,7 @@ func (client GalleryImageVersionsClient) CreateOrUpdate(ctx context.Context, res
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsClient", "CreateOrUpdate", nil, "Failure sending request")
return
}
@@ -118,7 +118,33 @@ func (client GalleryImageVersionsClient) CreateOrUpdateSender(req *http.Request)
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.GalleryImageVersionsCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ giv.Response.Response, err = future.GetResult(sender)
+ if giv.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsCreateOrUpdateFuture", "Result", nil, "received nil response and error")
+ }
+ if 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
+ }
return
}
@@ -159,7 +185,7 @@ func (client GalleryImageVersionsClient) Delete(ctx context.Context, resourceGro
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsClient", "Delete", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsClient", "Delete", nil, "Failure sending request")
return
}
@@ -197,7 +223,23 @@ func (client GalleryImageVersionsClient) DeleteSender(req *http.Request) (future
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.GalleryImageVersionsDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
return
}
@@ -246,6 +288,7 @@ func (client GalleryImageVersionsClient) Get(ctx context.Context, resourceGroupN
result, err = client.GetResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsClient", "Get", resp, "Failure responding to request")
+ return
}
return
@@ -329,9 +372,11 @@ func (client GalleryImageVersionsClient) ListByGalleryImage(ctx context.Context,
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
@@ -442,7 +487,7 @@ func (client GalleryImageVersionsClient) Update(ctx context.Context, resourceGro
result, err = client.UpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsClient", "Update", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsClient", "Update", nil, "Failure sending request")
return
}
@@ -482,7 +527,33 @@ func (client GalleryImageVersionsClient) UpdateSender(req *http.Request) (future
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.GalleryImageVersionsUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ giv.Response.Response, err = future.GetResult(sender)
+ if giv.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsUpdateFuture", "Result", nil, "received nil response and error")
+ }
+ if 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
+ }
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/images.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/images.go
index 040c86ec2e7..6e92289b436 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/images.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/images.go
@@ -65,7 +65,7 @@ func (client ImagesClient) CreateOrUpdate(ctx context.Context, resourceGroupName
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.ImagesClient", "CreateOrUpdate", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.ImagesClient", "CreateOrUpdate", nil, "Failure sending request")
return
}
@@ -103,7 +103,33 @@ func (client ImagesClient) CreateOrUpdateSender(req *http.Request) (future Image
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.ImagesCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ i.Response.Response, err = future.GetResult(sender)
+ if i.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "compute.ImagesCreateOrUpdateFuture", "Result", nil, "received nil response and error")
+ }
+ if 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
+ }
return
}
@@ -142,7 +168,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", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.ImagesClient", "Delete", nil, "Failure sending request")
return
}
@@ -178,7 +204,23 @@ func (client ImagesClient) DeleteSender(req *http.Request) (future ImagesDeleteF
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.ImagesDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
return
}
@@ -225,6 +267,7 @@ func (client ImagesClient) Get(ctx context.Context, resourceGroupName string, im
result, err = client.GetResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.ImagesClient", "Get", resp, "Failure responding to request")
+ return
}
return
@@ -302,9 +345,11 @@ func (client ImagesClient) List(ctx context.Context) (result ImageListResultPage
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
@@ -415,9 +460,11 @@ func (client ImagesClient) ListByResourceGroup(ctx context.Context, resourceGrou
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
@@ -522,7 +569,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", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.ImagesClient", "Update", nil, "Failure sending request")
return
}
@@ -560,7 +607,33 @@ func (client ImagesClient) UpdateSender(req *http.Request) (future ImagesUpdateF
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.ImagesUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ i.Response.Response, err = future.GetResult(sender)
+ if i.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "compute.ImagesUpdateFuture", "Result", nil, "received nil response and error")
+ }
+ if 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
+ }
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/loganalytics.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/loganalytics.go
index 9bc1ca7f951..29ca9621fbf 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/loganalytics.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/loganalytics.go
@@ -72,7 +72,7 @@ func (client LogAnalyticsClient) ExportRequestRateByInterval(ctx context.Context
result, err = client.ExportRequestRateByIntervalSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.LogAnalyticsClient", "ExportRequestRateByInterval", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.LogAnalyticsClient", "ExportRequestRateByInterval", nil, "Failure sending request")
return
}
@@ -109,7 +109,33 @@ func (client LogAnalyticsClient) ExportRequestRateByIntervalSender(req *http.Req
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.LogAnalyticsExportRequestRateByIntervalFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ laor.Response.Response, err = future.GetResult(sender)
+ if laor.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "compute.LogAnalyticsExportRequestRateByIntervalFuture", "Result", nil, "received nil response and error")
+ }
+ if 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
+ }
return
}
@@ -155,7 +181,7 @@ func (client LogAnalyticsClient) ExportThrottledRequests(ctx context.Context, pa
result, err = client.ExportThrottledRequestsSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.LogAnalyticsClient", "ExportThrottledRequests", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.LogAnalyticsClient", "ExportThrottledRequests", nil, "Failure sending request")
return
}
@@ -192,7 +218,33 @@ func (client LogAnalyticsClient) ExportThrottledRequestsSender(req *http.Request
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.LogAnalyticsExportThrottledRequestsFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ laor.Response.Response, err = future.GetResult(sender)
+ if laor.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "compute.LogAnalyticsExportThrottledRequestsFuture", "Result", nil, "received nil response and error")
+ }
+ if 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
+ }
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/models.go
index 9e6a01b4414..a0cf1f2225a 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/models.go
@@ -38,15 +38,16 @@ type AccessURI struct {
AccessSAS *string `json:"accessSAS,omitempty"`
}
-// AdditionalCapabilities enables or disables a capability on the virtual machine or virtual machine scale set.
+// 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"`
}
// 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.
+// 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 PassNames `json:"passName,omitempty"`
@@ -102,8 +103,8 @@ type AutomaticOSUpgradeProperties struct {
AutomaticOSUpgradeSupported *bool `json:"automaticOSUpgradeSupported,omitempty"`
}
-// AutomaticRepairsPolicy specifies the configuration parameters for automatic repairs on the virtual machine
-// scale set.
+// 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"`
@@ -111,14 +112,16 @@ type AutomaticRepairsPolicy struct {
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 [Manage the availability of virtual
+// 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 [Manage the availability of
+// virtual
// machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json).
-//
For more information on Azure planned maintenance, see [Planned maintenance for virtual machines in
+//
For more information on Azure planned maintenance, see [Planned maintenance for virtual
+// machines in
// Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json)
-//
Currently, a VM can only be added to availability set at creation time. An existing VM cannot be
-// added to an availability set.
+//
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"`
@@ -384,8 +387,11 @@ func (page AvailabilitySetListResultPage) Values() []AvailabilitySet {
}
// Creates a new instance of the AvailabilitySetListResultPage type.
-func NewAvailabilitySetListResultPage(getNextPage func(context.Context, AvailabilitySetListResult) (AvailabilitySetListResult, error)) AvailabilitySetListResultPage {
- return AvailabilitySetListResultPage{fn: getNextPage}
+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.
@@ -420,8 +426,8 @@ func (asp AvailabilitySetProperties) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// AvailabilitySetUpdate specifies information about the availability set that the virtual machine should be
-// assigned to. Only tags may be updated.
+// 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
@@ -823,8 +829,11 @@ func (page ContainerServiceListResultPage) Values() []ContainerService {
}
// Creates a new instance of the ContainerServiceListResultPage type.
-func NewContainerServiceListResultPage(getNextPage func(context.Context, ContainerServiceListResult) (ContainerServiceListResult, error)) ContainerServiceListResultPage {
- return ContainerServiceListResultPage{fn: getNextPage}
+func NewContainerServiceListResultPage(cur ContainerServiceListResult, getNextPage func(context.Context, ContainerServiceListResult) (ContainerServiceListResult, error)) ContainerServiceListResultPage {
+ return ContainerServiceListResultPage{
+ fn: getNextPage,
+ cslr: cur,
+ }
}
// ContainerServiceMasterProfile profile for the container service master.
@@ -910,57 +919,23 @@ func (csp ContainerServiceProperties) MarshalJSON() ([]byte, error) {
// ContainerServicesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type ContainerServicesCreateOrUpdateFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *ContainerServicesCreateOrUpdateFuture) Result(client ContainerServicesClient) (cs ContainerService, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.ContainerServicesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("compute.ContainerServicesCreateOrUpdateFuture")
- 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.ContainerServicesCreateOrUpdateFuture", "Result", cs.Response.Response, "Failure responding to request")
- }
- }
- return
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(ContainerServicesClient) (ContainerService, error)
}
// ContainerServicesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
// operation.
type ContainerServicesDeleteFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *ContainerServicesDeleteFuture) Result(client ContainerServicesClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "compute.ContainerServicesDeleteFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("compute.ContainerServicesDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(ContainerServicesClient) (autorest.Response, error)
}
-// ContainerServiceServicePrincipalProfile information about a service principal identity for the cluster to
-// use for manipulating Azure APIs.
+// ContainerServiceServicePrincipalProfile information about a service principal identity for the cluster
+// to use for manipulating Azure APIs.
type ContainerServiceServicePrincipalProfile struct {
// ClientID - The ID for the service principal.
ClientID *string `json:"clientId,omitempty"`
@@ -1244,7 +1219,8 @@ func (dh *DedicatedHost) UnmarshalJSON(body []byte) error {
return nil
}
-// DedicatedHostAllocatableVM represents the dedicated host unutilized capacity in terms of a specific VM size.
+// 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"`
@@ -1258,9 +1234,9 @@ type DedicatedHostAvailableCapacity struct {
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.
+// 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"`
@@ -1526,8 +1502,11 @@ func (page DedicatedHostGroupListResultPage) Values() []DedicatedHostGroup {
}
// Creates a new instance of the DedicatedHostGroupListResultPage type.
-func NewDedicatedHostGroupListResultPage(getNextPage func(context.Context, DedicatedHostGroupListResult) (DedicatedHostGroupListResult, error)) DedicatedHostGroupListResultPage {
- return DedicatedHostGroupListResultPage{fn: getNextPage}
+func NewDedicatedHostGroupListResultPage(cur DedicatedHostGroupListResult, getNextPage func(context.Context, DedicatedHostGroupListResult) (DedicatedHostGroupListResult, error)) DedicatedHostGroupListResultPage {
+ return DedicatedHostGroupListResultPage{
+ fn: getNextPage,
+ dhglr: cur,
+ }
}
// DedicatedHostGroupProperties dedicated Host Group Properties.
@@ -1547,8 +1526,8 @@ func (dhgp DedicatedHostGroupProperties) MarshalJSON() ([]byte, error) {
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.
+// 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.
@@ -1788,8 +1767,11 @@ func (page DedicatedHostListResultPage) Values() []DedicatedHost {
}
// Creates a new instance of the DedicatedHostListResultPage type.
-func NewDedicatedHostListResultPage(getNextPage func(context.Context, DedicatedHostListResult) (DedicatedHostListResult, error)) DedicatedHostListResultPage {
- return DedicatedHostListResultPage{fn: getNextPage}
+func NewDedicatedHostListResultPage(cur DedicatedHostListResult, getNextPage func(context.Context, DedicatedHostListResult) (DedicatedHostListResult, error)) DedicatedHostListResultPage {
+ return DedicatedHostListResultPage{
+ fn: getNextPage,
+ dhlr: cur,
+ }
}
// DedicatedHostProperties properties of the dedicated host.
@@ -1830,82 +1812,28 @@ func (dhp DedicatedHostProperties) MarshalJSON() ([]byte, error) {
// DedicatedHostsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type DedicatedHostsCreateOrUpdateFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- 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
+ 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)
}
// DedicatedHostsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
// operation.
type DedicatedHostsDeleteFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- err = azure.NewAsyncOpIncompleteError("compute.DedicatedHostsDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
+ 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)
}
// DedicatedHostsUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
// operation.
type DedicatedHostsUpdateFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- 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
+ 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)
}
// DedicatedHostUpdate specifies information about the dedicated host. Only tags, autoReplaceOnFailure and
@@ -1961,7 +1889,8 @@ func (dhu *DedicatedHostUpdate) UnmarshalJSON(body []byte) error {
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"`
@@ -2396,13 +2325,16 @@ func (page DiskEncryptionSetListPage) Values() []DiskEncryptionSet {
}
// Creates a new instance of the DiskEncryptionSetListPage type.
-func NewDiskEncryptionSetListPage(getNextPage func(context.Context, DiskEncryptionSetList) (DiskEncryptionSetList, error)) DiskEncryptionSetListPage {
- return DiskEncryptionSetListPage{fn: getNextPage}
+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.
+// 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"`
@@ -2411,82 +2343,28 @@ type DiskEncryptionSetParameters struct {
// DiskEncryptionSetsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type DiskEncryptionSetsCreateOrUpdateFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- 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
+ 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)
}
-// DiskEncryptionSetsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
+// DiskEncryptionSetsDeleteFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
type DiskEncryptionSetsDeleteFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- err = azure.NewAsyncOpIncompleteError("compute.DiskEncryptionSetsDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
+ 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)
}
-// DiskEncryptionSetsUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
+// DiskEncryptionSetsUpdateFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
type DiskEncryptionSetsUpdateFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- 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
+ 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)
}
// DiskEncryptionSettings describes a Encryption Settings for a Disk
@@ -2724,8 +2602,11 @@ func (page DiskListPage) Values() []Disk {
}
// Creates a new instance of the DiskListPage type.
-func NewDiskListPage(getNextPage func(context.Context, DiskList) (DiskList, error)) DiskListPage {
- return DiskListPage{fn: getNextPage}
+func NewDiskListPage(cur DiskList, getNextPage func(context.Context, DiskList) (DiskList, error)) DiskListPage {
+ return DiskListPage{
+ fn: getNextPage,
+ dl: cur,
+ }
}
// DiskProperties disk resource properties.
@@ -2808,80 +2689,27 @@ func (dp DiskProperties) MarshalJSON() ([]byte, error) {
// DisksCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
// operation.
type DisksCreateOrUpdateFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- 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
+ 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)
}
// DisksDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type DisksDeleteFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- err = azure.NewAsyncOpIncompleteError("compute.DisksDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
+ 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)
}
-// DisksGrantAccessFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+// DisksGrantAccessFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
type DisksGrantAccessFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- 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
+ 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)
}
// DiskSku the disks sku name. Can be Standard_LRS, Premium_LRS, StandardSSD_LRS, or UltraSSD_LRS.
@@ -2904,52 +2732,18 @@ func (ds DiskSku) MarshalJSON() ([]byte, error) {
// DisksRevokeAccessFuture an abstraction for monitoring and retrieving the results of a long-running
// operation.
type DisksRevokeAccessFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- err = azure.NewAsyncOpIncompleteError("compute.DisksRevokeAccessFuture")
- return
- }
- ar.Response = future.Response()
- return
+ 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)
}
// DisksUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type DisksUpdateFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- 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
+ 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)
}
// DiskUpdate disk update resource.
@@ -3055,8 +2849,8 @@ type EncryptionImages struct {
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.
+// 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. Possible values include: 'SystemAssigned'
Type DiskEncryptionSetIdentityType `json:"type,omitempty"`
@@ -3115,80 +2909,28 @@ type EncryptionSettingsElement struct {
// GalleriesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
// operation.
type GalleriesCreateOrUpdateFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- 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
+ 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)
}
-// GalleriesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+// GalleriesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
type GalleriesDeleteFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- err = azure.NewAsyncOpIncompleteError("compute.GalleriesDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
+ 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)
}
-// GalleriesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+// GalleriesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
type GalleriesUpdateFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- 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
+ 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)
}
// Gallery specifies information about the Shared Image Gallery that you want to create or update.
@@ -3291,8 +3033,8 @@ func (g *Gallery) UnmarshalJSON(body []byte) error {
return nil
}
-// GalleryApplication specifies information about the gallery Application Definition that you want to create or
-// update.
+// 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"`
@@ -3544,8 +3286,11 @@ func (page GalleryApplicationListPage) Values() []GalleryApplication {
}
// Creates a new instance of the GalleryApplicationListPage type.
-func NewGalleryApplicationListPage(getNextPage func(context.Context, GalleryApplicationList) (GalleryApplicationList, error)) GalleryApplicationListPage {
- return GalleryApplicationListPage{fn: getNextPage}
+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.
@@ -3567,82 +3312,28 @@ type GalleryApplicationProperties struct {
// GalleryApplicationsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type GalleryApplicationsCreateOrUpdateFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- 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
+ 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)
}
-// GalleryApplicationsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
+// GalleryApplicationsDeleteFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
type GalleryApplicationsDeleteFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- err = azure.NewAsyncOpIncompleteError("compute.GalleryApplicationsDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
+ 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)
}
-// GalleryApplicationsUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
+// GalleryApplicationsUpdateFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
type GalleryApplicationsUpdateFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- 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
+ 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)
}
// GalleryApplicationUpdate specifies information about the gallery Application Definition that you want to
@@ -3985,8 +3676,11 @@ func (page GalleryApplicationVersionListPage) Values() []GalleryApplicationVersi
}
// Creates a new instance of the GalleryApplicationVersionListPage type.
-func NewGalleryApplicationVersionListPage(getNextPage func(context.Context, GalleryApplicationVersionList) (GalleryApplicationVersionList, error)) GalleryApplicationVersionListPage {
- return GalleryApplicationVersionListPage{fn: getNextPage}
+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.
@@ -4058,89 +3752,35 @@ func (gavpp GalleryApplicationVersionPublishingProfile) MarshalJSON() ([]byte, e
return json.Marshal(objectMap)
}
-// GalleryApplicationVersionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
-// long-running operation.
+// GalleryApplicationVersionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results
+// of a long-running operation.
type GalleryApplicationVersionsCreateOrUpdateFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- 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
+ 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)
}
// GalleryApplicationVersionsDeleteFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type GalleryApplicationVersionsDeleteFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- err = azure.NewAsyncOpIncompleteError("compute.GalleryApplicationVersionsDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
+ 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)
}
// GalleryApplicationVersionsUpdateFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type GalleryApplicationVersionsUpdateFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- 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
+ 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)
}
-// GalleryApplicationVersionUpdate specifies information about the gallery Application Version that you want to
-// update.
+// 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
@@ -4588,8 +4228,11 @@ func (page GalleryImageListPage) Values() []GalleryImage {
}
// Creates a new instance of the GalleryImageListPage type.
-func NewGalleryImageListPage(getNextPage func(context.Context, GalleryImageList) (GalleryImageList, error)) GalleryImageListPage {
- return GalleryImageListPage{fn: getNextPage}
+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.
@@ -4660,85 +4303,31 @@ func (gip GalleryImageProperties) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// GalleryImagesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
+// GalleryImagesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
type GalleryImagesCreateOrUpdateFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- 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
+ 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)
}
// GalleryImagesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
// operation.
type GalleryImagesDeleteFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- err = azure.NewAsyncOpIncompleteError("compute.GalleryImagesDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
+ 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)
}
// GalleryImagesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
// operation.
type GalleryImagesUpdateFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- 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
+ 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)
}
// GalleryImageUpdate specifies information about the gallery Image Definition that you want to update.
@@ -4826,7 +4415,8 @@ func (giu *GalleryImageUpdate) UnmarshalJSON(body []byte) error {
return nil
}
-// GalleryImageVersion specifies information about the gallery Image Version that you want to create or update.
+// 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"`
@@ -5078,8 +4668,11 @@ func (page GalleryImageVersionListPage) Values() []GalleryImageVersion {
}
// Creates a new instance of the GalleryImageVersionListPage type.
-func NewGalleryImageVersionListPage(getNextPage func(context.Context, GalleryImageVersionList) (GalleryImageVersionList, error)) GalleryImageVersionListPage {
- return GalleryImageVersionListPage{fn: getNextPage}
+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.
@@ -5144,53 +4737,19 @@ func (givpp GalleryImageVersionPublishingProfile) MarshalJSON() ([]byte, error)
// GalleryImageVersionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type GalleryImageVersionsCreateOrUpdateFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- 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
+ 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)
}
-// GalleryImageVersionsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
+// GalleryImageVersionsDeleteFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
type GalleryImageVersionsDeleteFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- err = azure.NewAsyncOpIncompleteError("compute.GalleryImageVersionsDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
+ 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)
}
// GalleryImageVersionStorageProfile this is the storage profile of a Gallery Image Version.
@@ -5201,33 +4760,13 @@ type GalleryImageVersionStorageProfile struct {
DataDiskImages *[]GalleryDataDiskImage `json:"dataDiskImages,omitempty"`
}
-// GalleryImageVersionsUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
+// GalleryImageVersionsUpdateFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
type GalleryImageVersionsUpdateFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- 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
+ 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)
}
// GalleryImageVersionUpdate specifies information about the gallery Image Version that you want to update.
@@ -5467,8 +5006,11 @@ func (page GalleryListPage) Values() []Gallery {
}
// Creates a new instance of the GalleryListPage type.
-func NewGalleryListPage(getNextPage func(context.Context, GalleryList) (GalleryList, error)) GalleryListPage {
- return GalleryListPage{fn: getNextPage}
+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.
@@ -5612,8 +5154,9 @@ type HardwareProfile struct {
VMSize VirtualMachineSizeTypes `json:"vmSize,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 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"`
@@ -5911,8 +5454,11 @@ func (page ImageListResultPage) Values() []Image {
}
// Creates a new instance of the ImageListResultPage type.
-func NewImageListResultPage(getNextPage func(context.Context, ImageListResult) (ImageListResult, error)) ImageListResultPage {
- return ImageListResultPage{fn: getNextPage}
+func NewImageListResultPage(cur ImageListResult, getNextPage func(context.Context, ImageListResult) (ImageListResult, error)) ImageListResultPage {
+ return ImageListResultPage{
+ fn: getNextPage,
+ ilr: cur,
+ }
}
// ImageOSDisk describes an Operating System disk.
@@ -5964,7 +5510,8 @@ func (IP ImageProperties) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// ImagePurchasePlan describes the gallery Image Definition purchase plan. This is used by marketplace images.
+// 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"`
@@ -5976,8 +5523,8 @@ type ImagePurchasePlan 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.
-// NOTE: Image reference publisher and offer can only be set when you create the scale set.
+// 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"`
@@ -6017,52 +5564,18 @@ func (ir ImageReference) MarshalJSON() ([]byte, error) {
// ImagesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
// operation.
type ImagesCreateOrUpdateFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- 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
+ 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)
}
// ImagesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ImagesDeleteFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- err = azure.NewAsyncOpIncompleteError("compute.ImagesDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
+ 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)
}
// ImageStorageProfile describes a storage profile.
@@ -6077,30 +5590,10 @@ type ImageStorageProfile struct {
// ImagesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ImagesUpdateFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- 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
+ 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)
}
// ImageUpdate the source user image virtual hard disk. Only tags may be updated.
@@ -6177,8 +5670,8 @@ type InstanceViewStatus struct {
Time *date.Time `json:"time,omitempty"`
}
-// KeyVaultAndKeyReference key Vault Key Url and vault id of KeK, KeK is optional and when provided is used to
-// unwrap the encryptionKey
+// 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"`
@@ -6210,8 +5703,8 @@ type KeyVaultSecretReference struct {
SourceVault *SubResource `json:"sourceVault,omitempty"`
}
-// LinuxConfiguration specifies the Linux operating system settings on the virtual machine.
For a list
-// of supported Linux distributions, see [Linux on Azure-Endorsed
+// 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/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
//
For running non-endorsed distributions, see [Information for Non-Endorsed
// Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json).
@@ -6376,8 +5869,11 @@ func (page ListUsagesResultPage) Values() []Usage {
}
// Creates a new instance of the ListUsagesResultPage type.
-func NewListUsagesResultPage(getNextPage func(context.Context, ListUsagesResult) (ListUsagesResult, error)) ListUsagesResultPage {
- return ListUsagesResultPage{fn: getNextPage}
+func NewListUsagesResultPage(cur ListUsagesResult, getNextPage func(context.Context, ListUsagesResult) (ListUsagesResult, error)) ListUsagesResultPage {
+ return ListUsagesResultPage{
+ fn: getNextPage,
+ lur: cur,
+ }
}
// ListVirtualMachineExtensionImage ...
@@ -6392,62 +5888,22 @@ type ListVirtualMachineImageResource struct {
Value *[]VirtualMachineImageResource `json:"value,omitempty"`
}
-// LogAnalyticsExportRequestRateByIntervalFuture an abstraction for monitoring and retrieving the results of a
-// long-running operation.
+// LogAnalyticsExportRequestRateByIntervalFuture an abstraction for monitoring and retrieving the results
+// of a long-running operation.
type LogAnalyticsExportRequestRateByIntervalFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- 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
+ 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)
}
// LogAnalyticsExportThrottledRequestsFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type LogAnalyticsExportThrottledRequestsFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- 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
+ 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)
}
// LogAnalyticsInputBase api input base class for LogAnalytics Api.
@@ -6672,8 +6128,8 @@ type OrchestrationServiceSummary struct {
ServiceState OrchestrationServiceState `json:"serviceState,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
+// 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/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'
@@ -6712,8 +6168,8 @@ type OSDiskImageEncryption struct {
DiskEncryptionSetID *string `json:"diskEncryptionSetId,omitempty"`
}
-// OSProfile specifies the operating system settings for the virtual machine. Some of the settings cannot be
-// changed once VM is provisioned.
+// 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/virtual-machines/virtual-machines-linux-infrastructure-subscription-accounts-guidelines?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#1-naming-conventions).
ComputerName *string `json:"computerName,omitempty"`
@@ -6735,11 +6191,11 @@ type OSProfile struct {
RequireGuestProvisionSignal *bool `json:"requireGuestProvisionSignal,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 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"`
@@ -6861,8 +6317,8 @@ type ProximityPlacementGroupListResult struct {
NextLink *string `json:"nextLink,omitempty"`
}
-// ProximityPlacementGroupListResultIterator provides access to a complete listing of ProximityPlacementGroup
-// values.
+// ProximityPlacementGroupListResultIterator provides access to a complete listing of
+// ProximityPlacementGroup values.
type ProximityPlacementGroupListResultIterator struct {
i int
page ProximityPlacementGroupListResultPage
@@ -7005,8 +6461,11 @@ func (page ProximityPlacementGroupListResultPage) Values() []ProximityPlacementG
}
// Creates a new instance of the ProximityPlacementGroupListResultPage type.
-func NewProximityPlacementGroupListResultPage(getNextPage func(context.Context, ProximityPlacementGroupListResult) (ProximityPlacementGroupListResult, error)) ProximityPlacementGroupListResultPage {
- return ProximityPlacementGroupListResultPage{fn: getNextPage}
+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.
@@ -7060,8 +6519,8 @@ type PurchasePlan struct {
Product *string `json:"product,omitempty"`
}
-// RecommendedMachineConfiguration the properties describe the recommended machine configuration for this Image
-// Definition. These properties are updatable.
+// 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"`
@@ -7390,8 +6849,11 @@ func (page ResourceSkusResultPage) Values() []ResourceSku {
}
// Creates a new instance of the ResourceSkusResultPage type.
-func NewResourceSkusResultPage(getNextPage func(context.Context, ResourceSkusResult) (ResourceSkusResult, error)) ResourceSkusResultPage {
- return ResourceSkusResultPage{fn: getNextPage}
+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.
@@ -7424,7 +6886,8 @@ type RollingUpgradePolicy struct {
PauseTimeBetweenBatches *string `json:"pauseTimeBetweenBatches,omitempty"`
}
-// RollingUpgradeProgressInfo information about the number of virtual machine instances in each upgrade state.
+// 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"`
@@ -7763,8 +7226,11 @@ func (page RunCommandListResultPage) Values() []RunCommandDocumentBase {
}
// Creates a new instance of the RunCommandListResultPage type.
-func NewRunCommandListResultPage(getNextPage func(context.Context, RunCommandListResult) (RunCommandListResult, error)) RunCommandListResultPage {
- return RunCommandListResultPage{fn: getNextPage}
+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.
@@ -7804,8 +7270,9 @@ type ShareInfoElement struct {
VMURI *string `json:"vmUri,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.
+// 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"`
@@ -8091,8 +7558,11 @@ func (page SnapshotListPage) Values() []Snapshot {
}
// Creates a new instance of the SnapshotListPage type.
-func NewSnapshotListPage(getNextPage func(context.Context, SnapshotList) (SnapshotList, error)) SnapshotListPage {
- return SnapshotListPage{fn: getNextPage}
+func NewSnapshotListPage(cur SnapshotList, getNextPage func(context.Context, SnapshotList) (SnapshotList, error)) SnapshotListPage {
+ return SnapshotListPage{
+ fn: getNextPage,
+ sl: cur,
+ }
}
// SnapshotProperties snapshot resource properties.
@@ -8151,81 +7621,28 @@ func (sp SnapshotProperties) MarshalJSON() ([]byte, error) {
// SnapshotsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
// operation.
type SnapshotsCreateOrUpdateFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- 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
+ 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)
}
-// SnapshotsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+// SnapshotsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
type SnapshotsDeleteFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- err = azure.NewAsyncOpIncompleteError("compute.SnapshotsDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
+ 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)
}
// SnapshotsGrantAccessFuture an abstraction for monitoring and retrieving the results of a long-running
// operation.
type SnapshotsGrantAccessFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- 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
+ 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)
}
// SnapshotSku the snapshots sku name. Can be Standard_LRS, Premium_LRS, or Standard_ZRS.
@@ -8248,52 +7665,19 @@ func (ss SnapshotSku) MarshalJSON() ([]byte, error) {
// SnapshotsRevokeAccessFuture an abstraction for monitoring and retrieving the results of a long-running
// operation.
type SnapshotsRevokeAccessFuture struct {
- azure.Future
+ 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)
}
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- 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.
+// SnapshotsUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
type SnapshotsUpdateFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- 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
+ 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)
}
// SnapshotUpdate snapshot update resource.
@@ -8386,8 +7770,8 @@ type SSHConfiguration struct {
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.
+// 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"`
@@ -8522,7 +7906,8 @@ type SSHPublicKeysGroupListResult struct {
NextLink *string `json:"nextLink,omitempty"`
}
-// SSHPublicKeysGroupListResultIterator provides access to a complete listing of SSHPublicKeyResource values.
+// SSHPublicKeysGroupListResultIterator provides access to a complete listing of SSHPublicKeyResource
+// values.
type SSHPublicKeysGroupListResultIterator struct {
i int
page SSHPublicKeysGroupListResultPage
@@ -8665,8 +8050,11 @@ func (page SSHPublicKeysGroupListResultPage) Values() []SSHPublicKeyResource {
}
// Creates a new instance of the SSHPublicKeysGroupListResultPage type.
-func NewSSHPublicKeysGroupListResultPage(getNextPage func(context.Context, SSHPublicKeysGroupListResult) (SSHPublicKeysGroupListResult, error)) SSHPublicKeysGroupListResultPage {
- return SSHPublicKeysGroupListResultPage{fn: getNextPage}
+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.
@@ -8833,7 +8221,8 @@ type UpgradeOperationHistoricalStatusInfo struct {
Location *string `json:"location,omitempty"`
}
-// UpgradeOperationHistoricalStatusInfoProperties describes each OS upgrade on the Virtual Machine Scale Set.
+// 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"`
@@ -8897,8 +8286,8 @@ type UserArtifactSource struct {
MediaLink *string `json:"mediaLink,omitempty"`
}
-// VaultCertificate describes a single certificate reference in a Key Vault, and where the certificate should
-// reside on the VM.
+// 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":"" }
CertificateURL *string `json:"certificateUrl,omitempty"`
@@ -9407,56 +8796,22 @@ func (vmep VirtualMachineExtensionProperties) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// VirtualMachineExtensionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
-// long-running operation.
+// VirtualMachineExtensionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of
+// a long-running operation.
type VirtualMachineExtensionsCreateOrUpdateFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- 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
+ 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)
}
// VirtualMachineExtensionsDeleteFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type VirtualMachineExtensionsDeleteFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineExtensionsDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
+ 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)
}
// VirtualMachineExtensionsListResult the List Extension operation response
@@ -9469,30 +8824,10 @@ type VirtualMachineExtensionsListResult struct {
// VirtualMachineExtensionsUpdateFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type VirtualMachineExtensionsUpdateFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- 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
+ 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)
}
// VirtualMachineExtensionUpdate describes a Virtual Machine Extension.
@@ -9921,8 +9256,11 @@ func (page VirtualMachineListResultPage) Values() []VirtualMachine {
}
// Creates a new instance of the VirtualMachineListResultPage type.
-func NewVirtualMachineListResultPage(getNextPage func(context.Context, VirtualMachineListResult) (VirtualMachineListResult, error)) VirtualMachineListResultPage {
- return VirtualMachineListResultPage{fn: getNextPage}
+func NewVirtualMachineListResultPage(cur VirtualMachineListResult, getNextPage func(context.Context, VirtualMachineListResult) (VirtualMachineListResult, error)) VirtualMachineListResultPage {
+ return VirtualMachineListResultPage{
+ fn: getNextPage,
+ vmlr: cur,
+ }
}
// VirtualMachineProperties describes the properties of a Virtual Machine.
@@ -10011,8 +9349,8 @@ func (vmp VirtualMachineProperties) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// VirtualMachineReimageParameters parameters for Reimaging Virtual Machine. NOTE: Virtual Machine OS disk will
-// always be reimaged
+// 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"`
@@ -10424,8 +9762,11 @@ func (page VirtualMachineScaleSetExtensionListResultPage) Values() []VirtualMach
}
// Creates a new instance of the VirtualMachineScaleSetExtensionListResultPage type.
-func NewVirtualMachineScaleSetExtensionListResultPage(getNextPage func(context.Context, VirtualMachineScaleSetExtensionListResult) (VirtualMachineScaleSetExtensionListResult, error)) VirtualMachineScaleSetExtensionListResultPage {
- return VirtualMachineScaleSetExtensionListResultPage{fn: getNextPage}
+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.
@@ -10434,7 +9775,8 @@ type VirtualMachineScaleSetExtensionProfile struct {
Extensions *[]VirtualMachineScaleSetExtension `json:"extensions,omitempty"`
}
-// VirtualMachineScaleSetExtensionProperties describes the properties of a Virtual Machine Scale Set Extension.
+// 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"`
@@ -10489,82 +9831,28 @@ func (vmssep VirtualMachineScaleSetExtensionProperties) MarshalJSON() ([]byte, e
// VirtualMachineScaleSetExtensionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
// results of a long-running operation.
type VirtualMachineScaleSetExtensionsCreateOrUpdateFuture struct {
- azure.Future
+ 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)
}
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- 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.
+// VirtualMachineScaleSetExtensionsDeleteFuture an abstraction for monitoring and retrieving the results of
+// a long-running operation.
type VirtualMachineScaleSetExtensionsDeleteFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetExtensionsDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
+ 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)
}
-// VirtualMachineScaleSetExtensionsUpdateFuture an abstraction for monitoring and retrieving the results of a
-// long-running operation.
+// VirtualMachineScaleSetExtensionsUpdateFuture an abstraction for monitoring and retrieving the results of
+// a long-running operation.
type VirtualMachineScaleSetExtensionsUpdateFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- 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
+ 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)
}
// VirtualMachineScaleSetExtensionUpdate describes a Virtual Machine Scale Set Extension.
@@ -10692,8 +9980,8 @@ func (vmssiv VirtualMachineScaleSetInstanceView) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// VirtualMachineScaleSetInstanceViewStatusesSummary instance view statuses summary for virtual machines of a
-// virtual machine scale set.
+// 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"`
@@ -10766,8 +10054,8 @@ func (vmssic *VirtualMachineScaleSetIPConfiguration) UnmarshalJSON(body []byte)
return nil
}
-// VirtualMachineScaleSetIPConfigurationProperties describes a virtual machine scale set network profile's IP
-// configuration properties.
+// 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"`
@@ -10795,8 +10083,8 @@ type VirtualMachineScaleSetIPTag struct {
Tag *string `json:"tag,omitempty"`
}
-// VirtualMachineScaleSetListOSUpgradeHistory list of Virtual Machine Scale Set OS Upgrade History operation
-// response.
+// 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.
@@ -10950,8 +10238,11 @@ func (page VirtualMachineScaleSetListOSUpgradeHistoryPage) Values() []UpgradeOpe
}
// Creates a new instance of the VirtualMachineScaleSetListOSUpgradeHistoryPage type.
-func NewVirtualMachineScaleSetListOSUpgradeHistoryPage(getNextPage func(context.Context, VirtualMachineScaleSetListOSUpgradeHistory) (VirtualMachineScaleSetListOSUpgradeHistory, error)) VirtualMachineScaleSetListOSUpgradeHistoryPage {
- return VirtualMachineScaleSetListOSUpgradeHistoryPage{fn: getNextPage}
+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.
@@ -11107,8 +10398,11 @@ func (page VirtualMachineScaleSetListResultPage) Values() []VirtualMachineScaleS
}
// Creates a new instance of the VirtualMachineScaleSetListResultPage type.
-func NewVirtualMachineScaleSetListResultPage(getNextPage func(context.Context, VirtualMachineScaleSetListResult) (VirtualMachineScaleSetListResult, error)) VirtualMachineScaleSetListResultPage {
- return VirtualMachineScaleSetListResultPage{fn: getNextPage}
+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.
@@ -11264,8 +10558,11 @@ func (page VirtualMachineScaleSetListSkusResultPage) Values() []VirtualMachineSc
}
// Creates a new instance of the VirtualMachineScaleSetListSkusResultPage type.
-func NewVirtualMachineScaleSetListSkusResultPage(getNextPage func(context.Context, VirtualMachineScaleSetListSkusResult) (VirtualMachineScaleSetListSkusResult, error)) VirtualMachineScaleSetListSkusResultPage {
- return VirtualMachineScaleSetListSkusResultPage{fn: getNextPage}
+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.
@@ -11421,8 +10718,11 @@ func (page VirtualMachineScaleSetListWithLinkResultPage) Values() []VirtualMachi
}
// Creates a new instance of the VirtualMachineScaleSetListWithLinkResultPage type.
-func NewVirtualMachineScaleSetListWithLinkResultPage(getNextPage func(context.Context, VirtualMachineScaleSetListWithLinkResult) (VirtualMachineScaleSetListWithLinkResult, error)) VirtualMachineScaleSetListWithLinkResultPage {
- return VirtualMachineScaleSetListWithLinkResultPage{fn: getNextPage}
+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.
@@ -11433,8 +10733,8 @@ type VirtualMachineScaleSetManagedDiskParameters struct {
DiskEncryptionSet *DiskEncryptionSetParameters `json:"diskEncryptionSet,omitempty"`
}
-// VirtualMachineScaleSetNetworkConfiguration describes a virtual machine scale set network profile's network
-// configurations.
+// 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"`
@@ -11507,8 +10807,8 @@ type VirtualMachineScaleSetNetworkConfigurationDNSSettings struct {
DNSServers *[]string `json:"dnsServers,omitempty"`
}
-// VirtualMachineScaleSetNetworkConfigurationProperties describes a virtual machine scale set network profile's
-// IP configuration.
+// 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"`
@@ -11643,8 +10943,8 @@ func (vmssp VirtualMachineScaleSetProperties) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// VirtualMachineScaleSetPublicIPAddressConfiguration describes a virtual machines scale set IP Configuration's
-// PublicIPAddress configuration
+// 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"`
@@ -11726,171 +11026,67 @@ type VirtualMachineScaleSetReimageParameters struct {
TempDisk *bool `json:"tempDisk,omitempty"`
}
-// VirtualMachineScaleSetRollingUpgradesCancelFuture an abstraction for monitoring and retrieving the results
-// of a long-running operation.
+// VirtualMachineScaleSetRollingUpgradesCancelFuture an abstraction for monitoring and retrieving the
+// results of a long-running operation.
type VirtualMachineScaleSetRollingUpgradesCancelFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetRollingUpgradesCancelFuture")
- return
- }
- ar.Response = future.Response()
- return
+ 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)
}
// VirtualMachineScaleSetRollingUpgradesStartExtensionUpgradeFuture an abstraction for monitoring and
// retrieving the results of a long-running operation.
type VirtualMachineScaleSetRollingUpgradesStartExtensionUpgradeFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetRollingUpgradesStartExtensionUpgradeFuture")
- return
- }
- ar.Response = future.Response()
- return
+ 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)
}
-// VirtualMachineScaleSetRollingUpgradesStartOSUpgradeFuture an abstraction for monitoring and retrieving the
-// results of a long-running operation.
+// VirtualMachineScaleSetRollingUpgradesStartOSUpgradeFuture an abstraction for monitoring and retrieving
+// the results of a long-running operation.
type VirtualMachineScaleSetRollingUpgradesStartOSUpgradeFuture struct {
- azure.Future
+ 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)
}
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- 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.
+// VirtualMachineScaleSetsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of
+// a long-running operation.
type VirtualMachineScaleSetsCreateOrUpdateFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- 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
+ 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)
}
// VirtualMachineScaleSetsDeallocateFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type VirtualMachineScaleSetsDeallocateFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsDeallocateFuture")
- return
- }
- ar.Response = future.Response()
- return
+ 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)
}
// VirtualMachineScaleSetsDeleteFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type VirtualMachineScaleSetsDeleteFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
+ 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)
}
-// VirtualMachineScaleSetsDeleteInstancesFuture an abstraction for monitoring and retrieving the results of a
-// long-running operation.
+// VirtualMachineScaleSetsDeleteInstancesFuture an abstraction for monitoring and retrieving the results of
+// a long-running operation.
type VirtualMachineScaleSetsDeleteInstancesFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsDeleteInstancesFuture")
- return
- }
- ar.Response = future.Response()
- return
+ 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)
}
// VirtualMachineScaleSetSku describes an available virtual machine scale set sku.
@@ -11915,188 +11111,76 @@ type VirtualMachineScaleSetSkuCapacity struct {
ScaleType VirtualMachineScaleSetSkuScaleType `json:"scaleType,omitempty"`
}
-// VirtualMachineScaleSetsPerformMaintenanceFuture an abstraction for monitoring and retrieving the results of
-// a long-running operation.
+// VirtualMachineScaleSetsPerformMaintenanceFuture an abstraction for monitoring and retrieving the results
+// of a long-running operation.
type VirtualMachineScaleSetsPerformMaintenanceFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsPerformMaintenanceFuture")
- return
- }
- ar.Response = future.Response()
- return
+ 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)
}
// VirtualMachineScaleSetsPowerOffFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type VirtualMachineScaleSetsPowerOffFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsPowerOffFuture")
- return
- }
- ar.Response = future.Response()
- return
+ 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)
}
// VirtualMachineScaleSetsRedeployFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type VirtualMachineScaleSetsRedeployFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsRedeployFuture")
- return
- }
- ar.Response = future.Response()
- return
+ 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)
}
// VirtualMachineScaleSetsReimageAllFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type VirtualMachineScaleSetsReimageAllFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsReimageAllFuture")
- return
- }
- ar.Response = future.Response()
- return
+ 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)
}
// VirtualMachineScaleSetsReimageFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type VirtualMachineScaleSetsReimageFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsReimageFuture")
- return
- }
- ar.Response = future.Response()
- return
+ 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)
}
// VirtualMachineScaleSetsRestartFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type VirtualMachineScaleSetsRestartFuture struct {
- azure.Future
+ 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)
}
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- 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.
+// VirtualMachineScaleSetsSetOrchestrationServiceStateFuture an abstraction for monitoring and retrieving
+// the results of a long-running operation.
type VirtualMachineScaleSetsSetOrchestrationServiceStateFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsSetOrchestrationServiceStateFuture")
- return
- }
- ar.Response = future.Response()
- return
+ 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)
}
// VirtualMachineScaleSetsStartFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type VirtualMachineScaleSetsStartFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsStartFuture")
- return
- }
- ar.Response = future.Response()
- return
+ 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)
}
// VirtualMachineScaleSetStorageProfile describes a virtual machine scale set storage profile.
@@ -12112,53 +11196,19 @@ type VirtualMachineScaleSetStorageProfile struct {
// VirtualMachineScaleSetsUpdateFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type VirtualMachineScaleSetsUpdateFuture struct {
- azure.Future
+ 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)
}
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- 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.
+// VirtualMachineScaleSetsUpdateInstancesFuture an abstraction for monitoring and retrieving the results of
+// a long-running operation.
type VirtualMachineScaleSetsUpdateInstancesFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsUpdateInstancesFuture")
- return
- }
- ar.Response = future.Response()
- return
+ 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)
}
// VirtualMachineScaleSetUpdate describes a Virtual Machine Scale Set.
@@ -12256,8 +11306,8 @@ func (vmssu *VirtualMachineScaleSetUpdate) UnmarshalJSON(body []byte) error {
}
// 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
+// 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"`
@@ -12411,8 +11461,9 @@ func (vmssunc *VirtualMachineScaleSetUpdateNetworkConfiguration) UnmarshalJSON(b
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.
+// 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"`
@@ -12436,8 +11487,8 @@ type VirtualMachineScaleSetUpdateNetworkProfile struct {
NetworkInterfaceConfigurations *[]VirtualMachineScaleSetUpdateNetworkConfiguration `json:"networkInterfaceConfigurations,omitempty"`
}
-// VirtualMachineScaleSetUpdateOSDisk describes virtual machine scale set operating system disk Update Object.
-// This should be used for Updating VMSS OS Disk.
+// 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"`
@@ -12540,8 +11591,8 @@ func (vmssupiac *VirtualMachineScaleSetUpdatePublicIPAddressConfiguration) Unmar
return nil
}
-// VirtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties describes a virtual machines scale set IP
-// Configuration's PublicIPAddress configuration
+// 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"`
@@ -12740,57 +11791,23 @@ func (vmssv *VirtualMachineScaleSetVM) UnmarshalJSON(body []byte) error {
// VirtualMachineScaleSetVMExtensionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
// results of a long-running operation.
type VirtualMachineScaleSetVMExtensionsCreateOrUpdateFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *VirtualMachineScaleSetVMExtensionsCreateOrUpdateFuture) Result(client VirtualMachineScaleSetVMExtensionsClient) (vme VirtualMachineExtension, 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 {
- err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMExtensionsCreateOrUpdateFuture")
- 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.VirtualMachineScaleSetVMExtensionsCreateOrUpdateFuture", "Result", vme.Response.Response, "Failure responding to request")
- }
- }
- return
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(VirtualMachineScaleSetVMExtensionsClient) (VirtualMachineExtension, error)
}
-// VirtualMachineScaleSetVMExtensionsDeleteFuture an abstraction for monitoring and retrieving the results of a
-// long-running operation.
+// VirtualMachineScaleSetVMExtensionsDeleteFuture an abstraction for monitoring and retrieving the results
+// of a long-running operation.
type VirtualMachineScaleSetVMExtensionsDeleteFuture struct {
- azure.Future
+ 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)
}
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMExtensionsDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
-}
-
-// VirtualMachineScaleSetVMExtensionsSummary extensions summary for virtual machines of a virtual machine scale
-// set.
+// 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"`
@@ -12798,36 +11815,17 @@ type VirtualMachineScaleSetVMExtensionsSummary struct {
StatusesSummary *[]VirtualMachineStatusCodeCount `json:"statusesSummary,omitempty"`
}
-// VirtualMachineScaleSetVMExtensionsUpdateFuture an abstraction for monitoring and retrieving the results of a
-// long-running operation.
+// VirtualMachineScaleSetVMExtensionsUpdateFuture an abstraction for monitoring and retrieving the results
+// of a long-running operation.
type VirtualMachineScaleSetVMExtensionsUpdateFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *VirtualMachineScaleSetVMExtensionsUpdateFuture) Result(client VirtualMachineScaleSetVMExtensionsClient) (vme VirtualMachineExtension, 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 {
- err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMExtensionsUpdateFuture")
- 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.VirtualMachineScaleSetVMExtensionsUpdateFuture", "Result", vme.Response.Response, "Failure responding to request")
- }
- }
- return
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(VirtualMachineScaleSetVMExtensionsClient) (VirtualMachineExtension, error)
}
-// VirtualMachineScaleSetVMInstanceIDs specifies a list of virtual machine instance IDs from the VM scale set.
+// 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"`
@@ -12912,8 +11910,8 @@ type VirtualMachineScaleSetVMListResult struct {
NextLink *string `json:"nextLink,omitempty"`
}
-// VirtualMachineScaleSetVMListResultIterator provides access to a complete listing of VirtualMachineScaleSetVM
-// values.
+// VirtualMachineScaleSetVMListResultIterator provides access to a complete listing of
+// VirtualMachineScaleSetVM values.
type VirtualMachineScaleSetVMListResultIterator struct {
i int
page VirtualMachineScaleSetVMListResultPage
@@ -13056,8 +12054,11 @@ func (page VirtualMachineScaleSetVMListResultPage) Values() []VirtualMachineScal
}
// Creates a new instance of the VirtualMachineScaleSetVMListResultPage type.
-func NewVirtualMachineScaleSetVMListResultPage(getNextPage func(context.Context, VirtualMachineScaleSetVMListResult) (VirtualMachineScaleSetVMListResult, error)) VirtualMachineScaleSetVMListResultPage {
- return VirtualMachineScaleSetVMListResultPage{fn: getNextPage}
+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
@@ -13091,7 +12092,8 @@ type VirtualMachineScaleSetVMProfile struct {
ScheduledEventsProfile *ScheduledEventsProfile `json:"scheduledEventsProfile,omitempty"`
}
-// VirtualMachineScaleSetVMProperties describes the properties of a virtual machine scale set virtual machine.
+// 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"`
@@ -13178,393 +12180,145 @@ type VirtualMachineScaleSetVMReimageParameters struct {
// VirtualMachineScaleSetVMsDeallocateFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type VirtualMachineScaleSetVMsDeallocateFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsDeallocateFuture")
- return
- }
- ar.Response = future.Response()
- return
+ 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)
}
// VirtualMachineScaleSetVMsDeleteFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type VirtualMachineScaleSetVMsDeleteFuture struct {
- azure.Future
+ 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)
}
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- 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.
+// VirtualMachineScaleSetVMsPerformMaintenanceFuture an abstraction for monitoring and retrieving the
+// results of a long-running operation.
type VirtualMachineScaleSetVMsPerformMaintenanceFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsPerformMaintenanceFuture")
- return
- }
- ar.Response = future.Response()
- return
+ 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)
}
// VirtualMachineScaleSetVMsPowerOffFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type VirtualMachineScaleSetVMsPowerOffFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsPowerOffFuture")
- return
- }
- ar.Response = future.Response()
- return
+ 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)
}
// VirtualMachineScaleSetVMsRedeployFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type VirtualMachineScaleSetVMsRedeployFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsRedeployFuture")
- return
- }
- ar.Response = future.Response()
- return
+ 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)
}
// VirtualMachineScaleSetVMsReimageAllFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type VirtualMachineScaleSetVMsReimageAllFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsReimageAllFuture")
- return
- }
- ar.Response = future.Response()
- return
+ 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)
}
// VirtualMachineScaleSetVMsReimageFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type VirtualMachineScaleSetVMsReimageFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsReimageFuture")
- return
- }
- ar.Response = future.Response()
- return
+ 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)
}
// VirtualMachineScaleSetVMsRestartFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type VirtualMachineScaleSetVMsRestartFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsRestartFuture")
- return
- }
- ar.Response = future.Response()
- return
+ 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)
}
// VirtualMachineScaleSetVMsRunCommandFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type VirtualMachineScaleSetVMsRunCommandFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- 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
+ 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)
}
// VirtualMachineScaleSetVMsStartFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type VirtualMachineScaleSetVMsStartFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsStartFuture")
- return
- }
- ar.Response = future.Response()
- return
+ 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)
}
// VirtualMachineScaleSetVMsUpdateFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type VirtualMachineScaleSetVMsUpdateFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- 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
+ 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)
}
// VirtualMachinesCaptureFuture an abstraction for monitoring and retrieving the results of a long-running
// operation.
type VirtualMachinesCaptureFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- 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
+ 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)
}
// VirtualMachinesConvertToManagedDisksFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type VirtualMachinesConvertToManagedDisksFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesConvertToManagedDisksFuture")
- return
- }
- ar.Response = future.Response()
- return
+ 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)
}
// VirtualMachinesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type VirtualMachinesCreateOrUpdateFuture struct {
- azure.Future
+ 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)
}
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- 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.
+// VirtualMachinesDeallocateFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
type VirtualMachinesDeallocateFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesDeallocateFuture")
- return
- }
- ar.Response = future.Response()
- return
+ 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)
}
// VirtualMachinesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
// operation.
type VirtualMachinesDeleteFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
+ 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)
}
// VirtualMachineSize describes the properties of a VM size.
@@ -13593,191 +12347,73 @@ type VirtualMachineSizeListResult struct {
// VirtualMachinesPerformMaintenanceFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type VirtualMachinesPerformMaintenanceFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesPerformMaintenanceFuture")
- return
- }
- ar.Response = future.Response()
- return
+ 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)
}
// VirtualMachinesPowerOffFuture an abstraction for monitoring and retrieving the results of a long-running
// operation.
type VirtualMachinesPowerOffFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesPowerOffFuture")
- return
- }
- ar.Response = future.Response()
- return
+ 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)
}
// VirtualMachinesReapplyFuture an abstraction for monitoring and retrieving the results of a long-running
// operation.
type VirtualMachinesReapplyFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesReapplyFuture")
- return
- }
- ar.Response = future.Response()
- return
+ 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)
}
// VirtualMachinesRedeployFuture an abstraction for monitoring and retrieving the results of a long-running
// operation.
type VirtualMachinesRedeployFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesRedeployFuture")
- return
- }
- ar.Response = future.Response()
- return
+ 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)
}
// VirtualMachinesReimageFuture an abstraction for monitoring and retrieving the results of a long-running
// operation.
type VirtualMachinesReimageFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesReimageFuture")
- return
- }
- ar.Response = future.Response()
- return
+ 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)
}
// VirtualMachinesRestartFuture an abstraction for monitoring and retrieving the results of a long-running
// operation.
type VirtualMachinesRestartFuture struct {
- azure.Future
+ 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)
}
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- 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.
+// VirtualMachinesRunCommandFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
type VirtualMachinesRunCommandFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- 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
+ 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)
}
// VirtualMachinesStartFuture an abstraction for monitoring and retrieving the results of a long-running
// operation.
type VirtualMachinesStartFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesStartFuture")
- return
- }
- ar.Response = future.Response()
- return
+ 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)
}
// VirtualMachineStatusCodeCount the status code and count of the virtual machine scale set instance view
@@ -13792,30 +12428,10 @@ type VirtualMachineStatusCodeCount struct {
// VirtualMachinesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
// operation.
type VirtualMachinesUpdateFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-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 {
- 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
+ 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)
}
// VirtualMachineUpdate describes a Virtual Machine Update.
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/operations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/operations.go
index fb3c693230d..2e864c3b94a 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/operations.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/operations.go
@@ -69,6 +69,7 @@ func (client OperationsClient) List(ctx context.Context) (result OperationListRe
result, err = client.ListResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.OperationsClient", "List", resp, "Failure responding to request")
+ return
}
return
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/proximityplacementgroups.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/proximityplacementgroups.go
index 56e136a1257..1dc10c325fc 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/proximityplacementgroups.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/proximityplacementgroups.go
@@ -74,6 +74,7 @@ func (client ProximityPlacementGroupsClient) CreateOrUpdate(ctx context.Context,
result, err = client.CreateOrUpdateResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.ProximityPlacementGroupsClient", "CreateOrUpdate", resp, "Failure responding to request")
+ return
}
return
@@ -151,6 +152,7 @@ func (client ProximityPlacementGroupsClient) Delete(ctx context.Context, resourc
result, err = client.DeleteResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.ProximityPlacementGroupsClient", "Delete", resp, "Failure responding to request")
+ return
}
return
@@ -227,6 +229,7 @@ func (client ProximityPlacementGroupsClient) Get(ctx context.Context, resourceGr
result, err = client.GetResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.ProximityPlacementGroupsClient", "Get", resp, "Failure responding to request")
+ return
}
return
@@ -305,9 +308,11 @@ func (client ProximityPlacementGroupsClient) ListByResourceGroup(ctx context.Con
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
@@ -417,9 +422,11 @@ func (client ProximityPlacementGroupsClient) ListBySubscription(ctx context.Cont
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
@@ -531,6 +538,7 @@ func (client ProximityPlacementGroupsClient) Update(ctx context.Context, resourc
result, err = client.UpdateResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.ProximityPlacementGroupsClient", "Update", resp, "Failure responding to request")
+ return
}
return
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/resourceskus.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/resourceskus.go
index d389561d3c7..7bbda330f1e 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/resourceskus.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/resourceskus.go
@@ -72,9 +72,11 @@ func (client ResourceSkusClient) List(ctx context.Context, filter string) (resul
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
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/snapshots.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/snapshots.go
index c96a8a29096..91895e8c0e0 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/snapshots.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/snapshots.go
@@ -82,7 +82,7 @@ func (client SnapshotsClient) CreateOrUpdate(ctx context.Context, resourceGroupN
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "CreateOrUpdate", nil, "Failure sending request")
return
}
@@ -121,7 +121,33 @@ func (client SnapshotsClient) CreateOrUpdateSender(req *http.Request) (future Sn
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.SnapshotsCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ s.Response.Response, err = future.GetResult(sender)
+ if s.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "compute.SnapshotsCreateOrUpdateFuture", "Result", nil, "received nil response and error")
+ }
+ if 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
+ }
return
}
@@ -161,7 +187,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", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "Delete", nil, "Failure sending request")
return
}
@@ -197,7 +223,23 @@ func (client SnapshotsClient) DeleteSender(req *http.Request) (future SnapshotsD
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.SnapshotsDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
return
}
@@ -244,6 +286,7 @@ func (client SnapshotsClient) Get(ctx context.Context, resourceGroupName string,
result, err = client.GetResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "Get", resp, "Failure responding to request")
+ return
}
return
@@ -319,7 +362,7 @@ func (client SnapshotsClient) GrantAccess(ctx context.Context, resourceGroupName
result, err = client.GrantAccessSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "GrantAccess", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "GrantAccess", nil, "Failure sending request")
return
}
@@ -357,7 +400,33 @@ func (client SnapshotsClient) GrantAccessSender(req *http.Request) (future Snaps
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.SnapshotsGrantAccessFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ au.Response.Response, err = future.GetResult(sender)
+ if au.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "compute.SnapshotsGrantAccessFuture", "Result", nil, "received nil response and error")
+ }
+ if 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
+ }
return
}
@@ -402,9 +471,11 @@ func (client SnapshotsClient) List(ctx context.Context) (result SnapshotListPage
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
@@ -515,9 +586,11 @@ func (client SnapshotsClient) ListByResourceGroup(ctx context.Context, resourceG
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
@@ -622,7 +695,7 @@ func (client SnapshotsClient) RevokeAccess(ctx context.Context, resourceGroupNam
result, err = client.RevokeAccessSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "RevokeAccess", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "RevokeAccess", nil, "Failure sending request")
return
}
@@ -658,7 +731,23 @@ func (client SnapshotsClient) RevokeAccessSender(req *http.Request) (future Snap
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.SnapshotsRevokeAccessFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
return
}
@@ -698,7 +787,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", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "Update", nil, "Failure sending request")
return
}
@@ -736,7 +825,33 @@ func (client SnapshotsClient) UpdateSender(req *http.Request) (future SnapshotsU
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.SnapshotsUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ s.Response.Response, err = future.GetResult(sender)
+ if s.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "compute.SnapshotsUpdateFuture", "Result", nil, "received nil response and error")
+ }
+ if 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
+ }
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/sshpublickeys.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/sshpublickeys.go
index 284e5d6c838..d5ad1952825 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/sshpublickeys.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/sshpublickeys.go
@@ -73,6 +73,7 @@ func (client SSHPublicKeysClient) Create(ctx context.Context, resourceGroupName
result, err = client.CreateResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "Create", resp, "Failure responding to request")
+ return
}
return
@@ -150,6 +151,7 @@ func (client SSHPublicKeysClient) Delete(ctx context.Context, resourceGroupName
result, err = client.DeleteResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "Delete", resp, "Failure responding to request")
+ return
}
return
@@ -226,6 +228,7 @@ func (client SSHPublicKeysClient) GenerateKeyPair(ctx context.Context, resourceG
result, err = client.GenerateKeyPairResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "GenerateKeyPair", resp, "Failure responding to request")
+ return
}
return
@@ -301,6 +304,7 @@ func (client SSHPublicKeysClient) Get(ctx context.Context, resourceGroupName str
result, err = client.GetResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "Get", resp, "Failure responding to request")
+ return
}
return
@@ -377,9 +381,11 @@ func (client SSHPublicKeysClient) ListByResourceGroup(ctx context.Context, resou
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
@@ -490,9 +496,11 @@ func (client SSHPublicKeysClient) ListBySubscription(ctx context.Context) (resul
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
@@ -604,6 +612,7 @@ func (client SSHPublicKeysClient) Update(ctx context.Context, resourceGroupName
result, err = client.UpdateResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "Update", resp, "Failure responding to request")
+ return
}
return
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/usage.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/usage.go
index d0b7b4b6c83..502db11e449 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/usage.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/usage.go
@@ -80,9 +80,11 @@ func (client UsageClient) List(ctx context.Context, location string) (result Lis
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
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachineextensionimages.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachineextensionimages.go
index 2eb81718a5d..b652343a200 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachineextensionimages.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachineextensionimages.go
@@ -72,6 +72,7 @@ func (client VirtualMachineExtensionImagesClient) Get(ctx context.Context, locat
result, err = client.GetResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionImagesClient", "Get", resp, "Failure responding to request")
+ return
}
return
@@ -148,6 +149,7 @@ func (client VirtualMachineExtensionImagesClient) ListTypes(ctx context.Context,
result, err = client.ListTypesResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionImagesClient", "ListTypes", resp, "Failure responding to request")
+ return
}
return
@@ -223,6 +225,7 @@ func (client VirtualMachineExtensionImagesClient) ListVersions(ctx context.Conte
result, err = client.ListVersionsResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionImagesClient", "ListVersions", resp, "Failure responding to request")
+ return
}
return
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachineextensions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachineextensions.go
index 78fdde3cff1..9a5847e7597 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachineextensions.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachineextensions.go
@@ -67,7 +67,7 @@ func (client VirtualMachineExtensionsClient) CreateOrUpdate(ctx context.Context,
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsClient", "CreateOrUpdate", nil, "Failure sending request")
return
}
@@ -106,7 +106,33 @@ func (client VirtualMachineExtensionsClient) CreateOrUpdateSender(req *http.Requ
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineExtensionsCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ vme.Response.Response, err = future.GetResult(sender)
+ if vme.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsCreateOrUpdateFuture", "Result", nil, "received nil response and error")
+ }
+ if 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
+ }
return
}
@@ -146,7 +172,7 @@ func (client VirtualMachineExtensionsClient) Delete(ctx context.Context, resourc
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsClient", "Delete", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsClient", "Delete", nil, "Failure sending request")
return
}
@@ -183,7 +209,23 @@ func (client VirtualMachineExtensionsClient) DeleteSender(req *http.Request) (fu
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineExtensionsDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
return
}
@@ -231,6 +273,7 @@ func (client VirtualMachineExtensionsClient) Get(ctx context.Context, resourceGr
result, err = client.GetResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsClient", "Get", resp, "Failure responding to request")
+ return
}
return
@@ -311,6 +354,7 @@ func (client VirtualMachineExtensionsClient) List(ctx context.Context, resourceG
result, err = client.ListResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsClient", "List", resp, "Failure responding to request")
+ return
}
return
@@ -383,7 +427,7 @@ func (client VirtualMachineExtensionsClient) Update(ctx context.Context, resourc
result, err = client.UpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsClient", "Update", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsClient", "Update", nil, "Failure sending request")
return
}
@@ -422,7 +466,33 @@ func (client VirtualMachineExtensionsClient) UpdateSender(req *http.Request) (fu
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineExtensionsUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ vme.Response.Response, err = future.GetResult(sender)
+ if vme.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsUpdateFuture", "Result", nil, "received nil response and error")
+ }
+ if 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
+ }
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachineimages.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachineimages.go
index 2b894fda4cf..1dc4b013728 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachineimages.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachineimages.go
@@ -76,6 +76,7 @@ func (client VirtualMachineImagesClient) Get(ctx context.Context, location strin
result, err = client.GetResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachineImagesClient", "Get", resp, "Failure responding to request")
+ return
}
return
@@ -157,6 +158,7 @@ func (client VirtualMachineImagesClient) List(ctx context.Context, location stri
result, err = client.ListResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachineImagesClient", "List", resp, "Failure responding to request")
+ return
}
return
@@ -243,6 +245,7 @@ func (client VirtualMachineImagesClient) ListOffers(ctx context.Context, locatio
result, err = client.ListOffersResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachineImagesClient", "ListOffers", resp, "Failure responding to request")
+ return
}
return
@@ -317,6 +320,7 @@ func (client VirtualMachineImagesClient) ListPublishers(ctx context.Context, loc
result, err = client.ListPublishersResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachineImagesClient", "ListPublishers", resp, "Failure responding to request")
+ return
}
return
@@ -392,6 +396,7 @@ func (client VirtualMachineImagesClient) ListSkus(ctx context.Context, location
result, err = client.ListSkusResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachineImagesClient", "ListSkus", resp, "Failure responding to request")
+ return
}
return
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachineruncommands.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachineruncommands.go
index e0754a0655b..7c0be274f60 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachineruncommands.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachineruncommands.go
@@ -80,6 +80,7 @@ func (client VirtualMachineRunCommandsClient) Get(ctx context.Context, location
result, err = client.GetResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachineRunCommandsClient", "Get", resp, "Failure responding to request")
+ return
}
return
@@ -161,9 +162,11 @@ func (client VirtualMachineRunCommandsClient) List(ctx context.Context, location
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
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachines.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachines.go
index d150a378900..c88f9ba53d6 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachines.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachines.go
@@ -75,7 +75,7 @@ func (client VirtualMachinesClient) Capture(ctx context.Context, resourceGroupNa
result, err = client.CaptureSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Capture", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Capture", nil, "Failure sending request")
return
}
@@ -113,7 +113,33 @@ func (client VirtualMachinesClient) CaptureSender(req *http.Request) (future Vir
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesCaptureFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ vmcr.Response.Response, err = future.GetResult(sender)
+ if vmcr.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesCaptureFuture", "Result", nil, "received nil response and error")
+ }
+ if 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
+ }
return
}
@@ -130,7 +156,11 @@ func (client VirtualMachinesClient) CaptureResponder(resp *http.Response) (resul
}
// ConvertToManagedDisks converts virtual machine disks from blob-based to managed disks. Virtual machine must be
-// stop-deallocated before invoking this operation.
+// stop-deallocated before invoking this operation. For Windows, please refer to [Convert a virtual machine from
+// unmanaged disks to managed
+// disks.](https://docs.microsoft.com/en-us/azure/virtual-machines/windows/convert-unmanaged-to-managed-disks). For
+// Linux, please refer to [Convert a virtual machine from unmanaged disks to managed
+// disks.](https://docs.microsoft.com/en-us/azure/virtual-machines/linux/convert-unmanaged-to-managed-disks).
// Parameters:
// resourceGroupName - the name of the resource group.
// VMName - the name of the virtual machine.
@@ -153,7 +183,7 @@ func (client VirtualMachinesClient) ConvertToManagedDisks(ctx context.Context, r
result, err = client.ConvertToManagedDisksSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "ConvertToManagedDisks", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "ConvertToManagedDisks", nil, "Failure sending request")
return
}
@@ -189,7 +219,23 @@ func (client VirtualMachinesClient) ConvertToManagedDisksSender(req *http.Reques
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesConvertToManagedDisksFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
return
}
@@ -250,7 +296,7 @@ func (client VirtualMachinesClient) CreateOrUpdate(ctx context.Context, resource
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "CreateOrUpdate", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "CreateOrUpdate", nil, "Failure sending request")
return
}
@@ -289,7 +335,33 @@ func (client VirtualMachinesClient) CreateOrUpdateSender(req *http.Request) (fut
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ VM.Response.Response, err = future.GetResult(sender)
+ if VM.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesCreateOrUpdateFuture", "Result", nil, "received nil response and error")
+ }
+ if 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
+ }
return
}
@@ -329,7 +401,7 @@ func (client VirtualMachinesClient) Deallocate(ctx context.Context, resourceGrou
result, err = client.DeallocateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Deallocate", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Deallocate", nil, "Failure sending request")
return
}
@@ -365,7 +437,23 @@ func (client VirtualMachinesClient) DeallocateSender(req *http.Request) (future
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesDeallocateFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
return
}
@@ -403,7 +491,7 @@ func (client VirtualMachinesClient) Delete(ctx context.Context, resourceGroupNam
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Delete", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Delete", nil, "Failure sending request")
return
}
@@ -439,7 +527,23 @@ func (client VirtualMachinesClient) DeleteSender(req *http.Request) (future Virt
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
return
}
@@ -489,6 +593,7 @@ func (client VirtualMachinesClient) Generalize(ctx context.Context, resourceGrou
result, err = client.GeneralizeResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Generalize", resp, "Failure responding to request")
+ return
}
return
@@ -564,6 +669,7 @@ func (client VirtualMachinesClient) Get(ctx context.Context, resourceGroupName s
result, err = client.GetResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Get", resp, "Failure responding to request")
+ return
}
return
@@ -642,6 +748,7 @@ func (client VirtualMachinesClient) InstanceView(ctx context.Context, resourceGr
result, err = client.InstanceViewResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "InstanceView", resp, "Failure responding to request")
+ return
}
return
@@ -718,9 +825,11 @@ func (client VirtualMachinesClient) List(ctx context.Context, resourceGroupName
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
@@ -833,9 +942,11 @@ func (client VirtualMachinesClient) ListAll(ctx context.Context, statusOnly stri
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
@@ -949,6 +1060,7 @@ func (client VirtualMachinesClient) ListAvailableSizes(ctx context.Context, reso
result, err = client.ListAvailableSizesResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "ListAvailableSizes", resp, "Failure responding to request")
+ return
}
return
@@ -1030,9 +1142,11 @@ func (client VirtualMachinesClient) ListByLocation(ctx context.Context, location
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
@@ -1113,7 +1227,8 @@ func (client VirtualMachinesClient) ListByLocationComplete(ctx context.Context,
return
}
-// PerformMaintenance the operation to perform maintenance on a virtual machine.
+// PerformMaintenance shuts down the virtual machine, moves it to an already updated node, and powers it back on during
+// the self-service phase of planned maintenance.
// Parameters:
// resourceGroupName - the name of the resource group.
// VMName - the name of the virtual machine.
@@ -1136,7 +1251,7 @@ func (client VirtualMachinesClient) PerformMaintenance(ctx context.Context, reso
result, err = client.PerformMaintenanceSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "PerformMaintenance", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "PerformMaintenance", nil, "Failure sending request")
return
}
@@ -1172,7 +1287,23 @@ func (client VirtualMachinesClient) PerformMaintenanceSender(req *http.Request)
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesPerformMaintenanceFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
return
}
@@ -1214,7 +1345,7 @@ func (client VirtualMachinesClient) PowerOff(ctx context.Context, resourceGroupN
result, err = client.PowerOffSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "PowerOff", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "PowerOff", nil, "Failure sending request")
return
}
@@ -1255,7 +1386,23 @@ func (client VirtualMachinesClient) PowerOffSender(req *http.Request) (future Vi
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesPowerOffFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
return
}
@@ -1293,7 +1440,7 @@ func (client VirtualMachinesClient) Reapply(ctx context.Context, resourceGroupNa
result, err = client.ReapplySender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Reapply", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Reapply", nil, "Failure sending request")
return
}
@@ -1329,7 +1476,23 @@ func (client VirtualMachinesClient) ReapplySender(req *http.Request) (future Vir
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesReapplyFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
return
}
@@ -1367,7 +1530,7 @@ func (client VirtualMachinesClient) Redeploy(ctx context.Context, resourceGroupN
result, err = client.RedeploySender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Redeploy", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Redeploy", nil, "Failure sending request")
return
}
@@ -1403,7 +1566,23 @@ func (client VirtualMachinesClient) RedeploySender(req *http.Request) (future Vi
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesRedeployFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
return
}
@@ -1442,7 +1621,7 @@ func (client VirtualMachinesClient) Reimage(ctx context.Context, resourceGroupNa
result, err = client.ReimageSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Reimage", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Reimage", nil, "Failure sending request")
return
}
@@ -1483,7 +1662,23 @@ func (client VirtualMachinesClient) ReimageSender(req *http.Request) (future Vir
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesReimageFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
return
}
@@ -1521,7 +1716,7 @@ func (client VirtualMachinesClient) Restart(ctx context.Context, resourceGroupNa
result, err = client.RestartSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Restart", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Restart", nil, "Failure sending request")
return
}
@@ -1557,7 +1752,23 @@ func (client VirtualMachinesClient) RestartSender(req *http.Request) (future Vir
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesRestartFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
return
}
@@ -1602,7 +1813,7 @@ func (client VirtualMachinesClient) RunCommand(ctx context.Context, resourceGrou
result, err = client.RunCommandSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "RunCommand", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "RunCommand", nil, "Failure sending request")
return
}
@@ -1640,7 +1851,33 @@ func (client VirtualMachinesClient) RunCommandSender(req *http.Request) (future
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesRunCommandFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ rcr.Response.Response, err = future.GetResult(sender)
+ if rcr.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesRunCommandFuture", "Result", nil, "received nil response and error")
+ }
+ if 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
+ }
return
}
@@ -1688,6 +1925,7 @@ func (client VirtualMachinesClient) SimulateEviction(ctx context.Context, resour
result, err = client.SimulateEvictionResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "SimulateEviction", resp, "Failure responding to request")
+ return
}
return
@@ -1754,7 +1992,7 @@ func (client VirtualMachinesClient) Start(ctx context.Context, resourceGroupName
result, err = client.StartSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Start", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Start", nil, "Failure sending request")
return
}
@@ -1790,7 +2028,23 @@ func (client VirtualMachinesClient) StartSender(req *http.Request) (future Virtu
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesStartFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
return
}
@@ -1829,7 +2083,7 @@ func (client VirtualMachinesClient) Update(ctx context.Context, resourceGroupNam
result, err = client.UpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Update", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Update", nil, "Failure sending request")
return
}
@@ -1867,7 +2121,33 @@ func (client VirtualMachinesClient) UpdateSender(req *http.Request) (future Virt
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ VM.Response.Response, err = future.GetResult(sender)
+ if VM.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesUpdateFuture", "Result", nil, "received nil response and error")
+ }
+ if 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
+ }
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachinescalesetextensions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachinescalesetextensions.go
index 4ed8a6fd4e6..6144403ab04 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachinescalesetextensions.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachinescalesetextensions.go
@@ -67,7 +67,7 @@ func (client VirtualMachineScaleSetExtensionsClient) CreateOrUpdate(ctx context.
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsClient", "CreateOrUpdate", nil, "Failure sending request")
return
}
@@ -107,7 +107,33 @@ func (client VirtualMachineScaleSetExtensionsClient) CreateOrUpdateSender(req *h
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetExtensionsCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ vmsse.Response.Response, err = future.GetResult(sender)
+ if vmsse.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsCreateOrUpdateFuture", "Result", nil, "received nil response and error")
+ }
+ if 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
+ }
return
}
@@ -147,7 +173,7 @@ func (client VirtualMachineScaleSetExtensionsClient) Delete(ctx context.Context,
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsClient", "Delete", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsClient", "Delete", nil, "Failure sending request")
return
}
@@ -184,7 +210,23 @@ func (client VirtualMachineScaleSetExtensionsClient) DeleteSender(req *http.Requ
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetExtensionsDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
return
}
@@ -232,6 +274,7 @@ func (client VirtualMachineScaleSetExtensionsClient) Get(ctx context.Context, re
result, err = client.GetResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsClient", "Get", resp, "Failure responding to request")
+ return
}
return
@@ -312,9 +355,11 @@ func (client VirtualMachineScaleSetExtensionsClient) List(ctx context.Context, r
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
@@ -421,7 +466,7 @@ func (client VirtualMachineScaleSetExtensionsClient) Update(ctx context.Context,
result, err = client.UpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsClient", "Update", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsClient", "Update", nil, "Failure sending request")
return
}
@@ -462,7 +507,33 @@ func (client VirtualMachineScaleSetExtensionsClient) UpdateSender(req *http.Requ
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetExtensionsUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ vmsse.Response.Response, err = future.GetResult(sender)
+ if vmsse.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsUpdateFuture", "Result", nil, "received nil response and error")
+ }
+ if 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
+ }
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachinescalesetrollingupgrades.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachinescalesetrollingupgrades.go
index 66187cd5829..7cd3ffa090a 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachinescalesetrollingupgrades.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachinescalesetrollingupgrades.go
@@ -66,7 +66,7 @@ func (client VirtualMachineScaleSetRollingUpgradesClient) Cancel(ctx context.Con
result, err = client.CancelSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesClient", "Cancel", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesClient", "Cancel", nil, "Failure sending request")
return
}
@@ -102,7 +102,23 @@ func (client VirtualMachineScaleSetRollingUpgradesClient) CancelSender(req *http
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetRollingUpgradesCancelFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
return
}
@@ -148,6 +164,7 @@ func (client VirtualMachineScaleSetRollingUpgradesClient) GetLatest(ctx context.
result, err = client.GetLatestResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesClient", "GetLatest", resp, "Failure responding to request")
+ return
}
return
@@ -217,7 +234,7 @@ func (client VirtualMachineScaleSetRollingUpgradesClient) StartExtensionUpgrade(
result, err = client.StartExtensionUpgradeSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesClient", "StartExtensionUpgrade", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesClient", "StartExtensionUpgrade", nil, "Failure sending request")
return
}
@@ -253,7 +270,23 @@ func (client VirtualMachineScaleSetRollingUpgradesClient) StartExtensionUpgradeS
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetRollingUpgradesStartExtensionUpgradeFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
return
}
@@ -292,7 +325,7 @@ func (client VirtualMachineScaleSetRollingUpgradesClient) StartOSUpgrade(ctx con
result, err = client.StartOSUpgradeSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesClient", "StartOSUpgrade", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesClient", "StartOSUpgrade", nil, "Failure sending request")
return
}
@@ -328,7 +361,23 @@ func (client VirtualMachineScaleSetRollingUpgradesClient) StartOSUpgradeSender(r
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetRollingUpgradesStartOSUpgradeFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachinescalesets.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachinescalesets.go
index 8839ada2da2..9883a1b49f5 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachinescalesets.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachinescalesets.go
@@ -43,7 +43,7 @@ func NewVirtualMachineScaleSetsClientWithBaseURI(baseURI string, subscriptionID
return VirtualMachineScaleSetsClient{NewWithBaseURI(baseURI, subscriptionID)}
}
-// ConvertToSinglePlacementGroup converts SinglePlacementGroup property to false for a existing virtual machine scale
+// ConvertToSinglePlacementGroup converts SinglePlacementGroup property to true for a existing virtual machine scale
// set.
// Parameters:
// resourceGroupName - the name of the resource group.
@@ -76,6 +76,7 @@ func (client VirtualMachineScaleSetsClient) ConvertToSinglePlacementGroup(ctx co
result, err = client.ConvertToSinglePlacementGroupResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "ConvertToSinglePlacementGroup", resp, "Failure responding to request")
+ return
}
return
@@ -168,7 +169,7 @@ func (client VirtualMachineScaleSetsClient) CreateOrUpdate(ctx context.Context,
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "CreateOrUpdate", nil, "Failure sending request")
return
}
@@ -206,7 +207,33 @@ func (client VirtualMachineScaleSetsClient) CreateOrUpdateSender(req *http.Reque
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ vmss.Response.Response, err = future.GetResult(sender)
+ if vmss.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsCreateOrUpdateFuture", "Result", nil, "received nil response and error")
+ }
+ if 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
+ }
return
}
@@ -247,7 +274,7 @@ func (client VirtualMachineScaleSetsClient) Deallocate(ctx context.Context, reso
result, err = client.DeallocateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Deallocate", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Deallocate", nil, "Failure sending request")
return
}
@@ -288,7 +315,23 @@ func (client VirtualMachineScaleSetsClient) DeallocateSender(req *http.Request)
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsDeallocateFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
return
}
@@ -326,7 +369,7 @@ func (client VirtualMachineScaleSetsClient) Delete(ctx context.Context, resource
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Delete", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Delete", nil, "Failure sending request")
return
}
@@ -362,7 +405,23 @@ func (client VirtualMachineScaleSetsClient) DeleteSender(req *http.Request) (fut
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
return
}
@@ -407,7 +466,7 @@ func (client VirtualMachineScaleSetsClient) DeleteInstances(ctx context.Context,
result, err = client.DeleteInstancesSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "DeleteInstances", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "DeleteInstances", nil, "Failure sending request")
return
}
@@ -445,7 +504,23 @@ func (client VirtualMachineScaleSetsClient) DeleteInstancesSender(req *http.Requ
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsDeleteInstancesFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
return
}
@@ -493,6 +568,7 @@ func (client VirtualMachineScaleSetsClient) ForceRecoveryServiceFabricPlatformUp
result, err = client.ForceRecoveryServiceFabricPlatformUpdateDomainWalkResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "ForceRecoveryServiceFabricPlatformUpdateDomainWalk", resp, "Failure responding to request")
+ return
}
return
@@ -569,6 +645,7 @@ func (client VirtualMachineScaleSetsClient) Get(ctx context.Context, resourceGro
result, err = client.GetResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Get", resp, "Failure responding to request")
+ return
}
return
@@ -644,6 +721,7 @@ func (client VirtualMachineScaleSetsClient) GetInstanceView(ctx context.Context,
result, err = client.GetInstanceViewResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "GetInstanceView", resp, "Failure responding to request")
+ return
}
return
@@ -720,9 +798,11 @@ func (client VirtualMachineScaleSetsClient) GetOSUpgradeHistory(ctx context.Cont
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
@@ -835,9 +915,11 @@ func (client VirtualMachineScaleSetsClient) List(ctx context.Context, resourceGr
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
@@ -949,9 +1031,11 @@ func (client VirtualMachineScaleSetsClient) ListAll(ctx context.Context) (result
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
@@ -1064,9 +1148,11 @@ func (client VirtualMachineScaleSetsClient) ListSkus(ctx context.Context, resour
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
@@ -1174,7 +1260,7 @@ func (client VirtualMachineScaleSetsClient) PerformMaintenance(ctx context.Conte
result, err = client.PerformMaintenanceSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "PerformMaintenance", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "PerformMaintenance", nil, "Failure sending request")
return
}
@@ -1215,7 +1301,23 @@ func (client VirtualMachineScaleSetsClient) PerformMaintenanceSender(req *http.R
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsPerformMaintenanceFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
return
}
@@ -1258,7 +1360,7 @@ func (client VirtualMachineScaleSetsClient) PowerOff(ctx context.Context, resour
result, err = client.PowerOffSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "PowerOff", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "PowerOff", nil, "Failure sending request")
return
}
@@ -1304,7 +1406,23 @@ func (client VirtualMachineScaleSetsClient) PowerOffSender(req *http.Request) (f
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsPowerOffFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
return
}
@@ -1344,7 +1462,7 @@ func (client VirtualMachineScaleSetsClient) Redeploy(ctx context.Context, resour
result, err = client.RedeploySender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Redeploy", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Redeploy", nil, "Failure sending request")
return
}
@@ -1385,7 +1503,23 @@ func (client VirtualMachineScaleSetsClient) RedeploySender(req *http.Request) (f
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsRedeployFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
return
}
@@ -1425,7 +1559,7 @@ func (client VirtualMachineScaleSetsClient) Reimage(ctx context.Context, resourc
result, err = client.ReimageSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Reimage", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Reimage", nil, "Failure sending request")
return
}
@@ -1466,7 +1600,23 @@ func (client VirtualMachineScaleSetsClient) ReimageSender(req *http.Request) (fu
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsReimageFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
return
}
@@ -1506,7 +1656,7 @@ func (client VirtualMachineScaleSetsClient) ReimageAll(ctx context.Context, reso
result, err = client.ReimageAllSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "ReimageAll", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "ReimageAll", nil, "Failure sending request")
return
}
@@ -1547,7 +1697,23 @@ func (client VirtualMachineScaleSetsClient) ReimageAllSender(req *http.Request)
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsReimageAllFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
return
}
@@ -1586,7 +1752,7 @@ func (client VirtualMachineScaleSetsClient) Restart(ctx context.Context, resourc
result, err = client.RestartSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Restart", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Restart", nil, "Failure sending request")
return
}
@@ -1627,7 +1793,23 @@ func (client VirtualMachineScaleSetsClient) RestartSender(req *http.Request) (fu
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsRestartFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
return
}
@@ -1666,7 +1848,7 @@ func (client VirtualMachineScaleSetsClient) SetOrchestrationServiceState(ctx con
result, err = client.SetOrchestrationServiceStateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "SetOrchestrationServiceState", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "SetOrchestrationServiceState", nil, "Failure sending request")
return
}
@@ -1704,7 +1886,23 @@ func (client VirtualMachineScaleSetsClient) SetOrchestrationServiceStateSender(r
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsSetOrchestrationServiceStateFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
return
}
@@ -1743,7 +1941,7 @@ func (client VirtualMachineScaleSetsClient) Start(ctx context.Context, resourceG
result, err = client.StartSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Start", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Start", nil, "Failure sending request")
return
}
@@ -1784,7 +1982,23 @@ func (client VirtualMachineScaleSetsClient) StartSender(req *http.Request) (futu
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsStartFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
return
}
@@ -1823,7 +2037,7 @@ func (client VirtualMachineScaleSetsClient) Update(ctx context.Context, resource
result, err = client.UpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Update", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Update", nil, "Failure sending request")
return
}
@@ -1861,7 +2075,33 @@ func (client VirtualMachineScaleSetsClient) UpdateSender(req *http.Request) (fut
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ vmss.Response.Response, err = future.GetResult(sender)
+ if vmss.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsUpdateFuture", "Result", nil, "received nil response and error")
+ }
+ if 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
+ }
return
}
@@ -1907,7 +2147,7 @@ func (client VirtualMachineScaleSetsClient) UpdateInstances(ctx context.Context,
result, err = client.UpdateInstancesSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "UpdateInstances", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "UpdateInstances", nil, "Failure sending request")
return
}
@@ -1945,7 +2185,23 @@ func (client VirtualMachineScaleSetsClient) UpdateInstancesSender(req *http.Requ
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsUpdateInstancesFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachinescalesetvmextensions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachinescalesetvmextensions.go
index f877eb6cd0f..699c2060283 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachinescalesetvmextensions.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachinescalesetvmextensions.go
@@ -69,7 +69,7 @@ func (client VirtualMachineScaleSetVMExtensionsClient) CreateOrUpdate(ctx contex
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMExtensionsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMExtensionsClient", "CreateOrUpdate", nil, "Failure sending request")
return
}
@@ -109,7 +109,33 @@ func (client VirtualMachineScaleSetVMExtensionsClient) CreateOrUpdateSender(req
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(client VirtualMachineScaleSetVMExtensionsClient) (vme VirtualMachineExtension, 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 {
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMExtensionsCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ vme.Response.Response, err = future.GetResult(sender)
+ if vme.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMExtensionsCreateOrUpdateFuture", "Result", nil, "received nil response and error")
+ }
+ if err == nil && vme.Response.Response.StatusCode != http.StatusNoContent {
+ vme, err = client.CreateOrUpdateResponder(vme.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMExtensionsCreateOrUpdateFuture", "Result", vme.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+ }
return
}
@@ -150,7 +176,7 @@ func (client VirtualMachineScaleSetVMExtensionsClient) Delete(ctx context.Contex
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMExtensionsClient", "Delete", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMExtensionsClient", "Delete", nil, "Failure sending request")
return
}
@@ -188,7 +214,23 @@ func (client VirtualMachineScaleSetVMExtensionsClient) DeleteSender(req *http.Re
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMExtensionsDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
return
}
@@ -237,6 +279,7 @@ func (client VirtualMachineScaleSetVMExtensionsClient) Get(ctx context.Context,
result, err = client.GetResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMExtensionsClient", "Get", resp, "Failure responding to request")
+ return
}
return
@@ -319,6 +362,7 @@ func (client VirtualMachineScaleSetVMExtensionsClient) List(ctx context.Context,
result, err = client.ListResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMExtensionsClient", "List", resp, "Failure responding to request")
+ return
}
return
@@ -393,7 +437,7 @@ func (client VirtualMachineScaleSetVMExtensionsClient) Update(ctx context.Contex
result, err = client.UpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMExtensionsClient", "Update", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMExtensionsClient", "Update", nil, "Failure sending request")
return
}
@@ -433,7 +477,33 @@ func (client VirtualMachineScaleSetVMExtensionsClient) UpdateSender(req *http.Re
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(client VirtualMachineScaleSetVMExtensionsClient) (vme VirtualMachineExtension, 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 {
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMExtensionsUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ vme.Response.Response, err = future.GetResult(sender)
+ if vme.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMExtensionsUpdateFuture", "Result", nil, "received nil response and error")
+ }
+ if err == nil && vme.Response.Response.StatusCode != http.StatusNoContent {
+ vme, err = client.UpdateResponder(vme.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMExtensionsUpdateFuture", "Result", vme.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+ }
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachinescalesetvms.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachinescalesetvms.go
index 7b1ac02c1b2..6e82efdec12 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachinescalesetvms.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachinescalesetvms.go
@@ -69,7 +69,7 @@ func (client VirtualMachineScaleSetVMsClient) Deallocate(ctx context.Context, re
result, err = client.DeallocateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Deallocate", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Deallocate", nil, "Failure sending request")
return
}
@@ -106,7 +106,23 @@ func (client VirtualMachineScaleSetVMsClient) DeallocateSender(req *http.Request
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsDeallocateFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
return
}
@@ -145,7 +161,7 @@ func (client VirtualMachineScaleSetVMsClient) Delete(ctx context.Context, resour
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Delete", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Delete", nil, "Failure sending request")
return
}
@@ -182,7 +198,23 @@ func (client VirtualMachineScaleSetVMsClient) DeleteSender(req *http.Request) (f
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
return
}
@@ -230,6 +262,7 @@ func (client VirtualMachineScaleSetVMsClient) Get(ctx context.Context, resourceG
result, err = client.GetResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Get", resp, "Failure responding to request")
+ return
}
return
@@ -310,6 +343,7 @@ func (client VirtualMachineScaleSetVMsClient) GetInstanceView(ctx context.Contex
result, err = client.GetInstanceViewResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "GetInstanceView", resp, "Failure responding to request")
+ return
}
return
@@ -391,9 +425,11 @@ func (client VirtualMachineScaleSetVMsClient) List(ctx context.Context, resource
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
@@ -484,7 +520,8 @@ func (client VirtualMachineScaleSetVMsClient) ListComplete(ctx context.Context,
return
}
-// PerformMaintenance performs maintenance on a virtual machine in a VM scale set.
+// PerformMaintenance shuts down the virtual machine in a VMScaleSet, moves it to an already updated node, and powers
+// it back on during the self-service phase of planned maintenance.
// Parameters:
// resourceGroupName - the name of the resource group.
// VMScaleSetName - the name of the VM scale set.
@@ -508,7 +545,7 @@ func (client VirtualMachineScaleSetVMsClient) PerformMaintenance(ctx context.Con
result, err = client.PerformMaintenanceSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "PerformMaintenance", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "PerformMaintenance", nil, "Failure sending request")
return
}
@@ -545,7 +582,23 @@ func (client VirtualMachineScaleSetVMsClient) PerformMaintenanceSender(req *http
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsPerformMaintenanceFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
return
}
@@ -588,7 +641,7 @@ func (client VirtualMachineScaleSetVMsClient) PowerOff(ctx context.Context, reso
result, err = client.PowerOffSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "PowerOff", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "PowerOff", nil, "Failure sending request")
return
}
@@ -630,7 +683,23 @@ func (client VirtualMachineScaleSetVMsClient) PowerOffSender(req *http.Request)
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsPowerOffFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
return
}
@@ -670,7 +739,7 @@ func (client VirtualMachineScaleSetVMsClient) Redeploy(ctx context.Context, reso
result, err = client.RedeploySender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Redeploy", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Redeploy", nil, "Failure sending request")
return
}
@@ -707,7 +776,23 @@ func (client VirtualMachineScaleSetVMsClient) RedeploySender(req *http.Request)
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsRedeployFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
return
}
@@ -747,7 +832,7 @@ func (client VirtualMachineScaleSetVMsClient) Reimage(ctx context.Context, resou
result, err = client.ReimageSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Reimage", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Reimage", nil, "Failure sending request")
return
}
@@ -789,7 +874,23 @@ func (client VirtualMachineScaleSetVMsClient) ReimageSender(req *http.Request) (
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsReimageFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
return
}
@@ -829,7 +930,7 @@ func (client VirtualMachineScaleSetVMsClient) ReimageAll(ctx context.Context, re
result, err = client.ReimageAllSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "ReimageAll", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "ReimageAll", nil, "Failure sending request")
return
}
@@ -866,7 +967,23 @@ func (client VirtualMachineScaleSetVMsClient) ReimageAllSender(req *http.Request
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsReimageAllFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
return
}
@@ -905,7 +1022,7 @@ func (client VirtualMachineScaleSetVMsClient) Restart(ctx context.Context, resou
result, err = client.RestartSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Restart", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Restart", nil, "Failure sending request")
return
}
@@ -942,7 +1059,23 @@ func (client VirtualMachineScaleSetVMsClient) RestartSender(req *http.Request) (
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsRestartFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
return
}
@@ -988,7 +1121,7 @@ func (client VirtualMachineScaleSetVMsClient) RunCommand(ctx context.Context, re
result, err = client.RunCommandSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "RunCommand", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "RunCommand", nil, "Failure sending request")
return
}
@@ -1027,7 +1160,33 @@ func (client VirtualMachineScaleSetVMsClient) RunCommandSender(req *http.Request
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsRunCommandFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ rcr.Response.Response, err = future.GetResult(sender)
+ if rcr.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsRunCommandFuture", "Result", nil, "received nil response and error")
+ }
+ if 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
+ }
return
}
@@ -1076,6 +1235,7 @@ func (client VirtualMachineScaleSetVMsClient) SimulateEviction(ctx context.Conte
result, err = client.SimulateEvictionResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "SimulateEviction", resp, "Failure responding to request")
+ return
}
return
@@ -1144,7 +1304,7 @@ func (client VirtualMachineScaleSetVMsClient) Start(ctx context.Context, resourc
result, err = client.StartSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Start", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Start", nil, "Failure sending request")
return
}
@@ -1181,7 +1341,23 @@ func (client VirtualMachineScaleSetVMsClient) StartSender(req *http.Request) (fu
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsStartFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
return
}
@@ -1242,7 +1418,7 @@ func (client VirtualMachineScaleSetVMsClient) Update(ctx context.Context, resour
result, err = client.UpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Update", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Update", nil, "Failure sending request")
return
}
@@ -1285,7 +1461,33 @@ func (client VirtualMachineScaleSetVMsClient) UpdateSender(req *http.Request) (f
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(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 {
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ vmssv.Response.Response, err = future.GetResult(sender)
+ if vmssv.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsUpdateFuture", "Result", nil, "received nil response and error")
+ }
+ if 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
+ }
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachinesizes.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachinesizes.go
index 4ec90e055a9..c8a7a3cd2f3 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachinesizes.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachinesizes.go
@@ -80,6 +80,7 @@ func (client VirtualMachineSizesClient) List(ctx context.Context, location strin
result, err = client.ListResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachineSizesClient", "List", resp, "Failure responding to request")
+ return
}
return
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/dns/mgmt/2016-04-01/dns/CHANGELOG.md b/vendor/github.com/Azure/azure-sdk-for-go/services/dns/mgmt/2016-04-01/dns/CHANGELOG.md
new file mode 100644
index 00000000000..569492ae291
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/dns/mgmt/2016-04-01/dns/CHANGELOG.md
@@ -0,0 +1,5 @@
+Generated from https://github.com/Azure/azure-rest-api-specs/tree/3c764635e7d442b3e74caf593029fcd440b3ef82//specification/dns/resource-manager/readme.md tag: `package-2016-04`
+
+Code generator @microsoft.azure/autorest.go@2.1.171
+
+
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/dns/mgmt/2016-04-01/dns/client.go b/vendor/github.com/Azure/azure-sdk-for-go/services/dns/mgmt/2016-04-01/dns/client.go
new file mode 100644
index 00000000000..99354b4c36a
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/dns/mgmt/2016-04-01/dns/client.go
@@ -0,0 +1,52 @@
+// Package dns implements the Azure ARM Dns service API version 2016-04-01.
+//
+// The DNS Management Client.
+package dns
+
+// Copyright (c) Microsoft and contributors. All rights reserved.
+//
+// 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 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 Dns
+ DefaultBaseURI = "https://management.azure.com"
+)
+
+// BaseClient is the base client for Dns.
+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/vendor/github.com/Azure/azure-sdk-for-go/services/dns/mgmt/2016-04-01/dns/enums.go b/vendor/github.com/Azure/azure-sdk-for-go/services/dns/mgmt/2016-04-01/dns/enums.go
new file mode 100644
index 00000000000..8d7b313b249
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/dns/mgmt/2016-04-01/dns/enums.go
@@ -0,0 +1,169 @@
+package dns
+
+// Copyright (c) Microsoft and contributors. All rights reserved.
+//
+// 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 Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+// HTTPStatusCode enumerates the values for http status code.
+type HTTPStatusCode string
+
+const (
+ // Accepted ...
+ Accepted HTTPStatusCode = "Accepted"
+ // Ambiguous ...
+ Ambiguous HTTPStatusCode = "Ambiguous"
+ // BadGateway ...
+ BadGateway HTTPStatusCode = "BadGateway"
+ // BadRequest ...
+ BadRequest HTTPStatusCode = "BadRequest"
+ // Conflict ...
+ Conflict HTTPStatusCode = "Conflict"
+ // Continue ...
+ Continue HTTPStatusCode = "Continue"
+ // Created ...
+ Created HTTPStatusCode = "Created"
+ // ExpectationFailed ...
+ ExpectationFailed HTTPStatusCode = "ExpectationFailed"
+ // Forbidden ...
+ Forbidden HTTPStatusCode = "Forbidden"
+ // Found ...
+ Found HTTPStatusCode = "Found"
+ // GatewayTimeout ...
+ GatewayTimeout HTTPStatusCode = "GatewayTimeout"
+ // Gone ...
+ Gone HTTPStatusCode = "Gone"
+ // HTTPVersionNotSupported ...
+ HTTPVersionNotSupported HTTPStatusCode = "HttpVersionNotSupported"
+ // InternalServerError ...
+ InternalServerError HTTPStatusCode = "InternalServerError"
+ // LengthRequired ...
+ LengthRequired HTTPStatusCode = "LengthRequired"
+ // MethodNotAllowed ...
+ MethodNotAllowed HTTPStatusCode = "MethodNotAllowed"
+ // Moved ...
+ Moved HTTPStatusCode = "Moved"
+ // MovedPermanently ...
+ MovedPermanently HTTPStatusCode = "MovedPermanently"
+ // MultipleChoices ...
+ MultipleChoices HTTPStatusCode = "MultipleChoices"
+ // NoContent ...
+ NoContent HTTPStatusCode = "NoContent"
+ // NonAuthoritativeInformation ...
+ NonAuthoritativeInformation HTTPStatusCode = "NonAuthoritativeInformation"
+ // NotAcceptable ...
+ NotAcceptable HTTPStatusCode = "NotAcceptable"
+ // NotFound ...
+ NotFound HTTPStatusCode = "NotFound"
+ // NotImplemented ...
+ NotImplemented HTTPStatusCode = "NotImplemented"
+ // NotModified ...
+ NotModified HTTPStatusCode = "NotModified"
+ // OK ...
+ OK HTTPStatusCode = "OK"
+ // PartialContent ...
+ PartialContent HTTPStatusCode = "PartialContent"
+ // PaymentRequired ...
+ PaymentRequired HTTPStatusCode = "PaymentRequired"
+ // PreconditionFailed ...
+ PreconditionFailed HTTPStatusCode = "PreconditionFailed"
+ // ProxyAuthenticationRequired ...
+ ProxyAuthenticationRequired HTTPStatusCode = "ProxyAuthenticationRequired"
+ // Redirect ...
+ Redirect HTTPStatusCode = "Redirect"
+ // RedirectKeepVerb ...
+ RedirectKeepVerb HTTPStatusCode = "RedirectKeepVerb"
+ // RedirectMethod ...
+ RedirectMethod HTTPStatusCode = "RedirectMethod"
+ // RequestedRangeNotSatisfiable ...
+ RequestedRangeNotSatisfiable HTTPStatusCode = "RequestedRangeNotSatisfiable"
+ // RequestEntityTooLarge ...
+ RequestEntityTooLarge HTTPStatusCode = "RequestEntityTooLarge"
+ // RequestTimeout ...
+ RequestTimeout HTTPStatusCode = "RequestTimeout"
+ // RequestURITooLong ...
+ RequestURITooLong HTTPStatusCode = "RequestUriTooLong"
+ // ResetContent ...
+ ResetContent HTTPStatusCode = "ResetContent"
+ // SeeOther ...
+ SeeOther HTTPStatusCode = "SeeOther"
+ // ServiceUnavailable ...
+ ServiceUnavailable HTTPStatusCode = "ServiceUnavailable"
+ // SwitchingProtocols ...
+ SwitchingProtocols HTTPStatusCode = "SwitchingProtocols"
+ // TemporaryRedirect ...
+ TemporaryRedirect HTTPStatusCode = "TemporaryRedirect"
+ // Unauthorized ...
+ Unauthorized HTTPStatusCode = "Unauthorized"
+ // UnsupportedMediaType ...
+ UnsupportedMediaType HTTPStatusCode = "UnsupportedMediaType"
+ // Unused ...
+ Unused HTTPStatusCode = "Unused"
+ // UpgradeRequired ...
+ UpgradeRequired HTTPStatusCode = "UpgradeRequired"
+ // UseProxy ...
+ UseProxy HTTPStatusCode = "UseProxy"
+)
+
+// PossibleHTTPStatusCodeValues returns an array of possible values for the HTTPStatusCode const type.
+func PossibleHTTPStatusCodeValues() []HTTPStatusCode {
+ return []HTTPStatusCode{Accepted, Ambiguous, BadGateway, BadRequest, Conflict, Continue, Created, ExpectationFailed, Forbidden, Found, GatewayTimeout, Gone, HTTPVersionNotSupported, InternalServerError, LengthRequired, MethodNotAllowed, Moved, MovedPermanently, MultipleChoices, NoContent, NonAuthoritativeInformation, NotAcceptable, NotFound, NotImplemented, NotModified, OK, PartialContent, PaymentRequired, PreconditionFailed, ProxyAuthenticationRequired, Redirect, RedirectKeepVerb, RedirectMethod, RequestedRangeNotSatisfiable, RequestEntityTooLarge, RequestTimeout, RequestURITooLong, ResetContent, SeeOther, ServiceUnavailable, SwitchingProtocols, TemporaryRedirect, Unauthorized, UnsupportedMediaType, Unused, UpgradeRequired, UseProxy}
+}
+
+// OperationStatus enumerates the values for operation status.
+type OperationStatus string
+
+const (
+ // Failed ...
+ Failed OperationStatus = "Failed"
+ // InProgress ...
+ InProgress OperationStatus = "InProgress"
+ // Succeeded ...
+ Succeeded OperationStatus = "Succeeded"
+)
+
+// PossibleOperationStatusValues returns an array of possible values for the OperationStatus const type.
+func PossibleOperationStatusValues() []OperationStatus {
+ return []OperationStatus{Failed, InProgress, Succeeded}
+}
+
+// RecordType enumerates the values for record type.
+type RecordType string
+
+const (
+ // A ...
+ A RecordType = "A"
+ // AAAA ...
+ AAAA RecordType = "AAAA"
+ // CNAME ...
+ CNAME RecordType = "CNAME"
+ // MX ...
+ MX RecordType = "MX"
+ // NS ...
+ NS RecordType = "NS"
+ // PTR ...
+ PTR RecordType = "PTR"
+ // SOA ...
+ SOA RecordType = "SOA"
+ // SRV ...
+ SRV RecordType = "SRV"
+ // TXT ...
+ TXT RecordType = "TXT"
+)
+
+// PossibleRecordTypeValues returns an array of possible values for the RecordType const type.
+func PossibleRecordTypeValues() []RecordType {
+ return []RecordType{A, AAAA, CNAME, MX, NS, PTR, SOA, SRV, TXT}
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/dns/mgmt/2016-04-01/dns/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/dns/mgmt/2016-04-01/dns/models.go
new file mode 100644
index 00000000000..d7b941ebd39
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/dns/mgmt/2016-04-01/dns/models.go
@@ -0,0 +1,835 @@
+package dns
+
+// Copyright (c) Microsoft and contributors. All rights reserved.
+//
+// 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 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/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/dns/mgmt/2016-04-01/dns"
+
+// AaaaRecord an AAAA record.
+type AaaaRecord struct {
+ // Ipv6Address - The IPv6 address of this AAAA record.
+ Ipv6Address *string `json:"ipv6Address,omitempty"`
+}
+
+// ARecord an A record.
+type ARecord struct {
+ // Ipv4Address - The IPv4 address of this A record.
+ Ipv4Address *string `json:"ipv4Address,omitempty"`
+}
+
+// AzureEntityResource the resource model definition for an Azure Resource Manager resource with an etag.
+type AzureEntityResource struct {
+ // Etag - READ-ONLY; Resource Etag.
+ Etag *string `json:"etag,omitempty"`
+ // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
+ ID *string `json:"id,omitempty"`
+ // Name - READ-ONLY; The name of the resource
+ Name *string `json:"name,omitempty"`
+ // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
+ Type *string `json:"type,omitempty"`
+}
+
+// CloudError an error response from the service.
+type CloudError struct {
+ // Error - Cloud error body.
+ Error *CloudErrorBody `json:"error,omitempty"`
+}
+
+// CloudErrorBody an error response from the 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"`
+}
+
+// CnameRecord a CNAME record.
+type CnameRecord struct {
+ // Cname - The canonical name for this CNAME record.
+ Cname *string `json:"cname,omitempty"`
+}
+
+// MxRecord an MX record.
+type MxRecord struct {
+ // Preference - The preference value for this MX record.
+ Preference *int32 `json:"preference,omitempty"`
+ // Exchange - The domain name of the mail host for this MX record.
+ Exchange *string `json:"exchange,omitempty"`
+}
+
+// NsRecord an NS record.
+type NsRecord struct {
+ // Nsdname - The name server name for this NS record.
+ Nsdname *string `json:"nsdname,omitempty"`
+}
+
+// ProxyResource the resource model definition for a Azure Resource Manager proxy resource. It will not
+// have tags and a location
+type ProxyResource struct {
+ // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
+ ID *string `json:"id,omitempty"`
+ // Name - READ-ONLY; The name of the resource
+ Name *string `json:"name,omitempty"`
+ // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
+ Type *string `json:"type,omitempty"`
+}
+
+// PtrRecord a PTR record.
+type PtrRecord struct {
+ // Ptrdname - The PTR target domain name for this PTR record.
+ Ptrdname *string `json:"ptrdname,omitempty"`
+}
+
+// RecordSet describes a DNS record set (a collection of DNS records with the same name and type).
+type RecordSet struct {
+ autorest.Response `json:"-"`
+ // ID - The ID of the record set.
+ ID *string `json:"id,omitempty"`
+ // Name - The name of the record set.
+ Name *string `json:"name,omitempty"`
+ // Type - The type of the record set.
+ Type *string `json:"type,omitempty"`
+ // Etag - The etag of the record set.
+ Etag *string `json:"etag,omitempty"`
+ // RecordSetProperties - The properties of the record set.
+ *RecordSetProperties `json:"properties,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for RecordSet.
+func (rs RecordSet) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if rs.ID != nil {
+ objectMap["id"] = rs.ID
+ }
+ if rs.Name != nil {
+ objectMap["name"] = rs.Name
+ }
+ if rs.Type != nil {
+ objectMap["type"] = rs.Type
+ }
+ if rs.Etag != nil {
+ objectMap["etag"] = rs.Etag
+ }
+ if rs.RecordSetProperties != nil {
+ objectMap["properties"] = rs.RecordSetProperties
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for RecordSet struct.
+func (rs *RecordSet) 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
+ }
+ rs.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ rs.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ rs.Type = &typeVar
+ }
+ case "etag":
+ if v != nil {
+ var etag string
+ err = json.Unmarshal(*v, &etag)
+ if err != nil {
+ return err
+ }
+ rs.Etag = &etag
+ }
+ case "properties":
+ if v != nil {
+ var recordSetProperties RecordSetProperties
+ err = json.Unmarshal(*v, &recordSetProperties)
+ if err != nil {
+ return err
+ }
+ rs.RecordSetProperties = &recordSetProperties
+ }
+ }
+ }
+
+ return nil
+}
+
+// RecordSetListResult the response to a record set List operation.
+type RecordSetListResult struct {
+ autorest.Response `json:"-"`
+ // Value - Information about the record sets in the response.
+ Value *[]RecordSet `json:"value,omitempty"`
+ // NextLink - The continuation token for the next page of results.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// RecordSetListResultIterator provides access to a complete listing of RecordSet values.
+type RecordSetListResultIterator struct {
+ i int
+ page RecordSetListResultPage
+}
+
+// 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 *RecordSetListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RecordSetListResultIterator.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 *RecordSetListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter RecordSetListResultIterator) 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 RecordSetListResultIterator) Response() RecordSetListResult {
+ 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 RecordSetListResultIterator) Value() RecordSet {
+ if !iter.page.NotDone() {
+ return RecordSet{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// Creates a new instance of the RecordSetListResultIterator type.
+func NewRecordSetListResultIterator(page RecordSetListResultPage) RecordSetListResultIterator {
+ return RecordSetListResultIterator{page: page}
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (rslr RecordSetListResult) IsEmpty() bool {
+ return rslr.Value == nil || len(*rslr.Value) == 0
+}
+
+// hasNextLink returns true if the NextLink is not empty.
+func (rslr RecordSetListResult) hasNextLink() bool {
+ return rslr.NextLink != nil && len(*rslr.NextLink) != 0
+}
+
+// recordSetListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (rslr RecordSetListResult) recordSetListResultPreparer(ctx context.Context) (*http.Request, error) {
+ if !rslr.hasNextLink() {
+ return nil, nil
+ }
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(rslr.NextLink)))
+}
+
+// RecordSetListResultPage contains a page of RecordSet values.
+type RecordSetListResultPage struct {
+ fn func(context.Context, RecordSetListResult) (RecordSetListResult, error)
+ rslr RecordSetListResult
+}
+
+// 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 *RecordSetListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RecordSetListResultPage.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.rslr)
+ if err != nil {
+ return err
+ }
+ page.rslr = 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 *RecordSetListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page RecordSetListResultPage) NotDone() bool {
+ return !page.rslr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page RecordSetListResultPage) Response() RecordSetListResult {
+ return page.rslr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page RecordSetListResultPage) Values() []RecordSet {
+ if page.rslr.IsEmpty() {
+ return nil
+ }
+ return *page.rslr.Value
+}
+
+// Creates a new instance of the RecordSetListResultPage type.
+func NewRecordSetListResultPage(cur RecordSetListResult, getNextPage func(context.Context, RecordSetListResult) (RecordSetListResult, error)) RecordSetListResultPage {
+ return RecordSetListResultPage{
+ fn: getNextPage,
+ rslr: cur,
+ }
+}
+
+// RecordSetProperties represents the properties of the records in the record set.
+type RecordSetProperties struct {
+ // Metadata - The metadata attached to the record set.
+ Metadata map[string]*string `json:"metadata"`
+ // TTL - The TTL (time-to-live) of the records in the record set.
+ TTL *int64 `json:"TTL,omitempty"`
+ // Fqdn - READ-ONLY; Fully qualified domain name of the record set.
+ Fqdn *string `json:"fqdn,omitempty"`
+ // ARecords - The list of A records in the record set.
+ ARecords *[]ARecord `json:"ARecords,omitempty"`
+ // AaaaRecords - The list of AAAA records in the record set.
+ AaaaRecords *[]AaaaRecord `json:"AAAARecords,omitempty"`
+ // MxRecords - The list of MX records in the record set.
+ MxRecords *[]MxRecord `json:"MXRecords,omitempty"`
+ // NsRecords - The list of NS records in the record set.
+ NsRecords *[]NsRecord `json:"NSRecords,omitempty"`
+ // PtrRecords - The list of PTR records in the record set.
+ PtrRecords *[]PtrRecord `json:"PTRRecords,omitempty"`
+ // SrvRecords - The list of SRV records in the record set.
+ SrvRecords *[]SrvRecord `json:"SRVRecords,omitempty"`
+ // TxtRecords - The list of TXT records in the record set.
+ TxtRecords *[]TxtRecord `json:"TXTRecords,omitempty"`
+ // CnameRecord - The CNAME record in the record set.
+ CnameRecord *CnameRecord `json:"CNAMERecord,omitempty"`
+ // SoaRecord - The SOA record in the record set.
+ SoaRecord *SoaRecord `json:"SOARecord,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for RecordSetProperties.
+func (rsp RecordSetProperties) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if rsp.Metadata != nil {
+ objectMap["metadata"] = rsp.Metadata
+ }
+ if rsp.TTL != nil {
+ objectMap["TTL"] = rsp.TTL
+ }
+ if rsp.ARecords != nil {
+ objectMap["ARecords"] = rsp.ARecords
+ }
+ if rsp.AaaaRecords != nil {
+ objectMap["AAAARecords"] = rsp.AaaaRecords
+ }
+ if rsp.MxRecords != nil {
+ objectMap["MXRecords"] = rsp.MxRecords
+ }
+ if rsp.NsRecords != nil {
+ objectMap["NSRecords"] = rsp.NsRecords
+ }
+ if rsp.PtrRecords != nil {
+ objectMap["PTRRecords"] = rsp.PtrRecords
+ }
+ if rsp.SrvRecords != nil {
+ objectMap["SRVRecords"] = rsp.SrvRecords
+ }
+ if rsp.TxtRecords != nil {
+ objectMap["TXTRecords"] = rsp.TxtRecords
+ }
+ if rsp.CnameRecord != nil {
+ objectMap["CNAMERecord"] = rsp.CnameRecord
+ }
+ if rsp.SoaRecord != nil {
+ objectMap["SOARecord"] = rsp.SoaRecord
+ }
+ return json.Marshal(objectMap)
+}
+
+// RecordSetUpdateParameters parameters supplied to update a record set.
+type RecordSetUpdateParameters struct {
+ // RecordSet - Specifies information about the record set being updated.
+ RecordSet *RecordSet `json:"RecordSet,omitempty"`
+}
+
+// Resource common fields that are returned in the response for all Azure Resource Manager resources
+type Resource struct {
+ // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
+ ID *string `json:"id,omitempty"`
+ // Name - READ-ONLY; The name of the resource
+ Name *string `json:"name,omitempty"`
+ // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
+ Type *string `json:"type,omitempty"`
+}
+
+// SoaRecord an SOA record.
+type SoaRecord struct {
+ // Host - The domain name of the authoritative name server for this SOA record.
+ Host *string `json:"host,omitempty"`
+ // Email - The email contact for this SOA record.
+ Email *string `json:"email,omitempty"`
+ // SerialNumber - The serial number for this SOA record.
+ SerialNumber *int64 `json:"serialNumber,omitempty"`
+ // RefreshTime - The refresh value for this SOA record.
+ RefreshTime *int64 `json:"refreshTime,omitempty"`
+ // RetryTime - The retry time for this SOA record.
+ RetryTime *int64 `json:"retryTime,omitempty"`
+ // ExpireTime - The expire time for this SOA record.
+ ExpireTime *int64 `json:"expireTime,omitempty"`
+ // MinimumTTL - The minimum value for this SOA record. By convention this is used to determine the negative caching duration.
+ MinimumTTL *int64 `json:"minimumTTL,omitempty"`
+}
+
+// SrvRecord an SRV record.
+type SrvRecord struct {
+ // Priority - The priority value for this SRV record.
+ Priority *int32 `json:"priority,omitempty"`
+ // Weight - The weight value for this SRV record.
+ Weight *int32 `json:"weight,omitempty"`
+ // Port - The port value for this SRV record.
+ Port *int32 `json:"port,omitempty"`
+ // Target - The target domain name for this SRV record.
+ Target *string `json:"target,omitempty"`
+}
+
+// SubResource ...
+type SubResource struct {
+ // ID - Resource Id.
+ ID *string `json:"id,omitempty"`
+}
+
+// TrackedResource the resource model definition for an Azure Resource Manager tracked top level resource
+// which has 'tags' and a 'location'
+type TrackedResource struct {
+ // Tags - Resource tags.
+ Tags map[string]*string `json:"tags"`
+ // Location - The geo-location where the resource lives
+ Location *string `json:"location,omitempty"`
+ // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
+ ID *string `json:"id,omitempty"`
+ // Name - READ-ONLY; The name of the resource
+ Name *string `json:"name,omitempty"`
+ // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
+ Type *string `json:"type,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for TrackedResource.
+func (tr TrackedResource) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if tr.Tags != nil {
+ objectMap["tags"] = tr.Tags
+ }
+ if tr.Location != nil {
+ objectMap["location"] = tr.Location
+ }
+ return json.Marshal(objectMap)
+}
+
+// TxtRecord a TXT record.
+type TxtRecord struct {
+ // Value - The text value of this TXT record.
+ Value *[]string `json:"value,omitempty"`
+}
+
+// Zone describes a DNS zone.
+type Zone struct {
+ autorest.Response `json:"-"`
+ // Etag - The etag of the zone.
+ Etag *string `json:"etag,omitempty"`
+ // ZoneProperties - The properties of the zone.
+ *ZoneProperties `json:"properties,omitempty"`
+ // Tags - Resource tags.
+ Tags map[string]*string `json:"tags"`
+ // Location - The geo-location where the resource lives
+ Location *string `json:"location,omitempty"`
+ // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
+ ID *string `json:"id,omitempty"`
+ // Name - READ-ONLY; The name of the resource
+ Name *string `json:"name,omitempty"`
+ // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
+ Type *string `json:"type,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for Zone.
+func (z Zone) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if z.Etag != nil {
+ objectMap["etag"] = z.Etag
+ }
+ if z.ZoneProperties != nil {
+ objectMap["properties"] = z.ZoneProperties
+ }
+ if z.Tags != nil {
+ objectMap["tags"] = z.Tags
+ }
+ if z.Location != nil {
+ objectMap["location"] = z.Location
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for Zone struct.
+func (z *Zone) 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 "etag":
+ if v != nil {
+ var etag string
+ err = json.Unmarshal(*v, &etag)
+ if err != nil {
+ return err
+ }
+ z.Etag = &etag
+ }
+ case "properties":
+ if v != nil {
+ var zoneProperties ZoneProperties
+ err = json.Unmarshal(*v, &zoneProperties)
+ if err != nil {
+ return err
+ }
+ z.ZoneProperties = &zoneProperties
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ z.Tags = tags
+ }
+ case "location":
+ if v != nil {
+ var location string
+ err = json.Unmarshal(*v, &location)
+ if err != nil {
+ return err
+ }
+ z.Location = &location
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ z.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ z.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ z.Type = &typeVar
+ }
+ }
+ }
+
+ return nil
+}
+
+// ZoneDeleteResult the response to a Zone Delete operation.
+type ZoneDeleteResult struct {
+ autorest.Response `json:"-"`
+ // AzureAsyncOperation - Users can perform a Get on Azure-AsyncOperation to get the status of their delete Zone operations.
+ AzureAsyncOperation *string `json:"azureAsyncOperation,omitempty"`
+ // Status - Possible values include: 'InProgress', 'Succeeded', 'Failed'
+ Status OperationStatus `json:"status,omitempty"`
+ // StatusCode - Possible values include: 'Continue', 'SwitchingProtocols', 'OK', 'Created', 'Accepted', 'NonAuthoritativeInformation', 'NoContent', 'ResetContent', 'PartialContent', 'MultipleChoices', 'Ambiguous', 'MovedPermanently', 'Moved', 'Found', 'Redirect', 'SeeOther', 'RedirectMethod', 'NotModified', 'UseProxy', 'Unused', 'TemporaryRedirect', 'RedirectKeepVerb', 'BadRequest', 'Unauthorized', 'PaymentRequired', 'Forbidden', 'NotFound', 'MethodNotAllowed', 'NotAcceptable', 'ProxyAuthenticationRequired', 'RequestTimeout', 'Conflict', 'Gone', 'LengthRequired', 'PreconditionFailed', 'RequestEntityTooLarge', 'RequestURITooLong', 'UnsupportedMediaType', 'RequestedRangeNotSatisfiable', 'ExpectationFailed', 'UpgradeRequired', 'InternalServerError', 'NotImplemented', 'BadGateway', 'ServiceUnavailable', 'GatewayTimeout', 'HTTPVersionNotSupported'
+ StatusCode HTTPStatusCode `json:"statusCode,omitempty"`
+ RequestID *string `json:"requestId,omitempty"`
+}
+
+// ZoneListResult the response to a Zone List or ListAll operation.
+type ZoneListResult struct {
+ autorest.Response `json:"-"`
+ // Value - Information about the DNS zones.
+ Value *[]Zone `json:"value,omitempty"`
+ // NextLink - The continuation token for the next page of results.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// ZoneListResultIterator provides access to a complete listing of Zone values.
+type ZoneListResultIterator struct {
+ i int
+ page ZoneListResultPage
+}
+
+// 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 *ZoneListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ZoneListResultIterator.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 *ZoneListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter ZoneListResultIterator) 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 ZoneListResultIterator) Response() ZoneListResult {
+ 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 ZoneListResultIterator) Value() Zone {
+ if !iter.page.NotDone() {
+ return Zone{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// Creates a new instance of the ZoneListResultIterator type.
+func NewZoneListResultIterator(page ZoneListResultPage) ZoneListResultIterator {
+ return ZoneListResultIterator{page: page}
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (zlr ZoneListResult) IsEmpty() bool {
+ return zlr.Value == nil || len(*zlr.Value) == 0
+}
+
+// hasNextLink returns true if the NextLink is not empty.
+func (zlr ZoneListResult) hasNextLink() bool {
+ return zlr.NextLink != nil && len(*zlr.NextLink) != 0
+}
+
+// zoneListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (zlr ZoneListResult) zoneListResultPreparer(ctx context.Context) (*http.Request, error) {
+ if !zlr.hasNextLink() {
+ return nil, nil
+ }
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(zlr.NextLink)))
+}
+
+// ZoneListResultPage contains a page of Zone values.
+type ZoneListResultPage struct {
+ fn func(context.Context, ZoneListResult) (ZoneListResult, error)
+ zlr ZoneListResult
+}
+
+// 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 *ZoneListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ZoneListResultPage.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.zlr)
+ if err != nil {
+ return err
+ }
+ page.zlr = 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 *ZoneListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page ZoneListResultPage) NotDone() bool {
+ return !page.zlr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page ZoneListResultPage) Response() ZoneListResult {
+ return page.zlr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page ZoneListResultPage) Values() []Zone {
+ if page.zlr.IsEmpty() {
+ return nil
+ }
+ return *page.zlr.Value
+}
+
+// Creates a new instance of the ZoneListResultPage type.
+func NewZoneListResultPage(cur ZoneListResult, getNextPage func(context.Context, ZoneListResult) (ZoneListResult, error)) ZoneListResultPage {
+ return ZoneListResultPage{
+ fn: getNextPage,
+ zlr: cur,
+ }
+}
+
+// ZoneProperties represents the properties of the zone.
+type ZoneProperties struct {
+ // MaxNumberOfRecordSets - The maximum number of record sets that can be created in this DNS zone. This is a read-only property and any attempt to set this value will be ignored.
+ MaxNumberOfRecordSets *int64 `json:"maxNumberOfRecordSets,omitempty"`
+ // MaxNumberOfRecordsPerRecordSet - READ-ONLY; The maximum number of records per record set that can be created in this DNS zone. This is a read-only property and any attempt to set this value will be ignored.
+ MaxNumberOfRecordsPerRecordSet *int64 `json:"maxNumberOfRecordsPerRecordSet,omitempty"`
+ // NumberOfRecordSets - The current number of record sets in this DNS zone. This is a read-only property and any attempt to set this value will be ignored.
+ NumberOfRecordSets *int64 `json:"numberOfRecordSets,omitempty"`
+ // NameServers - READ-ONLY; The name servers for this DNS zone. This is a read-only property and any attempt to set this value will be ignored.
+ NameServers *[]string `json:"nameServers,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for ZoneProperties.
+func (zp ZoneProperties) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if zp.MaxNumberOfRecordSets != nil {
+ objectMap["maxNumberOfRecordSets"] = zp.MaxNumberOfRecordSets
+ }
+ if zp.NumberOfRecordSets != nil {
+ objectMap["numberOfRecordSets"] = zp.NumberOfRecordSets
+ }
+ return json.Marshal(objectMap)
+}
+
+// ZonesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+type ZonesDeleteFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(ZonesClient) (ZoneDeleteResult, error)
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/dns/mgmt/2016-04-01/dns/recordsets.go b/vendor/github.com/Azure/azure-sdk-for-go/services/dns/mgmt/2016-04-01/dns/recordsets.go
new file mode 100644
index 00000000000..2f93155cb35
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/dns/mgmt/2016-04-01/dns/recordsets.go
@@ -0,0 +1,712 @@
+package dns
+
+// Copyright (c) Microsoft and contributors. All rights reserved.
+//
+// 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 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"
+)
+
+// RecordSetsClient is the the DNS Management Client.
+type RecordSetsClient struct {
+ BaseClient
+}
+
+// NewRecordSetsClient creates an instance of the RecordSetsClient client.
+func NewRecordSetsClient(subscriptionID string) RecordSetsClient {
+ return NewRecordSetsClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewRecordSetsClientWithBaseURI creates an instance of the RecordSetsClient 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 NewRecordSetsClientWithBaseURI(baseURI string, subscriptionID string) RecordSetsClient {
+ return RecordSetsClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// CreateOrUpdate creates or updates a record set within a DNS zone.
+// Parameters:
+// resourceGroupName - the name of the resource group. The name is case insensitive.
+// zoneName - the name of the DNS zone (without a terminating dot).
+// relativeRecordSetName - the name of the record set, relative to the name of the zone.
+// recordType - the type of DNS record in this record set. Record sets of type SOA can be updated but not
+// created (they are created when the DNS zone is created).
+// parameters - parameters supplied to the CreateOrUpdate operation.
+// ifMatch - the etag of the record set. Omit this value to always overwrite the current record set. Specify
+// the last-seen etag value to prevent accidentally overwriting any concurrent changes.
+// ifNoneMatch - set to '*' to allow a new record set to be created, but to prevent updating an existing record
+// set. Other values will be ignored.
+func (client RecordSetsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, zoneName string, relativeRecordSetName string, recordType RecordType, parameters RecordSet, ifMatch string, ifNoneMatch string) (result RecordSet, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RecordSetsClient.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.MaxLength, Rule: 90, Chain: nil},
+ {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
+ {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}},
+ {TargetValue: client.SubscriptionID,
+ Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("dns.RecordSetsClient", "CreateOrUpdate", err.Error())
+ }
+
+ req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, zoneName, relativeRecordSetName, recordType, parameters, ifMatch, ifNoneMatch)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "dns.RecordSetsClient", "CreateOrUpdate", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.CreateOrUpdateSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "dns.RecordSetsClient", "CreateOrUpdate", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.CreateOrUpdateResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "dns.RecordSetsClient", "CreateOrUpdate", resp, "Failure responding to request")
+ return
+ }
+
+ return
+}
+
+// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
+func (client RecordSetsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, zoneName string, relativeRecordSetName string, recordType RecordType, parameters RecordSet, ifMatch string, ifNoneMatch string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "recordType": autorest.Encode("path", recordType),
+ "relativeRecordSetName": relativeRecordSetName,
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "zoneName": autorest.Encode("path", zoneName),
+ }
+
+ const APIVersion = "2016-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.Network/dnsZones/{zoneName}/{recordType}/{relativeRecordSetName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ if len(ifMatch) > 0 {
+ preparer = autorest.DecoratePreparer(preparer,
+ autorest.WithHeader("If-Match", autorest.String(ifMatch)))
+ }
+ if len(ifNoneMatch) > 0 {
+ preparer = autorest.DecoratePreparer(preparer,
+ autorest.WithHeader("If-None-Match", autorest.String(ifNoneMatch)))
+ }
+ 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 RecordSetsClient) 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 RecordSetsClient) CreateOrUpdateResponder(resp *http.Response) (result RecordSet, 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 record set from a DNS zone. This operation cannot be undone.
+// Parameters:
+// resourceGroupName - the name of the resource group. The name is case insensitive.
+// zoneName - the name of the DNS zone (without a terminating dot).
+// relativeRecordSetName - the name of the record set, relative to the name of the zone.
+// recordType - the type of DNS record in this record set. Record sets of type SOA cannot be deleted (they are
+// deleted when the DNS zone is deleted).
+// ifMatch - the etag of the record set. Omit this value to always delete the current record set. Specify the
+// last-seen etag value to prevent accidentally deleting any concurrent changes.
+func (client RecordSetsClient) Delete(ctx context.Context, resourceGroupName string, zoneName string, relativeRecordSetName string, recordType RecordType, ifMatch string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RecordSetsClient.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.MaxLength, Rule: 90, Chain: nil},
+ {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
+ {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}},
+ {TargetValue: client.SubscriptionID,
+ Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("dns.RecordSetsClient", "Delete", err.Error())
+ }
+
+ req, err := client.DeletePreparer(ctx, resourceGroupName, zoneName, relativeRecordSetName, recordType, ifMatch)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "dns.RecordSetsClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.DeleteSender(req)
+ if err != nil {
+ result.Response = resp
+ err = autorest.NewErrorWithError(err, "dns.RecordSetsClient", "Delete", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.DeleteResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "dns.RecordSetsClient", "Delete", resp, "Failure responding to request")
+ return
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client RecordSetsClient) DeletePreparer(ctx context.Context, resourceGroupName string, zoneName string, relativeRecordSetName string, recordType RecordType, ifMatch string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "recordType": autorest.Encode("path", recordType),
+ "relativeRecordSetName": relativeRecordSetName,
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "zoneName": autorest.Encode("path", zoneName),
+ }
+
+ const APIVersion = "2016-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.Network/dnsZones/{zoneName}/{recordType}/{relativeRecordSetName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ if len(ifMatch) > 0 {
+ preparer = autorest.DecoratePreparer(preparer,
+ autorest.WithHeader("If-Match", autorest.String(ifMatch)))
+ }
+ 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 RecordSetsClient) 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 RecordSetsClient) 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 gets a record set.
+// Parameters:
+// resourceGroupName - the name of the resource group. The name is case insensitive.
+// zoneName - the name of the DNS zone (without a terminating dot).
+// relativeRecordSetName - the name of the record set, relative to the name of the zone.
+// recordType - the type of DNS record in this record set.
+func (client RecordSetsClient) Get(ctx context.Context, resourceGroupName string, zoneName string, relativeRecordSetName string, recordType RecordType) (result RecordSet, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RecordSetsClient.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.MaxLength, Rule: 90, Chain: nil},
+ {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
+ {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}},
+ {TargetValue: client.SubscriptionID,
+ Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("dns.RecordSetsClient", "Get", err.Error())
+ }
+
+ req, err := client.GetPreparer(ctx, resourceGroupName, zoneName, relativeRecordSetName, recordType)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "dns.RecordSetsClient", "Get", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "dns.RecordSetsClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "dns.RecordSetsClient", "Get", resp, "Failure responding to request")
+ return
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client RecordSetsClient) GetPreparer(ctx context.Context, resourceGroupName string, zoneName string, relativeRecordSetName string, recordType RecordType) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "recordType": autorest.Encode("path", recordType),
+ "relativeRecordSetName": relativeRecordSetName,
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "zoneName": autorest.Encode("path", zoneName),
+ }
+
+ const APIVersion = "2016-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.Network/dnsZones/{zoneName}/{recordType}/{relativeRecordSetName}", 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 RecordSetsClient) 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 RecordSetsClient) GetResponder(resp *http.Response) (result RecordSet, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// ListByDNSZone lists all record sets in a DNS zone.
+// Parameters:
+// resourceGroupName - the name of the resource group. The name is case insensitive.
+// zoneName - the name of the DNS zone (without a terminating dot).
+// top - the maximum number of record sets to return. If not specified, returns up to 100 record sets.
+// recordsetnamesuffix - the suffix label of the record set name that has to be used to filter the record set
+// enumerations. If this parameter is specified, Enumeration will return only records that end with
+// .
+func (client RecordSetsClient) ListByDNSZone(ctx context.Context, resourceGroupName string, zoneName string, top *int32, recordsetnamesuffix string) (result RecordSetListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RecordSetsClient.ListByDNSZone")
+ defer func() {
+ sc := -1
+ if result.rslr.Response.Response != nil {
+ sc = result.rslr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: resourceGroupName,
+ Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
+ {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
+ {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}},
+ {TargetValue: client.SubscriptionID,
+ Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("dns.RecordSetsClient", "ListByDNSZone", err.Error())
+ }
+
+ result.fn = client.listByDNSZoneNextResults
+ req, err := client.ListByDNSZonePreparer(ctx, resourceGroupName, zoneName, top, recordsetnamesuffix)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "dns.RecordSetsClient", "ListByDNSZone", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListByDNSZoneSender(req)
+ if err != nil {
+ result.rslr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "dns.RecordSetsClient", "ListByDNSZone", resp, "Failure sending request")
+ return
+ }
+
+ result.rslr, err = client.ListByDNSZoneResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "dns.RecordSetsClient", "ListByDNSZone", resp, "Failure responding to request")
+ return
+ }
+ if result.rslr.hasNextLink() && result.rslr.IsEmpty() {
+ err = result.NextWithContext(ctx)
+ return
+ }
+
+ return
+}
+
+// ListByDNSZonePreparer prepares the ListByDNSZone request.
+func (client RecordSetsClient) ListByDNSZonePreparer(ctx context.Context, resourceGroupName string, zoneName string, top *int32, recordsetnamesuffix string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "zoneName": autorest.Encode("path", zoneName),
+ }
+
+ const APIVersion = "2016-04-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if top != nil {
+ queryParameters["$top"] = autorest.Encode("query", *top)
+ }
+ if len(recordsetnamesuffix) > 0 {
+ queryParameters["$recordsetnamesuffix"] = autorest.Encode("query", recordsetnamesuffix)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/recordsets", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListByDNSZoneSender sends the ListByDNSZone request. The method will close the
+// http.Response Body if it receives an error.
+func (client RecordSetsClient) ListByDNSZoneSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListByDNSZoneResponder handles the response to the ListByDNSZone request. The method always
+// closes the http.Response Body.
+func (client RecordSetsClient) ListByDNSZoneResponder(resp *http.Response) (result RecordSetListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listByDNSZoneNextResults retrieves the next set of results, if any.
+func (client RecordSetsClient) listByDNSZoneNextResults(ctx context.Context, lastResults RecordSetListResult) (result RecordSetListResult, err error) {
+ req, err := lastResults.recordSetListResultPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "dns.RecordSetsClient", "listByDNSZoneNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListByDNSZoneSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "dns.RecordSetsClient", "listByDNSZoneNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListByDNSZoneResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "dns.RecordSetsClient", "listByDNSZoneNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListByDNSZoneComplete enumerates all values, automatically crossing page boundaries as required.
+func (client RecordSetsClient) ListByDNSZoneComplete(ctx context.Context, resourceGroupName string, zoneName string, top *int32, recordsetnamesuffix string) (result RecordSetListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RecordSetsClient.ListByDNSZone")
+ 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.ListByDNSZone(ctx, resourceGroupName, zoneName, top, recordsetnamesuffix)
+ return
+}
+
+// ListByType lists the record sets of a specified type in a DNS zone.
+// Parameters:
+// resourceGroupName - the name of the resource group. The name is case insensitive.
+// zoneName - the name of the DNS zone (without a terminating dot).
+// recordType - the type of record sets to enumerate.
+// top - the maximum number of record sets to return. If not specified, returns up to 100 record sets.
+// recordsetnamesuffix - the suffix label of the record set name that has to be used to filter the record set
+// enumerations. If this parameter is specified, Enumeration will return only records that end with
+// .
+func (client RecordSetsClient) ListByType(ctx context.Context, resourceGroupName string, zoneName string, recordType RecordType, top *int32, recordsetnamesuffix string) (result RecordSetListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RecordSetsClient.ListByType")
+ defer func() {
+ sc := -1
+ if result.rslr.Response.Response != nil {
+ sc = result.rslr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: resourceGroupName,
+ Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
+ {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
+ {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}},
+ {TargetValue: client.SubscriptionID,
+ Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("dns.RecordSetsClient", "ListByType", err.Error())
+ }
+
+ result.fn = client.listByTypeNextResults
+ req, err := client.ListByTypePreparer(ctx, resourceGroupName, zoneName, recordType, top, recordsetnamesuffix)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "dns.RecordSetsClient", "ListByType", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListByTypeSender(req)
+ if err != nil {
+ result.rslr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "dns.RecordSetsClient", "ListByType", resp, "Failure sending request")
+ return
+ }
+
+ result.rslr, err = client.ListByTypeResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "dns.RecordSetsClient", "ListByType", resp, "Failure responding to request")
+ return
+ }
+ if result.rslr.hasNextLink() && result.rslr.IsEmpty() {
+ err = result.NextWithContext(ctx)
+ return
+ }
+
+ return
+}
+
+// ListByTypePreparer prepares the ListByType request.
+func (client RecordSetsClient) ListByTypePreparer(ctx context.Context, resourceGroupName string, zoneName string, recordType RecordType, top *int32, recordsetnamesuffix string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "recordType": autorest.Encode("path", recordType),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "zoneName": autorest.Encode("path", zoneName),
+ }
+
+ const APIVersion = "2016-04-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if top != nil {
+ queryParameters["$top"] = autorest.Encode("query", *top)
+ }
+ if len(recordsetnamesuffix) > 0 {
+ queryParameters["$recordsetnamesuffix"] = autorest.Encode("query", recordsetnamesuffix)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/{recordType}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListByTypeSender sends the ListByType request. The method will close the
+// http.Response Body if it receives an error.
+func (client RecordSetsClient) ListByTypeSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListByTypeResponder handles the response to the ListByType request. The method always
+// closes the http.Response Body.
+func (client RecordSetsClient) ListByTypeResponder(resp *http.Response) (result RecordSetListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listByTypeNextResults retrieves the next set of results, if any.
+func (client RecordSetsClient) listByTypeNextResults(ctx context.Context, lastResults RecordSetListResult) (result RecordSetListResult, err error) {
+ req, err := lastResults.recordSetListResultPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "dns.RecordSetsClient", "listByTypeNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListByTypeSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "dns.RecordSetsClient", "listByTypeNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListByTypeResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "dns.RecordSetsClient", "listByTypeNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListByTypeComplete enumerates all values, automatically crossing page boundaries as required.
+func (client RecordSetsClient) ListByTypeComplete(ctx context.Context, resourceGroupName string, zoneName string, recordType RecordType, top *int32, recordsetnamesuffix string) (result RecordSetListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RecordSetsClient.ListByType")
+ 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.ListByType(ctx, resourceGroupName, zoneName, recordType, top, recordsetnamesuffix)
+ return
+}
+
+// Update updates a record set within a DNS zone.
+// Parameters:
+// resourceGroupName - the name of the resource group. The name is case insensitive.
+// zoneName - the name of the DNS zone (without a terminating dot).
+// relativeRecordSetName - the name of the record set, relative to the name of the zone.
+// recordType - the type of DNS record in this record set.
+// parameters - parameters supplied to the Update operation.
+// ifMatch - the etag of the record set. Omit this value to always overwrite the current record set. Specify
+// the last-seen etag value to prevent accidentally overwriting concurrent changes.
+func (client RecordSetsClient) Update(ctx context.Context, resourceGroupName string, zoneName string, relativeRecordSetName string, recordType RecordType, parameters RecordSet, ifMatch string) (result RecordSet, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RecordSetsClient.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.MaxLength, Rule: 90, Chain: nil},
+ {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
+ {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}},
+ {TargetValue: client.SubscriptionID,
+ Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("dns.RecordSetsClient", "Update", err.Error())
+ }
+
+ req, err := client.UpdatePreparer(ctx, resourceGroupName, zoneName, relativeRecordSetName, recordType, parameters, ifMatch)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "dns.RecordSetsClient", "Update", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.UpdateSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "dns.RecordSetsClient", "Update", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.UpdateResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "dns.RecordSetsClient", "Update", resp, "Failure responding to request")
+ return
+ }
+
+ return
+}
+
+// UpdatePreparer prepares the Update request.
+func (client RecordSetsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, zoneName string, relativeRecordSetName string, recordType RecordType, parameters RecordSet, ifMatch string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "recordType": autorest.Encode("path", recordType),
+ "relativeRecordSetName": relativeRecordSetName,
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "zoneName": autorest.Encode("path", zoneName),
+ }
+
+ const APIVersion = "2016-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.Network/dnsZones/{zoneName}/{recordType}/{relativeRecordSetName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ if len(ifMatch) > 0 {
+ preparer = autorest.DecoratePreparer(preparer,
+ autorest.WithHeader("If-Match", autorest.String(ifMatch)))
+ }
+ 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 RecordSetsClient) 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 RecordSetsClient) UpdateResponder(resp *http.Response) (result RecordSet, 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/vendor/github.com/Azure/azure-sdk-for-go/services/dns/mgmt/2016-04-01/dns/version.go b/vendor/github.com/Azure/azure-sdk-for-go/services/dns/mgmt/2016-04-01/dns/version.go
new file mode 100644
index 00000000000..182605aa0cd
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/dns/mgmt/2016-04-01/dns/version.go
@@ -0,0 +1,30 @@
+package dns
+
+import "github.com/Azure/azure-sdk-for-go/version"
+
+// Copyright (c) Microsoft and contributors. All rights reserved.
+//
+// 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 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() + " dns/2016-04-01"
+}
+
+// Version returns the semantic version (see http://semver.org) of the client.
+func Version() string {
+ return version.Number
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/dns/mgmt/2016-04-01/dns/zones.go b/vendor/github.com/Azure/azure-sdk-for-go/services/dns/mgmt/2016-04-01/dns/zones.go
new file mode 100644
index 00000000000..5e99db3eb0b
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/dns/mgmt/2016-04-01/dns/zones.go
@@ -0,0 +1,602 @@
+package dns
+
+// Copyright (c) Microsoft and contributors. All rights reserved.
+//
+// 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 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"
+)
+
+// ZonesClient is the the DNS Management Client.
+type ZonesClient struct {
+ BaseClient
+}
+
+// NewZonesClient creates an instance of the ZonesClient client.
+func NewZonesClient(subscriptionID string) ZonesClient {
+ return NewZonesClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewZonesClientWithBaseURI creates an instance of the ZonesClient 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 NewZonesClientWithBaseURI(baseURI string, subscriptionID string) ZonesClient {
+ return ZonesClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// CreateOrUpdate creates or updates a DNS zone. Does not modify DNS records within the zone.
+// Parameters:
+// resourceGroupName - the name of the resource group. The name is case insensitive.
+// zoneName - the name of the DNS zone (without a terminating dot).
+// parameters - parameters supplied to the CreateOrUpdate operation.
+// ifMatch - the etag of the DNS zone. Omit this value to always overwrite the current zone. Specify the
+// last-seen etag value to prevent accidentally overwriting any concurrent changes.
+// ifNoneMatch - set to '*' to allow a new DNS zone to be created, but to prevent updating an existing zone.
+// Other values will be ignored.
+func (client ZonesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, zoneName string, parameters Zone, ifMatch string, ifNoneMatch string) (result Zone, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ZonesClient.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.MaxLength, Rule: 90, Chain: nil},
+ {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
+ {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}},
+ {TargetValue: client.SubscriptionID,
+ Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("dns.ZonesClient", "CreateOrUpdate", err.Error())
+ }
+
+ req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, zoneName, parameters, ifMatch, ifNoneMatch)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "dns.ZonesClient", "CreateOrUpdate", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.CreateOrUpdateSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "dns.ZonesClient", "CreateOrUpdate", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.CreateOrUpdateResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "dns.ZonesClient", "CreateOrUpdate", resp, "Failure responding to request")
+ return
+ }
+
+ return
+}
+
+// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
+func (client ZonesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, zoneName string, parameters Zone, ifMatch string, ifNoneMatch string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "zoneName": autorest.Encode("path", zoneName),
+ }
+
+ const APIVersion = "2016-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.Network/dnsZones/{zoneName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ if len(ifMatch) > 0 {
+ preparer = autorest.DecoratePreparer(preparer,
+ autorest.WithHeader("If-Match", autorest.String(ifMatch)))
+ }
+ if len(ifNoneMatch) > 0 {
+ preparer = autorest.DecoratePreparer(preparer,
+ autorest.WithHeader("If-None-Match", autorest.String(ifNoneMatch)))
+ }
+ 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 ZonesClient) 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 ZonesClient) CreateOrUpdateResponder(resp *http.Response) (result Zone, 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 DNS zone. WARNING: All DNS records in the zone will also be deleted. This operation cannot be
+// undone.
+// Parameters:
+// resourceGroupName - the name of the resource group. The name is case insensitive.
+// zoneName - the name of the DNS zone (without a terminating dot).
+// ifMatch - the etag of the DNS zone. Omit this value to always delete the current zone. Specify the last-seen
+// etag value to prevent accidentally deleting any concurrent changes.
+func (client ZonesClient) Delete(ctx context.Context, resourceGroupName string, zoneName string, ifMatch string) (result ZonesDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ZonesClient.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.MaxLength, Rule: 90, Chain: nil},
+ {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
+ {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}},
+ {TargetValue: client.SubscriptionID,
+ Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("dns.ZonesClient", "Delete", err.Error())
+ }
+
+ req, err := client.DeletePreparer(ctx, resourceGroupName, zoneName, ifMatch)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "dns.ZonesClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.DeleteSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "dns.ZonesClient", "Delete", nil, "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client ZonesClient) DeletePreparer(ctx context.Context, resourceGroupName string, zoneName string, ifMatch string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "zoneName": autorest.Encode("path", zoneName),
+ }
+
+ const APIVersion = "2016-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.Network/dnsZones/{zoneName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ if len(ifMatch) > 0 {
+ preparer = autorest.DecoratePreparer(preparer,
+ autorest.WithHeader("If-Match", autorest.String(ifMatch)))
+ }
+ 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 ZonesClient) DeleteSender(req *http.Request) (future ZonesDeleteFuture, err error) {
+ var resp *http.Response
+ 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 = func(client ZonesClient) (zdr ZoneDeleteResult, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "dns.ZonesDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("dns.ZonesDeleteFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ zdr.Response.Response, err = future.GetResult(sender)
+ if zdr.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "dns.ZonesDeleteFuture", "Result", nil, "received nil response and error")
+ }
+ if err == nil && zdr.Response.Response.StatusCode != http.StatusNoContent {
+ zdr, err = client.DeleteResponder(zdr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "dns.ZonesDeleteFuture", "Result", zdr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+ }
+ return
+}
+
+// DeleteResponder handles the response to the Delete request. The method always
+// closes the http.Response Body.
+func (client ZonesClient) DeleteResponder(resp *http.Response) (result ZoneDeleteResult, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// Get gets a DNS zone. Retrieves the zone properties, but not the record sets within the zone.
+// Parameters:
+// resourceGroupName - the name of the resource group. The name is case insensitive.
+// zoneName - the name of the DNS zone (without a terminating dot).
+func (client ZonesClient) Get(ctx context.Context, resourceGroupName string, zoneName string) (result Zone, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ZonesClient.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.MaxLength, Rule: 90, Chain: nil},
+ {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
+ {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}},
+ {TargetValue: client.SubscriptionID,
+ Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("dns.ZonesClient", "Get", err.Error())
+ }
+
+ req, err := client.GetPreparer(ctx, resourceGroupName, zoneName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "dns.ZonesClient", "Get", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "dns.ZonesClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "dns.ZonesClient", "Get", resp, "Failure responding to request")
+ return
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client ZonesClient) GetPreparer(ctx context.Context, resourceGroupName string, zoneName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "zoneName": autorest.Encode("path", zoneName),
+ }
+
+ const APIVersion = "2016-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.Network/dnsZones/{zoneName}", 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 ZonesClient) 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 ZonesClient) GetResponder(resp *http.Response) (result Zone, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// List lists the DNS zones in all resource groups in a subscription.
+// Parameters:
+// top - the maximum number of DNS zones to return. If not specified, returns up to 100 zones.
+func (client ZonesClient) List(ctx context.Context, top *int32) (result ZoneListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ZonesClient.List")
+ defer func() {
+ sc := -1
+ if result.zlr.Response.Response != nil {
+ sc = result.zlr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: client.SubscriptionID,
+ Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("dns.ZonesClient", "List", err.Error())
+ }
+
+ result.fn = client.listNextResults
+ req, err := client.ListPreparer(ctx, top)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "dns.ZonesClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.zlr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "dns.ZonesClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result.zlr, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "dns.ZonesClient", "List", resp, "Failure responding to request")
+ return
+ }
+ if result.zlr.hasNextLink() && result.zlr.IsEmpty() {
+ err = result.NextWithContext(ctx)
+ return
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client ZonesClient) ListPreparer(ctx context.Context, top *int32) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2016-04-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if top != nil {
+ queryParameters["$top"] = autorest.Encode("query", *top)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/dnszones", 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 ZonesClient) 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 ZonesClient) ListResponder(resp *http.Response) (result ZoneListResult, 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 ZonesClient) listNextResults(ctx context.Context, lastResults ZoneListResult) (result ZoneListResult, err error) {
+ req, err := lastResults.zoneListResultPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "dns.ZonesClient", "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, "dns.ZonesClient", "listNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "dns.ZonesClient", "listNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListComplete enumerates all values, automatically crossing page boundaries as required.
+func (client ZonesClient) ListComplete(ctx context.Context, top *int32) (result ZoneListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ZonesClient.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, top)
+ return
+}
+
+// ListByResourceGroup lists the DNS zones within a resource group.
+// Parameters:
+// resourceGroupName - the name of the resource group. The name is case insensitive.
+// top - the maximum number of record sets to return. If not specified, returns up to 100 record sets.
+func (client ZonesClient) ListByResourceGroup(ctx context.Context, resourceGroupName string, top *int32) (result ZoneListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ZonesClient.ListByResourceGroup")
+ defer func() {
+ sc := -1
+ if result.zlr.Response.Response != nil {
+ sc = result.zlr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: resourceGroupName,
+ Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
+ {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
+ {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}},
+ {TargetValue: client.SubscriptionID,
+ Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("dns.ZonesClient", "ListByResourceGroup", err.Error())
+ }
+
+ result.fn = client.listByResourceGroupNextResults
+ req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName, top)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "dns.ZonesClient", "ListByResourceGroup", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListByResourceGroupSender(req)
+ if err != nil {
+ result.zlr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "dns.ZonesClient", "ListByResourceGroup", resp, "Failure sending request")
+ return
+ }
+
+ result.zlr, err = client.ListByResourceGroupResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "dns.ZonesClient", "ListByResourceGroup", resp, "Failure responding to request")
+ return
+ }
+ if result.zlr.hasNextLink() && result.zlr.IsEmpty() {
+ err = result.NextWithContext(ctx)
+ return
+ }
+
+ return
+}
+
+// ListByResourceGroupPreparer prepares the ListByResourceGroup request.
+func (client ZonesClient) ListByResourceGroupPreparer(ctx context.Context, resourceGroupName string, top *int32) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2016-04-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if top != nil {
+ queryParameters["$top"] = autorest.Encode("query", *top)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones", 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 ZonesClient) 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 ZonesClient) ListByResourceGroupResponder(resp *http.Response) (result ZoneListResult, 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 ZonesClient) listByResourceGroupNextResults(ctx context.Context, lastResults ZoneListResult) (result ZoneListResult, err error) {
+ req, err := lastResults.zoneListResultPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "dns.ZonesClient", "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, "dns.ZonesClient", "listByResourceGroupNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListByResourceGroupResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "dns.ZonesClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required.
+func (client ZonesClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, top *int32) (result ZoneListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ZonesClient.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, top)
+ return
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/dns/mgmt/2018-05-01/dns/CHANGELOG.md b/vendor/github.com/Azure/azure-sdk-for-go/services/dns/mgmt/2018-05-01/dns/CHANGELOG.md
new file mode 100644
index 00000000000..f8eb3fbc45b
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/dns/mgmt/2018-05-01/dns/CHANGELOG.md
@@ -0,0 +1,5 @@
+Generated from https://github.com/Azure/azure-rest-api-specs/tree/3c764635e7d442b3e74caf593029fcd440b3ef82//specification/dns/resource-manager/readme.md tag: `package-2018-05`
+
+Code generator @microsoft.azure/autorest.go@2.1.171
+
+
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/dns/mgmt/2018-05-01/dns/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/dns/mgmt/2018-05-01/dns/models.go
index dbf877d4dd7..8f1f0dfb8b0 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/dns/mgmt/2018-05-01/dns/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/dns/mgmt/2018-05-01/dns/models.go
@@ -52,21 +52,21 @@ type CaaRecord struct {
Value *string `json:"value,omitempty"`
}
-// CloudError an error message
+// CloudError an error response from the service.
type CloudError struct {
- // Error - The error message body
+ // Error - Cloud error body.
Error *CloudErrorBody `json:"error,omitempty"`
}
-// CloudErrorBody the body of an error message
+// CloudErrorBody an error response from the service.
type CloudErrorBody struct {
- // Code - The error code
+ // Code - An identifier for the error. Codes are invariant and are intended to be consumed programmatically.
Code *string `json:"code,omitempty"`
- // Message - A description of what caused the error
+ // Message - A message describing the error, intended to be suitable for display in a user interface.
Message *string `json:"message,omitempty"`
- // Target - The target resource of the error message
+ // Target - The target of the particular error. For example, the name of the property in error.
Target *string `json:"target,omitempty"`
- // Details - Extra error information
+ // Details - A list of additional details about the error.
Details *[]CloudErrorBody `json:"details,omitempty"`
}
@@ -344,8 +344,11 @@ func (page RecordSetListResultPage) Values() []RecordSet {
}
// Creates a new instance of the RecordSetListResultPage type.
-func NewRecordSetListResultPage(getNextPage func(context.Context, RecordSetListResult) (RecordSetListResult, error)) RecordSetListResultPage {
- return RecordSetListResultPage{fn: getNextPage}
+func NewRecordSetListResultPage(cur RecordSetListResult, getNextPage func(context.Context, RecordSetListResult) (RecordSetListResult, error)) RecordSetListResultPage {
+ return RecordSetListResultPage{
+ fn: getNextPage,
+ rslr: cur,
+ }
}
// RecordSetProperties represents the properties of the records in the record set.
@@ -877,14 +880,19 @@ func (page ZoneListResultPage) Values() []Zone {
}
// Creates a new instance of the ZoneListResultPage type.
-func NewZoneListResultPage(getNextPage func(context.Context, ZoneListResult) (ZoneListResult, error)) ZoneListResultPage {
- return ZoneListResultPage{fn: getNextPage}
+func NewZoneListResultPage(cur ZoneListResult, getNextPage func(context.Context, ZoneListResult) (ZoneListResult, error)) ZoneListResultPage {
+ return ZoneListResultPage{
+ fn: getNextPage,
+ zlr: cur,
+ }
}
// ZoneProperties represents the properties of the zone.
type ZoneProperties struct {
// MaxNumberOfRecordSets - READ-ONLY; The maximum number of record sets that can be created in this DNS zone. This is a read-only property and any attempt to set this value will be ignored.
MaxNumberOfRecordSets *int64 `json:"maxNumberOfRecordSets,omitempty"`
+ // MaxNumberOfRecordsPerRecordSet - READ-ONLY; The maximum number of records per record set that can be created in this DNS zone. This is a read-only property and any attempt to set this value will be ignored.
+ MaxNumberOfRecordsPerRecordSet *int64 `json:"maxNumberOfRecordsPerRecordSet,omitempty"`
// NumberOfRecordSets - READ-ONLY; The current number of record sets in this DNS zone. This is a read-only property and any attempt to set this value will be ignored.
NumberOfRecordSets *int64 `json:"numberOfRecordSets,omitempty"`
// NameServers - READ-ONLY; The name servers for this DNS zone. This is a read-only property and any attempt to set this value will be ignored.
@@ -914,24 +922,10 @@ func (zp ZoneProperties) MarshalJSON() ([]byte, error) {
// ZonesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ZonesDeleteFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *ZonesDeleteFuture) Result(client ZonesClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "dns.ZonesDeleteFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("dns.ZonesDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(ZonesClient) (autorest.Response, error)
}
// ZoneUpdate describes a request to update a DNS zone.
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/dns/mgmt/2018-05-01/dns/recordsets.go b/vendor/github.com/Azure/azure-sdk-for-go/services/dns/mgmt/2018-05-01/dns/recordsets.go
index 7a77cf6d51f..798792aa325 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/dns/mgmt/2018-05-01/dns/recordsets.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/dns/mgmt/2018-05-01/dns/recordsets.go
@@ -80,6 +80,7 @@ func (client RecordSetsClient) CreateOrUpdate(ctx context.Context, resourceGroup
result, err = client.CreateOrUpdateResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "dns.RecordSetsClient", "CreateOrUpdate", resp, "Failure responding to request")
+ return
}
return
@@ -175,6 +176,7 @@ func (client RecordSetsClient) Delete(ctx context.Context, resourceGroupName str
result, err = client.DeleteResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "dns.RecordSetsClient", "Delete", resp, "Failure responding to request")
+ return
}
return
@@ -257,6 +259,7 @@ func (client RecordSetsClient) Get(ctx context.Context, resourceGroupName string
result, err = client.GetResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "dns.RecordSetsClient", "Get", resp, "Failure responding to request")
+ return
}
return
@@ -339,9 +342,11 @@ func (client RecordSetsClient) ListAllByDNSZone(ctx context.Context, resourceGro
result.rslr, err = client.ListAllByDNSZoneResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "dns.RecordSetsClient", "ListAllByDNSZone", resp, "Failure responding to request")
+ return
}
if result.rslr.hasNextLink() && result.rslr.IsEmpty() {
err = result.NextWithContext(ctx)
+ return
}
return
@@ -465,9 +470,11 @@ func (client RecordSetsClient) ListByDNSZone(ctx context.Context, resourceGroupN
result.rslr, err = client.ListByDNSZoneResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "dns.RecordSetsClient", "ListByDNSZone", resp, "Failure responding to request")
+ return
}
if result.rslr.hasNextLink() && result.rslr.IsEmpty() {
err = result.NextWithContext(ctx)
+ return
}
return
@@ -592,9 +599,11 @@ func (client RecordSetsClient) ListByType(ctx context.Context, resourceGroupName
result.rslr, err = client.ListByTypeResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "dns.RecordSetsClient", "ListByType", resp, "Failure responding to request")
+ return
}
if result.rslr.hasNextLink() && result.rslr.IsEmpty() {
err = result.NextWithContext(ctx)
+ return
}
return
@@ -719,6 +728,7 @@ func (client RecordSetsClient) Update(ctx context.Context, resourceGroupName str
result, err = client.UpdateResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "dns.RecordSetsClient", "Update", resp, "Failure responding to request")
+ return
}
return
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/dns/mgmt/2018-05-01/dns/resourcereference.go b/vendor/github.com/Azure/azure-sdk-for-go/services/dns/mgmt/2018-05-01/dns/resourcereference.go
index 9f0ded44e97..2523d4376dd 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/dns/mgmt/2018-05-01/dns/resourcereference.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/dns/mgmt/2018-05-01/dns/resourcereference.go
@@ -72,6 +72,7 @@ func (client ResourceReferenceClient) GetByTargetResources(ctx context.Context,
result, err = client.GetByTargetResourcesResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "dns.ResourceReferenceClient", "GetByTargetResources", resp, "Failure responding to request")
+ return
}
return
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/dns/mgmt/2018-05-01/dns/zones.go b/vendor/github.com/Azure/azure-sdk-for-go/services/dns/mgmt/2018-05-01/dns/zones.go
index 17a65d23c72..dd71acca937 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/dns/mgmt/2018-05-01/dns/zones.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/dns/mgmt/2018-05-01/dns/zones.go
@@ -77,6 +77,7 @@ func (client ZonesClient) CreateOrUpdate(ctx context.Context, resourceGroupName
result, err = client.CreateOrUpdateResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "dns.ZonesClient", "CreateOrUpdate", resp, "Failure responding to request")
+ return
}
return
@@ -157,7 +158,7 @@ func (client ZonesClient) Delete(ctx context.Context, resourceGroupName string,
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "dns.ZonesClient", "Delete", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "dns.ZonesClient", "Delete", nil, "Failure sending request")
return
}
@@ -197,7 +198,23 @@ func (client ZonesClient) DeleteSender(req *http.Request) (future ZonesDeleteFut
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(client ZonesClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "dns.ZonesDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("dns.ZonesDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
return
}
@@ -243,6 +260,7 @@ func (client ZonesClient) Get(ctx context.Context, resourceGroupName string, zon
result, err = client.GetResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "dns.ZonesClient", "Get", resp, "Failure responding to request")
+ return
}
return
@@ -318,9 +336,11 @@ func (client ZonesClient) List(ctx context.Context, top *int32) (result ZoneList
result.zlr, err = client.ListResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "dns.ZonesClient", "List", resp, "Failure responding to request")
+ return
}
if result.zlr.hasNextLink() && result.zlr.IsEmpty() {
err = result.NextWithContext(ctx)
+ return
}
return
@@ -435,9 +455,11 @@ func (client ZonesClient) ListByResourceGroup(ctx context.Context, resourceGroup
result.zlr, err = client.ListByResourceGroupResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "dns.ZonesClient", "ListByResourceGroup", resp, "Failure responding to request")
+ return
}
if result.zlr.hasNextLink() && result.zlr.IsEmpty() {
err = result.NextWithContext(ctx)
+ return
}
return
@@ -555,6 +577,7 @@ func (client ZonesClient) Update(ctx context.Context, resourceGroupName string,
result, err = client.UpdateResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "dns.ZonesClient", "Update", resp, "Failure responding to request")
+ return
}
return
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/graphrbac/1.6/graphrbac/CHANGELOG.md b/vendor/github.com/Azure/azure-sdk-for-go/services/graphrbac/1.6/graphrbac/CHANGELOG.md
new file mode 100644
index 00000000000..f47d1e931ba
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/graphrbac/1.6/graphrbac/CHANGELOG.md
@@ -0,0 +1,5 @@
+Generated from https://github.com/Azure/azure-rest-api-specs/tree/3c764635e7d442b3e74caf593029fcd440b3ef82//specification/graphrbac/data-plane/readme.md tag: `1.6`
+
+Code generator @microsoft.azure/autorest.go@2.1.171
+
+
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/graphrbac/1.6/graphrbac/applications.go b/vendor/github.com/Azure/azure-sdk-for-go/services/graphrbac/1.6/graphrbac/applications.go
index 1b0a3f42c79..d32f8e0e4e2 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/graphrbac/1.6/graphrbac/applications.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/graphrbac/1.6/graphrbac/applications.go
@@ -81,6 +81,7 @@ func (client ApplicationsClient) AddOwner(ctx context.Context, applicationObject
result, err = client.AddOwnerResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "graphrbac.ApplicationsClient", "AddOwner", resp, "Failure responding to request")
+ return
}
return
@@ -161,6 +162,7 @@ func (client ApplicationsClient) Create(ctx context.Context, parameters Applicat
result, err = client.CreateResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "graphrbac.ApplicationsClient", "Create", resp, "Failure responding to request")
+ return
}
return
@@ -235,6 +237,7 @@ func (client ApplicationsClient) Delete(ctx context.Context, applicationObjectID
result, err = client.DeleteResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "graphrbac.ApplicationsClient", "Delete", resp, "Failure responding to request")
+ return
}
return
@@ -307,6 +310,7 @@ func (client ApplicationsClient) Get(ctx context.Context, applicationObjectID st
result, err = client.GetResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "graphrbac.ApplicationsClient", "Get", resp, "Failure responding to request")
+ return
}
return
@@ -380,6 +384,7 @@ func (client ApplicationsClient) GetServicePrincipalsIDByAppID(ctx context.Conte
result, err = client.GetServicePrincipalsIDByAppIDResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "graphrbac.ApplicationsClient", "GetServicePrincipalsIDByAppID", resp, "Failure responding to request")
+ return
}
return
@@ -459,9 +464,11 @@ func (client ApplicationsClient) List(ctx context.Context, filter string) (resul
result.alr, err = client.ListResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "graphrbac.ApplicationsClient", "List", resp, "Failure responding to request")
+ return
}
if result.alr.hasNextLink() && result.alr.IsEmpty() {
err = result.NextWithContext(ctx)
+ return
}
return
@@ -553,6 +560,7 @@ func (client ApplicationsClient) ListKeyCredentials(ctx context.Context, applica
result, err = client.ListKeyCredentialsResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "graphrbac.ApplicationsClient", "ListKeyCredentials", resp, "Failure responding to request")
+ return
}
return
@@ -626,6 +634,7 @@ func (client ApplicationsClient) ListNext(ctx context.Context, nextLink string)
result, err = client.ListNextResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "graphrbac.ApplicationsClient", "ListNext", resp, "Failure responding to request")
+ return
}
return
@@ -700,9 +709,11 @@ func (client ApplicationsClient) ListOwners(ctx context.Context, applicationObje
result.dolr, err = client.ListOwnersResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "graphrbac.ApplicationsClient", "ListOwners", resp, "Failure responding to request")
+ return
}
if result.dolr.hasNextLink() && result.dolr.IsEmpty() {
err = result.NextWithContext(ctx)
+ return
}
return
@@ -813,6 +824,7 @@ func (client ApplicationsClient) ListPasswordCredentials(ctx context.Context, ap
result, err = client.ListPasswordCredentialsResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "graphrbac.ApplicationsClient", "ListPasswordCredentials", resp, "Failure responding to request")
+ return
}
return
@@ -887,6 +899,7 @@ func (client ApplicationsClient) Patch(ctx context.Context, applicationObjectID
result, err = client.PatchResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "graphrbac.ApplicationsClient", "Patch", resp, "Failure responding to request")
+ return
}
return
@@ -962,6 +975,7 @@ func (client ApplicationsClient) RemoveOwner(ctx context.Context, applicationObj
result, err = client.RemoveOwnerResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "graphrbac.ApplicationsClient", "RemoveOwner", resp, "Failure responding to request")
+ return
}
return
@@ -1036,6 +1050,7 @@ func (client ApplicationsClient) UpdateKeyCredentials(ctx context.Context, appli
result, err = client.UpdateKeyCredentialsResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "graphrbac.ApplicationsClient", "UpdateKeyCredentials", resp, "Failure responding to request")
+ return
}
return
@@ -1111,6 +1126,7 @@ func (client ApplicationsClient) UpdatePasswordCredentials(ctx context.Context,
result, err = client.UpdatePasswordCredentialsResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "graphrbac.ApplicationsClient", "UpdatePasswordCredentials", resp, "Failure responding to request")
+ return
}
return
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/graphrbac/1.6/graphrbac/deletedapplications.go b/vendor/github.com/Azure/azure-sdk-for-go/services/graphrbac/1.6/graphrbac/deletedapplications.go
index cb2dd07d73c..5aa143f43bc 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/graphrbac/1.6/graphrbac/deletedapplications.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/graphrbac/1.6/graphrbac/deletedapplications.go
@@ -73,6 +73,7 @@ func (client DeletedApplicationsClient) HardDelete(ctx context.Context, applicat
result, err = client.HardDeleteResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "graphrbac.DeletedApplicationsClient", "HardDelete", resp, "Failure responding to request")
+ return
}
return
@@ -151,9 +152,11 @@ func (client DeletedApplicationsClient) List(ctx context.Context, filter string)
result.alr, err = client.ListResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "graphrbac.DeletedApplicationsClient", "List", resp, "Failure responding to request")
+ return
}
if result.alr.hasNextLink() && result.alr.IsEmpty() {
err = result.NextWithContext(ctx)
+ return
}
return
@@ -245,6 +248,7 @@ func (client DeletedApplicationsClient) ListNext(ctx context.Context, nextLink s
result, err = client.ListNextResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "graphrbac.DeletedApplicationsClient", "ListNext", resp, "Failure responding to request")
+ return
}
return
@@ -318,6 +322,7 @@ func (client DeletedApplicationsClient) Restore(ctx context.Context, objectID st
result, err = client.RestoreResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "graphrbac.DeletedApplicationsClient", "Restore", resp, "Failure responding to request")
+ return
}
return
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/graphrbac/1.6/graphrbac/domains.go b/vendor/github.com/Azure/azure-sdk-for-go/services/graphrbac/1.6/graphrbac/domains.go
index ace3959ac60..55e97b20ee3 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/graphrbac/1.6/graphrbac/domains.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/graphrbac/1.6/graphrbac/domains.go
@@ -71,6 +71,7 @@ func (client DomainsClient) Get(ctx context.Context, domainName string) (result
result, err = client.GetResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "graphrbac.DomainsClient", "Get", resp, "Failure responding to request")
+ return
}
return
@@ -144,6 +145,7 @@ func (client DomainsClient) List(ctx context.Context, filter string) (result Dom
result, err = client.ListResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "graphrbac.DomainsClient", "List", resp, "Failure responding to request")
+ return
}
return
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/graphrbac/1.6/graphrbac/groups.go b/vendor/github.com/Azure/azure-sdk-for-go/services/graphrbac/1.6/graphrbac/groups.go
index 02b021e4d21..d03739fb3af 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/graphrbac/1.6/graphrbac/groups.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/graphrbac/1.6/graphrbac/groups.go
@@ -81,6 +81,7 @@ func (client GroupsClient) AddMember(ctx context.Context, groupObjectID string,
result, err = client.AddMemberResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "graphrbac.GroupsClient", "AddMember", resp, "Failure responding to request")
+ return
}
return
@@ -163,6 +164,7 @@ func (client GroupsClient) AddOwner(ctx context.Context, objectID string, parame
result, err = client.AddOwnerResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "graphrbac.GroupsClient", "AddOwner", resp, "Failure responding to request")
+ return
}
return
@@ -246,6 +248,7 @@ func (client GroupsClient) Create(ctx context.Context, parameters GroupCreatePar
result, err = client.CreateResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "graphrbac.GroupsClient", "Create", resp, "Failure responding to request")
+ return
}
return
@@ -320,6 +323,7 @@ func (client GroupsClient) Delete(ctx context.Context, objectID string) (result
result, err = client.DeleteResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "graphrbac.GroupsClient", "Delete", resp, "Failure responding to request")
+ return
}
return
@@ -392,6 +396,7 @@ func (client GroupsClient) Get(ctx context.Context, objectID string) (result ADG
result, err = client.GetResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "graphrbac.GroupsClient", "Get", resp, "Failure responding to request")
+ return
}
return
@@ -471,9 +476,11 @@ func (client GroupsClient) GetGroupMembers(ctx context.Context, objectID string)
result.dolr, err = client.GetGroupMembersResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "graphrbac.GroupsClient", "GetGroupMembers", resp, "Failure responding to request")
+ return
}
if result.dolr.hasNextLink() && result.dolr.IsEmpty() {
err = result.NextWithContext(ctx)
+ return
}
return
@@ -563,6 +570,7 @@ func (client GroupsClient) GetGroupMembersNext(ctx context.Context, nextLink str
result, err = client.GetGroupMembersNextResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "graphrbac.GroupsClient", "GetGroupMembersNext", resp, "Failure responding to request")
+ return
}
return
@@ -643,6 +651,7 @@ func (client GroupsClient) GetMemberGroups(ctx context.Context, objectID string,
result, err = client.GetMemberGroupsResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "graphrbac.GroupsClient", "GetMemberGroups", resp, "Failure responding to request")
+ return
}
return
@@ -726,6 +735,7 @@ func (client GroupsClient) IsMemberOf(ctx context.Context, parameters CheckGroup
result, err = client.IsMemberOfResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "graphrbac.GroupsClient", "IsMemberOf", resp, "Failure responding to request")
+ return
}
return
@@ -806,9 +816,11 @@ func (client GroupsClient) List(ctx context.Context, filter string) (result Grou
result.glr, err = client.ListResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "graphrbac.GroupsClient", "List", resp, "Failure responding to request")
+ return
}
if result.glr.hasNextLink() && result.glr.IsEmpty() {
err = result.NextWithContext(ctx)
+ return
}
return
@@ -900,6 +912,7 @@ func (client GroupsClient) ListNext(ctx context.Context, nextLink string) (resul
result, err = client.ListNextResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "graphrbac.GroupsClient", "ListNext", resp, "Failure responding to request")
+ return
}
return
@@ -974,9 +987,11 @@ func (client GroupsClient) ListOwners(ctx context.Context, objectID string) (res
result.dolr, err = client.ListOwnersResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "graphrbac.GroupsClient", "ListOwners", resp, "Failure responding to request")
+ return
}
if result.dolr.hasNextLink() && result.dolr.IsEmpty() {
err = result.NextWithContext(ctx)
+ return
}
return
@@ -1088,6 +1103,7 @@ func (client GroupsClient) RemoveMember(ctx context.Context, groupObjectID strin
result, err = client.RemoveMemberResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "graphrbac.GroupsClient", "RemoveMember", resp, "Failure responding to request")
+ return
}
return
@@ -1162,6 +1178,7 @@ func (client GroupsClient) RemoveOwner(ctx context.Context, objectID string, own
result, err = client.RemoveOwnerResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "graphrbac.GroupsClient", "RemoveOwner", resp, "Failure responding to request")
+ return
}
return
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/graphrbac/1.6/graphrbac/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/graphrbac/1.6/graphrbac/models.go
index be2bbcfcf45..6ff58bf7bac 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/graphrbac/1.6/graphrbac/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/graphrbac/1.6/graphrbac/models.go
@@ -1089,8 +1089,11 @@ func (page ApplicationListResultPage) Values() []Application {
}
// Creates a new instance of the ApplicationListResultPage type.
-func NewApplicationListResultPage(getNextPage func(context.Context, ApplicationListResult) (ApplicationListResult, error)) ApplicationListResultPage {
- return ApplicationListResultPage{fn: getNextPage}
+func NewApplicationListResultPage(cur ApplicationListResult, getNextPage func(context.Context, ApplicationListResult) (ApplicationListResult, error)) ApplicationListResultPage {
+ return ApplicationListResultPage{
+ fn: getNextPage,
+ alr: cur,
+ }
}
// ApplicationUpdateParameters request parameters for updating a new application.
@@ -1652,8 +1655,11 @@ func (page DirectoryObjectListResultPage) Values() []BasicDirectoryObject {
}
// Creates a new instance of the DirectoryObjectListResultPage type.
-func NewDirectoryObjectListResultPage(getNextPage func(context.Context, DirectoryObjectListResult) (DirectoryObjectListResult, error)) DirectoryObjectListResultPage {
- return DirectoryObjectListResultPage{fn: getNextPage}
+func NewDirectoryObjectListResultPage(cur DirectoryObjectListResult, getNextPage func(context.Context, DirectoryObjectListResult) (DirectoryObjectListResult, error)) DirectoryObjectListResultPage {
+ return DirectoryObjectListResultPage{
+ fn: getNextPage,
+ dolr: cur,
+ }
}
// Domain active Directory Domain information.
@@ -2239,12 +2245,15 @@ func (page GroupListResultPage) Values() []ADGroup {
}
// Creates a new instance of the GroupListResultPage type.
-func NewGroupListResultPage(getNextPage func(context.Context, GroupListResult) (GroupListResult, error)) GroupListResultPage {
- return GroupListResultPage{fn: getNextPage}
+func NewGroupListResultPage(cur GroupListResult, getNextPage func(context.Context, GroupListResult) (GroupListResult, error)) GroupListResultPage {
+ return GroupListResultPage{
+ fn: getNextPage,
+ glr: cur,
+ }
}
-// InformationalURL represents a group of URIs that provide terms of service, marketing, support and privacy
-// policy information about an application. The default value for each string is null.
+// InformationalURL represents a group of URIs that provide terms of service, marketing, support and
+// privacy policy information about an application. The default value for each string is null.
type InformationalURL struct {
// TermsOfService - The terms of service URI
TermsOfService *string `json:"termsOfService,omitempty"`
@@ -2410,8 +2419,8 @@ type KeyCredentialsUpdateParameters struct {
}
// OAuth2Permission represents an OAuth 2.0 delegated permission scope. The specified OAuth 2.0 delegated
-// permission scopes may be requested by client applications (through the requiredResourceAccess collection on
-// the Application object) when calling a resource application. The oauth2Permissions property of the
+// permission scopes may be requested by client applications (through the requiredResourceAccess collection
+// on the Application object) when calling a resource application. The oauth2Permissions property of the
// ServicePrincipal entity and of the Application entity is a collection of OAuth2Permission.
type OAuth2Permission struct {
// AdminConsentDescription - Permission help text that appears in the admin consent and app assignment experiences.
@@ -2596,8 +2605,11 @@ func (page OAuth2PermissionGrantListResultPage) Values() []OAuth2PermissionGrant
}
// Creates a new instance of the OAuth2PermissionGrantListResultPage type.
-func NewOAuth2PermissionGrantListResultPage(getNextPage func(context.Context, OAuth2PermissionGrantListResult) (OAuth2PermissionGrantListResult, error)) OAuth2PermissionGrantListResultPage {
- return OAuth2PermissionGrantListResultPage{fn: getNextPage}
+func NewOAuth2PermissionGrantListResultPage(cur OAuth2PermissionGrantListResult, getNextPage func(context.Context, OAuth2PermissionGrantListResult) (OAuth2PermissionGrantListResult, error)) OAuth2PermissionGrantListResultPage {
+ return OAuth2PermissionGrantListResultPage{
+ fn: getNextPage,
+ oa2pglr: cur,
+ }
}
// OdataError active Directory OData error information.
@@ -2879,8 +2891,8 @@ type PreAuthorizedApplication struct {
Extensions *[]PreAuthorizedApplicationExtension `json:"extensions,omitempty"`
}
-// PreAuthorizedApplicationExtension representation of an app PreAuthorizedApplicationExtension required by a
-// pre authorized client app.
+// PreAuthorizedApplicationExtension representation of an app PreAuthorizedApplicationExtension required by
+// a pre authorized client app.
type PreAuthorizedApplicationExtension struct {
// Conditions - The extension's conditions.
Conditions *[]string `json:"conditions,omitempty"`
@@ -2894,10 +2906,11 @@ type PreAuthorizedApplicationPermission struct {
AccessGrants *[]string `json:"accessGrants,omitempty"`
}
-// RequiredResourceAccess specifies the set of OAuth 2.0 permission scopes and app roles under the specified
-// resource that an application requires access to. The specified OAuth 2.0 permission scopes may be requested
-// by client applications (through the requiredResourceAccess collection) when calling a resource application.
-// The requiredResourceAccess property of the Application entity is a collection of RequiredResourceAccess.
+// RequiredResourceAccess specifies the set of OAuth 2.0 permission scopes and app roles under the
+// specified resource that an application requires access to. The specified OAuth 2.0 permission scopes may
+// be requested by client applications (through the requiredResourceAccess collection) when calling a
+// resource application. The requiredResourceAccess property of the Application entity is a collection of
+// RequiredResourceAccess.
type RequiredResourceAccess struct {
// AdditionalProperties - Unmatched properties from the message are deserialized this collection
AdditionalProperties map[string]interface{} `json:""`
@@ -3433,7 +3446,8 @@ func (sp *ServicePrincipal) UnmarshalJSON(body []byte) error {
return nil
}
-// ServicePrincipalBase active Directory service principal common properties shared among GET, POST and PATCH
+// ServicePrincipalBase active Directory service principal common properties shared among GET, POST and
+// PATCH
type ServicePrincipalBase struct {
// AccountEnabled - whether or not the service principal account is enabled
AccountEnabled *bool `json:"accountEnabled,omitempty"`
@@ -3607,8 +3621,11 @@ func (page ServicePrincipalListResultPage) Values() []ServicePrincipal {
}
// Creates a new instance of the ServicePrincipalListResultPage type.
-func NewServicePrincipalListResultPage(getNextPage func(context.Context, ServicePrincipalListResult) (ServicePrincipalListResult, error)) ServicePrincipalListResultPage {
- return ServicePrincipalListResultPage{fn: getNextPage}
+func NewServicePrincipalListResultPage(cur ServicePrincipalListResult, getNextPage func(context.Context, ServicePrincipalListResult) (ServicePrincipalListResult, error)) ServicePrincipalListResultPage {
+ return ServicePrincipalListResultPage{
+ fn: getNextPage,
+ splr: cur,
+ }
}
// ServicePrincipalObjectResult service Principal Object Result.
@@ -3636,8 +3653,8 @@ type ServicePrincipalUpdateParameters struct {
Tags *[]string `json:"tags,omitempty"`
}
-// SignInName contains information about a sign-in name of a local account user in an Azure Active Directory
-// B2C tenant.
+// SignInName contains information about a sign-in name of a local account user in an Azure Active
+// Directory B2C tenant.
type SignInName struct {
// AdditionalProperties - Unmatched properties from the message are deserialized this collection
AdditionalProperties map[string]interface{} `json:""`
@@ -4482,8 +4499,11 @@ func (page UserListResultPage) Values() []User {
}
// Creates a new instance of the UserListResultPage type.
-func NewUserListResultPage(getNextPage func(context.Context, UserListResult) (UserListResult, error)) UserListResultPage {
- return UserListResultPage{fn: getNextPage}
+func NewUserListResultPage(cur UserListResult, getNextPage func(context.Context, UserListResult) (UserListResult, error)) UserListResultPage {
+ return UserListResultPage{
+ fn: getNextPage,
+ ulr: cur,
+ }
}
// UserUpdateParameters request parameters for updating an existing work or school account user.
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/graphrbac/1.6/graphrbac/oauth2permissiongrant.go b/vendor/github.com/Azure/azure-sdk-for-go/services/graphrbac/1.6/graphrbac/oauth2permissiongrant.go
index 963bb9a5a1f..74618ef492b 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/graphrbac/1.6/graphrbac/oauth2permissiongrant.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/graphrbac/1.6/graphrbac/oauth2permissiongrant.go
@@ -73,6 +73,7 @@ func (client OAuth2PermissionGrantClient) Create(ctx context.Context, body *OAut
result, err = client.CreateResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "graphrbac.OAuth2PermissionGrantClient", "Create", resp, "Failure responding to request")
+ return
}
return
@@ -150,6 +151,7 @@ func (client OAuth2PermissionGrantClient) Delete(ctx context.Context, objectID s
result, err = client.DeleteResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "graphrbac.OAuth2PermissionGrantClient", "Delete", resp, "Failure responding to request")
+ return
}
return
@@ -228,9 +230,11 @@ func (client OAuth2PermissionGrantClient) List(ctx context.Context, filter strin
result.oa2pglr, err = client.ListResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "graphrbac.OAuth2PermissionGrantClient", "List", resp, "Failure responding to request")
+ return
}
if result.oa2pglr.hasNextLink() && result.oa2pglr.IsEmpty() {
err = result.NextWithContext(ctx)
+ return
}
return
@@ -322,6 +326,7 @@ func (client OAuth2PermissionGrantClient) ListNext(ctx context.Context, nextLink
result, err = client.ListNextResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "graphrbac.OAuth2PermissionGrantClient", "ListNext", resp, "Failure responding to request")
+ return
}
return
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/graphrbac/1.6/graphrbac/objects.go b/vendor/github.com/Azure/azure-sdk-for-go/services/graphrbac/1.6/graphrbac/objects.go
index 62b103255d8..b4b18246108 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/graphrbac/1.6/graphrbac/objects.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/graphrbac/1.6/graphrbac/objects.go
@@ -79,9 +79,11 @@ func (client ObjectsClient) GetObjectsByObjectIds(ctx context.Context, parameter
result.dolr, err = client.GetObjectsByObjectIdsResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "graphrbac.ObjectsClient", "GetObjectsByObjectIds", resp, "Failure responding to request")
+ return
}
if result.dolr.hasNextLink() && result.dolr.IsEmpty() {
err = result.NextWithContext(ctx)
+ return
}
return
@@ -172,6 +174,7 @@ func (client ObjectsClient) GetObjectsByObjectIdsNext(ctx context.Context, nextL
result, err = client.GetObjectsByObjectIdsNextResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "graphrbac.ObjectsClient", "GetObjectsByObjectIdsNext", resp, "Failure responding to request")
+ return
}
return
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/graphrbac/1.6/graphrbac/serviceprincipals.go b/vendor/github.com/Azure/azure-sdk-for-go/services/graphrbac/1.6/graphrbac/serviceprincipals.go
index 3bfdfe9d53d..4e9d43405aa 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/graphrbac/1.6/graphrbac/serviceprincipals.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/graphrbac/1.6/graphrbac/serviceprincipals.go
@@ -80,6 +80,7 @@ func (client ServicePrincipalsClient) Create(ctx context.Context, parameters Ser
result, err = client.CreateResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "graphrbac.ServicePrincipalsClient", "Create", resp, "Failure responding to request")
+ return
}
return
@@ -154,6 +155,7 @@ func (client ServicePrincipalsClient) Delete(ctx context.Context, objectID strin
result, err = client.DeleteResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "graphrbac.ServicePrincipalsClient", "Delete", resp, "Failure responding to request")
+ return
}
return
@@ -226,6 +228,7 @@ func (client ServicePrincipalsClient) Get(ctx context.Context, objectID string)
result, err = client.GetResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "graphrbac.ServicePrincipalsClient", "Get", resp, "Failure responding to request")
+ return
}
return
@@ -305,9 +308,11 @@ func (client ServicePrincipalsClient) List(ctx context.Context, filter string) (
result.splr, err = client.ListResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "graphrbac.ServicePrincipalsClient", "List", resp, "Failure responding to request")
+ return
}
if result.splr.hasNextLink() && result.splr.IsEmpty() {
err = result.NextWithContext(ctx)
+ return
}
return
@@ -399,6 +404,7 @@ func (client ServicePrincipalsClient) ListKeyCredentials(ctx context.Context, ob
result, err = client.ListKeyCredentialsResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "graphrbac.ServicePrincipalsClient", "ListKeyCredentials", resp, "Failure responding to request")
+ return
}
return
@@ -472,6 +478,7 @@ func (client ServicePrincipalsClient) ListNext(ctx context.Context, nextLink str
result, err = client.ListNextResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "graphrbac.ServicePrincipalsClient", "ListNext", resp, "Failure responding to request")
+ return
}
return
@@ -546,9 +553,11 @@ func (client ServicePrincipalsClient) ListOwners(ctx context.Context, objectID s
result.dolr, err = client.ListOwnersResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "graphrbac.ServicePrincipalsClient", "ListOwners", resp, "Failure responding to request")
+ return
}
if result.dolr.hasNextLink() && result.dolr.IsEmpty() {
err = result.NextWithContext(ctx)
+ return
}
return
@@ -659,6 +668,7 @@ func (client ServicePrincipalsClient) ListPasswordCredentials(ctx context.Contex
result, err = client.ListPasswordCredentialsResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "graphrbac.ServicePrincipalsClient", "ListPasswordCredentials", resp, "Failure responding to request")
+ return
}
return
@@ -733,6 +743,7 @@ func (client ServicePrincipalsClient) Update(ctx context.Context, objectID strin
result, err = client.UpdateResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "graphrbac.ServicePrincipalsClient", "Update", resp, "Failure responding to request")
+ return
}
return
@@ -808,6 +819,7 @@ func (client ServicePrincipalsClient) UpdateKeyCredentials(ctx context.Context,
result, err = client.UpdateKeyCredentialsResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "graphrbac.ServicePrincipalsClient", "UpdateKeyCredentials", resp, "Failure responding to request")
+ return
}
return
@@ -883,6 +895,7 @@ func (client ServicePrincipalsClient) UpdatePasswordCredentials(ctx context.Cont
result, err = client.UpdatePasswordCredentialsResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "graphrbac.ServicePrincipalsClient", "UpdatePasswordCredentials", resp, "Failure responding to request")
+ return
}
return
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/graphrbac/1.6/graphrbac/signedinuser.go b/vendor/github.com/Azure/azure-sdk-for-go/services/graphrbac/1.6/graphrbac/signedinuser.go
index e6004b3e099..0f805b5165f 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/graphrbac/1.6/graphrbac/signedinuser.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/graphrbac/1.6/graphrbac/signedinuser.go
@@ -70,6 +70,7 @@ func (client SignedInUserClient) Get(ctx context.Context) (result User, err erro
result, err = client.GetResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "graphrbac.SignedInUserClient", "Get", resp, "Failure responding to request")
+ return
}
return
@@ -146,9 +147,11 @@ func (client SignedInUserClient) ListOwnedObjects(ctx context.Context) (result D
result.dolr, err = client.ListOwnedObjectsResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "graphrbac.SignedInUserClient", "ListOwnedObjects", resp, "Failure responding to request")
+ return
}
if result.dolr.hasNextLink() && result.dolr.IsEmpty() {
err = result.NextWithContext(ctx)
+ return
}
return
@@ -237,6 +240,7 @@ func (client SignedInUserClient) ListOwnedObjectsNext(ctx context.Context, nextL
result, err = client.ListOwnedObjectsNextResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "graphrbac.SignedInUserClient", "ListOwnedObjectsNext", resp, "Failure responding to request")
+ return
}
return
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/graphrbac/1.6/graphrbac/users.go b/vendor/github.com/Azure/azure-sdk-for-go/services/graphrbac/1.6/graphrbac/users.go
index 480295e248a..b9a7a56c3e8 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/graphrbac/1.6/graphrbac/users.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/graphrbac/1.6/graphrbac/users.go
@@ -84,6 +84,7 @@ func (client UsersClient) Create(ctx context.Context, parameters UserCreateParam
result, err = client.CreateResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "graphrbac.UsersClient", "Create", resp, "Failure responding to request")
+ return
}
return
@@ -158,6 +159,7 @@ func (client UsersClient) Delete(ctx context.Context, upnOrObjectID string) (res
result, err = client.DeleteResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "graphrbac.UsersClient", "Delete", resp, "Failure responding to request")
+ return
}
return
@@ -230,6 +232,7 @@ func (client UsersClient) Get(ctx context.Context, upnOrObjectID string) (result
result, err = client.GetResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "graphrbac.UsersClient", "Get", resp, "Failure responding to request")
+ return
}
return
@@ -310,6 +313,7 @@ func (client UsersClient) GetMemberGroups(ctx context.Context, objectID string,
result, err = client.GetMemberGroupsResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "graphrbac.UsersClient", "GetMemberGroups", resp, "Failure responding to request")
+ return
}
return
@@ -392,9 +396,11 @@ func (client UsersClient) List(ctx context.Context, filter string, expand string
result.ulr, err = client.ListResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "graphrbac.UsersClient", "List", resp, "Failure responding to request")
+ return
}
if result.ulr.hasNextLink() && result.ulr.IsEmpty() {
err = result.NextWithContext(ctx)
+ return
}
return
@@ -489,6 +495,7 @@ func (client UsersClient) ListNext(ctx context.Context, nextLink string) (result
result, err = client.ListNextResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "graphrbac.UsersClient", "ListNext", resp, "Failure responding to request")
+ return
}
return
@@ -563,6 +570,7 @@ func (client UsersClient) Update(ctx context.Context, upnOrObjectID string, para
result, err = client.UpdateResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "graphrbac.UsersClient", "Update", resp, "Failure responding to request")
+ return
}
return
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/CHANGELOG.md b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/CHANGELOG.md
new file mode 100644
index 00000000000..0b2ea50a90b
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/CHANGELOG.md
@@ -0,0 +1,5 @@
+Generated from https://github.com/Azure/azure-rest-api-specs/tree/3c764635e7d442b3e74caf593029fcd440b3ef82//specification/network/resource-manager/readme.md tag: `package-2017-10`
+
+Code generator @microsoft.azure/autorest.go@2.1.171
+
+
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/applicationgateways.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/applicationgateways.go
similarity index 78%
rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/applicationgateways.go
rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/applicationgateways.go
index 5287713bd2a..2414bbe6530 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/applicationgateways.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/applicationgateways.go
@@ -67,7 +67,7 @@ func (client ApplicationGatewaysClient) BackendHealth(ctx context.Context, resou
result, err = client.BackendHealthSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "BackendHealth", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "BackendHealth", nil, "Failure sending request")
return
}
@@ -82,7 +82,7 @@ func (client ApplicationGatewaysClient) BackendHealthPreparer(ctx context.Contex
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -106,7 +106,33 @@ func (client ApplicationGatewaysClient) BackendHealthSender(req *http.Request) (
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(client ApplicationGatewaysClient) (agbh ApplicationGatewayBackendHealth, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysBackendHealthFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysBackendHealthFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ agbh.Response.Response, err = future.GetResult(sender)
+ if agbh.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysBackendHealthFuture", "Result", nil, "received nil response and error")
+ }
+ if err == nil && agbh.Response.Response.StatusCode != http.StatusNoContent {
+ agbh, err = client.BackendHealthResponder(agbh.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysBackendHealthFuture", "Result", agbh.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+ }
return
}
@@ -145,25 +171,7 @@ func (client ApplicationGatewaysClient) CreateOrUpdate(ctx context.Context, reso
Chain: []validation.Constraint{{Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.Enabled", Name: validation.Null, Rule: true, Chain: nil},
{Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.RuleSetType", Name: validation.Null, Rule: true, Chain: nil},
{Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.RuleSetVersion", Name: validation.Null, Rule: true, Chain: nil},
- {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.MaxRequestBodySize", Name: validation.Null, Rule: false,
- Chain: []validation.Constraint{{Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.MaxRequestBodySize", Name: validation.InclusiveMaximum, Rule: int64(128), Chain: nil},
- {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.MaxRequestBodySize", Name: validation.InclusiveMinimum, Rule: int64(8), Chain: nil},
- }},
- {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.MaxRequestBodySizeInKb", Name: validation.Null, Rule: false,
- Chain: []validation.Constraint{{Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.MaxRequestBodySizeInKb", Name: validation.InclusiveMaximum, Rule: int64(128), Chain: nil},
- {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.MaxRequestBodySizeInKb", Name: validation.InclusiveMinimum, Rule: int64(8), Chain: nil},
- }},
- {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.FileUploadLimitInMb", Name: validation.Null, Rule: false,
- Chain: []validation.Constraint{{Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.FileUploadLimitInMb", Name: validation.InclusiveMaximum, Rule: int64(500), Chain: nil},
- {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.FileUploadLimitInMb", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil},
- }},
}},
- {Target: "parameters.ApplicationGatewayPropertiesFormat.AutoscaleConfiguration", Name: validation.Null, Rule: false,
- Chain: []validation.Constraint{{Target: "parameters.ApplicationGatewayPropertiesFormat.AutoscaleConfiguration.MinCapacity", Name: validation.Null, Rule: true,
- Chain: []validation.Constraint{{Target: "parameters.ApplicationGatewayPropertiesFormat.AutoscaleConfiguration.MinCapacity", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}},
- {Target: "parameters.ApplicationGatewayPropertiesFormat.AutoscaleConfiguration.MaxCapacity", Name: validation.Null, Rule: false,
- Chain: []validation.Constraint{{Target: "parameters.ApplicationGatewayPropertiesFormat.AutoscaleConfiguration.MaxCapacity", Name: validation.InclusiveMinimum, Rule: int64(2), Chain: nil}}},
- }},
}}}}}); err != nil {
return result, validation.NewError("network.ApplicationGatewaysClient", "CreateOrUpdate", err.Error())
}
@@ -176,7 +184,7 @@ func (client ApplicationGatewaysClient) CreateOrUpdate(ctx context.Context, reso
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "CreateOrUpdate", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "CreateOrUpdate", nil, "Failure sending request")
return
}
@@ -191,7 +199,7 @@ func (client ApplicationGatewaysClient) CreateOrUpdatePreparer(ctx context.Conte
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -214,7 +222,33 @@ func (client ApplicationGatewaysClient) CreateOrUpdateSender(req *http.Request)
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(client ApplicationGatewaysClient) (ag ApplicationGateway, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ ag.Response.Response, err = future.GetResult(sender)
+ if ag.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysCreateOrUpdateFuture", "Result", nil, "received nil response and error")
+ }
+ if err == nil && ag.Response.Response.StatusCode != http.StatusNoContent {
+ ag, err = client.CreateOrUpdateResponder(ag.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysCreateOrUpdateFuture", "Result", ag.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+ }
return
}
@@ -253,7 +287,7 @@ func (client ApplicationGatewaysClient) Delete(ctx context.Context, resourceGrou
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "Delete", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "Delete", nil, "Failure sending request")
return
}
@@ -268,7 +302,7 @@ func (client ApplicationGatewaysClient) DeletePreparer(ctx context.Context, reso
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -289,7 +323,23 @@ func (client ApplicationGatewaysClient) DeleteSender(req *http.Request) (future
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
return
}
@@ -335,6 +385,7 @@ func (client ApplicationGatewaysClient) Get(ctx context.Context, resourceGroupNa
result, err = client.GetResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "Get", resp, "Failure responding to request")
+ return
}
return
@@ -348,7 +399,7 @@ func (client ApplicationGatewaysClient) GetPreparer(ctx context.Context, resourc
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -409,6 +460,7 @@ func (client ApplicationGatewaysClient) GetSslPredefinedPolicy(ctx context.Conte
result, err = client.GetSslPredefinedPolicyResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "GetSslPredefinedPolicy", resp, "Failure responding to request")
+ return
}
return
@@ -421,7 +473,7 @@ func (client ApplicationGatewaysClient) GetSslPredefinedPolicyPreparer(ctx conte
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -483,9 +535,11 @@ func (client ApplicationGatewaysClient) List(ctx context.Context, resourceGroupN
result.aglr, err = client.ListResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "List", resp, "Failure responding to request")
+ return
}
if result.aglr.hasNextLink() && result.aglr.IsEmpty() {
err = result.NextWithContext(ctx)
+ return
}
return
@@ -498,7 +552,7 @@ func (client ApplicationGatewaysClient) ListPreparer(ctx context.Context, resour
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -595,9 +649,11 @@ func (client ApplicationGatewaysClient) ListAll(ctx context.Context) (result App
result.aglr, err = client.ListAllResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "ListAll", resp, "Failure responding to request")
+ return
}
if result.aglr.hasNextLink() && result.aglr.IsEmpty() {
err = result.NextWithContext(ctx)
+ return
}
return
@@ -609,7 +665,7 @@ func (client ApplicationGatewaysClient) ListAllPreparer(ctx context.Context) (*h
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -677,216 +733,6 @@ func (client ApplicationGatewaysClient) ListAllComplete(ctx context.Context) (re
return
}
-// ListAvailableRequestHeaders lists all available request headers.
-func (client ApplicationGatewaysClient) ListAvailableRequestHeaders(ctx context.Context) (result ListString, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewaysClient.ListAvailableRequestHeaders")
- defer func() {
- sc := -1
- if result.Response.Response != nil {
- sc = result.Response.Response.StatusCode
- }
- tracing.EndSpan(ctx, sc, err)
- }()
- }
- req, err := client.ListAvailableRequestHeadersPreparer(ctx)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "ListAvailableRequestHeaders", nil, "Failure preparing request")
- return
- }
-
- resp, err := client.ListAvailableRequestHeadersSender(req)
- if err != nil {
- result.Response = autorest.Response{Response: resp}
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "ListAvailableRequestHeaders", resp, "Failure sending request")
- return
- }
-
- result, err = client.ListAvailableRequestHeadersResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "ListAvailableRequestHeaders", resp, "Failure responding to request")
- }
-
- return
-}
-
-// ListAvailableRequestHeadersPreparer prepares the ListAvailableRequestHeaders request.
-func (client ApplicationGatewaysClient) ListAvailableRequestHeadersPreparer(ctx context.Context) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- }
-
- const APIVersion = "2018-12-01"
- queryParameters := map[string]interface{}{
- "api-version": APIVersion,
- }
-
- preparer := autorest.CreatePreparer(
- autorest.AsGet(),
- autorest.WithBaseURL(client.BaseURI),
- autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationGatewayAvailableRequestHeaders", pathParameters),
- autorest.WithQueryParameters(queryParameters))
- return preparer.Prepare((&http.Request{}).WithContext(ctx))
-}
-
-// ListAvailableRequestHeadersSender sends the ListAvailableRequestHeaders request. The method will close the
-// http.Response Body if it receives an error.
-func (client ApplicationGatewaysClient) ListAvailableRequestHeadersSender(req *http.Request) (*http.Response, error) {
- return client.Send(req, azure.DoRetryWithRegistration(client.Client))
-}
-
-// ListAvailableRequestHeadersResponder handles the response to the ListAvailableRequestHeaders request. The method always
-// closes the http.Response Body.
-func (client ApplicationGatewaysClient) ListAvailableRequestHeadersResponder(resp *http.Response) (result ListString, err error) {
- err = autorest.Respond(
- resp,
- azure.WithErrorUnlessStatusCode(http.StatusOK),
- autorest.ByUnmarshallingJSON(&result.Value),
- autorest.ByClosing())
- result.Response = autorest.Response{Response: resp}
- return
-}
-
-// ListAvailableResponseHeaders lists all available response headers.
-func (client ApplicationGatewaysClient) ListAvailableResponseHeaders(ctx context.Context) (result ListString, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewaysClient.ListAvailableResponseHeaders")
- defer func() {
- sc := -1
- if result.Response.Response != nil {
- sc = result.Response.Response.StatusCode
- }
- tracing.EndSpan(ctx, sc, err)
- }()
- }
- req, err := client.ListAvailableResponseHeadersPreparer(ctx)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "ListAvailableResponseHeaders", nil, "Failure preparing request")
- return
- }
-
- resp, err := client.ListAvailableResponseHeadersSender(req)
- if err != nil {
- result.Response = autorest.Response{Response: resp}
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "ListAvailableResponseHeaders", resp, "Failure sending request")
- return
- }
-
- result, err = client.ListAvailableResponseHeadersResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "ListAvailableResponseHeaders", resp, "Failure responding to request")
- }
-
- return
-}
-
-// ListAvailableResponseHeadersPreparer prepares the ListAvailableResponseHeaders request.
-func (client ApplicationGatewaysClient) ListAvailableResponseHeadersPreparer(ctx context.Context) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- }
-
- const APIVersion = "2018-12-01"
- queryParameters := map[string]interface{}{
- "api-version": APIVersion,
- }
-
- preparer := autorest.CreatePreparer(
- autorest.AsGet(),
- autorest.WithBaseURL(client.BaseURI),
- autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationGatewayAvailableResponseHeaders", pathParameters),
- autorest.WithQueryParameters(queryParameters))
- return preparer.Prepare((&http.Request{}).WithContext(ctx))
-}
-
-// ListAvailableResponseHeadersSender sends the ListAvailableResponseHeaders request. The method will close the
-// http.Response Body if it receives an error.
-func (client ApplicationGatewaysClient) ListAvailableResponseHeadersSender(req *http.Request) (*http.Response, error) {
- return client.Send(req, azure.DoRetryWithRegistration(client.Client))
-}
-
-// ListAvailableResponseHeadersResponder handles the response to the ListAvailableResponseHeaders request. The method always
-// closes the http.Response Body.
-func (client ApplicationGatewaysClient) ListAvailableResponseHeadersResponder(resp *http.Response) (result ListString, err error) {
- err = autorest.Respond(
- resp,
- azure.WithErrorUnlessStatusCode(http.StatusOK),
- autorest.ByUnmarshallingJSON(&result.Value),
- autorest.ByClosing())
- result.Response = autorest.Response{Response: resp}
- return
-}
-
-// ListAvailableServerVariables lists all available server variables.
-func (client ApplicationGatewaysClient) ListAvailableServerVariables(ctx context.Context) (result ListString, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewaysClient.ListAvailableServerVariables")
- defer func() {
- sc := -1
- if result.Response.Response != nil {
- sc = result.Response.Response.StatusCode
- }
- tracing.EndSpan(ctx, sc, err)
- }()
- }
- req, err := client.ListAvailableServerVariablesPreparer(ctx)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "ListAvailableServerVariables", nil, "Failure preparing request")
- return
- }
-
- resp, err := client.ListAvailableServerVariablesSender(req)
- if err != nil {
- result.Response = autorest.Response{Response: resp}
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "ListAvailableServerVariables", resp, "Failure sending request")
- return
- }
-
- result, err = client.ListAvailableServerVariablesResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "ListAvailableServerVariables", resp, "Failure responding to request")
- }
-
- return
-}
-
-// ListAvailableServerVariablesPreparer prepares the ListAvailableServerVariables request.
-func (client ApplicationGatewaysClient) ListAvailableServerVariablesPreparer(ctx context.Context) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- }
-
- const APIVersion = "2018-12-01"
- queryParameters := map[string]interface{}{
- "api-version": APIVersion,
- }
-
- preparer := autorest.CreatePreparer(
- autorest.AsGet(),
- autorest.WithBaseURL(client.BaseURI),
- autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationGatewayAvailableServerVariables", pathParameters),
- autorest.WithQueryParameters(queryParameters))
- return preparer.Prepare((&http.Request{}).WithContext(ctx))
-}
-
-// ListAvailableServerVariablesSender sends the ListAvailableServerVariables request. The method will close the
-// http.Response Body if it receives an error.
-func (client ApplicationGatewaysClient) ListAvailableServerVariablesSender(req *http.Request) (*http.Response, error) {
- return client.Send(req, azure.DoRetryWithRegistration(client.Client))
-}
-
-// ListAvailableServerVariablesResponder handles the response to the ListAvailableServerVariables request. The method always
-// closes the http.Response Body.
-func (client ApplicationGatewaysClient) ListAvailableServerVariablesResponder(resp *http.Response) (result ListString, err error) {
- err = autorest.Respond(
- resp,
- azure.WithErrorUnlessStatusCode(http.StatusOK),
- autorest.ByUnmarshallingJSON(&result.Value),
- autorest.ByClosing())
- result.Response = autorest.Response{Response: resp}
- return
-}
-
// ListAvailableSslOptions lists available Ssl options for configuring Ssl policy.
func (client ApplicationGatewaysClient) ListAvailableSslOptions(ctx context.Context) (result ApplicationGatewayAvailableSslOptions, err error) {
if tracing.IsEnabled() {
@@ -915,6 +761,7 @@ func (client ApplicationGatewaysClient) ListAvailableSslOptions(ctx context.Cont
result, err = client.ListAvailableSslOptionsResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "ListAvailableSslOptions", resp, "Failure responding to request")
+ return
}
return
@@ -926,7 +773,7 @@ func (client ApplicationGatewaysClient) ListAvailableSslOptionsPreparer(ctx cont
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -986,9 +833,11 @@ func (client ApplicationGatewaysClient) ListAvailableSslPredefinedPolicies(ctx c
result.agaspp, err = client.ListAvailableSslPredefinedPoliciesResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "ListAvailableSslPredefinedPolicies", resp, "Failure responding to request")
+ return
}
if result.agaspp.hasNextLink() && result.agaspp.IsEmpty() {
err = result.NextWithContext(ctx)
+ return
}
return
@@ -1000,7 +849,7 @@ func (client ApplicationGatewaysClient) ListAvailableSslPredefinedPoliciesPrepar
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -1096,6 +945,7 @@ func (client ApplicationGatewaysClient) ListAvailableWafRuleSets(ctx context.Con
result, err = client.ListAvailableWafRuleSetsResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "ListAvailableWafRuleSets", resp, "Failure responding to request")
+ return
}
return
@@ -1107,7 +957,7 @@ func (client ApplicationGatewaysClient) ListAvailableWafRuleSetsPreparer(ctx con
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -1161,7 +1011,7 @@ func (client ApplicationGatewaysClient) Start(ctx context.Context, resourceGroup
result, err = client.StartSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "Start", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "Start", nil, "Failure sending request")
return
}
@@ -1176,7 +1026,7 @@ func (client ApplicationGatewaysClient) StartPreparer(ctx context.Context, resou
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -1197,7 +1047,23 @@ func (client ApplicationGatewaysClient) StartSender(req *http.Request) (future A
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStartFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysStartFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
return
}
@@ -1235,7 +1101,7 @@ func (client ApplicationGatewaysClient) Stop(ctx context.Context, resourceGroupN
result, err = client.StopSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "Stop", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "Stop", nil, "Failure sending request")
return
}
@@ -1250,7 +1116,7 @@ func (client ApplicationGatewaysClient) StopPreparer(ctx context.Context, resour
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -1271,7 +1137,23 @@ func (client ApplicationGatewaysClient) StopSender(req *http.Request) (future Ap
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStopFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysStopFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
return
}
@@ -1310,7 +1192,7 @@ func (client ApplicationGatewaysClient) UpdateTags(ctx context.Context, resource
result, err = client.UpdateTagsSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "UpdateTags", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "UpdateTags", nil, "Failure sending request")
return
}
@@ -1325,7 +1207,7 @@ func (client ApplicationGatewaysClient) UpdateTagsPreparer(ctx context.Context,
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -1348,7 +1230,33 @@ func (client ApplicationGatewaysClient) UpdateTagsSender(req *http.Request) (fut
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(client ApplicationGatewaysClient) (ag ApplicationGateway, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysUpdateTagsFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysUpdateTagsFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ ag.Response.Response, err = future.GetResult(sender)
+ if ag.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysUpdateTagsFuture", "Result", nil, "received nil response and error")
+ }
+ if err == nil && ag.Response.Response.StatusCode != http.StatusNoContent {
+ ag, err = client.UpdateTagsResponder(ag.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysUpdateTagsFuture", "Result", ag.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+ }
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/applicationsecuritygroups.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/applicationsecuritygroups.go
similarity index 84%
rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/applicationsecuritygroups.go
rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/applicationsecuritygroups.go
index 43a54190e4b..33db013a862 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/applicationsecuritygroups.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/applicationsecuritygroups.go
@@ -66,7 +66,7 @@ func (client ApplicationSecurityGroupsClient) CreateOrUpdate(ctx context.Context
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsClient", "CreateOrUpdate", nil, "Failure sending request")
return
}
@@ -81,7 +81,7 @@ func (client ApplicationSecurityGroupsClient) CreateOrUpdatePreparer(ctx context
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -105,7 +105,33 @@ func (client ApplicationSecurityGroupsClient) CreateOrUpdateSender(req *http.Req
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(client ApplicationSecurityGroupsClient) (asg ApplicationSecurityGroup, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.ApplicationSecurityGroupsCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ asg.Response.Response, err = future.GetResult(sender)
+ if asg.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsCreateOrUpdateFuture", "Result", nil, "received nil response and error")
+ }
+ if err == nil && asg.Response.Response.StatusCode != http.StatusNoContent {
+ asg, err = client.CreateOrUpdateResponder(asg.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsCreateOrUpdateFuture", "Result", asg.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+ }
return
}
@@ -144,7 +170,7 @@ func (client ApplicationSecurityGroupsClient) Delete(ctx context.Context, resour
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsClient", "Delete", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsClient", "Delete", nil, "Failure sending request")
return
}
@@ -159,7 +185,7 @@ func (client ApplicationSecurityGroupsClient) DeletePreparer(ctx context.Context
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -180,7 +206,23 @@ func (client ApplicationSecurityGroupsClient) DeleteSender(req *http.Request) (f
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(client ApplicationSecurityGroupsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.ApplicationSecurityGroupsDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
return
}
@@ -226,6 +268,7 @@ func (client ApplicationSecurityGroupsClient) Get(ctx context.Context, resourceG
result, err = client.GetResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsClient", "Get", resp, "Failure responding to request")
+ return
}
return
@@ -239,7 +282,7 @@ func (client ApplicationSecurityGroupsClient) GetPreparer(ctx context.Context, r
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -301,9 +344,11 @@ func (client ApplicationSecurityGroupsClient) List(ctx context.Context, resource
result.asglr, err = client.ListResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsClient", "List", resp, "Failure responding to request")
+ return
}
if result.asglr.hasNextLink() && result.asglr.IsEmpty() {
err = result.NextWithContext(ctx)
+ return
}
return
@@ -316,7 +361,7 @@ func (client ApplicationSecurityGroupsClient) ListPreparer(ctx context.Context,
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -413,9 +458,11 @@ func (client ApplicationSecurityGroupsClient) ListAll(ctx context.Context) (resu
result.asglr, err = client.ListAllResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsClient", "ListAll", resp, "Failure responding to request")
+ return
}
if result.asglr.hasNextLink() && result.asglr.IsEmpty() {
err = result.NextWithContext(ctx)
+ return
}
return
@@ -427,7 +474,7 @@ func (client ApplicationSecurityGroupsClient) ListAllPreparer(ctx context.Contex
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -494,81 +541,3 @@ func (client ApplicationSecurityGroupsClient) ListAllComplete(ctx context.Contex
result.page, err = client.ListAll(ctx)
return
}
-
-// UpdateTags updates an application security group's tags.
-// Parameters:
-// resourceGroupName - the name of the resource group.
-// applicationSecurityGroupName - the name of the application security group.
-// parameters - parameters supplied to update application security group tags.
-func (client ApplicationSecurityGroupsClient) UpdateTags(ctx context.Context, resourceGroupName string, applicationSecurityGroupName string, parameters TagsObject) (result ApplicationSecurityGroupsUpdateTagsFuture, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationSecurityGroupsClient.UpdateTags")
- defer func() {
- sc := -1
- if result.Response() != nil {
- sc = result.Response().StatusCode
- }
- tracing.EndSpan(ctx, sc, err)
- }()
- }
- req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, applicationSecurityGroupName, parameters)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsClient", "UpdateTags", nil, "Failure preparing request")
- return
- }
-
- result, err = client.UpdateTagsSender(req)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsClient", "UpdateTags", result.Response(), "Failure sending request")
- return
- }
-
- return
-}
-
-// UpdateTagsPreparer prepares the UpdateTags request.
-func (client ApplicationSecurityGroupsClient) UpdateTagsPreparer(ctx context.Context, resourceGroupName string, applicationSecurityGroupName string, parameters TagsObject) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "applicationSecurityGroupName": autorest.Encode("path", applicationSecurityGroupName),
- "resourceGroupName": autorest.Encode("path", resourceGroupName),
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- }
-
- const APIVersion = "2018-12-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.Network/applicationSecurityGroups/{applicationSecurityGroupName}", 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 ApplicationSecurityGroupsClient) UpdateTagsSender(req *http.Request) (future ApplicationSecurityGroupsUpdateTagsFuture, err error) {
- var resp *http.Response
- resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
- if err != nil {
- return
- }
- future.Future, err = azure.NewFutureFromResponse(resp)
- return
-}
-
-// UpdateTagsResponder handles the response to the UpdateTags request. The method always
-// closes the http.Response Body.
-func (client ApplicationSecurityGroupsClient) UpdateTagsResponder(resp *http.Response) (result ApplicationSecurityGroup, 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/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/availableendpointservices.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/availableendpointservices.go
similarity index 99%
rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/availableendpointservices.go
rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/availableendpointservices.go
index e2e24393ad3..7cf2eee63fc 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/availableendpointservices.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/availableendpointservices.go
@@ -73,9 +73,11 @@ func (client AvailableEndpointServicesClient) List(ctx context.Context, location
result.eslr, err = client.ListResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "network.AvailableEndpointServicesClient", "List", resp, "Failure responding to request")
+ return
}
if result.eslr.hasNextLink() && result.eslr.IsEmpty() {
err = result.NextWithContext(ctx)
+ return
}
return
@@ -88,7 +90,7 @@ func (client AvailableEndpointServicesClient) ListPreparer(ctx context.Context,
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/bgpservicecommunities.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/bgpservicecommunities.go
similarity index 99%
rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/bgpservicecommunities.go
rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/bgpservicecommunities.go
index 61ce92bbe3d..33b3ebb934d 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/bgpservicecommunities.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/bgpservicecommunities.go
@@ -71,9 +71,11 @@ func (client BgpServiceCommunitiesClient) List(ctx context.Context) (result BgpS
result.bsclr, err = client.ListResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "network.BgpServiceCommunitiesClient", "List", resp, "Failure responding to request")
+ return
}
if result.bsclr.hasNextLink() && result.bsclr.IsEmpty() {
err = result.NextWithContext(ctx)
+ return
}
return
@@ -85,7 +87,7 @@ func (client BgpServiceCommunitiesClient) ListPreparer(ctx context.Context) (*ht
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/client.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/client.go
similarity index 60%
rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/client.go
rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/client.go
index 4e39651d3c4..8e44312029b 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/client.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/client.go
@@ -87,6 +87,7 @@ func (client BaseClient) CheckDNSNameAvailability(ctx context.Context, location
result, err = client.CheckDNSNameAvailabilityResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "network.BaseClient", "CheckDNSNameAvailability", resp, "Failure responding to request")
+ return
}
return
@@ -99,7 +100,7 @@ func (client BaseClient) CheckDNSNameAvailabilityPreparer(ctx context.Context, l
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
"domainNameLabel": autorest.Encode("query", domainNameLabel),
@@ -130,78 +131,3 @@ func (client BaseClient) CheckDNSNameAvailabilityResponder(resp *http.Response)
result.Response = autorest.Response{Response: resp}
return
}
-
-// SupportedSecurityProviders gives the supported security providers for the virtual wan.
-// Parameters:
-// resourceGroupName - the resource group name.
-// virtualWANName - the name of the VirtualWAN for which supported security providers are needed.
-func (client BaseClient) SupportedSecurityProviders(ctx context.Context, resourceGroupName string, virtualWANName string) (result VirtualWanSecurityProviders, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.SupportedSecurityProviders")
- defer func() {
- sc := -1
- if result.Response.Response != nil {
- sc = result.Response.Response.StatusCode
- }
- tracing.EndSpan(ctx, sc, err)
- }()
- }
- req, err := client.SupportedSecurityProvidersPreparer(ctx, resourceGroupName, virtualWANName)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.BaseClient", "SupportedSecurityProviders", nil, "Failure preparing request")
- return
- }
-
- resp, err := client.SupportedSecurityProvidersSender(req)
- if err != nil {
- result.Response = autorest.Response{Response: resp}
- err = autorest.NewErrorWithError(err, "network.BaseClient", "SupportedSecurityProviders", resp, "Failure sending request")
- return
- }
-
- result, err = client.SupportedSecurityProvidersResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.BaseClient", "SupportedSecurityProviders", resp, "Failure responding to request")
- }
-
- return
-}
-
-// SupportedSecurityProvidersPreparer prepares the SupportedSecurityProviders request.
-func (client BaseClient) SupportedSecurityProvidersPreparer(ctx context.Context, resourceGroupName string, virtualWANName string) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "resourceGroupName": autorest.Encode("path", resourceGroupName),
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- "virtualWANName": autorest.Encode("path", virtualWANName),
- }
-
- const APIVersion = "2018-12-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.Network/virtualWans/{virtualWANName}/supportedSecurityProviders", pathParameters),
- autorest.WithQueryParameters(queryParameters))
- return preparer.Prepare((&http.Request{}).WithContext(ctx))
-}
-
-// SupportedSecurityProvidersSender sends the SupportedSecurityProviders request. The method will close the
-// http.Response Body if it receives an error.
-func (client BaseClient) SupportedSecurityProvidersSender(req *http.Request) (*http.Response, error) {
- return client.Send(req, azure.DoRetryWithRegistration(client.Client))
-}
-
-// SupportedSecurityProvidersResponder handles the response to the SupportedSecurityProviders request. The method always
-// closes the http.Response Body.
-func (client BaseClient) SupportedSecurityProvidersResponder(resp *http.Response) (result VirtualWanSecurityProviders, 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/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/connectionmonitors.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/connectionmonitors.go
similarity index 83%
rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/connectionmonitors.go
rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/connectionmonitors.go
index 5cac711bcf1..f4c550b0064 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/connectionmonitors.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/connectionmonitors.go
@@ -78,7 +78,7 @@ func (client ConnectionMonitorsClient) CreateOrUpdate(ctx context.Context, resou
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsClient", "CreateOrUpdate", nil, "Failure sending request")
return
}
@@ -94,7 +94,7 @@ func (client ConnectionMonitorsClient) CreateOrUpdatePreparer(ctx context.Contex
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -117,7 +117,33 @@ func (client ConnectionMonitorsClient) CreateOrUpdateSender(req *http.Request) (
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(client ConnectionMonitorsClient) (cmr ConnectionMonitorResult, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ cmr.Response.Response, err = future.GetResult(sender)
+ if cmr.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsCreateOrUpdateFuture", "Result", nil, "received nil response and error")
+ }
+ if err == nil && cmr.Response.Response.StatusCode != http.StatusNoContent {
+ cmr, err = client.CreateOrUpdateResponder(cmr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsCreateOrUpdateFuture", "Result", cmr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+ }
return
}
@@ -157,7 +183,7 @@ func (client ConnectionMonitorsClient) Delete(ctx context.Context, resourceGroup
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsClient", "Delete", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsClient", "Delete", nil, "Failure sending request")
return
}
@@ -173,7 +199,7 @@ func (client ConnectionMonitorsClient) DeletePreparer(ctx context.Context, resou
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -194,7 +220,23 @@ func (client ConnectionMonitorsClient) DeleteSender(req *http.Request) (future C
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(client ConnectionMonitorsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
return
}
@@ -241,6 +283,7 @@ func (client ConnectionMonitorsClient) Get(ctx context.Context, resourceGroupNam
result, err = client.GetResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsClient", "Get", resp, "Failure responding to request")
+ return
}
return
@@ -255,7 +298,7 @@ func (client ConnectionMonitorsClient) GetPreparer(ctx context.Context, resource
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -317,6 +360,7 @@ func (client ConnectionMonitorsClient) List(ctx context.Context, resourceGroupNa
result, err = client.ListResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsClient", "List", resp, "Failure responding to request")
+ return
}
return
@@ -330,7 +374,7 @@ func (client ConnectionMonitorsClient) ListPreparer(ctx context.Context, resourc
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -385,7 +429,7 @@ func (client ConnectionMonitorsClient) Query(ctx context.Context, resourceGroupN
result, err = client.QuerySender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsClient", "Query", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsClient", "Query", nil, "Failure sending request")
return
}
@@ -401,7 +445,7 @@ func (client ConnectionMonitorsClient) QueryPreparer(ctx context.Context, resour
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -422,7 +466,33 @@ func (client ConnectionMonitorsClient) QuerySender(req *http.Request) (future Co
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(client ConnectionMonitorsClient) (cmqr ConnectionMonitorQueryResult, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsQueryFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsQueryFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ cmqr.Response.Response, err = future.GetResult(sender)
+ if cmqr.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsQueryFuture", "Result", nil, "received nil response and error")
+ }
+ if err == nil && cmqr.Response.Response.StatusCode != http.StatusNoContent {
+ cmqr, err = client.QueryResponder(cmqr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsQueryFuture", "Result", cmqr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+ }
return
}
@@ -462,7 +532,7 @@ func (client ConnectionMonitorsClient) Start(ctx context.Context, resourceGroupN
result, err = client.StartSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsClient", "Start", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsClient", "Start", nil, "Failure sending request")
return
}
@@ -478,7 +548,7 @@ func (client ConnectionMonitorsClient) StartPreparer(ctx context.Context, resour
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -499,7 +569,23 @@ func (client ConnectionMonitorsClient) StartSender(req *http.Request) (future Co
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(client ConnectionMonitorsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsStartFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsStartFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
return
}
@@ -538,7 +624,7 @@ func (client ConnectionMonitorsClient) Stop(ctx context.Context, resourceGroupNa
result, err = client.StopSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsClient", "Stop", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsClient", "Stop", nil, "Failure sending request")
return
}
@@ -554,7 +640,7 @@ func (client ConnectionMonitorsClient) StopPreparer(ctx context.Context, resourc
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -575,7 +661,23 @@ func (client ConnectionMonitorsClient) StopSender(req *http.Request) (future Con
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(client ConnectionMonitorsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsStopFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsStopFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/defaultsecurityrules.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/defaultsecurityrules.go
similarity index 99%
rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/defaultsecurityrules.go
rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/defaultsecurityrules.go
index a286a126c93..8c1e456325a 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/defaultsecurityrules.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/defaultsecurityrules.go
@@ -74,6 +74,7 @@ func (client DefaultSecurityRulesClient) Get(ctx context.Context, resourceGroupN
result, err = client.GetResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "network.DefaultSecurityRulesClient", "Get", resp, "Failure responding to request")
+ return
}
return
@@ -88,7 +89,7 @@ func (client DefaultSecurityRulesClient) GetPreparer(ctx context.Context, resour
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -151,9 +152,11 @@ func (client DefaultSecurityRulesClient) List(ctx context.Context, resourceGroup
result.srlr, err = client.ListResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "network.DefaultSecurityRulesClient", "List", resp, "Failure responding to request")
+ return
}
if result.srlr.hasNextLink() && result.srlr.IsEmpty() {
err = result.NextWithContext(ctx)
+ return
}
return
@@ -167,7 +170,7 @@ func (client DefaultSecurityRulesClient) ListPreparer(ctx context.Context, resou
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/enums.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/enums.go
similarity index 57%
rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/enums.go
rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/enums.go
index 879adc554fb..01df48a6322 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/enums.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/enums.go
@@ -69,22 +69,6 @@ func PossibleApplicationGatewayCookieBasedAffinityValues() []ApplicationGatewayC
return []ApplicationGatewayCookieBasedAffinity{Disabled, Enabled}
}
-// ApplicationGatewayCustomErrorStatusCode enumerates the values for application gateway custom error status
-// code.
-type ApplicationGatewayCustomErrorStatusCode string
-
-const (
- // HTTPStatus403 ...
- HTTPStatus403 ApplicationGatewayCustomErrorStatusCode = "HttpStatus403"
- // HTTPStatus502 ...
- HTTPStatus502 ApplicationGatewayCustomErrorStatusCode = "HttpStatus502"
-)
-
-// PossibleApplicationGatewayCustomErrorStatusCodeValues returns an array of possible values for the ApplicationGatewayCustomErrorStatusCode const type.
-func PossibleApplicationGatewayCustomErrorStatusCodeValues() []ApplicationGatewayCustomErrorStatusCode {
- return []ApplicationGatewayCustomErrorStatusCode{HTTPStatus403, HTTPStatus502}
-}
-
// ApplicationGatewayFirewallMode enumerates the values for application gateway firewall mode.
type ApplicationGatewayFirewallMode string
@@ -179,19 +163,15 @@ const (
StandardMedium ApplicationGatewaySkuName = "Standard_Medium"
// StandardSmall ...
StandardSmall ApplicationGatewaySkuName = "Standard_Small"
- // StandardV2 ...
- StandardV2 ApplicationGatewaySkuName = "Standard_v2"
// WAFLarge ...
WAFLarge ApplicationGatewaySkuName = "WAF_Large"
// WAFMedium ...
WAFMedium ApplicationGatewaySkuName = "WAF_Medium"
- // WAFV2 ...
- WAFV2 ApplicationGatewaySkuName = "WAF_v2"
)
// PossibleApplicationGatewaySkuNameValues returns an array of possible values for the ApplicationGatewaySkuName const type.
func PossibleApplicationGatewaySkuNameValues() []ApplicationGatewaySkuName {
- return []ApplicationGatewaySkuName{StandardLarge, StandardMedium, StandardSmall, StandardV2, WAFLarge, WAFMedium, WAFV2}
+ return []ApplicationGatewaySkuName{StandardLarge, StandardMedium, StandardSmall, WAFLarge, WAFMedium}
}
// ApplicationGatewaySslCipherSuite enumerates the values for application gateway ssl cipher suite.
@@ -314,19 +294,15 @@ func PossibleApplicationGatewaySslProtocolValues() []ApplicationGatewaySslProtoc
type ApplicationGatewayTier string
const (
- // ApplicationGatewayTierStandard ...
- ApplicationGatewayTierStandard ApplicationGatewayTier = "Standard"
- // ApplicationGatewayTierStandardV2 ...
- ApplicationGatewayTierStandardV2 ApplicationGatewayTier = "Standard_v2"
- // ApplicationGatewayTierWAF ...
- ApplicationGatewayTierWAF ApplicationGatewayTier = "WAF"
- // ApplicationGatewayTierWAFV2 ...
- ApplicationGatewayTierWAFV2 ApplicationGatewayTier = "WAF_v2"
+ // Standard ...
+ Standard ApplicationGatewayTier = "Standard"
+ // WAF ...
+ WAF ApplicationGatewayTier = "WAF"
)
// PossibleApplicationGatewayTierValues returns an array of possible values for the ApplicationGatewayTier const type.
func PossibleApplicationGatewayTierValues() []ApplicationGatewayTier {
- return []ApplicationGatewayTier{ApplicationGatewayTierStandard, ApplicationGatewayTierStandardV2, ApplicationGatewayTierWAF, ApplicationGatewayTierWAFV2}
+ return []ApplicationGatewayTier{Standard, WAF}
}
// AssociationType enumerates the values for association type.
@@ -374,90 +350,6 @@ func PossibleAuthorizationUseStatusValues() []AuthorizationUseStatus {
return []AuthorizationUseStatus{Available, InUse}
}
-// AzureFirewallApplicationRuleProtocolType enumerates the values for azure firewall application rule protocol
-// type.
-type AzureFirewallApplicationRuleProtocolType string
-
-const (
- // AzureFirewallApplicationRuleProtocolTypeHTTP ...
- AzureFirewallApplicationRuleProtocolTypeHTTP AzureFirewallApplicationRuleProtocolType = "Http"
- // AzureFirewallApplicationRuleProtocolTypeHTTPS ...
- AzureFirewallApplicationRuleProtocolTypeHTTPS AzureFirewallApplicationRuleProtocolType = "Https"
-)
-
-// PossibleAzureFirewallApplicationRuleProtocolTypeValues returns an array of possible values for the AzureFirewallApplicationRuleProtocolType const type.
-func PossibleAzureFirewallApplicationRuleProtocolTypeValues() []AzureFirewallApplicationRuleProtocolType {
- return []AzureFirewallApplicationRuleProtocolType{AzureFirewallApplicationRuleProtocolTypeHTTP, AzureFirewallApplicationRuleProtocolTypeHTTPS}
-}
-
-// AzureFirewallNatRCActionType enumerates the values for azure firewall nat rc action type.
-type AzureFirewallNatRCActionType string
-
-const (
- // Dnat ...
- Dnat AzureFirewallNatRCActionType = "Dnat"
- // Snat ...
- Snat AzureFirewallNatRCActionType = "Snat"
-)
-
-// PossibleAzureFirewallNatRCActionTypeValues returns an array of possible values for the AzureFirewallNatRCActionType const type.
-func PossibleAzureFirewallNatRCActionTypeValues() []AzureFirewallNatRCActionType {
- return []AzureFirewallNatRCActionType{Dnat, Snat}
-}
-
-// AzureFirewallNetworkRuleProtocol enumerates the values for azure firewall network rule protocol.
-type AzureFirewallNetworkRuleProtocol string
-
-const (
- // Any ...
- Any AzureFirewallNetworkRuleProtocol = "Any"
- // ICMP ...
- ICMP AzureFirewallNetworkRuleProtocol = "ICMP"
- // TCP ...
- TCP AzureFirewallNetworkRuleProtocol = "TCP"
- // UDP ...
- UDP AzureFirewallNetworkRuleProtocol = "UDP"
-)
-
-// PossibleAzureFirewallNetworkRuleProtocolValues returns an array of possible values for the AzureFirewallNetworkRuleProtocol const type.
-func PossibleAzureFirewallNetworkRuleProtocolValues() []AzureFirewallNetworkRuleProtocol {
- return []AzureFirewallNetworkRuleProtocol{Any, ICMP, TCP, UDP}
-}
-
-// AzureFirewallRCActionType enumerates the values for azure firewall rc action type.
-type AzureFirewallRCActionType string
-
-const (
- // AzureFirewallRCActionTypeAlert ...
- AzureFirewallRCActionTypeAlert AzureFirewallRCActionType = "Alert"
- // AzureFirewallRCActionTypeAllow ...
- AzureFirewallRCActionTypeAllow AzureFirewallRCActionType = "Allow"
- // AzureFirewallRCActionTypeDeny ...
- AzureFirewallRCActionTypeDeny AzureFirewallRCActionType = "Deny"
-)
-
-// PossibleAzureFirewallRCActionTypeValues returns an array of possible values for the AzureFirewallRCActionType const type.
-func PossibleAzureFirewallRCActionTypeValues() []AzureFirewallRCActionType {
- return []AzureFirewallRCActionType{AzureFirewallRCActionTypeAlert, AzureFirewallRCActionTypeAllow, AzureFirewallRCActionTypeDeny}
-}
-
-// AzureFirewallThreatIntelMode enumerates the values for azure firewall threat intel mode.
-type AzureFirewallThreatIntelMode string
-
-const (
- // AzureFirewallThreatIntelModeAlert ...
- AzureFirewallThreatIntelModeAlert AzureFirewallThreatIntelMode = "Alert"
- // AzureFirewallThreatIntelModeDeny ...
- AzureFirewallThreatIntelModeDeny AzureFirewallThreatIntelMode = "Deny"
- // AzureFirewallThreatIntelModeOff ...
- AzureFirewallThreatIntelModeOff AzureFirewallThreatIntelMode = "Off"
-)
-
-// PossibleAzureFirewallThreatIntelModeValues returns an array of possible values for the AzureFirewallThreatIntelMode const type.
-func PossibleAzureFirewallThreatIntelModeValues() []AzureFirewallThreatIntelMode {
- return []AzureFirewallThreatIntelMode{AzureFirewallThreatIntelModeAlert, AzureFirewallThreatIntelModeDeny, AzureFirewallThreatIntelModeOff}
-}
-
// BgpPeerState enumerates the values for bgp peer state.
type BgpPeerState string
@@ -479,40 +371,6 @@ func PossibleBgpPeerStateValues() []BgpPeerState {
return []BgpPeerState{BgpPeerStateConnected, BgpPeerStateConnecting, BgpPeerStateIdle, BgpPeerStateStopped, BgpPeerStateUnknown}
}
-// CircuitConnectionStatus enumerates the values for circuit connection status.
-type CircuitConnectionStatus string
-
-const (
- // Connected ...
- Connected CircuitConnectionStatus = "Connected"
- // Connecting ...
- Connecting CircuitConnectionStatus = "Connecting"
- // Disconnected ...
- Disconnected CircuitConnectionStatus = "Disconnected"
-)
-
-// PossibleCircuitConnectionStatusValues returns an array of possible values for the CircuitConnectionStatus const type.
-func PossibleCircuitConnectionStatusValues() []CircuitConnectionStatus {
- return []CircuitConnectionStatus{Connected, Connecting, Disconnected}
-}
-
-// ConnectionMonitorSourceStatus enumerates the values for connection monitor source status.
-type ConnectionMonitorSourceStatus string
-
-const (
- // ConnectionMonitorSourceStatusActive ...
- ConnectionMonitorSourceStatusActive ConnectionMonitorSourceStatus = "Active"
- // ConnectionMonitorSourceStatusInactive ...
- ConnectionMonitorSourceStatusInactive ConnectionMonitorSourceStatus = "Inactive"
- // ConnectionMonitorSourceStatusUnknown ...
- ConnectionMonitorSourceStatusUnknown ConnectionMonitorSourceStatus = "Unknown"
-)
-
-// PossibleConnectionMonitorSourceStatusValues returns an array of possible values for the ConnectionMonitorSourceStatus const type.
-func PossibleConnectionMonitorSourceStatusValues() []ConnectionMonitorSourceStatus {
- return []ConnectionMonitorSourceStatus{ConnectionMonitorSourceStatusActive, ConnectionMonitorSourceStatusInactive, ConnectionMonitorSourceStatusUnknown}
-}
-
// ConnectionState enumerates the values for connection state.
type ConnectionState string
@@ -549,43 +407,6 @@ func PossibleConnectionStatusValues() []ConnectionStatus {
return []ConnectionStatus{ConnectionStatusConnected, ConnectionStatusDegraded, ConnectionStatusDisconnected, ConnectionStatusUnknown}
}
-// DdosCustomPolicyProtocol enumerates the values for ddos custom policy protocol.
-type DdosCustomPolicyProtocol string
-
-const (
- // DdosCustomPolicyProtocolSyn ...
- DdosCustomPolicyProtocolSyn DdosCustomPolicyProtocol = "Syn"
- // DdosCustomPolicyProtocolTCP ...
- DdosCustomPolicyProtocolTCP DdosCustomPolicyProtocol = "Tcp"
- // DdosCustomPolicyProtocolUDP ...
- DdosCustomPolicyProtocolUDP DdosCustomPolicyProtocol = "Udp"
-)
-
-// PossibleDdosCustomPolicyProtocolValues returns an array of possible values for the DdosCustomPolicyProtocol const type.
-func PossibleDdosCustomPolicyProtocolValues() []DdosCustomPolicyProtocol {
- return []DdosCustomPolicyProtocol{DdosCustomPolicyProtocolSyn, DdosCustomPolicyProtocolTCP, DdosCustomPolicyProtocolUDP}
-}
-
-// DdosCustomPolicyTriggerSensitivityOverride enumerates the values for ddos custom policy trigger sensitivity
-// override.
-type DdosCustomPolicyTriggerSensitivityOverride string
-
-const (
- // Default ...
- Default DdosCustomPolicyTriggerSensitivityOverride = "Default"
- // High ...
- High DdosCustomPolicyTriggerSensitivityOverride = "High"
- // Low ...
- Low DdosCustomPolicyTriggerSensitivityOverride = "Low"
- // Relaxed ...
- Relaxed DdosCustomPolicyTriggerSensitivityOverride = "Relaxed"
-)
-
-// PossibleDdosCustomPolicyTriggerSensitivityOverrideValues returns an array of possible values for the DdosCustomPolicyTriggerSensitivityOverride const type.
-func PossibleDdosCustomPolicyTriggerSensitivityOverrideValues() []DdosCustomPolicyTriggerSensitivityOverride {
- return []DdosCustomPolicyTriggerSensitivityOverride{Default, High, Low, Relaxed}
-}
-
// DhGroup enumerates the values for dh group.
type DhGroup string
@@ -666,17 +487,17 @@ func PossibleEffectiveRouteStateValues() []EffectiveRouteState {
type EffectiveSecurityRuleProtocol string
const (
- // EffectiveSecurityRuleProtocolAll ...
- EffectiveSecurityRuleProtocolAll EffectiveSecurityRuleProtocol = "All"
- // EffectiveSecurityRuleProtocolTCP ...
- EffectiveSecurityRuleProtocolTCP EffectiveSecurityRuleProtocol = "Tcp"
- // EffectiveSecurityRuleProtocolUDP ...
- EffectiveSecurityRuleProtocolUDP EffectiveSecurityRuleProtocol = "Udp"
+ // All ...
+ All EffectiveSecurityRuleProtocol = "All"
+ // TCP ...
+ TCP EffectiveSecurityRuleProtocol = "Tcp"
+ // UDP ...
+ UDP EffectiveSecurityRuleProtocol = "Udp"
)
// PossibleEffectiveSecurityRuleProtocolValues returns an array of possible values for the EffectiveSecurityRuleProtocol const type.
func PossibleEffectiveSecurityRuleProtocolValues() []EffectiveSecurityRuleProtocol {
- return []EffectiveSecurityRuleProtocol{EffectiveSecurityRuleProtocolAll, EffectiveSecurityRuleProtocolTCP, EffectiveSecurityRuleProtocolUDP}
+ return []EffectiveSecurityRuleProtocol{All, TCP, UDP}
}
// EvaluationState enumerates the values for evaluation state.
@@ -731,6 +552,23 @@ func PossibleExpressRouteCircuitPeeringStateValues() []ExpressRouteCircuitPeerin
return []ExpressRouteCircuitPeeringState{ExpressRouteCircuitPeeringStateDisabled, ExpressRouteCircuitPeeringStateEnabled}
}
+// ExpressRouteCircuitPeeringType enumerates the values for express route circuit peering type.
+type ExpressRouteCircuitPeeringType string
+
+const (
+ // AzurePrivatePeering ...
+ AzurePrivatePeering ExpressRouteCircuitPeeringType = "AzurePrivatePeering"
+ // AzurePublicPeering ...
+ AzurePublicPeering ExpressRouteCircuitPeeringType = "AzurePublicPeering"
+ // MicrosoftPeering ...
+ MicrosoftPeering ExpressRouteCircuitPeeringType = "MicrosoftPeering"
+)
+
+// PossibleExpressRouteCircuitPeeringTypeValues returns an array of possible values for the ExpressRouteCircuitPeeringType const type.
+func PossibleExpressRouteCircuitPeeringTypeValues() []ExpressRouteCircuitPeeringType {
+ return []ExpressRouteCircuitPeeringType{AzurePrivatePeering, AzurePublicPeering, MicrosoftPeering}
+}
+
// ExpressRouteCircuitSkuFamily enumerates the values for express route circuit sku family.
type ExpressRouteCircuitSkuFamily string
@@ -750,10 +588,6 @@ func PossibleExpressRouteCircuitSkuFamilyValues() []ExpressRouteCircuitSkuFamily
type ExpressRouteCircuitSkuTier string
const (
- // ExpressRouteCircuitSkuTierBasic ...
- ExpressRouteCircuitSkuTierBasic ExpressRouteCircuitSkuTier = "Basic"
- // ExpressRouteCircuitSkuTierLocal ...
- ExpressRouteCircuitSkuTierLocal ExpressRouteCircuitSkuTier = "Local"
// ExpressRouteCircuitSkuTierPremium ...
ExpressRouteCircuitSkuTierPremium ExpressRouteCircuitSkuTier = "Premium"
// ExpressRouteCircuitSkuTierStandard ...
@@ -762,129 +596,7 @@ const (
// PossibleExpressRouteCircuitSkuTierValues returns an array of possible values for the ExpressRouteCircuitSkuTier const type.
func PossibleExpressRouteCircuitSkuTierValues() []ExpressRouteCircuitSkuTier {
- return []ExpressRouteCircuitSkuTier{ExpressRouteCircuitSkuTierBasic, ExpressRouteCircuitSkuTierLocal, ExpressRouteCircuitSkuTierPremium, ExpressRouteCircuitSkuTierStandard}
-}
-
-// ExpressRouteLinkAdminState enumerates the values for express route link admin state.
-type ExpressRouteLinkAdminState string
-
-const (
- // ExpressRouteLinkAdminStateDisabled ...
- ExpressRouteLinkAdminStateDisabled ExpressRouteLinkAdminState = "Disabled"
- // ExpressRouteLinkAdminStateEnabled ...
- ExpressRouteLinkAdminStateEnabled ExpressRouteLinkAdminState = "Enabled"
-)
-
-// PossibleExpressRouteLinkAdminStateValues returns an array of possible values for the ExpressRouteLinkAdminState const type.
-func PossibleExpressRouteLinkAdminStateValues() []ExpressRouteLinkAdminState {
- return []ExpressRouteLinkAdminState{ExpressRouteLinkAdminStateDisabled, ExpressRouteLinkAdminStateEnabled}
-}
-
-// ExpressRouteLinkConnectorType enumerates the values for express route link connector type.
-type ExpressRouteLinkConnectorType string
-
-const (
- // LC ...
- LC ExpressRouteLinkConnectorType = "LC"
- // SC ...
- SC ExpressRouteLinkConnectorType = "SC"
-)
-
-// PossibleExpressRouteLinkConnectorTypeValues returns an array of possible values for the ExpressRouteLinkConnectorType const type.
-func PossibleExpressRouteLinkConnectorTypeValues() []ExpressRouteLinkConnectorType {
- return []ExpressRouteLinkConnectorType{LC, SC}
-}
-
-// ExpressRoutePeeringState enumerates the values for express route peering state.
-type ExpressRoutePeeringState string
-
-const (
- // ExpressRoutePeeringStateDisabled ...
- ExpressRoutePeeringStateDisabled ExpressRoutePeeringState = "Disabled"
- // ExpressRoutePeeringStateEnabled ...
- ExpressRoutePeeringStateEnabled ExpressRoutePeeringState = "Enabled"
-)
-
-// PossibleExpressRoutePeeringStateValues returns an array of possible values for the ExpressRoutePeeringState const type.
-func PossibleExpressRoutePeeringStateValues() []ExpressRoutePeeringState {
- return []ExpressRoutePeeringState{ExpressRoutePeeringStateDisabled, ExpressRoutePeeringStateEnabled}
-}
-
-// ExpressRoutePeeringType enumerates the values for express route peering type.
-type ExpressRoutePeeringType string
-
-const (
- // AzurePrivatePeering ...
- AzurePrivatePeering ExpressRoutePeeringType = "AzurePrivatePeering"
- // AzurePublicPeering ...
- AzurePublicPeering ExpressRoutePeeringType = "AzurePublicPeering"
- // MicrosoftPeering ...
- MicrosoftPeering ExpressRoutePeeringType = "MicrosoftPeering"
-)
-
-// PossibleExpressRoutePeeringTypeValues returns an array of possible values for the ExpressRoutePeeringType const type.
-func PossibleExpressRoutePeeringTypeValues() []ExpressRoutePeeringType {
- return []ExpressRoutePeeringType{AzurePrivatePeering, AzurePublicPeering, MicrosoftPeering}
-}
-
-// ExpressRoutePortsEncapsulation enumerates the values for express route ports encapsulation.
-type ExpressRoutePortsEncapsulation string
-
-const (
- // Dot1Q ...
- Dot1Q ExpressRoutePortsEncapsulation = "Dot1Q"
- // QinQ ...
- QinQ ExpressRoutePortsEncapsulation = "QinQ"
-)
-
-// PossibleExpressRoutePortsEncapsulationValues returns an array of possible values for the ExpressRoutePortsEncapsulation const type.
-func PossibleExpressRoutePortsEncapsulationValues() []ExpressRoutePortsEncapsulation {
- return []ExpressRoutePortsEncapsulation{Dot1Q, QinQ}
-}
-
-// FlowLogFormatType enumerates the values for flow log format type.
-type FlowLogFormatType string
-
-const (
- // JSON ...
- JSON FlowLogFormatType = "JSON"
-)
-
-// PossibleFlowLogFormatTypeValues returns an array of possible values for the FlowLogFormatType const type.
-func PossibleFlowLogFormatTypeValues() []FlowLogFormatType {
- return []FlowLogFormatType{JSON}
-}
-
-// HTTPMethod enumerates the values for http method.
-type HTTPMethod string
-
-const (
- // Get ...
- Get HTTPMethod = "Get"
-)
-
-// PossibleHTTPMethodValues returns an array of possible values for the HTTPMethod const type.
-func PossibleHTTPMethodValues() []HTTPMethod {
- return []HTTPMethod{Get}
-}
-
-// HubVirtualNetworkConnectionStatus enumerates the values for hub virtual network connection status.
-type HubVirtualNetworkConnectionStatus string
-
-const (
- // HubVirtualNetworkConnectionStatusConnected ...
- HubVirtualNetworkConnectionStatusConnected HubVirtualNetworkConnectionStatus = "Connected"
- // HubVirtualNetworkConnectionStatusConnecting ...
- HubVirtualNetworkConnectionStatusConnecting HubVirtualNetworkConnectionStatus = "Connecting"
- // HubVirtualNetworkConnectionStatusNotConnected ...
- HubVirtualNetworkConnectionStatusNotConnected HubVirtualNetworkConnectionStatus = "NotConnected"
- // HubVirtualNetworkConnectionStatusUnknown ...
- HubVirtualNetworkConnectionStatusUnknown HubVirtualNetworkConnectionStatus = "Unknown"
-)
-
-// PossibleHubVirtualNetworkConnectionStatusValues returns an array of possible values for the HubVirtualNetworkConnectionStatus const type.
-func PossibleHubVirtualNetworkConnectionStatusValues() []HubVirtualNetworkConnectionStatus {
- return []HubVirtualNetworkConnectionStatus{HubVirtualNetworkConnectionStatusConnected, HubVirtualNetworkConnectionStatusConnecting, HubVirtualNetworkConnectionStatusNotConnected, HubVirtualNetworkConnectionStatusUnknown}
+ return []ExpressRouteCircuitSkuTier{ExpressRouteCircuitSkuTierPremium, ExpressRouteCircuitSkuTierStandard}
}
// IkeEncryption enumerates the values for ike encryption.
@@ -901,38 +613,30 @@ const (
DES IkeEncryption = "DES"
// DES3 ...
DES3 IkeEncryption = "DES3"
- // GCMAES128 ...
- GCMAES128 IkeEncryption = "GCMAES128"
- // GCMAES256 ...
- GCMAES256 IkeEncryption = "GCMAES256"
)
// PossibleIkeEncryptionValues returns an array of possible values for the IkeEncryption const type.
func PossibleIkeEncryptionValues() []IkeEncryption {
- return []IkeEncryption{AES128, AES192, AES256, DES, DES3, GCMAES128, GCMAES256}
+ return []IkeEncryption{AES128, AES192, AES256, DES, DES3}
}
// IkeIntegrity enumerates the values for ike integrity.
type IkeIntegrity string
const (
- // IkeIntegrityGCMAES128 ...
- IkeIntegrityGCMAES128 IkeIntegrity = "GCMAES128"
- // IkeIntegrityGCMAES256 ...
- IkeIntegrityGCMAES256 IkeIntegrity = "GCMAES256"
- // IkeIntegrityMD5 ...
- IkeIntegrityMD5 IkeIntegrity = "MD5"
- // IkeIntegritySHA1 ...
- IkeIntegritySHA1 IkeIntegrity = "SHA1"
- // IkeIntegritySHA256 ...
- IkeIntegritySHA256 IkeIntegrity = "SHA256"
- // IkeIntegritySHA384 ...
- IkeIntegritySHA384 IkeIntegrity = "SHA384"
+ // MD5 ...
+ MD5 IkeIntegrity = "MD5"
+ // SHA1 ...
+ SHA1 IkeIntegrity = "SHA1"
+ // SHA256 ...
+ SHA256 IkeIntegrity = "SHA256"
+ // SHA384 ...
+ SHA384 IkeIntegrity = "SHA384"
)
// PossibleIkeIntegrityValues returns an array of possible values for the IkeIntegrity const type.
func PossibleIkeIntegrityValues() []IkeIntegrity {
- return []IkeIntegrity{IkeIntegrityGCMAES128, IkeIntegrityGCMAES256, IkeIntegrityMD5, IkeIntegritySHA1, IkeIntegritySHA256, IkeIntegritySHA384}
+ return []IkeIntegrity{MD5, SHA1, SHA256, SHA384}
}
// IPAllocationMethod enumerates the values for ip allocation method.
@@ -950,21 +654,6 @@ func PossibleIPAllocationMethodValues() []IPAllocationMethod {
return []IPAllocationMethod{Dynamic, Static}
}
-// IPFlowProtocol enumerates the values for ip flow protocol.
-type IPFlowProtocol string
-
-const (
- // IPFlowProtocolTCP ...
- IPFlowProtocolTCP IPFlowProtocol = "TCP"
- // IPFlowProtocolUDP ...
- IPFlowProtocolUDP IPFlowProtocol = "UDP"
-)
-
-// PossibleIPFlowProtocolValues returns an array of possible values for the IPFlowProtocol const type.
-func PossibleIPFlowProtocolValues() []IPFlowProtocol {
- return []IPFlowProtocol{IPFlowProtocolTCP, IPFlowProtocolUDP}
-}
-
// IpsecEncryption enumerates the values for ipsec encryption.
type IpsecEncryption string
@@ -1080,17 +769,17 @@ func PossibleLoadBalancerSkuNameValues() []LoadBalancerSkuName {
type LoadDistribution string
const (
- // LoadDistributionDefault ...
- LoadDistributionDefault LoadDistribution = "Default"
- // LoadDistributionSourceIP ...
- LoadDistributionSourceIP LoadDistribution = "SourceIP"
- // LoadDistributionSourceIPProtocol ...
- LoadDistributionSourceIPProtocol LoadDistribution = "SourceIPProtocol"
+ // Default ...
+ Default LoadDistribution = "Default"
+ // SourceIP ...
+ SourceIP LoadDistribution = "SourceIP"
+ // SourceIPProtocol ...
+ SourceIPProtocol LoadDistribution = "SourceIPProtocol"
)
// PossibleLoadDistributionValues returns an array of possible values for the LoadDistribution const type.
func PossibleLoadDistributionValues() []LoadDistribution {
- return []LoadDistribution{LoadDistributionDefault, LoadDistributionSourceIP, LoadDistributionSourceIPProtocol}
+ return []LoadDistribution{Default, SourceIP, SourceIPProtocol}
}
// NextHopType enumerates the values for next hop type.
@@ -1116,25 +805,6 @@ func PossibleNextHopTypeValues() []NextHopType {
return []NextHopType{NextHopTypeHyperNetGateway, NextHopTypeInternet, NextHopTypeNone, NextHopTypeVirtualAppliance, NextHopTypeVirtualNetworkGateway, NextHopTypeVnetLocal}
}
-// OfficeTrafficCategory enumerates the values for office traffic category.
-type OfficeTrafficCategory string
-
-const (
- // OfficeTrafficCategoryAll ...
- OfficeTrafficCategoryAll OfficeTrafficCategory = "All"
- // OfficeTrafficCategoryNone ...
- OfficeTrafficCategoryNone OfficeTrafficCategory = "None"
- // OfficeTrafficCategoryOptimize ...
- OfficeTrafficCategoryOptimize OfficeTrafficCategory = "Optimize"
- // OfficeTrafficCategoryOptimizeAndAllow ...
- OfficeTrafficCategoryOptimizeAndAllow OfficeTrafficCategory = "OptimizeAndAllow"
-)
-
-// PossibleOfficeTrafficCategoryValues returns an array of possible values for the OfficeTrafficCategory const type.
-func PossibleOfficeTrafficCategoryValues() []OfficeTrafficCategory {
- return []OfficeTrafficCategory{OfficeTrafficCategoryAll, OfficeTrafficCategoryNone, OfficeTrafficCategoryOptimize, OfficeTrafficCategoryOptimizeAndAllow}
-}
-
// OperationStatus enumerates the values for operation status.
type OperationStatus string
@@ -1240,21 +910,17 @@ const (
PfsGroupNone PfsGroup = "None"
// PfsGroupPFS1 ...
PfsGroupPFS1 PfsGroup = "PFS1"
- // PfsGroupPFS14 ...
- PfsGroupPFS14 PfsGroup = "PFS14"
// PfsGroupPFS2 ...
PfsGroupPFS2 PfsGroup = "PFS2"
// PfsGroupPFS2048 ...
PfsGroupPFS2048 PfsGroup = "PFS2048"
// PfsGroupPFS24 ...
PfsGroupPFS24 PfsGroup = "PFS24"
- // PfsGroupPFSMM ...
- PfsGroupPFSMM PfsGroup = "PFSMM"
)
// PossiblePfsGroupValues returns an array of possible values for the PfsGroup const type.
func PossiblePfsGroupValues() []PfsGroup {
- return []PfsGroup{PfsGroupECP256, PfsGroupECP384, PfsGroupNone, PfsGroupPFS1, PfsGroupPFS14, PfsGroupPFS2, PfsGroupPFS2048, PfsGroupPFS24, PfsGroupPFSMM}
+ return []PfsGroup{PfsGroupECP256, PfsGroupECP384, PfsGroupNone, PfsGroupPFS1, PfsGroupPFS2, PfsGroupPFS2048, PfsGroupPFS24}
}
// ProbeProtocol enumerates the values for probe protocol.
@@ -1263,15 +929,13 @@ type ProbeProtocol string
const (
// ProbeProtocolHTTP ...
ProbeProtocolHTTP ProbeProtocol = "Http"
- // ProbeProtocolHTTPS ...
- ProbeProtocolHTTPS ProbeProtocol = "Https"
// ProbeProtocolTCP ...
ProbeProtocolTCP ProbeProtocol = "Tcp"
)
// PossibleProbeProtocolValues returns an array of possible values for the ProbeProtocol const type.
func PossibleProbeProtocolValues() []ProbeProtocol {
- return []ProbeProtocol{ProbeProtocolHTTP, ProbeProtocolHTTPS, ProbeProtocolTCP}
+ return []ProbeProtocol{ProbeProtocolHTTP, ProbeProtocolTCP}
}
// ProcessorArchitecture enumerates the values for processor architecture.
@@ -1289,55 +953,19 @@ func PossibleProcessorArchitectureValues() []ProcessorArchitecture {
return []ProcessorArchitecture{Amd64, X86}
}
-// ProtectionCoverage enumerates the values for protection coverage.
-type ProtectionCoverage string
-
-const (
- // ProtectionCoverageBasic ...
- ProtectionCoverageBasic ProtectionCoverage = "Basic"
- // ProtectionCoverageStandard ...
- ProtectionCoverageStandard ProtectionCoverage = "Standard"
-)
-
-// PossibleProtectionCoverageValues returns an array of possible values for the ProtectionCoverage const type.
-func PossibleProtectionCoverageValues() []ProtectionCoverage {
- return []ProtectionCoverage{ProtectionCoverageBasic, ProtectionCoverageStandard}
-}
-
// Protocol enumerates the values for protocol.
type Protocol string
const (
- // ProtocolHTTP ...
- ProtocolHTTP Protocol = "Http"
- // ProtocolHTTPS ...
- ProtocolHTTPS Protocol = "Https"
- // ProtocolIcmp ...
- ProtocolIcmp Protocol = "Icmp"
// ProtocolTCP ...
- ProtocolTCP Protocol = "Tcp"
+ ProtocolTCP Protocol = "TCP"
+ // ProtocolUDP ...
+ ProtocolUDP Protocol = "UDP"
)
// PossibleProtocolValues returns an array of possible values for the Protocol const type.
func PossibleProtocolValues() []Protocol {
- return []Protocol{ProtocolHTTP, ProtocolHTTPS, ProtocolIcmp, ProtocolTCP}
-}
-
-// Protocol1 enumerates the values for protocol 1.
-type Protocol1 string
-
-const (
- // Protocol1All ...
- Protocol1All Protocol1 = "All"
- // Protocol1TCP ...
- Protocol1TCP Protocol1 = "Tcp"
- // Protocol1UDP ...
- Protocol1UDP Protocol1 = "Udp"
-)
-
-// PossibleProtocol1Values returns an array of possible values for the Protocol1 const type.
-func PossibleProtocol1Values() []Protocol1 {
- return []Protocol1{Protocol1All, Protocol1TCP, Protocol1UDP}
+ return []Protocol{ProtocolTCP, ProtocolUDP}
}
// ProvisioningState enumerates the values for provisioning state.
@@ -1374,38 +1002,6 @@ func PossiblePublicIPAddressSkuNameValues() []PublicIPAddressSkuName {
return []PublicIPAddressSkuName{PublicIPAddressSkuNameBasic, PublicIPAddressSkuNameStandard}
}
-// PublicIPPrefixSkuName enumerates the values for public ip prefix sku name.
-type PublicIPPrefixSkuName string
-
-const (
- // Standard ...
- Standard PublicIPPrefixSkuName = "Standard"
-)
-
-// PossiblePublicIPPrefixSkuNameValues returns an array of possible values for the PublicIPPrefixSkuName const type.
-func PossiblePublicIPPrefixSkuNameValues() []PublicIPPrefixSkuName {
- return []PublicIPPrefixSkuName{Standard}
-}
-
-// 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}
-}
-
// RouteNextHopType enumerates the values for route next hop type.
type RouteNextHopType string
@@ -1525,58 +1121,6 @@ func PossibleTransportProtocolValues() []TransportProtocol {
return []TransportProtocol{TransportProtocolAll, TransportProtocolTCP, TransportProtocolUDP}
}
-// TunnelConnectionStatus enumerates the values for tunnel connection status.
-type TunnelConnectionStatus string
-
-const (
- // TunnelConnectionStatusConnected ...
- TunnelConnectionStatusConnected TunnelConnectionStatus = "Connected"
- // TunnelConnectionStatusConnecting ...
- TunnelConnectionStatusConnecting TunnelConnectionStatus = "Connecting"
- // TunnelConnectionStatusNotConnected ...
- TunnelConnectionStatusNotConnected TunnelConnectionStatus = "NotConnected"
- // TunnelConnectionStatusUnknown ...
- TunnelConnectionStatusUnknown TunnelConnectionStatus = "Unknown"
-)
-
-// PossibleTunnelConnectionStatusValues returns an array of possible values for the TunnelConnectionStatus const type.
-func PossibleTunnelConnectionStatusValues() []TunnelConnectionStatus {
- return []TunnelConnectionStatus{TunnelConnectionStatusConnected, TunnelConnectionStatusConnecting, TunnelConnectionStatusNotConnected, TunnelConnectionStatusUnknown}
-}
-
-// VerbosityLevel enumerates the values for verbosity level.
-type VerbosityLevel string
-
-const (
- // Full ...
- Full VerbosityLevel = "Full"
- // Minimum ...
- Minimum VerbosityLevel = "Minimum"
- // Normal ...
- Normal VerbosityLevel = "Normal"
-)
-
-// PossibleVerbosityLevelValues returns an array of possible values for the VerbosityLevel const type.
-func PossibleVerbosityLevelValues() []VerbosityLevel {
- return []VerbosityLevel{Full, Minimum, Normal}
-}
-
-// VirtualNetworkGatewayConnectionProtocol enumerates the values for virtual network gateway connection
-// protocol.
-type VirtualNetworkGatewayConnectionProtocol string
-
-const (
- // IKEv1 ...
- IKEv1 VirtualNetworkGatewayConnectionProtocol = "IKEv1"
- // IKEv2 ...
- IKEv2 VirtualNetworkGatewayConnectionProtocol = "IKEv2"
-)
-
-// PossibleVirtualNetworkGatewayConnectionProtocolValues returns an array of possible values for the VirtualNetworkGatewayConnectionProtocol const type.
-func PossibleVirtualNetworkGatewayConnectionProtocolValues() []VirtualNetworkGatewayConnectionProtocol {
- return []VirtualNetworkGatewayConnectionProtocol{IKEv1, IKEv2}
-}
-
// VirtualNetworkGatewayConnectionStatus enumerates the values for virtual network gateway connection status.
type VirtualNetworkGatewayConnectionStatus string
@@ -1621,12 +1165,6 @@ type VirtualNetworkGatewaySkuName string
const (
// VirtualNetworkGatewaySkuNameBasic ...
VirtualNetworkGatewaySkuNameBasic VirtualNetworkGatewaySkuName = "Basic"
- // VirtualNetworkGatewaySkuNameErGw1AZ ...
- VirtualNetworkGatewaySkuNameErGw1AZ VirtualNetworkGatewaySkuName = "ErGw1AZ"
- // VirtualNetworkGatewaySkuNameErGw2AZ ...
- VirtualNetworkGatewaySkuNameErGw2AZ VirtualNetworkGatewaySkuName = "ErGw2AZ"
- // VirtualNetworkGatewaySkuNameErGw3AZ ...
- VirtualNetworkGatewaySkuNameErGw3AZ VirtualNetworkGatewaySkuName = "ErGw3AZ"
// VirtualNetworkGatewaySkuNameHighPerformance ...
VirtualNetworkGatewaySkuNameHighPerformance VirtualNetworkGatewaySkuName = "HighPerformance"
// VirtualNetworkGatewaySkuNameStandard ...
@@ -1635,21 +1173,15 @@ const (
VirtualNetworkGatewaySkuNameUltraPerformance VirtualNetworkGatewaySkuName = "UltraPerformance"
// VirtualNetworkGatewaySkuNameVpnGw1 ...
VirtualNetworkGatewaySkuNameVpnGw1 VirtualNetworkGatewaySkuName = "VpnGw1"
- // VirtualNetworkGatewaySkuNameVpnGw1AZ ...
- VirtualNetworkGatewaySkuNameVpnGw1AZ VirtualNetworkGatewaySkuName = "VpnGw1AZ"
// VirtualNetworkGatewaySkuNameVpnGw2 ...
VirtualNetworkGatewaySkuNameVpnGw2 VirtualNetworkGatewaySkuName = "VpnGw2"
- // VirtualNetworkGatewaySkuNameVpnGw2AZ ...
- VirtualNetworkGatewaySkuNameVpnGw2AZ VirtualNetworkGatewaySkuName = "VpnGw2AZ"
// VirtualNetworkGatewaySkuNameVpnGw3 ...
VirtualNetworkGatewaySkuNameVpnGw3 VirtualNetworkGatewaySkuName = "VpnGw3"
- // VirtualNetworkGatewaySkuNameVpnGw3AZ ...
- VirtualNetworkGatewaySkuNameVpnGw3AZ VirtualNetworkGatewaySkuName = "VpnGw3AZ"
)
// PossibleVirtualNetworkGatewaySkuNameValues returns an array of possible values for the VirtualNetworkGatewaySkuName const type.
func PossibleVirtualNetworkGatewaySkuNameValues() []VirtualNetworkGatewaySkuName {
- return []VirtualNetworkGatewaySkuName{VirtualNetworkGatewaySkuNameBasic, VirtualNetworkGatewaySkuNameErGw1AZ, VirtualNetworkGatewaySkuNameErGw2AZ, VirtualNetworkGatewaySkuNameErGw3AZ, VirtualNetworkGatewaySkuNameHighPerformance, VirtualNetworkGatewaySkuNameStandard, VirtualNetworkGatewaySkuNameUltraPerformance, VirtualNetworkGatewaySkuNameVpnGw1, VirtualNetworkGatewaySkuNameVpnGw1AZ, VirtualNetworkGatewaySkuNameVpnGw2, VirtualNetworkGatewaySkuNameVpnGw2AZ, VirtualNetworkGatewaySkuNameVpnGw3, VirtualNetworkGatewaySkuNameVpnGw3AZ}
+ return []VirtualNetworkGatewaySkuName{VirtualNetworkGatewaySkuNameBasic, VirtualNetworkGatewaySkuNameHighPerformance, VirtualNetworkGatewaySkuNameStandard, VirtualNetworkGatewaySkuNameUltraPerformance, VirtualNetworkGatewaySkuNameVpnGw1, VirtualNetworkGatewaySkuNameVpnGw2, VirtualNetworkGatewaySkuNameVpnGw3}
}
// VirtualNetworkGatewaySkuTier enumerates the values for virtual network gateway sku tier.
@@ -1658,12 +1190,6 @@ type VirtualNetworkGatewaySkuTier string
const (
// VirtualNetworkGatewaySkuTierBasic ...
VirtualNetworkGatewaySkuTierBasic VirtualNetworkGatewaySkuTier = "Basic"
- // VirtualNetworkGatewaySkuTierErGw1AZ ...
- VirtualNetworkGatewaySkuTierErGw1AZ VirtualNetworkGatewaySkuTier = "ErGw1AZ"
- // VirtualNetworkGatewaySkuTierErGw2AZ ...
- VirtualNetworkGatewaySkuTierErGw2AZ VirtualNetworkGatewaySkuTier = "ErGw2AZ"
- // VirtualNetworkGatewaySkuTierErGw3AZ ...
- VirtualNetworkGatewaySkuTierErGw3AZ VirtualNetworkGatewaySkuTier = "ErGw3AZ"
// VirtualNetworkGatewaySkuTierHighPerformance ...
VirtualNetworkGatewaySkuTierHighPerformance VirtualNetworkGatewaySkuTier = "HighPerformance"
// VirtualNetworkGatewaySkuTierStandard ...
@@ -1672,21 +1198,15 @@ const (
VirtualNetworkGatewaySkuTierUltraPerformance VirtualNetworkGatewaySkuTier = "UltraPerformance"
// VirtualNetworkGatewaySkuTierVpnGw1 ...
VirtualNetworkGatewaySkuTierVpnGw1 VirtualNetworkGatewaySkuTier = "VpnGw1"
- // VirtualNetworkGatewaySkuTierVpnGw1AZ ...
- VirtualNetworkGatewaySkuTierVpnGw1AZ VirtualNetworkGatewaySkuTier = "VpnGw1AZ"
// VirtualNetworkGatewaySkuTierVpnGw2 ...
VirtualNetworkGatewaySkuTierVpnGw2 VirtualNetworkGatewaySkuTier = "VpnGw2"
- // VirtualNetworkGatewaySkuTierVpnGw2AZ ...
- VirtualNetworkGatewaySkuTierVpnGw2AZ VirtualNetworkGatewaySkuTier = "VpnGw2AZ"
// VirtualNetworkGatewaySkuTierVpnGw3 ...
VirtualNetworkGatewaySkuTierVpnGw3 VirtualNetworkGatewaySkuTier = "VpnGw3"
- // VirtualNetworkGatewaySkuTierVpnGw3AZ ...
- VirtualNetworkGatewaySkuTierVpnGw3AZ VirtualNetworkGatewaySkuTier = "VpnGw3AZ"
)
// PossibleVirtualNetworkGatewaySkuTierValues returns an array of possible values for the VirtualNetworkGatewaySkuTier const type.
func PossibleVirtualNetworkGatewaySkuTierValues() []VirtualNetworkGatewaySkuTier {
- return []VirtualNetworkGatewaySkuTier{VirtualNetworkGatewaySkuTierBasic, VirtualNetworkGatewaySkuTierErGw1AZ, VirtualNetworkGatewaySkuTierErGw2AZ, VirtualNetworkGatewaySkuTierErGw3AZ, VirtualNetworkGatewaySkuTierHighPerformance, VirtualNetworkGatewaySkuTierStandard, VirtualNetworkGatewaySkuTierUltraPerformance, VirtualNetworkGatewaySkuTierVpnGw1, VirtualNetworkGatewaySkuTierVpnGw1AZ, VirtualNetworkGatewaySkuTierVpnGw2, VirtualNetworkGatewaySkuTierVpnGw2AZ, VirtualNetworkGatewaySkuTierVpnGw3, VirtualNetworkGatewaySkuTierVpnGw3AZ}
+ return []VirtualNetworkGatewaySkuTier{VirtualNetworkGatewaySkuTierBasic, VirtualNetworkGatewaySkuTierHighPerformance, VirtualNetworkGatewaySkuTierStandard, VirtualNetworkGatewaySkuTierUltraPerformance, VirtualNetworkGatewaySkuTierVpnGw1, VirtualNetworkGatewaySkuTierVpnGw2, VirtualNetworkGatewaySkuTierVpnGw3}
}
// VirtualNetworkGatewayType enumerates the values for virtual network gateway type.
@@ -1708,32 +1228,17 @@ func PossibleVirtualNetworkGatewayTypeValues() []VirtualNetworkGatewayType {
type VirtualNetworkPeeringState string
const (
- // VirtualNetworkPeeringStateConnected ...
- VirtualNetworkPeeringStateConnected VirtualNetworkPeeringState = "Connected"
- // VirtualNetworkPeeringStateDisconnected ...
- VirtualNetworkPeeringStateDisconnected VirtualNetworkPeeringState = "Disconnected"
- // VirtualNetworkPeeringStateInitiated ...
- VirtualNetworkPeeringStateInitiated VirtualNetworkPeeringState = "Initiated"
+ // Connected ...
+ Connected VirtualNetworkPeeringState = "Connected"
+ // Disconnected ...
+ Disconnected VirtualNetworkPeeringState = "Disconnected"
+ // Initiated ...
+ Initiated VirtualNetworkPeeringState = "Initiated"
)
// PossibleVirtualNetworkPeeringStateValues returns an array of possible values for the VirtualNetworkPeeringState const type.
func PossibleVirtualNetworkPeeringStateValues() []VirtualNetworkPeeringState {
- return []VirtualNetworkPeeringState{VirtualNetworkPeeringStateConnected, VirtualNetworkPeeringStateDisconnected, VirtualNetworkPeeringStateInitiated}
-}
-
-// VirtualWanSecurityProviderType enumerates the values for virtual wan security provider type.
-type VirtualWanSecurityProviderType string
-
-const (
- // External ...
- External VirtualWanSecurityProviderType = "External"
- // Native ...
- Native VirtualWanSecurityProviderType = "Native"
-)
-
-// PossibleVirtualWanSecurityProviderTypeValues returns an array of possible values for the VirtualWanSecurityProviderType const type.
-func PossibleVirtualWanSecurityProviderTypeValues() []VirtualWanSecurityProviderType {
- return []VirtualWanSecurityProviderType{External, Native}
+ return []VirtualNetworkPeeringState{Connected, Disconnected, Initiated}
}
// VpnClientProtocol enumerates the values for vpn client protocol.
@@ -1742,49 +1247,13 @@ type VpnClientProtocol string
const (
// IkeV2 ...
IkeV2 VpnClientProtocol = "IkeV2"
- // OpenVPN ...
- OpenVPN VpnClientProtocol = "OpenVPN"
// SSTP ...
SSTP VpnClientProtocol = "SSTP"
)
// PossibleVpnClientProtocolValues returns an array of possible values for the VpnClientProtocol const type.
func PossibleVpnClientProtocolValues() []VpnClientProtocol {
- return []VpnClientProtocol{IkeV2, OpenVPN, SSTP}
-}
-
-// VpnConnectionStatus enumerates the values for vpn connection status.
-type VpnConnectionStatus string
-
-const (
- // VpnConnectionStatusConnected ...
- VpnConnectionStatusConnected VpnConnectionStatus = "Connected"
- // VpnConnectionStatusConnecting ...
- VpnConnectionStatusConnecting VpnConnectionStatus = "Connecting"
- // VpnConnectionStatusNotConnected ...
- VpnConnectionStatusNotConnected VpnConnectionStatus = "NotConnected"
- // VpnConnectionStatusUnknown ...
- VpnConnectionStatusUnknown VpnConnectionStatus = "Unknown"
-)
-
-// PossibleVpnConnectionStatusValues returns an array of possible values for the VpnConnectionStatus const type.
-func PossibleVpnConnectionStatusValues() []VpnConnectionStatus {
- return []VpnConnectionStatus{VpnConnectionStatusConnected, VpnConnectionStatusConnecting, VpnConnectionStatusNotConnected, VpnConnectionStatusUnknown}
-}
-
-// VpnGatewayTunnelingProtocol enumerates the values for vpn gateway tunneling protocol.
-type VpnGatewayTunnelingProtocol string
-
-const (
- // VpnGatewayTunnelingProtocolIkeV2 ...
- VpnGatewayTunnelingProtocolIkeV2 VpnGatewayTunnelingProtocol = "IkeV2"
- // VpnGatewayTunnelingProtocolOpenVPN ...
- VpnGatewayTunnelingProtocolOpenVPN VpnGatewayTunnelingProtocol = "OpenVPN"
-)
-
-// PossibleVpnGatewayTunnelingProtocolValues returns an array of possible values for the VpnGatewayTunnelingProtocol const type.
-func PossibleVpnGatewayTunnelingProtocolValues() []VpnGatewayTunnelingProtocol {
- return []VpnGatewayTunnelingProtocol{VpnGatewayTunnelingProtocolIkeV2, VpnGatewayTunnelingProtocolOpenVPN}
+ return []VpnClientProtocol{IkeV2, SSTP}
}
// VpnType enumerates the values for vpn type.
@@ -1801,170 +1270,3 @@ const (
func PossibleVpnTypeValues() []VpnType {
return []VpnType{PolicyBased, RouteBased}
}
-
-// WebApplicationFirewallAction enumerates the values for web application firewall action.
-type WebApplicationFirewallAction string
-
-const (
- // WebApplicationFirewallActionAllow ...
- WebApplicationFirewallActionAllow WebApplicationFirewallAction = "Allow"
- // WebApplicationFirewallActionBlock ...
- WebApplicationFirewallActionBlock WebApplicationFirewallAction = "Block"
- // WebApplicationFirewallActionLog ...
- WebApplicationFirewallActionLog WebApplicationFirewallAction = "Log"
-)
-
-// PossibleWebApplicationFirewallActionValues returns an array of possible values for the WebApplicationFirewallAction const type.
-func PossibleWebApplicationFirewallActionValues() []WebApplicationFirewallAction {
- return []WebApplicationFirewallAction{WebApplicationFirewallActionAllow, WebApplicationFirewallActionBlock, WebApplicationFirewallActionLog}
-}
-
-// WebApplicationFirewallEnabledState enumerates the values for web application firewall enabled state.
-type WebApplicationFirewallEnabledState string
-
-const (
- // WebApplicationFirewallEnabledStateDisabled ...
- WebApplicationFirewallEnabledStateDisabled WebApplicationFirewallEnabledState = "Disabled"
- // WebApplicationFirewallEnabledStateEnabled ...
- WebApplicationFirewallEnabledStateEnabled WebApplicationFirewallEnabledState = "Enabled"
-)
-
-// PossibleWebApplicationFirewallEnabledStateValues returns an array of possible values for the WebApplicationFirewallEnabledState const type.
-func PossibleWebApplicationFirewallEnabledStateValues() []WebApplicationFirewallEnabledState {
- return []WebApplicationFirewallEnabledState{WebApplicationFirewallEnabledStateDisabled, WebApplicationFirewallEnabledStateEnabled}
-}
-
-// WebApplicationFirewallMatchVariable enumerates the values for web application firewall match variable.
-type WebApplicationFirewallMatchVariable string
-
-const (
- // PostArgs ...
- PostArgs WebApplicationFirewallMatchVariable = "PostArgs"
- // QueryString ...
- QueryString WebApplicationFirewallMatchVariable = "QueryString"
- // RemoteAddr ...
- RemoteAddr WebApplicationFirewallMatchVariable = "RemoteAddr"
- // RequestBody ...
- RequestBody WebApplicationFirewallMatchVariable = "RequestBody"
- // RequestCookies ...
- RequestCookies WebApplicationFirewallMatchVariable = "RequestCookies"
- // RequestHeaders ...
- RequestHeaders WebApplicationFirewallMatchVariable = "RequestHeaders"
- // RequestMethod ...
- RequestMethod WebApplicationFirewallMatchVariable = "RequestMethod"
- // RequestURI ...
- RequestURI WebApplicationFirewallMatchVariable = "RequestUri"
-)
-
-// PossibleWebApplicationFirewallMatchVariableValues returns an array of possible values for the WebApplicationFirewallMatchVariable const type.
-func PossibleWebApplicationFirewallMatchVariableValues() []WebApplicationFirewallMatchVariable {
- return []WebApplicationFirewallMatchVariable{PostArgs, QueryString, RemoteAddr, RequestBody, RequestCookies, RequestHeaders, RequestMethod, RequestURI}
-}
-
-// WebApplicationFirewallMode enumerates the values for web application firewall mode.
-type WebApplicationFirewallMode string
-
-const (
- // WebApplicationFirewallModeDetection ...
- WebApplicationFirewallModeDetection WebApplicationFirewallMode = "Detection"
- // WebApplicationFirewallModePrevention ...
- WebApplicationFirewallModePrevention WebApplicationFirewallMode = "Prevention"
-)
-
-// PossibleWebApplicationFirewallModeValues returns an array of possible values for the WebApplicationFirewallMode const type.
-func PossibleWebApplicationFirewallModeValues() []WebApplicationFirewallMode {
- return []WebApplicationFirewallMode{WebApplicationFirewallModeDetection, WebApplicationFirewallModePrevention}
-}
-
-// WebApplicationFirewallOperator enumerates the values for web application firewall operator.
-type WebApplicationFirewallOperator string
-
-const (
- // WebApplicationFirewallOperatorBeginsWith ...
- WebApplicationFirewallOperatorBeginsWith WebApplicationFirewallOperator = "BeginsWith"
- // WebApplicationFirewallOperatorContains ...
- WebApplicationFirewallOperatorContains WebApplicationFirewallOperator = "Contains"
- // WebApplicationFirewallOperatorEndsWith ...
- WebApplicationFirewallOperatorEndsWith WebApplicationFirewallOperator = "EndsWith"
- // WebApplicationFirewallOperatorEqual ...
- WebApplicationFirewallOperatorEqual WebApplicationFirewallOperator = "Equal"
- // WebApplicationFirewallOperatorGreaterThan ...
- WebApplicationFirewallOperatorGreaterThan WebApplicationFirewallOperator = "GreaterThan"
- // WebApplicationFirewallOperatorGreaterThanOrEqual ...
- WebApplicationFirewallOperatorGreaterThanOrEqual WebApplicationFirewallOperator = "GreaterThanOrEqual"
- // WebApplicationFirewallOperatorIPMatch ...
- WebApplicationFirewallOperatorIPMatch WebApplicationFirewallOperator = "IPMatch"
- // WebApplicationFirewallOperatorLessThan ...
- WebApplicationFirewallOperatorLessThan WebApplicationFirewallOperator = "LessThan"
- // WebApplicationFirewallOperatorLessThanOrEqual ...
- WebApplicationFirewallOperatorLessThanOrEqual WebApplicationFirewallOperator = "LessThanOrEqual"
- // WebApplicationFirewallOperatorRegex ...
- WebApplicationFirewallOperatorRegex WebApplicationFirewallOperator = "Regex"
-)
-
-// PossibleWebApplicationFirewallOperatorValues returns an array of possible values for the WebApplicationFirewallOperator const type.
-func PossibleWebApplicationFirewallOperatorValues() []WebApplicationFirewallOperator {
- return []WebApplicationFirewallOperator{WebApplicationFirewallOperatorBeginsWith, WebApplicationFirewallOperatorContains, WebApplicationFirewallOperatorEndsWith, WebApplicationFirewallOperatorEqual, WebApplicationFirewallOperatorGreaterThan, WebApplicationFirewallOperatorGreaterThanOrEqual, WebApplicationFirewallOperatorIPMatch, WebApplicationFirewallOperatorLessThan, WebApplicationFirewallOperatorLessThanOrEqual, WebApplicationFirewallOperatorRegex}
-}
-
-// WebApplicationFirewallPolicyResourceState enumerates the values for web application firewall policy resource
-// state.
-type WebApplicationFirewallPolicyResourceState string
-
-const (
- // WebApplicationFirewallPolicyResourceStateCreating ...
- WebApplicationFirewallPolicyResourceStateCreating WebApplicationFirewallPolicyResourceState = "Creating"
- // WebApplicationFirewallPolicyResourceStateDeleting ...
- WebApplicationFirewallPolicyResourceStateDeleting WebApplicationFirewallPolicyResourceState = "Deleting"
- // WebApplicationFirewallPolicyResourceStateDisabled ...
- WebApplicationFirewallPolicyResourceStateDisabled WebApplicationFirewallPolicyResourceState = "Disabled"
- // WebApplicationFirewallPolicyResourceStateDisabling ...
- WebApplicationFirewallPolicyResourceStateDisabling WebApplicationFirewallPolicyResourceState = "Disabling"
- // WebApplicationFirewallPolicyResourceStateEnabled ...
- WebApplicationFirewallPolicyResourceStateEnabled WebApplicationFirewallPolicyResourceState = "Enabled"
- // WebApplicationFirewallPolicyResourceStateEnabling ...
- WebApplicationFirewallPolicyResourceStateEnabling WebApplicationFirewallPolicyResourceState = "Enabling"
-)
-
-// PossibleWebApplicationFirewallPolicyResourceStateValues returns an array of possible values for the WebApplicationFirewallPolicyResourceState const type.
-func PossibleWebApplicationFirewallPolicyResourceStateValues() []WebApplicationFirewallPolicyResourceState {
- return []WebApplicationFirewallPolicyResourceState{WebApplicationFirewallPolicyResourceStateCreating, WebApplicationFirewallPolicyResourceStateDeleting, WebApplicationFirewallPolicyResourceStateDisabled, WebApplicationFirewallPolicyResourceStateDisabling, WebApplicationFirewallPolicyResourceStateEnabled, WebApplicationFirewallPolicyResourceStateEnabling}
-}
-
-// WebApplicationFirewallRuleType enumerates the values for web application firewall rule type.
-type WebApplicationFirewallRuleType string
-
-const (
- // WebApplicationFirewallRuleTypeInvalid ...
- WebApplicationFirewallRuleTypeInvalid WebApplicationFirewallRuleType = "Invalid"
- // WebApplicationFirewallRuleTypeMatchRule ...
- WebApplicationFirewallRuleTypeMatchRule WebApplicationFirewallRuleType = "MatchRule"
-)
-
-// PossibleWebApplicationFirewallRuleTypeValues returns an array of possible values for the WebApplicationFirewallRuleType const type.
-func PossibleWebApplicationFirewallRuleTypeValues() []WebApplicationFirewallRuleType {
- return []WebApplicationFirewallRuleType{WebApplicationFirewallRuleTypeInvalid, WebApplicationFirewallRuleTypeMatchRule}
-}
-
-// WebApplicationFirewallTransform enumerates the values for web application firewall transform.
-type WebApplicationFirewallTransform string
-
-const (
- // HTMLEntityDecode ...
- HTMLEntityDecode WebApplicationFirewallTransform = "HtmlEntityDecode"
- // Lowercase ...
- Lowercase WebApplicationFirewallTransform = "Lowercase"
- // RemoveNulls ...
- RemoveNulls WebApplicationFirewallTransform = "RemoveNulls"
- // Trim ...
- Trim WebApplicationFirewallTransform = "Trim"
- // URLDecode ...
- URLDecode WebApplicationFirewallTransform = "UrlDecode"
- // URLEncode ...
- URLEncode WebApplicationFirewallTransform = "UrlEncode"
-)
-
-// PossibleWebApplicationFirewallTransformValues returns an array of possible values for the WebApplicationFirewallTransform const type.
-func PossibleWebApplicationFirewallTransformValues() []WebApplicationFirewallTransform {
- return []WebApplicationFirewallTransform{HTMLEntityDecode, Lowercase, RemoveNulls, Trim, URLDecode, URLEncode}
-}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/expressroutecircuitauthorizations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/expressroutecircuitauthorizations.go
similarity index 87%
rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/expressroutecircuitauthorizations.go
rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/expressroutecircuitauthorizations.go
index d52d0e69757..6cd79dd1caf 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/expressroutecircuitauthorizations.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/expressroutecircuitauthorizations.go
@@ -69,7 +69,7 @@ func (client ExpressRouteCircuitAuthorizationsClient) CreateOrUpdate(ctx context
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsClient", "CreateOrUpdate", nil, "Failure sending request")
return
}
@@ -85,7 +85,7 @@ func (client ExpressRouteCircuitAuthorizationsClient) CreateOrUpdatePreparer(ctx
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -109,7 +109,33 @@ func (client ExpressRouteCircuitAuthorizationsClient) CreateOrUpdateSender(req *
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(client ExpressRouteCircuitAuthorizationsClient) (erca ExpressRouteCircuitAuthorization, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ erca.Response.Response, err = future.GetResult(sender)
+ if erca.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture", "Result", nil, "received nil response and error")
+ }
+ if err == nil && erca.Response.Response.StatusCode != http.StatusNoContent {
+ erca, err = client.CreateOrUpdateResponder(erca.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture", "Result", erca.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+ }
return
}
@@ -149,7 +175,7 @@ func (client ExpressRouteCircuitAuthorizationsClient) Delete(ctx context.Context
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsClient", "Delete", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsClient", "Delete", nil, "Failure sending request")
return
}
@@ -165,7 +191,7 @@ func (client ExpressRouteCircuitAuthorizationsClient) DeletePreparer(ctx context
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -186,7 +212,23 @@ func (client ExpressRouteCircuitAuthorizationsClient) DeleteSender(req *http.Req
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(client ExpressRouteCircuitAuthorizationsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitAuthorizationsDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
return
}
@@ -233,6 +275,7 @@ func (client ExpressRouteCircuitAuthorizationsClient) Get(ctx context.Context, r
result, err = client.GetResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsClient", "Get", resp, "Failure responding to request")
+ return
}
return
@@ -247,7 +290,7 @@ func (client ExpressRouteCircuitAuthorizationsClient) GetPreparer(ctx context.Co
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -310,9 +353,11 @@ func (client ExpressRouteCircuitAuthorizationsClient) List(ctx context.Context,
result.alr, err = client.ListResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsClient", "List", resp, "Failure responding to request")
+ return
}
if result.alr.hasNextLink() && result.alr.IsEmpty() {
err = result.NextWithContext(ctx)
+ return
}
return
@@ -326,7 +371,7 @@ func (client ExpressRouteCircuitAuthorizationsClient) ListPreparer(ctx context.C
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/expressroutecircuitpeerings.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/expressroutecircuitpeerings.go
similarity index 87%
rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/expressroutecircuitpeerings.go
rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/expressroutecircuitpeerings.go
index 27a5ca9c4f5..4e14dc5ffe9 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/expressroutecircuitpeerings.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/expressroutecircuitpeerings.go
@@ -79,7 +79,7 @@ func (client ExpressRouteCircuitPeeringsClient) CreateOrUpdate(ctx context.Conte
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsClient", "CreateOrUpdate", nil, "Failure sending request")
return
}
@@ -95,7 +95,7 @@ func (client ExpressRouteCircuitPeeringsClient) CreateOrUpdatePreparer(ctx conte
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -119,7 +119,33 @@ func (client ExpressRouteCircuitPeeringsClient) CreateOrUpdateSender(req *http.R
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(client ExpressRouteCircuitPeeringsClient) (ercp ExpressRouteCircuitPeering, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ ercp.Response.Response, err = future.GetResult(sender)
+ if ercp.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture", "Result", nil, "received nil response and error")
+ }
+ if err == nil && ercp.Response.Response.StatusCode != http.StatusNoContent {
+ ercp, err = client.CreateOrUpdateResponder(ercp.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture", "Result", ercp.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+ }
return
}
@@ -159,7 +185,7 @@ func (client ExpressRouteCircuitPeeringsClient) Delete(ctx context.Context, reso
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsClient", "Delete", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsClient", "Delete", nil, "Failure sending request")
return
}
@@ -175,7 +201,7 @@ func (client ExpressRouteCircuitPeeringsClient) DeletePreparer(ctx context.Conte
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -196,7 +222,23 @@ func (client ExpressRouteCircuitPeeringsClient) DeleteSender(req *http.Request)
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(client ExpressRouteCircuitPeeringsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitPeeringsDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
return
}
@@ -211,7 +253,7 @@ func (client ExpressRouteCircuitPeeringsClient) DeleteResponder(resp *http.Respo
return
}
-// Get gets the specified peering for the express route circuit.
+// Get gets the specified authorization from the specified express route circuit.
// Parameters:
// resourceGroupName - the name of the resource group.
// circuitName - the name of the express route circuit.
@@ -243,6 +285,7 @@ func (client ExpressRouteCircuitPeeringsClient) Get(ctx context.Context, resourc
result, err = client.GetResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsClient", "Get", resp, "Failure responding to request")
+ return
}
return
@@ -257,7 +300,7 @@ func (client ExpressRouteCircuitPeeringsClient) GetPreparer(ctx context.Context,
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -320,9 +363,11 @@ func (client ExpressRouteCircuitPeeringsClient) List(ctx context.Context, resour
result.ercplr, err = client.ListResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsClient", "List", resp, "Failure responding to request")
+ return
}
if result.ercplr.hasNextLink() && result.ercplr.IsEmpty() {
err = result.NextWithContext(ctx)
+ return
}
return
@@ -336,7 +381,7 @@ func (client ExpressRouteCircuitPeeringsClient) ListPreparer(ctx context.Context
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/expressroutecircuits.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/expressroutecircuits.go
similarity index 82%
rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/expressroutecircuits.go
rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/expressroutecircuits.go
index 4ccaa2c9c6e..d21f0da9fc3 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/expressroutecircuits.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/expressroutecircuits.go
@@ -66,7 +66,7 @@ func (client ExpressRouteCircuitsClient) CreateOrUpdate(ctx context.Context, res
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "CreateOrUpdate", nil, "Failure sending request")
return
}
@@ -81,7 +81,7 @@ func (client ExpressRouteCircuitsClient) CreateOrUpdatePreparer(ctx context.Cont
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -105,7 +105,33 @@ func (client ExpressRouteCircuitsClient) CreateOrUpdateSender(req *http.Request)
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(client ExpressRouteCircuitsClient) (erc ExpressRouteCircuit, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ erc.Response.Response, err = future.GetResult(sender)
+ if erc.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsCreateOrUpdateFuture", "Result", nil, "received nil response and error")
+ }
+ if err == nil && erc.Response.Response.StatusCode != http.StatusNoContent {
+ erc, err = client.CreateOrUpdateResponder(erc.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsCreateOrUpdateFuture", "Result", erc.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+ }
return
}
@@ -144,7 +170,7 @@ func (client ExpressRouteCircuitsClient) Delete(ctx context.Context, resourceGro
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "Delete", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "Delete", nil, "Failure sending request")
return
}
@@ -159,7 +185,7 @@ func (client ExpressRouteCircuitsClient) DeletePreparer(ctx context.Context, res
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -180,7 +206,23 @@ func (client ExpressRouteCircuitsClient) DeleteSender(req *http.Request) (future
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(client ExpressRouteCircuitsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
return
}
@@ -226,6 +268,7 @@ func (client ExpressRouteCircuitsClient) Get(ctx context.Context, resourceGroupN
result, err = client.GetResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "Get", resp, "Failure responding to request")
+ return
}
return
@@ -239,7 +282,7 @@ func (client ExpressRouteCircuitsClient) GetPreparer(ctx context.Context, resour
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -302,6 +345,7 @@ func (client ExpressRouteCircuitsClient) GetPeeringStats(ctx context.Context, re
result, err = client.GetPeeringStatsResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "GetPeeringStats", resp, "Failure responding to request")
+ return
}
return
@@ -316,7 +360,7 @@ func (client ExpressRouteCircuitsClient) GetPeeringStatsPreparer(ctx context.Con
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -378,6 +422,7 @@ func (client ExpressRouteCircuitsClient) GetStats(ctx context.Context, resourceG
result, err = client.GetStatsResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "GetStats", resp, "Failure responding to request")
+ return
}
return
@@ -391,7 +436,7 @@ func (client ExpressRouteCircuitsClient) GetStatsPreparer(ctx context.Context, r
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -453,9 +498,11 @@ func (client ExpressRouteCircuitsClient) List(ctx context.Context, resourceGroup
result.erclr, err = client.ListResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "List", resp, "Failure responding to request")
+ return
}
if result.erclr.hasNextLink() && result.erclr.IsEmpty() {
err = result.NextWithContext(ctx)
+ return
}
return
@@ -468,7 +515,7 @@ func (client ExpressRouteCircuitsClient) ListPreparer(ctx context.Context, resou
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -565,9 +612,11 @@ func (client ExpressRouteCircuitsClient) ListAll(ctx context.Context) (result Ex
result.erclr, err = client.ListAllResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "ListAll", resp, "Failure responding to request")
+ return
}
if result.erclr.hasNextLink() && result.erclr.IsEmpty() {
err = result.NextWithContext(ctx)
+ return
}
return
@@ -579,7 +628,7 @@ func (client ExpressRouteCircuitsClient) ListAllPreparer(ctx context.Context) (*
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -672,7 +721,7 @@ func (client ExpressRouteCircuitsClient) ListArpTable(ctx context.Context, resou
result, err = client.ListArpTableSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "ListArpTable", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "ListArpTable", nil, "Failure sending request")
return
}
@@ -689,7 +738,7 @@ func (client ExpressRouteCircuitsClient) ListArpTablePreparer(ctx context.Contex
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -710,7 +759,33 @@ func (client ExpressRouteCircuitsClient) ListArpTableSender(req *http.Request) (
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(client ExpressRouteCircuitsClient) (ercatlr ExpressRouteCircuitsArpTableListResult, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListArpTableFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListArpTableFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ ercatlr.Response.Response, err = future.GetResult(sender)
+ if ercatlr.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListArpTableFuture", "Result", nil, "received nil response and error")
+ }
+ if err == nil && ercatlr.Response.Response.StatusCode != http.StatusNoContent {
+ ercatlr, err = client.ListArpTableResponder(ercatlr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListArpTableFuture", "Result", ercatlr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+ }
return
}
@@ -752,7 +827,7 @@ func (client ExpressRouteCircuitsClient) ListRoutesTable(ctx context.Context, re
result, err = client.ListRoutesTableSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "ListRoutesTable", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "ListRoutesTable", nil, "Failure sending request")
return
}
@@ -769,7 +844,7 @@ func (client ExpressRouteCircuitsClient) ListRoutesTablePreparer(ctx context.Con
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -790,7 +865,33 @@ func (client ExpressRouteCircuitsClient) ListRoutesTableSender(req *http.Request
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(client ExpressRouteCircuitsClient) (ercrtlr ExpressRouteCircuitsRoutesTableListResult, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListRoutesTableFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ ercrtlr.Response.Response, err = future.GetResult(sender)
+ if ercrtlr.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableFuture", "Result", nil, "received nil response and error")
+ }
+ if err == nil && ercrtlr.Response.Response.StatusCode != http.StatusNoContent {
+ ercrtlr, err = client.ListRoutesTableResponder(ercrtlr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableFuture", "Result", ercrtlr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+ }
return
}
@@ -832,7 +933,7 @@ func (client ExpressRouteCircuitsClient) ListRoutesTableSummary(ctx context.Cont
result, err = client.ListRoutesTableSummarySender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "ListRoutesTableSummary", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "ListRoutesTableSummary", nil, "Failure sending request")
return
}
@@ -849,7 +950,7 @@ func (client ExpressRouteCircuitsClient) ListRoutesTableSummaryPreparer(ctx cont
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -870,7 +971,33 @@ func (client ExpressRouteCircuitsClient) ListRoutesTableSummarySender(req *http.
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(client ExpressRouteCircuitsClient) (ercrtslr ExpressRouteCircuitsRoutesTableSummaryListResult, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableSummaryFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListRoutesTableSummaryFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ ercrtslr.Response.Response, err = future.GetResult(sender)
+ if ercrtslr.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableSummaryFuture", "Result", nil, "received nil response and error")
+ }
+ if err == nil && ercrtslr.Response.Response.StatusCode != http.StatusNoContent {
+ ercrtslr, err = client.ListRoutesTableSummaryResponder(ercrtslr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableSummaryFuture", "Result", ercrtslr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+ }
return
}
@@ -910,7 +1037,7 @@ func (client ExpressRouteCircuitsClient) UpdateTags(ctx context.Context, resourc
result, err = client.UpdateTagsSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "UpdateTags", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "UpdateTags", nil, "Failure sending request")
return
}
@@ -925,7 +1052,7 @@ func (client ExpressRouteCircuitsClient) UpdateTagsPreparer(ctx context.Context,
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -948,7 +1075,33 @@ func (client ExpressRouteCircuitsClient) UpdateTagsSender(req *http.Request) (fu
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(client ExpressRouteCircuitsClient) (erc ExpressRouteCircuit, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsUpdateTagsFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsUpdateTagsFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ erc.Response.Response, err = future.GetResult(sender)
+ if erc.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsUpdateTagsFuture", "Result", nil, "received nil response and error")
+ }
+ if err == nil && erc.Response.Response.StatusCode != http.StatusNoContent {
+ erc, err = client.UpdateTagsResponder(erc.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsUpdateTagsFuture", "Result", erc.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+ }
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/expressrouteserviceproviders.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/expressrouteserviceproviders.go
similarity index 99%
rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/expressrouteserviceproviders.go
rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/expressrouteserviceproviders.go
index 699e89ea5a2..bbdf4b23398 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/expressrouteserviceproviders.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/expressrouteserviceproviders.go
@@ -71,9 +71,11 @@ func (client ExpressRouteServiceProvidersClient) List(ctx context.Context) (resu
result.ersplr, err = client.ListResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "network.ExpressRouteServiceProvidersClient", "List", resp, "Failure responding to request")
+ return
}
if result.ersplr.hasNextLink() && result.ersplr.IsEmpty() {
err = result.NextWithContext(ctx)
+ return
}
return
@@ -85,7 +87,7 @@ func (client ExpressRouteServiceProvidersClient) ListPreparer(ctx context.Contex
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/inboundnatrules.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/inboundnatrules.go
similarity index 89%
rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/inboundnatrules.go
rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/inboundnatrules.go
index 41658151013..b0fb9db42e1 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/inboundnatrules.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/inboundnatrules.go
@@ -86,7 +86,7 @@ func (client InboundNatRulesClient) CreateOrUpdate(ctx context.Context, resource
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.InboundNatRulesClient", "CreateOrUpdate", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.InboundNatRulesClient", "CreateOrUpdate", nil, "Failure sending request")
return
}
@@ -102,7 +102,7 @@ func (client InboundNatRulesClient) CreateOrUpdatePreparer(ctx context.Context,
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -125,7 +125,33 @@ func (client InboundNatRulesClient) CreateOrUpdateSender(req *http.Request) (fut
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(client InboundNatRulesClient) (inr InboundNatRule, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.InboundNatRulesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.InboundNatRulesCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ inr.Response.Response, err = future.GetResult(sender)
+ if inr.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "network.InboundNatRulesCreateOrUpdateFuture", "Result", nil, "received nil response and error")
+ }
+ if err == nil && inr.Response.Response.StatusCode != http.StatusNoContent {
+ inr, err = client.CreateOrUpdateResponder(inr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.InboundNatRulesCreateOrUpdateFuture", "Result", inr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+ }
return
}
@@ -165,7 +191,7 @@ func (client InboundNatRulesClient) Delete(ctx context.Context, resourceGroupNam
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.InboundNatRulesClient", "Delete", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.InboundNatRulesClient", "Delete", nil, "Failure sending request")
return
}
@@ -181,7 +207,7 @@ func (client InboundNatRulesClient) DeletePreparer(ctx context.Context, resource
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -202,7 +228,23 @@ func (client InboundNatRulesClient) DeleteSender(req *http.Request) (future Inbo
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(client InboundNatRulesClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.InboundNatRulesDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.InboundNatRulesDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
return
}
@@ -250,6 +292,7 @@ func (client InboundNatRulesClient) Get(ctx context.Context, resourceGroupName s
result, err = client.GetResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "network.InboundNatRulesClient", "Get", resp, "Failure responding to request")
+ return
}
return
@@ -264,7 +307,7 @@ func (client InboundNatRulesClient) GetPreparer(ctx context.Context, resourceGro
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -330,9 +373,11 @@ func (client InboundNatRulesClient) List(ctx context.Context, resourceGroupName
result.inrlr, err = client.ListResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "network.InboundNatRulesClient", "List", resp, "Failure responding to request")
+ return
}
if result.inrlr.hasNextLink() && result.inrlr.IsEmpty() {
err = result.NextWithContext(ctx)
+ return
}
return
@@ -346,7 +391,7 @@ func (client InboundNatRulesClient) ListPreparer(ctx context.Context, resourceGr
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/interfaceipconfigurations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/interfaceipconfigurations.go
similarity index 99%
rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/interfaceipconfigurations.go
rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/interfaceipconfigurations.go
index e6810e847f5..83222497b58 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/interfaceipconfigurations.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/interfaceipconfigurations.go
@@ -74,6 +74,7 @@ func (client InterfaceIPConfigurationsClient) Get(ctx context.Context, resourceG
result, err = client.GetResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "network.InterfaceIPConfigurationsClient", "Get", resp, "Failure responding to request")
+ return
}
return
@@ -88,7 +89,7 @@ func (client InterfaceIPConfigurationsClient) GetPreparer(ctx context.Context, r
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -151,9 +152,11 @@ func (client InterfaceIPConfigurationsClient) List(ctx context.Context, resource
result.iiclr, err = client.ListResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "network.InterfaceIPConfigurationsClient", "List", resp, "Failure responding to request")
+ return
}
if result.iiclr.hasNextLink() && result.iiclr.IsEmpty() {
err = result.NextWithContext(ctx)
+ return
}
return
@@ -167,7 +170,7 @@ func (client InterfaceIPConfigurationsClient) ListPreparer(ctx context.Context,
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/interfaceloadbalancers.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/interfaceloadbalancers.go
similarity index 99%
rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/interfaceloadbalancers.go
rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/interfaceloadbalancers.go
index 01b3ce6883a..7ab2bc2012d 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/interfaceloadbalancers.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/interfaceloadbalancers.go
@@ -74,9 +74,11 @@ func (client InterfaceLoadBalancersClient) List(ctx context.Context, resourceGro
result.ilblr, err = client.ListResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "network.InterfaceLoadBalancersClient", "List", resp, "Failure responding to request")
+ return
}
if result.ilblr.hasNextLink() && result.ilblr.IsEmpty() {
err = result.NextWithContext(ctx)
+ return
}
return
@@ -90,7 +92,7 @@ func (client InterfaceLoadBalancersClient) ListPreparer(ctx context.Context, res
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/interfacesgroup.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/interfacesgroup.go
similarity index 89%
rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/interfacesgroup.go
rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/interfacesgroup.go
index a5111482267..ffaa3f6e349 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/interfacesgroup.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/interfacesgroup.go
@@ -65,7 +65,7 @@ func (client InterfacesClient) CreateOrUpdate(ctx context.Context, resourceGroup
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesClient", "CreateOrUpdate", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.InterfacesClient", "CreateOrUpdate", nil, "Failure sending request")
return
}
@@ -80,7 +80,7 @@ func (client InterfacesClient) CreateOrUpdatePreparer(ctx context.Context, resou
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -103,7 +103,33 @@ func (client InterfacesClient) CreateOrUpdateSender(req *http.Request) (future I
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(client InterfacesClient) (i Interface, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.InterfacesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.InterfacesCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ i.Response.Response, err = future.GetResult(sender)
+ if i.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "network.InterfacesCreateOrUpdateFuture", "Result", nil, "received nil response and error")
+ }
+ if err == nil && i.Response.Response.StatusCode != http.StatusNoContent {
+ i, err = client.CreateOrUpdateResponder(i.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.InterfacesCreateOrUpdateFuture", "Result", i.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+ }
return
}
@@ -142,7 +168,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", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.InterfacesClient", "Delete", nil, "Failure sending request")
return
}
@@ -157,7 +183,7 @@ func (client InterfacesClient) DeletePreparer(ctx context.Context, resourceGroup
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -178,7 +204,23 @@ func (client InterfacesClient) DeleteSender(req *http.Request) (future Interface
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(client InterfacesClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.InterfacesDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.InterfacesDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
return
}
@@ -225,6 +267,7 @@ func (client InterfacesClient) Get(ctx context.Context, resourceGroupName string
result, err = client.GetResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "network.InterfacesClient", "Get", resp, "Failure responding to request")
+ return
}
return
@@ -238,7 +281,7 @@ func (client InterfacesClient) GetPreparer(ctx context.Context, resourceGroupNam
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -295,7 +338,7 @@ func (client InterfacesClient) GetEffectiveRouteTable(ctx context.Context, resou
result, err = client.GetEffectiveRouteTableSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesClient", "GetEffectiveRouteTable", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.InterfacesClient", "GetEffectiveRouteTable", nil, "Failure sending request")
return
}
@@ -310,7 +353,7 @@ func (client InterfacesClient) GetEffectiveRouteTablePreparer(ctx context.Contex
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -331,7 +374,33 @@ func (client InterfacesClient) GetEffectiveRouteTableSender(req *http.Request) (
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(client InterfacesClient) (erlr EffectiveRouteListResult, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.InterfacesGetEffectiveRouteTableFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.InterfacesGetEffectiveRouteTableFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ erlr.Response.Response, err = future.GetResult(sender)
+ if erlr.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "network.InterfacesGetEffectiveRouteTableFuture", "Result", nil, "received nil response and error")
+ }
+ if err == nil && erlr.Response.Response.StatusCode != http.StatusNoContent {
+ erlr, err = client.GetEffectiveRouteTableResponder(erlr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.InterfacesGetEffectiveRouteTableFuture", "Result", erlr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+ }
return
}
@@ -383,6 +452,7 @@ func (client InterfacesClient) GetVirtualMachineScaleSetIPConfiguration(ctx cont
result, err = client.GetVirtualMachineScaleSetIPConfigurationResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "network.InterfacesClient", "GetVirtualMachineScaleSetIPConfiguration", resp, "Failure responding to request")
+ return
}
return
@@ -467,6 +537,7 @@ func (client InterfacesClient) GetVirtualMachineScaleSetNetworkInterface(ctx con
result, err = client.GetVirtualMachineScaleSetNetworkInterfaceResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "network.InterfacesClient", "GetVirtualMachineScaleSetNetworkInterface", resp, "Failure responding to request")
+ return
}
return
@@ -547,9 +618,11 @@ func (client InterfacesClient) List(ctx context.Context, resourceGroupName strin
result.ilr, err = client.ListResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "network.InterfacesClient", "List", resp, "Failure responding to request")
+ return
}
if result.ilr.hasNextLink() && result.ilr.IsEmpty() {
err = result.NextWithContext(ctx)
+ return
}
return
@@ -562,7 +635,7 @@ func (client InterfacesClient) ListPreparer(ctx context.Context, resourceGroupNa
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -659,9 +732,11 @@ func (client InterfacesClient) ListAll(ctx context.Context) (result InterfaceLis
result.ilr, err = client.ListAllResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "network.InterfacesClient", "ListAll", resp, "Failure responding to request")
+ return
}
if result.ilr.hasNextLink() && result.ilr.IsEmpty() {
err = result.NextWithContext(ctx)
+ return
}
return
@@ -673,7 +748,7 @@ func (client InterfacesClient) ListAllPreparer(ctx context.Context) (*http.Reque
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -764,7 +839,7 @@ func (client InterfacesClient) ListEffectiveNetworkSecurityGroups(ctx context.Co
result, err = client.ListEffectiveNetworkSecurityGroupsSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesClient", "ListEffectiveNetworkSecurityGroups", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.InterfacesClient", "ListEffectiveNetworkSecurityGroups", nil, "Failure sending request")
return
}
@@ -779,7 +854,7 @@ func (client InterfacesClient) ListEffectiveNetworkSecurityGroupsPreparer(ctx co
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -800,7 +875,33 @@ func (client InterfacesClient) ListEffectiveNetworkSecurityGroupsSender(req *htt
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(client InterfacesClient) (ensglr EffectiveNetworkSecurityGroupListResult, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.InterfacesListEffectiveNetworkSecurityGroupsFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.InterfacesListEffectiveNetworkSecurityGroupsFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ ensglr.Response.Response, err = future.GetResult(sender)
+ if ensglr.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "network.InterfacesListEffectiveNetworkSecurityGroupsFuture", "Result", nil, "received nil response and error")
+ }
+ if err == nil && ensglr.Response.Response.StatusCode != http.StatusNoContent {
+ ensglr, err = client.ListEffectiveNetworkSecurityGroupsResponder(ensglr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.InterfacesListEffectiveNetworkSecurityGroupsFuture", "Result", ensglr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+ }
return
}
@@ -852,9 +953,11 @@ func (client InterfacesClient) ListVirtualMachineScaleSetIPConfigurations(ctx co
result.iiclr, err = client.ListVirtualMachineScaleSetIPConfigurationsResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "network.InterfacesClient", "ListVirtualMachineScaleSetIPConfigurations", resp, "Failure responding to request")
+ return
}
if result.iiclr.hasNextLink() && result.iiclr.IsEmpty() {
err = result.NextWithContext(ctx)
+ return
}
return
@@ -973,9 +1076,11 @@ func (client InterfacesClient) ListVirtualMachineScaleSetNetworkInterfaces(ctx c
result.ilr, err = client.ListVirtualMachineScaleSetNetworkInterfacesResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "network.InterfacesClient", "ListVirtualMachineScaleSetNetworkInterfaces", resp, "Failure responding to request")
+ return
}
if result.ilr.hasNextLink() && result.ilr.IsEmpty() {
err = result.NextWithContext(ctx)
+ return
}
return
@@ -1091,9 +1196,11 @@ func (client InterfacesClient) ListVirtualMachineScaleSetVMNetworkInterfaces(ctx
result.ilr, err = client.ListVirtualMachineScaleSetVMNetworkInterfacesResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "network.InterfacesClient", "ListVirtualMachineScaleSetVMNetworkInterfaces", resp, "Failure responding to request")
+ return
}
if result.ilr.hasNextLink() && result.ilr.IsEmpty() {
err = result.NextWithContext(ctx)
+ return
}
return
@@ -1200,7 +1307,7 @@ func (client InterfacesClient) UpdateTags(ctx context.Context, resourceGroupName
result, err = client.UpdateTagsSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesClient", "UpdateTags", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.InterfacesClient", "UpdateTags", nil, "Failure sending request")
return
}
@@ -1215,7 +1322,7 @@ func (client InterfacesClient) UpdateTagsPreparer(ctx context.Context, resourceG
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -1238,7 +1345,33 @@ func (client InterfacesClient) UpdateTagsSender(req *http.Request) (future Inter
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(client InterfacesClient) (i Interface, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.InterfacesUpdateTagsFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.InterfacesUpdateTagsFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ i.Response.Response, err = future.GetResult(sender)
+ if i.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "network.InterfacesUpdateTagsFuture", "Result", nil, "received nil response and error")
+ }
+ if err == nil && i.Response.Response.StatusCode != http.StatusNoContent {
+ i, err = client.UpdateTagsResponder(i.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.InterfacesUpdateTagsFuture", "Result", i.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+ }
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/loadbalancerbackendaddresspools.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/loadbalancerbackendaddresspools.go
similarity index 99%
rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/loadbalancerbackendaddresspools.go
rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/loadbalancerbackendaddresspools.go
index cfff1fc381b..a67d3377270 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/loadbalancerbackendaddresspools.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/loadbalancerbackendaddresspools.go
@@ -74,6 +74,7 @@ func (client LoadBalancerBackendAddressPoolsClient) Get(ctx context.Context, res
result, err = client.GetResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "network.LoadBalancerBackendAddressPoolsClient", "Get", resp, "Failure responding to request")
+ return
}
return
@@ -88,7 +89,7 @@ func (client LoadBalancerBackendAddressPoolsClient) GetPreparer(ctx context.Cont
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -151,9 +152,11 @@ func (client LoadBalancerBackendAddressPoolsClient) List(ctx context.Context, re
result.lbbaplr, err = client.ListResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "network.LoadBalancerBackendAddressPoolsClient", "List", resp, "Failure responding to request")
+ return
}
if result.lbbaplr.hasNextLink() && result.lbbaplr.IsEmpty() {
err = result.NextWithContext(ctx)
+ return
}
return
@@ -167,7 +170,7 @@ func (client LoadBalancerBackendAddressPoolsClient) ListPreparer(ctx context.Con
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/loadbalancerfrontendipconfigurations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/loadbalancerfrontendipconfigurations.go
similarity index 99%
rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/loadbalancerfrontendipconfigurations.go
rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/loadbalancerfrontendipconfigurations.go
index a3a9bbb6ac1..0fe5cae2de9 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/loadbalancerfrontendipconfigurations.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/loadbalancerfrontendipconfigurations.go
@@ -75,6 +75,7 @@ func (client LoadBalancerFrontendIPConfigurationsClient) Get(ctx context.Context
result, err = client.GetResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "network.LoadBalancerFrontendIPConfigurationsClient", "Get", resp, "Failure responding to request")
+ return
}
return
@@ -89,7 +90,7 @@ func (client LoadBalancerFrontendIPConfigurationsClient) GetPreparer(ctx context
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -152,9 +153,11 @@ func (client LoadBalancerFrontendIPConfigurationsClient) List(ctx context.Contex
result.lbficlr, err = client.ListResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "network.LoadBalancerFrontendIPConfigurationsClient", "List", resp, "Failure responding to request")
+ return
}
if result.lbficlr.hasNextLink() && result.lbficlr.IsEmpty() {
err = result.NextWithContext(ctx)
+ return
}
return
@@ -168,7 +171,7 @@ func (client LoadBalancerFrontendIPConfigurationsClient) ListPreparer(ctx contex
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/loadbalancerloadbalancingrules.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/loadbalancerloadbalancingrules.go
similarity index 99%
rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/loadbalancerloadbalancingrules.go
rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/loadbalancerloadbalancingrules.go
index e7b91b10d90..cb42aa4bdc5 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/loadbalancerloadbalancingrules.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/loadbalancerloadbalancingrules.go
@@ -74,6 +74,7 @@ func (client LoadBalancerLoadBalancingRulesClient) Get(ctx context.Context, reso
result, err = client.GetResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "network.LoadBalancerLoadBalancingRulesClient", "Get", resp, "Failure responding to request")
+ return
}
return
@@ -88,7 +89,7 @@ func (client LoadBalancerLoadBalancingRulesClient) GetPreparer(ctx context.Conte
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -151,9 +152,11 @@ func (client LoadBalancerLoadBalancingRulesClient) List(ctx context.Context, res
result.lblbrlr, err = client.ListResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "network.LoadBalancerLoadBalancingRulesClient", "List", resp, "Failure responding to request")
+ return
}
if result.lblbrlr.hasNextLink() && result.lblbrlr.IsEmpty() {
err = result.NextWithContext(ctx)
+ return
}
return
@@ -167,7 +170,7 @@ func (client LoadBalancerLoadBalancingRulesClient) ListPreparer(ctx context.Cont
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/loadbalancernetworkinterfaces.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/loadbalancernetworkinterfaces.go
similarity index 99%
rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/loadbalancernetworkinterfaces.go
rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/loadbalancernetworkinterfaces.go
index 7aa11406a3a..ad765e75570 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/loadbalancernetworkinterfaces.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/loadbalancernetworkinterfaces.go
@@ -74,9 +74,11 @@ func (client LoadBalancerNetworkInterfacesClient) List(ctx context.Context, reso
result.ilr, err = client.ListResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "network.LoadBalancerNetworkInterfacesClient", "List", resp, "Failure responding to request")
+ return
}
if result.ilr.hasNextLink() && result.ilr.IsEmpty() {
err = result.NextWithContext(ctx)
+ return
}
return
@@ -90,7 +92,7 @@ func (client LoadBalancerNetworkInterfacesClient) ListPreparer(ctx context.Conte
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/loadbalancerprobes.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/loadbalancerprobes.go
similarity index 99%
rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/loadbalancerprobes.go
rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/loadbalancerprobes.go
index 7718c0fdef2..0df08e2175e 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/loadbalancerprobes.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/loadbalancerprobes.go
@@ -74,6 +74,7 @@ func (client LoadBalancerProbesClient) Get(ctx context.Context, resourceGroupNam
result, err = client.GetResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "network.LoadBalancerProbesClient", "Get", resp, "Failure responding to request")
+ return
}
return
@@ -88,7 +89,7 @@ func (client LoadBalancerProbesClient) GetPreparer(ctx context.Context, resource
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -151,9 +152,11 @@ func (client LoadBalancerProbesClient) List(ctx context.Context, resourceGroupNa
result.lbplr, err = client.ListResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "network.LoadBalancerProbesClient", "List", resp, "Failure responding to request")
+ return
}
if result.lbplr.hasNextLink() && result.lbplr.IsEmpty() {
err = result.NextWithContext(ctx)
+ return
}
return
@@ -167,7 +170,7 @@ func (client LoadBalancerProbesClient) ListPreparer(ctx context.Context, resourc
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/loadbalancers.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/loadbalancers.go
similarity index 86%
rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/loadbalancers.go
rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/loadbalancers.go
index acae4fe6c04..2d62dab170c 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/loadbalancers.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/loadbalancers.go
@@ -65,7 +65,7 @@ func (client LoadBalancersClient) CreateOrUpdate(ctx context.Context, resourceGr
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.LoadBalancersClient", "CreateOrUpdate", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.LoadBalancersClient", "CreateOrUpdate", nil, "Failure sending request")
return
}
@@ -80,7 +80,7 @@ func (client LoadBalancersClient) CreateOrUpdatePreparer(ctx context.Context, re
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -103,7 +103,33 @@ func (client LoadBalancersClient) CreateOrUpdateSender(req *http.Request) (futur
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(client LoadBalancersClient) (lb LoadBalancer, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.LoadBalancersCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.LoadBalancersCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ lb.Response.Response, err = future.GetResult(sender)
+ if lb.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "network.LoadBalancersCreateOrUpdateFuture", "Result", nil, "received nil response and error")
+ }
+ if err == nil && lb.Response.Response.StatusCode != http.StatusNoContent {
+ lb, err = client.CreateOrUpdateResponder(lb.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.LoadBalancersCreateOrUpdateFuture", "Result", lb.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+ }
return
}
@@ -142,7 +168,7 @@ func (client LoadBalancersClient) Delete(ctx context.Context, resourceGroupName
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.LoadBalancersClient", "Delete", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.LoadBalancersClient", "Delete", nil, "Failure sending request")
return
}
@@ -157,7 +183,7 @@ func (client LoadBalancersClient) DeletePreparer(ctx context.Context, resourceGr
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -178,7 +204,23 @@ func (client LoadBalancersClient) DeleteSender(req *http.Request) (future LoadBa
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(client LoadBalancersClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.LoadBalancersDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.LoadBalancersDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
return
}
@@ -225,6 +267,7 @@ func (client LoadBalancersClient) Get(ctx context.Context, resourceGroupName str
result, err = client.GetResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "network.LoadBalancersClient", "Get", resp, "Failure responding to request")
+ return
}
return
@@ -238,7 +281,7 @@ func (client LoadBalancersClient) GetPreparer(ctx context.Context, resourceGroup
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -303,9 +346,11 @@ func (client LoadBalancersClient) List(ctx context.Context, resourceGroupName st
result.lblr, err = client.ListResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "network.LoadBalancersClient", "List", resp, "Failure responding to request")
+ return
}
if result.lblr.hasNextLink() && result.lblr.IsEmpty() {
err = result.NextWithContext(ctx)
+ return
}
return
@@ -318,7 +363,7 @@ func (client LoadBalancersClient) ListPreparer(ctx context.Context, resourceGrou
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -415,9 +460,11 @@ func (client LoadBalancersClient) ListAll(ctx context.Context) (result LoadBalan
result.lblr, err = client.ListAllResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "network.LoadBalancersClient", "ListAll", resp, "Failure responding to request")
+ return
}
if result.lblr.hasNextLink() && result.lblr.IsEmpty() {
err = result.NextWithContext(ctx)
+ return
}
return
@@ -429,7 +476,7 @@ func (client LoadBalancersClient) ListAllPreparer(ctx context.Context) (*http.Re
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -521,7 +568,7 @@ func (client LoadBalancersClient) UpdateTags(ctx context.Context, resourceGroupN
result, err = client.UpdateTagsSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.LoadBalancersClient", "UpdateTags", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.LoadBalancersClient", "UpdateTags", nil, "Failure sending request")
return
}
@@ -536,7 +583,7 @@ func (client LoadBalancersClient) UpdateTagsPreparer(ctx context.Context, resour
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -559,7 +606,33 @@ func (client LoadBalancersClient) UpdateTagsSender(req *http.Request) (future Lo
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(client LoadBalancersClient) (lb LoadBalancer, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.LoadBalancersUpdateTagsFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.LoadBalancersUpdateTagsFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ lb.Response.Response, err = future.GetResult(sender)
+ if lb.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "network.LoadBalancersUpdateTagsFuture", "Result", nil, "received nil response and error")
+ }
+ if err == nil && lb.Response.Response.StatusCode != http.StatusNoContent {
+ lb, err = client.UpdateTagsResponder(lb.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.LoadBalancersUpdateTagsFuture", "Result", lb.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+ }
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/localnetworkgateways.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/localnetworkgateways.go
similarity index 84%
rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/localnetworkgateways.go
rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/localnetworkgateways.go
index 2c908f85e7d..981704d0bf9 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/localnetworkgateways.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/localnetworkgateways.go
@@ -75,7 +75,7 @@ func (client LocalNetworkGatewaysClient) CreateOrUpdate(ctx context.Context, res
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysClient", "CreateOrUpdate", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysClient", "CreateOrUpdate", nil, "Failure sending request")
return
}
@@ -90,7 +90,7 @@ func (client LocalNetworkGatewaysClient) CreateOrUpdatePreparer(ctx context.Cont
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -113,7 +113,33 @@ func (client LocalNetworkGatewaysClient) CreateOrUpdateSender(req *http.Request)
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(client LocalNetworkGatewaysClient) (lng LocalNetworkGateway, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ lng.Response.Response, err = future.GetResult(sender)
+ if lng.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysCreateOrUpdateFuture", "Result", nil, "received nil response and error")
+ }
+ if err == nil && lng.Response.Response.StatusCode != http.StatusNoContent {
+ lng, err = client.CreateOrUpdateResponder(lng.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysCreateOrUpdateFuture", "Result", lng.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+ }
return
}
@@ -158,7 +184,7 @@ func (client LocalNetworkGatewaysClient) Delete(ctx context.Context, resourceGro
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysClient", "Delete", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysClient", "Delete", nil, "Failure sending request")
return
}
@@ -173,7 +199,7 @@ func (client LocalNetworkGatewaysClient) DeletePreparer(ctx context.Context, res
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -194,7 +220,23 @@ func (client LocalNetworkGatewaysClient) DeleteSender(req *http.Request) (future
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(client LocalNetworkGatewaysClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
return
}
@@ -246,6 +288,7 @@ func (client LocalNetworkGatewaysClient) Get(ctx context.Context, resourceGroupN
result, err = client.GetResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysClient", "Get", resp, "Failure responding to request")
+ return
}
return
@@ -259,7 +302,7 @@ func (client LocalNetworkGatewaysClient) GetPreparer(ctx context.Context, resour
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -321,9 +364,11 @@ func (client LocalNetworkGatewaysClient) List(ctx context.Context, resourceGroup
result.lnglr, err = client.ListResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysClient", "List", resp, "Failure responding to request")
+ return
}
if result.lnglr.hasNextLink() && result.lnglr.IsEmpty() {
err = result.NextWithContext(ctx)
+ return
}
return
@@ -336,7 +381,7 @@ func (client LocalNetworkGatewaysClient) ListPreparer(ctx context.Context, resou
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -434,7 +479,7 @@ func (client LocalNetworkGatewaysClient) UpdateTags(ctx context.Context, resourc
result, err = client.UpdateTagsSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysClient", "UpdateTags", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysClient", "UpdateTags", nil, "Failure sending request")
return
}
@@ -449,7 +494,7 @@ func (client LocalNetworkGatewaysClient) UpdateTagsPreparer(ctx context.Context,
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -472,7 +517,33 @@ func (client LocalNetworkGatewaysClient) UpdateTagsSender(req *http.Request) (fu
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(client LocalNetworkGatewaysClient) (lng LocalNetworkGateway, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysUpdateTagsFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysUpdateTagsFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ lng.Response.Response, err = future.GetResult(sender)
+ if lng.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysUpdateTagsFuture", "Result", nil, "received nil response and error")
+ }
+ if err == nil && lng.Response.Response.StatusCode != http.StatusNoContent {
+ lng, err = client.UpdateTagsResponder(lng.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysUpdateTagsFuture", "Result", lng.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+ }
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/models.go
new file mode 100644
index 00000000000..562d899daf8
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/models.go
@@ -0,0 +1,15288 @@
+package network
+
+// Copyright (c) Microsoft and contributors. All rights reserved.
+//
+// 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 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/network/mgmt/2017-10-01/network"
+
+// AddressSpace addressSpace contains an array of IP address ranges that can be used by subnets of the
+// virtual network.
+type AddressSpace struct {
+ // AddressPrefixes - A list of address blocks reserved for this virtual network in CIDR notation.
+ AddressPrefixes *[]string `json:"addressPrefixes,omitempty"`
+}
+
+// ApplicationGateway application gateway resource
+type ApplicationGateway struct {
+ autorest.Response `json:"-"`
+ *ApplicationGatewayPropertiesFormat `json:"properties,omitempty"`
+ // Etag - A unique read-only string that changes whenever the resource is updated.
+ Etag *string `json:"etag,omitempty"`
+ // ID - 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 ApplicationGateway.
+func (ag ApplicationGateway) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if ag.ApplicationGatewayPropertiesFormat != nil {
+ objectMap["properties"] = ag.ApplicationGatewayPropertiesFormat
+ }
+ if ag.Etag != nil {
+ objectMap["etag"] = ag.Etag
+ }
+ if ag.ID != nil {
+ objectMap["id"] = ag.ID
+ }
+ if ag.Location != nil {
+ objectMap["location"] = ag.Location
+ }
+ if ag.Tags != nil {
+ objectMap["tags"] = ag.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for ApplicationGateway struct.
+func (ag *ApplicationGateway) 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 applicationGatewayPropertiesFormat ApplicationGatewayPropertiesFormat
+ err = json.Unmarshal(*v, &applicationGatewayPropertiesFormat)
+ if err != nil {
+ return err
+ }
+ ag.ApplicationGatewayPropertiesFormat = &applicationGatewayPropertiesFormat
+ }
+ case "etag":
+ if v != nil {
+ var etag string
+ err = json.Unmarshal(*v, &etag)
+ if err != nil {
+ return err
+ }
+ ag.Etag = &etag
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ ag.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ ag.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ ag.Type = &typeVar
+ }
+ case "location":
+ if v != nil {
+ var location string
+ err = json.Unmarshal(*v, &location)
+ if err != nil {
+ return err
+ }
+ ag.Location = &location
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ ag.Tags = tags
+ }
+ }
+ }
+
+ return nil
+}
+
+// ApplicationGatewayAuthenticationCertificate authentication certificates of an application gateway.
+type ApplicationGatewayAuthenticationCertificate struct {
+ *ApplicationGatewayAuthenticationCertificatePropertiesFormat `json:"properties,omitempty"`
+ // Name - 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"`
+ // Etag - A unique read-only string that changes whenever the resource is updated.
+ Etag *string `json:"etag,omitempty"`
+ // Type - Type of the resource.
+ Type *string `json:"type,omitempty"`
+ // ID - Resource ID.
+ ID *string `json:"id,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for ApplicationGatewayAuthenticationCertificate.
+func (agac ApplicationGatewayAuthenticationCertificate) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if agac.ApplicationGatewayAuthenticationCertificatePropertiesFormat != nil {
+ objectMap["properties"] = agac.ApplicationGatewayAuthenticationCertificatePropertiesFormat
+ }
+ if agac.Name != nil {
+ objectMap["name"] = agac.Name
+ }
+ if agac.Etag != nil {
+ objectMap["etag"] = agac.Etag
+ }
+ if agac.Type != nil {
+ objectMap["type"] = agac.Type
+ }
+ if agac.ID != nil {
+ objectMap["id"] = agac.ID
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayAuthenticationCertificate struct.
+func (agac *ApplicationGatewayAuthenticationCertificate) 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 applicationGatewayAuthenticationCertificatePropertiesFormat ApplicationGatewayAuthenticationCertificatePropertiesFormat
+ err = json.Unmarshal(*v, &applicationGatewayAuthenticationCertificatePropertiesFormat)
+ if err != nil {
+ return err
+ }
+ agac.ApplicationGatewayAuthenticationCertificatePropertiesFormat = &applicationGatewayAuthenticationCertificatePropertiesFormat
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ agac.Name = &name
+ }
+ case "etag":
+ if v != nil {
+ var etag string
+ err = json.Unmarshal(*v, &etag)
+ if err != nil {
+ return err
+ }
+ agac.Etag = &etag
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ agac.Type = &typeVar
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ agac.ID = &ID
+ }
+ }
+ }
+
+ return nil
+}
+
+// ApplicationGatewayAuthenticationCertificatePropertiesFormat authentication certificates properties of an
+// application gateway.
+type ApplicationGatewayAuthenticationCertificatePropertiesFormat struct {
+ // Data - Certificate public data.
+ Data *string `json:"data,omitempty"`
+ // ProvisioningState - Provisioning state of the authentication certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+}
+
+// ApplicationGatewayAvailableSslOptions response for ApplicationGatewayAvailableSslOptions API service
+// call.
+type ApplicationGatewayAvailableSslOptions struct {
+ autorest.Response `json:"-"`
+ *ApplicationGatewayAvailableSslOptionsPropertiesFormat `json:"properties,omitempty"`
+ // ID - 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 ApplicationGatewayAvailableSslOptions.
+func (agaso ApplicationGatewayAvailableSslOptions) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if agaso.ApplicationGatewayAvailableSslOptionsPropertiesFormat != nil {
+ objectMap["properties"] = agaso.ApplicationGatewayAvailableSslOptionsPropertiesFormat
+ }
+ if agaso.ID != nil {
+ objectMap["id"] = agaso.ID
+ }
+ if agaso.Location != nil {
+ objectMap["location"] = agaso.Location
+ }
+ if agaso.Tags != nil {
+ objectMap["tags"] = agaso.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayAvailableSslOptions struct.
+func (agaso *ApplicationGatewayAvailableSslOptions) 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 applicationGatewayAvailableSslOptionsPropertiesFormat ApplicationGatewayAvailableSslOptionsPropertiesFormat
+ err = json.Unmarshal(*v, &applicationGatewayAvailableSslOptionsPropertiesFormat)
+ if err != nil {
+ return err
+ }
+ agaso.ApplicationGatewayAvailableSslOptionsPropertiesFormat = &applicationGatewayAvailableSslOptionsPropertiesFormat
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ agaso.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ agaso.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ agaso.Type = &typeVar
+ }
+ case "location":
+ if v != nil {
+ var location string
+ err = json.Unmarshal(*v, &location)
+ if err != nil {
+ return err
+ }
+ agaso.Location = &location
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ agaso.Tags = tags
+ }
+ }
+ }
+
+ return nil
+}
+
+// ApplicationGatewayAvailableSslOptionsPropertiesFormat properties of
+// ApplicationGatewayAvailableSslOptions
+type ApplicationGatewayAvailableSslOptionsPropertiesFormat struct {
+ // PredefinedPolicies - List of available Ssl predefined policy.
+ PredefinedPolicies *[]SubResource `json:"predefinedPolicies,omitempty"`
+ // DefaultPolicy - Name of the Ssl predefined policy applied by default to application gateway. Possible values include: 'AppGwSslPolicy20150501', 'AppGwSslPolicy20170401', 'AppGwSslPolicy20170401S'
+ DefaultPolicy ApplicationGatewaySslPolicyName `json:"defaultPolicy,omitempty"`
+ // AvailableCipherSuites - List of available Ssl cipher suites.
+ AvailableCipherSuites *[]ApplicationGatewaySslCipherSuite `json:"availableCipherSuites,omitempty"`
+ // AvailableProtocols - List of available Ssl protocols.
+ AvailableProtocols *[]ApplicationGatewaySslProtocol `json:"availableProtocols,omitempty"`
+}
+
+// ApplicationGatewayAvailableSslPredefinedPolicies response for ApplicationGatewayAvailableSslOptions API
+// service call.
+type ApplicationGatewayAvailableSslPredefinedPolicies struct {
+ autorest.Response `json:"-"`
+ // Value - List of available Ssl predefined policy.
+ Value *[]ApplicationGatewaySslPredefinedPolicy `json:"value,omitempty"`
+ // NextLink - URL to get the next set of results.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// ApplicationGatewayAvailableSslPredefinedPoliciesIterator provides access to a complete listing of
+// ApplicationGatewaySslPredefinedPolicy values.
+type ApplicationGatewayAvailableSslPredefinedPoliciesIterator struct {
+ i int
+ page ApplicationGatewayAvailableSslPredefinedPoliciesPage
+}
+
+// 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 *ApplicationGatewayAvailableSslPredefinedPoliciesIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewayAvailableSslPredefinedPoliciesIterator.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 *ApplicationGatewayAvailableSslPredefinedPoliciesIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter ApplicationGatewayAvailableSslPredefinedPoliciesIterator) 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 ApplicationGatewayAvailableSslPredefinedPoliciesIterator) Response() ApplicationGatewayAvailableSslPredefinedPolicies {
+ 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 ApplicationGatewayAvailableSslPredefinedPoliciesIterator) Value() ApplicationGatewaySslPredefinedPolicy {
+ if !iter.page.NotDone() {
+ return ApplicationGatewaySslPredefinedPolicy{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// Creates a new instance of the ApplicationGatewayAvailableSslPredefinedPoliciesIterator type.
+func NewApplicationGatewayAvailableSslPredefinedPoliciesIterator(page ApplicationGatewayAvailableSslPredefinedPoliciesPage) ApplicationGatewayAvailableSslPredefinedPoliciesIterator {
+ return ApplicationGatewayAvailableSslPredefinedPoliciesIterator{page: page}
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (agaspp ApplicationGatewayAvailableSslPredefinedPolicies) IsEmpty() bool {
+ return agaspp.Value == nil || len(*agaspp.Value) == 0
+}
+
+// hasNextLink returns true if the NextLink is not empty.
+func (agaspp ApplicationGatewayAvailableSslPredefinedPolicies) hasNextLink() bool {
+ return agaspp.NextLink != nil && len(*agaspp.NextLink) != 0
+}
+
+// applicationGatewayAvailableSslPredefinedPoliciesPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (agaspp ApplicationGatewayAvailableSslPredefinedPolicies) applicationGatewayAvailableSslPredefinedPoliciesPreparer(ctx context.Context) (*http.Request, error) {
+ if !agaspp.hasNextLink() {
+ return nil, nil
+ }
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(agaspp.NextLink)))
+}
+
+// ApplicationGatewayAvailableSslPredefinedPoliciesPage contains a page of
+// ApplicationGatewaySslPredefinedPolicy values.
+type ApplicationGatewayAvailableSslPredefinedPoliciesPage struct {
+ fn func(context.Context, ApplicationGatewayAvailableSslPredefinedPolicies) (ApplicationGatewayAvailableSslPredefinedPolicies, error)
+ agaspp ApplicationGatewayAvailableSslPredefinedPolicies
+}
+
+// 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 *ApplicationGatewayAvailableSslPredefinedPoliciesPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewayAvailableSslPredefinedPoliciesPage.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.agaspp)
+ if err != nil {
+ return err
+ }
+ page.agaspp = 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 *ApplicationGatewayAvailableSslPredefinedPoliciesPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page ApplicationGatewayAvailableSslPredefinedPoliciesPage) NotDone() bool {
+ return !page.agaspp.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page ApplicationGatewayAvailableSslPredefinedPoliciesPage) Response() ApplicationGatewayAvailableSslPredefinedPolicies {
+ return page.agaspp
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page ApplicationGatewayAvailableSslPredefinedPoliciesPage) Values() []ApplicationGatewaySslPredefinedPolicy {
+ if page.agaspp.IsEmpty() {
+ return nil
+ }
+ return *page.agaspp.Value
+}
+
+// Creates a new instance of the ApplicationGatewayAvailableSslPredefinedPoliciesPage type.
+func NewApplicationGatewayAvailableSslPredefinedPoliciesPage(cur ApplicationGatewayAvailableSslPredefinedPolicies, getNextPage func(context.Context, ApplicationGatewayAvailableSslPredefinedPolicies) (ApplicationGatewayAvailableSslPredefinedPolicies, error)) ApplicationGatewayAvailableSslPredefinedPoliciesPage {
+ return ApplicationGatewayAvailableSslPredefinedPoliciesPage{
+ fn: getNextPage,
+ agaspp: cur,
+ }
+}
+
+// ApplicationGatewayAvailableWafRuleSetsResult response for ApplicationGatewayAvailableWafRuleSets API
+// service call.
+type ApplicationGatewayAvailableWafRuleSetsResult struct {
+ autorest.Response `json:"-"`
+ // Value - The list of application gateway rule sets.
+ Value *[]ApplicationGatewayFirewallRuleSet `json:"value,omitempty"`
+}
+
+// ApplicationGatewayBackendAddress backend address of an application gateway.
+type ApplicationGatewayBackendAddress struct {
+ // Fqdn - Fully qualified domain name (FQDN).
+ Fqdn *string `json:"fqdn,omitempty"`
+ // IPAddress - IP address
+ IPAddress *string `json:"ipAddress,omitempty"`
+}
+
+// ApplicationGatewayBackendAddressPool backend Address Pool of an application gateway.
+type ApplicationGatewayBackendAddressPool struct {
+ *ApplicationGatewayBackendAddressPoolPropertiesFormat `json:"properties,omitempty"`
+ // Name - Resource that is unique within a resource group. This name can be used to access the resource.
+ Name *string `json:"name,omitempty"`
+ // Etag - A unique read-only string that changes whenever the resource is updated.
+ Etag *string `json:"etag,omitempty"`
+ // Type - Type of the resource.
+ Type *string `json:"type,omitempty"`
+ // ID - Resource ID.
+ ID *string `json:"id,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for ApplicationGatewayBackendAddressPool.
+func (agbap ApplicationGatewayBackendAddressPool) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if agbap.ApplicationGatewayBackendAddressPoolPropertiesFormat != nil {
+ objectMap["properties"] = agbap.ApplicationGatewayBackendAddressPoolPropertiesFormat
+ }
+ if agbap.Name != nil {
+ objectMap["name"] = agbap.Name
+ }
+ if agbap.Etag != nil {
+ objectMap["etag"] = agbap.Etag
+ }
+ if agbap.Type != nil {
+ objectMap["type"] = agbap.Type
+ }
+ if agbap.ID != nil {
+ objectMap["id"] = agbap.ID
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayBackendAddressPool struct.
+func (agbap *ApplicationGatewayBackendAddressPool) 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 applicationGatewayBackendAddressPoolPropertiesFormat ApplicationGatewayBackendAddressPoolPropertiesFormat
+ err = json.Unmarshal(*v, &applicationGatewayBackendAddressPoolPropertiesFormat)
+ if err != nil {
+ return err
+ }
+ agbap.ApplicationGatewayBackendAddressPoolPropertiesFormat = &applicationGatewayBackendAddressPoolPropertiesFormat
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ agbap.Name = &name
+ }
+ case "etag":
+ if v != nil {
+ var etag string
+ err = json.Unmarshal(*v, &etag)
+ if err != nil {
+ return err
+ }
+ agbap.Etag = &etag
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ agbap.Type = &typeVar
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ agbap.ID = &ID
+ }
+ }
+ }
+
+ return nil
+}
+
+// ApplicationGatewayBackendAddressPoolPropertiesFormat properties of Backend Address Pool of an
+// application gateway.
+type ApplicationGatewayBackendAddressPoolPropertiesFormat struct {
+ // BackendIPConfigurations - Collection of references to IPs defined in network interfaces.
+ BackendIPConfigurations *[]InterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"`
+ // BackendAddresses - Backend addresses
+ BackendAddresses *[]ApplicationGatewayBackendAddress `json:"backendAddresses,omitempty"`
+ // ProvisioningState - Provisioning state of the backend address pool resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+}
+
+// ApplicationGatewayBackendHealth list of ApplicationGatewayBackendHealthPool resources.
+type ApplicationGatewayBackendHealth struct {
+ autorest.Response `json:"-"`
+ BackendAddressPools *[]ApplicationGatewayBackendHealthPool `json:"backendAddressPools,omitempty"`
+}
+
+// ApplicationGatewayBackendHealthHTTPSettings application gateway BackendHealthHttp settings.
+type ApplicationGatewayBackendHealthHTTPSettings struct {
+ // BackendHTTPSettings - Reference of an ApplicationGatewayBackendHttpSettings resource.
+ BackendHTTPSettings *ApplicationGatewayBackendHTTPSettings `json:"backendHttpSettings,omitempty"`
+ // Servers - List of ApplicationGatewayBackendHealthServer resources.
+ Servers *[]ApplicationGatewayBackendHealthServer `json:"servers,omitempty"`
+}
+
+// ApplicationGatewayBackendHealthPool application gateway BackendHealth pool.
+type ApplicationGatewayBackendHealthPool struct {
+ // BackendAddressPool - Reference of an ApplicationGatewayBackendAddressPool resource.
+ BackendAddressPool *ApplicationGatewayBackendAddressPool `json:"backendAddressPool,omitempty"`
+ // BackendHTTPSettingsCollection - List of ApplicationGatewayBackendHealthHttpSettings resources.
+ BackendHTTPSettingsCollection *[]ApplicationGatewayBackendHealthHTTPSettings `json:"backendHttpSettingsCollection,omitempty"`
+}
+
+// ApplicationGatewayBackendHealthServer application gateway backendhealth http settings.
+type ApplicationGatewayBackendHealthServer struct {
+ // Address - IP address or FQDN of backend server.
+ Address *string `json:"address,omitempty"`
+ // IPConfiguration - Reference of IP configuration of backend server.
+ IPConfiguration *InterfaceIPConfiguration `json:"ipConfiguration,omitempty"`
+ // Health - Health of backend server. Possible values include: 'Unknown', 'Up', 'Down', 'Partial', 'Draining'
+ Health ApplicationGatewayBackendHealthServerHealth `json:"health,omitempty"`
+}
+
+// ApplicationGatewayBackendHTTPSettings backend address pool settings of an application gateway.
+type ApplicationGatewayBackendHTTPSettings struct {
+ *ApplicationGatewayBackendHTTPSettingsPropertiesFormat `json:"properties,omitempty"`
+ // Name - 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"`
+ // Etag - A unique read-only string that changes whenever the resource is updated.
+ Etag *string `json:"etag,omitempty"`
+ // Type - Type of the resource.
+ Type *string `json:"type,omitempty"`
+ // ID - Resource ID.
+ ID *string `json:"id,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for ApplicationGatewayBackendHTTPSettings.
+func (agbhs ApplicationGatewayBackendHTTPSettings) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if agbhs.ApplicationGatewayBackendHTTPSettingsPropertiesFormat != nil {
+ objectMap["properties"] = agbhs.ApplicationGatewayBackendHTTPSettingsPropertiesFormat
+ }
+ if agbhs.Name != nil {
+ objectMap["name"] = agbhs.Name
+ }
+ if agbhs.Etag != nil {
+ objectMap["etag"] = agbhs.Etag
+ }
+ if agbhs.Type != nil {
+ objectMap["type"] = agbhs.Type
+ }
+ if agbhs.ID != nil {
+ objectMap["id"] = agbhs.ID
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayBackendHTTPSettings struct.
+func (agbhs *ApplicationGatewayBackendHTTPSettings) 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 applicationGatewayBackendHTTPSettingsPropertiesFormat ApplicationGatewayBackendHTTPSettingsPropertiesFormat
+ err = json.Unmarshal(*v, &applicationGatewayBackendHTTPSettingsPropertiesFormat)
+ if err != nil {
+ return err
+ }
+ agbhs.ApplicationGatewayBackendHTTPSettingsPropertiesFormat = &applicationGatewayBackendHTTPSettingsPropertiesFormat
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ agbhs.Name = &name
+ }
+ case "etag":
+ if v != nil {
+ var etag string
+ err = json.Unmarshal(*v, &etag)
+ if err != nil {
+ return err
+ }
+ agbhs.Etag = &etag
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ agbhs.Type = &typeVar
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ agbhs.ID = &ID
+ }
+ }
+ }
+
+ return nil
+}
+
+// ApplicationGatewayBackendHTTPSettingsPropertiesFormat properties of Backend address pool settings of an
+// application gateway.
+type ApplicationGatewayBackendHTTPSettingsPropertiesFormat struct {
+ // Port - Port
+ Port *int32 `json:"port,omitempty"`
+ // Protocol - Protocol. Possible values include: 'HTTP', 'HTTPS'
+ Protocol ApplicationGatewayProtocol `json:"protocol,omitempty"`
+ // CookieBasedAffinity - Cookie based affinity. Possible values include: 'Enabled', 'Disabled'
+ CookieBasedAffinity ApplicationGatewayCookieBasedAffinity `json:"cookieBasedAffinity,omitempty"`
+ // RequestTimeout - Request timeout in seconds. Application Gateway will fail the request if response is not received within RequestTimeout. Acceptable values are from 1 second to 86400 seconds.
+ RequestTimeout *int32 `json:"requestTimeout,omitempty"`
+ // Probe - Probe resource of an application gateway.
+ Probe *SubResource `json:"probe,omitempty"`
+ // AuthenticationCertificates - Array of references to application gateway authentication certificates.
+ AuthenticationCertificates *[]SubResource `json:"authenticationCertificates,omitempty"`
+ // ConnectionDraining - Connection draining of the backend http settings resource.
+ ConnectionDraining *ApplicationGatewayConnectionDraining `json:"connectionDraining,omitempty"`
+ // HostName - Host header to be sent to the backend servers.
+ HostName *string `json:"hostName,omitempty"`
+ // PickHostNameFromBackendAddress - Whether to pick host header should be picked from the host name of the backend server. Default value is false.
+ PickHostNameFromBackendAddress *bool `json:"pickHostNameFromBackendAddress,omitempty"`
+ // AffinityCookieName - Cookie name to use for the affinity cookie.
+ AffinityCookieName *string `json:"affinityCookieName,omitempty"`
+ // ProbeEnabled - Whether the probe is enabled. Default value is false.
+ ProbeEnabled *bool `json:"probeEnabled,omitempty"`
+ // Path - Path which should be used as a prefix for all HTTP requests. Null means no path will be prefixed. Default value is null.
+ Path *string `json:"path,omitempty"`
+ // ProvisioningState - Provisioning state of the backend http settings resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+}
+
+// ApplicationGatewayConnectionDraining connection draining allows open connections to a backend server to
+// be active for a specified time after the backend server got removed from the configuration.
+type ApplicationGatewayConnectionDraining struct {
+ // Enabled - Whether connection draining is enabled or not.
+ Enabled *bool `json:"enabled,omitempty"`
+ // DrainTimeoutInSec - The number of seconds connection draining is active. Acceptable values are from 1 second to 3600 seconds.
+ DrainTimeoutInSec *int32 `json:"drainTimeoutInSec,omitempty"`
+}
+
+// ApplicationGatewayFirewallDisabledRuleGroup allows to disable rules within a rule group or an entire
+// rule group.
+type ApplicationGatewayFirewallDisabledRuleGroup struct {
+ // RuleGroupName - The name of the rule group that will be disabled.
+ RuleGroupName *string `json:"ruleGroupName,omitempty"`
+ // Rules - The list of rules that will be disabled. If null, all rules of the rule group will be disabled.
+ Rules *[]int32 `json:"rules,omitempty"`
+}
+
+// ApplicationGatewayFirewallRule a web application firewall rule.
+type ApplicationGatewayFirewallRule struct {
+ // RuleID - The identifier of the web application firewall rule.
+ RuleID *int32 `json:"ruleId,omitempty"`
+ // Description - The description of the web application firewall rule.
+ Description *string `json:"description,omitempty"`
+}
+
+// ApplicationGatewayFirewallRuleGroup a web application firewall rule group.
+type ApplicationGatewayFirewallRuleGroup struct {
+ // RuleGroupName - The name of the web application firewall rule group.
+ RuleGroupName *string `json:"ruleGroupName,omitempty"`
+ // Description - The description of the web application firewall rule group.
+ Description *string `json:"description,omitempty"`
+ // Rules - The rules of the web application firewall rule group.
+ Rules *[]ApplicationGatewayFirewallRule `json:"rules,omitempty"`
+}
+
+// ApplicationGatewayFirewallRuleSet a web application firewall rule set.
+type ApplicationGatewayFirewallRuleSet struct {
+ *ApplicationGatewayFirewallRuleSetPropertiesFormat `json:"properties,omitempty"`
+ // ID - 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 ApplicationGatewayFirewallRuleSet.
+func (agfrs ApplicationGatewayFirewallRuleSet) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if agfrs.ApplicationGatewayFirewallRuleSetPropertiesFormat != nil {
+ objectMap["properties"] = agfrs.ApplicationGatewayFirewallRuleSetPropertiesFormat
+ }
+ if agfrs.ID != nil {
+ objectMap["id"] = agfrs.ID
+ }
+ if agfrs.Location != nil {
+ objectMap["location"] = agfrs.Location
+ }
+ if agfrs.Tags != nil {
+ objectMap["tags"] = agfrs.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayFirewallRuleSet struct.
+func (agfrs *ApplicationGatewayFirewallRuleSet) 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 applicationGatewayFirewallRuleSetPropertiesFormat ApplicationGatewayFirewallRuleSetPropertiesFormat
+ err = json.Unmarshal(*v, &applicationGatewayFirewallRuleSetPropertiesFormat)
+ if err != nil {
+ return err
+ }
+ agfrs.ApplicationGatewayFirewallRuleSetPropertiesFormat = &applicationGatewayFirewallRuleSetPropertiesFormat
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ agfrs.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ agfrs.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ agfrs.Type = &typeVar
+ }
+ case "location":
+ if v != nil {
+ var location string
+ err = json.Unmarshal(*v, &location)
+ if err != nil {
+ return err
+ }
+ agfrs.Location = &location
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ agfrs.Tags = tags
+ }
+ }
+ }
+
+ return nil
+}
+
+// ApplicationGatewayFirewallRuleSetPropertiesFormat properties of the web application firewall rule set.
+type ApplicationGatewayFirewallRuleSetPropertiesFormat struct {
+ // ProvisioningState - The provisioning state of the web application firewall rule set.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+ // RuleSetType - The type of the web application firewall rule set.
+ RuleSetType *string `json:"ruleSetType,omitempty"`
+ // RuleSetVersion - The version of the web application firewall rule set type.
+ RuleSetVersion *string `json:"ruleSetVersion,omitempty"`
+ // RuleGroups - The rule groups of the web application firewall rule set.
+ RuleGroups *[]ApplicationGatewayFirewallRuleGroup `json:"ruleGroups,omitempty"`
+}
+
+// ApplicationGatewayFrontendIPConfiguration frontend IP configuration of an application gateway.
+type ApplicationGatewayFrontendIPConfiguration struct {
+ *ApplicationGatewayFrontendIPConfigurationPropertiesFormat `json:"properties,omitempty"`
+ // Name - 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"`
+ // Etag - A unique read-only string that changes whenever the resource is updated.
+ Etag *string `json:"etag,omitempty"`
+ // Type - Type of the resource.
+ Type *string `json:"type,omitempty"`
+ // ID - Resource ID.
+ ID *string `json:"id,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for ApplicationGatewayFrontendIPConfiguration.
+func (agfic ApplicationGatewayFrontendIPConfiguration) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if agfic.ApplicationGatewayFrontendIPConfigurationPropertiesFormat != nil {
+ objectMap["properties"] = agfic.ApplicationGatewayFrontendIPConfigurationPropertiesFormat
+ }
+ if agfic.Name != nil {
+ objectMap["name"] = agfic.Name
+ }
+ if agfic.Etag != nil {
+ objectMap["etag"] = agfic.Etag
+ }
+ if agfic.Type != nil {
+ objectMap["type"] = agfic.Type
+ }
+ if agfic.ID != nil {
+ objectMap["id"] = agfic.ID
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayFrontendIPConfiguration struct.
+func (agfic *ApplicationGatewayFrontendIPConfiguration) 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 applicationGatewayFrontendIPConfigurationPropertiesFormat ApplicationGatewayFrontendIPConfigurationPropertiesFormat
+ err = json.Unmarshal(*v, &applicationGatewayFrontendIPConfigurationPropertiesFormat)
+ if err != nil {
+ return err
+ }
+ agfic.ApplicationGatewayFrontendIPConfigurationPropertiesFormat = &applicationGatewayFrontendIPConfigurationPropertiesFormat
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ agfic.Name = &name
+ }
+ case "etag":
+ if v != nil {
+ var etag string
+ err = json.Unmarshal(*v, &etag)
+ if err != nil {
+ return err
+ }
+ agfic.Etag = &etag
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ agfic.Type = &typeVar
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ agfic.ID = &ID
+ }
+ }
+ }
+
+ return nil
+}
+
+// ApplicationGatewayFrontendIPConfigurationPropertiesFormat properties of Frontend IP configuration of an
+// application gateway.
+type ApplicationGatewayFrontendIPConfigurationPropertiesFormat struct {
+ // PrivateIPAddress - PrivateIPAddress of the network interface IP Configuration.
+ PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
+ // PrivateIPAllocationMethod - PrivateIP allocation method. Possible values include: 'Static', 'Dynamic'
+ PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
+ // Subnet - Reference of the subnet resource.
+ Subnet *SubResource `json:"subnet,omitempty"`
+ // PublicIPAddress - Reference of the PublicIP resource.
+ PublicIPAddress *SubResource `json:"publicIPAddress,omitempty"`
+ // ProvisioningState - Provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+}
+
+// ApplicationGatewayFrontendPort frontend port of an application gateway.
+type ApplicationGatewayFrontendPort struct {
+ *ApplicationGatewayFrontendPortPropertiesFormat `json:"properties,omitempty"`
+ // Name - 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"`
+ // Etag - A unique read-only string that changes whenever the resource is updated.
+ Etag *string `json:"etag,omitempty"`
+ // Type - Type of the resource.
+ Type *string `json:"type,omitempty"`
+ // ID - Resource ID.
+ ID *string `json:"id,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for ApplicationGatewayFrontendPort.
+func (agfp ApplicationGatewayFrontendPort) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if agfp.ApplicationGatewayFrontendPortPropertiesFormat != nil {
+ objectMap["properties"] = agfp.ApplicationGatewayFrontendPortPropertiesFormat
+ }
+ if agfp.Name != nil {
+ objectMap["name"] = agfp.Name
+ }
+ if agfp.Etag != nil {
+ objectMap["etag"] = agfp.Etag
+ }
+ if agfp.Type != nil {
+ objectMap["type"] = agfp.Type
+ }
+ if agfp.ID != nil {
+ objectMap["id"] = agfp.ID
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayFrontendPort struct.
+func (agfp *ApplicationGatewayFrontendPort) 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 applicationGatewayFrontendPortPropertiesFormat ApplicationGatewayFrontendPortPropertiesFormat
+ err = json.Unmarshal(*v, &applicationGatewayFrontendPortPropertiesFormat)
+ if err != nil {
+ return err
+ }
+ agfp.ApplicationGatewayFrontendPortPropertiesFormat = &applicationGatewayFrontendPortPropertiesFormat
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ agfp.Name = &name
+ }
+ case "etag":
+ if v != nil {
+ var etag string
+ err = json.Unmarshal(*v, &etag)
+ if err != nil {
+ return err
+ }
+ agfp.Etag = &etag
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ agfp.Type = &typeVar
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ agfp.ID = &ID
+ }
+ }
+ }
+
+ return nil
+}
+
+// ApplicationGatewayFrontendPortPropertiesFormat properties of Frontend port of an application gateway.
+type ApplicationGatewayFrontendPortPropertiesFormat struct {
+ // Port - Frontend port
+ Port *int32 `json:"port,omitempty"`
+ // ProvisioningState - Provisioning state of the frontend port resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+}
+
+// ApplicationGatewayHTTPListener http listener of an application gateway.
+type ApplicationGatewayHTTPListener struct {
+ *ApplicationGatewayHTTPListenerPropertiesFormat `json:"properties,omitempty"`
+ // Name - 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"`
+ // Etag - A unique read-only string that changes whenever the resource is updated.
+ Etag *string `json:"etag,omitempty"`
+ // Type - Type of the resource.
+ Type *string `json:"type,omitempty"`
+ // ID - Resource ID.
+ ID *string `json:"id,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for ApplicationGatewayHTTPListener.
+func (aghl ApplicationGatewayHTTPListener) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if aghl.ApplicationGatewayHTTPListenerPropertiesFormat != nil {
+ objectMap["properties"] = aghl.ApplicationGatewayHTTPListenerPropertiesFormat
+ }
+ if aghl.Name != nil {
+ objectMap["name"] = aghl.Name
+ }
+ if aghl.Etag != nil {
+ objectMap["etag"] = aghl.Etag
+ }
+ if aghl.Type != nil {
+ objectMap["type"] = aghl.Type
+ }
+ if aghl.ID != nil {
+ objectMap["id"] = aghl.ID
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayHTTPListener struct.
+func (aghl *ApplicationGatewayHTTPListener) 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 applicationGatewayHTTPListenerPropertiesFormat ApplicationGatewayHTTPListenerPropertiesFormat
+ err = json.Unmarshal(*v, &applicationGatewayHTTPListenerPropertiesFormat)
+ if err != nil {
+ return err
+ }
+ aghl.ApplicationGatewayHTTPListenerPropertiesFormat = &applicationGatewayHTTPListenerPropertiesFormat
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ aghl.Name = &name
+ }
+ case "etag":
+ if v != nil {
+ var etag string
+ err = json.Unmarshal(*v, &etag)
+ if err != nil {
+ return err
+ }
+ aghl.Etag = &etag
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ aghl.Type = &typeVar
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ aghl.ID = &ID
+ }
+ }
+ }
+
+ return nil
+}
+
+// ApplicationGatewayHTTPListenerPropertiesFormat properties of HTTP listener of an application gateway.
+type ApplicationGatewayHTTPListenerPropertiesFormat struct {
+ // FrontendIPConfiguration - Frontend IP configuration resource of an application gateway.
+ FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"`
+ // FrontendPort - Frontend port resource of an application gateway.
+ FrontendPort *SubResource `json:"frontendPort,omitempty"`
+ // Protocol - Protocol. Possible values include: 'HTTP', 'HTTPS'
+ Protocol ApplicationGatewayProtocol `json:"protocol,omitempty"`
+ // HostName - Host name of HTTP listener.
+ HostName *string `json:"hostName,omitempty"`
+ // SslCertificate - SSL certificate resource of an application gateway.
+ SslCertificate *SubResource `json:"sslCertificate,omitempty"`
+ // RequireServerNameIndication - Applicable only if protocol is https. Enables SNI for multi-hosting.
+ RequireServerNameIndication *bool `json:"requireServerNameIndication,omitempty"`
+ // ProvisioningState - Provisioning state of the HTTP listener resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+}
+
+// ApplicationGatewayIPConfiguration IP configuration of an application gateway. Currently 1 public and 1
+// private IP configuration is allowed.
+type ApplicationGatewayIPConfiguration struct {
+ *ApplicationGatewayIPConfigurationPropertiesFormat `json:"properties,omitempty"`
+ // Name - 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"`
+ // Etag - A unique read-only string that changes whenever the resource is updated.
+ Etag *string `json:"etag,omitempty"`
+ // Type - Type of the resource.
+ Type *string `json:"type,omitempty"`
+ // ID - Resource ID.
+ ID *string `json:"id,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for ApplicationGatewayIPConfiguration.
+func (agic ApplicationGatewayIPConfiguration) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if agic.ApplicationGatewayIPConfigurationPropertiesFormat != nil {
+ objectMap["properties"] = agic.ApplicationGatewayIPConfigurationPropertiesFormat
+ }
+ if agic.Name != nil {
+ objectMap["name"] = agic.Name
+ }
+ if agic.Etag != nil {
+ objectMap["etag"] = agic.Etag
+ }
+ if agic.Type != nil {
+ objectMap["type"] = agic.Type
+ }
+ if agic.ID != nil {
+ objectMap["id"] = agic.ID
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayIPConfiguration struct.
+func (agic *ApplicationGatewayIPConfiguration) 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 applicationGatewayIPConfigurationPropertiesFormat ApplicationGatewayIPConfigurationPropertiesFormat
+ err = json.Unmarshal(*v, &applicationGatewayIPConfigurationPropertiesFormat)
+ if err != nil {
+ return err
+ }
+ agic.ApplicationGatewayIPConfigurationPropertiesFormat = &applicationGatewayIPConfigurationPropertiesFormat
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ agic.Name = &name
+ }
+ case "etag":
+ if v != nil {
+ var etag string
+ err = json.Unmarshal(*v, &etag)
+ if err != nil {
+ return err
+ }
+ agic.Etag = &etag
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ agic.Type = &typeVar
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ agic.ID = &ID
+ }
+ }
+ }
+
+ return nil
+}
+
+// ApplicationGatewayIPConfigurationPropertiesFormat properties of IP configuration of an application
+// gateway.
+type ApplicationGatewayIPConfigurationPropertiesFormat struct {
+ // Subnet - Reference of the subnet resource. A subnet from where application gateway gets its private address.
+ Subnet *SubResource `json:"subnet,omitempty"`
+ // ProvisioningState - Provisioning state of the application gateway subnet resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+}
+
+// ApplicationGatewayListResult response for ListApplicationGateways API service call.
+type ApplicationGatewayListResult struct {
+ autorest.Response `json:"-"`
+ // Value - List of an application gateways in a resource group.
+ Value *[]ApplicationGateway `json:"value,omitempty"`
+ // NextLink - URL to get the next set of results.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// ApplicationGatewayListResultIterator provides access to a complete listing of ApplicationGateway values.
+type ApplicationGatewayListResultIterator struct {
+ i int
+ page ApplicationGatewayListResultPage
+}
+
+// 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 *ApplicationGatewayListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewayListResultIterator.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 *ApplicationGatewayListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter ApplicationGatewayListResultIterator) 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 ApplicationGatewayListResultIterator) Response() ApplicationGatewayListResult {
+ 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 ApplicationGatewayListResultIterator) Value() ApplicationGateway {
+ if !iter.page.NotDone() {
+ return ApplicationGateway{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// Creates a new instance of the ApplicationGatewayListResultIterator type.
+func NewApplicationGatewayListResultIterator(page ApplicationGatewayListResultPage) ApplicationGatewayListResultIterator {
+ return ApplicationGatewayListResultIterator{page: page}
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (aglr ApplicationGatewayListResult) IsEmpty() bool {
+ return aglr.Value == nil || len(*aglr.Value) == 0
+}
+
+// hasNextLink returns true if the NextLink is not empty.
+func (aglr ApplicationGatewayListResult) hasNextLink() bool {
+ return aglr.NextLink != nil && len(*aglr.NextLink) != 0
+}
+
+// applicationGatewayListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (aglr ApplicationGatewayListResult) applicationGatewayListResultPreparer(ctx context.Context) (*http.Request, error) {
+ if !aglr.hasNextLink() {
+ return nil, nil
+ }
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(aglr.NextLink)))
+}
+
+// ApplicationGatewayListResultPage contains a page of ApplicationGateway values.
+type ApplicationGatewayListResultPage struct {
+ fn func(context.Context, ApplicationGatewayListResult) (ApplicationGatewayListResult, error)
+ aglr ApplicationGatewayListResult
+}
+
+// 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 *ApplicationGatewayListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewayListResultPage.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.aglr)
+ if err != nil {
+ return err
+ }
+ page.aglr = 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 *ApplicationGatewayListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page ApplicationGatewayListResultPage) NotDone() bool {
+ return !page.aglr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page ApplicationGatewayListResultPage) Response() ApplicationGatewayListResult {
+ return page.aglr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page ApplicationGatewayListResultPage) Values() []ApplicationGateway {
+ if page.aglr.IsEmpty() {
+ return nil
+ }
+ return *page.aglr.Value
+}
+
+// Creates a new instance of the ApplicationGatewayListResultPage type.
+func NewApplicationGatewayListResultPage(cur ApplicationGatewayListResult, getNextPage func(context.Context, ApplicationGatewayListResult) (ApplicationGatewayListResult, error)) ApplicationGatewayListResultPage {
+ return ApplicationGatewayListResultPage{
+ fn: getNextPage,
+ aglr: cur,
+ }
+}
+
+// ApplicationGatewayPathRule path rule of URL path map of an application gateway.
+type ApplicationGatewayPathRule struct {
+ *ApplicationGatewayPathRulePropertiesFormat `json:"properties,omitempty"`
+ // Name - 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"`
+ // Etag - A unique read-only string that changes whenever the resource is updated.
+ Etag *string `json:"etag,omitempty"`
+ // Type - Type of the resource.
+ Type *string `json:"type,omitempty"`
+ // ID - Resource ID.
+ ID *string `json:"id,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for ApplicationGatewayPathRule.
+func (agpr ApplicationGatewayPathRule) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if agpr.ApplicationGatewayPathRulePropertiesFormat != nil {
+ objectMap["properties"] = agpr.ApplicationGatewayPathRulePropertiesFormat
+ }
+ if agpr.Name != nil {
+ objectMap["name"] = agpr.Name
+ }
+ if agpr.Etag != nil {
+ objectMap["etag"] = agpr.Etag
+ }
+ if agpr.Type != nil {
+ objectMap["type"] = agpr.Type
+ }
+ if agpr.ID != nil {
+ objectMap["id"] = agpr.ID
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayPathRule struct.
+func (agpr *ApplicationGatewayPathRule) 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 applicationGatewayPathRulePropertiesFormat ApplicationGatewayPathRulePropertiesFormat
+ err = json.Unmarshal(*v, &applicationGatewayPathRulePropertiesFormat)
+ if err != nil {
+ return err
+ }
+ agpr.ApplicationGatewayPathRulePropertiesFormat = &applicationGatewayPathRulePropertiesFormat
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ agpr.Name = &name
+ }
+ case "etag":
+ if v != nil {
+ var etag string
+ err = json.Unmarshal(*v, &etag)
+ if err != nil {
+ return err
+ }
+ agpr.Etag = &etag
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ agpr.Type = &typeVar
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ agpr.ID = &ID
+ }
+ }
+ }
+
+ return nil
+}
+
+// ApplicationGatewayPathRulePropertiesFormat properties of path rule of an application gateway.
+type ApplicationGatewayPathRulePropertiesFormat struct {
+ // Paths - Path rules of URL path map.
+ Paths *[]string `json:"paths,omitempty"`
+ // BackendAddressPool - Backend address pool resource of URL path map path rule.
+ BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"`
+ // BackendHTTPSettings - Backend http settings resource of URL path map path rule.
+ BackendHTTPSettings *SubResource `json:"backendHttpSettings,omitempty"`
+ // RedirectConfiguration - Redirect configuration resource of URL path map path rule.
+ RedirectConfiguration *SubResource `json:"redirectConfiguration,omitempty"`
+ // ProvisioningState - Path rule of URL path map resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+}
+
+// ApplicationGatewayProbe probe of the application gateway.
+type ApplicationGatewayProbe struct {
+ *ApplicationGatewayProbePropertiesFormat `json:"properties,omitempty"`
+ // Name - 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"`
+ // Etag - A unique read-only string that changes whenever the resource is updated.
+ Etag *string `json:"etag,omitempty"`
+ // Type - Type of the resource.
+ Type *string `json:"type,omitempty"`
+ // ID - Resource ID.
+ ID *string `json:"id,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for ApplicationGatewayProbe.
+func (agp ApplicationGatewayProbe) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if agp.ApplicationGatewayProbePropertiesFormat != nil {
+ objectMap["properties"] = agp.ApplicationGatewayProbePropertiesFormat
+ }
+ if agp.Name != nil {
+ objectMap["name"] = agp.Name
+ }
+ if agp.Etag != nil {
+ objectMap["etag"] = agp.Etag
+ }
+ if agp.Type != nil {
+ objectMap["type"] = agp.Type
+ }
+ if agp.ID != nil {
+ objectMap["id"] = agp.ID
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayProbe struct.
+func (agp *ApplicationGatewayProbe) 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 applicationGatewayProbePropertiesFormat ApplicationGatewayProbePropertiesFormat
+ err = json.Unmarshal(*v, &applicationGatewayProbePropertiesFormat)
+ if err != nil {
+ return err
+ }
+ agp.ApplicationGatewayProbePropertiesFormat = &applicationGatewayProbePropertiesFormat
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ agp.Name = &name
+ }
+ case "etag":
+ if v != nil {
+ var etag string
+ err = json.Unmarshal(*v, &etag)
+ if err != nil {
+ return err
+ }
+ agp.Etag = &etag
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ agp.Type = &typeVar
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ agp.ID = &ID
+ }
+ }
+ }
+
+ return nil
+}
+
+// ApplicationGatewayProbeHealthResponseMatch application gateway probe health response match
+type ApplicationGatewayProbeHealthResponseMatch struct {
+ // Body - Body that must be contained in the health response. Default value is empty.
+ Body *string `json:"body,omitempty"`
+ // StatusCodes - Allowed ranges of healthy status codes. Default range of healthy status codes is 200-399.
+ StatusCodes *[]string `json:"statusCodes,omitempty"`
+}
+
+// ApplicationGatewayProbePropertiesFormat properties of probe of an application gateway.
+type ApplicationGatewayProbePropertiesFormat struct {
+ // Protocol - Protocol. Possible values include: 'HTTP', 'HTTPS'
+ Protocol ApplicationGatewayProtocol `json:"protocol,omitempty"`
+ // Host - Host name to send the probe to.
+ Host *string `json:"host,omitempty"`
+ // Path - Relative path of probe. Valid path starts from '/'. Probe is sent to ://:
+ Path *string `json:"path,omitempty"`
+ // Interval - The probing interval in seconds. This is the time interval between two consecutive probes. Acceptable values are from 1 second to 86400 seconds.
+ Interval *int32 `json:"interval,omitempty"`
+ // Timeout - the probe timeout in seconds. Probe marked as failed if valid response is not received with this timeout period. Acceptable values are from 1 second to 86400 seconds.
+ Timeout *int32 `json:"timeout,omitempty"`
+ // UnhealthyThreshold - The probe retry count. Backend server is marked down after consecutive probe failure count reaches UnhealthyThreshold. Acceptable values are from 1 second to 20.
+ UnhealthyThreshold *int32 `json:"unhealthyThreshold,omitempty"`
+ // PickHostNameFromBackendHTTPSettings - Whether the host header should be picked from the backend http settings. Default value is false.
+ PickHostNameFromBackendHTTPSettings *bool `json:"pickHostNameFromBackendHttpSettings,omitempty"`
+ // MinServers - Minimum number of servers that are always marked healthy. Default value is 0.
+ MinServers *int32 `json:"minServers,omitempty"`
+ // Match - Criterion for classifying a healthy probe response.
+ Match *ApplicationGatewayProbeHealthResponseMatch `json:"match,omitempty"`
+ // ProvisioningState - Provisioning state of the backend http settings resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+}
+
+// ApplicationGatewayPropertiesFormat properties of the application gateway.
+type ApplicationGatewayPropertiesFormat struct {
+ // Sku - SKU of the application gateway resource.
+ Sku *ApplicationGatewaySku `json:"sku,omitempty"`
+ // SslPolicy - SSL policy of the application gateway resource.
+ SslPolicy *ApplicationGatewaySslPolicy `json:"sslPolicy,omitempty"`
+ // OperationalState - READ-ONLY; Operational state of the application gateway resource. Possible values include: 'Stopped', 'Starting', 'Running', 'Stopping'
+ OperationalState ApplicationGatewayOperationalState `json:"operationalState,omitempty"`
+ // GatewayIPConfigurations - Subnets of application the gateway resource.
+ GatewayIPConfigurations *[]ApplicationGatewayIPConfiguration `json:"gatewayIPConfigurations,omitempty"`
+ // AuthenticationCertificates - Authentication certificates of the application gateway resource.
+ AuthenticationCertificates *[]ApplicationGatewayAuthenticationCertificate `json:"authenticationCertificates,omitempty"`
+ // SslCertificates - SSL certificates of the application gateway resource.
+ SslCertificates *[]ApplicationGatewaySslCertificate `json:"sslCertificates,omitempty"`
+ // FrontendIPConfigurations - Frontend IP addresses of the application gateway resource.
+ FrontendIPConfigurations *[]ApplicationGatewayFrontendIPConfiguration `json:"frontendIPConfigurations,omitempty"`
+ // FrontendPorts - Frontend ports of the application gateway resource.
+ FrontendPorts *[]ApplicationGatewayFrontendPort `json:"frontendPorts,omitempty"`
+ // Probes - Probes of the application gateway resource.
+ Probes *[]ApplicationGatewayProbe `json:"probes,omitempty"`
+ // BackendAddressPools - Backend address pool of the application gateway resource.
+ BackendAddressPools *[]ApplicationGatewayBackendAddressPool `json:"backendAddressPools,omitempty"`
+ // BackendHTTPSettingsCollection - Backend http settings of the application gateway resource.
+ BackendHTTPSettingsCollection *[]ApplicationGatewayBackendHTTPSettings `json:"backendHttpSettingsCollection,omitempty"`
+ // HTTPListeners - Http listeners of the application gateway resource.
+ HTTPListeners *[]ApplicationGatewayHTTPListener `json:"httpListeners,omitempty"`
+ // URLPathMaps - URL path map of the application gateway resource.
+ URLPathMaps *[]ApplicationGatewayURLPathMap `json:"urlPathMaps,omitempty"`
+ // RequestRoutingRules - Request routing rules of the application gateway resource.
+ RequestRoutingRules *[]ApplicationGatewayRequestRoutingRule `json:"requestRoutingRules,omitempty"`
+ // RedirectConfigurations - Redirect configurations of the application gateway resource.
+ RedirectConfigurations *[]ApplicationGatewayRedirectConfiguration `json:"redirectConfigurations,omitempty"`
+ // WebApplicationFirewallConfiguration - Web application firewall configuration.
+ WebApplicationFirewallConfiguration *ApplicationGatewayWebApplicationFirewallConfiguration `json:"webApplicationFirewallConfiguration,omitempty"`
+ // EnableHTTP2 - Whether HTTP2 is enabled on the application gateway resource.
+ EnableHTTP2 *bool `json:"enableHttp2,omitempty"`
+ // ResourceGUID - Resource GUID property of the application gateway resource.
+ ResourceGUID *string `json:"resourceGuid,omitempty"`
+ // ProvisioningState - Provisioning state of the application gateway resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for ApplicationGatewayPropertiesFormat.
+func (agpf ApplicationGatewayPropertiesFormat) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if agpf.Sku != nil {
+ objectMap["sku"] = agpf.Sku
+ }
+ if agpf.SslPolicy != nil {
+ objectMap["sslPolicy"] = agpf.SslPolicy
+ }
+ if agpf.GatewayIPConfigurations != nil {
+ objectMap["gatewayIPConfigurations"] = agpf.GatewayIPConfigurations
+ }
+ if agpf.AuthenticationCertificates != nil {
+ objectMap["authenticationCertificates"] = agpf.AuthenticationCertificates
+ }
+ if agpf.SslCertificates != nil {
+ objectMap["sslCertificates"] = agpf.SslCertificates
+ }
+ if agpf.FrontendIPConfigurations != nil {
+ objectMap["frontendIPConfigurations"] = agpf.FrontendIPConfigurations
+ }
+ if agpf.FrontendPorts != nil {
+ objectMap["frontendPorts"] = agpf.FrontendPorts
+ }
+ if agpf.Probes != nil {
+ objectMap["probes"] = agpf.Probes
+ }
+ if agpf.BackendAddressPools != nil {
+ objectMap["backendAddressPools"] = agpf.BackendAddressPools
+ }
+ if agpf.BackendHTTPSettingsCollection != nil {
+ objectMap["backendHttpSettingsCollection"] = agpf.BackendHTTPSettingsCollection
+ }
+ if agpf.HTTPListeners != nil {
+ objectMap["httpListeners"] = agpf.HTTPListeners
+ }
+ if agpf.URLPathMaps != nil {
+ objectMap["urlPathMaps"] = agpf.URLPathMaps
+ }
+ if agpf.RequestRoutingRules != nil {
+ objectMap["requestRoutingRules"] = agpf.RequestRoutingRules
+ }
+ if agpf.RedirectConfigurations != nil {
+ objectMap["redirectConfigurations"] = agpf.RedirectConfigurations
+ }
+ if agpf.WebApplicationFirewallConfiguration != nil {
+ objectMap["webApplicationFirewallConfiguration"] = agpf.WebApplicationFirewallConfiguration
+ }
+ if agpf.EnableHTTP2 != nil {
+ objectMap["enableHttp2"] = agpf.EnableHTTP2
+ }
+ if agpf.ResourceGUID != nil {
+ objectMap["resourceGuid"] = agpf.ResourceGUID
+ }
+ if agpf.ProvisioningState != nil {
+ objectMap["provisioningState"] = agpf.ProvisioningState
+ }
+ return json.Marshal(objectMap)
+}
+
+// ApplicationGatewayRedirectConfiguration redirect configuration of an application gateway.
+type ApplicationGatewayRedirectConfiguration struct {
+ *ApplicationGatewayRedirectConfigurationPropertiesFormat `json:"properties,omitempty"`
+ // Name - 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"`
+ // Etag - A unique read-only string that changes whenever the resource is updated.
+ Etag *string `json:"etag,omitempty"`
+ // Type - Type of the resource.
+ Type *string `json:"type,omitempty"`
+ // ID - Resource ID.
+ ID *string `json:"id,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for ApplicationGatewayRedirectConfiguration.
+func (agrc ApplicationGatewayRedirectConfiguration) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if agrc.ApplicationGatewayRedirectConfigurationPropertiesFormat != nil {
+ objectMap["properties"] = agrc.ApplicationGatewayRedirectConfigurationPropertiesFormat
+ }
+ if agrc.Name != nil {
+ objectMap["name"] = agrc.Name
+ }
+ if agrc.Etag != nil {
+ objectMap["etag"] = agrc.Etag
+ }
+ if agrc.Type != nil {
+ objectMap["type"] = agrc.Type
+ }
+ if agrc.ID != nil {
+ objectMap["id"] = agrc.ID
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayRedirectConfiguration struct.
+func (agrc *ApplicationGatewayRedirectConfiguration) 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 applicationGatewayRedirectConfigurationPropertiesFormat ApplicationGatewayRedirectConfigurationPropertiesFormat
+ err = json.Unmarshal(*v, &applicationGatewayRedirectConfigurationPropertiesFormat)
+ if err != nil {
+ return err
+ }
+ agrc.ApplicationGatewayRedirectConfigurationPropertiesFormat = &applicationGatewayRedirectConfigurationPropertiesFormat
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ agrc.Name = &name
+ }
+ case "etag":
+ if v != nil {
+ var etag string
+ err = json.Unmarshal(*v, &etag)
+ if err != nil {
+ return err
+ }
+ agrc.Etag = &etag
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ agrc.Type = &typeVar
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ agrc.ID = &ID
+ }
+ }
+ }
+
+ return nil
+}
+
+// ApplicationGatewayRedirectConfigurationPropertiesFormat properties of redirect configuration of the
+// application gateway.
+type ApplicationGatewayRedirectConfigurationPropertiesFormat struct {
+ // RedirectType - Supported http redirection types - Permanent, Temporary, Found, SeeOther. Possible values include: 'Permanent', 'Found', 'SeeOther', 'Temporary'
+ RedirectType ApplicationGatewayRedirectType `json:"redirectType,omitempty"`
+ // TargetListener - Reference to a listener to redirect the request to.
+ TargetListener *SubResource `json:"targetListener,omitempty"`
+ // TargetURL - Url to redirect the request to.
+ TargetURL *string `json:"targetUrl,omitempty"`
+ // IncludePath - Include path in the redirected url.
+ IncludePath *bool `json:"includePath,omitempty"`
+ // IncludeQueryString - Include query string in the redirected url.
+ IncludeQueryString *bool `json:"includeQueryString,omitempty"`
+ // RequestRoutingRules - Request routing specifying redirect configuration.
+ RequestRoutingRules *[]SubResource `json:"requestRoutingRules,omitempty"`
+ // URLPathMaps - Url path maps specifying default redirect configuration.
+ URLPathMaps *[]SubResource `json:"urlPathMaps,omitempty"`
+ // PathRules - Path rules specifying redirect configuration.
+ PathRules *[]SubResource `json:"pathRules,omitempty"`
+}
+
+// ApplicationGatewayRequestRoutingRule request routing rule of an application gateway.
+type ApplicationGatewayRequestRoutingRule struct {
+ *ApplicationGatewayRequestRoutingRulePropertiesFormat `json:"properties,omitempty"`
+ // Name - 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"`
+ // Etag - A unique read-only string that changes whenever the resource is updated.
+ Etag *string `json:"etag,omitempty"`
+ // Type - Type of the resource.
+ Type *string `json:"type,omitempty"`
+ // ID - Resource ID.
+ ID *string `json:"id,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for ApplicationGatewayRequestRoutingRule.
+func (agrrr ApplicationGatewayRequestRoutingRule) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if agrrr.ApplicationGatewayRequestRoutingRulePropertiesFormat != nil {
+ objectMap["properties"] = agrrr.ApplicationGatewayRequestRoutingRulePropertiesFormat
+ }
+ if agrrr.Name != nil {
+ objectMap["name"] = agrrr.Name
+ }
+ if agrrr.Etag != nil {
+ objectMap["etag"] = agrrr.Etag
+ }
+ if agrrr.Type != nil {
+ objectMap["type"] = agrrr.Type
+ }
+ if agrrr.ID != nil {
+ objectMap["id"] = agrrr.ID
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayRequestRoutingRule struct.
+func (agrrr *ApplicationGatewayRequestRoutingRule) 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 applicationGatewayRequestRoutingRulePropertiesFormat ApplicationGatewayRequestRoutingRulePropertiesFormat
+ err = json.Unmarshal(*v, &applicationGatewayRequestRoutingRulePropertiesFormat)
+ if err != nil {
+ return err
+ }
+ agrrr.ApplicationGatewayRequestRoutingRulePropertiesFormat = &applicationGatewayRequestRoutingRulePropertiesFormat
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ agrrr.Name = &name
+ }
+ case "etag":
+ if v != nil {
+ var etag string
+ err = json.Unmarshal(*v, &etag)
+ if err != nil {
+ return err
+ }
+ agrrr.Etag = &etag
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ agrrr.Type = &typeVar
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ agrrr.ID = &ID
+ }
+ }
+ }
+
+ return nil
+}
+
+// ApplicationGatewayRequestRoutingRulePropertiesFormat properties of request routing rule of the
+// application gateway.
+type ApplicationGatewayRequestRoutingRulePropertiesFormat struct {
+ // RuleType - Rule type. Possible values include: 'Basic', 'PathBasedRouting'
+ RuleType ApplicationGatewayRequestRoutingRuleType `json:"ruleType,omitempty"`
+ // BackendAddressPool - Backend address pool resource of the application gateway.
+ BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"`
+ // BackendHTTPSettings - Frontend port resource of the application gateway.
+ BackendHTTPSettings *SubResource `json:"backendHttpSettings,omitempty"`
+ // HTTPListener - Http listener resource of the application gateway.
+ HTTPListener *SubResource `json:"httpListener,omitempty"`
+ // URLPathMap - URL path map resource of the application gateway.
+ URLPathMap *SubResource `json:"urlPathMap,omitempty"`
+ // RedirectConfiguration - Redirect configuration resource of the application gateway.
+ RedirectConfiguration *SubResource `json:"redirectConfiguration,omitempty"`
+ // ProvisioningState - Provisioning state of the request routing rule resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+}
+
+// ApplicationGatewaysBackendHealthFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type ApplicationGatewaysBackendHealthFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(ApplicationGatewaysClient) (ApplicationGatewayBackendHealth, error)
+}
+
+// ApplicationGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type ApplicationGatewaysCreateOrUpdateFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(ApplicationGatewaysClient) (ApplicationGateway, error)
+}
+
+// ApplicationGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type ApplicationGatewaysDeleteFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(ApplicationGatewaysClient) (autorest.Response, error)
+}
+
+// ApplicationGatewaySku SKU of an application gateway
+type ApplicationGatewaySku struct {
+ // Name - Name of an application gateway SKU. Possible values include: 'StandardSmall', 'StandardMedium', 'StandardLarge', 'WAFMedium', 'WAFLarge'
+ Name ApplicationGatewaySkuName `json:"name,omitempty"`
+ // Tier - Tier of an application gateway. Possible values include: 'Standard', 'WAF'
+ Tier ApplicationGatewayTier `json:"tier,omitempty"`
+ // Capacity - Capacity (instance count) of an application gateway.
+ Capacity *int32 `json:"capacity,omitempty"`
+}
+
+// ApplicationGatewaySslCertificate SSL certificates of an application gateway.
+type ApplicationGatewaySslCertificate struct {
+ *ApplicationGatewaySslCertificatePropertiesFormat `json:"properties,omitempty"`
+ // Name - 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"`
+ // Etag - A unique read-only string that changes whenever the resource is updated.
+ Etag *string `json:"etag,omitempty"`
+ // Type - Type of the resource.
+ Type *string `json:"type,omitempty"`
+ // ID - Resource ID.
+ ID *string `json:"id,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for ApplicationGatewaySslCertificate.
+func (agsc ApplicationGatewaySslCertificate) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if agsc.ApplicationGatewaySslCertificatePropertiesFormat != nil {
+ objectMap["properties"] = agsc.ApplicationGatewaySslCertificatePropertiesFormat
+ }
+ if agsc.Name != nil {
+ objectMap["name"] = agsc.Name
+ }
+ if agsc.Etag != nil {
+ objectMap["etag"] = agsc.Etag
+ }
+ if agsc.Type != nil {
+ objectMap["type"] = agsc.Type
+ }
+ if agsc.ID != nil {
+ objectMap["id"] = agsc.ID
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for ApplicationGatewaySslCertificate struct.
+func (agsc *ApplicationGatewaySslCertificate) 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 applicationGatewaySslCertificatePropertiesFormat ApplicationGatewaySslCertificatePropertiesFormat
+ err = json.Unmarshal(*v, &applicationGatewaySslCertificatePropertiesFormat)
+ if err != nil {
+ return err
+ }
+ agsc.ApplicationGatewaySslCertificatePropertiesFormat = &applicationGatewaySslCertificatePropertiesFormat
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ agsc.Name = &name
+ }
+ case "etag":
+ if v != nil {
+ var etag string
+ err = json.Unmarshal(*v, &etag)
+ if err != nil {
+ return err
+ }
+ agsc.Etag = &etag
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ agsc.Type = &typeVar
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ agsc.ID = &ID
+ }
+ }
+ }
+
+ return nil
+}
+
+// ApplicationGatewaySslCertificatePropertiesFormat properties of SSL certificates of an application
+// gateway.
+type ApplicationGatewaySslCertificatePropertiesFormat struct {
+ // Data - Base-64 encoded pfx certificate. Only applicable in PUT Request.
+ Data *string `json:"data,omitempty"`
+ // Password - Password for the pfx file specified in data. Only applicable in PUT request.
+ Password *string `json:"password,omitempty"`
+ // PublicCertData - Base-64 encoded Public cert data corresponding to pfx specified in data. Only applicable in GET request.
+ PublicCertData *string `json:"publicCertData,omitempty"`
+ // ProvisioningState - Provisioning state of the SSL certificate resource Possible values are: 'Updating', 'Deleting', and 'Failed'.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+}
+
+// ApplicationGatewaySslPolicy application Gateway Ssl policy.
+type ApplicationGatewaySslPolicy struct {
+ // DisabledSslProtocols - Ssl protocols to be disabled on application gateway.
+ DisabledSslProtocols *[]ApplicationGatewaySslProtocol `json:"disabledSslProtocols,omitempty"`
+ // PolicyType - Type of Ssl Policy. Possible values include: 'Predefined', 'Custom'
+ PolicyType ApplicationGatewaySslPolicyType `json:"policyType,omitempty"`
+ // PolicyName - Name of Ssl predefined policy. Possible values include: 'AppGwSslPolicy20150501', 'AppGwSslPolicy20170401', 'AppGwSslPolicy20170401S'
+ PolicyName ApplicationGatewaySslPolicyName `json:"policyName,omitempty"`
+ // CipherSuites - Ssl cipher suites to be enabled in the specified order to application gateway.
+ CipherSuites *[]ApplicationGatewaySslCipherSuite `json:"cipherSuites,omitempty"`
+ // MinProtocolVersion - Minimum version of Ssl protocol to be supported on application gateway. Possible values include: 'TLSv10', 'TLSv11', 'TLSv12'
+ MinProtocolVersion ApplicationGatewaySslProtocol `json:"minProtocolVersion,omitempty"`
+}
+
+// ApplicationGatewaySslPredefinedPolicy an Ssl predefined policy
+type ApplicationGatewaySslPredefinedPolicy struct {
+ autorest.Response `json:"-"`
+ // Name - Name of Ssl predefined policy.
+ Name *string `json:"name,omitempty"`
+ *ApplicationGatewaySslPredefinedPolicyPropertiesFormat `json:"properties,omitempty"`
+ // ID - Resource ID.
+ ID *string `json:"id,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for ApplicationGatewaySslPredefinedPolicy.
+func (agspp ApplicationGatewaySslPredefinedPolicy) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if agspp.Name != nil {
+ objectMap["name"] = agspp.Name
+ }
+ if agspp.ApplicationGatewaySslPredefinedPolicyPropertiesFormat != nil {
+ objectMap["properties"] = agspp.ApplicationGatewaySslPredefinedPolicyPropertiesFormat
+ }
+ if agspp.ID != nil {
+ objectMap["id"] = agspp.ID
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for ApplicationGatewaySslPredefinedPolicy struct.
+func (agspp *ApplicationGatewaySslPredefinedPolicy) 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
+ }
+ agspp.Name = &name
+ }
+ case "properties":
+ if v != nil {
+ var applicationGatewaySslPredefinedPolicyPropertiesFormat ApplicationGatewaySslPredefinedPolicyPropertiesFormat
+ err = json.Unmarshal(*v, &applicationGatewaySslPredefinedPolicyPropertiesFormat)
+ if err != nil {
+ return err
+ }
+ agspp.ApplicationGatewaySslPredefinedPolicyPropertiesFormat = &applicationGatewaySslPredefinedPolicyPropertiesFormat
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ agspp.ID = &ID
+ }
+ }
+ }
+
+ return nil
+}
+
+// ApplicationGatewaySslPredefinedPolicyPropertiesFormat properties of
+// ApplicationGatewaySslPredefinedPolicy
+type ApplicationGatewaySslPredefinedPolicyPropertiesFormat struct {
+ // CipherSuites - Ssl cipher suites to be enabled in the specified order for application gateway.
+ CipherSuites *[]ApplicationGatewaySslCipherSuite `json:"cipherSuites,omitempty"`
+ // MinProtocolVersion - Minimum version of Ssl protocol to be supported on application gateway. Possible values include: 'TLSv10', 'TLSv11', 'TLSv12'
+ MinProtocolVersion ApplicationGatewaySslProtocol `json:"minProtocolVersion,omitempty"`
+}
+
+// ApplicationGatewaysStartFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type ApplicationGatewaysStartFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(ApplicationGatewaysClient) (autorest.Response, error)
+}
+
+// ApplicationGatewaysStopFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type ApplicationGatewaysStopFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(ApplicationGatewaysClient) (autorest.Response, error)
+}
+
+// ApplicationGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type ApplicationGatewaysUpdateTagsFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(ApplicationGatewaysClient) (ApplicationGateway, error)
+}
+
+// ApplicationGatewayURLPathMap urlPathMaps give a url path to the backend mapping information for
+// PathBasedRouting.
+type ApplicationGatewayURLPathMap struct {
+ *ApplicationGatewayURLPathMapPropertiesFormat `json:"properties,omitempty"`
+ // Name - 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"`
+ // Etag - A unique read-only string that changes whenever the resource is updated.
+ Etag *string `json:"etag,omitempty"`
+ // Type - Type of the resource.
+ Type *string `json:"type,omitempty"`
+ // ID - Resource ID.
+ ID *string `json:"id,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for ApplicationGatewayURLPathMap.
+func (agupm ApplicationGatewayURLPathMap) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if agupm.ApplicationGatewayURLPathMapPropertiesFormat != nil {
+ objectMap["properties"] = agupm.ApplicationGatewayURLPathMapPropertiesFormat
+ }
+ if agupm.Name != nil {
+ objectMap["name"] = agupm.Name
+ }
+ if agupm.Etag != nil {
+ objectMap["etag"] = agupm.Etag
+ }
+ if agupm.Type != nil {
+ objectMap["type"] = agupm.Type
+ }
+ if agupm.ID != nil {
+ objectMap["id"] = agupm.ID
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayURLPathMap struct.
+func (agupm *ApplicationGatewayURLPathMap) 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 applicationGatewayURLPathMapPropertiesFormat ApplicationGatewayURLPathMapPropertiesFormat
+ err = json.Unmarshal(*v, &applicationGatewayURLPathMapPropertiesFormat)
+ if err != nil {
+ return err
+ }
+ agupm.ApplicationGatewayURLPathMapPropertiesFormat = &applicationGatewayURLPathMapPropertiesFormat
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ agupm.Name = &name
+ }
+ case "etag":
+ if v != nil {
+ var etag string
+ err = json.Unmarshal(*v, &etag)
+ if err != nil {
+ return err
+ }
+ agupm.Etag = &etag
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ agupm.Type = &typeVar
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ agupm.ID = &ID
+ }
+ }
+ }
+
+ return nil
+}
+
+// ApplicationGatewayURLPathMapPropertiesFormat properties of UrlPathMap of the application gateway.
+type ApplicationGatewayURLPathMapPropertiesFormat struct {
+ // DefaultBackendAddressPool - Default backend address pool resource of URL path map.
+ DefaultBackendAddressPool *SubResource `json:"defaultBackendAddressPool,omitempty"`
+ // DefaultBackendHTTPSettings - Default backend http settings resource of URL path map.
+ DefaultBackendHTTPSettings *SubResource `json:"defaultBackendHttpSettings,omitempty"`
+ // DefaultRedirectConfiguration - Default redirect configuration resource of URL path map.
+ DefaultRedirectConfiguration *SubResource `json:"defaultRedirectConfiguration,omitempty"`
+ // PathRules - Path rule of URL path map resource.
+ PathRules *[]ApplicationGatewayPathRule `json:"pathRules,omitempty"`
+ // ProvisioningState - Provisioning state of the backend http settings resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+}
+
+// ApplicationGatewayWebApplicationFirewallConfiguration application gateway web application firewall
+// configuration.
+type ApplicationGatewayWebApplicationFirewallConfiguration struct {
+ // Enabled - Whether the web application firewall is enabled or not.
+ Enabled *bool `json:"enabled,omitempty"`
+ // FirewallMode - Web application firewall mode. Possible values include: 'Detection', 'Prevention'
+ FirewallMode ApplicationGatewayFirewallMode `json:"firewallMode,omitempty"`
+ // RuleSetType - The type of the web application firewall rule set. Possible values are: 'OWASP'.
+ RuleSetType *string `json:"ruleSetType,omitempty"`
+ // RuleSetVersion - The version of the rule set type.
+ RuleSetVersion *string `json:"ruleSetVersion,omitempty"`
+ // DisabledRuleGroups - The disabled rule groups.
+ DisabledRuleGroups *[]ApplicationGatewayFirewallDisabledRuleGroup `json:"disabledRuleGroups,omitempty"`
+}
+
+// ApplicationSecurityGroup an application security group in a resource group.
+type ApplicationSecurityGroup struct {
+ autorest.Response `json:"-"`
+ // ApplicationSecurityGroupPropertiesFormat - Properties of the application security group.
+ *ApplicationSecurityGroupPropertiesFormat `json:"properties,omitempty"`
+ // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
+ Etag *string `json:"etag,omitempty"`
+ // ID - 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 ApplicationSecurityGroup.
+func (asg ApplicationSecurityGroup) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if asg.ApplicationSecurityGroupPropertiesFormat != nil {
+ objectMap["properties"] = asg.ApplicationSecurityGroupPropertiesFormat
+ }
+ if asg.ID != nil {
+ objectMap["id"] = asg.ID
+ }
+ if asg.Location != nil {
+ objectMap["location"] = asg.Location
+ }
+ if asg.Tags != nil {
+ objectMap["tags"] = asg.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for ApplicationSecurityGroup struct.
+func (asg *ApplicationSecurityGroup) 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 applicationSecurityGroupPropertiesFormat ApplicationSecurityGroupPropertiesFormat
+ err = json.Unmarshal(*v, &applicationSecurityGroupPropertiesFormat)
+ if err != nil {
+ return err
+ }
+ asg.ApplicationSecurityGroupPropertiesFormat = &applicationSecurityGroupPropertiesFormat
+ }
+ case "etag":
+ if v != nil {
+ var etag string
+ err = json.Unmarshal(*v, &etag)
+ if err != nil {
+ return err
+ }
+ asg.Etag = &etag
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ asg.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ asg.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ asg.Type = &typeVar
+ }
+ case "location":
+ if v != nil {
+ var location string
+ err = json.Unmarshal(*v, &location)
+ if err != nil {
+ return err
+ }
+ asg.Location = &location
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ asg.Tags = tags
+ }
+ }
+ }
+
+ return nil
+}
+
+// ApplicationSecurityGroupListResult a list of application security groups.
+type ApplicationSecurityGroupListResult struct {
+ autorest.Response `json:"-"`
+ // Value - A list of application security groups.
+ Value *[]ApplicationSecurityGroup `json:"value,omitempty"`
+ // NextLink - READ-ONLY; The URL to get the next set of results.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for ApplicationSecurityGroupListResult.
+func (asglr ApplicationSecurityGroupListResult) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if asglr.Value != nil {
+ objectMap["value"] = asglr.Value
+ }
+ return json.Marshal(objectMap)
+}
+
+// ApplicationSecurityGroupListResultIterator provides access to a complete listing of
+// ApplicationSecurityGroup values.
+type ApplicationSecurityGroupListResultIterator struct {
+ i int
+ page ApplicationSecurityGroupListResultPage
+}
+
+// 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 *ApplicationSecurityGroupListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationSecurityGroupListResultIterator.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 *ApplicationSecurityGroupListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter ApplicationSecurityGroupListResultIterator) 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 ApplicationSecurityGroupListResultIterator) Response() ApplicationSecurityGroupListResult {
+ 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 ApplicationSecurityGroupListResultIterator) Value() ApplicationSecurityGroup {
+ if !iter.page.NotDone() {
+ return ApplicationSecurityGroup{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// Creates a new instance of the ApplicationSecurityGroupListResultIterator type.
+func NewApplicationSecurityGroupListResultIterator(page ApplicationSecurityGroupListResultPage) ApplicationSecurityGroupListResultIterator {
+ return ApplicationSecurityGroupListResultIterator{page: page}
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (asglr ApplicationSecurityGroupListResult) IsEmpty() bool {
+ return asglr.Value == nil || len(*asglr.Value) == 0
+}
+
+// hasNextLink returns true if the NextLink is not empty.
+func (asglr ApplicationSecurityGroupListResult) hasNextLink() bool {
+ return asglr.NextLink != nil && len(*asglr.NextLink) != 0
+}
+
+// applicationSecurityGroupListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (asglr ApplicationSecurityGroupListResult) applicationSecurityGroupListResultPreparer(ctx context.Context) (*http.Request, error) {
+ if !asglr.hasNextLink() {
+ return nil, nil
+ }
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(asglr.NextLink)))
+}
+
+// ApplicationSecurityGroupListResultPage contains a page of ApplicationSecurityGroup values.
+type ApplicationSecurityGroupListResultPage struct {
+ fn func(context.Context, ApplicationSecurityGroupListResult) (ApplicationSecurityGroupListResult, error)
+ asglr ApplicationSecurityGroupListResult
+}
+
+// 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 *ApplicationSecurityGroupListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationSecurityGroupListResultPage.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.asglr)
+ if err != nil {
+ return err
+ }
+ page.asglr = 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 *ApplicationSecurityGroupListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page ApplicationSecurityGroupListResultPage) NotDone() bool {
+ return !page.asglr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page ApplicationSecurityGroupListResultPage) Response() ApplicationSecurityGroupListResult {
+ return page.asglr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page ApplicationSecurityGroupListResultPage) Values() []ApplicationSecurityGroup {
+ if page.asglr.IsEmpty() {
+ return nil
+ }
+ return *page.asglr.Value
+}
+
+// Creates a new instance of the ApplicationSecurityGroupListResultPage type.
+func NewApplicationSecurityGroupListResultPage(cur ApplicationSecurityGroupListResult, getNextPage func(context.Context, ApplicationSecurityGroupListResult) (ApplicationSecurityGroupListResult, error)) ApplicationSecurityGroupListResultPage {
+ return ApplicationSecurityGroupListResultPage{
+ fn: getNextPage,
+ asglr: cur,
+ }
+}
+
+// ApplicationSecurityGroupPropertiesFormat application security group properties.
+type ApplicationSecurityGroupPropertiesFormat struct {
+ // ResourceGUID - READ-ONLY; The resource GUID property of the application security group resource. It uniquely identifies a resource, even if the user changes its name or migrate the resource across subscriptions or resource groups.
+ ResourceGUID *string `json:"resourceGuid,omitempty"`
+ // ProvisioningState - READ-ONLY; The provisioning state of the application security group resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+}
+
+// ApplicationSecurityGroupsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results
+// of a long-running operation.
+type ApplicationSecurityGroupsCreateOrUpdateFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(ApplicationSecurityGroupsClient) (ApplicationSecurityGroup, error)
+}
+
+// ApplicationSecurityGroupsDeleteFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type ApplicationSecurityGroupsDeleteFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(ApplicationSecurityGroupsClient) (autorest.Response, error)
+}
+
+// AuthorizationListResult response for ListAuthorizations API service call retrieves all authorizations
+// that belongs to an ExpressRouteCircuit.
+type AuthorizationListResult struct {
+ autorest.Response `json:"-"`
+ // Value - The authorizations in an ExpressRoute Circuit.
+ Value *[]ExpressRouteCircuitAuthorization `json:"value,omitempty"`
+ // NextLink - The URL to get the next set of results.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// AuthorizationListResultIterator provides access to a complete listing of
+// ExpressRouteCircuitAuthorization values.
+type AuthorizationListResultIterator struct {
+ i int
+ page AuthorizationListResultPage
+}
+
+// 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 *AuthorizationListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AuthorizationListResultIterator.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 *AuthorizationListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter AuthorizationListResultIterator) 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 AuthorizationListResultIterator) Response() AuthorizationListResult {
+ 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 AuthorizationListResultIterator) Value() ExpressRouteCircuitAuthorization {
+ if !iter.page.NotDone() {
+ return ExpressRouteCircuitAuthorization{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// Creates a new instance of the AuthorizationListResultIterator type.
+func NewAuthorizationListResultIterator(page AuthorizationListResultPage) AuthorizationListResultIterator {
+ return AuthorizationListResultIterator{page: page}
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (alr AuthorizationListResult) IsEmpty() bool {
+ return alr.Value == nil || len(*alr.Value) == 0
+}
+
+// hasNextLink returns true if the NextLink is not empty.
+func (alr AuthorizationListResult) hasNextLink() bool {
+ return alr.NextLink != nil && len(*alr.NextLink) != 0
+}
+
+// authorizationListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (alr AuthorizationListResult) authorizationListResultPreparer(ctx context.Context) (*http.Request, error) {
+ if !alr.hasNextLink() {
+ return nil, nil
+ }
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(alr.NextLink)))
+}
+
+// AuthorizationListResultPage contains a page of ExpressRouteCircuitAuthorization values.
+type AuthorizationListResultPage struct {
+ fn func(context.Context, AuthorizationListResult) (AuthorizationListResult, error)
+ alr AuthorizationListResult
+}
+
+// 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 *AuthorizationListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AuthorizationListResultPage.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.alr)
+ if err != nil {
+ return err
+ }
+ page.alr = 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 *AuthorizationListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page AuthorizationListResultPage) NotDone() bool {
+ return !page.alr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page AuthorizationListResultPage) Response() AuthorizationListResult {
+ return page.alr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page AuthorizationListResultPage) Values() []ExpressRouteCircuitAuthorization {
+ if page.alr.IsEmpty() {
+ return nil
+ }
+ return *page.alr.Value
+}
+
+// Creates a new instance of the AuthorizationListResultPage type.
+func NewAuthorizationListResultPage(cur AuthorizationListResult, getNextPage func(context.Context, AuthorizationListResult) (AuthorizationListResult, error)) AuthorizationListResultPage {
+ return AuthorizationListResultPage{
+ fn: getNextPage,
+ alr: cur,
+ }
+}
+
+// AuthorizationPropertiesFormat ...
+type AuthorizationPropertiesFormat struct {
+ // AuthorizationKey - The authorization key.
+ AuthorizationKey *string `json:"authorizationKey,omitempty"`
+ // AuthorizationUseStatus - AuthorizationUseStatus. Possible values are: 'Available' and 'InUse'. Possible values include: 'Available', 'InUse'
+ AuthorizationUseStatus AuthorizationUseStatus `json:"authorizationUseStatus,omitempty"`
+ // ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+}
+
+// Availability availability of the metric.
+type Availability struct {
+ // TimeGrain - The time grain of the availability.
+ TimeGrain *string `json:"timeGrain,omitempty"`
+ // Retention - The retention of the availability.
+ Retention *string `json:"retention,omitempty"`
+ // BlobDuration - Duration of the availability blob.
+ BlobDuration *string `json:"blobDuration,omitempty"`
+}
+
+// AvailableProvidersList list of available countries with details.
+type AvailableProvidersList struct {
+ autorest.Response `json:"-"`
+ // Countries - List of available countries.
+ Countries *[]AvailableProvidersListCountry `json:"countries,omitempty"`
+}
+
+// AvailableProvidersListCity city or town details.
+type AvailableProvidersListCity struct {
+ // CityName - The city or town name.
+ CityName *string `json:"cityName,omitempty"`
+ // Providers - A list of Internet service providers.
+ Providers *[]string `json:"providers,omitempty"`
+}
+
+// AvailableProvidersListCountry country details.
+type AvailableProvidersListCountry struct {
+ // CountryName - The country name.
+ CountryName *string `json:"countryName,omitempty"`
+ // Providers - A list of Internet service providers.
+ Providers *[]string `json:"providers,omitempty"`
+ // States - List of available states in the country.
+ States *[]AvailableProvidersListState `json:"states,omitempty"`
+}
+
+// AvailableProvidersListParameters constraints that determine the list of available Internet service
+// providers.
+type AvailableProvidersListParameters struct {
+ // AzureLocations - A list of Azure regions.
+ AzureLocations *[]string `json:"azureLocations,omitempty"`
+ // Country - The country for available providers list.
+ Country *string `json:"country,omitempty"`
+ // State - The state for available providers list.
+ State *string `json:"state,omitempty"`
+ // City - The city or town for available providers list.
+ City *string `json:"city,omitempty"`
+}
+
+// AvailableProvidersListState state details.
+type AvailableProvidersListState struct {
+ // StateName - The state name.
+ StateName *string `json:"stateName,omitempty"`
+ // Providers - A list of Internet service providers.
+ Providers *[]string `json:"providers,omitempty"`
+ // Cities - List of available cities or towns in the state.
+ Cities *[]AvailableProvidersListCity `json:"cities,omitempty"`
+}
+
+// AzureAsyncOperationResult the response body contains the status of the specified asynchronous operation,
+// indicating whether it has succeeded, is in progress, or has failed. Note that this status is distinct
+// from the HTTP status code returned for the Get Operation Status operation itself. If the asynchronous
+// operation succeeded, the response body includes the HTTP status code for the successful request. If the
+// asynchronous operation failed, the response body includes the HTTP status code for the failed request
+// and error information regarding the failure.
+type AzureAsyncOperationResult struct {
+ // Status - Status of the Azure async operation. Possible values are: 'InProgress', 'Succeeded', and 'Failed'. Possible values include: 'OperationStatusInProgress', 'OperationStatusSucceeded', 'OperationStatusFailed'
+ Status OperationStatus `json:"status,omitempty"`
+ Error *Error `json:"error,omitempty"`
+}
+
+// AzureReachabilityReport azure reachability report details.
+type AzureReachabilityReport struct {
+ autorest.Response `json:"-"`
+ // AggregationLevel - The aggregation level of Azure reachability report. Can be Country, State or City.
+ AggregationLevel *string `json:"aggregationLevel,omitempty"`
+ ProviderLocation *AzureReachabilityReportLocation `json:"providerLocation,omitempty"`
+ // ReachabilityReport - List of Azure reachability report items.
+ ReachabilityReport *[]AzureReachabilityReportItem `json:"reachabilityReport,omitempty"`
+}
+
+// AzureReachabilityReportItem azure reachability report details for a given provider location.
+type AzureReachabilityReportItem struct {
+ // Provider - The Internet service provider.
+ Provider *string `json:"provider,omitempty"`
+ // AzureLocation - The Azure region.
+ AzureLocation *string `json:"azureLocation,omitempty"`
+ // Latencies - List of latency details for each of the time series.
+ Latencies *[]AzureReachabilityReportLatencyInfo `json:"latencies,omitempty"`
+}
+
+// AzureReachabilityReportLatencyInfo details on latency for a time series.
+type AzureReachabilityReportLatencyInfo struct {
+ // TimeStamp - The time stamp.
+ TimeStamp *date.Time `json:"timeStamp,omitempty"`
+ // Score - The relative latency score between 1 and 100, higher values indicating a faster connection.
+ Score *int32 `json:"score,omitempty"`
+}
+
+// AzureReachabilityReportLocation parameters that define a geographic location.
+type AzureReachabilityReportLocation struct {
+ // Country - The name of the country.
+ Country *string `json:"country,omitempty"`
+ // State - The name of the state.
+ State *string `json:"state,omitempty"`
+ // City - The name of the city or town.
+ City *string `json:"city,omitempty"`
+}
+
+// AzureReachabilityReportParameters geographic and time constraints for Azure reachability report.
+type AzureReachabilityReportParameters struct {
+ ProviderLocation *AzureReachabilityReportLocation `json:"providerLocation,omitempty"`
+ // Providers - List of Internet service providers.
+ Providers *[]string `json:"providers,omitempty"`
+ // AzureLocations - Optional Azure regions to scope the query to.
+ AzureLocations *[]string `json:"azureLocations,omitempty"`
+ // StartTime - The start time for the Azure reachability report.
+ StartTime *date.Time `json:"startTime,omitempty"`
+ // EndTime - The end time for the Azure reachability report.
+ EndTime *date.Time `json:"endTime,omitempty"`
+}
+
+// BackendAddressPool pool of backend IP addresses.
+type BackendAddressPool struct {
+ autorest.Response `json:"-"`
+ // BackendAddressPoolPropertiesFormat - Properties of load balancer backend address pool.
+ *BackendAddressPoolPropertiesFormat `json:"properties,omitempty"`
+ // Name - Gets 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"`
+ // Etag - A unique read-only string that changes whenever the resource is updated.
+ Etag *string `json:"etag,omitempty"`
+ // ID - Resource ID.
+ ID *string `json:"id,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for BackendAddressPool.
+func (bap BackendAddressPool) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if bap.BackendAddressPoolPropertiesFormat != nil {
+ objectMap["properties"] = bap.BackendAddressPoolPropertiesFormat
+ }
+ if bap.Name != nil {
+ objectMap["name"] = bap.Name
+ }
+ if bap.Etag != nil {
+ objectMap["etag"] = bap.Etag
+ }
+ if bap.ID != nil {
+ objectMap["id"] = bap.ID
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for BackendAddressPool struct.
+func (bap *BackendAddressPool) 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 backendAddressPoolPropertiesFormat BackendAddressPoolPropertiesFormat
+ err = json.Unmarshal(*v, &backendAddressPoolPropertiesFormat)
+ if err != nil {
+ return err
+ }
+ bap.BackendAddressPoolPropertiesFormat = &backendAddressPoolPropertiesFormat
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ bap.Name = &name
+ }
+ case "etag":
+ if v != nil {
+ var etag string
+ err = json.Unmarshal(*v, &etag)
+ if err != nil {
+ return err
+ }
+ bap.Etag = &etag
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ bap.ID = &ID
+ }
+ }
+ }
+
+ return nil
+}
+
+// BackendAddressPoolPropertiesFormat properties of the backend address pool.
+type BackendAddressPoolPropertiesFormat struct {
+ // BackendIPConfigurations - READ-ONLY; Gets collection of references to IP addresses defined in network interfaces.
+ BackendIPConfigurations *[]InterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"`
+ // LoadBalancingRules - READ-ONLY; Gets load balancing rules that use this backend address pool.
+ LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"`
+ // OutboundNatRule - READ-ONLY; Gets outbound rules that use this backend address pool.
+ OutboundNatRule *SubResource `json:"outboundNatRule,omitempty"`
+ // ProvisioningState - Get provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for BackendAddressPoolPropertiesFormat.
+func (bappf BackendAddressPoolPropertiesFormat) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if bappf.ProvisioningState != nil {
+ objectMap["provisioningState"] = bappf.ProvisioningState
+ }
+ return json.Marshal(objectMap)
+}
+
+// BGPCommunity contains bgp community information offered in Service Community resources.
+type BGPCommunity struct {
+ // ServiceSupportedRegion - The region which the service support. e.g. For O365, region is Global.
+ ServiceSupportedRegion *string `json:"serviceSupportedRegion,omitempty"`
+ // CommunityName - The name of the bgp community. e.g. Skype.
+ CommunityName *string `json:"communityName,omitempty"`
+ // CommunityValue - The value of the bgp community. For more information: https://docs.microsoft.com/en-us/azure/expressroute/expressroute-routing.
+ CommunityValue *string `json:"communityValue,omitempty"`
+ // CommunityPrefixes - The prefixes that the bgp community contains.
+ CommunityPrefixes *[]string `json:"communityPrefixes,omitempty"`
+ // IsAuthorizedToUse - Customer is authorized to use bgp community or not.
+ IsAuthorizedToUse *bool `json:"isAuthorizedToUse,omitempty"`
+ // ServiceGroup - The service group of the bgp community contains.
+ ServiceGroup *string `json:"serviceGroup,omitempty"`
+}
+
+// BgpPeerStatus BGP peer status details
+type BgpPeerStatus struct {
+ // LocalAddress - READ-ONLY; The virtual network gateway's local address
+ LocalAddress *string `json:"localAddress,omitempty"`
+ // Neighbor - READ-ONLY; The remote BGP peer
+ Neighbor *string `json:"neighbor,omitempty"`
+ // Asn - READ-ONLY; The autonomous system number of the remote BGP peer
+ Asn *int32 `json:"asn,omitempty"`
+ // State - READ-ONLY; The BGP peer state. Possible values include: 'BgpPeerStateUnknown', 'BgpPeerStateStopped', 'BgpPeerStateIdle', 'BgpPeerStateConnecting', 'BgpPeerStateConnected'
+ State BgpPeerState `json:"state,omitempty"`
+ // ConnectedDuration - READ-ONLY; For how long the peering has been up
+ ConnectedDuration *string `json:"connectedDuration,omitempty"`
+ // RoutesReceived - READ-ONLY; The number of routes learned from this peer
+ RoutesReceived *int64 `json:"routesReceived,omitempty"`
+ // MessagesSent - READ-ONLY; The number of BGP messages sent
+ MessagesSent *int64 `json:"messagesSent,omitempty"`
+ // MessagesReceived - READ-ONLY; The number of BGP messages received
+ MessagesReceived *int64 `json:"messagesReceived,omitempty"`
+}
+
+// BgpPeerStatusListResult response for list BGP peer status API service call
+type BgpPeerStatusListResult struct {
+ autorest.Response `json:"-"`
+ // Value - List of BGP peers
+ Value *[]BgpPeerStatus `json:"value,omitempty"`
+}
+
+// BgpServiceCommunity service Community Properties.
+type BgpServiceCommunity struct {
+ *BgpServiceCommunityPropertiesFormat `json:"properties,omitempty"`
+ // ID - 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 BgpServiceCommunity.
+func (bsc BgpServiceCommunity) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if bsc.BgpServiceCommunityPropertiesFormat != nil {
+ objectMap["properties"] = bsc.BgpServiceCommunityPropertiesFormat
+ }
+ if bsc.ID != nil {
+ objectMap["id"] = bsc.ID
+ }
+ if bsc.Location != nil {
+ objectMap["location"] = bsc.Location
+ }
+ if bsc.Tags != nil {
+ objectMap["tags"] = bsc.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for BgpServiceCommunity struct.
+func (bsc *BgpServiceCommunity) 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 bgpServiceCommunityPropertiesFormat BgpServiceCommunityPropertiesFormat
+ err = json.Unmarshal(*v, &bgpServiceCommunityPropertiesFormat)
+ if err != nil {
+ return err
+ }
+ bsc.BgpServiceCommunityPropertiesFormat = &bgpServiceCommunityPropertiesFormat
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ bsc.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ bsc.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ bsc.Type = &typeVar
+ }
+ case "location":
+ if v != nil {
+ var location string
+ err = json.Unmarshal(*v, &location)
+ if err != nil {
+ return err
+ }
+ bsc.Location = &location
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ bsc.Tags = tags
+ }
+ }
+ }
+
+ return nil
+}
+
+// BgpServiceCommunityListResult response for the ListServiceCommunity API service call.
+type BgpServiceCommunityListResult struct {
+ autorest.Response `json:"-"`
+ // Value - A list of service community resources.
+ Value *[]BgpServiceCommunity `json:"value,omitempty"`
+ // NextLink - The URL to get the next set of results.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// BgpServiceCommunityListResultIterator provides access to a complete listing of BgpServiceCommunity
+// values.
+type BgpServiceCommunityListResultIterator struct {
+ i int
+ page BgpServiceCommunityListResultPage
+}
+
+// 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 *BgpServiceCommunityListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/BgpServiceCommunityListResultIterator.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 *BgpServiceCommunityListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter BgpServiceCommunityListResultIterator) 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 BgpServiceCommunityListResultIterator) Response() BgpServiceCommunityListResult {
+ 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 BgpServiceCommunityListResultIterator) Value() BgpServiceCommunity {
+ if !iter.page.NotDone() {
+ return BgpServiceCommunity{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// Creates a new instance of the BgpServiceCommunityListResultIterator type.
+func NewBgpServiceCommunityListResultIterator(page BgpServiceCommunityListResultPage) BgpServiceCommunityListResultIterator {
+ return BgpServiceCommunityListResultIterator{page: page}
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (bsclr BgpServiceCommunityListResult) IsEmpty() bool {
+ return bsclr.Value == nil || len(*bsclr.Value) == 0
+}
+
+// hasNextLink returns true if the NextLink is not empty.
+func (bsclr BgpServiceCommunityListResult) hasNextLink() bool {
+ return bsclr.NextLink != nil && len(*bsclr.NextLink) != 0
+}
+
+// bgpServiceCommunityListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (bsclr BgpServiceCommunityListResult) bgpServiceCommunityListResultPreparer(ctx context.Context) (*http.Request, error) {
+ if !bsclr.hasNextLink() {
+ return nil, nil
+ }
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(bsclr.NextLink)))
+}
+
+// BgpServiceCommunityListResultPage contains a page of BgpServiceCommunity values.
+type BgpServiceCommunityListResultPage struct {
+ fn func(context.Context, BgpServiceCommunityListResult) (BgpServiceCommunityListResult, error)
+ bsclr BgpServiceCommunityListResult
+}
+
+// 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 *BgpServiceCommunityListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/BgpServiceCommunityListResultPage.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.bsclr)
+ if err != nil {
+ return err
+ }
+ page.bsclr = 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 *BgpServiceCommunityListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page BgpServiceCommunityListResultPage) NotDone() bool {
+ return !page.bsclr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page BgpServiceCommunityListResultPage) Response() BgpServiceCommunityListResult {
+ return page.bsclr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page BgpServiceCommunityListResultPage) Values() []BgpServiceCommunity {
+ if page.bsclr.IsEmpty() {
+ return nil
+ }
+ return *page.bsclr.Value
+}
+
+// Creates a new instance of the BgpServiceCommunityListResultPage type.
+func NewBgpServiceCommunityListResultPage(cur BgpServiceCommunityListResult, getNextPage func(context.Context, BgpServiceCommunityListResult) (BgpServiceCommunityListResult, error)) BgpServiceCommunityListResultPage {
+ return BgpServiceCommunityListResultPage{
+ fn: getNextPage,
+ bsclr: cur,
+ }
+}
+
+// BgpServiceCommunityPropertiesFormat properties of Service Community.
+type BgpServiceCommunityPropertiesFormat struct {
+ // ServiceName - The name of the bgp community. e.g. Skype.
+ ServiceName *string `json:"serviceName,omitempty"`
+ // BgpCommunities - Get a list of bgp communities.
+ BgpCommunities *[]BGPCommunity `json:"bgpCommunities,omitempty"`
+}
+
+// BgpSettings BGP settings details
+type BgpSettings struct {
+ // Asn - The BGP speaker's ASN.
+ Asn *int64 `json:"asn,omitempty"`
+ // BgpPeeringAddress - The BGP peering address and BGP identifier of this BGP speaker.
+ BgpPeeringAddress *string `json:"bgpPeeringAddress,omitempty"`
+ // PeerWeight - The weight added to routes learned from this BGP speaker.
+ PeerWeight *int32 `json:"peerWeight,omitempty"`
+}
+
+// ConnectionMonitor parameters that define the operation to create a connection monitor.
+type ConnectionMonitor struct {
+ // Location - Connection monitor location.
+ Location *string `json:"location,omitempty"`
+ // Tags - Connection monitor tags.
+ Tags map[string]*string `json:"tags"`
+ *ConnectionMonitorParameters `json:"properties,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for ConnectionMonitor.
+func (cm ConnectionMonitor) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if cm.Location != nil {
+ objectMap["location"] = cm.Location
+ }
+ if cm.Tags != nil {
+ objectMap["tags"] = cm.Tags
+ }
+ if cm.ConnectionMonitorParameters != nil {
+ objectMap["properties"] = cm.ConnectionMonitorParameters
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for ConnectionMonitor struct.
+func (cm *ConnectionMonitor) 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 "location":
+ if v != nil {
+ var location string
+ err = json.Unmarshal(*v, &location)
+ if err != nil {
+ return err
+ }
+ cm.Location = &location
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ cm.Tags = tags
+ }
+ case "properties":
+ if v != nil {
+ var connectionMonitorParameters ConnectionMonitorParameters
+ err = json.Unmarshal(*v, &connectionMonitorParameters)
+ if err != nil {
+ return err
+ }
+ cm.ConnectionMonitorParameters = &connectionMonitorParameters
+ }
+ }
+ }
+
+ return nil
+}
+
+// ConnectionMonitorDestination describes the destination of connection monitor.
+type ConnectionMonitorDestination struct {
+ // ResourceID - The ID of the resource used as the destination by connection monitor.
+ ResourceID *string `json:"resourceId,omitempty"`
+ // Address - Address of the connection monitor destination (IP or domain name).
+ Address *string `json:"address,omitempty"`
+ // Port - The destination port used by connection monitor.
+ Port *int32 `json:"port,omitempty"`
+}
+
+// ConnectionMonitorListResult list of connection monitors.
+type ConnectionMonitorListResult struct {
+ autorest.Response `json:"-"`
+ // Value - Information about connection monitors.
+ Value *[]ConnectionMonitorResult `json:"value,omitempty"`
+}
+
+// ConnectionMonitorParameters parameters that define the operation to create a connection monitor.
+type ConnectionMonitorParameters struct {
+ Source *ConnectionMonitorSource `json:"source,omitempty"`
+ Destination *ConnectionMonitorDestination `json:"destination,omitempty"`
+ // AutoStart - Determines if the connection monitor will start automatically once created.
+ AutoStart *bool `json:"autoStart,omitempty"`
+ // MonitoringIntervalInSeconds - Monitoring interval in seconds.
+ MonitoringIntervalInSeconds *int32 `json:"monitoringIntervalInSeconds,omitempty"`
+}
+
+// ConnectionMonitorQueryResult list of connection states snapshots.
+type ConnectionMonitorQueryResult struct {
+ autorest.Response `json:"-"`
+ // States - Information about connection states.
+ States *[]ConnectionStateSnapshot `json:"states,omitempty"`
+}
+
+// ConnectionMonitorResult information about the connection monitor.
+type ConnectionMonitorResult struct {
+ autorest.Response `json:"-"`
+ // Name - READ-ONLY; Name of the connection monitor.
+ Name *string `json:"name,omitempty"`
+ // ID - READ-ONLY; ID of the connection monitor.
+ ID *string `json:"id,omitempty"`
+ Etag *string `json:"etag,omitempty"`
+ // Type - READ-ONLY; Connection monitor type.
+ Type *string `json:"type,omitempty"`
+ // Location - Connection monitor location.
+ Location *string `json:"location,omitempty"`
+ // Tags - Connection monitor tags.
+ Tags map[string]*string `json:"tags"`
+ *ConnectionMonitorResultProperties `json:"properties,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for ConnectionMonitorResult.
+func (cmr ConnectionMonitorResult) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if cmr.Etag != nil {
+ objectMap["etag"] = cmr.Etag
+ }
+ if cmr.Location != nil {
+ objectMap["location"] = cmr.Location
+ }
+ if cmr.Tags != nil {
+ objectMap["tags"] = cmr.Tags
+ }
+ if cmr.ConnectionMonitorResultProperties != nil {
+ objectMap["properties"] = cmr.ConnectionMonitorResultProperties
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for ConnectionMonitorResult struct.
+func (cmr *ConnectionMonitorResult) 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
+ }
+ cmr.Name = &name
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ cmr.ID = &ID
+ }
+ case "etag":
+ if v != nil {
+ var etag string
+ err = json.Unmarshal(*v, &etag)
+ if err != nil {
+ return err
+ }
+ cmr.Etag = &etag
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ cmr.Type = &typeVar
+ }
+ case "location":
+ if v != nil {
+ var location string
+ err = json.Unmarshal(*v, &location)
+ if err != nil {
+ return err
+ }
+ cmr.Location = &location
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ cmr.Tags = tags
+ }
+ case "properties":
+ if v != nil {
+ var connectionMonitorResultProperties ConnectionMonitorResultProperties
+ err = json.Unmarshal(*v, &connectionMonitorResultProperties)
+ if err != nil {
+ return err
+ }
+ cmr.ConnectionMonitorResultProperties = &connectionMonitorResultProperties
+ }
+ }
+ }
+
+ return nil
+}
+
+// ConnectionMonitorResultProperties describes the properties of a connection monitor.
+type ConnectionMonitorResultProperties struct {
+ // ProvisioningState - The provisioning state of the connection monitor. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
+ ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
+ // StartTime - The date and time when the connection monitor was started.
+ StartTime *date.Time `json:"startTime,omitempty"`
+ // MonitoringStatus - The monitoring status of the connection monitor.
+ MonitoringStatus *string `json:"monitoringStatus,omitempty"`
+ Source *ConnectionMonitorSource `json:"source,omitempty"`
+ Destination *ConnectionMonitorDestination `json:"destination,omitempty"`
+ // AutoStart - Determines if the connection monitor will start automatically once created.
+ AutoStart *bool `json:"autoStart,omitempty"`
+ // MonitoringIntervalInSeconds - Monitoring interval in seconds.
+ MonitoringIntervalInSeconds *int32 `json:"monitoringIntervalInSeconds,omitempty"`
+}
+
+// ConnectionMonitorsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type ConnectionMonitorsCreateOrUpdateFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(ConnectionMonitorsClient) (ConnectionMonitorResult, error)
+}
+
+// ConnectionMonitorsDeleteFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type ConnectionMonitorsDeleteFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(ConnectionMonitorsClient) (autorest.Response, error)
+}
+
+// ConnectionMonitorSource describes the source of connection monitor.
+type ConnectionMonitorSource struct {
+ // ResourceID - The ID of the resource used as the source by connection monitor.
+ ResourceID *string `json:"resourceId,omitempty"`
+ // Port - The source port used by connection monitor.
+ Port *int32 `json:"port,omitempty"`
+}
+
+// ConnectionMonitorsQueryFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type ConnectionMonitorsQueryFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(ConnectionMonitorsClient) (ConnectionMonitorQueryResult, error)
+}
+
+// ConnectionMonitorsStartFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type ConnectionMonitorsStartFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(ConnectionMonitorsClient) (autorest.Response, error)
+}
+
+// ConnectionMonitorsStopFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type ConnectionMonitorsStopFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(ConnectionMonitorsClient) (autorest.Response, error)
+}
+
+// ConnectionResetSharedKey the virtual network connection reset shared key
+type ConnectionResetSharedKey struct {
+ autorest.Response `json:"-"`
+ // KeyLength - The virtual network connection reset shared key length, should between 1 and 128.
+ KeyLength *int32 `json:"keyLength,omitempty"`
+}
+
+// ConnectionSharedKey response for GetConnectionSharedKey API service call
+type ConnectionSharedKey struct {
+ autorest.Response `json:"-"`
+ // Value - The virtual network connection shared key value.
+ Value *string `json:"value,omitempty"`
+}
+
+// ConnectionStateSnapshot connection state snapshot.
+type ConnectionStateSnapshot struct {
+ // ConnectionState - The connection state. Possible values include: 'ConnectionStateReachable', 'ConnectionStateUnreachable', 'ConnectionStateUnknown'
+ ConnectionState ConnectionState `json:"connectionState,omitempty"`
+ // StartTime - The start time of the connection snapshot.
+ StartTime *date.Time `json:"startTime,omitempty"`
+ // EndTime - The end time of the connection snapshot.
+ EndTime *date.Time `json:"endTime,omitempty"`
+ // EvaluationState - Connectivity analysis evaluation state. Possible values include: 'NotStarted', 'InProgress', 'Completed'
+ EvaluationState EvaluationState `json:"evaluationState,omitempty"`
+ // Hops - READ-ONLY; List of hops between the source and the destination.
+ Hops *[]ConnectivityHop `json:"hops,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for ConnectionStateSnapshot.
+func (CSS ConnectionStateSnapshot) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if CSS.ConnectionState != "" {
+ objectMap["connectionState"] = CSS.ConnectionState
+ }
+ if CSS.StartTime != nil {
+ objectMap["startTime"] = CSS.StartTime
+ }
+ if CSS.EndTime != nil {
+ objectMap["endTime"] = CSS.EndTime
+ }
+ if CSS.EvaluationState != "" {
+ objectMap["evaluationState"] = CSS.EvaluationState
+ }
+ return json.Marshal(objectMap)
+}
+
+// ConnectivityDestination parameters that define destination of connection.
+type ConnectivityDestination struct {
+ // ResourceID - The ID of the resource to which a connection attempt will be made.
+ ResourceID *string `json:"resourceId,omitempty"`
+ // Address - The IP address or URI the resource to which a connection attempt will be made.
+ Address *string `json:"address,omitempty"`
+ // Port - Port on which check connectivity will be performed.
+ Port *int32 `json:"port,omitempty"`
+}
+
+// ConnectivityHop information about a hop between the source and the destination.
+type ConnectivityHop struct {
+ // Type - READ-ONLY; The type of the hop.
+ Type *string `json:"type,omitempty"`
+ // ID - READ-ONLY; The ID of the hop.
+ ID *string `json:"id,omitempty"`
+ // Address - READ-ONLY; The IP address of the hop.
+ Address *string `json:"address,omitempty"`
+ // ResourceID - READ-ONLY; The ID of the resource corresponding to this hop.
+ ResourceID *string `json:"resourceId,omitempty"`
+ // NextHopIds - READ-ONLY; List of next hop identifiers.
+ NextHopIds *[]string `json:"nextHopIds,omitempty"`
+ // Issues - READ-ONLY; List of issues.
+ Issues *[]ConnectivityIssue `json:"issues,omitempty"`
+}
+
+// ConnectivityInformation information on the connectivity status.
+type ConnectivityInformation struct {
+ autorest.Response `json:"-"`
+ // Hops - READ-ONLY; List of hops between the source and the destination.
+ Hops *[]ConnectivityHop `json:"hops,omitempty"`
+ // ConnectionStatus - READ-ONLY; The connection status. Possible values include: 'ConnectionStatusUnknown', 'ConnectionStatusConnected', 'ConnectionStatusDisconnected', 'ConnectionStatusDegraded'
+ ConnectionStatus ConnectionStatus `json:"connectionStatus,omitempty"`
+ // AvgLatencyInMs - READ-ONLY; Average latency in milliseconds.
+ AvgLatencyInMs *int32 `json:"avgLatencyInMs,omitempty"`
+ // MinLatencyInMs - READ-ONLY; Minimum latency in milliseconds.
+ MinLatencyInMs *int32 `json:"minLatencyInMs,omitempty"`
+ // MaxLatencyInMs - READ-ONLY; Maximum latency in milliseconds.
+ MaxLatencyInMs *int32 `json:"maxLatencyInMs,omitempty"`
+ // ProbesSent - READ-ONLY; Total number of probes sent.
+ ProbesSent *int32 `json:"probesSent,omitempty"`
+ // ProbesFailed - READ-ONLY; Number of failed probes.
+ ProbesFailed *int32 `json:"probesFailed,omitempty"`
+}
+
+// ConnectivityIssue information about an issue encountered in the process of checking for connectivity.
+type ConnectivityIssue struct {
+ // Origin - READ-ONLY; The origin of the issue. Possible values include: 'OriginLocal', 'OriginInbound', 'OriginOutbound'
+ Origin Origin `json:"origin,omitempty"`
+ // Severity - READ-ONLY; The severity of the issue. Possible values include: 'SeverityError', 'SeverityWarning'
+ Severity Severity `json:"severity,omitempty"`
+ // Type - READ-ONLY; The type of issue. Possible values include: 'IssueTypeUnknown', 'IssueTypeAgentStopped', 'IssueTypeGuestFirewall', 'IssueTypeDNSResolution', 'IssueTypeSocketBind', 'IssueTypeNetworkSecurityRule', 'IssueTypeUserDefinedRoute', 'IssueTypePortThrottled', 'IssueTypePlatform'
+ Type IssueType `json:"type,omitempty"`
+ // Context - READ-ONLY; Provides additional context on the issue.
+ Context *[]map[string]*string `json:"context,omitempty"`
+}
+
+// ConnectivityParameters parameters that determine how the connectivity check will be performed.
+type ConnectivityParameters struct {
+ Source *ConnectivitySource `json:"source,omitempty"`
+ Destination *ConnectivityDestination `json:"destination,omitempty"`
+}
+
+// ConnectivitySource parameters that define the source of the connection.
+type ConnectivitySource struct {
+ // ResourceID - The ID of the resource from which a connectivity check will be initiated.
+ ResourceID *string `json:"resourceId,omitempty"`
+ // Port - The source port from which a connectivity check will be performed.
+ Port *int32 `json:"port,omitempty"`
+}
+
+// DhcpOptions dhcpOptions contains an array of DNS servers available to VMs deployed in the virtual
+// network. Standard DHCP option for a subnet overrides VNET DHCP options.
+type DhcpOptions struct {
+ // DNSServers - The list of DNS servers IP addresses.
+ DNSServers *[]string `json:"dnsServers,omitempty"`
+}
+
+// Dimension dimension of the metric.
+type Dimension struct {
+ // Name - The name of the dimension.
+ Name *string `json:"name,omitempty"`
+ // DisplayName - The display name of the dimension.
+ DisplayName *string `json:"displayName,omitempty"`
+ // InternalName - The internal name of the dimension.
+ InternalName *string `json:"internalName,omitempty"`
+}
+
+// DNSNameAvailabilityResult response for the CheckDnsNameAvailability API service call.
+type DNSNameAvailabilityResult struct {
+ autorest.Response `json:"-"`
+ // Available - Domain availability (True/False).
+ Available *bool `json:"available,omitempty"`
+}
+
+// EffectiveNetworkSecurityGroup effective network security group.
+type EffectiveNetworkSecurityGroup struct {
+ // NetworkSecurityGroup - The ID of network security group that is applied.
+ NetworkSecurityGroup *SubResource `json:"networkSecurityGroup,omitempty"`
+ // Association - Associated resources.
+ Association *EffectiveNetworkSecurityGroupAssociation `json:"association,omitempty"`
+ // EffectiveSecurityRules - A collection of effective security rules.
+ EffectiveSecurityRules *[]EffectiveNetworkSecurityRule `json:"effectiveSecurityRules,omitempty"`
+ // TagMap - Mapping of tags to list of IP Addresses included within the tag.
+ TagMap map[string][]string `json:"tagMap"`
+}
+
+// MarshalJSON is the custom marshaler for EffectiveNetworkSecurityGroup.
+func (ensg EffectiveNetworkSecurityGroup) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if ensg.NetworkSecurityGroup != nil {
+ objectMap["networkSecurityGroup"] = ensg.NetworkSecurityGroup
+ }
+ if ensg.Association != nil {
+ objectMap["association"] = ensg.Association
+ }
+ if ensg.EffectiveSecurityRules != nil {
+ objectMap["effectiveSecurityRules"] = ensg.EffectiveSecurityRules
+ }
+ if ensg.TagMap != nil {
+ objectMap["tagMap"] = ensg.TagMap
+ }
+ return json.Marshal(objectMap)
+}
+
+// EffectiveNetworkSecurityGroupAssociation the effective network security group association.
+type EffectiveNetworkSecurityGroupAssociation struct {
+ // Subnet - The ID of the subnet if assigned.
+ Subnet *SubResource `json:"subnet,omitempty"`
+ // NetworkInterface - The ID of the network interface if assigned.
+ NetworkInterface *SubResource `json:"networkInterface,omitempty"`
+}
+
+// EffectiveNetworkSecurityGroupListResult response for list effective network security groups API service
+// call.
+type EffectiveNetworkSecurityGroupListResult struct {
+ autorest.Response `json:"-"`
+ // Value - A list of effective network security groups.
+ Value *[]EffectiveNetworkSecurityGroup `json:"value,omitempty"`
+ // NextLink - READ-ONLY; The URL to get the next set of results.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for EffectiveNetworkSecurityGroupListResult.
+func (ensglr EffectiveNetworkSecurityGroupListResult) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if ensglr.Value != nil {
+ objectMap["value"] = ensglr.Value
+ }
+ return json.Marshal(objectMap)
+}
+
+// EffectiveNetworkSecurityRule effective network security rules.
+type EffectiveNetworkSecurityRule struct {
+ // Name - The name of the security rule specified by the user (if created by the user).
+ Name *string `json:"name,omitempty"`
+ // Protocol - The network protocol this rule applies to. Possible values are: 'Tcp', 'Udp', and 'All'. Possible values include: 'TCP', 'UDP', 'All'
+ Protocol EffectiveSecurityRuleProtocol `json:"protocol,omitempty"`
+ // SourcePortRange - The source port or range.
+ SourcePortRange *string `json:"sourcePortRange,omitempty"`
+ // DestinationPortRange - The destination port or range.
+ DestinationPortRange *string `json:"destinationPortRange,omitempty"`
+ // SourcePortRanges - The source port ranges. Expected values include a single integer between 0 and 65535, a range using '-' as separator (e.g. 100-400), or an asterisk (*)
+ SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"`
+ // DestinationPortRanges - The destination port ranges. Expected values include a single integer between 0 and 65535, a range using '-' as separator (e.g. 100-400), or an asterisk (*)
+ DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"`
+ // SourceAddressPrefix - The source address prefix.
+ SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"`
+ // DestinationAddressPrefix - The destination address prefix.
+ DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"`
+ // SourceAddressPrefixes - The source address prefixes. Expected values include CIDR IP ranges, Default Tags (VirtualNetwork, AzureLoadBalancer, Internet), System Tags, and the asterisk (*).
+ SourceAddressPrefixes *[]string `json:"sourceAddressPrefixes,omitempty"`
+ // DestinationAddressPrefixes - The destination address prefixes. Expected values include CIDR IP ranges, Default Tags (VirtualNetwork, AzureLoadBalancer, Internet), System Tags, and the asterisk (*).
+ DestinationAddressPrefixes *[]string `json:"destinationAddressPrefixes,omitempty"`
+ // ExpandedSourceAddressPrefix - The expanded source address prefix.
+ ExpandedSourceAddressPrefix *[]string `json:"expandedSourceAddressPrefix,omitempty"`
+ // ExpandedDestinationAddressPrefix - Expanded destination address prefix.
+ ExpandedDestinationAddressPrefix *[]string `json:"expandedDestinationAddressPrefix,omitempty"`
+ // Access - Whether network traffic is allowed or denied. Possible values are: 'Allow' and 'Deny'. Possible values include: 'SecurityRuleAccessAllow', 'SecurityRuleAccessDeny'
+ Access SecurityRuleAccess `json:"access,omitempty"`
+ // Priority - The priority of the rule.
+ Priority *int32 `json:"priority,omitempty"`
+ // Direction - The direction of the rule. Possible values are: 'Inbound and Outbound'. Possible values include: 'SecurityRuleDirectionInbound', 'SecurityRuleDirectionOutbound'
+ Direction SecurityRuleDirection `json:"direction,omitempty"`
+}
+
+// EffectiveRoute effective Route
+type EffectiveRoute struct {
+ // Name - The name of the user defined route. This is optional.
+ Name *string `json:"name,omitempty"`
+ // Source - Who created the route. Possible values are: 'Unknown', 'User', 'VirtualNetworkGateway', and 'Default'. Possible values include: 'EffectiveRouteSourceUnknown', 'EffectiveRouteSourceUser', 'EffectiveRouteSourceVirtualNetworkGateway', 'EffectiveRouteSourceDefault'
+ Source EffectiveRouteSource `json:"source,omitempty"`
+ // State - The value of effective route. Possible values are: 'Active' and 'Invalid'. Possible values include: 'Active', 'Invalid'
+ State EffectiveRouteState `json:"state,omitempty"`
+ // AddressPrefix - The address prefixes of the effective routes in CIDR notation.
+ AddressPrefix *[]string `json:"addressPrefix,omitempty"`
+ // NextHopIPAddress - The IP address of the next hop of the effective route.
+ NextHopIPAddress *[]string `json:"nextHopIpAddress,omitempty"`
+ // NextHopType - The type of Azure hop the packet should be sent to. Possible values are: 'VirtualNetworkGateway', 'VnetLocal', 'Internet', 'VirtualAppliance', and 'None'. Possible values include: 'RouteNextHopTypeVirtualNetworkGateway', 'RouteNextHopTypeVnetLocal', 'RouteNextHopTypeInternet', 'RouteNextHopTypeVirtualAppliance', 'RouteNextHopTypeNone'
+ NextHopType RouteNextHopType `json:"nextHopType,omitempty"`
+}
+
+// EffectiveRouteListResult response for list effective route API service call.
+type EffectiveRouteListResult struct {
+ autorest.Response `json:"-"`
+ // Value - A list of effective routes.
+ Value *[]EffectiveRoute `json:"value,omitempty"`
+ // NextLink - READ-ONLY; The URL to get the next set of results.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for EffectiveRouteListResult.
+func (erlr EffectiveRouteListResult) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if erlr.Value != nil {
+ objectMap["value"] = erlr.Value
+ }
+ return json.Marshal(objectMap)
+}
+
+// EndpointServiceResult endpoint service.
+type EndpointServiceResult struct {
+ // Name - READ-ONLY; Name of the endpoint service.
+ Name *string `json:"name,omitempty"`
+ // Type - READ-ONLY; Type of the endpoint service.
+ Type *string `json:"type,omitempty"`
+ // ID - Resource ID.
+ ID *string `json:"id,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for EndpointServiceResult.
+func (esr EndpointServiceResult) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if esr.ID != nil {
+ objectMap["id"] = esr.ID
+ }
+ return json.Marshal(objectMap)
+}
+
+// EndpointServicesListResult response for the ListAvailableEndpointServices API service call.
+type EndpointServicesListResult struct {
+ autorest.Response `json:"-"`
+ // Value - List of available endpoint services in a region.
+ Value *[]EndpointServiceResult `json:"value,omitempty"`
+ // NextLink - The URL to get the next set of results.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// EndpointServicesListResultIterator provides access to a complete listing of EndpointServiceResult
+// values.
+type EndpointServicesListResultIterator struct {
+ i int
+ page EndpointServicesListResultPage
+}
+
+// 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 *EndpointServicesListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/EndpointServicesListResultIterator.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 *EndpointServicesListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter EndpointServicesListResultIterator) 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 EndpointServicesListResultIterator) Response() EndpointServicesListResult {
+ 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 EndpointServicesListResultIterator) Value() EndpointServiceResult {
+ if !iter.page.NotDone() {
+ return EndpointServiceResult{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// Creates a new instance of the EndpointServicesListResultIterator type.
+func NewEndpointServicesListResultIterator(page EndpointServicesListResultPage) EndpointServicesListResultIterator {
+ return EndpointServicesListResultIterator{page: page}
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (eslr EndpointServicesListResult) IsEmpty() bool {
+ return eslr.Value == nil || len(*eslr.Value) == 0
+}
+
+// hasNextLink returns true if the NextLink is not empty.
+func (eslr EndpointServicesListResult) hasNextLink() bool {
+ return eslr.NextLink != nil && len(*eslr.NextLink) != 0
+}
+
+// endpointServicesListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (eslr EndpointServicesListResult) endpointServicesListResultPreparer(ctx context.Context) (*http.Request, error) {
+ if !eslr.hasNextLink() {
+ return nil, nil
+ }
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(eslr.NextLink)))
+}
+
+// EndpointServicesListResultPage contains a page of EndpointServiceResult values.
+type EndpointServicesListResultPage struct {
+ fn func(context.Context, EndpointServicesListResult) (EndpointServicesListResult, error)
+ eslr EndpointServicesListResult
+}
+
+// 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 *EndpointServicesListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/EndpointServicesListResultPage.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.eslr)
+ if err != nil {
+ return err
+ }
+ page.eslr = 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 *EndpointServicesListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page EndpointServicesListResultPage) NotDone() bool {
+ return !page.eslr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page EndpointServicesListResultPage) Response() EndpointServicesListResult {
+ return page.eslr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page EndpointServicesListResultPage) Values() []EndpointServiceResult {
+ if page.eslr.IsEmpty() {
+ return nil
+ }
+ return *page.eslr.Value
+}
+
+// Creates a new instance of the EndpointServicesListResultPage type.
+func NewEndpointServicesListResultPage(cur EndpointServicesListResult, getNextPage func(context.Context, EndpointServicesListResult) (EndpointServicesListResult, error)) EndpointServicesListResultPage {
+ return EndpointServicesListResultPage{
+ fn: getNextPage,
+ eslr: cur,
+ }
+}
+
+// Error ...
+type Error struct {
+ Code *string `json:"code,omitempty"`
+ Message *string `json:"message,omitempty"`
+ Target *string `json:"target,omitempty"`
+ Details *[]ErrorDetails `json:"details,omitempty"`
+ InnerError *string `json:"innerError,omitempty"`
+}
+
+// ErrorDetails ...
+type ErrorDetails struct {
+ Code *string `json:"code,omitempty"`
+ Target *string `json:"target,omitempty"`
+ Message *string `json:"message,omitempty"`
+}
+
+// ExpressRouteCircuit expressRouteCircuit resource
+type ExpressRouteCircuit struct {
+ autorest.Response `json:"-"`
+ // Sku - The SKU.
+ Sku *ExpressRouteCircuitSku `json:"sku,omitempty"`
+ *ExpressRouteCircuitPropertiesFormat `json:"properties,omitempty"`
+ // Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
+ Etag *string `json:"etag,omitempty"`
+ // ID - 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 ExpressRouteCircuit.
+func (erc ExpressRouteCircuit) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if erc.Sku != nil {
+ objectMap["sku"] = erc.Sku
+ }
+ if erc.ExpressRouteCircuitPropertiesFormat != nil {
+ objectMap["properties"] = erc.ExpressRouteCircuitPropertiesFormat
+ }
+ if erc.ID != nil {
+ objectMap["id"] = erc.ID
+ }
+ if erc.Location != nil {
+ objectMap["location"] = erc.Location
+ }
+ if erc.Tags != nil {
+ objectMap["tags"] = erc.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuit struct.
+func (erc *ExpressRouteCircuit) 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 ExpressRouteCircuitSku
+ err = json.Unmarshal(*v, &sku)
+ if err != nil {
+ return err
+ }
+ erc.Sku = &sku
+ }
+ case "properties":
+ if v != nil {
+ var expressRouteCircuitPropertiesFormat ExpressRouteCircuitPropertiesFormat
+ err = json.Unmarshal(*v, &expressRouteCircuitPropertiesFormat)
+ if err != nil {
+ return err
+ }
+ erc.ExpressRouteCircuitPropertiesFormat = &expressRouteCircuitPropertiesFormat
+ }
+ case "etag":
+ if v != nil {
+ var etag string
+ err = json.Unmarshal(*v, &etag)
+ if err != nil {
+ return err
+ }
+ erc.Etag = &etag
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ erc.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ erc.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ erc.Type = &typeVar
+ }
+ case "location":
+ if v != nil {
+ var location string
+ err = json.Unmarshal(*v, &location)
+ if err != nil {
+ return err
+ }
+ erc.Location = &location
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ erc.Tags = tags
+ }
+ }
+ }
+
+ return nil
+}
+
+// ExpressRouteCircuitArpTable the ARP table associated with the ExpressRouteCircuit.
+type ExpressRouteCircuitArpTable struct {
+ // Age - Age
+ Age *int32 `json:"age,omitempty"`
+ // Interface - Interface
+ Interface *string `json:"interface,omitempty"`
+ // IPAddress - The IP address.
+ IPAddress *string `json:"ipAddress,omitempty"`
+ // MacAddress - The MAC address.
+ MacAddress *string `json:"macAddress,omitempty"`
+}
+
+// ExpressRouteCircuitAuthorization authorization in an ExpressRouteCircuit resource.
+type ExpressRouteCircuitAuthorization struct {
+ autorest.Response `json:"-"`
+ *AuthorizationPropertiesFormat `json:"properties,omitempty"`
+ // Name - Gets 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"`
+ // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
+ Etag *string `json:"etag,omitempty"`
+ // ID - Resource ID.
+ ID *string `json:"id,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for ExpressRouteCircuitAuthorization.
+func (erca ExpressRouteCircuitAuthorization) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if erca.AuthorizationPropertiesFormat != nil {
+ objectMap["properties"] = erca.AuthorizationPropertiesFormat
+ }
+ if erca.Name != nil {
+ objectMap["name"] = erca.Name
+ }
+ if erca.ID != nil {
+ objectMap["id"] = erca.ID
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuitAuthorization struct.
+func (erca *ExpressRouteCircuitAuthorization) 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 authorizationPropertiesFormat AuthorizationPropertiesFormat
+ err = json.Unmarshal(*v, &authorizationPropertiesFormat)
+ if err != nil {
+ return err
+ }
+ erca.AuthorizationPropertiesFormat = &authorizationPropertiesFormat
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ erca.Name = &name
+ }
+ case "etag":
+ if v != nil {
+ var etag string
+ err = json.Unmarshal(*v, &etag)
+ if err != nil {
+ return err
+ }
+ erca.Etag = &etag
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ erca.ID = &ID
+ }
+ }
+ }
+
+ return nil
+}
+
+// ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
+// results of a long-running operation.
+type ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(ExpressRouteCircuitAuthorizationsClient) (ExpressRouteCircuitAuthorization, error)
+}
+
+// ExpressRouteCircuitAuthorizationsDeleteFuture an abstraction for monitoring and retrieving the results
+// of a long-running operation.
+type ExpressRouteCircuitAuthorizationsDeleteFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(ExpressRouteCircuitAuthorizationsClient) (autorest.Response, error)
+}
+
+// ExpressRouteCircuitListResult response for ListExpressRouteCircuit API service call.
+type ExpressRouteCircuitListResult struct {
+ autorest.Response `json:"-"`
+ // Value - A list of ExpressRouteCircuits in a resource group.
+ Value *[]ExpressRouteCircuit `json:"value,omitempty"`
+ // NextLink - The URL to get the next set of results.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// ExpressRouteCircuitListResultIterator provides access to a complete listing of ExpressRouteCircuit
+// values.
+type ExpressRouteCircuitListResultIterator struct {
+ i int
+ page ExpressRouteCircuitListResultPage
+}
+
+// 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 *ExpressRouteCircuitListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitListResultIterator.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 *ExpressRouteCircuitListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter ExpressRouteCircuitListResultIterator) 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 ExpressRouteCircuitListResultIterator) Response() ExpressRouteCircuitListResult {
+ 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 ExpressRouteCircuitListResultIterator) Value() ExpressRouteCircuit {
+ if !iter.page.NotDone() {
+ return ExpressRouteCircuit{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// Creates a new instance of the ExpressRouteCircuitListResultIterator type.
+func NewExpressRouteCircuitListResultIterator(page ExpressRouteCircuitListResultPage) ExpressRouteCircuitListResultIterator {
+ return ExpressRouteCircuitListResultIterator{page: page}
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (erclr ExpressRouteCircuitListResult) IsEmpty() bool {
+ return erclr.Value == nil || len(*erclr.Value) == 0
+}
+
+// hasNextLink returns true if the NextLink is not empty.
+func (erclr ExpressRouteCircuitListResult) hasNextLink() bool {
+ return erclr.NextLink != nil && len(*erclr.NextLink) != 0
+}
+
+// expressRouteCircuitListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (erclr ExpressRouteCircuitListResult) expressRouteCircuitListResultPreparer(ctx context.Context) (*http.Request, error) {
+ if !erclr.hasNextLink() {
+ return nil, nil
+ }
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(erclr.NextLink)))
+}
+
+// ExpressRouteCircuitListResultPage contains a page of ExpressRouteCircuit values.
+type ExpressRouteCircuitListResultPage struct {
+ fn func(context.Context, ExpressRouteCircuitListResult) (ExpressRouteCircuitListResult, error)
+ erclr ExpressRouteCircuitListResult
+}
+
+// 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 *ExpressRouteCircuitListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitListResultPage.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.erclr)
+ if err != nil {
+ return err
+ }
+ page.erclr = 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 *ExpressRouteCircuitListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page ExpressRouteCircuitListResultPage) NotDone() bool {
+ return !page.erclr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page ExpressRouteCircuitListResultPage) Response() ExpressRouteCircuitListResult {
+ return page.erclr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page ExpressRouteCircuitListResultPage) Values() []ExpressRouteCircuit {
+ if page.erclr.IsEmpty() {
+ return nil
+ }
+ return *page.erclr.Value
+}
+
+// Creates a new instance of the ExpressRouteCircuitListResultPage type.
+func NewExpressRouteCircuitListResultPage(cur ExpressRouteCircuitListResult, getNextPage func(context.Context, ExpressRouteCircuitListResult) (ExpressRouteCircuitListResult, error)) ExpressRouteCircuitListResultPage {
+ return ExpressRouteCircuitListResultPage{
+ fn: getNextPage,
+ erclr: cur,
+ }
+}
+
+// ExpressRouteCircuitPeering peering in an ExpressRouteCircuit resource.
+type ExpressRouteCircuitPeering struct {
+ autorest.Response `json:"-"`
+ *ExpressRouteCircuitPeeringPropertiesFormat `json:"properties,omitempty"`
+ // Name - Gets 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"`
+ // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
+ Etag *string `json:"etag,omitempty"`
+ // ID - Resource ID.
+ ID *string `json:"id,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for ExpressRouteCircuitPeering.
+func (ercp ExpressRouteCircuitPeering) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if ercp.ExpressRouteCircuitPeeringPropertiesFormat != nil {
+ objectMap["properties"] = ercp.ExpressRouteCircuitPeeringPropertiesFormat
+ }
+ if ercp.Name != nil {
+ objectMap["name"] = ercp.Name
+ }
+ if ercp.ID != nil {
+ objectMap["id"] = ercp.ID
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuitPeering struct.
+func (ercp *ExpressRouteCircuitPeering) 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 expressRouteCircuitPeeringPropertiesFormat ExpressRouteCircuitPeeringPropertiesFormat
+ err = json.Unmarshal(*v, &expressRouteCircuitPeeringPropertiesFormat)
+ if err != nil {
+ return err
+ }
+ ercp.ExpressRouteCircuitPeeringPropertiesFormat = &expressRouteCircuitPeeringPropertiesFormat
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ ercp.Name = &name
+ }
+ case "etag":
+ if v != nil {
+ var etag string
+ err = json.Unmarshal(*v, &etag)
+ if err != nil {
+ return err
+ }
+ ercp.Etag = &etag
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ ercp.ID = &ID
+ }
+ }
+ }
+
+ return nil
+}
+
+// ExpressRouteCircuitPeeringConfig specifies the peering configuration.
+type ExpressRouteCircuitPeeringConfig struct {
+ // AdvertisedPublicPrefixes - The reference of AdvertisedPublicPrefixes.
+ AdvertisedPublicPrefixes *[]string `json:"advertisedPublicPrefixes,omitempty"`
+ // AdvertisedCommunities - The communities of bgp peering. Specified for microsoft peering
+ AdvertisedCommunities *[]string `json:"advertisedCommunities,omitempty"`
+ // AdvertisedPublicPrefixesState - AdvertisedPublicPrefixState of the Peering resource. Possible values are 'NotConfigured', 'Configuring', 'Configured', and 'ValidationNeeded'. Possible values include: 'NotConfigured', 'Configuring', 'Configured', 'ValidationNeeded'
+ AdvertisedPublicPrefixesState ExpressRouteCircuitPeeringAdvertisedPublicPrefixState `json:"advertisedPublicPrefixesState,omitempty"`
+ // LegacyMode - The legacy mode of the peering.
+ LegacyMode *int32 `json:"legacyMode,omitempty"`
+ // CustomerASN - The CustomerASN of the peering.
+ CustomerASN *int32 `json:"customerASN,omitempty"`
+ // RoutingRegistryName - The RoutingRegistryName of the configuration.
+ RoutingRegistryName *string `json:"routingRegistryName,omitempty"`
+}
+
+// ExpressRouteCircuitPeeringListResult response for ListPeering API service call retrieves all peerings
+// that belong to an ExpressRouteCircuit.
+type ExpressRouteCircuitPeeringListResult struct {
+ autorest.Response `json:"-"`
+ // Value - The peerings in an express route circuit.
+ Value *[]ExpressRouteCircuitPeering `json:"value,omitempty"`
+ // NextLink - The URL to get the next set of results.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// ExpressRouteCircuitPeeringListResultIterator provides access to a complete listing of
+// ExpressRouteCircuitPeering values.
+type ExpressRouteCircuitPeeringListResultIterator struct {
+ i int
+ page ExpressRouteCircuitPeeringListResultPage
+}
+
+// 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 *ExpressRouteCircuitPeeringListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitPeeringListResultIterator.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 *ExpressRouteCircuitPeeringListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter ExpressRouteCircuitPeeringListResultIterator) 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 ExpressRouteCircuitPeeringListResultIterator) Response() ExpressRouteCircuitPeeringListResult {
+ 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 ExpressRouteCircuitPeeringListResultIterator) Value() ExpressRouteCircuitPeering {
+ if !iter.page.NotDone() {
+ return ExpressRouteCircuitPeering{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// Creates a new instance of the ExpressRouteCircuitPeeringListResultIterator type.
+func NewExpressRouteCircuitPeeringListResultIterator(page ExpressRouteCircuitPeeringListResultPage) ExpressRouteCircuitPeeringListResultIterator {
+ return ExpressRouteCircuitPeeringListResultIterator{page: page}
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (ercplr ExpressRouteCircuitPeeringListResult) IsEmpty() bool {
+ return ercplr.Value == nil || len(*ercplr.Value) == 0
+}
+
+// hasNextLink returns true if the NextLink is not empty.
+func (ercplr ExpressRouteCircuitPeeringListResult) hasNextLink() bool {
+ return ercplr.NextLink != nil && len(*ercplr.NextLink) != 0
+}
+
+// expressRouteCircuitPeeringListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (ercplr ExpressRouteCircuitPeeringListResult) expressRouteCircuitPeeringListResultPreparer(ctx context.Context) (*http.Request, error) {
+ if !ercplr.hasNextLink() {
+ return nil, nil
+ }
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(ercplr.NextLink)))
+}
+
+// ExpressRouteCircuitPeeringListResultPage contains a page of ExpressRouteCircuitPeering values.
+type ExpressRouteCircuitPeeringListResultPage struct {
+ fn func(context.Context, ExpressRouteCircuitPeeringListResult) (ExpressRouteCircuitPeeringListResult, error)
+ ercplr ExpressRouteCircuitPeeringListResult
+}
+
+// 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 *ExpressRouteCircuitPeeringListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitPeeringListResultPage.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.ercplr)
+ if err != nil {
+ return err
+ }
+ page.ercplr = 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 *ExpressRouteCircuitPeeringListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page ExpressRouteCircuitPeeringListResultPage) NotDone() bool {
+ return !page.ercplr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page ExpressRouteCircuitPeeringListResultPage) Response() ExpressRouteCircuitPeeringListResult {
+ return page.ercplr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page ExpressRouteCircuitPeeringListResultPage) Values() []ExpressRouteCircuitPeering {
+ if page.ercplr.IsEmpty() {
+ return nil
+ }
+ return *page.ercplr.Value
+}
+
+// Creates a new instance of the ExpressRouteCircuitPeeringListResultPage type.
+func NewExpressRouteCircuitPeeringListResultPage(cur ExpressRouteCircuitPeeringListResult, getNextPage func(context.Context, ExpressRouteCircuitPeeringListResult) (ExpressRouteCircuitPeeringListResult, error)) ExpressRouteCircuitPeeringListResultPage {
+ return ExpressRouteCircuitPeeringListResultPage{
+ fn: getNextPage,
+ ercplr: cur,
+ }
+}
+
+// ExpressRouteCircuitPeeringPropertiesFormat ...
+type ExpressRouteCircuitPeeringPropertiesFormat struct {
+ // PeeringType - The PeeringType. Possible values are: 'AzurePublicPeering', 'AzurePrivatePeering', and 'MicrosoftPeering'. Possible values include: 'AzurePublicPeering', 'AzurePrivatePeering', 'MicrosoftPeering'
+ PeeringType ExpressRouteCircuitPeeringType `json:"peeringType,omitempty"`
+ // State - The state of peering. Possible values are: 'Disabled' and 'Enabled'. Possible values include: 'ExpressRouteCircuitPeeringStateDisabled', 'ExpressRouteCircuitPeeringStateEnabled'
+ State ExpressRouteCircuitPeeringState `json:"state,omitempty"`
+ // AzureASN - The Azure ASN.
+ AzureASN *int32 `json:"azureASN,omitempty"`
+ // PeerASN - The peer ASN.
+ PeerASN *int64 `json:"peerASN,omitempty"`
+ // PrimaryPeerAddressPrefix - The primary address prefix.
+ PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"`
+ // SecondaryPeerAddressPrefix - The secondary address prefix.
+ SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"`
+ // PrimaryAzurePort - The primary port.
+ PrimaryAzurePort *string `json:"primaryAzurePort,omitempty"`
+ // SecondaryAzurePort - The secondary port.
+ SecondaryAzurePort *string `json:"secondaryAzurePort,omitempty"`
+ // SharedKey - The shared key.
+ SharedKey *string `json:"sharedKey,omitempty"`
+ // VlanID - The VLAN ID.
+ VlanID *int32 `json:"vlanId,omitempty"`
+ // MicrosoftPeeringConfig - The Microsoft peering configuration.
+ MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"`
+ // Stats - Gets peering stats.
+ Stats *ExpressRouteCircuitStats `json:"stats,omitempty"`
+ // ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+ // GatewayManagerEtag - The GatewayManager Etag.
+ GatewayManagerEtag *string `json:"gatewayManagerEtag,omitempty"`
+ // LastModifiedBy - Gets whether the provider or the customer last modified the peering.
+ LastModifiedBy *string `json:"lastModifiedBy,omitempty"`
+ // RouteFilter - The reference of the RouteFilter resource.
+ RouteFilter *RouteFilter `json:"routeFilter,omitempty"`
+ // Ipv6PeeringConfig - The IPv6 peering configuration.
+ Ipv6PeeringConfig *Ipv6ExpressRouteCircuitPeeringConfig `json:"ipv6PeeringConfig,omitempty"`
+}
+
+// ExpressRouteCircuitPeeringsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results
+// of a long-running operation.
+type ExpressRouteCircuitPeeringsCreateOrUpdateFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(ExpressRouteCircuitPeeringsClient) (ExpressRouteCircuitPeering, error)
+}
+
+// ExpressRouteCircuitPeeringsDeleteFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type ExpressRouteCircuitPeeringsDeleteFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(ExpressRouteCircuitPeeringsClient) (autorest.Response, error)
+}
+
+// ExpressRouteCircuitPropertiesFormat properties of ExpressRouteCircuit.
+type ExpressRouteCircuitPropertiesFormat struct {
+ // AllowClassicOperations - Allow classic operations
+ AllowClassicOperations *bool `json:"allowClassicOperations,omitempty"`
+ // CircuitProvisioningState - The CircuitProvisioningState state of the resource.
+ CircuitProvisioningState *string `json:"circuitProvisioningState,omitempty"`
+ // ServiceProviderProvisioningState - The ServiceProviderProvisioningState state of the resource. Possible values are 'NotProvisioned', 'Provisioning', 'Provisioned', and 'Deprovisioning'. Possible values include: 'NotProvisioned', 'Provisioning', 'Provisioned', 'Deprovisioning'
+ ServiceProviderProvisioningState ServiceProviderProvisioningState `json:"serviceProviderProvisioningState,omitempty"`
+ // Authorizations - The list of authorizations.
+ Authorizations *[]ExpressRouteCircuitAuthorization `json:"authorizations,omitempty"`
+ // Peerings - The list of peerings.
+ Peerings *[]ExpressRouteCircuitPeering `json:"peerings,omitempty"`
+ // ServiceKey - The ServiceKey.
+ ServiceKey *string `json:"serviceKey,omitempty"`
+ // ServiceProviderNotes - The ServiceProviderNotes.
+ ServiceProviderNotes *string `json:"serviceProviderNotes,omitempty"`
+ // ServiceProviderProperties - The ServiceProviderProperties.
+ ServiceProviderProperties *ExpressRouteCircuitServiceProviderProperties `json:"serviceProviderProperties,omitempty"`
+ // ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+ // GatewayManagerEtag - The GatewayManager Etag.
+ GatewayManagerEtag *string `json:"gatewayManagerEtag,omitempty"`
+}
+
+// ExpressRouteCircuitRoutesTable the routes table associated with the ExpressRouteCircuit
+type ExpressRouteCircuitRoutesTable struct {
+ // NetworkProperty - network
+ NetworkProperty *string `json:"network,omitempty"`
+ // NextHop - nextHop
+ NextHop *string `json:"nextHop,omitempty"`
+ // LocPrf - locPrf
+ LocPrf *string `json:"locPrf,omitempty"`
+ // Weight - weight.
+ Weight *int32 `json:"weight,omitempty"`
+ // Path - path
+ Path *string `json:"path,omitempty"`
+}
+
+// ExpressRouteCircuitRoutesTableSummary the routes table associated with the ExpressRouteCircuit.
+type ExpressRouteCircuitRoutesTableSummary struct {
+ // Neighbor - Neighbor
+ Neighbor *string `json:"neighbor,omitempty"`
+ // V - BGP version number spoken to the neighbor.
+ V *int32 `json:"v,omitempty"`
+ // As - Autonomous system number.
+ As *int32 `json:"as,omitempty"`
+ // UpDown - The length of time that the BGP session has been in the Established state, or the current status if not in the Established state.
+ UpDown *string `json:"upDown,omitempty"`
+ // StatePfxRcd - Current state of the BGP session, and the number of prefixes that have been received from a neighbor or peer group.
+ StatePfxRcd *string `json:"statePfxRcd,omitempty"`
+}
+
+// ExpressRouteCircuitsArpTableListResult response for ListArpTable associated with the Express Route
+// Circuits API.
+type ExpressRouteCircuitsArpTableListResult struct {
+ autorest.Response `json:"-"`
+ // Value - Gets list of the ARP table.
+ Value *[]ExpressRouteCircuitArpTable `json:"value,omitempty"`
+ // NextLink - The URL to get the next set of results.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// ExpressRouteCircuitsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type ExpressRouteCircuitsCreateOrUpdateFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuit, error)
+}
+
+// ExpressRouteCircuitsDeleteFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type ExpressRouteCircuitsDeleteFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(ExpressRouteCircuitsClient) (autorest.Response, error)
+}
+
+// ExpressRouteCircuitServiceProviderProperties contains ServiceProviderProperties in an
+// ExpressRouteCircuit.
+type ExpressRouteCircuitServiceProviderProperties struct {
+ // ServiceProviderName - The serviceProviderName.
+ ServiceProviderName *string `json:"serviceProviderName,omitempty"`
+ // PeeringLocation - The peering location.
+ PeeringLocation *string `json:"peeringLocation,omitempty"`
+ // BandwidthInMbps - The BandwidthInMbps.
+ BandwidthInMbps *int32 `json:"bandwidthInMbps,omitempty"`
+}
+
+// ExpressRouteCircuitSku contains SKU in an ExpressRouteCircuit.
+type ExpressRouteCircuitSku struct {
+ // Name - The name of the SKU.
+ Name *string `json:"name,omitempty"`
+ // Tier - The tier of the SKU. Possible values are 'Standard' and 'Premium'. Possible values include: 'ExpressRouteCircuitSkuTierStandard', 'ExpressRouteCircuitSkuTierPremium'
+ Tier ExpressRouteCircuitSkuTier `json:"tier,omitempty"`
+ // Family - The family of the SKU. Possible values are: 'UnlimitedData' and 'MeteredData'. Possible values include: 'UnlimitedData', 'MeteredData'
+ Family ExpressRouteCircuitSkuFamily `json:"family,omitempty"`
+}
+
+// ExpressRouteCircuitsListArpTableFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type ExpressRouteCircuitsListArpTableFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuitsArpTableListResult, error)
+}
+
+// ExpressRouteCircuitsListRoutesTableFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type ExpressRouteCircuitsListRoutesTableFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuitsRoutesTableListResult, error)
+}
+
+// ExpressRouteCircuitsListRoutesTableSummaryFuture an abstraction for monitoring and retrieving the
+// results of a long-running operation.
+type ExpressRouteCircuitsListRoutesTableSummaryFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuitsRoutesTableSummaryListResult, error)
+}
+
+// ExpressRouteCircuitsRoutesTableListResult response for ListRoutesTable associated with the Express Route
+// Circuits API.
+type ExpressRouteCircuitsRoutesTableListResult struct {
+ autorest.Response `json:"-"`
+ // Value - The list of routes table.
+ Value *[]ExpressRouteCircuitRoutesTable `json:"value,omitempty"`
+ // NextLink - The URL to get the next set of results.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// ExpressRouteCircuitsRoutesTableSummaryListResult response for ListRoutesTable associated with the
+// Express Route Circuits API.
+type ExpressRouteCircuitsRoutesTableSummaryListResult struct {
+ autorest.Response `json:"-"`
+ // Value - A list of the routes table.
+ Value *[]ExpressRouteCircuitRoutesTableSummary `json:"value,omitempty"`
+ // NextLink - The URL to get the next set of results.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// ExpressRouteCircuitStats contains stats associated with the peering.
+type ExpressRouteCircuitStats struct {
+ autorest.Response `json:"-"`
+ // PrimarybytesIn - Gets BytesIn of the peering.
+ PrimarybytesIn *int64 `json:"primarybytesIn,omitempty"`
+ // PrimarybytesOut - Gets BytesOut of the peering.
+ PrimarybytesOut *int64 `json:"primarybytesOut,omitempty"`
+ // SecondarybytesIn - Gets BytesIn of the peering.
+ SecondarybytesIn *int64 `json:"secondarybytesIn,omitempty"`
+ // SecondarybytesOut - Gets BytesOut of the peering.
+ SecondarybytesOut *int64 `json:"secondarybytesOut,omitempty"`
+}
+
+// ExpressRouteCircuitsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type ExpressRouteCircuitsUpdateTagsFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuit, error)
+}
+
+// ExpressRouteServiceProvider a ExpressRouteResourceProvider object.
+type ExpressRouteServiceProvider struct {
+ *ExpressRouteServiceProviderPropertiesFormat `json:"properties,omitempty"`
+ // ID - 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 ExpressRouteServiceProvider.
+func (ersp ExpressRouteServiceProvider) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if ersp.ExpressRouteServiceProviderPropertiesFormat != nil {
+ objectMap["properties"] = ersp.ExpressRouteServiceProviderPropertiesFormat
+ }
+ if ersp.ID != nil {
+ objectMap["id"] = ersp.ID
+ }
+ if ersp.Location != nil {
+ objectMap["location"] = ersp.Location
+ }
+ if ersp.Tags != nil {
+ objectMap["tags"] = ersp.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for ExpressRouteServiceProvider struct.
+func (ersp *ExpressRouteServiceProvider) 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 expressRouteServiceProviderPropertiesFormat ExpressRouteServiceProviderPropertiesFormat
+ err = json.Unmarshal(*v, &expressRouteServiceProviderPropertiesFormat)
+ if err != nil {
+ return err
+ }
+ ersp.ExpressRouteServiceProviderPropertiesFormat = &expressRouteServiceProviderPropertiesFormat
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ ersp.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ ersp.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ ersp.Type = &typeVar
+ }
+ case "location":
+ if v != nil {
+ var location string
+ err = json.Unmarshal(*v, &location)
+ if err != nil {
+ return err
+ }
+ ersp.Location = &location
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ ersp.Tags = tags
+ }
+ }
+ }
+
+ return nil
+}
+
+// ExpressRouteServiceProviderBandwidthsOffered contains bandwidths offered in ExpressRouteServiceProvider
+// resources.
+type ExpressRouteServiceProviderBandwidthsOffered struct {
+ // OfferName - The OfferName.
+ OfferName *string `json:"offerName,omitempty"`
+ // ValueInMbps - The ValueInMbps.
+ ValueInMbps *int32 `json:"valueInMbps,omitempty"`
+}
+
+// ExpressRouteServiceProviderListResult response for the ListExpressRouteServiceProvider API service call.
+type ExpressRouteServiceProviderListResult struct {
+ autorest.Response `json:"-"`
+ // Value - A list of ExpressRouteResourceProvider resources.
+ Value *[]ExpressRouteServiceProvider `json:"value,omitempty"`
+ // NextLink - The URL to get the next set of results.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// ExpressRouteServiceProviderListResultIterator provides access to a complete listing of
+// ExpressRouteServiceProvider values.
+type ExpressRouteServiceProviderListResultIterator struct {
+ i int
+ page ExpressRouteServiceProviderListResultPage
+}
+
+// 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 *ExpressRouteServiceProviderListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteServiceProviderListResultIterator.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 *ExpressRouteServiceProviderListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter ExpressRouteServiceProviderListResultIterator) 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 ExpressRouteServiceProviderListResultIterator) Response() ExpressRouteServiceProviderListResult {
+ 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 ExpressRouteServiceProviderListResultIterator) Value() ExpressRouteServiceProvider {
+ if !iter.page.NotDone() {
+ return ExpressRouteServiceProvider{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// Creates a new instance of the ExpressRouteServiceProviderListResultIterator type.
+func NewExpressRouteServiceProviderListResultIterator(page ExpressRouteServiceProviderListResultPage) ExpressRouteServiceProviderListResultIterator {
+ return ExpressRouteServiceProviderListResultIterator{page: page}
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (ersplr ExpressRouteServiceProviderListResult) IsEmpty() bool {
+ return ersplr.Value == nil || len(*ersplr.Value) == 0
+}
+
+// hasNextLink returns true if the NextLink is not empty.
+func (ersplr ExpressRouteServiceProviderListResult) hasNextLink() bool {
+ return ersplr.NextLink != nil && len(*ersplr.NextLink) != 0
+}
+
+// expressRouteServiceProviderListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (ersplr ExpressRouteServiceProviderListResult) expressRouteServiceProviderListResultPreparer(ctx context.Context) (*http.Request, error) {
+ if !ersplr.hasNextLink() {
+ return nil, nil
+ }
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(ersplr.NextLink)))
+}
+
+// ExpressRouteServiceProviderListResultPage contains a page of ExpressRouteServiceProvider values.
+type ExpressRouteServiceProviderListResultPage struct {
+ fn func(context.Context, ExpressRouteServiceProviderListResult) (ExpressRouteServiceProviderListResult, error)
+ ersplr ExpressRouteServiceProviderListResult
+}
+
+// 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 *ExpressRouteServiceProviderListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteServiceProviderListResultPage.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.ersplr)
+ if err != nil {
+ return err
+ }
+ page.ersplr = 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 *ExpressRouteServiceProviderListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page ExpressRouteServiceProviderListResultPage) NotDone() bool {
+ return !page.ersplr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page ExpressRouteServiceProviderListResultPage) Response() ExpressRouteServiceProviderListResult {
+ return page.ersplr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page ExpressRouteServiceProviderListResultPage) Values() []ExpressRouteServiceProvider {
+ if page.ersplr.IsEmpty() {
+ return nil
+ }
+ return *page.ersplr.Value
+}
+
+// Creates a new instance of the ExpressRouteServiceProviderListResultPage type.
+func NewExpressRouteServiceProviderListResultPage(cur ExpressRouteServiceProviderListResult, getNextPage func(context.Context, ExpressRouteServiceProviderListResult) (ExpressRouteServiceProviderListResult, error)) ExpressRouteServiceProviderListResultPage {
+ return ExpressRouteServiceProviderListResultPage{
+ fn: getNextPage,
+ ersplr: cur,
+ }
+}
+
+// ExpressRouteServiceProviderPropertiesFormat properties of ExpressRouteServiceProvider.
+type ExpressRouteServiceProviderPropertiesFormat struct {
+ // PeeringLocations - Get a list of peering locations.
+ PeeringLocations *[]string `json:"peeringLocations,omitempty"`
+ // BandwidthsOffered - Gets bandwidths offered.
+ BandwidthsOffered *[]ExpressRouteServiceProviderBandwidthsOffered `json:"bandwidthsOffered,omitempty"`
+ // ProvisioningState - Gets the provisioning state of the resource.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+}
+
+// FlowLogInformation information on the configuration of flow log.
+type FlowLogInformation struct {
+ autorest.Response `json:"-"`
+ // TargetResourceID - The ID of the resource to configure for flow logging.
+ TargetResourceID *string `json:"targetResourceId,omitempty"`
+ *FlowLogProperties `json:"properties,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for FlowLogInformation.
+func (fli FlowLogInformation) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if fli.TargetResourceID != nil {
+ objectMap["targetResourceId"] = fli.TargetResourceID
+ }
+ if fli.FlowLogProperties != nil {
+ objectMap["properties"] = fli.FlowLogProperties
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for FlowLogInformation struct.
+func (fli *FlowLogInformation) 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 "targetResourceId":
+ if v != nil {
+ var targetResourceID string
+ err = json.Unmarshal(*v, &targetResourceID)
+ if err != nil {
+ return err
+ }
+ fli.TargetResourceID = &targetResourceID
+ }
+ case "properties":
+ if v != nil {
+ var flowLogProperties FlowLogProperties
+ err = json.Unmarshal(*v, &flowLogProperties)
+ if err != nil {
+ return err
+ }
+ fli.FlowLogProperties = &flowLogProperties
+ }
+ }
+ }
+
+ return nil
+}
+
+// FlowLogProperties parameters that define the configuration of flow log.
+type FlowLogProperties struct {
+ // StorageID - ID of the storage account which is used to store the flow log.
+ StorageID *string `json:"storageId,omitempty"`
+ // Enabled - Flag to enable/disable flow logging.
+ Enabled *bool `json:"enabled,omitempty"`
+ RetentionPolicy *RetentionPolicyParameters `json:"retentionPolicy,omitempty"`
+}
+
+// FlowLogStatusParameters parameters that define a resource to query flow log status.
+type FlowLogStatusParameters struct {
+ // TargetResourceID - The target resource where getting the flow logging status.
+ TargetResourceID *string `json:"targetResourceId,omitempty"`
+}
+
+// FrontendIPConfiguration frontend IP address of the load balancer.
+type FrontendIPConfiguration struct {
+ autorest.Response `json:"-"`
+ // FrontendIPConfigurationPropertiesFormat - Properties of the load balancer probe.
+ *FrontendIPConfigurationPropertiesFormat `json:"properties,omitempty"`
+ // Name - 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"`
+ // Etag - A unique read-only string that changes whenever the resource is updated.
+ Etag *string `json:"etag,omitempty"`
+ // Zones - A list of availability zones denoting the IP allocated for the resource needs to come from.
+ Zones *[]string `json:"zones,omitempty"`
+ // ID - Resource ID.
+ ID *string `json:"id,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for FrontendIPConfiguration.
+func (fic FrontendIPConfiguration) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if fic.FrontendIPConfigurationPropertiesFormat != nil {
+ objectMap["properties"] = fic.FrontendIPConfigurationPropertiesFormat
+ }
+ if fic.Name != nil {
+ objectMap["name"] = fic.Name
+ }
+ if fic.Etag != nil {
+ objectMap["etag"] = fic.Etag
+ }
+ if fic.Zones != nil {
+ objectMap["zones"] = fic.Zones
+ }
+ if fic.ID != nil {
+ objectMap["id"] = fic.ID
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for FrontendIPConfiguration struct.
+func (fic *FrontendIPConfiguration) 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 frontendIPConfigurationPropertiesFormat FrontendIPConfigurationPropertiesFormat
+ err = json.Unmarshal(*v, &frontendIPConfigurationPropertiesFormat)
+ if err != nil {
+ return err
+ }
+ fic.FrontendIPConfigurationPropertiesFormat = &frontendIPConfigurationPropertiesFormat
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ fic.Name = &name
+ }
+ case "etag":
+ if v != nil {
+ var etag string
+ err = json.Unmarshal(*v, &etag)
+ if err != nil {
+ return err
+ }
+ fic.Etag = &etag
+ }
+ case "zones":
+ if v != nil {
+ var zones []string
+ err = json.Unmarshal(*v, &zones)
+ if err != nil {
+ return err
+ }
+ fic.Zones = &zones
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ fic.ID = &ID
+ }
+ }
+ }
+
+ return nil
+}
+
+// FrontendIPConfigurationPropertiesFormat properties of Frontend IP Configuration of the load balancer.
+type FrontendIPConfigurationPropertiesFormat struct {
+ // InboundNatRules - READ-ONLY; Read only. Inbound rules URIs that use this frontend IP.
+ InboundNatRules *[]SubResource `json:"inboundNatRules,omitempty"`
+ // InboundNatPools - READ-ONLY; Read only. Inbound pools URIs that use this frontend IP.
+ InboundNatPools *[]SubResource `json:"inboundNatPools,omitempty"`
+ // OutboundNatRules - READ-ONLY; Read only. Outbound rules URIs that use this frontend IP.
+ OutboundNatRules *[]SubResource `json:"outboundNatRules,omitempty"`
+ // LoadBalancingRules - READ-ONLY; Gets load balancing rules URIs that use this frontend IP.
+ LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"`
+ // PrivateIPAddress - The private IP address of the IP configuration.
+ PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
+ // PrivateIPAllocationMethod - The Private IP allocation method. Possible values are: 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic'
+ PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
+ // Subnet - The reference of the subnet resource.
+ Subnet *Subnet `json:"subnet,omitempty"`
+ // PublicIPAddress - The reference of the Public IP resource.
+ PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"`
+ // ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for FrontendIPConfigurationPropertiesFormat.
+func (ficpf FrontendIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if ficpf.PrivateIPAddress != nil {
+ objectMap["privateIPAddress"] = ficpf.PrivateIPAddress
+ }
+ if ficpf.PrivateIPAllocationMethod != "" {
+ objectMap["privateIPAllocationMethod"] = ficpf.PrivateIPAllocationMethod
+ }
+ if ficpf.Subnet != nil {
+ objectMap["subnet"] = ficpf.Subnet
+ }
+ if ficpf.PublicIPAddress != nil {
+ objectMap["publicIPAddress"] = ficpf.PublicIPAddress
+ }
+ if ficpf.ProvisioningState != nil {
+ objectMap["provisioningState"] = ficpf.ProvisioningState
+ }
+ return json.Marshal(objectMap)
+}
+
+// GatewayRoute gateway routing details
+type GatewayRoute struct {
+ // LocalAddress - READ-ONLY; The gateway's local address
+ LocalAddress *string `json:"localAddress,omitempty"`
+ // NetworkProperty - READ-ONLY; The route's network prefix
+ NetworkProperty *string `json:"network,omitempty"`
+ // NextHop - READ-ONLY; The route's next hop
+ NextHop *string `json:"nextHop,omitempty"`
+ // SourcePeer - READ-ONLY; The peer this route was learned from
+ SourcePeer *string `json:"sourcePeer,omitempty"`
+ // Origin - READ-ONLY; The source this route was learned from
+ Origin *string `json:"origin,omitempty"`
+ // AsPath - READ-ONLY; The route's AS path sequence
+ AsPath *string `json:"asPath,omitempty"`
+ // Weight - READ-ONLY; The route's weight
+ Weight *int32 `json:"weight,omitempty"`
+}
+
+// GatewayRouteListResult list of virtual network gateway routes
+type GatewayRouteListResult struct {
+ autorest.Response `json:"-"`
+ // Value - List of gateway routes
+ Value *[]GatewayRoute `json:"value,omitempty"`
+}
+
+// InboundNatPool inbound NAT pool of the load balancer.
+type InboundNatPool struct {
+ // InboundNatPoolPropertiesFormat - Properties of load balancer inbound nat pool.
+ *InboundNatPoolPropertiesFormat `json:"properties,omitempty"`
+ // Name - 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"`
+ // Etag - A unique read-only string that changes whenever the resource is updated.
+ Etag *string `json:"etag,omitempty"`
+ // ID - Resource ID.
+ ID *string `json:"id,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for InboundNatPool.
+func (inp InboundNatPool) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if inp.InboundNatPoolPropertiesFormat != nil {
+ objectMap["properties"] = inp.InboundNatPoolPropertiesFormat
+ }
+ if inp.Name != nil {
+ objectMap["name"] = inp.Name
+ }
+ if inp.Etag != nil {
+ objectMap["etag"] = inp.Etag
+ }
+ if inp.ID != nil {
+ objectMap["id"] = inp.ID
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for InboundNatPool struct.
+func (inp *InboundNatPool) 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 inboundNatPoolPropertiesFormat InboundNatPoolPropertiesFormat
+ err = json.Unmarshal(*v, &inboundNatPoolPropertiesFormat)
+ if err != nil {
+ return err
+ }
+ inp.InboundNatPoolPropertiesFormat = &inboundNatPoolPropertiesFormat
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ inp.Name = &name
+ }
+ case "etag":
+ if v != nil {
+ var etag string
+ err = json.Unmarshal(*v, &etag)
+ if err != nil {
+ return err
+ }
+ inp.Etag = &etag
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ inp.ID = &ID
+ }
+ }
+ }
+
+ return nil
+}
+
+// InboundNatPoolPropertiesFormat properties of Inbound NAT pool.
+type InboundNatPoolPropertiesFormat struct {
+ // FrontendIPConfiguration - A reference to frontend IP addresses.
+ FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"`
+ // Protocol - Possible values include: 'TransportProtocolUDP', 'TransportProtocolTCP', 'TransportProtocolAll'
+ Protocol TransportProtocol `json:"protocol,omitempty"`
+ // FrontendPortRangeStart - The first port number in the range of external ports that will be used to provide Inbound Nat to NICs associated with a load balancer. Acceptable values range between 1 and 65534.
+ FrontendPortRangeStart *int32 `json:"frontendPortRangeStart,omitempty"`
+ // FrontendPortRangeEnd - The last port number in the range of external ports that will be used to provide Inbound Nat to NICs associated with a load balancer. Acceptable values range between 1 and 65535.
+ FrontendPortRangeEnd *int32 `json:"frontendPortRangeEnd,omitempty"`
+ // BackendPort - The port used for internal connections on the endpoint. Acceptable values are between 1 and 65535.
+ BackendPort *int32 `json:"backendPort,omitempty"`
+ // ProvisioningState - Gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+}
+
+// InboundNatRule inbound NAT rule of the load balancer.
+type InboundNatRule struct {
+ autorest.Response `json:"-"`
+ // InboundNatRulePropertiesFormat - Properties of load balancer inbound nat rule.
+ *InboundNatRulePropertiesFormat `json:"properties,omitempty"`
+ // Name - Gets 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"`
+ // Etag - A unique read-only string that changes whenever the resource is updated.
+ Etag *string `json:"etag,omitempty"`
+ // ID - Resource ID.
+ ID *string `json:"id,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for InboundNatRule.
+func (inr InboundNatRule) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if inr.InboundNatRulePropertiesFormat != nil {
+ objectMap["properties"] = inr.InboundNatRulePropertiesFormat
+ }
+ if inr.Name != nil {
+ objectMap["name"] = inr.Name
+ }
+ if inr.Etag != nil {
+ objectMap["etag"] = inr.Etag
+ }
+ if inr.ID != nil {
+ objectMap["id"] = inr.ID
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for InboundNatRule struct.
+func (inr *InboundNatRule) 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 inboundNatRulePropertiesFormat InboundNatRulePropertiesFormat
+ err = json.Unmarshal(*v, &inboundNatRulePropertiesFormat)
+ if err != nil {
+ return err
+ }
+ inr.InboundNatRulePropertiesFormat = &inboundNatRulePropertiesFormat
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ inr.Name = &name
+ }
+ case "etag":
+ if v != nil {
+ var etag string
+ err = json.Unmarshal(*v, &etag)
+ if err != nil {
+ return err
+ }
+ inr.Etag = &etag
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ inr.ID = &ID
+ }
+ }
+ }
+
+ return nil
+}
+
+// InboundNatRuleListResult response for ListInboundNatRule API service call.
+type InboundNatRuleListResult struct {
+ autorest.Response `json:"-"`
+ // Value - A list of inbound nat rules in a load balancer.
+ Value *[]InboundNatRule `json:"value,omitempty"`
+ // NextLink - READ-ONLY; The URL to get the next set of results.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for InboundNatRuleListResult.
+func (inrlr InboundNatRuleListResult) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if inrlr.Value != nil {
+ objectMap["value"] = inrlr.Value
+ }
+ return json.Marshal(objectMap)
+}
+
+// InboundNatRuleListResultIterator provides access to a complete listing of InboundNatRule values.
+type InboundNatRuleListResultIterator struct {
+ i int
+ page InboundNatRuleListResultPage
+}
+
+// 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 *InboundNatRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/InboundNatRuleListResultIterator.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 *InboundNatRuleListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter InboundNatRuleListResultIterator) 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 InboundNatRuleListResultIterator) Response() InboundNatRuleListResult {
+ 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 InboundNatRuleListResultIterator) Value() InboundNatRule {
+ if !iter.page.NotDone() {
+ return InboundNatRule{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// Creates a new instance of the InboundNatRuleListResultIterator type.
+func NewInboundNatRuleListResultIterator(page InboundNatRuleListResultPage) InboundNatRuleListResultIterator {
+ return InboundNatRuleListResultIterator{page: page}
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (inrlr InboundNatRuleListResult) IsEmpty() bool {
+ return inrlr.Value == nil || len(*inrlr.Value) == 0
+}
+
+// hasNextLink returns true if the NextLink is not empty.
+func (inrlr InboundNatRuleListResult) hasNextLink() bool {
+ return inrlr.NextLink != nil && len(*inrlr.NextLink) != 0
+}
+
+// inboundNatRuleListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (inrlr InboundNatRuleListResult) inboundNatRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
+ if !inrlr.hasNextLink() {
+ return nil, nil
+ }
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(inrlr.NextLink)))
+}
+
+// InboundNatRuleListResultPage contains a page of InboundNatRule values.
+type InboundNatRuleListResultPage struct {
+ fn func(context.Context, InboundNatRuleListResult) (InboundNatRuleListResult, error)
+ inrlr InboundNatRuleListResult
+}
+
+// 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 *InboundNatRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/InboundNatRuleListResultPage.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.inrlr)
+ if err != nil {
+ return err
+ }
+ page.inrlr = 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 *InboundNatRuleListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page InboundNatRuleListResultPage) NotDone() bool {
+ return !page.inrlr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page InboundNatRuleListResultPage) Response() InboundNatRuleListResult {
+ return page.inrlr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page InboundNatRuleListResultPage) Values() []InboundNatRule {
+ if page.inrlr.IsEmpty() {
+ return nil
+ }
+ return *page.inrlr.Value
+}
+
+// Creates a new instance of the InboundNatRuleListResultPage type.
+func NewInboundNatRuleListResultPage(cur InboundNatRuleListResult, getNextPage func(context.Context, InboundNatRuleListResult) (InboundNatRuleListResult, error)) InboundNatRuleListResultPage {
+ return InboundNatRuleListResultPage{
+ fn: getNextPage,
+ inrlr: cur,
+ }
+}
+
+// InboundNatRulePropertiesFormat properties of the inbound NAT rule.
+type InboundNatRulePropertiesFormat struct {
+ // FrontendIPConfiguration - A reference to frontend IP addresses.
+ FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"`
+ // BackendIPConfiguration - READ-ONLY; A reference to a private IP address defined on a network interface of a VM. Traffic sent to the frontend port of each of the frontend IP configurations is forwarded to the backend IP.
+ BackendIPConfiguration *InterfaceIPConfiguration `json:"backendIPConfiguration,omitempty"`
+ // Protocol - Possible values include: 'TransportProtocolUDP', 'TransportProtocolTCP', 'TransportProtocolAll'
+ Protocol TransportProtocol `json:"protocol,omitempty"`
+ // FrontendPort - The port for the external endpoint. Port numbers for each rule must be unique within the Load Balancer. Acceptable values range from 1 to 65534.
+ FrontendPort *int32 `json:"frontendPort,omitempty"`
+ // BackendPort - The port used for the internal endpoint. Acceptable values range from 1 to 65535.
+ BackendPort *int32 `json:"backendPort,omitempty"`
+ // IdleTimeoutInMinutes - The timeout for the TCP idle connection. The value can be set between 4 and 30 minutes. The default value is 4 minutes. This element is only used when the protocol is set to TCP.
+ IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
+ // EnableFloatingIP - Configures a virtual machine's endpoint for the floating IP capability required to configure a SQL AlwaysOn Availability Group. This setting is required when using the SQL AlwaysOn Availability Groups in SQL server. This setting can't be changed after you create the endpoint.
+ EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"`
+ // ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for InboundNatRulePropertiesFormat.
+func (inrpf InboundNatRulePropertiesFormat) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if inrpf.FrontendIPConfiguration != nil {
+ objectMap["frontendIPConfiguration"] = inrpf.FrontendIPConfiguration
+ }
+ if inrpf.Protocol != "" {
+ objectMap["protocol"] = inrpf.Protocol
+ }
+ if inrpf.FrontendPort != nil {
+ objectMap["frontendPort"] = inrpf.FrontendPort
+ }
+ if inrpf.BackendPort != nil {
+ objectMap["backendPort"] = inrpf.BackendPort
+ }
+ if inrpf.IdleTimeoutInMinutes != nil {
+ objectMap["idleTimeoutInMinutes"] = inrpf.IdleTimeoutInMinutes
+ }
+ if inrpf.EnableFloatingIP != nil {
+ objectMap["enableFloatingIP"] = inrpf.EnableFloatingIP
+ }
+ if inrpf.ProvisioningState != nil {
+ objectMap["provisioningState"] = inrpf.ProvisioningState
+ }
+ return json.Marshal(objectMap)
+}
+
+// InboundNatRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type InboundNatRulesCreateOrUpdateFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(InboundNatRulesClient) (InboundNatRule, error)
+}
+
+// InboundNatRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type InboundNatRulesDeleteFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(InboundNatRulesClient) (autorest.Response, error)
+}
+
+// Interface a network interface in a resource group.
+type Interface struct {
+ autorest.Response `json:"-"`
+ // InterfacePropertiesFormat - Properties of the network interface.
+ *InterfacePropertiesFormat `json:"properties,omitempty"`
+ // Etag - A unique read-only string that changes whenever the resource is updated.
+ Etag *string `json:"etag,omitempty"`
+ // ID - 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 Interface.
+func (i Interface) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if i.InterfacePropertiesFormat != nil {
+ objectMap["properties"] = i.InterfacePropertiesFormat
+ }
+ if i.Etag != nil {
+ objectMap["etag"] = i.Etag
+ }
+ if i.ID != nil {
+ objectMap["id"] = i.ID
+ }
+ 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 Interface struct.
+func (i *Interface) 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 interfacePropertiesFormat InterfacePropertiesFormat
+ err = json.Unmarshal(*v, &interfacePropertiesFormat)
+ if err != nil {
+ return err
+ }
+ i.InterfacePropertiesFormat = &interfacePropertiesFormat
+ }
+ case "etag":
+ if v != nil {
+ var etag string
+ err = json.Unmarshal(*v, &etag)
+ if err != nil {
+ return err
+ }
+ i.Etag = &etag
+ }
+ 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
+}
+
+// InterfaceAssociation network interface and its custom security rules.
+type InterfaceAssociation struct {
+ // ID - READ-ONLY; Network interface ID.
+ ID *string `json:"id,omitempty"`
+ // SecurityRules - Collection of custom security rules.
+ SecurityRules *[]SecurityRule `json:"securityRules,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for InterfaceAssociation.
+func (ia InterfaceAssociation) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if ia.SecurityRules != nil {
+ objectMap["securityRules"] = ia.SecurityRules
+ }
+ return json.Marshal(objectMap)
+}
+
+// InterfaceDNSSettings DNS settings of a network interface.
+type InterfaceDNSSettings struct {
+ // DNSServers - List of DNS servers IP addresses. Use 'AzureProvidedDNS' to switch to azure provided DNS resolution. 'AzureProvidedDNS' value cannot be combined with other IPs, it must be the only value in dnsServers collection.
+ DNSServers *[]string `json:"dnsServers,omitempty"`
+ // AppliedDNSServers - If the VM that uses this NIC is part of an Availability Set, then this list will have the union of all DNS servers from all NICs that are part of the Availability Set. This property is what is configured on each of those VMs.
+ AppliedDNSServers *[]string `json:"appliedDnsServers,omitempty"`
+ // InternalDNSNameLabel - Relative DNS name for this NIC used for internal communications between VMs in the same virtual network.
+ InternalDNSNameLabel *string `json:"internalDnsNameLabel,omitempty"`
+ // InternalFqdn - Fully qualified DNS name supporting internal communications between VMs in the same virtual network.
+ InternalFqdn *string `json:"internalFqdn,omitempty"`
+ // InternalDomainNameSuffix - Even if internalDnsNameLabel is not specified, a DNS entry is created for the primary NIC of the VM. This DNS name can be constructed by concatenating the VM name with the value of internalDomainNameSuffix.
+ InternalDomainNameSuffix *string `json:"internalDomainNameSuffix,omitempty"`
+}
+
+// InterfaceIPConfiguration iPConfiguration in a network interface.
+type InterfaceIPConfiguration struct {
+ autorest.Response `json:"-"`
+ // InterfaceIPConfigurationPropertiesFormat - Network interface IP configuration properties.
+ *InterfaceIPConfigurationPropertiesFormat `json:"properties,omitempty"`
+ // Name - 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"`
+ // Etag - A unique read-only string that changes whenever the resource is updated.
+ Etag *string `json:"etag,omitempty"`
+ // ID - Resource ID.
+ ID *string `json:"id,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for InterfaceIPConfiguration.
+func (iic InterfaceIPConfiguration) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if iic.InterfaceIPConfigurationPropertiesFormat != nil {
+ objectMap["properties"] = iic.InterfaceIPConfigurationPropertiesFormat
+ }
+ if iic.Name != nil {
+ objectMap["name"] = iic.Name
+ }
+ if iic.Etag != nil {
+ objectMap["etag"] = iic.Etag
+ }
+ if iic.ID != nil {
+ objectMap["id"] = iic.ID
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for InterfaceIPConfiguration struct.
+func (iic *InterfaceIPConfiguration) 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 interfaceIPConfigurationPropertiesFormat InterfaceIPConfigurationPropertiesFormat
+ err = json.Unmarshal(*v, &interfaceIPConfigurationPropertiesFormat)
+ if err != nil {
+ return err
+ }
+ iic.InterfaceIPConfigurationPropertiesFormat = &interfaceIPConfigurationPropertiesFormat
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ iic.Name = &name
+ }
+ case "etag":
+ if v != nil {
+ var etag string
+ err = json.Unmarshal(*v, &etag)
+ if err != nil {
+ return err
+ }
+ iic.Etag = &etag
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ iic.ID = &ID
+ }
+ }
+ }
+
+ return nil
+}
+
+// InterfaceIPConfigurationListResult response for list ip configurations API service call.
+type InterfaceIPConfigurationListResult struct {
+ autorest.Response `json:"-"`
+ // Value - A list of ip configurations.
+ Value *[]InterfaceIPConfiguration `json:"value,omitempty"`
+ // NextLink - READ-ONLY; The URL to get the next set of results.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for InterfaceIPConfigurationListResult.
+func (iiclr InterfaceIPConfigurationListResult) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if iiclr.Value != nil {
+ objectMap["value"] = iiclr.Value
+ }
+ return json.Marshal(objectMap)
+}
+
+// InterfaceIPConfigurationListResultIterator provides access to a complete listing of
+// InterfaceIPConfiguration values.
+type InterfaceIPConfigurationListResultIterator struct {
+ i int
+ page InterfaceIPConfigurationListResultPage
+}
+
+// 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 *InterfaceIPConfigurationListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceIPConfigurationListResultIterator.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 *InterfaceIPConfigurationListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter InterfaceIPConfigurationListResultIterator) 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 InterfaceIPConfigurationListResultIterator) Response() InterfaceIPConfigurationListResult {
+ 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 InterfaceIPConfigurationListResultIterator) Value() InterfaceIPConfiguration {
+ if !iter.page.NotDone() {
+ return InterfaceIPConfiguration{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// Creates a new instance of the InterfaceIPConfigurationListResultIterator type.
+func NewInterfaceIPConfigurationListResultIterator(page InterfaceIPConfigurationListResultPage) InterfaceIPConfigurationListResultIterator {
+ return InterfaceIPConfigurationListResultIterator{page: page}
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (iiclr InterfaceIPConfigurationListResult) IsEmpty() bool {
+ return iiclr.Value == nil || len(*iiclr.Value) == 0
+}
+
+// hasNextLink returns true if the NextLink is not empty.
+func (iiclr InterfaceIPConfigurationListResult) hasNextLink() bool {
+ return iiclr.NextLink != nil && len(*iiclr.NextLink) != 0
+}
+
+// interfaceIPConfigurationListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (iiclr InterfaceIPConfigurationListResult) interfaceIPConfigurationListResultPreparer(ctx context.Context) (*http.Request, error) {
+ if !iiclr.hasNextLink() {
+ return nil, nil
+ }
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(iiclr.NextLink)))
+}
+
+// InterfaceIPConfigurationListResultPage contains a page of InterfaceIPConfiguration values.
+type InterfaceIPConfigurationListResultPage struct {
+ fn func(context.Context, InterfaceIPConfigurationListResult) (InterfaceIPConfigurationListResult, error)
+ iiclr InterfaceIPConfigurationListResult
+}
+
+// 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 *InterfaceIPConfigurationListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceIPConfigurationListResultPage.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.iiclr)
+ if err != nil {
+ return err
+ }
+ page.iiclr = 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 *InterfaceIPConfigurationListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page InterfaceIPConfigurationListResultPage) NotDone() bool {
+ return !page.iiclr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page InterfaceIPConfigurationListResultPage) Response() InterfaceIPConfigurationListResult {
+ return page.iiclr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page InterfaceIPConfigurationListResultPage) Values() []InterfaceIPConfiguration {
+ if page.iiclr.IsEmpty() {
+ return nil
+ }
+ return *page.iiclr.Value
+}
+
+// Creates a new instance of the InterfaceIPConfigurationListResultPage type.
+func NewInterfaceIPConfigurationListResultPage(cur InterfaceIPConfigurationListResult, getNextPage func(context.Context, InterfaceIPConfigurationListResult) (InterfaceIPConfigurationListResult, error)) InterfaceIPConfigurationListResultPage {
+ return InterfaceIPConfigurationListResultPage{
+ fn: getNextPage,
+ iiclr: cur,
+ }
+}
+
+// InterfaceIPConfigurationPropertiesFormat properties of IP configuration.
+type InterfaceIPConfigurationPropertiesFormat struct {
+ // ApplicationGatewayBackendAddressPools - The reference of ApplicationGatewayBackendAddressPool resource.
+ ApplicationGatewayBackendAddressPools *[]ApplicationGatewayBackendAddressPool `json:"applicationGatewayBackendAddressPools,omitempty"`
+ // LoadBalancerBackendAddressPools - The reference of LoadBalancerBackendAddressPool resource.
+ LoadBalancerBackendAddressPools *[]BackendAddressPool `json:"loadBalancerBackendAddressPools,omitempty"`
+ // LoadBalancerInboundNatRules - A list of references of LoadBalancerInboundNatRules.
+ LoadBalancerInboundNatRules *[]InboundNatRule `json:"loadBalancerInboundNatRules,omitempty"`
+ // PrivateIPAddress - Private IP address of the IP configuration.
+ PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
+ // PrivateIPAllocationMethod - Defines how a private IP address is assigned. Possible values are: 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic'
+ PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
+ // PrivateIPAddressVersion - Available from Api-Version 2016-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 IPVersion `json:"privateIPAddressVersion,omitempty"`
+ // Subnet - Subnet bound to the IP configuration.
+ Subnet *Subnet `json:"subnet,omitempty"`
+ // Primary - Gets whether this is a primary customer address on the network interface.
+ Primary *bool `json:"primary,omitempty"`
+ // PublicIPAddress - Public IP address bound to the IP configuration.
+ PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"`
+ // ApplicationSecurityGroups - Application security groups in which the IP configuration is included.
+ ApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"applicationSecurityGroups,omitempty"`
+ // ProvisioningState - The provisioning state of the network interface IP configuration. Possible values are: 'Updating', 'Deleting', and 'Failed'.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+}
+
+// InterfaceListResult response for the ListNetworkInterface API service call.
+type InterfaceListResult struct {
+ autorest.Response `json:"-"`
+ // Value - A list of network interfaces in a resource group.
+ Value *[]Interface `json:"value,omitempty"`
+ // NextLink - READ-ONLY; The URL to get the next set of results.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for InterfaceListResult.
+func (ilr InterfaceListResult) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if ilr.Value != nil {
+ objectMap["value"] = ilr.Value
+ }
+ return json.Marshal(objectMap)
+}
+
+// InterfaceListResultIterator provides access to a complete listing of Interface values.
+type InterfaceListResultIterator struct {
+ i int
+ page InterfaceListResultPage
+}
+
+// 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 *InterfaceListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceListResultIterator.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 *InterfaceListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter InterfaceListResultIterator) 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 InterfaceListResultIterator) Response() InterfaceListResult {
+ 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 InterfaceListResultIterator) Value() Interface {
+ if !iter.page.NotDone() {
+ return Interface{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// Creates a new instance of the InterfaceListResultIterator type.
+func NewInterfaceListResultIterator(page InterfaceListResultPage) InterfaceListResultIterator {
+ return InterfaceListResultIterator{page: page}
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (ilr InterfaceListResult) IsEmpty() bool {
+ return ilr.Value == nil || len(*ilr.Value) == 0
+}
+
+// hasNextLink returns true if the NextLink is not empty.
+func (ilr InterfaceListResult) hasNextLink() bool {
+ return ilr.NextLink != nil && len(*ilr.NextLink) != 0
+}
+
+// interfaceListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (ilr InterfaceListResult) interfaceListResultPreparer(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)))
+}
+
+// InterfaceListResultPage contains a page of Interface values.
+type InterfaceListResultPage struct {
+ fn func(context.Context, InterfaceListResult) (InterfaceListResult, error)
+ ilr InterfaceListResult
+}
+
+// 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 *InterfaceListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceListResultPage.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 *InterfaceListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page InterfaceListResultPage) NotDone() bool {
+ return !page.ilr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page InterfaceListResultPage) Response() InterfaceListResult {
+ return page.ilr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page InterfaceListResultPage) Values() []Interface {
+ if page.ilr.IsEmpty() {
+ return nil
+ }
+ return *page.ilr.Value
+}
+
+// Creates a new instance of the InterfaceListResultPage type.
+func NewInterfaceListResultPage(cur InterfaceListResult, getNextPage func(context.Context, InterfaceListResult) (InterfaceListResult, error)) InterfaceListResultPage {
+ return InterfaceListResultPage{
+ fn: getNextPage,
+ ilr: cur,
+ }
+}
+
+// InterfaceLoadBalancerListResult response for list ip configurations API service call.
+type InterfaceLoadBalancerListResult struct {
+ autorest.Response `json:"-"`
+ // Value - A list of load balancers.
+ Value *[]LoadBalancer `json:"value,omitempty"`
+ // NextLink - READ-ONLY; The URL to get the next set of results.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for InterfaceLoadBalancerListResult.
+func (ilblr InterfaceLoadBalancerListResult) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if ilblr.Value != nil {
+ objectMap["value"] = ilblr.Value
+ }
+ return json.Marshal(objectMap)
+}
+
+// InterfaceLoadBalancerListResultIterator provides access to a complete listing of LoadBalancer values.
+type InterfaceLoadBalancerListResultIterator struct {
+ i int
+ page InterfaceLoadBalancerListResultPage
+}
+
+// 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 *InterfaceLoadBalancerListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceLoadBalancerListResultIterator.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 *InterfaceLoadBalancerListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter InterfaceLoadBalancerListResultIterator) 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 InterfaceLoadBalancerListResultIterator) Response() InterfaceLoadBalancerListResult {
+ 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 InterfaceLoadBalancerListResultIterator) Value() LoadBalancer {
+ if !iter.page.NotDone() {
+ return LoadBalancer{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// Creates a new instance of the InterfaceLoadBalancerListResultIterator type.
+func NewInterfaceLoadBalancerListResultIterator(page InterfaceLoadBalancerListResultPage) InterfaceLoadBalancerListResultIterator {
+ return InterfaceLoadBalancerListResultIterator{page: page}
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (ilblr InterfaceLoadBalancerListResult) IsEmpty() bool {
+ return ilblr.Value == nil || len(*ilblr.Value) == 0
+}
+
+// hasNextLink returns true if the NextLink is not empty.
+func (ilblr InterfaceLoadBalancerListResult) hasNextLink() bool {
+ return ilblr.NextLink != nil && len(*ilblr.NextLink) != 0
+}
+
+// interfaceLoadBalancerListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (ilblr InterfaceLoadBalancerListResult) interfaceLoadBalancerListResultPreparer(ctx context.Context) (*http.Request, error) {
+ if !ilblr.hasNextLink() {
+ return nil, nil
+ }
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(ilblr.NextLink)))
+}
+
+// InterfaceLoadBalancerListResultPage contains a page of LoadBalancer values.
+type InterfaceLoadBalancerListResultPage struct {
+ fn func(context.Context, InterfaceLoadBalancerListResult) (InterfaceLoadBalancerListResult, error)
+ ilblr InterfaceLoadBalancerListResult
+}
+
+// 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 *InterfaceLoadBalancerListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceLoadBalancerListResultPage.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.ilblr)
+ if err != nil {
+ return err
+ }
+ page.ilblr = 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 *InterfaceLoadBalancerListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page InterfaceLoadBalancerListResultPage) NotDone() bool {
+ return !page.ilblr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page InterfaceLoadBalancerListResultPage) Response() InterfaceLoadBalancerListResult {
+ return page.ilblr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page InterfaceLoadBalancerListResultPage) Values() []LoadBalancer {
+ if page.ilblr.IsEmpty() {
+ return nil
+ }
+ return *page.ilblr.Value
+}
+
+// Creates a new instance of the InterfaceLoadBalancerListResultPage type.
+func NewInterfaceLoadBalancerListResultPage(cur InterfaceLoadBalancerListResult, getNextPage func(context.Context, InterfaceLoadBalancerListResult) (InterfaceLoadBalancerListResult, error)) InterfaceLoadBalancerListResultPage {
+ return InterfaceLoadBalancerListResultPage{
+ fn: getNextPage,
+ ilblr: cur,
+ }
+}
+
+// InterfacePropertiesFormat networkInterface properties.
+type InterfacePropertiesFormat struct {
+ // VirtualMachine - The reference of a virtual machine.
+ VirtualMachine *SubResource `json:"virtualMachine,omitempty"`
+ // NetworkSecurityGroup - The reference of the NetworkSecurityGroup resource.
+ NetworkSecurityGroup *SecurityGroup `json:"networkSecurityGroup,omitempty"`
+ // IPConfigurations - A list of IPConfigurations of the network interface.
+ IPConfigurations *[]InterfaceIPConfiguration `json:"ipConfigurations,omitempty"`
+ // DNSSettings - The DNS settings in network interface.
+ DNSSettings *InterfaceDNSSettings `json:"dnsSettings,omitempty"`
+ // MacAddress - The MAC address of the network interface.
+ MacAddress *string `json:"macAddress,omitempty"`
+ // Primary - Gets whether this is a primary network interface on a virtual machine.
+ Primary *bool `json:"primary,omitempty"`
+ // EnableAcceleratedNetworking - If the network interface is accelerated networking enabled.
+ EnableAcceleratedNetworking *bool `json:"enableAcceleratedNetworking,omitempty"`
+ // EnableIPForwarding - Indicates whether IP forwarding is enabled on this network interface.
+ EnableIPForwarding *bool `json:"enableIPForwarding,omitempty"`
+ // ResourceGUID - The resource GUID property of the network interface resource.
+ ResourceGUID *string `json:"resourceGuid,omitempty"`
+ // ProvisioningState - The provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+}
+
+// InterfacesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type InterfacesCreateOrUpdateFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(InterfacesClient) (Interface, error)
+}
+
+// InterfacesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type InterfacesDeleteFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(InterfacesClient) (autorest.Response, error)
+}
+
+// InterfacesGetEffectiveRouteTableFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type InterfacesGetEffectiveRouteTableFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(InterfacesClient) (EffectiveRouteListResult, error)
+}
+
+// InterfacesListEffectiveNetworkSecurityGroupsFuture an abstraction for monitoring and retrieving the
+// results of a long-running operation.
+type InterfacesListEffectiveNetworkSecurityGroupsFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(InterfacesClient) (EffectiveNetworkSecurityGroupListResult, error)
+}
+
+// InterfacesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type InterfacesUpdateTagsFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(InterfacesClient) (Interface, error)
+}
+
+// IPAddressAvailabilityResult response for CheckIPAddressAvailability API service call
+type IPAddressAvailabilityResult struct {
+ autorest.Response `json:"-"`
+ // Available - Private IP address availability.
+ Available *bool `json:"available,omitempty"`
+ // AvailableIPAddresses - Contains other available private IP addresses if the asked for address is taken.
+ AvailableIPAddresses *[]string `json:"availableIPAddresses,omitempty"`
+}
+
+// IPConfiguration IP configuration
+type IPConfiguration struct {
+ // IPConfigurationPropertiesFormat - Properties of the IP configuration
+ *IPConfigurationPropertiesFormat `json:"properties,omitempty"`
+ // Name - 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"`
+ // Etag - A unique read-only string that changes whenever the resource is updated.
+ Etag *string `json:"etag,omitempty"`
+ // ID - Resource ID.
+ ID *string `json:"id,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for IPConfiguration.
+func (ic IPConfiguration) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if ic.IPConfigurationPropertiesFormat != nil {
+ objectMap["properties"] = ic.IPConfigurationPropertiesFormat
+ }
+ if ic.Name != nil {
+ objectMap["name"] = ic.Name
+ }
+ if ic.Etag != nil {
+ objectMap["etag"] = ic.Etag
+ }
+ if ic.ID != nil {
+ objectMap["id"] = ic.ID
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for IPConfiguration struct.
+func (ic *IPConfiguration) 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 IPConfigurationPropertiesFormat IPConfigurationPropertiesFormat
+ err = json.Unmarshal(*v, &IPConfigurationPropertiesFormat)
+ if err != nil {
+ return err
+ }
+ ic.IPConfigurationPropertiesFormat = &IPConfigurationPropertiesFormat
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ ic.Name = &name
+ }
+ case "etag":
+ if v != nil {
+ var etag string
+ err = json.Unmarshal(*v, &etag)
+ if err != nil {
+ return err
+ }
+ ic.Etag = &etag
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ ic.ID = &ID
+ }
+ }
+ }
+
+ return nil
+}
+
+// IPConfigurationPropertiesFormat properties of IP configuration.
+type IPConfigurationPropertiesFormat struct {
+ // PrivateIPAddress - The private IP address of the IP configuration.
+ PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
+ // PrivateIPAllocationMethod - The private IP allocation method. Possible values are 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic'
+ PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
+ // Subnet - The reference of the subnet resource.
+ Subnet *Subnet `json:"subnet,omitempty"`
+ // PublicIPAddress - The reference of the public IP resource.
+ PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"`
+ // ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+}
+
+// IpsecPolicy an IPSec Policy configuration for a virtual network gateway connection
+type IpsecPolicy struct {
+ // SaLifeTimeSeconds - The IPSec Security Association (also called Quick Mode or Phase 2 SA) lifetime in seconds for a site to site VPN tunnel.
+ SaLifeTimeSeconds *int32 `json:"saLifeTimeSeconds,omitempty"`
+ // SaDataSizeKilobytes - The IPSec Security Association (also called Quick Mode or Phase 2 SA) payload size in KB for a site to site VPN tunnel.
+ SaDataSizeKilobytes *int32 `json:"saDataSizeKilobytes,omitempty"`
+ // IpsecEncryption - The IPSec encryption algorithm (IKE phase 1). Possible values include: 'IpsecEncryptionNone', 'IpsecEncryptionDES', 'IpsecEncryptionDES3', 'IpsecEncryptionAES128', 'IpsecEncryptionAES192', 'IpsecEncryptionAES256', 'IpsecEncryptionGCMAES128', 'IpsecEncryptionGCMAES192', 'IpsecEncryptionGCMAES256'
+ IpsecEncryption IpsecEncryption `json:"ipsecEncryption,omitempty"`
+ // IpsecIntegrity - The IPSec integrity algorithm (IKE phase 1). Possible values include: 'IpsecIntegrityMD5', 'IpsecIntegritySHA1', 'IpsecIntegritySHA256', 'IpsecIntegrityGCMAES128', 'IpsecIntegrityGCMAES192', 'IpsecIntegrityGCMAES256'
+ IpsecIntegrity IpsecIntegrity `json:"ipsecIntegrity,omitempty"`
+ // IkeEncryption - The IKE encryption algorithm (IKE phase 2). Possible values include: 'DES', 'DES3', 'AES128', 'AES192', 'AES256'
+ IkeEncryption IkeEncryption `json:"ikeEncryption,omitempty"`
+ // IkeIntegrity - The IKE integrity algorithm (IKE phase 2). Possible values include: 'MD5', 'SHA1', 'SHA256', 'SHA384'
+ IkeIntegrity IkeIntegrity `json:"ikeIntegrity,omitempty"`
+ // DhGroup - The DH Groups used in IKE Phase 1 for initial SA. Possible values include: 'None', 'DHGroup1', 'DHGroup2', 'DHGroup14', 'DHGroup2048', 'ECP256', 'ECP384', 'DHGroup24'
+ DhGroup DhGroup `json:"dhGroup,omitempty"`
+ // PfsGroup - The DH Groups used in IKE Phase 2 for new child SA. Possible values include: 'PfsGroupNone', 'PfsGroupPFS1', 'PfsGroupPFS2', 'PfsGroupPFS2048', 'PfsGroupECP256', 'PfsGroupECP384', 'PfsGroupPFS24'
+ PfsGroup PfsGroup `json:"pfsGroup,omitempty"`
+}
+
+// Ipv6ExpressRouteCircuitPeeringConfig contains IPv6 peering config.
+type Ipv6ExpressRouteCircuitPeeringConfig struct {
+ // PrimaryPeerAddressPrefix - The primary address prefix.
+ PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"`
+ // SecondaryPeerAddressPrefix - The secondary address prefix.
+ SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"`
+ // MicrosoftPeeringConfig - The Microsoft peering configuration.
+ MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"`
+ // RouteFilter - The reference of the RouteFilter resource.
+ RouteFilter *RouteFilter `json:"routeFilter,omitempty"`
+ // State - The state of peering. Possible values are: 'Disabled' and 'Enabled'. Possible values include: 'ExpressRouteCircuitPeeringStateDisabled', 'ExpressRouteCircuitPeeringStateEnabled'
+ State ExpressRouteCircuitPeeringState `json:"state,omitempty"`
+}
+
+// LoadBalancer loadBalancer resource
+type LoadBalancer struct {
+ autorest.Response `json:"-"`
+ // Sku - The load balancer SKU.
+ Sku *LoadBalancerSku `json:"sku,omitempty"`
+ // LoadBalancerPropertiesFormat - Properties of load balancer.
+ *LoadBalancerPropertiesFormat `json:"properties,omitempty"`
+ // Etag - A unique read-only string that changes whenever the resource is updated.
+ Etag *string `json:"etag,omitempty"`
+ // ID - 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 LoadBalancer.
+func (lb LoadBalancer) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if lb.Sku != nil {
+ objectMap["sku"] = lb.Sku
+ }
+ if lb.LoadBalancerPropertiesFormat != nil {
+ objectMap["properties"] = lb.LoadBalancerPropertiesFormat
+ }
+ if lb.Etag != nil {
+ objectMap["etag"] = lb.Etag
+ }
+ if lb.ID != nil {
+ objectMap["id"] = lb.ID
+ }
+ if lb.Location != nil {
+ objectMap["location"] = lb.Location
+ }
+ if lb.Tags != nil {
+ objectMap["tags"] = lb.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for LoadBalancer struct.
+func (lb *LoadBalancer) 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 LoadBalancerSku
+ err = json.Unmarshal(*v, &sku)
+ if err != nil {
+ return err
+ }
+ lb.Sku = &sku
+ }
+ case "properties":
+ if v != nil {
+ var loadBalancerPropertiesFormat LoadBalancerPropertiesFormat
+ err = json.Unmarshal(*v, &loadBalancerPropertiesFormat)
+ if err != nil {
+ return err
+ }
+ lb.LoadBalancerPropertiesFormat = &loadBalancerPropertiesFormat
+ }
+ case "etag":
+ if v != nil {
+ var etag string
+ err = json.Unmarshal(*v, &etag)
+ if err != nil {
+ return err
+ }
+ lb.Etag = &etag
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ lb.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ lb.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ lb.Type = &typeVar
+ }
+ case "location":
+ if v != nil {
+ var location string
+ err = json.Unmarshal(*v, &location)
+ if err != nil {
+ return err
+ }
+ lb.Location = &location
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ lb.Tags = tags
+ }
+ }
+ }
+
+ return nil
+}
+
+// LoadBalancerBackendAddressPoolListResult response for ListBackendAddressPool API service call.
+type LoadBalancerBackendAddressPoolListResult struct {
+ autorest.Response `json:"-"`
+ // Value - A list of backend address pools in a load balancer.
+ Value *[]BackendAddressPool `json:"value,omitempty"`
+ // NextLink - READ-ONLY; The URL to get the next set of results.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for LoadBalancerBackendAddressPoolListResult.
+func (lbbaplr LoadBalancerBackendAddressPoolListResult) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if lbbaplr.Value != nil {
+ objectMap["value"] = lbbaplr.Value
+ }
+ return json.Marshal(objectMap)
+}
+
+// LoadBalancerBackendAddressPoolListResultIterator provides access to a complete listing of
+// BackendAddressPool values.
+type LoadBalancerBackendAddressPoolListResultIterator struct {
+ i int
+ page LoadBalancerBackendAddressPoolListResultPage
+}
+
+// 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 *LoadBalancerBackendAddressPoolListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerBackendAddressPoolListResultIterator.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 *LoadBalancerBackendAddressPoolListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter LoadBalancerBackendAddressPoolListResultIterator) 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 LoadBalancerBackendAddressPoolListResultIterator) Response() LoadBalancerBackendAddressPoolListResult {
+ 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 LoadBalancerBackendAddressPoolListResultIterator) Value() BackendAddressPool {
+ if !iter.page.NotDone() {
+ return BackendAddressPool{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// Creates a new instance of the LoadBalancerBackendAddressPoolListResultIterator type.
+func NewLoadBalancerBackendAddressPoolListResultIterator(page LoadBalancerBackendAddressPoolListResultPage) LoadBalancerBackendAddressPoolListResultIterator {
+ return LoadBalancerBackendAddressPoolListResultIterator{page: page}
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (lbbaplr LoadBalancerBackendAddressPoolListResult) IsEmpty() bool {
+ return lbbaplr.Value == nil || len(*lbbaplr.Value) == 0
+}
+
+// hasNextLink returns true if the NextLink is not empty.
+func (lbbaplr LoadBalancerBackendAddressPoolListResult) hasNextLink() bool {
+ return lbbaplr.NextLink != nil && len(*lbbaplr.NextLink) != 0
+}
+
+// loadBalancerBackendAddressPoolListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (lbbaplr LoadBalancerBackendAddressPoolListResult) loadBalancerBackendAddressPoolListResultPreparer(ctx context.Context) (*http.Request, error) {
+ if !lbbaplr.hasNextLink() {
+ return nil, nil
+ }
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(lbbaplr.NextLink)))
+}
+
+// LoadBalancerBackendAddressPoolListResultPage contains a page of BackendAddressPool values.
+type LoadBalancerBackendAddressPoolListResultPage struct {
+ fn func(context.Context, LoadBalancerBackendAddressPoolListResult) (LoadBalancerBackendAddressPoolListResult, error)
+ lbbaplr LoadBalancerBackendAddressPoolListResult
+}
+
+// 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 *LoadBalancerBackendAddressPoolListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerBackendAddressPoolListResultPage.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.lbbaplr)
+ if err != nil {
+ return err
+ }
+ page.lbbaplr = 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 *LoadBalancerBackendAddressPoolListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page LoadBalancerBackendAddressPoolListResultPage) NotDone() bool {
+ return !page.lbbaplr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page LoadBalancerBackendAddressPoolListResultPage) Response() LoadBalancerBackendAddressPoolListResult {
+ return page.lbbaplr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page LoadBalancerBackendAddressPoolListResultPage) Values() []BackendAddressPool {
+ if page.lbbaplr.IsEmpty() {
+ return nil
+ }
+ return *page.lbbaplr.Value
+}
+
+// Creates a new instance of the LoadBalancerBackendAddressPoolListResultPage type.
+func NewLoadBalancerBackendAddressPoolListResultPage(cur LoadBalancerBackendAddressPoolListResult, getNextPage func(context.Context, LoadBalancerBackendAddressPoolListResult) (LoadBalancerBackendAddressPoolListResult, error)) LoadBalancerBackendAddressPoolListResultPage {
+ return LoadBalancerBackendAddressPoolListResultPage{
+ fn: getNextPage,
+ lbbaplr: cur,
+ }
+}
+
+// LoadBalancerFrontendIPConfigurationListResult response for ListFrontendIPConfiguration API service call.
+type LoadBalancerFrontendIPConfigurationListResult struct {
+ autorest.Response `json:"-"`
+ // Value - A list of frontend IP configurations in a load balancer.
+ Value *[]FrontendIPConfiguration `json:"value,omitempty"`
+ // NextLink - READ-ONLY; The URL to get the next set of results.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for LoadBalancerFrontendIPConfigurationListResult.
+func (lbficlr LoadBalancerFrontendIPConfigurationListResult) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if lbficlr.Value != nil {
+ objectMap["value"] = lbficlr.Value
+ }
+ return json.Marshal(objectMap)
+}
+
+// LoadBalancerFrontendIPConfigurationListResultIterator provides access to a complete listing of
+// FrontendIPConfiguration values.
+type LoadBalancerFrontendIPConfigurationListResultIterator struct {
+ i int
+ page LoadBalancerFrontendIPConfigurationListResultPage
+}
+
+// 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 *LoadBalancerFrontendIPConfigurationListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerFrontendIPConfigurationListResultIterator.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 *LoadBalancerFrontendIPConfigurationListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter LoadBalancerFrontendIPConfigurationListResultIterator) 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 LoadBalancerFrontendIPConfigurationListResultIterator) Response() LoadBalancerFrontendIPConfigurationListResult {
+ 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 LoadBalancerFrontendIPConfigurationListResultIterator) Value() FrontendIPConfiguration {
+ if !iter.page.NotDone() {
+ return FrontendIPConfiguration{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// Creates a new instance of the LoadBalancerFrontendIPConfigurationListResultIterator type.
+func NewLoadBalancerFrontendIPConfigurationListResultIterator(page LoadBalancerFrontendIPConfigurationListResultPage) LoadBalancerFrontendIPConfigurationListResultIterator {
+ return LoadBalancerFrontendIPConfigurationListResultIterator{page: page}
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (lbficlr LoadBalancerFrontendIPConfigurationListResult) IsEmpty() bool {
+ return lbficlr.Value == nil || len(*lbficlr.Value) == 0
+}
+
+// hasNextLink returns true if the NextLink is not empty.
+func (lbficlr LoadBalancerFrontendIPConfigurationListResult) hasNextLink() bool {
+ return lbficlr.NextLink != nil && len(*lbficlr.NextLink) != 0
+}
+
+// loadBalancerFrontendIPConfigurationListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (lbficlr LoadBalancerFrontendIPConfigurationListResult) loadBalancerFrontendIPConfigurationListResultPreparer(ctx context.Context) (*http.Request, error) {
+ if !lbficlr.hasNextLink() {
+ return nil, nil
+ }
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(lbficlr.NextLink)))
+}
+
+// LoadBalancerFrontendIPConfigurationListResultPage contains a page of FrontendIPConfiguration values.
+type LoadBalancerFrontendIPConfigurationListResultPage struct {
+ fn func(context.Context, LoadBalancerFrontendIPConfigurationListResult) (LoadBalancerFrontendIPConfigurationListResult, error)
+ lbficlr LoadBalancerFrontendIPConfigurationListResult
+}
+
+// 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 *LoadBalancerFrontendIPConfigurationListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerFrontendIPConfigurationListResultPage.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.lbficlr)
+ if err != nil {
+ return err
+ }
+ page.lbficlr = 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 *LoadBalancerFrontendIPConfigurationListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page LoadBalancerFrontendIPConfigurationListResultPage) NotDone() bool {
+ return !page.lbficlr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page LoadBalancerFrontendIPConfigurationListResultPage) Response() LoadBalancerFrontendIPConfigurationListResult {
+ return page.lbficlr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page LoadBalancerFrontendIPConfigurationListResultPage) Values() []FrontendIPConfiguration {
+ if page.lbficlr.IsEmpty() {
+ return nil
+ }
+ return *page.lbficlr.Value
+}
+
+// Creates a new instance of the LoadBalancerFrontendIPConfigurationListResultPage type.
+func NewLoadBalancerFrontendIPConfigurationListResultPage(cur LoadBalancerFrontendIPConfigurationListResult, getNextPage func(context.Context, LoadBalancerFrontendIPConfigurationListResult) (LoadBalancerFrontendIPConfigurationListResult, error)) LoadBalancerFrontendIPConfigurationListResultPage {
+ return LoadBalancerFrontendIPConfigurationListResultPage{
+ fn: getNextPage,
+ lbficlr: cur,
+ }
+}
+
+// LoadBalancerListResult response for ListLoadBalancers API service call.
+type LoadBalancerListResult struct {
+ autorest.Response `json:"-"`
+ // Value - A list of load balancers in a resource group.
+ Value *[]LoadBalancer `json:"value,omitempty"`
+ // NextLink - READ-ONLY; The URL to get the next set of results.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for LoadBalancerListResult.
+func (lblr LoadBalancerListResult) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if lblr.Value != nil {
+ objectMap["value"] = lblr.Value
+ }
+ return json.Marshal(objectMap)
+}
+
+// LoadBalancerListResultIterator provides access to a complete listing of LoadBalancer values.
+type LoadBalancerListResultIterator struct {
+ i int
+ page LoadBalancerListResultPage
+}
+
+// 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 *LoadBalancerListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerListResultIterator.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 *LoadBalancerListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter LoadBalancerListResultIterator) 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 LoadBalancerListResultIterator) Response() LoadBalancerListResult {
+ 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 LoadBalancerListResultIterator) Value() LoadBalancer {
+ if !iter.page.NotDone() {
+ return LoadBalancer{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// Creates a new instance of the LoadBalancerListResultIterator type.
+func NewLoadBalancerListResultIterator(page LoadBalancerListResultPage) LoadBalancerListResultIterator {
+ return LoadBalancerListResultIterator{page: page}
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (lblr LoadBalancerListResult) IsEmpty() bool {
+ return lblr.Value == nil || len(*lblr.Value) == 0
+}
+
+// hasNextLink returns true if the NextLink is not empty.
+func (lblr LoadBalancerListResult) hasNextLink() bool {
+ return lblr.NextLink != nil && len(*lblr.NextLink) != 0
+}
+
+// loadBalancerListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (lblr LoadBalancerListResult) loadBalancerListResultPreparer(ctx context.Context) (*http.Request, error) {
+ if !lblr.hasNextLink() {
+ return nil, nil
+ }
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(lblr.NextLink)))
+}
+
+// LoadBalancerListResultPage contains a page of LoadBalancer values.
+type LoadBalancerListResultPage struct {
+ fn func(context.Context, LoadBalancerListResult) (LoadBalancerListResult, error)
+ lblr LoadBalancerListResult
+}
+
+// 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 *LoadBalancerListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerListResultPage.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.lblr)
+ if err != nil {
+ return err
+ }
+ page.lblr = 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 *LoadBalancerListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page LoadBalancerListResultPage) NotDone() bool {
+ return !page.lblr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page LoadBalancerListResultPage) Response() LoadBalancerListResult {
+ return page.lblr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page LoadBalancerListResultPage) Values() []LoadBalancer {
+ if page.lblr.IsEmpty() {
+ return nil
+ }
+ return *page.lblr.Value
+}
+
+// Creates a new instance of the LoadBalancerListResultPage type.
+func NewLoadBalancerListResultPage(cur LoadBalancerListResult, getNextPage func(context.Context, LoadBalancerListResult) (LoadBalancerListResult, error)) LoadBalancerListResultPage {
+ return LoadBalancerListResultPage{
+ fn: getNextPage,
+ lblr: cur,
+ }
+}
+
+// LoadBalancerLoadBalancingRuleListResult response for ListLoadBalancingRule API service call.
+type LoadBalancerLoadBalancingRuleListResult struct {
+ autorest.Response `json:"-"`
+ // Value - A list of load balancing rules in a load balancer.
+ Value *[]LoadBalancingRule `json:"value,omitempty"`
+ // NextLink - READ-ONLY; The URL to get the next set of results.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for LoadBalancerLoadBalancingRuleListResult.
+func (lblbrlr LoadBalancerLoadBalancingRuleListResult) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if lblbrlr.Value != nil {
+ objectMap["value"] = lblbrlr.Value
+ }
+ return json.Marshal(objectMap)
+}
+
+// LoadBalancerLoadBalancingRuleListResultIterator provides access to a complete listing of
+// LoadBalancingRule values.
+type LoadBalancerLoadBalancingRuleListResultIterator struct {
+ i int
+ page LoadBalancerLoadBalancingRuleListResultPage
+}
+
+// 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 *LoadBalancerLoadBalancingRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerLoadBalancingRuleListResultIterator.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 *LoadBalancerLoadBalancingRuleListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter LoadBalancerLoadBalancingRuleListResultIterator) 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 LoadBalancerLoadBalancingRuleListResultIterator) Response() LoadBalancerLoadBalancingRuleListResult {
+ 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 LoadBalancerLoadBalancingRuleListResultIterator) Value() LoadBalancingRule {
+ if !iter.page.NotDone() {
+ return LoadBalancingRule{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// Creates a new instance of the LoadBalancerLoadBalancingRuleListResultIterator type.
+func NewLoadBalancerLoadBalancingRuleListResultIterator(page LoadBalancerLoadBalancingRuleListResultPage) LoadBalancerLoadBalancingRuleListResultIterator {
+ return LoadBalancerLoadBalancingRuleListResultIterator{page: page}
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (lblbrlr LoadBalancerLoadBalancingRuleListResult) IsEmpty() bool {
+ return lblbrlr.Value == nil || len(*lblbrlr.Value) == 0
+}
+
+// hasNextLink returns true if the NextLink is not empty.
+func (lblbrlr LoadBalancerLoadBalancingRuleListResult) hasNextLink() bool {
+ return lblbrlr.NextLink != nil && len(*lblbrlr.NextLink) != 0
+}
+
+// loadBalancerLoadBalancingRuleListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (lblbrlr LoadBalancerLoadBalancingRuleListResult) loadBalancerLoadBalancingRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
+ if !lblbrlr.hasNextLink() {
+ return nil, nil
+ }
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(lblbrlr.NextLink)))
+}
+
+// LoadBalancerLoadBalancingRuleListResultPage contains a page of LoadBalancingRule values.
+type LoadBalancerLoadBalancingRuleListResultPage struct {
+ fn func(context.Context, LoadBalancerLoadBalancingRuleListResult) (LoadBalancerLoadBalancingRuleListResult, error)
+ lblbrlr LoadBalancerLoadBalancingRuleListResult
+}
+
+// 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 *LoadBalancerLoadBalancingRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerLoadBalancingRuleListResultPage.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.lblbrlr)
+ if err != nil {
+ return err
+ }
+ page.lblbrlr = 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 *LoadBalancerLoadBalancingRuleListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page LoadBalancerLoadBalancingRuleListResultPage) NotDone() bool {
+ return !page.lblbrlr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page LoadBalancerLoadBalancingRuleListResultPage) Response() LoadBalancerLoadBalancingRuleListResult {
+ return page.lblbrlr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page LoadBalancerLoadBalancingRuleListResultPage) Values() []LoadBalancingRule {
+ if page.lblbrlr.IsEmpty() {
+ return nil
+ }
+ return *page.lblbrlr.Value
+}
+
+// Creates a new instance of the LoadBalancerLoadBalancingRuleListResultPage type.
+func NewLoadBalancerLoadBalancingRuleListResultPage(cur LoadBalancerLoadBalancingRuleListResult, getNextPage func(context.Context, LoadBalancerLoadBalancingRuleListResult) (LoadBalancerLoadBalancingRuleListResult, error)) LoadBalancerLoadBalancingRuleListResultPage {
+ return LoadBalancerLoadBalancingRuleListResultPage{
+ fn: getNextPage,
+ lblbrlr: cur,
+ }
+}
+
+// LoadBalancerProbeListResult response for ListProbe API service call.
+type LoadBalancerProbeListResult struct {
+ autorest.Response `json:"-"`
+ // Value - A list of probes in a load balancer.
+ Value *[]Probe `json:"value,omitempty"`
+ // NextLink - READ-ONLY; The URL to get the next set of results.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for LoadBalancerProbeListResult.
+func (lbplr LoadBalancerProbeListResult) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if lbplr.Value != nil {
+ objectMap["value"] = lbplr.Value
+ }
+ return json.Marshal(objectMap)
+}
+
+// LoadBalancerProbeListResultIterator provides access to a complete listing of Probe values.
+type LoadBalancerProbeListResultIterator struct {
+ i int
+ page LoadBalancerProbeListResultPage
+}
+
+// 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 *LoadBalancerProbeListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerProbeListResultIterator.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 *LoadBalancerProbeListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter LoadBalancerProbeListResultIterator) 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 LoadBalancerProbeListResultIterator) Response() LoadBalancerProbeListResult {
+ 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 LoadBalancerProbeListResultIterator) Value() Probe {
+ if !iter.page.NotDone() {
+ return Probe{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// Creates a new instance of the LoadBalancerProbeListResultIterator type.
+func NewLoadBalancerProbeListResultIterator(page LoadBalancerProbeListResultPage) LoadBalancerProbeListResultIterator {
+ return LoadBalancerProbeListResultIterator{page: page}
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (lbplr LoadBalancerProbeListResult) IsEmpty() bool {
+ return lbplr.Value == nil || len(*lbplr.Value) == 0
+}
+
+// hasNextLink returns true if the NextLink is not empty.
+func (lbplr LoadBalancerProbeListResult) hasNextLink() bool {
+ return lbplr.NextLink != nil && len(*lbplr.NextLink) != 0
+}
+
+// loadBalancerProbeListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (lbplr LoadBalancerProbeListResult) loadBalancerProbeListResultPreparer(ctx context.Context) (*http.Request, error) {
+ if !lbplr.hasNextLink() {
+ return nil, nil
+ }
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(lbplr.NextLink)))
+}
+
+// LoadBalancerProbeListResultPage contains a page of Probe values.
+type LoadBalancerProbeListResultPage struct {
+ fn func(context.Context, LoadBalancerProbeListResult) (LoadBalancerProbeListResult, error)
+ lbplr LoadBalancerProbeListResult
+}
+
+// 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 *LoadBalancerProbeListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerProbeListResultPage.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.lbplr)
+ if err != nil {
+ return err
+ }
+ page.lbplr = 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 *LoadBalancerProbeListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page LoadBalancerProbeListResultPage) NotDone() bool {
+ return !page.lbplr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page LoadBalancerProbeListResultPage) Response() LoadBalancerProbeListResult {
+ return page.lbplr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page LoadBalancerProbeListResultPage) Values() []Probe {
+ if page.lbplr.IsEmpty() {
+ return nil
+ }
+ return *page.lbplr.Value
+}
+
+// Creates a new instance of the LoadBalancerProbeListResultPage type.
+func NewLoadBalancerProbeListResultPage(cur LoadBalancerProbeListResult, getNextPage func(context.Context, LoadBalancerProbeListResult) (LoadBalancerProbeListResult, error)) LoadBalancerProbeListResultPage {
+ return LoadBalancerProbeListResultPage{
+ fn: getNextPage,
+ lbplr: cur,
+ }
+}
+
+// LoadBalancerPropertiesFormat properties of the load balancer.
+type LoadBalancerPropertiesFormat struct {
+ // FrontendIPConfigurations - Object representing the frontend IPs to be used for the load balancer
+ FrontendIPConfigurations *[]FrontendIPConfiguration `json:"frontendIPConfigurations,omitempty"`
+ // BackendAddressPools - Collection of backend address pools used by a load balancer
+ BackendAddressPools *[]BackendAddressPool `json:"backendAddressPools,omitempty"`
+ // LoadBalancingRules - Object collection representing the load balancing rules Gets the provisioning
+ LoadBalancingRules *[]LoadBalancingRule `json:"loadBalancingRules,omitempty"`
+ // Probes - Collection of probe objects used in the load balancer
+ Probes *[]Probe `json:"probes,omitempty"`
+ // InboundNatRules - Collection of inbound NAT Rules used by a load balancer. Defining inbound NAT rules on your load balancer is mutually exclusive with defining an inbound NAT pool. Inbound NAT pools are referenced from virtual machine scale sets. NICs that are associated with individual virtual machines cannot reference an Inbound NAT pool. They have to reference individual inbound NAT rules.
+ InboundNatRules *[]InboundNatRule `json:"inboundNatRules,omitempty"`
+ // InboundNatPools - Defines an external port range for inbound NAT to a single backend port on NICs associated with a load balancer. Inbound NAT rules are created automatically for each NIC associated with the Load Balancer using an external port from this range. Defining an Inbound NAT pool on your Load Balancer is mutually exclusive with defining inbound Nat rules. Inbound NAT pools are referenced from virtual machine scale sets. NICs that are associated with individual virtual machines cannot reference an inbound NAT pool. They have to reference individual inbound NAT rules.
+ InboundNatPools *[]InboundNatPool `json:"inboundNatPools,omitempty"`
+ // OutboundNatRules - The outbound NAT rules.
+ OutboundNatRules *[]OutboundNatRule `json:"outboundNatRules,omitempty"`
+ // ResourceGUID - The resource GUID property of the load balancer resource.
+ ResourceGUID *string `json:"resourceGuid,omitempty"`
+ // ProvisioningState - Gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+}
+
+// LoadBalancersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type LoadBalancersCreateOrUpdateFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(LoadBalancersClient) (LoadBalancer, error)
+}
+
+// LoadBalancersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type LoadBalancersDeleteFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(LoadBalancersClient) (autorest.Response, error)
+}
+
+// LoadBalancerSku SKU of a load balancer
+type LoadBalancerSku struct {
+ // Name - Name of a load balancer SKU. Possible values include: 'LoadBalancerSkuNameBasic', 'LoadBalancerSkuNameStandard'
+ Name LoadBalancerSkuName `json:"name,omitempty"`
+}
+
+// LoadBalancersUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type LoadBalancersUpdateTagsFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(LoadBalancersClient) (LoadBalancer, error)
+}
+
+// LoadBalancingRule a load balancing rule for a load balancer.
+type LoadBalancingRule struct {
+ autorest.Response `json:"-"`
+ // LoadBalancingRulePropertiesFormat - Properties of load balancer load balancing rule.
+ *LoadBalancingRulePropertiesFormat `json:"properties,omitempty"`
+ // Name - 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"`
+ // Etag - A unique read-only string that changes whenever the resource is updated.
+ Etag *string `json:"etag,omitempty"`
+ // ID - Resource ID.
+ ID *string `json:"id,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for LoadBalancingRule.
+func (lbr LoadBalancingRule) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if lbr.LoadBalancingRulePropertiesFormat != nil {
+ objectMap["properties"] = lbr.LoadBalancingRulePropertiesFormat
+ }
+ if lbr.Name != nil {
+ objectMap["name"] = lbr.Name
+ }
+ if lbr.Etag != nil {
+ objectMap["etag"] = lbr.Etag
+ }
+ if lbr.ID != nil {
+ objectMap["id"] = lbr.ID
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for LoadBalancingRule struct.
+func (lbr *LoadBalancingRule) 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 loadBalancingRulePropertiesFormat LoadBalancingRulePropertiesFormat
+ err = json.Unmarshal(*v, &loadBalancingRulePropertiesFormat)
+ if err != nil {
+ return err
+ }
+ lbr.LoadBalancingRulePropertiesFormat = &loadBalancingRulePropertiesFormat
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ lbr.Name = &name
+ }
+ case "etag":
+ if v != nil {
+ var etag string
+ err = json.Unmarshal(*v, &etag)
+ if err != nil {
+ return err
+ }
+ lbr.Etag = &etag
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ lbr.ID = &ID
+ }
+ }
+ }
+
+ return nil
+}
+
+// LoadBalancingRulePropertiesFormat properties of the load balancer.
+type LoadBalancingRulePropertiesFormat struct {
+ // FrontendIPConfiguration - A reference to frontend IP addresses.
+ FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"`
+ // BackendAddressPool - A reference to a pool of DIPs. Inbound traffic is randomly load balanced across IPs in the backend IPs.
+ BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"`
+ // Probe - The reference of the load balancer probe used by the load balancing rule.
+ Probe *SubResource `json:"probe,omitempty"`
+ // Protocol - Possible values include: 'TransportProtocolUDP', 'TransportProtocolTCP', 'TransportProtocolAll'
+ Protocol TransportProtocol `json:"protocol,omitempty"`
+ // LoadDistribution - The load distribution policy for this rule. Possible values are 'Default', 'SourceIP', and 'SourceIPProtocol'. Possible values include: 'Default', 'SourceIP', 'SourceIPProtocol'
+ LoadDistribution LoadDistribution `json:"loadDistribution,omitempty"`
+ // FrontendPort - The port for the external endpoint. Port numbers for each rule must be unique within the Load Balancer. Acceptable values are between 0 and 65534. Note that value 0 enables "Any Port"
+ FrontendPort *int32 `json:"frontendPort,omitempty"`
+ // BackendPort - The port used for internal connections on the endpoint. Acceptable values are between 0 and 65535. Note that value 0 enables "Any Port"
+ BackendPort *int32 `json:"backendPort,omitempty"`
+ // IdleTimeoutInMinutes - The timeout for the TCP idle connection. The value can be set between 4 and 30 minutes. The default value is 4 minutes. This element is only used when the protocol is set to TCP.
+ IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
+ // EnableFloatingIP - Configures a virtual machine's endpoint for the floating IP capability required to configure a SQL AlwaysOn Availability Group. This setting is required when using the SQL AlwaysOn Availability Groups in SQL server. This setting can't be changed after you create the endpoint.
+ EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"`
+ // DisableOutboundSnat - Configures SNAT for the VMs in the backend pool to use the publicIP address specified in the frontend of the load balancing rule.
+ DisableOutboundSnat *bool `json:"disableOutboundSnat,omitempty"`
+ // ProvisioningState - Gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+}
+
+// LocalNetworkGateway a common class for general resource information
+type LocalNetworkGateway struct {
+ autorest.Response `json:"-"`
+ // LocalNetworkGatewayPropertiesFormat - Properties of the local network gateway.
+ *LocalNetworkGatewayPropertiesFormat `json:"properties,omitempty"`
+ // Etag - A unique read-only string that changes whenever the resource is updated.
+ Etag *string `json:"etag,omitempty"`
+ // ID - 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 LocalNetworkGateway.
+func (lng LocalNetworkGateway) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if lng.LocalNetworkGatewayPropertiesFormat != nil {
+ objectMap["properties"] = lng.LocalNetworkGatewayPropertiesFormat
+ }
+ if lng.Etag != nil {
+ objectMap["etag"] = lng.Etag
+ }
+ if lng.ID != nil {
+ objectMap["id"] = lng.ID
+ }
+ if lng.Location != nil {
+ objectMap["location"] = lng.Location
+ }
+ if lng.Tags != nil {
+ objectMap["tags"] = lng.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for LocalNetworkGateway struct.
+func (lng *LocalNetworkGateway) 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 localNetworkGatewayPropertiesFormat LocalNetworkGatewayPropertiesFormat
+ err = json.Unmarshal(*v, &localNetworkGatewayPropertiesFormat)
+ if err != nil {
+ return err
+ }
+ lng.LocalNetworkGatewayPropertiesFormat = &localNetworkGatewayPropertiesFormat
+ }
+ case "etag":
+ if v != nil {
+ var etag string
+ err = json.Unmarshal(*v, &etag)
+ if err != nil {
+ return err
+ }
+ lng.Etag = &etag
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ lng.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ lng.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ lng.Type = &typeVar
+ }
+ case "location":
+ if v != nil {
+ var location string
+ err = json.Unmarshal(*v, &location)
+ if err != nil {
+ return err
+ }
+ lng.Location = &location
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ lng.Tags = tags
+ }
+ }
+ }
+
+ return nil
+}
+
+// LocalNetworkGatewayListResult response for ListLocalNetworkGateways API service call.
+type LocalNetworkGatewayListResult struct {
+ autorest.Response `json:"-"`
+ // Value - A list of local network gateways that exists in a resource group.
+ Value *[]LocalNetworkGateway `json:"value,omitempty"`
+ // NextLink - READ-ONLY; The URL to get the next set of results.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for LocalNetworkGatewayListResult.
+func (lnglr LocalNetworkGatewayListResult) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if lnglr.Value != nil {
+ objectMap["value"] = lnglr.Value
+ }
+ return json.Marshal(objectMap)
+}
+
+// LocalNetworkGatewayListResultIterator provides access to a complete listing of LocalNetworkGateway
+// values.
+type LocalNetworkGatewayListResultIterator struct {
+ i int
+ page LocalNetworkGatewayListResultPage
+}
+
+// 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 *LocalNetworkGatewayListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/LocalNetworkGatewayListResultIterator.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 *LocalNetworkGatewayListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter LocalNetworkGatewayListResultIterator) 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 LocalNetworkGatewayListResultIterator) Response() LocalNetworkGatewayListResult {
+ 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 LocalNetworkGatewayListResultIterator) Value() LocalNetworkGateway {
+ if !iter.page.NotDone() {
+ return LocalNetworkGateway{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// Creates a new instance of the LocalNetworkGatewayListResultIterator type.
+func NewLocalNetworkGatewayListResultIterator(page LocalNetworkGatewayListResultPage) LocalNetworkGatewayListResultIterator {
+ return LocalNetworkGatewayListResultIterator{page: page}
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (lnglr LocalNetworkGatewayListResult) IsEmpty() bool {
+ return lnglr.Value == nil || len(*lnglr.Value) == 0
+}
+
+// hasNextLink returns true if the NextLink is not empty.
+func (lnglr LocalNetworkGatewayListResult) hasNextLink() bool {
+ return lnglr.NextLink != nil && len(*lnglr.NextLink) != 0
+}
+
+// localNetworkGatewayListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (lnglr LocalNetworkGatewayListResult) localNetworkGatewayListResultPreparer(ctx context.Context) (*http.Request, error) {
+ if !lnglr.hasNextLink() {
+ return nil, nil
+ }
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(lnglr.NextLink)))
+}
+
+// LocalNetworkGatewayListResultPage contains a page of LocalNetworkGateway values.
+type LocalNetworkGatewayListResultPage struct {
+ fn func(context.Context, LocalNetworkGatewayListResult) (LocalNetworkGatewayListResult, error)
+ lnglr LocalNetworkGatewayListResult
+}
+
+// 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 *LocalNetworkGatewayListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/LocalNetworkGatewayListResultPage.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.lnglr)
+ if err != nil {
+ return err
+ }
+ page.lnglr = 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 *LocalNetworkGatewayListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page LocalNetworkGatewayListResultPage) NotDone() bool {
+ return !page.lnglr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page LocalNetworkGatewayListResultPage) Response() LocalNetworkGatewayListResult {
+ return page.lnglr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page LocalNetworkGatewayListResultPage) Values() []LocalNetworkGateway {
+ if page.lnglr.IsEmpty() {
+ return nil
+ }
+ return *page.lnglr.Value
+}
+
+// Creates a new instance of the LocalNetworkGatewayListResultPage type.
+func NewLocalNetworkGatewayListResultPage(cur LocalNetworkGatewayListResult, getNextPage func(context.Context, LocalNetworkGatewayListResult) (LocalNetworkGatewayListResult, error)) LocalNetworkGatewayListResultPage {
+ return LocalNetworkGatewayListResultPage{
+ fn: getNextPage,
+ lnglr: cur,
+ }
+}
+
+// LocalNetworkGatewayPropertiesFormat localNetworkGateway properties
+type LocalNetworkGatewayPropertiesFormat struct {
+ // LocalNetworkAddressSpace - Local network site address space.
+ LocalNetworkAddressSpace *AddressSpace `json:"localNetworkAddressSpace,omitempty"`
+ // GatewayIPAddress - IP address of local network gateway.
+ GatewayIPAddress *string `json:"gatewayIpAddress,omitempty"`
+ // BgpSettings - Local network gateway's BGP speaker settings.
+ BgpSettings *BgpSettings `json:"bgpSettings,omitempty"`
+ // ResourceGUID - The resource GUID property of the LocalNetworkGateway resource.
+ ResourceGUID *string `json:"resourceGuid,omitempty"`
+ // ProvisioningState - READ-ONLY; The provisioning state of the LocalNetworkGateway resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for LocalNetworkGatewayPropertiesFormat.
+func (lngpf LocalNetworkGatewayPropertiesFormat) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if lngpf.LocalNetworkAddressSpace != nil {
+ objectMap["localNetworkAddressSpace"] = lngpf.LocalNetworkAddressSpace
+ }
+ if lngpf.GatewayIPAddress != nil {
+ objectMap["gatewayIpAddress"] = lngpf.GatewayIPAddress
+ }
+ if lngpf.BgpSettings != nil {
+ objectMap["bgpSettings"] = lngpf.BgpSettings
+ }
+ if lngpf.ResourceGUID != nil {
+ objectMap["resourceGuid"] = lngpf.ResourceGUID
+ }
+ return json.Marshal(objectMap)
+}
+
+// LocalNetworkGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type LocalNetworkGatewaysCreateOrUpdateFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(LocalNetworkGatewaysClient) (LocalNetworkGateway, error)
+}
+
+// LocalNetworkGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type LocalNetworkGatewaysDeleteFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(LocalNetworkGatewaysClient) (autorest.Response, error)
+}
+
+// LocalNetworkGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type LocalNetworkGatewaysUpdateTagsFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(LocalNetworkGatewaysClient) (LocalNetworkGateway, error)
+}
+
+// LogSpecification description of logging specification.
+type LogSpecification struct {
+ // Name - The name of the specification.
+ Name *string `json:"name,omitempty"`
+ // DisplayName - The display name of the specification.
+ DisplayName *string `json:"displayName,omitempty"`
+ // BlobDuration - Duration of the blob.
+ BlobDuration *string `json:"blobDuration,omitempty"`
+}
+
+// MetricSpecification description of metrics specification.
+type MetricSpecification struct {
+ // Name - The name of the metric.
+ Name *string `json:"name,omitempty"`
+ // DisplayName - The display name of the metric.
+ DisplayName *string `json:"displayName,omitempty"`
+ // DisplayDescription - The description of the metric.
+ DisplayDescription *string `json:"displayDescription,omitempty"`
+ // Unit - Units the metric to be displayed in.
+ Unit *string `json:"unit,omitempty"`
+ // AggregationType - The aggregation type.
+ AggregationType *string `json:"aggregationType,omitempty"`
+ // Availabilities - List of availability.
+ Availabilities *[]Availability `json:"availabilities,omitempty"`
+ // EnableRegionalMdmAccount - Whether regional MDM account enabled.
+ EnableRegionalMdmAccount *bool `json:"enableRegionalMdmAccount,omitempty"`
+ // FillGapWithZero - Whether gaps would be filled with zeros.
+ FillGapWithZero *bool `json:"fillGapWithZero,omitempty"`
+ // MetricFilterPattern - Pattern for the filter of the metric.
+ MetricFilterPattern *string `json:"metricFilterPattern,omitempty"`
+ // Dimensions - List of dimensions.
+ Dimensions *[]Dimension `json:"dimensions,omitempty"`
+ // IsInternal - Whether the metric is internal.
+ IsInternal *bool `json:"isInternal,omitempty"`
+ // SourceMdmAccount - The source MDM account.
+ SourceMdmAccount *string `json:"sourceMdmAccount,omitempty"`
+ // SourceMdmNamespace - The source MDM namespace.
+ SourceMdmNamespace *string `json:"sourceMdmNamespace,omitempty"`
+ // ResourceIDDimensionNameOverride - The resource Id dimension name override.
+ ResourceIDDimensionNameOverride *string `json:"resourceIdDimensionNameOverride,omitempty"`
+}
+
+// NextHopParameters parameters that define the source and destination endpoint.
+type NextHopParameters struct {
+ // TargetResourceID - The resource identifier of the target resource against which the action is to be performed.
+ TargetResourceID *string `json:"targetResourceId,omitempty"`
+ // SourceIPAddress - The source IP address.
+ SourceIPAddress *string `json:"sourceIPAddress,omitempty"`
+ // DestinationIPAddress - The destination IP address.
+ DestinationIPAddress *string `json:"destinationIPAddress,omitempty"`
+ // TargetNicResourceID - The NIC ID. (If VM has multiple NICs and IP forwarding is enabled on any of the nics, then this parameter must be specified. Otherwise optional).
+ TargetNicResourceID *string `json:"targetNicResourceId,omitempty"`
+}
+
+// NextHopResult the information about next hop from the specified VM.
+type NextHopResult struct {
+ autorest.Response `json:"-"`
+ // NextHopType - Next hop type. Possible values include: 'NextHopTypeInternet', 'NextHopTypeVirtualAppliance', 'NextHopTypeVirtualNetworkGateway', 'NextHopTypeVnetLocal', 'NextHopTypeHyperNetGateway', 'NextHopTypeNone'
+ NextHopType NextHopType `json:"nextHopType,omitempty"`
+ // NextHopIPAddress - Next hop IP Address
+ NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"`
+ // RouteTableID - The resource identifier for the route table associated with the route being returned. If the route being returned does not correspond to any user created routes then this field will be the string 'System Route'.
+ RouteTableID *string `json:"routeTableId,omitempty"`
+}
+
+// Operation network REST API operation definition.
+type Operation struct {
+ // Name - Operation name: {provider}/{resource}/{operation}
+ Name *string `json:"name,omitempty"`
+ // Display - Display metadata associated with the operation.
+ Display *OperationDisplay `json:"display,omitempty"`
+ // Origin - Origin of the operation.
+ Origin *string `json:"origin,omitempty"`
+ // OperationPropertiesFormat - Operation properties format.
+ *OperationPropertiesFormat `json:"properties,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for Operation.
+func (o Operation) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if o.Name != nil {
+ objectMap["name"] = o.Name
+ }
+ if o.Display != nil {
+ objectMap["display"] = o.Display
+ }
+ if o.Origin != nil {
+ objectMap["origin"] = o.Origin
+ }
+ if o.OperationPropertiesFormat != nil {
+ objectMap["properties"] = o.OperationPropertiesFormat
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for Operation struct.
+func (o *Operation) 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
+ }
+ o.Name = &name
+ }
+ case "display":
+ if v != nil {
+ var display OperationDisplay
+ err = json.Unmarshal(*v, &display)
+ if err != nil {
+ return err
+ }
+ o.Display = &display
+ }
+ case "origin":
+ if v != nil {
+ var origin string
+ err = json.Unmarshal(*v, &origin)
+ if err != nil {
+ return err
+ }
+ o.Origin = &origin
+ }
+ case "properties":
+ if v != nil {
+ var operationPropertiesFormat OperationPropertiesFormat
+ err = json.Unmarshal(*v, &operationPropertiesFormat)
+ if err != nil {
+ return err
+ }
+ o.OperationPropertiesFormat = &operationPropertiesFormat
+ }
+ }
+ }
+
+ return nil
+}
+
+// OperationDisplay display metadata associated with the operation.
+type OperationDisplay struct {
+ // Provider - Service provider: Microsoft Network.
+ Provider *string `json:"provider,omitempty"`
+ // Resource - Resource on which the operation is performed.
+ Resource *string `json:"resource,omitempty"`
+ // Operation - Type of the operation: get, read, delete, etc.
+ Operation *string `json:"operation,omitempty"`
+ // Description - Description of the operation.
+ Description *string `json:"description,omitempty"`
+}
+
+// OperationListResult result of the request to list Network operations. It contains a list of operations
+// and a URL link to get the next set of results.
+type OperationListResult struct {
+ autorest.Response `json:"-"`
+ // Value - List of Network operations supported by the Network resource provider.
+ Value *[]Operation `json:"value,omitempty"`
+ // NextLink - URL to get the next set of operation list results if there are any.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// OperationListResultIterator provides access to a complete listing of Operation values.
+type OperationListResultIterator struct {
+ i int
+ page OperationListResultPage
+}
+
+// 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 *OperationListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultIterator.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 *OperationListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter OperationListResultIterator) 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 OperationListResultIterator) Response() OperationListResult {
+ 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 OperationListResultIterator) Value() Operation {
+ if !iter.page.NotDone() {
+ return Operation{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// Creates a new instance of the OperationListResultIterator type.
+func NewOperationListResultIterator(page OperationListResultPage) OperationListResultIterator {
+ return OperationListResultIterator{page: page}
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (olr OperationListResult) IsEmpty() bool {
+ return olr.Value == nil || len(*olr.Value) == 0
+}
+
+// hasNextLink returns true if the NextLink is not empty.
+func (olr OperationListResult) hasNextLink() bool {
+ return olr.NextLink != nil && len(*olr.NextLink) != 0
+}
+
+// operationListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (olr OperationListResult) operationListResultPreparer(ctx context.Context) (*http.Request, error) {
+ if !olr.hasNextLink() {
+ return nil, nil
+ }
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(olr.NextLink)))
+}
+
+// OperationListResultPage contains a page of Operation values.
+type OperationListResultPage struct {
+ fn func(context.Context, OperationListResult) (OperationListResult, error)
+ olr OperationListResult
+}
+
+// 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 *OperationListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultPage.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.olr)
+ if err != nil {
+ return err
+ }
+ page.olr = 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 *OperationListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page OperationListResultPage) NotDone() bool {
+ return !page.olr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page OperationListResultPage) Response() OperationListResult {
+ return page.olr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page OperationListResultPage) Values() []Operation {
+ if page.olr.IsEmpty() {
+ return nil
+ }
+ return *page.olr.Value
+}
+
+// Creates a new instance of the OperationListResultPage type.
+func NewOperationListResultPage(cur OperationListResult, getNextPage func(context.Context, OperationListResult) (OperationListResult, error)) OperationListResultPage {
+ return OperationListResultPage{
+ fn: getNextPage,
+ olr: cur,
+ }
+}
+
+// OperationPropertiesFormat description of operation properties format.
+type OperationPropertiesFormat struct {
+ // ServiceSpecification - Specification of the service.
+ ServiceSpecification *OperationPropertiesFormatServiceSpecification `json:"serviceSpecification,omitempty"`
+}
+
+// OperationPropertiesFormatServiceSpecification specification of the service.
+type OperationPropertiesFormatServiceSpecification struct {
+ // MetricSpecifications - Operation service specification.
+ MetricSpecifications *[]MetricSpecification `json:"metricSpecifications,omitempty"`
+ // LogSpecifications - Operation log specification.
+ LogSpecifications *[]LogSpecification `json:"logSpecifications,omitempty"`
+}
+
+// OutboundNatRule outbound NAT pool of the load balancer.
+type OutboundNatRule struct {
+ // OutboundNatRulePropertiesFormat - Properties of load balancer outbound nat rule.
+ *OutboundNatRulePropertiesFormat `json:"properties,omitempty"`
+ // Name - 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"`
+ // Etag - A unique read-only string that changes whenever the resource is updated.
+ Etag *string `json:"etag,omitempty"`
+ // ID - Resource ID.
+ ID *string `json:"id,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for OutboundNatRule.
+func (onr OutboundNatRule) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if onr.OutboundNatRulePropertiesFormat != nil {
+ objectMap["properties"] = onr.OutboundNatRulePropertiesFormat
+ }
+ if onr.Name != nil {
+ objectMap["name"] = onr.Name
+ }
+ if onr.Etag != nil {
+ objectMap["etag"] = onr.Etag
+ }
+ if onr.ID != nil {
+ objectMap["id"] = onr.ID
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for OutboundNatRule struct.
+func (onr *OutboundNatRule) 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 outboundNatRulePropertiesFormat OutboundNatRulePropertiesFormat
+ err = json.Unmarshal(*v, &outboundNatRulePropertiesFormat)
+ if err != nil {
+ return err
+ }
+ onr.OutboundNatRulePropertiesFormat = &outboundNatRulePropertiesFormat
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ onr.Name = &name
+ }
+ case "etag":
+ if v != nil {
+ var etag string
+ err = json.Unmarshal(*v, &etag)
+ if err != nil {
+ return err
+ }
+ onr.Etag = &etag
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ onr.ID = &ID
+ }
+ }
+ }
+
+ return nil
+}
+
+// OutboundNatRulePropertiesFormat outbound NAT pool of the load balancer.
+type OutboundNatRulePropertiesFormat struct {
+ // AllocatedOutboundPorts - The number of outbound ports to be used for NAT.
+ AllocatedOutboundPorts *int32 `json:"allocatedOutboundPorts,omitempty"`
+ // FrontendIPConfigurations - The Frontend IP addresses of the load balancer.
+ FrontendIPConfigurations *[]SubResource `json:"frontendIPConfigurations,omitempty"`
+ // BackendAddressPool - A reference to a pool of DIPs. Outbound traffic is randomly load balanced across IPs in the backend IPs.
+ BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"`
+ // ProvisioningState - Gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+}
+
+// PacketCapture parameters that define the create packet capture operation.
+type PacketCapture struct {
+ *PacketCaptureParameters `json:"properties,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for PacketCapture.
+func (pc PacketCapture) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if pc.PacketCaptureParameters != nil {
+ objectMap["properties"] = pc.PacketCaptureParameters
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for PacketCapture struct.
+func (pc *PacketCapture) 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 packetCaptureParameters PacketCaptureParameters
+ err = json.Unmarshal(*v, &packetCaptureParameters)
+ if err != nil {
+ return err
+ }
+ pc.PacketCaptureParameters = &packetCaptureParameters
+ }
+ }
+ }
+
+ return nil
+}
+
+// PacketCaptureFilter filter that is applied to packet capture request. Multiple filters can be applied.
+type PacketCaptureFilter struct {
+ // Protocol - Protocol to be filtered on. Possible values include: 'PcProtocolTCP', 'PcProtocolUDP', 'PcProtocolAny'
+ Protocol PcProtocol `json:"protocol,omitempty"`
+ // LocalIPAddress - Local IP Address to be filtered on. Notation: "127.0.0.1" for single address entry. "127.0.0.1-127.0.0.255" for range. "127.0.0.1;127.0.0.5"? for multiple entries. Multiple ranges not currently supported. Mixing ranges with multiple entries not currently supported. Default = null.
+ LocalIPAddress *string `json:"localIPAddress,omitempty"`
+ // RemoteIPAddress - Local IP Address to be filtered on. Notation: "127.0.0.1" for single address entry. "127.0.0.1-127.0.0.255" for range. "127.0.0.1;127.0.0.5;" for multiple entries. Multiple ranges not currently supported. Mixing ranges with multiple entries not currently supported. Default = null.
+ RemoteIPAddress *string `json:"remoteIPAddress,omitempty"`
+ // LocalPort - Local port to be filtered on. Notation: "80" for single port entry."80-85" for range. "80;443;" for multiple entries. Multiple ranges not currently supported. Mixing ranges with multiple entries not currently supported. Default = null.
+ LocalPort *string `json:"localPort,omitempty"`
+ // RemotePort - Remote port to be filtered on. Notation: "80" for single port entry."80-85" for range. "80;443;" for multiple entries. Multiple ranges not currently supported. Mixing ranges with multiple entries not currently supported. Default = null.
+ RemotePort *string `json:"remotePort,omitempty"`
+}
+
+// PacketCaptureListResult list of packet capture sessions.
+type PacketCaptureListResult struct {
+ autorest.Response `json:"-"`
+ // Value - Information about packet capture sessions.
+ Value *[]PacketCaptureResult `json:"value,omitempty"`
+}
+
+// PacketCaptureParameters parameters that define the create packet capture operation.
+type PacketCaptureParameters struct {
+ // Target - The ID of the targeted resource, only VM is currently supported.
+ Target *string `json:"target,omitempty"`
+ // BytesToCapturePerPacket - Number of bytes captured per packet, the remaining bytes are truncated.
+ BytesToCapturePerPacket *int32 `json:"bytesToCapturePerPacket,omitempty"`
+ // TotalBytesPerSession - Maximum size of the capture output.
+ TotalBytesPerSession *int32 `json:"totalBytesPerSession,omitempty"`
+ // TimeLimitInSeconds - Maximum duration of the capture session in seconds.
+ TimeLimitInSeconds *int32 `json:"timeLimitInSeconds,omitempty"`
+ StorageLocation *PacketCaptureStorageLocation `json:"storageLocation,omitempty"`
+ Filters *[]PacketCaptureFilter `json:"filters,omitempty"`
+}
+
+// PacketCaptureQueryStatusResult status of packet capture session.
+type PacketCaptureQueryStatusResult struct {
+ autorest.Response `json:"-"`
+ // Name - The name of the packet capture resource.
+ Name *string `json:"name,omitempty"`
+ // ID - The ID of the packet capture resource.
+ ID *string `json:"id,omitempty"`
+ // CaptureStartTime - The start time of the packet capture session.
+ CaptureStartTime *date.Time `json:"captureStartTime,omitempty"`
+ // PacketCaptureStatus - The status of the packet capture session. Possible values include: 'PcStatusNotStarted', 'PcStatusRunning', 'PcStatusStopped', 'PcStatusError', 'PcStatusUnknown'
+ PacketCaptureStatus PcStatus `json:"packetCaptureStatus,omitempty"`
+ // StopReason - The reason the current packet capture session was stopped.
+ StopReason *string `json:"stopReason,omitempty"`
+ // PacketCaptureError - List of errors of packet capture session.
+ PacketCaptureError *[]PcError `json:"packetCaptureError,omitempty"`
+}
+
+// PacketCaptureResult information about packet capture session.
+type PacketCaptureResult struct {
+ autorest.Response `json:"-"`
+ // Name - READ-ONLY; Name of the packet capture session.
+ Name *string `json:"name,omitempty"`
+ // ID - READ-ONLY; ID of the packet capture operation.
+ ID *string `json:"id,omitempty"`
+ Etag *string `json:"etag,omitempty"`
+ *PacketCaptureResultProperties `json:"properties,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for PacketCaptureResult.
+func (pcr PacketCaptureResult) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if pcr.Etag != nil {
+ objectMap["etag"] = pcr.Etag
+ }
+ if pcr.PacketCaptureResultProperties != nil {
+ objectMap["properties"] = pcr.PacketCaptureResultProperties
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for PacketCaptureResult struct.
+func (pcr *PacketCaptureResult) 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
+ }
+ pcr.Name = &name
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ pcr.ID = &ID
+ }
+ case "etag":
+ if v != nil {
+ var etag string
+ err = json.Unmarshal(*v, &etag)
+ if err != nil {
+ return err
+ }
+ pcr.Etag = &etag
+ }
+ case "properties":
+ if v != nil {
+ var packetCaptureResultProperties PacketCaptureResultProperties
+ err = json.Unmarshal(*v, &packetCaptureResultProperties)
+ if err != nil {
+ return err
+ }
+ pcr.PacketCaptureResultProperties = &packetCaptureResultProperties
+ }
+ }
+ }
+
+ return nil
+}
+
+// PacketCaptureResultProperties describes the properties of a packet capture session.
+type PacketCaptureResultProperties struct {
+ // ProvisioningState - The provisioning state of the packet capture session. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
+ ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
+ // Target - The ID of the targeted resource, only VM is currently supported.
+ Target *string `json:"target,omitempty"`
+ // BytesToCapturePerPacket - Number of bytes captured per packet, the remaining bytes are truncated.
+ BytesToCapturePerPacket *int32 `json:"bytesToCapturePerPacket,omitempty"`
+ // TotalBytesPerSession - Maximum size of the capture output.
+ TotalBytesPerSession *int32 `json:"totalBytesPerSession,omitempty"`
+ // TimeLimitInSeconds - Maximum duration of the capture session in seconds.
+ TimeLimitInSeconds *int32 `json:"timeLimitInSeconds,omitempty"`
+ StorageLocation *PacketCaptureStorageLocation `json:"storageLocation,omitempty"`
+ Filters *[]PacketCaptureFilter `json:"filters,omitempty"`
+}
+
+// PacketCapturesCreateFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type PacketCapturesCreateFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(PacketCapturesClient) (PacketCaptureResult, error)
+}
+
+// PacketCapturesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type PacketCapturesDeleteFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(PacketCapturesClient) (autorest.Response, error)
+}
+
+// PacketCapturesGetStatusFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type PacketCapturesGetStatusFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(PacketCapturesClient) (PacketCaptureQueryStatusResult, error)
+}
+
+// PacketCapturesStopFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type PacketCapturesStopFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(PacketCapturesClient) (autorest.Response, error)
+}
+
+// PacketCaptureStorageLocation describes the storage location for a packet capture session.
+type PacketCaptureStorageLocation struct {
+ // StorageID - The ID of the storage account to save the packet capture session. Required if no local file path is provided.
+ StorageID *string `json:"storageId,omitempty"`
+ // StoragePath - The URI of the storage path to save the packet capture. Must be a well-formed URI describing the location to save the packet capture.
+ StoragePath *string `json:"storagePath,omitempty"`
+ // FilePath - A valid local path on the targeting VM. Must include the name of the capture file (*.cap). For linux virtual machine it must start with /var/captures. Required if no storage ID is provided, otherwise optional.
+ FilePath *string `json:"filePath,omitempty"`
+}
+
+// PatchRouteFilter route Filter Resource.
+type PatchRouteFilter struct {
+ *RouteFilterPropertiesFormat `json:"properties,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"`
+ // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
+ Etag *string `json:"etag,omitempty"`
+ // Type - READ-ONLY; Resource type.
+ Type *string `json:"type,omitempty"`
+ // Tags - Resource tags.
+ Tags map[string]*string `json:"tags"`
+ // ID - Resource ID.
+ ID *string `json:"id,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for PatchRouteFilter.
+func (prf PatchRouteFilter) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if prf.RouteFilterPropertiesFormat != nil {
+ objectMap["properties"] = prf.RouteFilterPropertiesFormat
+ }
+ if prf.Tags != nil {
+ objectMap["tags"] = prf.Tags
+ }
+ if prf.ID != nil {
+ objectMap["id"] = prf.ID
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for PatchRouteFilter struct.
+func (prf *PatchRouteFilter) 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 routeFilterPropertiesFormat RouteFilterPropertiesFormat
+ err = json.Unmarshal(*v, &routeFilterPropertiesFormat)
+ if err != nil {
+ return err
+ }
+ prf.RouteFilterPropertiesFormat = &routeFilterPropertiesFormat
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ prf.Name = &name
+ }
+ case "etag":
+ if v != nil {
+ var etag string
+ err = json.Unmarshal(*v, &etag)
+ if err != nil {
+ return err
+ }
+ prf.Etag = &etag
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ prf.Type = &typeVar
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ prf.Tags = tags
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ prf.ID = &ID
+ }
+ }
+ }
+
+ return nil
+}
+
+// PatchRouteFilterRule route Filter Rule Resource
+type PatchRouteFilterRule struct {
+ *RouteFilterRulePropertiesFormat `json:"properties,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"`
+ // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
+ Etag *string `json:"etag,omitempty"`
+ // Tags - Resource tags.
+ Tags map[string]*string `json:"tags"`
+ // ID - Resource ID.
+ ID *string `json:"id,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for PatchRouteFilterRule.
+func (prfr PatchRouteFilterRule) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if prfr.RouteFilterRulePropertiesFormat != nil {
+ objectMap["properties"] = prfr.RouteFilterRulePropertiesFormat
+ }
+ if prfr.Tags != nil {
+ objectMap["tags"] = prfr.Tags
+ }
+ if prfr.ID != nil {
+ objectMap["id"] = prfr.ID
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for PatchRouteFilterRule struct.
+func (prfr *PatchRouteFilterRule) 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 routeFilterRulePropertiesFormat RouteFilterRulePropertiesFormat
+ err = json.Unmarshal(*v, &routeFilterRulePropertiesFormat)
+ if err != nil {
+ return err
+ }
+ prfr.RouteFilterRulePropertiesFormat = &routeFilterRulePropertiesFormat
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ prfr.Name = &name
+ }
+ case "etag":
+ if v != nil {
+ var etag string
+ err = json.Unmarshal(*v, &etag)
+ if err != nil {
+ return err
+ }
+ prfr.Etag = &etag
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ prfr.Tags = tags
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ prfr.ID = &ID
+ }
+ }
+ }
+
+ return nil
+}
+
+// Probe a load balancer probe.
+type Probe struct {
+ autorest.Response `json:"-"`
+ // ProbePropertiesFormat - Properties of load balancer probe.
+ *ProbePropertiesFormat `json:"properties,omitempty"`
+ // Name - Gets 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"`
+ // Etag - A unique read-only string that changes whenever the resource is updated.
+ Etag *string `json:"etag,omitempty"`
+ // ID - Resource ID.
+ ID *string `json:"id,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for Probe.
+func (p Probe) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if p.ProbePropertiesFormat != nil {
+ objectMap["properties"] = p.ProbePropertiesFormat
+ }
+ if p.Name != nil {
+ objectMap["name"] = p.Name
+ }
+ if p.Etag != nil {
+ objectMap["etag"] = p.Etag
+ }
+ if p.ID != nil {
+ objectMap["id"] = p.ID
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for Probe struct.
+func (p *Probe) 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 probePropertiesFormat ProbePropertiesFormat
+ err = json.Unmarshal(*v, &probePropertiesFormat)
+ if err != nil {
+ return err
+ }
+ p.ProbePropertiesFormat = &probePropertiesFormat
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ p.Name = &name
+ }
+ case "etag":
+ if v != nil {
+ var etag string
+ err = json.Unmarshal(*v, &etag)
+ if err != nil {
+ return err
+ }
+ p.Etag = &etag
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ p.ID = &ID
+ }
+ }
+ }
+
+ return nil
+}
+
+// ProbePropertiesFormat load balancer probe resource.
+type ProbePropertiesFormat struct {
+ // LoadBalancingRules - READ-ONLY; The load balancer rules that use this probe.
+ LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"`
+ // Protocol - The protocol of the end point. Possible values are: 'Http' or 'Tcp'. If 'Tcp' is specified, a received ACK is required for the probe to be successful. If 'Http' is specified, a 200 OK response from the specifies URI is required for the probe to be successful. Possible values include: 'ProbeProtocolHTTP', 'ProbeProtocolTCP'
+ Protocol ProbeProtocol `json:"protocol,omitempty"`
+ // Port - The port for communicating the probe. Possible values range from 1 to 65535, inclusive.
+ Port *int32 `json:"port,omitempty"`
+ // IntervalInSeconds - The interval, in seconds, for how frequently to probe the endpoint for health status. Typically, the interval is slightly less than half the allocated timeout period (in seconds) which allows two full probes before taking the instance out of rotation. The default value is 15, the minimum value is 5.
+ IntervalInSeconds *int32 `json:"intervalInSeconds,omitempty"`
+ // NumberOfProbes - The number of probes where if no response, will result in stopping further traffic from being delivered to the endpoint. This values allows endpoints to be taken out of rotation faster or slower than the typical times used in Azure.
+ NumberOfProbes *int32 `json:"numberOfProbes,omitempty"`
+ // RequestPath - The URI used for requesting health status from the VM. Path is required if a protocol is set to http. Otherwise, it is not allowed. There is no default value.
+ RequestPath *string `json:"requestPath,omitempty"`
+ // ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for ProbePropertiesFormat.
+func (ppf ProbePropertiesFormat) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if ppf.Protocol != "" {
+ objectMap["protocol"] = ppf.Protocol
+ }
+ if ppf.Port != nil {
+ objectMap["port"] = ppf.Port
+ }
+ if ppf.IntervalInSeconds != nil {
+ objectMap["intervalInSeconds"] = ppf.IntervalInSeconds
+ }
+ if ppf.NumberOfProbes != nil {
+ objectMap["numberOfProbes"] = ppf.NumberOfProbes
+ }
+ if ppf.RequestPath != nil {
+ objectMap["requestPath"] = ppf.RequestPath
+ }
+ if ppf.ProvisioningState != nil {
+ objectMap["provisioningState"] = ppf.ProvisioningState
+ }
+ return json.Marshal(objectMap)
+}
+
+// PublicIPAddress public IP address resource.
+type PublicIPAddress struct {
+ autorest.Response `json:"-"`
+ // Sku - The public IP address SKU.
+ Sku *PublicIPAddressSku `json:"sku,omitempty"`
+ // PublicIPAddressPropertiesFormat - Public IP address properties.
+ *PublicIPAddressPropertiesFormat `json:"properties,omitempty"`
+ // Etag - A unique read-only string that changes whenever the resource is updated.
+ Etag *string `json:"etag,omitempty"`
+ // Zones - A list of availability zones denoting the IP allocated for the resource needs to come from.
+ Zones *[]string `json:"zones,omitempty"`
+ // ID - 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 PublicIPAddress.
+func (pia PublicIPAddress) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if pia.Sku != nil {
+ objectMap["sku"] = pia.Sku
+ }
+ if pia.PublicIPAddressPropertiesFormat != nil {
+ objectMap["properties"] = pia.PublicIPAddressPropertiesFormat
+ }
+ if pia.Etag != nil {
+ objectMap["etag"] = pia.Etag
+ }
+ if pia.Zones != nil {
+ objectMap["zones"] = pia.Zones
+ }
+ if pia.ID != nil {
+ objectMap["id"] = pia.ID
+ }
+ if pia.Location != nil {
+ objectMap["location"] = pia.Location
+ }
+ if pia.Tags != nil {
+ objectMap["tags"] = pia.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for PublicIPAddress struct.
+func (pia *PublicIPAddress) 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 PublicIPAddressSku
+ err = json.Unmarshal(*v, &sku)
+ if err != nil {
+ return err
+ }
+ pia.Sku = &sku
+ }
+ case "properties":
+ if v != nil {
+ var publicIPAddressPropertiesFormat PublicIPAddressPropertiesFormat
+ err = json.Unmarshal(*v, &publicIPAddressPropertiesFormat)
+ if err != nil {
+ return err
+ }
+ pia.PublicIPAddressPropertiesFormat = &publicIPAddressPropertiesFormat
+ }
+ case "etag":
+ if v != nil {
+ var etag string
+ err = json.Unmarshal(*v, &etag)
+ if err != nil {
+ return err
+ }
+ pia.Etag = &etag
+ }
+ case "zones":
+ if v != nil {
+ var zones []string
+ err = json.Unmarshal(*v, &zones)
+ if err != nil {
+ return err
+ }
+ pia.Zones = &zones
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ pia.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ pia.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ pia.Type = &typeVar
+ }
+ case "location":
+ if v != nil {
+ var location string
+ err = json.Unmarshal(*v, &location)
+ if err != nil {
+ return err
+ }
+ pia.Location = &location
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ pia.Tags = tags
+ }
+ }
+ }
+
+ return nil
+}
+
+// PublicIPAddressDNSSettings contains FQDN of the DNS record associated with the public IP address
+type PublicIPAddressDNSSettings struct {
+ // DomainNameLabel - Gets or sets the Domain name label.The concatenation of the domain name label and the regionalized DNS zone make up the fully qualified domain name associated with the public IP address. If a domain name label is specified, an A DNS record is created for the public IP in the Microsoft Azure DNS system.
+ DomainNameLabel *string `json:"domainNameLabel,omitempty"`
+ // Fqdn - Gets the FQDN, Fully qualified domain name of the A DNS record associated with the public IP. This is the concatenation of the domainNameLabel and the regionalized DNS zone.
+ Fqdn *string `json:"fqdn,omitempty"`
+ // ReverseFqdn - Gets or Sets the Reverse FQDN. A user-visible, fully qualified domain name that resolves to this public IP address. If the reverseFqdn is specified, then a PTR DNS record is created pointing from the IP address in the in-addr.arpa domain to the reverse FQDN.
+ ReverseFqdn *string `json:"reverseFqdn,omitempty"`
+}
+
+// PublicIPAddressesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type PublicIPAddressesCreateOrUpdateFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(PublicIPAddressesClient) (PublicIPAddress, error)
+}
+
+// PublicIPAddressesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type PublicIPAddressesDeleteFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(PublicIPAddressesClient) (autorest.Response, error)
+}
+
+// PublicIPAddressesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type PublicIPAddressesUpdateTagsFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(PublicIPAddressesClient) (PublicIPAddress, error)
+}
+
+// PublicIPAddressListResult response for ListPublicIpAddresses API service call.
+type PublicIPAddressListResult struct {
+ autorest.Response `json:"-"`
+ // Value - A list of public IP addresses that exists in a resource group.
+ Value *[]PublicIPAddress `json:"value,omitempty"`
+ // NextLink - The URL to get the next set of results.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// PublicIPAddressListResultIterator provides access to a complete listing of PublicIPAddress values.
+type PublicIPAddressListResultIterator struct {
+ i int
+ page PublicIPAddressListResultPage
+}
+
+// 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 *PublicIPAddressListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPAddressListResultIterator.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 *PublicIPAddressListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter PublicIPAddressListResultIterator) 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 PublicIPAddressListResultIterator) Response() PublicIPAddressListResult {
+ 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 PublicIPAddressListResultIterator) Value() PublicIPAddress {
+ if !iter.page.NotDone() {
+ return PublicIPAddress{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// Creates a new instance of the PublicIPAddressListResultIterator type.
+func NewPublicIPAddressListResultIterator(page PublicIPAddressListResultPage) PublicIPAddressListResultIterator {
+ return PublicIPAddressListResultIterator{page: page}
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (pialr PublicIPAddressListResult) IsEmpty() bool {
+ return pialr.Value == nil || len(*pialr.Value) == 0
+}
+
+// hasNextLink returns true if the NextLink is not empty.
+func (pialr PublicIPAddressListResult) hasNextLink() bool {
+ return pialr.NextLink != nil && len(*pialr.NextLink) != 0
+}
+
+// publicIPAddressListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (pialr PublicIPAddressListResult) publicIPAddressListResultPreparer(ctx context.Context) (*http.Request, error) {
+ if !pialr.hasNextLink() {
+ return nil, nil
+ }
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(pialr.NextLink)))
+}
+
+// PublicIPAddressListResultPage contains a page of PublicIPAddress values.
+type PublicIPAddressListResultPage struct {
+ fn func(context.Context, PublicIPAddressListResult) (PublicIPAddressListResult, error)
+ pialr PublicIPAddressListResult
+}
+
+// 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 *PublicIPAddressListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPAddressListResultPage.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.pialr)
+ if err != nil {
+ return err
+ }
+ page.pialr = 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 *PublicIPAddressListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page PublicIPAddressListResultPage) NotDone() bool {
+ return !page.pialr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page PublicIPAddressListResultPage) Response() PublicIPAddressListResult {
+ return page.pialr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page PublicIPAddressListResultPage) Values() []PublicIPAddress {
+ if page.pialr.IsEmpty() {
+ return nil
+ }
+ return *page.pialr.Value
+}
+
+// Creates a new instance of the PublicIPAddressListResultPage type.
+func NewPublicIPAddressListResultPage(cur PublicIPAddressListResult, getNextPage func(context.Context, PublicIPAddressListResult) (PublicIPAddressListResult, error)) PublicIPAddressListResultPage {
+ return PublicIPAddressListResultPage{
+ fn: getNextPage,
+ pialr: cur,
+ }
+}
+
+// PublicIPAddressPropertiesFormat public IP address properties.
+type PublicIPAddressPropertiesFormat struct {
+ // PublicIPAllocationMethod - The public IP allocation method. Possible values are: 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic'
+ PublicIPAllocationMethod IPAllocationMethod `json:"publicIPAllocationMethod,omitempty"`
+ // PublicIPAddressVersion - The public IP address version. Possible values are: 'IPv4' and 'IPv6'. Possible values include: 'IPv4', 'IPv6'
+ PublicIPAddressVersion IPVersion `json:"publicIPAddressVersion,omitempty"`
+ // IPConfiguration - READ-ONLY; The IP configuration associated with the public IP address.
+ IPConfiguration *IPConfiguration `json:"ipConfiguration,omitempty"`
+ // DNSSettings - The FQDN of the DNS record associated with the public IP address.
+ DNSSettings *PublicIPAddressDNSSettings `json:"dnsSettings,omitempty"`
+ // IPAddress - The IP address associated with the public IP address resource.
+ IPAddress *string `json:"ipAddress,omitempty"`
+ // IdleTimeoutInMinutes - The idle timeout of the public IP address.
+ IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
+ // ResourceGUID - The resource GUID property of the public IP resource.
+ ResourceGUID *string `json:"resourceGuid,omitempty"`
+ // ProvisioningState - The provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for PublicIPAddressPropertiesFormat.
+func (piapf PublicIPAddressPropertiesFormat) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if piapf.PublicIPAllocationMethod != "" {
+ objectMap["publicIPAllocationMethod"] = piapf.PublicIPAllocationMethod
+ }
+ if piapf.PublicIPAddressVersion != "" {
+ objectMap["publicIPAddressVersion"] = piapf.PublicIPAddressVersion
+ }
+ if piapf.DNSSettings != nil {
+ objectMap["dnsSettings"] = piapf.DNSSettings
+ }
+ if piapf.IPAddress != nil {
+ objectMap["ipAddress"] = piapf.IPAddress
+ }
+ if piapf.IdleTimeoutInMinutes != nil {
+ objectMap["idleTimeoutInMinutes"] = piapf.IdleTimeoutInMinutes
+ }
+ if piapf.ResourceGUID != nil {
+ objectMap["resourceGuid"] = piapf.ResourceGUID
+ }
+ if piapf.ProvisioningState != nil {
+ objectMap["provisioningState"] = piapf.ProvisioningState
+ }
+ return json.Marshal(objectMap)
+}
+
+// PublicIPAddressSku SKU of a public IP address
+type PublicIPAddressSku struct {
+ // Name - Name of a public IP address SKU. Possible values include: 'PublicIPAddressSkuNameBasic', 'PublicIPAddressSkuNameStandard'
+ Name PublicIPAddressSkuName `json:"name,omitempty"`
+}
+
+// QueryTroubleshootingParameters parameters that define the resource to query the troubleshooting result.
+type QueryTroubleshootingParameters struct {
+ // TargetResourceID - The target resource ID to query the troubleshooting result.
+ TargetResourceID *string `json:"targetResourceId,omitempty"`
+}
+
+// Resource common resource representation.
+type Resource struct {
+ // ID - 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.ID != nil {
+ objectMap["id"] = r.ID
+ }
+ if r.Location != nil {
+ objectMap["location"] = r.Location
+ }
+ if r.Tags != nil {
+ objectMap["tags"] = r.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// ResourceNavigationLink resourceNavigationLink resource.
+type ResourceNavigationLink struct {
+ // ResourceNavigationLinkFormat - Resource navigation link properties format.
+ *ResourceNavigationLinkFormat `json:"properties,omitempty"`
+ // Name - 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"`
+ // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
+ Etag *string `json:"etag,omitempty"`
+ // ID - Resource ID.
+ ID *string `json:"id,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for ResourceNavigationLink.
+func (rnl ResourceNavigationLink) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if rnl.ResourceNavigationLinkFormat != nil {
+ objectMap["properties"] = rnl.ResourceNavigationLinkFormat
+ }
+ if rnl.Name != nil {
+ objectMap["name"] = rnl.Name
+ }
+ if rnl.ID != nil {
+ objectMap["id"] = rnl.ID
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for ResourceNavigationLink struct.
+func (rnl *ResourceNavigationLink) 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 resourceNavigationLinkFormat ResourceNavigationLinkFormat
+ err = json.Unmarshal(*v, &resourceNavigationLinkFormat)
+ if err != nil {
+ return err
+ }
+ rnl.ResourceNavigationLinkFormat = &resourceNavigationLinkFormat
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ rnl.Name = &name
+ }
+ case "etag":
+ if v != nil {
+ var etag string
+ err = json.Unmarshal(*v, &etag)
+ if err != nil {
+ return err
+ }
+ rnl.Etag = &etag
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ rnl.ID = &ID
+ }
+ }
+ }
+
+ return nil
+}
+
+// ResourceNavigationLinkFormat properties of ResourceNavigationLink.
+type ResourceNavigationLinkFormat struct {
+ // LinkedResourceType - Resource type of the linked resource.
+ LinkedResourceType *string `json:"linkedResourceType,omitempty"`
+ // Link - Link to the external resource
+ Link *string `json:"link,omitempty"`
+ // ProvisioningState - READ-ONLY; Provisioning state of the ResourceNavigationLink resource.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for ResourceNavigationLinkFormat.
+func (rnlf ResourceNavigationLinkFormat) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if rnlf.LinkedResourceType != nil {
+ objectMap["linkedResourceType"] = rnlf.LinkedResourceType
+ }
+ if rnlf.Link != nil {
+ objectMap["link"] = rnlf.Link
+ }
+ return json.Marshal(objectMap)
+}
+
+// RetentionPolicyParameters parameters that define the retention policy for flow log.
+type RetentionPolicyParameters struct {
+ // Days - Number of days to retain flow log records.
+ Days *int32 `json:"days,omitempty"`
+ // Enabled - Flag to enable/disable retention.
+ Enabled *bool `json:"enabled,omitempty"`
+}
+
+// Route route resource
+type Route struct {
+ autorest.Response `json:"-"`
+ // RoutePropertiesFormat - Properties of the route.
+ *RoutePropertiesFormat `json:"properties,omitempty"`
+ // Name - 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"`
+ // Etag - A unique read-only string that changes whenever the resource is updated.
+ Etag *string `json:"etag,omitempty"`
+ // ID - Resource ID.
+ ID *string `json:"id,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for Route.
+func (r Route) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if r.RoutePropertiesFormat != nil {
+ objectMap["properties"] = r.RoutePropertiesFormat
+ }
+ if r.Name != nil {
+ objectMap["name"] = r.Name
+ }
+ if r.Etag != nil {
+ objectMap["etag"] = r.Etag
+ }
+ if r.ID != nil {
+ objectMap["id"] = r.ID
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for Route struct.
+func (r *Route) 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 routePropertiesFormat RoutePropertiesFormat
+ err = json.Unmarshal(*v, &routePropertiesFormat)
+ if err != nil {
+ return err
+ }
+ r.RoutePropertiesFormat = &routePropertiesFormat
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ r.Name = &name
+ }
+ case "etag":
+ if v != nil {
+ var etag string
+ err = json.Unmarshal(*v, &etag)
+ if err != nil {
+ return err
+ }
+ r.Etag = &etag
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ r.ID = &ID
+ }
+ }
+ }
+
+ return nil
+}
+
+// RouteFilter route Filter Resource.
+type RouteFilter struct {
+ autorest.Response `json:"-"`
+ *RouteFilterPropertiesFormat `json:"properties,omitempty"`
+ // Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
+ Etag *string `json:"etag,omitempty"`
+ // ID - 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 RouteFilter.
+func (rf RouteFilter) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if rf.RouteFilterPropertiesFormat != nil {
+ objectMap["properties"] = rf.RouteFilterPropertiesFormat
+ }
+ if rf.ID != nil {
+ objectMap["id"] = rf.ID
+ }
+ if rf.Location != nil {
+ objectMap["location"] = rf.Location
+ }
+ if rf.Tags != nil {
+ objectMap["tags"] = rf.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for RouteFilter struct.
+func (rf *RouteFilter) 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 routeFilterPropertiesFormat RouteFilterPropertiesFormat
+ err = json.Unmarshal(*v, &routeFilterPropertiesFormat)
+ if err != nil {
+ return err
+ }
+ rf.RouteFilterPropertiesFormat = &routeFilterPropertiesFormat
+ }
+ case "etag":
+ if v != nil {
+ var etag string
+ err = json.Unmarshal(*v, &etag)
+ if err != nil {
+ return err
+ }
+ rf.Etag = &etag
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ rf.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ rf.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ rf.Type = &typeVar
+ }
+ case "location":
+ if v != nil {
+ var location string
+ err = json.Unmarshal(*v, &location)
+ if err != nil {
+ return err
+ }
+ rf.Location = &location
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ rf.Tags = tags
+ }
+ }
+ }
+
+ return nil
+}
+
+// RouteFilterListResult response for the ListRouteFilters API service call.
+type RouteFilterListResult struct {
+ autorest.Response `json:"-"`
+ // Value - Gets a list of route filters in a resource group.
+ Value *[]RouteFilter `json:"value,omitempty"`
+ // NextLink - The URL to get the next set of results.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// RouteFilterListResultIterator provides access to a complete listing of RouteFilter values.
+type RouteFilterListResultIterator struct {
+ i int
+ page RouteFilterListResultPage
+}
+
+// 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 *RouteFilterListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterListResultIterator.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 *RouteFilterListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter RouteFilterListResultIterator) 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 RouteFilterListResultIterator) Response() RouteFilterListResult {
+ 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 RouteFilterListResultIterator) Value() RouteFilter {
+ if !iter.page.NotDone() {
+ return RouteFilter{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// Creates a new instance of the RouteFilterListResultIterator type.
+func NewRouteFilterListResultIterator(page RouteFilterListResultPage) RouteFilterListResultIterator {
+ return RouteFilterListResultIterator{page: page}
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (rflr RouteFilterListResult) IsEmpty() bool {
+ return rflr.Value == nil || len(*rflr.Value) == 0
+}
+
+// hasNextLink returns true if the NextLink is not empty.
+func (rflr RouteFilterListResult) hasNextLink() bool {
+ return rflr.NextLink != nil && len(*rflr.NextLink) != 0
+}
+
+// routeFilterListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (rflr RouteFilterListResult) routeFilterListResultPreparer(ctx context.Context) (*http.Request, error) {
+ if !rflr.hasNextLink() {
+ return nil, nil
+ }
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(rflr.NextLink)))
+}
+
+// RouteFilterListResultPage contains a page of RouteFilter values.
+type RouteFilterListResultPage struct {
+ fn func(context.Context, RouteFilterListResult) (RouteFilterListResult, error)
+ rflr RouteFilterListResult
+}
+
+// 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 *RouteFilterListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterListResultPage.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.rflr)
+ if err != nil {
+ return err
+ }
+ page.rflr = 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 *RouteFilterListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page RouteFilterListResultPage) NotDone() bool {
+ return !page.rflr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page RouteFilterListResultPage) Response() RouteFilterListResult {
+ return page.rflr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page RouteFilterListResultPage) Values() []RouteFilter {
+ if page.rflr.IsEmpty() {
+ return nil
+ }
+ return *page.rflr.Value
+}
+
+// Creates a new instance of the RouteFilterListResultPage type.
+func NewRouteFilterListResultPage(cur RouteFilterListResult, getNextPage func(context.Context, RouteFilterListResult) (RouteFilterListResult, error)) RouteFilterListResultPage {
+ return RouteFilterListResultPage{
+ fn: getNextPage,
+ rflr: cur,
+ }
+}
+
+// RouteFilterPropertiesFormat route Filter Resource
+type RouteFilterPropertiesFormat struct {
+ // Rules - Collection of RouteFilterRules contained within a route filter.
+ Rules *[]RouteFilterRule `json:"rules,omitempty"`
+ // Peerings - A collection of references to express route circuit peerings.
+ Peerings *[]ExpressRouteCircuitPeering `json:"peerings,omitempty"`
+ // ProvisioningState - READ-ONLY; The provisioning state of the resource. Possible values are: 'Updating', 'Deleting', 'Succeeded' and 'Failed'.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for RouteFilterPropertiesFormat.
+func (rfpf RouteFilterPropertiesFormat) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if rfpf.Rules != nil {
+ objectMap["rules"] = rfpf.Rules
+ }
+ if rfpf.Peerings != nil {
+ objectMap["peerings"] = rfpf.Peerings
+ }
+ return json.Marshal(objectMap)
+}
+
+// RouteFilterRule route Filter Rule Resource
+type RouteFilterRule struct {
+ autorest.Response `json:"-"`
+ *RouteFilterRulePropertiesFormat `json:"properties,omitempty"`
+ // Name - 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"`
+ // Location - Resource location.
+ Location *string `json:"location,omitempty"`
+ // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
+ Etag *string `json:"etag,omitempty"`
+ // Tags - Resource tags.
+ Tags map[string]*string `json:"tags"`
+ // ID - Resource ID.
+ ID *string `json:"id,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for RouteFilterRule.
+func (rfr RouteFilterRule) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if rfr.RouteFilterRulePropertiesFormat != nil {
+ objectMap["properties"] = rfr.RouteFilterRulePropertiesFormat
+ }
+ if rfr.Name != nil {
+ objectMap["name"] = rfr.Name
+ }
+ if rfr.Location != nil {
+ objectMap["location"] = rfr.Location
+ }
+ if rfr.Tags != nil {
+ objectMap["tags"] = rfr.Tags
+ }
+ if rfr.ID != nil {
+ objectMap["id"] = rfr.ID
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for RouteFilterRule struct.
+func (rfr *RouteFilterRule) 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 routeFilterRulePropertiesFormat RouteFilterRulePropertiesFormat
+ err = json.Unmarshal(*v, &routeFilterRulePropertiesFormat)
+ if err != nil {
+ return err
+ }
+ rfr.RouteFilterRulePropertiesFormat = &routeFilterRulePropertiesFormat
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ rfr.Name = &name
+ }
+ case "location":
+ if v != nil {
+ var location string
+ err = json.Unmarshal(*v, &location)
+ if err != nil {
+ return err
+ }
+ rfr.Location = &location
+ }
+ case "etag":
+ if v != nil {
+ var etag string
+ err = json.Unmarshal(*v, &etag)
+ if err != nil {
+ return err
+ }
+ rfr.Etag = &etag
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ rfr.Tags = tags
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ rfr.ID = &ID
+ }
+ }
+ }
+
+ return nil
+}
+
+// RouteFilterRuleListResult response for the ListRouteFilterRules API service call
+type RouteFilterRuleListResult struct {
+ autorest.Response `json:"-"`
+ // Value - Gets a list of RouteFilterRules in a resource group.
+ Value *[]RouteFilterRule `json:"value,omitempty"`
+ // NextLink - The URL to get the next set of results.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// RouteFilterRuleListResultIterator provides access to a complete listing of RouteFilterRule values.
+type RouteFilterRuleListResultIterator struct {
+ i int
+ page RouteFilterRuleListResultPage
+}
+
+// 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 *RouteFilterRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterRuleListResultIterator.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 *RouteFilterRuleListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter RouteFilterRuleListResultIterator) 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 RouteFilterRuleListResultIterator) Response() RouteFilterRuleListResult {
+ 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 RouteFilterRuleListResultIterator) Value() RouteFilterRule {
+ if !iter.page.NotDone() {
+ return RouteFilterRule{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// Creates a new instance of the RouteFilterRuleListResultIterator type.
+func NewRouteFilterRuleListResultIterator(page RouteFilterRuleListResultPage) RouteFilterRuleListResultIterator {
+ return RouteFilterRuleListResultIterator{page: page}
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (rfrlr RouteFilterRuleListResult) IsEmpty() bool {
+ return rfrlr.Value == nil || len(*rfrlr.Value) == 0
+}
+
+// hasNextLink returns true if the NextLink is not empty.
+func (rfrlr RouteFilterRuleListResult) hasNextLink() bool {
+ return rfrlr.NextLink != nil && len(*rfrlr.NextLink) != 0
+}
+
+// routeFilterRuleListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (rfrlr RouteFilterRuleListResult) routeFilterRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
+ if !rfrlr.hasNextLink() {
+ return nil, nil
+ }
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(rfrlr.NextLink)))
+}
+
+// RouteFilterRuleListResultPage contains a page of RouteFilterRule values.
+type RouteFilterRuleListResultPage struct {
+ fn func(context.Context, RouteFilterRuleListResult) (RouteFilterRuleListResult, error)
+ rfrlr RouteFilterRuleListResult
+}
+
+// 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 *RouteFilterRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterRuleListResultPage.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.rfrlr)
+ if err != nil {
+ return err
+ }
+ page.rfrlr = 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 *RouteFilterRuleListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page RouteFilterRuleListResultPage) NotDone() bool {
+ return !page.rfrlr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page RouteFilterRuleListResultPage) Response() RouteFilterRuleListResult {
+ return page.rfrlr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page RouteFilterRuleListResultPage) Values() []RouteFilterRule {
+ if page.rfrlr.IsEmpty() {
+ return nil
+ }
+ return *page.rfrlr.Value
+}
+
+// Creates a new instance of the RouteFilterRuleListResultPage type.
+func NewRouteFilterRuleListResultPage(cur RouteFilterRuleListResult, getNextPage func(context.Context, RouteFilterRuleListResult) (RouteFilterRuleListResult, error)) RouteFilterRuleListResultPage {
+ return RouteFilterRuleListResultPage{
+ fn: getNextPage,
+ rfrlr: cur,
+ }
+}
+
+// RouteFilterRulePropertiesFormat route Filter Rule Resource
+type RouteFilterRulePropertiesFormat struct {
+ // Access - The access type of the rule. Valid values are: 'Allow', 'Deny'. Possible values include: 'Allow', 'Deny'
+ Access Access `json:"access,omitempty"`
+ // RouteFilterRuleType - The rule type of the rule. Valid value is: 'Community'
+ RouteFilterRuleType *string `json:"routeFilterRuleType,omitempty"`
+ // Communities - The collection for bgp community values to filter on. e.g. ['12076:5010','12076:5020']
+ Communities *[]string `json:"communities,omitempty"`
+ // ProvisioningState - READ-ONLY; The provisioning state of the resource. Possible values are: 'Updating', 'Deleting', 'Succeeded' and 'Failed'.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for RouteFilterRulePropertiesFormat.
+func (rfrpf RouteFilterRulePropertiesFormat) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if rfrpf.Access != "" {
+ objectMap["access"] = rfrpf.Access
+ }
+ if rfrpf.RouteFilterRuleType != nil {
+ objectMap["routeFilterRuleType"] = rfrpf.RouteFilterRuleType
+ }
+ if rfrpf.Communities != nil {
+ objectMap["communities"] = rfrpf.Communities
+ }
+ return json.Marshal(objectMap)
+}
+
+// RouteFilterRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type RouteFilterRulesCreateOrUpdateFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(RouteFilterRulesClient) (RouteFilterRule, error)
+}
+
+// RouteFilterRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type RouteFilterRulesDeleteFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(RouteFilterRulesClient) (autorest.Response, error)
+}
+
+// RouteFilterRulesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type RouteFilterRulesUpdateFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(RouteFilterRulesClient) (RouteFilterRule, error)
+}
+
+// RouteFiltersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type RouteFiltersCreateOrUpdateFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(RouteFiltersClient) (RouteFilter, error)
+}
+
+// RouteFiltersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type RouteFiltersDeleteFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(RouteFiltersClient) (autorest.Response, error)
+}
+
+// RouteFiltersUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type RouteFiltersUpdateFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(RouteFiltersClient) (RouteFilter, error)
+}
+
+// RouteListResult response for the ListRoute API service call
+type RouteListResult struct {
+ autorest.Response `json:"-"`
+ // Value - Gets a list of routes in a resource group.
+ Value *[]Route `json:"value,omitempty"`
+ // NextLink - The URL to get the next set of results.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// RouteListResultIterator provides access to a complete listing of Route values.
+type RouteListResultIterator struct {
+ i int
+ page RouteListResultPage
+}
+
+// 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 *RouteListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RouteListResultIterator.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 *RouteListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter RouteListResultIterator) 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 RouteListResultIterator) Response() RouteListResult {
+ 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 RouteListResultIterator) Value() Route {
+ if !iter.page.NotDone() {
+ return Route{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// Creates a new instance of the RouteListResultIterator type.
+func NewRouteListResultIterator(page RouteListResultPage) RouteListResultIterator {
+ return RouteListResultIterator{page: page}
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (rlr RouteListResult) IsEmpty() bool {
+ return rlr.Value == nil || len(*rlr.Value) == 0
+}
+
+// hasNextLink returns true if the NextLink is not empty.
+func (rlr RouteListResult) hasNextLink() bool {
+ return rlr.NextLink != nil && len(*rlr.NextLink) != 0
+}
+
+// routeListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (rlr RouteListResult) routeListResultPreparer(ctx context.Context) (*http.Request, error) {
+ if !rlr.hasNextLink() {
+ return nil, nil
+ }
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(rlr.NextLink)))
+}
+
+// RouteListResultPage contains a page of Route values.
+type RouteListResultPage struct {
+ fn func(context.Context, RouteListResult) (RouteListResult, error)
+ rlr RouteListResult
+}
+
+// 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 *RouteListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RouteListResultPage.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.rlr)
+ if err != nil {
+ return err
+ }
+ page.rlr = 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 *RouteListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page RouteListResultPage) NotDone() bool {
+ return !page.rlr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page RouteListResultPage) Response() RouteListResult {
+ return page.rlr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page RouteListResultPage) Values() []Route {
+ if page.rlr.IsEmpty() {
+ return nil
+ }
+ return *page.rlr.Value
+}
+
+// Creates a new instance of the RouteListResultPage type.
+func NewRouteListResultPage(cur RouteListResult, getNextPage func(context.Context, RouteListResult) (RouteListResult, error)) RouteListResultPage {
+ return RouteListResultPage{
+ fn: getNextPage,
+ rlr: cur,
+ }
+}
+
+// RoutePropertiesFormat route resource
+type RoutePropertiesFormat struct {
+ // AddressPrefix - The destination CIDR to which the route applies.
+ AddressPrefix *string `json:"addressPrefix,omitempty"`
+ // NextHopType - The type of Azure hop the packet should be sent to. Possible values are: 'VirtualNetworkGateway', 'VnetLocal', 'Internet', 'VirtualAppliance', and 'None'. Possible values include: 'RouteNextHopTypeVirtualNetworkGateway', 'RouteNextHopTypeVnetLocal', 'RouteNextHopTypeInternet', 'RouteNextHopTypeVirtualAppliance', 'RouteNextHopTypeNone'
+ NextHopType RouteNextHopType `json:"nextHopType,omitempty"`
+ // NextHopIPAddress - The IP address packets should be forwarded to. Next hop values are only allowed in routes where the next hop type is VirtualAppliance.
+ NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"`
+ // ProvisioningState - The provisioning state of the resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+}
+
+// RoutesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type RoutesCreateOrUpdateFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(RoutesClient) (Route, error)
+}
+
+// RoutesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+type RoutesDeleteFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(RoutesClient) (autorest.Response, error)
+}
+
+// RouteTable route table resource.
+type RouteTable struct {
+ autorest.Response `json:"-"`
+ // RouteTablePropertiesFormat - Properties of the route table.
+ *RouteTablePropertiesFormat `json:"properties,omitempty"`
+ // Etag - Gets a unique read-only string that changes whenever the resource is updated.
+ Etag *string `json:"etag,omitempty"`
+ // ID - 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 RouteTable.
+func (rt RouteTable) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if rt.RouteTablePropertiesFormat != nil {
+ objectMap["properties"] = rt.RouteTablePropertiesFormat
+ }
+ if rt.Etag != nil {
+ objectMap["etag"] = rt.Etag
+ }
+ if rt.ID != nil {
+ objectMap["id"] = rt.ID
+ }
+ if rt.Location != nil {
+ objectMap["location"] = rt.Location
+ }
+ if rt.Tags != nil {
+ objectMap["tags"] = rt.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for RouteTable struct.
+func (rt *RouteTable) 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 routeTablePropertiesFormat RouteTablePropertiesFormat
+ err = json.Unmarshal(*v, &routeTablePropertiesFormat)
+ if err != nil {
+ return err
+ }
+ rt.RouteTablePropertiesFormat = &routeTablePropertiesFormat
+ }
+ case "etag":
+ if v != nil {
+ var etag string
+ err = json.Unmarshal(*v, &etag)
+ if err != nil {
+ return err
+ }
+ rt.Etag = &etag
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ rt.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ rt.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ rt.Type = &typeVar
+ }
+ case "location":
+ if v != nil {
+ var location string
+ err = json.Unmarshal(*v, &location)
+ if err != nil {
+ return err
+ }
+ rt.Location = &location
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ rt.Tags = tags
+ }
+ }
+ }
+
+ return nil
+}
+
+// RouteTableListResult response for the ListRouteTable API service call.
+type RouteTableListResult struct {
+ autorest.Response `json:"-"`
+ // Value - Gets a list of route tables in a resource group.
+ Value *[]RouteTable `json:"value,omitempty"`
+ // NextLink - The URL to get the next set of results.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// RouteTableListResultIterator provides access to a complete listing of RouteTable values.
+type RouteTableListResultIterator struct {
+ i int
+ page RouteTableListResultPage
+}
+
+// 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 *RouteTableListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RouteTableListResultIterator.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 *RouteTableListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter RouteTableListResultIterator) 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 RouteTableListResultIterator) Response() RouteTableListResult {
+ 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 RouteTableListResultIterator) Value() RouteTable {
+ if !iter.page.NotDone() {
+ return RouteTable{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// Creates a new instance of the RouteTableListResultIterator type.
+func NewRouteTableListResultIterator(page RouteTableListResultPage) RouteTableListResultIterator {
+ return RouteTableListResultIterator{page: page}
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (rtlr RouteTableListResult) IsEmpty() bool {
+ return rtlr.Value == nil || len(*rtlr.Value) == 0
+}
+
+// hasNextLink returns true if the NextLink is not empty.
+func (rtlr RouteTableListResult) hasNextLink() bool {
+ return rtlr.NextLink != nil && len(*rtlr.NextLink) != 0
+}
+
+// routeTableListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (rtlr RouteTableListResult) routeTableListResultPreparer(ctx context.Context) (*http.Request, error) {
+ if !rtlr.hasNextLink() {
+ return nil, nil
+ }
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(rtlr.NextLink)))
+}
+
+// RouteTableListResultPage contains a page of RouteTable values.
+type RouteTableListResultPage struct {
+ fn func(context.Context, RouteTableListResult) (RouteTableListResult, error)
+ rtlr RouteTableListResult
+}
+
+// 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 *RouteTableListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RouteTableListResultPage.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.rtlr)
+ if err != nil {
+ return err
+ }
+ page.rtlr = 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 *RouteTableListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page RouteTableListResultPage) NotDone() bool {
+ return !page.rtlr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page RouteTableListResultPage) Response() RouteTableListResult {
+ return page.rtlr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page RouteTableListResultPage) Values() []RouteTable {
+ if page.rtlr.IsEmpty() {
+ return nil
+ }
+ return *page.rtlr.Value
+}
+
+// Creates a new instance of the RouteTableListResultPage type.
+func NewRouteTableListResultPage(cur RouteTableListResult, getNextPage func(context.Context, RouteTableListResult) (RouteTableListResult, error)) RouteTableListResultPage {
+ return RouteTableListResultPage{
+ fn: getNextPage,
+ rtlr: cur,
+ }
+}
+
+// RouteTablePropertiesFormat route Table resource
+type RouteTablePropertiesFormat struct {
+ // Routes - Collection of routes contained within a route table.
+ Routes *[]Route `json:"routes,omitempty"`
+ // Subnets - READ-ONLY; A collection of references to subnets.
+ Subnets *[]Subnet `json:"subnets,omitempty"`
+ // DisableBgpRoutePropagation - Gets or sets whether to disable the routes learned by BGP on that route table. True means disable.
+ DisableBgpRoutePropagation *bool `json:"disableBgpRoutePropagation,omitempty"`
+ // ProvisioningState - The provisioning state of the resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for RouteTablePropertiesFormat.
+func (rtpf RouteTablePropertiesFormat) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if rtpf.Routes != nil {
+ objectMap["routes"] = rtpf.Routes
+ }
+ if rtpf.DisableBgpRoutePropagation != nil {
+ objectMap["disableBgpRoutePropagation"] = rtpf.DisableBgpRoutePropagation
+ }
+ if rtpf.ProvisioningState != nil {
+ objectMap["provisioningState"] = rtpf.ProvisioningState
+ }
+ return json.Marshal(objectMap)
+}
+
+// RouteTablesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type RouteTablesCreateOrUpdateFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(RouteTablesClient) (RouteTable, error)
+}
+
+// RouteTablesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type RouteTablesDeleteFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(RouteTablesClient) (autorest.Response, error)
+}
+
+// RouteTablesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type RouteTablesUpdateTagsFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(RouteTablesClient) (RouteTable, error)
+}
+
+// SecurityGroup networkSecurityGroup resource.
+type SecurityGroup struct {
+ autorest.Response `json:"-"`
+ // SecurityGroupPropertiesFormat - Properties of the network security group
+ *SecurityGroupPropertiesFormat `json:"properties,omitempty"`
+ // Etag - A unique read-only string that changes whenever the resource is updated.
+ Etag *string `json:"etag,omitempty"`
+ // ID - 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 SecurityGroup.
+func (sg SecurityGroup) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if sg.SecurityGroupPropertiesFormat != nil {
+ objectMap["properties"] = sg.SecurityGroupPropertiesFormat
+ }
+ if sg.Etag != nil {
+ objectMap["etag"] = sg.Etag
+ }
+ if sg.ID != nil {
+ objectMap["id"] = sg.ID
+ }
+ if sg.Location != nil {
+ objectMap["location"] = sg.Location
+ }
+ if sg.Tags != nil {
+ objectMap["tags"] = sg.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for SecurityGroup struct.
+func (sg *SecurityGroup) 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 securityGroupPropertiesFormat SecurityGroupPropertiesFormat
+ err = json.Unmarshal(*v, &securityGroupPropertiesFormat)
+ if err != nil {
+ return err
+ }
+ sg.SecurityGroupPropertiesFormat = &securityGroupPropertiesFormat
+ }
+ case "etag":
+ if v != nil {
+ var etag string
+ err = json.Unmarshal(*v, &etag)
+ if err != nil {
+ return err
+ }
+ sg.Etag = &etag
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ sg.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ sg.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ sg.Type = &typeVar
+ }
+ case "location":
+ if v != nil {
+ var location string
+ err = json.Unmarshal(*v, &location)
+ if err != nil {
+ return err
+ }
+ sg.Location = &location
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ sg.Tags = tags
+ }
+ }
+ }
+
+ return nil
+}
+
+// SecurityGroupListResult response for ListNetworkSecurityGroups API service call.
+type SecurityGroupListResult struct {
+ autorest.Response `json:"-"`
+ // Value - A list of NetworkSecurityGroup resources.
+ Value *[]SecurityGroup `json:"value,omitempty"`
+ // NextLink - The URL to get the next set of results.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// SecurityGroupListResultIterator provides access to a complete listing of SecurityGroup values.
+type SecurityGroupListResultIterator struct {
+ i int
+ page SecurityGroupListResultPage
+}
+
+// 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 *SecurityGroupListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SecurityGroupListResultIterator.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 *SecurityGroupListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter SecurityGroupListResultIterator) 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 SecurityGroupListResultIterator) Response() SecurityGroupListResult {
+ 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 SecurityGroupListResultIterator) Value() SecurityGroup {
+ if !iter.page.NotDone() {
+ return SecurityGroup{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// Creates a new instance of the SecurityGroupListResultIterator type.
+func NewSecurityGroupListResultIterator(page SecurityGroupListResultPage) SecurityGroupListResultIterator {
+ return SecurityGroupListResultIterator{page: page}
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (sglr SecurityGroupListResult) IsEmpty() bool {
+ return sglr.Value == nil || len(*sglr.Value) == 0
+}
+
+// hasNextLink returns true if the NextLink is not empty.
+func (sglr SecurityGroupListResult) hasNextLink() bool {
+ return sglr.NextLink != nil && len(*sglr.NextLink) != 0
+}
+
+// securityGroupListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (sglr SecurityGroupListResult) securityGroupListResultPreparer(ctx context.Context) (*http.Request, error) {
+ if !sglr.hasNextLink() {
+ return nil, nil
+ }
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(sglr.NextLink)))
+}
+
+// SecurityGroupListResultPage contains a page of SecurityGroup values.
+type SecurityGroupListResultPage struct {
+ fn func(context.Context, SecurityGroupListResult) (SecurityGroupListResult, error)
+ sglr SecurityGroupListResult
+}
+
+// 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 *SecurityGroupListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SecurityGroupListResultPage.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.sglr)
+ if err != nil {
+ return err
+ }
+ page.sglr = 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 *SecurityGroupListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page SecurityGroupListResultPage) NotDone() bool {
+ return !page.sglr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page SecurityGroupListResultPage) Response() SecurityGroupListResult {
+ return page.sglr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page SecurityGroupListResultPage) Values() []SecurityGroup {
+ if page.sglr.IsEmpty() {
+ return nil
+ }
+ return *page.sglr.Value
+}
+
+// Creates a new instance of the SecurityGroupListResultPage type.
+func NewSecurityGroupListResultPage(cur SecurityGroupListResult, getNextPage func(context.Context, SecurityGroupListResult) (SecurityGroupListResult, error)) SecurityGroupListResultPage {
+ return SecurityGroupListResultPage{
+ fn: getNextPage,
+ sglr: cur,
+ }
+}
+
+// SecurityGroupNetworkInterface network interface and all its associated security rules.
+type SecurityGroupNetworkInterface struct {
+ // ID - ID of the network interface.
+ ID *string `json:"id,omitempty"`
+ SecurityRuleAssociations *SecurityRuleAssociations `json:"securityRuleAssociations,omitempty"`
+}
+
+// SecurityGroupPropertiesFormat network Security Group resource.
+type SecurityGroupPropertiesFormat struct {
+ // SecurityRules - A collection of security rules of the network security group.
+ SecurityRules *[]SecurityRule `json:"securityRules,omitempty"`
+ // DefaultSecurityRules - The default security rules of network security group.
+ DefaultSecurityRules *[]SecurityRule `json:"defaultSecurityRules,omitempty"`
+ // NetworkInterfaces - READ-ONLY; A collection of references to network interfaces.
+ NetworkInterfaces *[]Interface `json:"networkInterfaces,omitempty"`
+ // Subnets - READ-ONLY; A collection of references to subnets.
+ Subnets *[]Subnet `json:"subnets,omitempty"`
+ // ResourceGUID - The resource GUID property of the network security group resource.
+ ResourceGUID *string `json:"resourceGuid,omitempty"`
+ // ProvisioningState - The provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for SecurityGroupPropertiesFormat.
+func (sgpf SecurityGroupPropertiesFormat) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if sgpf.SecurityRules != nil {
+ objectMap["securityRules"] = sgpf.SecurityRules
+ }
+ if sgpf.DefaultSecurityRules != nil {
+ objectMap["defaultSecurityRules"] = sgpf.DefaultSecurityRules
+ }
+ if sgpf.ResourceGUID != nil {
+ objectMap["resourceGuid"] = sgpf.ResourceGUID
+ }
+ if sgpf.ProvisioningState != nil {
+ objectMap["provisioningState"] = sgpf.ProvisioningState
+ }
+ return json.Marshal(objectMap)
+}
+
+// SecurityGroupsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type SecurityGroupsCreateOrUpdateFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(SecurityGroupsClient) (SecurityGroup, error)
+}
+
+// SecurityGroupsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type SecurityGroupsDeleteFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(SecurityGroupsClient) (autorest.Response, error)
+}
+
+// SecurityGroupsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type SecurityGroupsUpdateTagsFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(SecurityGroupsClient) (SecurityGroup, error)
+}
+
+// SecurityGroupViewParameters parameters that define the VM to check security groups for.
+type SecurityGroupViewParameters struct {
+ // TargetResourceID - ID of the target VM.
+ TargetResourceID *string `json:"targetResourceId,omitempty"`
+}
+
+// SecurityGroupViewResult the information about security rules applied to the specified VM.
+type SecurityGroupViewResult struct {
+ autorest.Response `json:"-"`
+ // NetworkInterfaces - List of network interfaces on the specified VM.
+ NetworkInterfaces *[]SecurityGroupNetworkInterface `json:"networkInterfaces,omitempty"`
+}
+
+// SecurityRule network security rule.
+type SecurityRule struct {
+ autorest.Response `json:"-"`
+ // SecurityRulePropertiesFormat - Properties of the security rule
+ *SecurityRulePropertiesFormat `json:"properties,omitempty"`
+ // Name - 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"`
+ // Etag - A unique read-only string that changes whenever the resource is updated.
+ Etag *string `json:"etag,omitempty"`
+ // ID - Resource ID.
+ ID *string `json:"id,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for SecurityRule.
+func (sr SecurityRule) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if sr.SecurityRulePropertiesFormat != nil {
+ objectMap["properties"] = sr.SecurityRulePropertiesFormat
+ }
+ if sr.Name != nil {
+ objectMap["name"] = sr.Name
+ }
+ if sr.Etag != nil {
+ objectMap["etag"] = sr.Etag
+ }
+ if sr.ID != nil {
+ objectMap["id"] = sr.ID
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for SecurityRule struct.
+func (sr *SecurityRule) 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 securityRulePropertiesFormat SecurityRulePropertiesFormat
+ err = json.Unmarshal(*v, &securityRulePropertiesFormat)
+ if err != nil {
+ return err
+ }
+ sr.SecurityRulePropertiesFormat = &securityRulePropertiesFormat
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ sr.Name = &name
+ }
+ case "etag":
+ if v != nil {
+ var etag string
+ err = json.Unmarshal(*v, &etag)
+ if err != nil {
+ return err
+ }
+ sr.Etag = &etag
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ sr.ID = &ID
+ }
+ }
+ }
+
+ return nil
+}
+
+// SecurityRuleAssociations all security rules associated with the network interface.
+type SecurityRuleAssociations struct {
+ NetworkInterfaceAssociation *InterfaceAssociation `json:"networkInterfaceAssociation,omitempty"`
+ SubnetAssociation *SubnetAssociation `json:"subnetAssociation,omitempty"`
+ // DefaultSecurityRules - Collection of default security rules of the network security group.
+ DefaultSecurityRules *[]SecurityRule `json:"defaultSecurityRules,omitempty"`
+ // EffectiveSecurityRules - Collection of effective security rules.
+ EffectiveSecurityRules *[]EffectiveNetworkSecurityRule `json:"effectiveSecurityRules,omitempty"`
+}
+
+// SecurityRuleListResult response for ListSecurityRule API service call. Retrieves all security rules that
+// belongs to a network security group.
+type SecurityRuleListResult struct {
+ autorest.Response `json:"-"`
+ // Value - The security rules in a network security group.
+ Value *[]SecurityRule `json:"value,omitempty"`
+ // NextLink - The URL to get the next set of results.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// SecurityRuleListResultIterator provides access to a complete listing of SecurityRule values.
+type SecurityRuleListResultIterator struct {
+ i int
+ page SecurityRuleListResultPage
+}
+
+// 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 *SecurityRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SecurityRuleListResultIterator.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 *SecurityRuleListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter SecurityRuleListResultIterator) 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 SecurityRuleListResultIterator) Response() SecurityRuleListResult {
+ 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 SecurityRuleListResultIterator) Value() SecurityRule {
+ if !iter.page.NotDone() {
+ return SecurityRule{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// Creates a new instance of the SecurityRuleListResultIterator type.
+func NewSecurityRuleListResultIterator(page SecurityRuleListResultPage) SecurityRuleListResultIterator {
+ return SecurityRuleListResultIterator{page: page}
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (srlr SecurityRuleListResult) IsEmpty() bool {
+ return srlr.Value == nil || len(*srlr.Value) == 0
+}
+
+// hasNextLink returns true if the NextLink is not empty.
+func (srlr SecurityRuleListResult) hasNextLink() bool {
+ return srlr.NextLink != nil && len(*srlr.NextLink) != 0
+}
+
+// securityRuleListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (srlr SecurityRuleListResult) securityRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
+ if !srlr.hasNextLink() {
+ return nil, nil
+ }
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(srlr.NextLink)))
+}
+
+// SecurityRuleListResultPage contains a page of SecurityRule values.
+type SecurityRuleListResultPage struct {
+ fn func(context.Context, SecurityRuleListResult) (SecurityRuleListResult, error)
+ srlr SecurityRuleListResult
+}
+
+// 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 *SecurityRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SecurityRuleListResultPage.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.srlr)
+ if err != nil {
+ return err
+ }
+ page.srlr = 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 *SecurityRuleListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page SecurityRuleListResultPage) NotDone() bool {
+ return !page.srlr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page SecurityRuleListResultPage) Response() SecurityRuleListResult {
+ return page.srlr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page SecurityRuleListResultPage) Values() []SecurityRule {
+ if page.srlr.IsEmpty() {
+ return nil
+ }
+ return *page.srlr.Value
+}
+
+// Creates a new instance of the SecurityRuleListResultPage type.
+func NewSecurityRuleListResultPage(cur SecurityRuleListResult, getNextPage func(context.Context, SecurityRuleListResult) (SecurityRuleListResult, error)) SecurityRuleListResultPage {
+ return SecurityRuleListResultPage{
+ fn: getNextPage,
+ srlr: cur,
+ }
+}
+
+// SecurityRulePropertiesFormat security rule resource.
+type SecurityRulePropertiesFormat struct {
+ // Description - A description for this rule. Restricted to 140 chars.
+ Description *string `json:"description,omitempty"`
+ // Protocol - Network protocol this rule applies to. Possible values are 'Tcp', 'Udp', and '*'. Possible values include: 'SecurityRuleProtocolTCP', 'SecurityRuleProtocolUDP', 'SecurityRuleProtocolAsterisk'
+ Protocol SecurityRuleProtocol `json:"protocol,omitempty"`
+ // SourcePortRange - The source port or range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports.
+ SourcePortRange *string `json:"sourcePortRange,omitempty"`
+ // DestinationPortRange - The destination port or range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports.
+ DestinationPortRange *string `json:"destinationPortRange,omitempty"`
+ // SourceAddressPrefix - The CIDR or source IP range. Asterisk '*' can also be used to match all source IPs. Default tags such as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' can also be used. If this is an ingress rule, specifies where network traffic originates from.
+ SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"`
+ // SourceAddressPrefixes - The CIDR or source IP ranges.
+ SourceAddressPrefixes *[]string `json:"sourceAddressPrefixes,omitempty"`
+ // SourceApplicationSecurityGroups - The application security group specified as source.
+ SourceApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"sourceApplicationSecurityGroups,omitempty"`
+ // DestinationAddressPrefix - The destination address prefix. CIDR or destination IP range. Asterisk '*' can also be used to match all source IPs. Default tags such as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' can also be used.
+ DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"`
+ // DestinationAddressPrefixes - The destination address prefixes. CIDR or destination IP ranges.
+ DestinationAddressPrefixes *[]string `json:"destinationAddressPrefixes,omitempty"`
+ // DestinationApplicationSecurityGroups - The application security group specified as destination.
+ DestinationApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"destinationApplicationSecurityGroups,omitempty"`
+ // SourcePortRanges - The source port ranges.
+ SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"`
+ // DestinationPortRanges - The destination port ranges.
+ DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"`
+ // Access - The network traffic is allowed or denied. Possible values are: 'Allow' and 'Deny'. Possible values include: 'SecurityRuleAccessAllow', 'SecurityRuleAccessDeny'
+ Access SecurityRuleAccess `json:"access,omitempty"`
+ // Priority - The priority of the rule. The value can be between 100 and 4096. The priority number must be unique for each rule in the collection. The lower the priority number, the higher the priority of the rule.
+ Priority *int32 `json:"priority,omitempty"`
+ // Direction - The direction of the rule. The direction specifies if rule will be evaluated on incoming or outgoing traffic. Possible values are: 'Inbound' and 'Outbound'. Possible values include: 'SecurityRuleDirectionInbound', 'SecurityRuleDirectionOutbound'
+ Direction SecurityRuleDirection `json:"direction,omitempty"`
+ // ProvisioningState - The provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+}
+
+// SecurityRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type SecurityRulesCreateOrUpdateFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(SecurityRulesClient) (SecurityRule, error)
+}
+
+// SecurityRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type SecurityRulesDeleteFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(SecurityRulesClient) (autorest.Response, error)
+}
+
+// ServiceEndpointPropertiesFormat the service endpoint properties.
+type ServiceEndpointPropertiesFormat struct {
+ // Service - The type of the endpoint service.
+ Service *string `json:"service,omitempty"`
+ // Locations - A list of locations.
+ Locations *[]string `json:"locations,omitempty"`
+ // ProvisioningState - The provisioning state of the resource.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+}
+
+// String ...
+type String struct {
+ autorest.Response `json:"-"`
+ Value *string `json:"value,omitempty"`
+}
+
+// Subnet subnet in a virtual network resource.
+type Subnet struct {
+ autorest.Response `json:"-"`
+ // SubnetPropertiesFormat - Properties of the subnet.
+ *SubnetPropertiesFormat `json:"properties,omitempty"`
+ // Name - 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"`
+ // Etag - A unique read-only string that changes whenever the resource is updated.
+ Etag *string `json:"etag,omitempty"`
+ // ID - Resource ID.
+ ID *string `json:"id,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for Subnet.
+func (s Subnet) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if s.SubnetPropertiesFormat != nil {
+ objectMap["properties"] = s.SubnetPropertiesFormat
+ }
+ if s.Name != nil {
+ objectMap["name"] = s.Name
+ }
+ if s.Etag != nil {
+ objectMap["etag"] = s.Etag
+ }
+ if s.ID != nil {
+ objectMap["id"] = s.ID
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for Subnet struct.
+func (s *Subnet) 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 subnetPropertiesFormat SubnetPropertiesFormat
+ err = json.Unmarshal(*v, &subnetPropertiesFormat)
+ if err != nil {
+ return err
+ }
+ s.SubnetPropertiesFormat = &subnetPropertiesFormat
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ s.Name = &name
+ }
+ case "etag":
+ if v != nil {
+ var etag string
+ err = json.Unmarshal(*v, &etag)
+ if err != nil {
+ return err
+ }
+ s.Etag = &etag
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ s.ID = &ID
+ }
+ }
+ }
+
+ return nil
+}
+
+// SubnetAssociation network interface and its custom security rules.
+type SubnetAssociation struct {
+ // ID - READ-ONLY; Subnet ID.
+ ID *string `json:"id,omitempty"`
+ // SecurityRules - Collection of custom security rules.
+ SecurityRules *[]SecurityRule `json:"securityRules,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for SubnetAssociation.
+func (sa SubnetAssociation) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if sa.SecurityRules != nil {
+ objectMap["securityRules"] = sa.SecurityRules
+ }
+ return json.Marshal(objectMap)
+}
+
+// SubnetListResult response for ListSubnets API service callRetrieves all subnet that belongs to a virtual
+// network
+type SubnetListResult struct {
+ autorest.Response `json:"-"`
+ // Value - The subnets in a virtual network.
+ Value *[]Subnet `json:"value,omitempty"`
+ // NextLink - The URL to get the next set of results.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// SubnetListResultIterator provides access to a complete listing of Subnet values.
+type SubnetListResultIterator struct {
+ i int
+ page SubnetListResultPage
+}
+
+// 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 *SubnetListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SubnetListResultIterator.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 *SubnetListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter SubnetListResultIterator) 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 SubnetListResultIterator) Response() SubnetListResult {
+ 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 SubnetListResultIterator) Value() Subnet {
+ if !iter.page.NotDone() {
+ return Subnet{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// Creates a new instance of the SubnetListResultIterator type.
+func NewSubnetListResultIterator(page SubnetListResultPage) SubnetListResultIterator {
+ return SubnetListResultIterator{page: page}
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (slr SubnetListResult) IsEmpty() bool {
+ return slr.Value == nil || len(*slr.Value) == 0
+}
+
+// hasNextLink returns true if the NextLink is not empty.
+func (slr SubnetListResult) hasNextLink() bool {
+ return slr.NextLink != nil && len(*slr.NextLink) != 0
+}
+
+// subnetListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (slr SubnetListResult) subnetListResultPreparer(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)))
+}
+
+// SubnetListResultPage contains a page of Subnet values.
+type SubnetListResultPage struct {
+ fn func(context.Context, SubnetListResult) (SubnetListResult, error)
+ slr SubnetListResult
+}
+
+// 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 *SubnetListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SubnetListResultPage.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 *SubnetListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page SubnetListResultPage) NotDone() bool {
+ return !page.slr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page SubnetListResultPage) Response() SubnetListResult {
+ return page.slr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page SubnetListResultPage) Values() []Subnet {
+ if page.slr.IsEmpty() {
+ return nil
+ }
+ return *page.slr.Value
+}
+
+// Creates a new instance of the SubnetListResultPage type.
+func NewSubnetListResultPage(cur SubnetListResult, getNextPage func(context.Context, SubnetListResult) (SubnetListResult, error)) SubnetListResultPage {
+ return SubnetListResultPage{
+ fn: getNextPage,
+ slr: cur,
+ }
+}
+
+// SubnetPropertiesFormat properties of the subnet.
+type SubnetPropertiesFormat struct {
+ // AddressPrefix - The address prefix for the subnet.
+ AddressPrefix *string `json:"addressPrefix,omitempty"`
+ // NetworkSecurityGroup - The reference of the NetworkSecurityGroup resource.
+ NetworkSecurityGroup *SecurityGroup `json:"networkSecurityGroup,omitempty"`
+ // RouteTable - The reference of the RouteTable resource.
+ RouteTable *RouteTable `json:"routeTable,omitempty"`
+ // ServiceEndpoints - An array of service endpoints.
+ ServiceEndpoints *[]ServiceEndpointPropertiesFormat `json:"serviceEndpoints,omitempty"`
+ // IPConfigurations - READ-ONLY; Gets an array of references to the network interface IP configurations using subnet.
+ IPConfigurations *[]IPConfiguration `json:"ipConfigurations,omitempty"`
+ // ResourceNavigationLinks - Gets an array of references to the external resources using subnet.
+ ResourceNavigationLinks *[]ResourceNavigationLink `json:"resourceNavigationLinks,omitempty"`
+ // ProvisioningState - The provisioning state of the resource.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for SubnetPropertiesFormat.
+func (spf SubnetPropertiesFormat) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if spf.AddressPrefix != nil {
+ objectMap["addressPrefix"] = spf.AddressPrefix
+ }
+ if spf.NetworkSecurityGroup != nil {
+ objectMap["networkSecurityGroup"] = spf.NetworkSecurityGroup
+ }
+ if spf.RouteTable != nil {
+ objectMap["routeTable"] = spf.RouteTable
+ }
+ if spf.ServiceEndpoints != nil {
+ objectMap["serviceEndpoints"] = spf.ServiceEndpoints
+ }
+ if spf.ResourceNavigationLinks != nil {
+ objectMap["resourceNavigationLinks"] = spf.ResourceNavigationLinks
+ }
+ if spf.ProvisioningState != nil {
+ objectMap["provisioningState"] = spf.ProvisioningState
+ }
+ return json.Marshal(objectMap)
+}
+
+// SubnetsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type SubnetsCreateOrUpdateFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(SubnetsClient) (Subnet, error)
+}
+
+// SubnetsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type SubnetsDeleteFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(SubnetsClient) (autorest.Response, error)
+}
+
+// SubResource reference to another subresource.
+type SubResource struct {
+ // ID - Resource ID.
+ ID *string `json:"id,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)
+}
+
+// Topology topology of the specified resource group.
+type Topology struct {
+ autorest.Response `json:"-"`
+ // ID - READ-ONLY; GUID representing the operation id.
+ ID *string `json:"id,omitempty"`
+ // CreatedDateTime - READ-ONLY; The datetime when the topology was initially created for the resource group.
+ CreatedDateTime *date.Time `json:"createdDateTime,omitempty"`
+ // LastModified - READ-ONLY; The datetime when the topology was last modified.
+ LastModified *date.Time `json:"lastModified,omitempty"`
+ Resources *[]TopologyResource `json:"resources,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for Topology.
+func (t Topology) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if t.Resources != nil {
+ objectMap["resources"] = t.Resources
+ }
+ return json.Marshal(objectMap)
+}
+
+// TopologyAssociation resources that have an association with the parent resource.
+type TopologyAssociation struct {
+ // Name - The name of the resource that is associated with the parent resource.
+ Name *string `json:"name,omitempty"`
+ // ResourceID - The ID of the resource that is associated with the parent resource.
+ ResourceID *string `json:"resourceId,omitempty"`
+ // AssociationType - The association type of the child resource to the parent resource. Possible values include: 'Associated', 'Contains'
+ AssociationType AssociationType `json:"associationType,omitempty"`
+}
+
+// TopologyParameters parameters that define the representation of topology.
+type TopologyParameters struct {
+ // TargetResourceGroupName - The name of the target resource group to perform topology on.
+ TargetResourceGroupName *string `json:"targetResourceGroupName,omitempty"`
+ // TargetVirtualNetwork - The reference of the Virtual Network resource.
+ TargetVirtualNetwork *SubResource `json:"targetVirtualNetwork,omitempty"`
+ // TargetSubnet - The reference of the Subnet resource.
+ TargetSubnet *SubResource `json:"targetSubnet,omitempty"`
+}
+
+// TopologyResource the network resource topology information for the given resource group.
+type TopologyResource struct {
+ // Name - Name of the resource.
+ Name *string `json:"name,omitempty"`
+ // ID - ID of the resource.
+ ID *string `json:"id,omitempty"`
+ // Location - Resource location.
+ Location *string `json:"location,omitempty"`
+ // Associations - Holds the associations the resource has with other resources in the resource group.
+ Associations *[]TopologyAssociation `json:"associations,omitempty"`
+}
+
+// TroubleshootingDetails information gained from troubleshooting of specified resource.
+type TroubleshootingDetails struct {
+ // ID - The id of the get troubleshoot operation.
+ ID *string `json:"id,omitempty"`
+ // ReasonType - Reason type of failure.
+ ReasonType *string `json:"reasonType,omitempty"`
+ // Summary - A summary of troubleshooting.
+ Summary *string `json:"summary,omitempty"`
+ // Detail - Details on troubleshooting results.
+ Detail *string `json:"detail,omitempty"`
+ // RecommendedActions - List of recommended actions.
+ RecommendedActions *[]TroubleshootingRecommendedActions `json:"recommendedActions,omitempty"`
+}
+
+// TroubleshootingParameters parameters that define the resource to troubleshoot.
+type TroubleshootingParameters struct {
+ // TargetResourceID - The target resource to troubleshoot.
+ TargetResourceID *string `json:"targetResourceId,omitempty"`
+ *TroubleshootingProperties `json:"properties,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for TroubleshootingParameters.
+func (tp TroubleshootingParameters) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if tp.TargetResourceID != nil {
+ objectMap["targetResourceId"] = tp.TargetResourceID
+ }
+ if tp.TroubleshootingProperties != nil {
+ objectMap["properties"] = tp.TroubleshootingProperties
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for TroubleshootingParameters struct.
+func (tp *TroubleshootingParameters) 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 "targetResourceId":
+ if v != nil {
+ var targetResourceID string
+ err = json.Unmarshal(*v, &targetResourceID)
+ if err != nil {
+ return err
+ }
+ tp.TargetResourceID = &targetResourceID
+ }
+ case "properties":
+ if v != nil {
+ var troubleshootingProperties TroubleshootingProperties
+ err = json.Unmarshal(*v, &troubleshootingProperties)
+ if err != nil {
+ return err
+ }
+ tp.TroubleshootingProperties = &troubleshootingProperties
+ }
+ }
+ }
+
+ return nil
+}
+
+// TroubleshootingProperties storage location provided for troubleshoot.
+type TroubleshootingProperties struct {
+ // StorageID - The ID for the storage account to save the troubleshoot result.
+ StorageID *string `json:"storageId,omitempty"`
+ // StoragePath - The path to the blob to save the troubleshoot result in.
+ StoragePath *string `json:"storagePath,omitempty"`
+}
+
+// TroubleshootingRecommendedActions recommended actions based on discovered issues.
+type TroubleshootingRecommendedActions struct {
+ // ActionID - ID of the recommended action.
+ ActionID *string `json:"actionId,omitempty"`
+ // ActionText - Description of recommended actions.
+ ActionText *string `json:"actionText,omitempty"`
+ // ActionURI - The uri linking to a documentation for the recommended troubleshooting actions.
+ ActionURI *string `json:"actionUri,omitempty"`
+ // ActionURIText - The information from the URI for the recommended troubleshooting actions.
+ ActionURIText *string `json:"actionUriText,omitempty"`
+}
+
+// TroubleshootingResult troubleshooting information gained from specified resource.
+type TroubleshootingResult struct {
+ autorest.Response `json:"-"`
+ // StartTime - The start time of the troubleshooting.
+ StartTime *date.Time `json:"startTime,omitempty"`
+ // EndTime - The end time of the troubleshooting.
+ EndTime *date.Time `json:"endTime,omitempty"`
+ // Code - The result code of the troubleshooting.
+ Code *string `json:"code,omitempty"`
+ // Results - Information from troubleshooting.
+ Results *[]TroubleshootingDetails `json:"results,omitempty"`
+}
+
+// TunnelConnectionHealth virtualNetworkGatewayConnection properties
+type TunnelConnectionHealth struct {
+ // Tunnel - READ-ONLY; Tunnel name.
+ Tunnel *string `json:"tunnel,omitempty"`
+ // ConnectionStatus - READ-ONLY; Virtual network Gateway connection status. Possible values include: 'VirtualNetworkGatewayConnectionStatusUnknown', 'VirtualNetworkGatewayConnectionStatusConnecting', 'VirtualNetworkGatewayConnectionStatusConnected', 'VirtualNetworkGatewayConnectionStatusNotConnected'
+ ConnectionStatus VirtualNetworkGatewayConnectionStatus `json:"connectionStatus,omitempty"`
+ // IngressBytesTransferred - READ-ONLY; The Ingress Bytes Transferred in this connection
+ IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"`
+ // EgressBytesTransferred - READ-ONLY; The Egress Bytes Transferred in this connection
+ EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"`
+ // LastConnectionEstablishedUtcTime - READ-ONLY; The time at which connection was established in Utc format.
+ LastConnectionEstablishedUtcTime *string `json:"lastConnectionEstablishedUtcTime,omitempty"`
+}
+
+// Usage describes network resource usage.
+type Usage struct {
+ // ID - READ-ONLY; Resource identifier.
+ ID *string `json:"id,omitempty"`
+ // Unit - An enum describing the unit of measurement.
+ Unit *string `json:"unit,omitempty"`
+ // CurrentValue - The current value of the usage.
+ CurrentValue *int64 `json:"currentValue,omitempty"`
+ // Limit - The limit of usage.
+ Limit *int64 `json:"limit,omitempty"`
+ // Name - The name of the type of usage.
+ Name *UsageName `json:"name,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for Usage.
+func (u Usage) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if u.Unit != nil {
+ objectMap["unit"] = u.Unit
+ }
+ if u.CurrentValue != nil {
+ objectMap["currentValue"] = u.CurrentValue
+ }
+ if u.Limit != nil {
+ objectMap["limit"] = u.Limit
+ }
+ if u.Name != nil {
+ objectMap["name"] = u.Name
+ }
+ return json.Marshal(objectMap)
+}
+
+// UsageName the usage names.
+type UsageName struct {
+ // Value - A string describing the resource name.
+ Value *string `json:"value,omitempty"`
+ // LocalizedValue - A localized string describing the resource name.
+ LocalizedValue *string `json:"localizedValue,omitempty"`
+}
+
+// UsagesListResult the list usages operation response.
+type UsagesListResult struct {
+ autorest.Response `json:"-"`
+ // Value - The list network resource usages.
+ Value *[]Usage `json:"value,omitempty"`
+ // NextLink - URL to get the next set of results.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// UsagesListResultIterator provides access to a complete listing of Usage values.
+type UsagesListResultIterator struct {
+ i int
+ page UsagesListResultPage
+}
+
+// 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 *UsagesListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/UsagesListResultIterator.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 *UsagesListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter UsagesListResultIterator) 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 UsagesListResultIterator) Response() UsagesListResult {
+ 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 UsagesListResultIterator) Value() Usage {
+ if !iter.page.NotDone() {
+ return Usage{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// Creates a new instance of the UsagesListResultIterator type.
+func NewUsagesListResultIterator(page UsagesListResultPage) UsagesListResultIterator {
+ return UsagesListResultIterator{page: page}
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (ulr UsagesListResult) IsEmpty() bool {
+ return ulr.Value == nil || len(*ulr.Value) == 0
+}
+
+// hasNextLink returns true if the NextLink is not empty.
+func (ulr UsagesListResult) hasNextLink() bool {
+ return ulr.NextLink != nil && len(*ulr.NextLink) != 0
+}
+
+// usagesListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (ulr UsagesListResult) usagesListResultPreparer(ctx context.Context) (*http.Request, error) {
+ if !ulr.hasNextLink() {
+ return nil, nil
+ }
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(ulr.NextLink)))
+}
+
+// UsagesListResultPage contains a page of Usage values.
+type UsagesListResultPage struct {
+ fn func(context.Context, UsagesListResult) (UsagesListResult, error)
+ ulr UsagesListResult
+}
+
+// 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 *UsagesListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/UsagesListResultPage.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.ulr)
+ if err != nil {
+ return err
+ }
+ page.ulr = 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 *UsagesListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page UsagesListResultPage) NotDone() bool {
+ return !page.ulr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page UsagesListResultPage) Response() UsagesListResult {
+ return page.ulr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page UsagesListResultPage) Values() []Usage {
+ if page.ulr.IsEmpty() {
+ return nil
+ }
+ return *page.ulr.Value
+}
+
+// Creates a new instance of the UsagesListResultPage type.
+func NewUsagesListResultPage(cur UsagesListResult, getNextPage func(context.Context, UsagesListResult) (UsagesListResult, error)) UsagesListResultPage {
+ return UsagesListResultPage{
+ fn: getNextPage,
+ ulr: cur,
+ }
+}
+
+// VerificationIPFlowParameters parameters that define the IP flow to be verified.
+type VerificationIPFlowParameters struct {
+ // TargetResourceID - The ID of the target resource to perform next-hop on.
+ TargetResourceID *string `json:"targetResourceId,omitempty"`
+ // Direction - The direction of the packet represented as a 5-tuple. Possible values include: 'Inbound', 'Outbound'
+ Direction Direction `json:"direction,omitempty"`
+ // Protocol - Protocol to be verified on. Possible values include: 'ProtocolTCP', 'ProtocolUDP'
+ Protocol Protocol `json:"protocol,omitempty"`
+ // LocalPort - The local port. Acceptable values are a single integer in the range (0-65535). Support for * for the source port, which depends on the direction.
+ LocalPort *string `json:"localPort,omitempty"`
+ // RemotePort - The remote port. Acceptable values are a single integer in the range (0-65535). Support for * for the source port, which depends on the direction.
+ RemotePort *string `json:"remotePort,omitempty"`
+ // LocalIPAddress - The local IP address. Acceptable values are valid IPv4 addresses.
+ LocalIPAddress *string `json:"localIPAddress,omitempty"`
+ // RemoteIPAddress - The remote IP address. Acceptable values are valid IPv4 addresses.
+ RemoteIPAddress *string `json:"remoteIPAddress,omitempty"`
+ // TargetNicResourceID - The NIC ID. (If VM has multiple NICs and IP forwarding is enabled on any of them, then this parameter must be specified. Otherwise optional).
+ TargetNicResourceID *string `json:"targetNicResourceId,omitempty"`
+}
+
+// VerificationIPFlowResult results of IP flow verification on the target resource.
+type VerificationIPFlowResult struct {
+ autorest.Response `json:"-"`
+ // Access - Indicates whether the traffic is allowed or denied. Possible values include: 'Allow', 'Deny'
+ Access Access `json:"access,omitempty"`
+ // RuleName - Name of the rule. If input is not matched against any security rule, it is not displayed.
+ RuleName *string `json:"ruleName,omitempty"`
+}
+
+// VirtualNetwork virtual Network resource.
+type VirtualNetwork struct {
+ autorest.Response `json:"-"`
+ // VirtualNetworkPropertiesFormat - Properties of the virtual network.
+ *VirtualNetworkPropertiesFormat `json:"properties,omitempty"`
+ // Etag - Gets a unique read-only string that changes whenever the resource is updated.
+ Etag *string `json:"etag,omitempty"`
+ // ID - 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 VirtualNetwork.
+func (vn VirtualNetwork) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if vn.VirtualNetworkPropertiesFormat != nil {
+ objectMap["properties"] = vn.VirtualNetworkPropertiesFormat
+ }
+ if vn.Etag != nil {
+ objectMap["etag"] = vn.Etag
+ }
+ if vn.ID != nil {
+ objectMap["id"] = vn.ID
+ }
+ if vn.Location != nil {
+ objectMap["location"] = vn.Location
+ }
+ if vn.Tags != nil {
+ objectMap["tags"] = vn.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for VirtualNetwork struct.
+func (vn *VirtualNetwork) 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 virtualNetworkPropertiesFormat VirtualNetworkPropertiesFormat
+ err = json.Unmarshal(*v, &virtualNetworkPropertiesFormat)
+ if err != nil {
+ return err
+ }
+ vn.VirtualNetworkPropertiesFormat = &virtualNetworkPropertiesFormat
+ }
+ case "etag":
+ if v != nil {
+ var etag string
+ err = json.Unmarshal(*v, &etag)
+ if err != nil {
+ return err
+ }
+ vn.Etag = &etag
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ vn.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ vn.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ vn.Type = &typeVar
+ }
+ case "location":
+ if v != nil {
+ var location string
+ err = json.Unmarshal(*v, &location)
+ if err != nil {
+ return err
+ }
+ vn.Location = &location
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ vn.Tags = tags
+ }
+ }
+ }
+
+ return nil
+}
+
+// VirtualNetworkConnectionGatewayReference a reference to VirtualNetworkGateway or LocalNetworkGateway
+// resource.
+type VirtualNetworkConnectionGatewayReference struct {
+ // ID - The ID of VirtualNetworkGateway or LocalNetworkGateway resource.
+ ID *string `json:"id,omitempty"`
+}
+
+// VirtualNetworkGateway a common class for general resource information
+type VirtualNetworkGateway struct {
+ autorest.Response `json:"-"`
+ // VirtualNetworkGatewayPropertiesFormat - Properties of the virtual network gateway.
+ *VirtualNetworkGatewayPropertiesFormat `json:"properties,omitempty"`
+ // Etag - Gets a unique read-only string that changes whenever the resource is updated.
+ Etag *string `json:"etag,omitempty"`
+ // ID - 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 VirtualNetworkGateway.
+func (vng VirtualNetworkGateway) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if vng.VirtualNetworkGatewayPropertiesFormat != nil {
+ objectMap["properties"] = vng.VirtualNetworkGatewayPropertiesFormat
+ }
+ if vng.Etag != nil {
+ objectMap["etag"] = vng.Etag
+ }
+ if vng.ID != nil {
+ objectMap["id"] = vng.ID
+ }
+ if vng.Location != nil {
+ objectMap["location"] = vng.Location
+ }
+ if vng.Tags != nil {
+ objectMap["tags"] = vng.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGateway struct.
+func (vng *VirtualNetworkGateway) 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 virtualNetworkGatewayPropertiesFormat VirtualNetworkGatewayPropertiesFormat
+ err = json.Unmarshal(*v, &virtualNetworkGatewayPropertiesFormat)
+ if err != nil {
+ return err
+ }
+ vng.VirtualNetworkGatewayPropertiesFormat = &virtualNetworkGatewayPropertiesFormat
+ }
+ case "etag":
+ if v != nil {
+ var etag string
+ err = json.Unmarshal(*v, &etag)
+ if err != nil {
+ return err
+ }
+ vng.Etag = &etag
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ vng.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ vng.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ vng.Type = &typeVar
+ }
+ case "location":
+ if v != nil {
+ var location string
+ err = json.Unmarshal(*v, &location)
+ if err != nil {
+ return err
+ }
+ vng.Location = &location
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ vng.Tags = tags
+ }
+ }
+ }
+
+ return nil
+}
+
+// VirtualNetworkGatewayConnection a common class for general resource information
+type VirtualNetworkGatewayConnection struct {
+ autorest.Response `json:"-"`
+ // VirtualNetworkGatewayConnectionPropertiesFormat - Properties of the virtual network gateway connection.
+ *VirtualNetworkGatewayConnectionPropertiesFormat `json:"properties,omitempty"`
+ // Etag - Gets a unique read-only string that changes whenever the resource is updated.
+ Etag *string `json:"etag,omitempty"`
+ // ID - 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 VirtualNetworkGatewayConnection.
+func (vngc VirtualNetworkGatewayConnection) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if vngc.VirtualNetworkGatewayConnectionPropertiesFormat != nil {
+ objectMap["properties"] = vngc.VirtualNetworkGatewayConnectionPropertiesFormat
+ }
+ if vngc.Etag != nil {
+ objectMap["etag"] = vngc.Etag
+ }
+ if vngc.ID != nil {
+ objectMap["id"] = vngc.ID
+ }
+ if vngc.Location != nil {
+ objectMap["location"] = vngc.Location
+ }
+ if vngc.Tags != nil {
+ objectMap["tags"] = vngc.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGatewayConnection struct.
+func (vngc *VirtualNetworkGatewayConnection) 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 virtualNetworkGatewayConnectionPropertiesFormat VirtualNetworkGatewayConnectionPropertiesFormat
+ err = json.Unmarshal(*v, &virtualNetworkGatewayConnectionPropertiesFormat)
+ if err != nil {
+ return err
+ }
+ vngc.VirtualNetworkGatewayConnectionPropertiesFormat = &virtualNetworkGatewayConnectionPropertiesFormat
+ }
+ case "etag":
+ if v != nil {
+ var etag string
+ err = json.Unmarshal(*v, &etag)
+ if err != nil {
+ return err
+ }
+ vngc.Etag = &etag
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ vngc.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ vngc.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ vngc.Type = &typeVar
+ }
+ case "location":
+ if v != nil {
+ var location string
+ err = json.Unmarshal(*v, &location)
+ if err != nil {
+ return err
+ }
+ vngc.Location = &location
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ vngc.Tags = tags
+ }
+ }
+ }
+
+ return nil
+}
+
+// VirtualNetworkGatewayConnectionListEntity a common class for general resource information
+type VirtualNetworkGatewayConnectionListEntity struct {
+ autorest.Response `json:"-"`
+ // VirtualNetworkGatewayConnectionListEntityPropertiesFormat - Properties of the virtual network gateway connection.
+ *VirtualNetworkGatewayConnectionListEntityPropertiesFormat `json:"properties,omitempty"`
+ // Etag - Gets a unique read-only string that changes whenever the resource is updated.
+ Etag *string `json:"etag,omitempty"`
+ // ID - 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 VirtualNetworkGatewayConnectionListEntity.
+func (vngcle VirtualNetworkGatewayConnectionListEntity) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if vngcle.VirtualNetworkGatewayConnectionListEntityPropertiesFormat != nil {
+ objectMap["properties"] = vngcle.VirtualNetworkGatewayConnectionListEntityPropertiesFormat
+ }
+ if vngcle.Etag != nil {
+ objectMap["etag"] = vngcle.Etag
+ }
+ if vngcle.ID != nil {
+ objectMap["id"] = vngcle.ID
+ }
+ if vngcle.Location != nil {
+ objectMap["location"] = vngcle.Location
+ }
+ if vngcle.Tags != nil {
+ objectMap["tags"] = vngcle.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGatewayConnectionListEntity struct.
+func (vngcle *VirtualNetworkGatewayConnectionListEntity) 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 virtualNetworkGatewayConnectionListEntityPropertiesFormat VirtualNetworkGatewayConnectionListEntityPropertiesFormat
+ err = json.Unmarshal(*v, &virtualNetworkGatewayConnectionListEntityPropertiesFormat)
+ if err != nil {
+ return err
+ }
+ vngcle.VirtualNetworkGatewayConnectionListEntityPropertiesFormat = &virtualNetworkGatewayConnectionListEntityPropertiesFormat
+ }
+ case "etag":
+ if v != nil {
+ var etag string
+ err = json.Unmarshal(*v, &etag)
+ if err != nil {
+ return err
+ }
+ vngcle.Etag = &etag
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ vngcle.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ vngcle.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ vngcle.Type = &typeVar
+ }
+ case "location":
+ if v != nil {
+ var location string
+ err = json.Unmarshal(*v, &location)
+ if err != nil {
+ return err
+ }
+ vngcle.Location = &location
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ vngcle.Tags = tags
+ }
+ }
+ }
+
+ return nil
+}
+
+// VirtualNetworkGatewayConnectionListEntityPropertiesFormat virtualNetworkGatewayConnection properties
+type VirtualNetworkGatewayConnectionListEntityPropertiesFormat struct {
+ // AuthorizationKey - The authorizationKey.
+ AuthorizationKey *string `json:"authorizationKey,omitempty"`
+ // VirtualNetworkGateway1 - The reference to virtual network gateway resource.
+ VirtualNetworkGateway1 *VirtualNetworkConnectionGatewayReference `json:"virtualNetworkGateway1,omitempty"`
+ // VirtualNetworkGateway2 - The reference to virtual network gateway resource.
+ VirtualNetworkGateway2 *VirtualNetworkConnectionGatewayReference `json:"virtualNetworkGateway2,omitempty"`
+ // LocalNetworkGateway2 - The reference to local network gateway resource.
+ LocalNetworkGateway2 *VirtualNetworkConnectionGatewayReference `json:"localNetworkGateway2,omitempty"`
+ // ConnectionType - Gateway connection type. Possible values are: 'IPsec','Vnet2Vnet','ExpressRoute', and 'VPNClient. Possible values include: 'IPsec', 'Vnet2Vnet', 'ExpressRoute', 'VPNClient'
+ ConnectionType VirtualNetworkGatewayConnectionType `json:"connectionType,omitempty"`
+ // RoutingWeight - The routing weight.
+ RoutingWeight *int32 `json:"routingWeight,omitempty"`
+ // SharedKey - The IPSec shared key.
+ SharedKey *string `json:"sharedKey,omitempty"`
+ // ConnectionStatus - READ-ONLY; Virtual network Gateway connection status. Possible values are 'Unknown', 'Connecting', 'Connected' and 'NotConnected'. Possible values include: 'VirtualNetworkGatewayConnectionStatusUnknown', 'VirtualNetworkGatewayConnectionStatusConnecting', 'VirtualNetworkGatewayConnectionStatusConnected', 'VirtualNetworkGatewayConnectionStatusNotConnected'
+ ConnectionStatus VirtualNetworkGatewayConnectionStatus `json:"connectionStatus,omitempty"`
+ // TunnelConnectionStatus - READ-ONLY; Collection of all tunnels' connection health status.
+ TunnelConnectionStatus *[]TunnelConnectionHealth `json:"tunnelConnectionStatus,omitempty"`
+ // EgressBytesTransferred - READ-ONLY; The egress bytes transferred in this connection.
+ EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"`
+ // IngressBytesTransferred - READ-ONLY; The ingress bytes transferred in this connection.
+ IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"`
+ // Peer - The reference to peerings resource.
+ Peer *SubResource `json:"peer,omitempty"`
+ // EnableBgp - EnableBgp flag
+ EnableBgp *bool `json:"enableBgp,omitempty"`
+ // UsePolicyBasedTrafficSelectors - Enable policy-based traffic selectors.
+ UsePolicyBasedTrafficSelectors *bool `json:"usePolicyBasedTrafficSelectors,omitempty"`
+ // IpsecPolicies - The IPSec Policies to be considered by this connection.
+ IpsecPolicies *[]IpsecPolicy `json:"ipsecPolicies,omitempty"`
+ // ResourceGUID - The resource GUID property of the VirtualNetworkGatewayConnection resource.
+ ResourceGUID *string `json:"resourceGuid,omitempty"`
+ // ProvisioningState - READ-ONLY; The provisioning state of the VirtualNetworkGatewayConnection resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnectionListEntityPropertiesFormat.
+func (vngclepf VirtualNetworkGatewayConnectionListEntityPropertiesFormat) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if vngclepf.AuthorizationKey != nil {
+ objectMap["authorizationKey"] = vngclepf.AuthorizationKey
+ }
+ if vngclepf.VirtualNetworkGateway1 != nil {
+ objectMap["virtualNetworkGateway1"] = vngclepf.VirtualNetworkGateway1
+ }
+ if vngclepf.VirtualNetworkGateway2 != nil {
+ objectMap["virtualNetworkGateway2"] = vngclepf.VirtualNetworkGateway2
+ }
+ if vngclepf.LocalNetworkGateway2 != nil {
+ objectMap["localNetworkGateway2"] = vngclepf.LocalNetworkGateway2
+ }
+ if vngclepf.ConnectionType != "" {
+ objectMap["connectionType"] = vngclepf.ConnectionType
+ }
+ if vngclepf.RoutingWeight != nil {
+ objectMap["routingWeight"] = vngclepf.RoutingWeight
+ }
+ if vngclepf.SharedKey != nil {
+ objectMap["sharedKey"] = vngclepf.SharedKey
+ }
+ if vngclepf.Peer != nil {
+ objectMap["peer"] = vngclepf.Peer
+ }
+ if vngclepf.EnableBgp != nil {
+ objectMap["enableBgp"] = vngclepf.EnableBgp
+ }
+ if vngclepf.UsePolicyBasedTrafficSelectors != nil {
+ objectMap["usePolicyBasedTrafficSelectors"] = vngclepf.UsePolicyBasedTrafficSelectors
+ }
+ if vngclepf.IpsecPolicies != nil {
+ objectMap["ipsecPolicies"] = vngclepf.IpsecPolicies
+ }
+ if vngclepf.ResourceGUID != nil {
+ objectMap["resourceGuid"] = vngclepf.ResourceGUID
+ }
+ return json.Marshal(objectMap)
+}
+
+// VirtualNetworkGatewayConnectionListResult response for the ListVirtualNetworkGatewayConnections API
+// service call
+type VirtualNetworkGatewayConnectionListResult struct {
+ autorest.Response `json:"-"`
+ // Value - Gets a list of VirtualNetworkGatewayConnection resources that exists in a resource group.
+ Value *[]VirtualNetworkGatewayConnection `json:"value,omitempty"`
+ // NextLink - READ-ONLY; The URL to get the next set of results.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnectionListResult.
+func (vngclr VirtualNetworkGatewayConnectionListResult) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if vngclr.Value != nil {
+ objectMap["value"] = vngclr.Value
+ }
+ return json.Marshal(objectMap)
+}
+
+// VirtualNetworkGatewayConnectionListResultIterator provides access to a complete listing of
+// VirtualNetworkGatewayConnection values.
+type VirtualNetworkGatewayConnectionListResultIterator struct {
+ i int
+ page VirtualNetworkGatewayConnectionListResultPage
+}
+
+// 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 *VirtualNetworkGatewayConnectionListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayConnectionListResultIterator.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 *VirtualNetworkGatewayConnectionListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter VirtualNetworkGatewayConnectionListResultIterator) 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 VirtualNetworkGatewayConnectionListResultIterator) Response() VirtualNetworkGatewayConnectionListResult {
+ 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 VirtualNetworkGatewayConnectionListResultIterator) Value() VirtualNetworkGatewayConnection {
+ if !iter.page.NotDone() {
+ return VirtualNetworkGatewayConnection{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// Creates a new instance of the VirtualNetworkGatewayConnectionListResultIterator type.
+func NewVirtualNetworkGatewayConnectionListResultIterator(page VirtualNetworkGatewayConnectionListResultPage) VirtualNetworkGatewayConnectionListResultIterator {
+ return VirtualNetworkGatewayConnectionListResultIterator{page: page}
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (vngclr VirtualNetworkGatewayConnectionListResult) IsEmpty() bool {
+ return vngclr.Value == nil || len(*vngclr.Value) == 0
+}
+
+// hasNextLink returns true if the NextLink is not empty.
+func (vngclr VirtualNetworkGatewayConnectionListResult) hasNextLink() bool {
+ return vngclr.NextLink != nil && len(*vngclr.NextLink) != 0
+}
+
+// virtualNetworkGatewayConnectionListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (vngclr VirtualNetworkGatewayConnectionListResult) virtualNetworkGatewayConnectionListResultPreparer(ctx context.Context) (*http.Request, error) {
+ if !vngclr.hasNextLink() {
+ return nil, nil
+ }
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(vngclr.NextLink)))
+}
+
+// VirtualNetworkGatewayConnectionListResultPage contains a page of VirtualNetworkGatewayConnection values.
+type VirtualNetworkGatewayConnectionListResultPage struct {
+ fn func(context.Context, VirtualNetworkGatewayConnectionListResult) (VirtualNetworkGatewayConnectionListResult, error)
+ vngclr VirtualNetworkGatewayConnectionListResult
+}
+
+// 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 *VirtualNetworkGatewayConnectionListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayConnectionListResultPage.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.vngclr)
+ if err != nil {
+ return err
+ }
+ page.vngclr = 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 *VirtualNetworkGatewayConnectionListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page VirtualNetworkGatewayConnectionListResultPage) NotDone() bool {
+ return !page.vngclr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page VirtualNetworkGatewayConnectionListResultPage) Response() VirtualNetworkGatewayConnectionListResult {
+ return page.vngclr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page VirtualNetworkGatewayConnectionListResultPage) Values() []VirtualNetworkGatewayConnection {
+ if page.vngclr.IsEmpty() {
+ return nil
+ }
+ return *page.vngclr.Value
+}
+
+// Creates a new instance of the VirtualNetworkGatewayConnectionListResultPage type.
+func NewVirtualNetworkGatewayConnectionListResultPage(cur VirtualNetworkGatewayConnectionListResult, getNextPage func(context.Context, VirtualNetworkGatewayConnectionListResult) (VirtualNetworkGatewayConnectionListResult, error)) VirtualNetworkGatewayConnectionListResultPage {
+ return VirtualNetworkGatewayConnectionListResultPage{
+ fn: getNextPage,
+ vngclr: cur,
+ }
+}
+
+// VirtualNetworkGatewayConnectionPropertiesFormat virtualNetworkGatewayConnection properties
+type VirtualNetworkGatewayConnectionPropertiesFormat struct {
+ // AuthorizationKey - The authorizationKey.
+ AuthorizationKey *string `json:"authorizationKey,omitempty"`
+ // VirtualNetworkGateway1 - The reference to virtual network gateway resource.
+ VirtualNetworkGateway1 *VirtualNetworkGateway `json:"virtualNetworkGateway1,omitempty"`
+ // VirtualNetworkGateway2 - The reference to virtual network gateway resource.
+ VirtualNetworkGateway2 *VirtualNetworkGateway `json:"virtualNetworkGateway2,omitempty"`
+ // LocalNetworkGateway2 - The reference to local network gateway resource.
+ LocalNetworkGateway2 *LocalNetworkGateway `json:"localNetworkGateway2,omitempty"`
+ // ConnectionType - Gateway connection type. Possible values are: 'IPsec','Vnet2Vnet','ExpressRoute', and 'VPNClient. Possible values include: 'IPsec', 'Vnet2Vnet', 'ExpressRoute', 'VPNClient'
+ ConnectionType VirtualNetworkGatewayConnectionType `json:"connectionType,omitempty"`
+ // RoutingWeight - The routing weight.
+ RoutingWeight *int32 `json:"routingWeight,omitempty"`
+ // SharedKey - The IPSec shared key.
+ SharedKey *string `json:"sharedKey,omitempty"`
+ // ConnectionStatus - READ-ONLY; Virtual network Gateway connection status. Possible values are 'Unknown', 'Connecting', 'Connected' and 'NotConnected'. Possible values include: 'VirtualNetworkGatewayConnectionStatusUnknown', 'VirtualNetworkGatewayConnectionStatusConnecting', 'VirtualNetworkGatewayConnectionStatusConnected', 'VirtualNetworkGatewayConnectionStatusNotConnected'
+ ConnectionStatus VirtualNetworkGatewayConnectionStatus `json:"connectionStatus,omitempty"`
+ // TunnelConnectionStatus - READ-ONLY; Collection of all tunnels' connection health status.
+ TunnelConnectionStatus *[]TunnelConnectionHealth `json:"tunnelConnectionStatus,omitempty"`
+ // EgressBytesTransferred - READ-ONLY; The egress bytes transferred in this connection.
+ EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"`
+ // IngressBytesTransferred - READ-ONLY; The ingress bytes transferred in this connection.
+ IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"`
+ // Peer - The reference to peerings resource.
+ Peer *SubResource `json:"peer,omitempty"`
+ // EnableBgp - EnableBgp flag
+ EnableBgp *bool `json:"enableBgp,omitempty"`
+ // UsePolicyBasedTrafficSelectors - Enable policy-based traffic selectors.
+ UsePolicyBasedTrafficSelectors *bool `json:"usePolicyBasedTrafficSelectors,omitempty"`
+ // IpsecPolicies - The IPSec Policies to be considered by this connection.
+ IpsecPolicies *[]IpsecPolicy `json:"ipsecPolicies,omitempty"`
+ // ResourceGUID - The resource GUID property of the VirtualNetworkGatewayConnection resource.
+ ResourceGUID *string `json:"resourceGuid,omitempty"`
+ // ProvisioningState - READ-ONLY; The provisioning state of the VirtualNetworkGatewayConnection resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnectionPropertiesFormat.
+func (vngcpf VirtualNetworkGatewayConnectionPropertiesFormat) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if vngcpf.AuthorizationKey != nil {
+ objectMap["authorizationKey"] = vngcpf.AuthorizationKey
+ }
+ if vngcpf.VirtualNetworkGateway1 != nil {
+ objectMap["virtualNetworkGateway1"] = vngcpf.VirtualNetworkGateway1
+ }
+ if vngcpf.VirtualNetworkGateway2 != nil {
+ objectMap["virtualNetworkGateway2"] = vngcpf.VirtualNetworkGateway2
+ }
+ if vngcpf.LocalNetworkGateway2 != nil {
+ objectMap["localNetworkGateway2"] = vngcpf.LocalNetworkGateway2
+ }
+ if vngcpf.ConnectionType != "" {
+ objectMap["connectionType"] = vngcpf.ConnectionType
+ }
+ if vngcpf.RoutingWeight != nil {
+ objectMap["routingWeight"] = vngcpf.RoutingWeight
+ }
+ if vngcpf.SharedKey != nil {
+ objectMap["sharedKey"] = vngcpf.SharedKey
+ }
+ if vngcpf.Peer != nil {
+ objectMap["peer"] = vngcpf.Peer
+ }
+ if vngcpf.EnableBgp != nil {
+ objectMap["enableBgp"] = vngcpf.EnableBgp
+ }
+ if vngcpf.UsePolicyBasedTrafficSelectors != nil {
+ objectMap["usePolicyBasedTrafficSelectors"] = vngcpf.UsePolicyBasedTrafficSelectors
+ }
+ if vngcpf.IpsecPolicies != nil {
+ objectMap["ipsecPolicies"] = vngcpf.IpsecPolicies
+ }
+ if vngcpf.ResourceGUID != nil {
+ objectMap["resourceGuid"] = vngcpf.ResourceGUID
+ }
+ return json.Marshal(objectMap)
+}
+
+// VirtualNetworkGatewayConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
+// results of a long-running operation.
+type VirtualNetworkGatewayConnectionsCreateOrUpdateFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(VirtualNetworkGatewayConnectionsClient) (VirtualNetworkGatewayConnection, error)
+}
+
+// VirtualNetworkGatewayConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of
+// a long-running operation.
+type VirtualNetworkGatewayConnectionsDeleteFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(VirtualNetworkGatewayConnectionsClient) (autorest.Response, error)
+}
+
+// VirtualNetworkGatewayConnectionsResetSharedKeyFuture an abstraction for monitoring and retrieving the
+// results of a long-running operation.
+type VirtualNetworkGatewayConnectionsResetSharedKeyFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(VirtualNetworkGatewayConnectionsClient) (ConnectionResetSharedKey, error)
+}
+
+// VirtualNetworkGatewayConnectionsSetSharedKeyFuture an abstraction for monitoring and retrieving the
+// results of a long-running operation.
+type VirtualNetworkGatewayConnectionsSetSharedKeyFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(VirtualNetworkGatewayConnectionsClient) (ConnectionSharedKey, error)
+}
+
+// VirtualNetworkGatewayConnectionsUpdateTagsFuture an abstraction for monitoring and retrieving the
+// results of a long-running operation.
+type VirtualNetworkGatewayConnectionsUpdateTagsFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(VirtualNetworkGatewayConnectionsClient) (VirtualNetworkGatewayConnectionListEntity, error)
+}
+
+// VirtualNetworkGatewayIPConfiguration IP configuration for virtual network gateway
+type VirtualNetworkGatewayIPConfiguration struct {
+ // VirtualNetworkGatewayIPConfigurationPropertiesFormat - Properties of the virtual network gateway ip configuration.
+ *VirtualNetworkGatewayIPConfigurationPropertiesFormat `json:"properties,omitempty"`
+ // Name - 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"`
+ // Etag - A unique read-only string that changes whenever the resource is updated.
+ Etag *string `json:"etag,omitempty"`
+ // ID - Resource ID.
+ ID *string `json:"id,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for VirtualNetworkGatewayIPConfiguration.
+func (vngic VirtualNetworkGatewayIPConfiguration) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if vngic.VirtualNetworkGatewayIPConfigurationPropertiesFormat != nil {
+ objectMap["properties"] = vngic.VirtualNetworkGatewayIPConfigurationPropertiesFormat
+ }
+ if vngic.Name != nil {
+ objectMap["name"] = vngic.Name
+ }
+ if vngic.Etag != nil {
+ objectMap["etag"] = vngic.Etag
+ }
+ if vngic.ID != nil {
+ objectMap["id"] = vngic.ID
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGatewayIPConfiguration struct.
+func (vngic *VirtualNetworkGatewayIPConfiguration) 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 virtualNetworkGatewayIPConfigurationPropertiesFormat VirtualNetworkGatewayIPConfigurationPropertiesFormat
+ err = json.Unmarshal(*v, &virtualNetworkGatewayIPConfigurationPropertiesFormat)
+ if err != nil {
+ return err
+ }
+ vngic.VirtualNetworkGatewayIPConfigurationPropertiesFormat = &virtualNetworkGatewayIPConfigurationPropertiesFormat
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ vngic.Name = &name
+ }
+ case "etag":
+ if v != nil {
+ var etag string
+ err = json.Unmarshal(*v, &etag)
+ if err != nil {
+ return err
+ }
+ vngic.Etag = &etag
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ vngic.ID = &ID
+ }
+ }
+ }
+
+ return nil
+}
+
+// VirtualNetworkGatewayIPConfigurationPropertiesFormat properties of VirtualNetworkGatewayIPConfiguration
+type VirtualNetworkGatewayIPConfigurationPropertiesFormat struct {
+ // PrivateIPAllocationMethod - The private IP allocation method. Possible values are: 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic'
+ PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
+ // Subnet - The reference of the subnet resource.
+ Subnet *SubResource `json:"subnet,omitempty"`
+ // PublicIPAddress - The reference of the public IP resource.
+ PublicIPAddress *SubResource `json:"publicIPAddress,omitempty"`
+ // ProvisioningState - READ-ONLY; The provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for VirtualNetworkGatewayIPConfigurationPropertiesFormat.
+func (vngicpf VirtualNetworkGatewayIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if vngicpf.PrivateIPAllocationMethod != "" {
+ objectMap["privateIPAllocationMethod"] = vngicpf.PrivateIPAllocationMethod
+ }
+ if vngicpf.Subnet != nil {
+ objectMap["subnet"] = vngicpf.Subnet
+ }
+ if vngicpf.PublicIPAddress != nil {
+ objectMap["publicIPAddress"] = vngicpf.PublicIPAddress
+ }
+ return json.Marshal(objectMap)
+}
+
+// VirtualNetworkGatewayListConnectionsResult response for the VirtualNetworkGatewayListConnections API
+// service call
+type VirtualNetworkGatewayListConnectionsResult struct {
+ autorest.Response `json:"-"`
+ // Value - Gets a list of VirtualNetworkGatewayConnection resources that exists in a resource group.
+ Value *[]VirtualNetworkGatewayConnectionListEntity `json:"value,omitempty"`
+ // NextLink - READ-ONLY; The URL to get the next set of results.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for VirtualNetworkGatewayListConnectionsResult.
+func (vnglcr VirtualNetworkGatewayListConnectionsResult) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if vnglcr.Value != nil {
+ objectMap["value"] = vnglcr.Value
+ }
+ return json.Marshal(objectMap)
+}
+
+// VirtualNetworkGatewayListConnectionsResultIterator provides access to a complete listing of
+// VirtualNetworkGatewayConnectionListEntity values.
+type VirtualNetworkGatewayListConnectionsResultIterator struct {
+ i int
+ page VirtualNetworkGatewayListConnectionsResultPage
+}
+
+// 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 *VirtualNetworkGatewayListConnectionsResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListConnectionsResultIterator.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 *VirtualNetworkGatewayListConnectionsResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter VirtualNetworkGatewayListConnectionsResultIterator) 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 VirtualNetworkGatewayListConnectionsResultIterator) Response() VirtualNetworkGatewayListConnectionsResult {
+ 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 VirtualNetworkGatewayListConnectionsResultIterator) Value() VirtualNetworkGatewayConnectionListEntity {
+ if !iter.page.NotDone() {
+ return VirtualNetworkGatewayConnectionListEntity{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// Creates a new instance of the VirtualNetworkGatewayListConnectionsResultIterator type.
+func NewVirtualNetworkGatewayListConnectionsResultIterator(page VirtualNetworkGatewayListConnectionsResultPage) VirtualNetworkGatewayListConnectionsResultIterator {
+ return VirtualNetworkGatewayListConnectionsResultIterator{page: page}
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (vnglcr VirtualNetworkGatewayListConnectionsResult) IsEmpty() bool {
+ return vnglcr.Value == nil || len(*vnglcr.Value) == 0
+}
+
+// hasNextLink returns true if the NextLink is not empty.
+func (vnglcr VirtualNetworkGatewayListConnectionsResult) hasNextLink() bool {
+ return vnglcr.NextLink != nil && len(*vnglcr.NextLink) != 0
+}
+
+// virtualNetworkGatewayListConnectionsResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (vnglcr VirtualNetworkGatewayListConnectionsResult) virtualNetworkGatewayListConnectionsResultPreparer(ctx context.Context) (*http.Request, error) {
+ if !vnglcr.hasNextLink() {
+ return nil, nil
+ }
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(vnglcr.NextLink)))
+}
+
+// VirtualNetworkGatewayListConnectionsResultPage contains a page of
+// VirtualNetworkGatewayConnectionListEntity values.
+type VirtualNetworkGatewayListConnectionsResultPage struct {
+ fn func(context.Context, VirtualNetworkGatewayListConnectionsResult) (VirtualNetworkGatewayListConnectionsResult, error)
+ vnglcr VirtualNetworkGatewayListConnectionsResult
+}
+
+// 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 *VirtualNetworkGatewayListConnectionsResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListConnectionsResultPage.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.vnglcr)
+ if err != nil {
+ return err
+ }
+ page.vnglcr = 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 *VirtualNetworkGatewayListConnectionsResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page VirtualNetworkGatewayListConnectionsResultPage) NotDone() bool {
+ return !page.vnglcr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page VirtualNetworkGatewayListConnectionsResultPage) Response() VirtualNetworkGatewayListConnectionsResult {
+ return page.vnglcr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page VirtualNetworkGatewayListConnectionsResultPage) Values() []VirtualNetworkGatewayConnectionListEntity {
+ if page.vnglcr.IsEmpty() {
+ return nil
+ }
+ return *page.vnglcr.Value
+}
+
+// Creates a new instance of the VirtualNetworkGatewayListConnectionsResultPage type.
+func NewVirtualNetworkGatewayListConnectionsResultPage(cur VirtualNetworkGatewayListConnectionsResult, getNextPage func(context.Context, VirtualNetworkGatewayListConnectionsResult) (VirtualNetworkGatewayListConnectionsResult, error)) VirtualNetworkGatewayListConnectionsResultPage {
+ return VirtualNetworkGatewayListConnectionsResultPage{
+ fn: getNextPage,
+ vnglcr: cur,
+ }
+}
+
+// VirtualNetworkGatewayListResult response for the ListVirtualNetworkGateways API service call.
+type VirtualNetworkGatewayListResult struct {
+ autorest.Response `json:"-"`
+ // Value - Gets a list of VirtualNetworkGateway resources that exists in a resource group.
+ Value *[]VirtualNetworkGateway `json:"value,omitempty"`
+ // NextLink - READ-ONLY; The URL to get the next set of results.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for VirtualNetworkGatewayListResult.
+func (vnglr VirtualNetworkGatewayListResult) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if vnglr.Value != nil {
+ objectMap["value"] = vnglr.Value
+ }
+ return json.Marshal(objectMap)
+}
+
+// VirtualNetworkGatewayListResultIterator provides access to a complete listing of VirtualNetworkGateway
+// values.
+type VirtualNetworkGatewayListResultIterator struct {
+ i int
+ page VirtualNetworkGatewayListResultPage
+}
+
+// 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 *VirtualNetworkGatewayListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListResultIterator.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 *VirtualNetworkGatewayListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter VirtualNetworkGatewayListResultIterator) 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 VirtualNetworkGatewayListResultIterator) Response() VirtualNetworkGatewayListResult {
+ 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 VirtualNetworkGatewayListResultIterator) Value() VirtualNetworkGateway {
+ if !iter.page.NotDone() {
+ return VirtualNetworkGateway{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// Creates a new instance of the VirtualNetworkGatewayListResultIterator type.
+func NewVirtualNetworkGatewayListResultIterator(page VirtualNetworkGatewayListResultPage) VirtualNetworkGatewayListResultIterator {
+ return VirtualNetworkGatewayListResultIterator{page: page}
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (vnglr VirtualNetworkGatewayListResult) IsEmpty() bool {
+ return vnglr.Value == nil || len(*vnglr.Value) == 0
+}
+
+// hasNextLink returns true if the NextLink is not empty.
+func (vnglr VirtualNetworkGatewayListResult) hasNextLink() bool {
+ return vnglr.NextLink != nil && len(*vnglr.NextLink) != 0
+}
+
+// virtualNetworkGatewayListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (vnglr VirtualNetworkGatewayListResult) virtualNetworkGatewayListResultPreparer(ctx context.Context) (*http.Request, error) {
+ if !vnglr.hasNextLink() {
+ return nil, nil
+ }
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(vnglr.NextLink)))
+}
+
+// VirtualNetworkGatewayListResultPage contains a page of VirtualNetworkGateway values.
+type VirtualNetworkGatewayListResultPage struct {
+ fn func(context.Context, VirtualNetworkGatewayListResult) (VirtualNetworkGatewayListResult, error)
+ vnglr VirtualNetworkGatewayListResult
+}
+
+// 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 *VirtualNetworkGatewayListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListResultPage.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.vnglr)
+ if err != nil {
+ return err
+ }
+ page.vnglr = 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 *VirtualNetworkGatewayListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page VirtualNetworkGatewayListResultPage) NotDone() bool {
+ return !page.vnglr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page VirtualNetworkGatewayListResultPage) Response() VirtualNetworkGatewayListResult {
+ return page.vnglr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page VirtualNetworkGatewayListResultPage) Values() []VirtualNetworkGateway {
+ if page.vnglr.IsEmpty() {
+ return nil
+ }
+ return *page.vnglr.Value
+}
+
+// Creates a new instance of the VirtualNetworkGatewayListResultPage type.
+func NewVirtualNetworkGatewayListResultPage(cur VirtualNetworkGatewayListResult, getNextPage func(context.Context, VirtualNetworkGatewayListResult) (VirtualNetworkGatewayListResult, error)) VirtualNetworkGatewayListResultPage {
+ return VirtualNetworkGatewayListResultPage{
+ fn: getNextPage,
+ vnglr: cur,
+ }
+}
+
+// VirtualNetworkGatewayPropertiesFormat virtualNetworkGateway properties
+type VirtualNetworkGatewayPropertiesFormat struct {
+ // IPConfigurations - IP configurations for virtual network gateway.
+ IPConfigurations *[]VirtualNetworkGatewayIPConfiguration `json:"ipConfigurations,omitempty"`
+ // GatewayType - The type of this virtual network gateway. Possible values are: 'Vpn' and 'ExpressRoute'. Possible values include: 'VirtualNetworkGatewayTypeVpn', 'VirtualNetworkGatewayTypeExpressRoute'
+ GatewayType VirtualNetworkGatewayType `json:"gatewayType,omitempty"`
+ // VpnType - The type of this virtual network gateway. Possible values are: 'PolicyBased' and 'RouteBased'. Possible values include: 'PolicyBased', 'RouteBased'
+ VpnType VpnType `json:"vpnType,omitempty"`
+ // EnableBgp - Whether BGP is enabled for this virtual network gateway or not.
+ EnableBgp *bool `json:"enableBgp,omitempty"`
+ // ActiveActive - ActiveActive flag
+ ActiveActive *bool `json:"activeActive,omitempty"`
+ // GatewayDefaultSite - The reference of the LocalNetworkGateway resource which represents local network site having default routes. Assign Null value in case of removing existing default site setting.
+ GatewayDefaultSite *SubResource `json:"gatewayDefaultSite,omitempty"`
+ // Sku - The reference of the VirtualNetworkGatewaySku resource which represents the SKU selected for Virtual network gateway.
+ Sku *VirtualNetworkGatewaySku `json:"sku,omitempty"`
+ // VpnClientConfiguration - The reference of the VpnClientConfiguration resource which represents the P2S VpnClient configurations.
+ VpnClientConfiguration *VpnClientConfiguration `json:"vpnClientConfiguration,omitempty"`
+ // BgpSettings - Virtual network gateway's BGP speaker settings.
+ BgpSettings *BgpSettings `json:"bgpSettings,omitempty"`
+ // ResourceGUID - The resource GUID property of the VirtualNetworkGateway resource.
+ ResourceGUID *string `json:"resourceGuid,omitempty"`
+ // ProvisioningState - READ-ONLY; The provisioning state of the VirtualNetworkGateway resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for VirtualNetworkGatewayPropertiesFormat.
+func (vngpf VirtualNetworkGatewayPropertiesFormat) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if vngpf.IPConfigurations != nil {
+ objectMap["ipConfigurations"] = vngpf.IPConfigurations
+ }
+ if vngpf.GatewayType != "" {
+ objectMap["gatewayType"] = vngpf.GatewayType
+ }
+ if vngpf.VpnType != "" {
+ objectMap["vpnType"] = vngpf.VpnType
+ }
+ if vngpf.EnableBgp != nil {
+ objectMap["enableBgp"] = vngpf.EnableBgp
+ }
+ if vngpf.ActiveActive != nil {
+ objectMap["activeActive"] = vngpf.ActiveActive
+ }
+ if vngpf.GatewayDefaultSite != nil {
+ objectMap["gatewayDefaultSite"] = vngpf.GatewayDefaultSite
+ }
+ if vngpf.Sku != nil {
+ objectMap["sku"] = vngpf.Sku
+ }
+ if vngpf.VpnClientConfiguration != nil {
+ objectMap["vpnClientConfiguration"] = vngpf.VpnClientConfiguration
+ }
+ if vngpf.BgpSettings != nil {
+ objectMap["bgpSettings"] = vngpf.BgpSettings
+ }
+ if vngpf.ResourceGUID != nil {
+ objectMap["resourceGuid"] = vngpf.ResourceGUID
+ }
+ return json.Marshal(objectMap)
+}
+
+// VirtualNetworkGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type VirtualNetworkGatewaysCreateOrUpdateFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(VirtualNetworkGatewaysClient) (VirtualNetworkGateway, error)
+}
+
+// VirtualNetworkGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type VirtualNetworkGatewaysDeleteFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(VirtualNetworkGatewaysClient) (autorest.Response, error)
+}
+
+// VirtualNetworkGatewaysGeneratevpnclientpackageFuture an abstraction for monitoring and retrieving the
+// results of a long-running operation.
+type VirtualNetworkGatewaysGeneratevpnclientpackageFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(VirtualNetworkGatewaysClient) (String, error)
+}
+
+// VirtualNetworkGatewaysGenerateVpnProfileFuture an abstraction for monitoring and retrieving the results
+// of a long-running operation.
+type VirtualNetworkGatewaysGenerateVpnProfileFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(VirtualNetworkGatewaysClient) (String, error)
+}
+
+// VirtualNetworkGatewaysGetAdvertisedRoutesFuture an abstraction for monitoring and retrieving the results
+// of a long-running operation.
+type VirtualNetworkGatewaysGetAdvertisedRoutesFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(VirtualNetworkGatewaysClient) (GatewayRouteListResult, error)
+}
+
+// VirtualNetworkGatewaysGetBgpPeerStatusFuture an abstraction for monitoring and retrieving the results of
+// a long-running operation.
+type VirtualNetworkGatewaysGetBgpPeerStatusFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(VirtualNetworkGatewaysClient) (BgpPeerStatusListResult, error)
+}
+
+// VirtualNetworkGatewaysGetLearnedRoutesFuture an abstraction for monitoring and retrieving the results of
+// a long-running operation.
+type VirtualNetworkGatewaysGetLearnedRoutesFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(VirtualNetworkGatewaysClient) (GatewayRouteListResult, error)
+}
+
+// VirtualNetworkGatewaysGetVpnProfilePackageURLFuture an abstraction for monitoring and retrieving the
+// results of a long-running operation.
+type VirtualNetworkGatewaysGetVpnProfilePackageURLFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(VirtualNetworkGatewaysClient) (String, error)
+}
+
+// VirtualNetworkGatewaySku virtualNetworkGatewaySku details
+type VirtualNetworkGatewaySku struct {
+ // Name - Gateway SKU name. Possible values include: 'VirtualNetworkGatewaySkuNameBasic', 'VirtualNetworkGatewaySkuNameHighPerformance', 'VirtualNetworkGatewaySkuNameStandard', 'VirtualNetworkGatewaySkuNameUltraPerformance', 'VirtualNetworkGatewaySkuNameVpnGw1', 'VirtualNetworkGatewaySkuNameVpnGw2', 'VirtualNetworkGatewaySkuNameVpnGw3'
+ Name VirtualNetworkGatewaySkuName `json:"name,omitempty"`
+ // Tier - Gateway SKU tier. Possible values include: 'VirtualNetworkGatewaySkuTierBasic', 'VirtualNetworkGatewaySkuTierHighPerformance', 'VirtualNetworkGatewaySkuTierStandard', 'VirtualNetworkGatewaySkuTierUltraPerformance', 'VirtualNetworkGatewaySkuTierVpnGw1', 'VirtualNetworkGatewaySkuTierVpnGw2', 'VirtualNetworkGatewaySkuTierVpnGw3'
+ Tier VirtualNetworkGatewaySkuTier `json:"tier,omitempty"`
+ // Capacity - The capacity.
+ Capacity *int32 `json:"capacity,omitempty"`
+}
+
+// VirtualNetworkGatewaysResetFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type VirtualNetworkGatewaysResetFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(VirtualNetworkGatewaysClient) (VirtualNetworkGateway, error)
+}
+
+// VirtualNetworkGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type VirtualNetworkGatewaysUpdateTagsFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(VirtualNetworkGatewaysClient) (VirtualNetworkGateway, error)
+}
+
+// VirtualNetworkListResult response for the ListVirtualNetworks API service call.
+type VirtualNetworkListResult struct {
+ autorest.Response `json:"-"`
+ // Value - Gets a list of VirtualNetwork resources in a resource group.
+ Value *[]VirtualNetwork `json:"value,omitempty"`
+ // NextLink - The URL to get the next set of results.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// VirtualNetworkListResultIterator provides access to a complete listing of VirtualNetwork values.
+type VirtualNetworkListResultIterator struct {
+ i int
+ page VirtualNetworkListResultPage
+}
+
+// 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 *VirtualNetworkListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListResultIterator.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 *VirtualNetworkListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter VirtualNetworkListResultIterator) 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 VirtualNetworkListResultIterator) Response() VirtualNetworkListResult {
+ 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 VirtualNetworkListResultIterator) Value() VirtualNetwork {
+ if !iter.page.NotDone() {
+ return VirtualNetwork{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// Creates a new instance of the VirtualNetworkListResultIterator type.
+func NewVirtualNetworkListResultIterator(page VirtualNetworkListResultPage) VirtualNetworkListResultIterator {
+ return VirtualNetworkListResultIterator{page: page}
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (vnlr VirtualNetworkListResult) IsEmpty() bool {
+ return vnlr.Value == nil || len(*vnlr.Value) == 0
+}
+
+// hasNextLink returns true if the NextLink is not empty.
+func (vnlr VirtualNetworkListResult) hasNextLink() bool {
+ return vnlr.NextLink != nil && len(*vnlr.NextLink) != 0
+}
+
+// virtualNetworkListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (vnlr VirtualNetworkListResult) virtualNetworkListResultPreparer(ctx context.Context) (*http.Request, error) {
+ if !vnlr.hasNextLink() {
+ return nil, nil
+ }
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(vnlr.NextLink)))
+}
+
+// VirtualNetworkListResultPage contains a page of VirtualNetwork values.
+type VirtualNetworkListResultPage struct {
+ fn func(context.Context, VirtualNetworkListResult) (VirtualNetworkListResult, error)
+ vnlr VirtualNetworkListResult
+}
+
+// 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 *VirtualNetworkListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListResultPage.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.vnlr)
+ if err != nil {
+ return err
+ }
+ page.vnlr = 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 *VirtualNetworkListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page VirtualNetworkListResultPage) NotDone() bool {
+ return !page.vnlr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page VirtualNetworkListResultPage) Response() VirtualNetworkListResult {
+ return page.vnlr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page VirtualNetworkListResultPage) Values() []VirtualNetwork {
+ if page.vnlr.IsEmpty() {
+ return nil
+ }
+ return *page.vnlr.Value
+}
+
+// Creates a new instance of the VirtualNetworkListResultPage type.
+func NewVirtualNetworkListResultPage(cur VirtualNetworkListResult, getNextPage func(context.Context, VirtualNetworkListResult) (VirtualNetworkListResult, error)) VirtualNetworkListResultPage {
+ return VirtualNetworkListResultPage{
+ fn: getNextPage,
+ vnlr: cur,
+ }
+}
+
+// VirtualNetworkListUsageResult response for the virtual networks GetUsage API service call.
+type VirtualNetworkListUsageResult struct {
+ autorest.Response `json:"-"`
+ // Value - READ-ONLY; VirtualNetwork usage stats.
+ Value *[]VirtualNetworkUsage `json:"value,omitempty"`
+ // NextLink - The URL to get the next set of results.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for VirtualNetworkListUsageResult.
+func (vnlur VirtualNetworkListUsageResult) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if vnlur.NextLink != nil {
+ objectMap["nextLink"] = vnlur.NextLink
+ }
+ return json.Marshal(objectMap)
+}
+
+// VirtualNetworkListUsageResultIterator provides access to a complete listing of VirtualNetworkUsage
+// values.
+type VirtualNetworkListUsageResultIterator struct {
+ i int
+ page VirtualNetworkListUsageResultPage
+}
+
+// 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 *VirtualNetworkListUsageResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListUsageResultIterator.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 *VirtualNetworkListUsageResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter VirtualNetworkListUsageResultIterator) 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 VirtualNetworkListUsageResultIterator) Response() VirtualNetworkListUsageResult {
+ 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 VirtualNetworkListUsageResultIterator) Value() VirtualNetworkUsage {
+ if !iter.page.NotDone() {
+ return VirtualNetworkUsage{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// Creates a new instance of the VirtualNetworkListUsageResultIterator type.
+func NewVirtualNetworkListUsageResultIterator(page VirtualNetworkListUsageResultPage) VirtualNetworkListUsageResultIterator {
+ return VirtualNetworkListUsageResultIterator{page: page}
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (vnlur VirtualNetworkListUsageResult) IsEmpty() bool {
+ return vnlur.Value == nil || len(*vnlur.Value) == 0
+}
+
+// hasNextLink returns true if the NextLink is not empty.
+func (vnlur VirtualNetworkListUsageResult) hasNextLink() bool {
+ return vnlur.NextLink != nil && len(*vnlur.NextLink) != 0
+}
+
+// virtualNetworkListUsageResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (vnlur VirtualNetworkListUsageResult) virtualNetworkListUsageResultPreparer(ctx context.Context) (*http.Request, error) {
+ if !vnlur.hasNextLink() {
+ return nil, nil
+ }
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(vnlur.NextLink)))
+}
+
+// VirtualNetworkListUsageResultPage contains a page of VirtualNetworkUsage values.
+type VirtualNetworkListUsageResultPage struct {
+ fn func(context.Context, VirtualNetworkListUsageResult) (VirtualNetworkListUsageResult, error)
+ vnlur VirtualNetworkListUsageResult
+}
+
+// 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 *VirtualNetworkListUsageResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListUsageResultPage.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.vnlur)
+ if err != nil {
+ return err
+ }
+ page.vnlur = 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 *VirtualNetworkListUsageResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page VirtualNetworkListUsageResultPage) NotDone() bool {
+ return !page.vnlur.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page VirtualNetworkListUsageResultPage) Response() VirtualNetworkListUsageResult {
+ return page.vnlur
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page VirtualNetworkListUsageResultPage) Values() []VirtualNetworkUsage {
+ if page.vnlur.IsEmpty() {
+ return nil
+ }
+ return *page.vnlur.Value
+}
+
+// Creates a new instance of the VirtualNetworkListUsageResultPage type.
+func NewVirtualNetworkListUsageResultPage(cur VirtualNetworkListUsageResult, getNextPage func(context.Context, VirtualNetworkListUsageResult) (VirtualNetworkListUsageResult, error)) VirtualNetworkListUsageResultPage {
+ return VirtualNetworkListUsageResultPage{
+ fn: getNextPage,
+ vnlur: cur,
+ }
+}
+
+// VirtualNetworkPeering peerings in a virtual network resource.
+type VirtualNetworkPeering struct {
+ autorest.Response `json:"-"`
+ // VirtualNetworkPeeringPropertiesFormat - Properties of the virtual network peering.
+ *VirtualNetworkPeeringPropertiesFormat `json:"properties,omitempty"`
+ // Name - 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"`
+ // Etag - A unique read-only string that changes whenever the resource is updated.
+ Etag *string `json:"etag,omitempty"`
+ // ID - Resource ID.
+ ID *string `json:"id,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for VirtualNetworkPeering.
+func (vnp VirtualNetworkPeering) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if vnp.VirtualNetworkPeeringPropertiesFormat != nil {
+ objectMap["properties"] = vnp.VirtualNetworkPeeringPropertiesFormat
+ }
+ if vnp.Name != nil {
+ objectMap["name"] = vnp.Name
+ }
+ if vnp.Etag != nil {
+ objectMap["etag"] = vnp.Etag
+ }
+ if vnp.ID != nil {
+ objectMap["id"] = vnp.ID
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for VirtualNetworkPeering struct.
+func (vnp *VirtualNetworkPeering) 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 virtualNetworkPeeringPropertiesFormat VirtualNetworkPeeringPropertiesFormat
+ err = json.Unmarshal(*v, &virtualNetworkPeeringPropertiesFormat)
+ if err != nil {
+ return err
+ }
+ vnp.VirtualNetworkPeeringPropertiesFormat = &virtualNetworkPeeringPropertiesFormat
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ vnp.Name = &name
+ }
+ case "etag":
+ if v != nil {
+ var etag string
+ err = json.Unmarshal(*v, &etag)
+ if err != nil {
+ return err
+ }
+ vnp.Etag = &etag
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ vnp.ID = &ID
+ }
+ }
+ }
+
+ return nil
+}
+
+// VirtualNetworkPeeringListResult response for ListSubnets API service call. Retrieves all subnets that
+// belong to a virtual network.
+type VirtualNetworkPeeringListResult struct {
+ autorest.Response `json:"-"`
+ // Value - The peerings in a virtual network.
+ Value *[]VirtualNetworkPeering `json:"value,omitempty"`
+ // NextLink - The URL to get the next set of results.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// VirtualNetworkPeeringListResultIterator provides access to a complete listing of VirtualNetworkPeering
+// values.
+type VirtualNetworkPeeringListResultIterator struct {
+ i int
+ page VirtualNetworkPeeringListResultPage
+}
+
+// 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 *VirtualNetworkPeeringListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkPeeringListResultIterator.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 *VirtualNetworkPeeringListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter VirtualNetworkPeeringListResultIterator) 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 VirtualNetworkPeeringListResultIterator) Response() VirtualNetworkPeeringListResult {
+ 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 VirtualNetworkPeeringListResultIterator) Value() VirtualNetworkPeering {
+ if !iter.page.NotDone() {
+ return VirtualNetworkPeering{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// Creates a new instance of the VirtualNetworkPeeringListResultIterator type.
+func NewVirtualNetworkPeeringListResultIterator(page VirtualNetworkPeeringListResultPage) VirtualNetworkPeeringListResultIterator {
+ return VirtualNetworkPeeringListResultIterator{page: page}
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (vnplr VirtualNetworkPeeringListResult) IsEmpty() bool {
+ return vnplr.Value == nil || len(*vnplr.Value) == 0
+}
+
+// hasNextLink returns true if the NextLink is not empty.
+func (vnplr VirtualNetworkPeeringListResult) hasNextLink() bool {
+ return vnplr.NextLink != nil && len(*vnplr.NextLink) != 0
+}
+
+// virtualNetworkPeeringListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (vnplr VirtualNetworkPeeringListResult) virtualNetworkPeeringListResultPreparer(ctx context.Context) (*http.Request, error) {
+ if !vnplr.hasNextLink() {
+ return nil, nil
+ }
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(vnplr.NextLink)))
+}
+
+// VirtualNetworkPeeringListResultPage contains a page of VirtualNetworkPeering values.
+type VirtualNetworkPeeringListResultPage struct {
+ fn func(context.Context, VirtualNetworkPeeringListResult) (VirtualNetworkPeeringListResult, error)
+ vnplr VirtualNetworkPeeringListResult
+}
+
+// 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 *VirtualNetworkPeeringListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkPeeringListResultPage.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.vnplr)
+ if err != nil {
+ return err
+ }
+ page.vnplr = 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 *VirtualNetworkPeeringListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page VirtualNetworkPeeringListResultPage) NotDone() bool {
+ return !page.vnplr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page VirtualNetworkPeeringListResultPage) Response() VirtualNetworkPeeringListResult {
+ return page.vnplr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page VirtualNetworkPeeringListResultPage) Values() []VirtualNetworkPeering {
+ if page.vnplr.IsEmpty() {
+ return nil
+ }
+ return *page.vnplr.Value
+}
+
+// Creates a new instance of the VirtualNetworkPeeringListResultPage type.
+func NewVirtualNetworkPeeringListResultPage(cur VirtualNetworkPeeringListResult, getNextPage func(context.Context, VirtualNetworkPeeringListResult) (VirtualNetworkPeeringListResult, error)) VirtualNetworkPeeringListResultPage {
+ return VirtualNetworkPeeringListResultPage{
+ fn: getNextPage,
+ vnplr: cur,
+ }
+}
+
+// VirtualNetworkPeeringPropertiesFormat properties of the virtual network peering.
+type VirtualNetworkPeeringPropertiesFormat struct {
+ // AllowVirtualNetworkAccess - Whether the VMs in the linked virtual network space would be able to access all the VMs in local Virtual network space.
+ AllowVirtualNetworkAccess *bool `json:"allowVirtualNetworkAccess,omitempty"`
+ // AllowForwardedTraffic - Whether the forwarded traffic from the VMs in the remote virtual network will be allowed/disallowed.
+ AllowForwardedTraffic *bool `json:"allowForwardedTraffic,omitempty"`
+ // AllowGatewayTransit - If gateway links can be used in remote virtual networking to link to this virtual network.
+ AllowGatewayTransit *bool `json:"allowGatewayTransit,omitempty"`
+ // UseRemoteGateways - If remote gateways can be used on this virtual network. If the flag is set to true, and allowGatewayTransit on remote peering is also true, virtual network will use gateways of remote virtual network for transit. Only one peering can have this flag set to true. This flag cannot be set if virtual network already has a gateway.
+ UseRemoteGateways *bool `json:"useRemoteGateways,omitempty"`
+ // RemoteVirtualNetwork - The reference of the remote virtual network. The remote virtual network can be in the same or different region (preview). See here to register for the preview and learn more (https://docs.microsoft.com/en-us/azure/virtual-network/virtual-network-create-peering).
+ RemoteVirtualNetwork *SubResource `json:"remoteVirtualNetwork,omitempty"`
+ // RemoteAddressSpace - The reference of the remote virtual network address space.
+ RemoteAddressSpace *AddressSpace `json:"remoteAddressSpace,omitempty"`
+ // PeeringState - The status of the virtual network peering. Possible values are 'Initiated', 'Connected', and 'Disconnected'. Possible values include: 'Initiated', 'Connected', 'Disconnected'
+ PeeringState VirtualNetworkPeeringState `json:"peeringState,omitempty"`
+ // ProvisioningState - The provisioning state of the resource.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+}
+
+// VirtualNetworkPeeringsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type VirtualNetworkPeeringsCreateOrUpdateFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(VirtualNetworkPeeringsClient) (VirtualNetworkPeering, error)
+}
+
+// VirtualNetworkPeeringsDeleteFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type VirtualNetworkPeeringsDeleteFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(VirtualNetworkPeeringsClient) (autorest.Response, error)
+}
+
+// VirtualNetworkPropertiesFormat properties of the virtual network.
+type VirtualNetworkPropertiesFormat struct {
+ // AddressSpace - The AddressSpace that contains an array of IP address ranges that can be used by subnets.
+ AddressSpace *AddressSpace `json:"addressSpace,omitempty"`
+ // DhcpOptions - The dhcpOptions that contains an array of DNS servers available to VMs deployed in the virtual network.
+ DhcpOptions *DhcpOptions `json:"dhcpOptions,omitempty"`
+ // Subnets - A list of subnets in a Virtual Network.
+ Subnets *[]Subnet `json:"subnets,omitempty"`
+ // VirtualNetworkPeerings - A list of peerings in a Virtual Network.
+ VirtualNetworkPeerings *[]VirtualNetworkPeering `json:"virtualNetworkPeerings,omitempty"`
+ // ResourceGUID - The resourceGuid property of the Virtual Network resource.
+ ResourceGUID *string `json:"resourceGuid,omitempty"`
+ // ProvisioningState - The provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+ // EnableDdosProtection - Indicates if DDoS protection is enabled for all the protected resources in a Virtual Network.
+ EnableDdosProtection *bool `json:"enableDdosProtection,omitempty"`
+ // EnableVMProtection - Indicates if Vm protection is enabled for all the subnets in a Virtual Network.
+ EnableVMProtection *bool `json:"enableVmProtection,omitempty"`
+}
+
+// VirtualNetworksCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type VirtualNetworksCreateOrUpdateFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(VirtualNetworksClient) (VirtualNetwork, error)
+}
+
+// VirtualNetworksDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type VirtualNetworksDeleteFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(VirtualNetworksClient) (autorest.Response, error)
+}
+
+// VirtualNetworksUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type VirtualNetworksUpdateTagsFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(VirtualNetworksClient) (VirtualNetwork, error)
+}
+
+// VirtualNetworkUsage usage details for subnet.
+type VirtualNetworkUsage struct {
+ // CurrentValue - READ-ONLY; Indicates number of IPs used from the Subnet.
+ CurrentValue *float64 `json:"currentValue,omitempty"`
+ // ID - READ-ONLY; Subnet identifier.
+ ID *string `json:"id,omitempty"`
+ // Limit - READ-ONLY; Indicates the size of the subnet.
+ Limit *float64 `json:"limit,omitempty"`
+ // Name - READ-ONLY; The name containing common and localized value for usage.
+ Name *VirtualNetworkUsageName `json:"name,omitempty"`
+ // Unit - READ-ONLY; Usage units. Returns 'Count'
+ Unit *string `json:"unit,omitempty"`
+}
+
+// VirtualNetworkUsageName usage strings container.
+type VirtualNetworkUsageName struct {
+ // LocalizedValue - READ-ONLY; Localized subnet size and usage string.
+ LocalizedValue *string `json:"localizedValue,omitempty"`
+ // Value - READ-ONLY; Subnet size and usage string.
+ Value *string `json:"value,omitempty"`
+}
+
+// VpnClientConfiguration vpnClientConfiguration for P2S client.
+type VpnClientConfiguration struct {
+ // VpnClientAddressPool - The reference of the address space resource which represents Address space for P2S VpnClient.
+ VpnClientAddressPool *AddressSpace `json:"vpnClientAddressPool,omitempty"`
+ // VpnClientRootCertificates - VpnClientRootCertificate for virtual network gateway.
+ VpnClientRootCertificates *[]VpnClientRootCertificate `json:"vpnClientRootCertificates,omitempty"`
+ // VpnClientRevokedCertificates - VpnClientRevokedCertificate for Virtual network gateway.
+ VpnClientRevokedCertificates *[]VpnClientRevokedCertificate `json:"vpnClientRevokedCertificates,omitempty"`
+ // VpnClientProtocols - VpnClientProtocols for Virtual network gateway.
+ VpnClientProtocols *[]VpnClientProtocol `json:"vpnClientProtocols,omitempty"`
+ // RadiusServerAddress - The radius server address property of the VirtualNetworkGateway resource for vpn client connection.
+ RadiusServerAddress *string `json:"radiusServerAddress,omitempty"`
+ // RadiusServerSecret - The radius secret property of the VirtualNetworkGateway resource for vpn client connection.
+ RadiusServerSecret *string `json:"radiusServerSecret,omitempty"`
+}
+
+// VpnClientParameters vpn Client Parameters for package generation
+type VpnClientParameters struct {
+ // ProcessorArchitecture - VPN client Processor Architecture. Possible values are: 'AMD64' and 'X86'. Possible values include: 'Amd64', 'X86'
+ ProcessorArchitecture ProcessorArchitecture `json:"processorArchitecture,omitempty"`
+ // AuthenticationMethod - VPN client Authentication Method. Possible values are: 'EAPTLS' and 'EAPMSCHAPv2'. Possible values include: 'EAPTLS', 'EAPMSCHAPv2'
+ AuthenticationMethod AuthenticationMethod `json:"authenticationMethod,omitempty"`
+ // RadiusServerAuthCertificate - The public certificate data for the radius server authentication certificate as a Base-64 encoded string. Required only if external radius authentication has been configured with EAPTLS authentication.
+ RadiusServerAuthCertificate *string `json:"radiusServerAuthCertificate,omitempty"`
+ // ClientRootCertificates - A list of client root certificates public certificate data encoded as Base-64 strings. Optional parameter for external radius based authentication with EAPTLS.
+ ClientRootCertificates *[]string `json:"clientRootCertificates,omitempty"`
+}
+
+// VpnClientRevokedCertificate VPN client revoked certificate of virtual network gateway.
+type VpnClientRevokedCertificate struct {
+ // VpnClientRevokedCertificatePropertiesFormat - Properties of the vpn client revoked certificate.
+ *VpnClientRevokedCertificatePropertiesFormat `json:"properties,omitempty"`
+ // Name - 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"`
+ // Etag - A unique read-only string that changes whenever the resource is updated.
+ Etag *string `json:"etag,omitempty"`
+ // ID - Resource ID.
+ ID *string `json:"id,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for VpnClientRevokedCertificate.
+func (vcrc VpnClientRevokedCertificate) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if vcrc.VpnClientRevokedCertificatePropertiesFormat != nil {
+ objectMap["properties"] = vcrc.VpnClientRevokedCertificatePropertiesFormat
+ }
+ if vcrc.Name != nil {
+ objectMap["name"] = vcrc.Name
+ }
+ if vcrc.Etag != nil {
+ objectMap["etag"] = vcrc.Etag
+ }
+ if vcrc.ID != nil {
+ objectMap["id"] = vcrc.ID
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for VpnClientRevokedCertificate struct.
+func (vcrc *VpnClientRevokedCertificate) 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 vpnClientRevokedCertificatePropertiesFormat VpnClientRevokedCertificatePropertiesFormat
+ err = json.Unmarshal(*v, &vpnClientRevokedCertificatePropertiesFormat)
+ if err != nil {
+ return err
+ }
+ vcrc.VpnClientRevokedCertificatePropertiesFormat = &vpnClientRevokedCertificatePropertiesFormat
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ vcrc.Name = &name
+ }
+ case "etag":
+ if v != nil {
+ var etag string
+ err = json.Unmarshal(*v, &etag)
+ if err != nil {
+ return err
+ }
+ vcrc.Etag = &etag
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ vcrc.ID = &ID
+ }
+ }
+ }
+
+ return nil
+}
+
+// VpnClientRevokedCertificatePropertiesFormat properties of the revoked VPN client certificate of virtual
+// network gateway.
+type VpnClientRevokedCertificatePropertiesFormat struct {
+ // Thumbprint - The revoked VPN client certificate thumbprint.
+ Thumbprint *string `json:"thumbprint,omitempty"`
+ // ProvisioningState - READ-ONLY; The provisioning state of the VPN client revoked certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for VpnClientRevokedCertificatePropertiesFormat.
+func (vcrcpf VpnClientRevokedCertificatePropertiesFormat) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if vcrcpf.Thumbprint != nil {
+ objectMap["thumbprint"] = vcrcpf.Thumbprint
+ }
+ return json.Marshal(objectMap)
+}
+
+// VpnClientRootCertificate VPN client root certificate of virtual network gateway
+type VpnClientRootCertificate struct {
+ // VpnClientRootCertificatePropertiesFormat - Properties of the vpn client root certificate.
+ *VpnClientRootCertificatePropertiesFormat `json:"properties,omitempty"`
+ // Name - 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"`
+ // Etag - A unique read-only string that changes whenever the resource is updated.
+ Etag *string `json:"etag,omitempty"`
+ // ID - Resource ID.
+ ID *string `json:"id,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for VpnClientRootCertificate.
+func (vcrc VpnClientRootCertificate) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if vcrc.VpnClientRootCertificatePropertiesFormat != nil {
+ objectMap["properties"] = vcrc.VpnClientRootCertificatePropertiesFormat
+ }
+ if vcrc.Name != nil {
+ objectMap["name"] = vcrc.Name
+ }
+ if vcrc.Etag != nil {
+ objectMap["etag"] = vcrc.Etag
+ }
+ if vcrc.ID != nil {
+ objectMap["id"] = vcrc.ID
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for VpnClientRootCertificate struct.
+func (vcrc *VpnClientRootCertificate) 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 vpnClientRootCertificatePropertiesFormat VpnClientRootCertificatePropertiesFormat
+ err = json.Unmarshal(*v, &vpnClientRootCertificatePropertiesFormat)
+ if err != nil {
+ return err
+ }
+ vcrc.VpnClientRootCertificatePropertiesFormat = &vpnClientRootCertificatePropertiesFormat
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ vcrc.Name = &name
+ }
+ case "etag":
+ if v != nil {
+ var etag string
+ err = json.Unmarshal(*v, &etag)
+ if err != nil {
+ return err
+ }
+ vcrc.Etag = &etag
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ vcrc.ID = &ID
+ }
+ }
+ }
+
+ return nil
+}
+
+// VpnClientRootCertificatePropertiesFormat properties of SSL certificates of application gateway
+type VpnClientRootCertificatePropertiesFormat struct {
+ // PublicCertData - The certificate public data.
+ PublicCertData *string `json:"publicCertData,omitempty"`
+ // ProvisioningState - READ-ONLY; The provisioning state of the VPN client root certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for VpnClientRootCertificatePropertiesFormat.
+func (vcrcpf VpnClientRootCertificatePropertiesFormat) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if vcrcpf.PublicCertData != nil {
+ objectMap["publicCertData"] = vcrcpf.PublicCertData
+ }
+ return json.Marshal(objectMap)
+}
+
+// VpnDeviceScriptParameters vpn device configuration script generation parameters
+type VpnDeviceScriptParameters struct {
+ // Vendor - The vendor for the vpn device.
+ Vendor *string `json:"vendor,omitempty"`
+ // DeviceFamily - The device family for the vpn device.
+ DeviceFamily *string `json:"deviceFamily,omitempty"`
+ // FirmwareVersion - The firmware version for the vpn device.
+ FirmwareVersion *string `json:"firmwareVersion,omitempty"`
+}
+
+// Watcher network watcher in a resource group.
+type Watcher struct {
+ autorest.Response `json:"-"`
+ // Etag - A unique read-only string that changes whenever the resource is updated.
+ Etag *string `json:"etag,omitempty"`
+ *WatcherPropertiesFormat `json:"properties,omitempty"`
+ // ID - 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 Watcher.
+func (w Watcher) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if w.Etag != nil {
+ objectMap["etag"] = w.Etag
+ }
+ if w.WatcherPropertiesFormat != nil {
+ objectMap["properties"] = w.WatcherPropertiesFormat
+ }
+ if w.ID != nil {
+ objectMap["id"] = w.ID
+ }
+ if w.Location != nil {
+ objectMap["location"] = w.Location
+ }
+ if w.Tags != nil {
+ objectMap["tags"] = w.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for Watcher struct.
+func (w *Watcher) 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 "etag":
+ if v != nil {
+ var etag string
+ err = json.Unmarshal(*v, &etag)
+ if err != nil {
+ return err
+ }
+ w.Etag = &etag
+ }
+ case "properties":
+ if v != nil {
+ var watcherPropertiesFormat WatcherPropertiesFormat
+ err = json.Unmarshal(*v, &watcherPropertiesFormat)
+ if err != nil {
+ return err
+ }
+ w.WatcherPropertiesFormat = &watcherPropertiesFormat
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ w.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ w.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ w.Type = &typeVar
+ }
+ case "location":
+ if v != nil {
+ var location string
+ err = json.Unmarshal(*v, &location)
+ if err != nil {
+ return err
+ }
+ w.Location = &location
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ w.Tags = tags
+ }
+ }
+ }
+
+ return nil
+}
+
+// WatcherListResult list of network watcher resources.
+type WatcherListResult struct {
+ autorest.Response `json:"-"`
+ Value *[]Watcher `json:"value,omitempty"`
+}
+
+// WatcherPropertiesFormat the network watcher properties.
+type WatcherPropertiesFormat struct {
+ // ProvisioningState - READ-ONLY; The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
+ ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
+}
+
+// WatchersCheckConnectivityFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type WatchersCheckConnectivityFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(WatchersClient) (ConnectivityInformation, error)
+}
+
+// WatchersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type WatchersDeleteFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(WatchersClient) (autorest.Response, error)
+}
+
+// WatchersGetAzureReachabilityReportFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type WatchersGetAzureReachabilityReportFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(WatchersClient) (AzureReachabilityReport, error)
+}
+
+// WatchersGetFlowLogStatusFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type WatchersGetFlowLogStatusFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(WatchersClient) (FlowLogInformation, error)
+}
+
+// WatchersGetNextHopFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type WatchersGetNextHopFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(WatchersClient) (NextHopResult, error)
+}
+
+// WatchersGetTroubleshootingFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type WatchersGetTroubleshootingFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(WatchersClient) (TroubleshootingResult, error)
+}
+
+// WatchersGetTroubleshootingResultFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type WatchersGetTroubleshootingResultFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(WatchersClient) (TroubleshootingResult, error)
+}
+
+// WatchersGetVMSecurityRulesFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type WatchersGetVMSecurityRulesFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(WatchersClient) (SecurityGroupViewResult, error)
+}
+
+// WatchersListAvailableProvidersFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type WatchersListAvailableProvidersFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(WatchersClient) (AvailableProvidersList, error)
+}
+
+// WatchersSetFlowLogConfigurationFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type WatchersSetFlowLogConfigurationFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(WatchersClient) (FlowLogInformation, error)
+}
+
+// WatchersVerifyIPFlowFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type WatchersVerifyIPFlowFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(WatchersClient) (VerificationIPFlowResult, error)
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/operations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/operations.go
similarity index 99%
rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/operations.go
rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/operations.go
index 5892b39beef..9199a6eb7ed 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/operations.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/operations.go
@@ -70,9 +70,11 @@ func (client OperationsClient) List(ctx context.Context) (result OperationListRe
result.olr, err = client.ListResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "network.OperationsClient", "List", resp, "Failure responding to request")
+ return
}
if result.olr.hasNextLink() && result.olr.IsEmpty() {
err = result.NextWithContext(ctx)
+ return
}
return
@@ -80,7 +82,7 @@ func (client OperationsClient) List(ctx context.Context) (result OperationListRe
// ListPreparer prepares the List request.
func (client OperationsClient) ListPreparer(ctx context.Context) (*http.Request, error) {
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/packetcaptures.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/packetcaptures.go
similarity index 83%
rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/packetcaptures.go
rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/packetcaptures.go
index b984be4744a..c5a30948d0e 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/packetcaptures.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/packetcaptures.go
@@ -76,7 +76,7 @@ func (client PacketCapturesClient) Create(ctx context.Context, resourceGroupName
result, err = client.CreateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesClient", "Create", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.PacketCapturesClient", "Create", nil, "Failure sending request")
return
}
@@ -92,7 +92,7 @@ func (client PacketCapturesClient) CreatePreparer(ctx context.Context, resourceG
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -115,7 +115,33 @@ func (client PacketCapturesClient) CreateSender(req *http.Request) (future Packe
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(client PacketCapturesClient) (pcr PacketCaptureResult, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.PacketCapturesCreateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.PacketCapturesCreateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ pcr.Response.Response, err = future.GetResult(sender)
+ if pcr.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "network.PacketCapturesCreateFuture", "Result", nil, "received nil response and error")
+ }
+ if err == nil && pcr.Response.Response.StatusCode != http.StatusNoContent {
+ pcr, err = client.CreateResponder(pcr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.PacketCapturesCreateFuture", "Result", pcr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+ }
return
}
@@ -155,7 +181,7 @@ func (client PacketCapturesClient) Delete(ctx context.Context, resourceGroupName
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesClient", "Delete", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.PacketCapturesClient", "Delete", nil, "Failure sending request")
return
}
@@ -171,7 +197,7 @@ func (client PacketCapturesClient) DeletePreparer(ctx context.Context, resourceG
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -192,7 +218,23 @@ func (client PacketCapturesClient) DeleteSender(req *http.Request) (future Packe
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(client PacketCapturesClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.PacketCapturesDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.PacketCapturesDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
return
}
@@ -239,6 +281,7 @@ func (client PacketCapturesClient) Get(ctx context.Context, resourceGroupName st
result, err = client.GetResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "network.PacketCapturesClient", "Get", resp, "Failure responding to request")
+ return
}
return
@@ -253,7 +296,7 @@ func (client PacketCapturesClient) GetPreparer(ctx context.Context, resourceGrou
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -308,7 +351,7 @@ func (client PacketCapturesClient) GetStatus(ctx context.Context, resourceGroupN
result, err = client.GetStatusSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesClient", "GetStatus", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.PacketCapturesClient", "GetStatus", nil, "Failure sending request")
return
}
@@ -324,7 +367,7 @@ func (client PacketCapturesClient) GetStatusPreparer(ctx context.Context, resour
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -345,7 +388,33 @@ func (client PacketCapturesClient) GetStatusSender(req *http.Request) (future Pa
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(client PacketCapturesClient) (pcqsr PacketCaptureQueryStatusResult, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.PacketCapturesGetStatusFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.PacketCapturesGetStatusFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ pcqsr.Response.Response, err = future.GetResult(sender)
+ if pcqsr.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "network.PacketCapturesGetStatusFuture", "Result", nil, "received nil response and error")
+ }
+ if err == nil && pcqsr.Response.Response.StatusCode != http.StatusNoContent {
+ pcqsr, err = client.GetStatusResponder(pcqsr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.PacketCapturesGetStatusFuture", "Result", pcqsr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+ }
return
}
@@ -392,6 +461,7 @@ func (client PacketCapturesClient) List(ctx context.Context, resourceGroupName s
result, err = client.ListResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "network.PacketCapturesClient", "List", resp, "Failure responding to request")
+ return
}
return
@@ -405,7 +475,7 @@ func (client PacketCapturesClient) ListPreparer(ctx context.Context, resourceGro
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -460,7 +530,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", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.PacketCapturesClient", "Stop", nil, "Failure sending request")
return
}
@@ -476,7 +546,7 @@ func (client PacketCapturesClient) StopPreparer(ctx context.Context, resourceGro
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -497,7 +567,23 @@ func (client PacketCapturesClient) StopSender(req *http.Request) (future PacketC
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(client PacketCapturesClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.PacketCapturesStopFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.PacketCapturesStopFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/publicipaddresses.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/publicipaddresses.go
similarity index 91%
rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/publicipaddresses.go
rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/publicipaddresses.go
index 19af9010a62..e4be47ff54c 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/publicipaddresses.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/publicipaddresses.go
@@ -78,7 +78,7 @@ func (client PublicIPAddressesClient) CreateOrUpdate(ctx context.Context, resour
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "CreateOrUpdate", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "CreateOrUpdate", nil, "Failure sending request")
return
}
@@ -93,7 +93,7 @@ func (client PublicIPAddressesClient) CreateOrUpdatePreparer(ctx context.Context
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -116,7 +116,33 @@ func (client PublicIPAddressesClient) CreateOrUpdateSender(req *http.Request) (f
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(client PublicIPAddressesClient) (pia PublicIPAddress, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.PublicIPAddressesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.PublicIPAddressesCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ pia.Response.Response, err = future.GetResult(sender)
+ if pia.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "network.PublicIPAddressesCreateOrUpdateFuture", "Result", nil, "received nil response and error")
+ }
+ if err == nil && pia.Response.Response.StatusCode != http.StatusNoContent {
+ pia, err = client.CreateOrUpdateResponder(pia.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.PublicIPAddressesCreateOrUpdateFuture", "Result", pia.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+ }
return
}
@@ -155,7 +181,7 @@ func (client PublicIPAddressesClient) Delete(ctx context.Context, resourceGroupN
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "Delete", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "Delete", nil, "Failure sending request")
return
}
@@ -170,7 +196,7 @@ func (client PublicIPAddressesClient) DeletePreparer(ctx context.Context, resour
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -191,7 +217,23 @@ func (client PublicIPAddressesClient) DeleteSender(req *http.Request) (future Pu
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(client PublicIPAddressesClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.PublicIPAddressesDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.PublicIPAddressesDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
return
}
@@ -238,6 +280,7 @@ func (client PublicIPAddressesClient) Get(ctx context.Context, resourceGroupName
result, err = client.GetResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "Get", resp, "Failure responding to request")
+ return
}
return
@@ -251,7 +294,7 @@ func (client PublicIPAddressesClient) GetPreparer(ctx context.Context, resourceG
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -321,6 +364,7 @@ func (client PublicIPAddressesClient) GetVirtualMachineScaleSetPublicIPAddress(c
result, err = client.GetVirtualMachineScaleSetPublicIPAddressResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "GetVirtualMachineScaleSetPublicIPAddress", resp, "Failure responding to request")
+ return
}
return
@@ -403,9 +447,11 @@ func (client PublicIPAddressesClient) List(ctx context.Context, resourceGroupNam
result.pialr, err = client.ListResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "List", resp, "Failure responding to request")
+ return
}
if result.pialr.hasNextLink() && result.pialr.IsEmpty() {
err = result.NextWithContext(ctx)
+ return
}
return
@@ -418,7 +464,7 @@ func (client PublicIPAddressesClient) ListPreparer(ctx context.Context, resource
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -515,9 +561,11 @@ func (client PublicIPAddressesClient) ListAll(ctx context.Context) (result Publi
result.pialr, err = client.ListAllResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "ListAll", resp, "Failure responding to request")
+ return
}
if result.pialr.hasNextLink() && result.pialr.IsEmpty() {
err = result.NextWithContext(ctx)
+ return
}
return
@@ -529,7 +577,7 @@ func (client PublicIPAddressesClient) ListAllPreparer(ctx context.Context) (*htt
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -630,9 +678,11 @@ func (client PublicIPAddressesClient) ListVirtualMachineScaleSetPublicIPAddresse
result.pialr, err = client.ListVirtualMachineScaleSetPublicIPAddressesResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "ListVirtualMachineScaleSetPublicIPAddresses", resp, "Failure responding to request")
+ return
}
if result.pialr.hasNextLink() && result.pialr.IsEmpty() {
err = result.NextWithContext(ctx)
+ return
}
return
@@ -750,9 +800,11 @@ func (client PublicIPAddressesClient) ListVirtualMachineScaleSetVMPublicIPAddres
result.pialr, err = client.ListVirtualMachineScaleSetVMPublicIPAddressesResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "ListVirtualMachineScaleSetVMPublicIPAddresses", resp, "Failure responding to request")
+ return
}
if result.pialr.hasNextLink() && result.pialr.IsEmpty() {
err = result.NextWithContext(ctx)
+ return
}
return
@@ -861,7 +913,7 @@ func (client PublicIPAddressesClient) UpdateTags(ctx context.Context, resourceGr
result, err = client.UpdateTagsSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "UpdateTags", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "UpdateTags", nil, "Failure sending request")
return
}
@@ -876,7 +928,7 @@ func (client PublicIPAddressesClient) UpdateTagsPreparer(ctx context.Context, re
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -899,7 +951,33 @@ func (client PublicIPAddressesClient) UpdateTagsSender(req *http.Request) (futur
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(client PublicIPAddressesClient) (pia PublicIPAddress, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.PublicIPAddressesUpdateTagsFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.PublicIPAddressesUpdateTagsFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ pia.Response.Response, err = future.GetResult(sender)
+ if pia.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "network.PublicIPAddressesUpdateTagsFuture", "Result", nil, "received nil response and error")
+ }
+ if err == nil && pia.Response.Response.StatusCode != http.StatusNoContent {
+ pia, err = client.UpdateTagsResponder(pia.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.PublicIPAddressesUpdateTagsFuture", "Result", pia.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+ }
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/routefilterrules.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/routefilterrules.go
similarity index 85%
rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/routefilterrules.go
rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/routefilterrules.go
index e0af50164f3..9580aa4552a 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/routefilterrules.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/routefilterrules.go
@@ -77,7 +77,7 @@ func (client RouteFilterRulesClient) CreateOrUpdate(ctx context.Context, resourc
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFilterRulesClient", "CreateOrUpdate", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.RouteFilterRulesClient", "CreateOrUpdate", nil, "Failure sending request")
return
}
@@ -93,7 +93,7 @@ func (client RouteFilterRulesClient) CreateOrUpdatePreparer(ctx context.Context,
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -117,7 +117,33 @@ func (client RouteFilterRulesClient) CreateOrUpdateSender(req *http.Request) (fu
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(client RouteFilterRulesClient) (rfr RouteFilterRule, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.RouteFilterRulesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.RouteFilterRulesCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ rfr.Response.Response, err = future.GetResult(sender)
+ if rfr.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "network.RouteFilterRulesCreateOrUpdateFuture", "Result", nil, "received nil response and error")
+ }
+ if err == nil && rfr.Response.Response.StatusCode != http.StatusNoContent {
+ rfr, err = client.CreateOrUpdateResponder(rfr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.RouteFilterRulesCreateOrUpdateFuture", "Result", rfr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+ }
return
}
@@ -157,7 +183,7 @@ func (client RouteFilterRulesClient) Delete(ctx context.Context, resourceGroupNa
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFilterRulesClient", "Delete", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.RouteFilterRulesClient", "Delete", nil, "Failure sending request")
return
}
@@ -173,7 +199,7 @@ func (client RouteFilterRulesClient) DeletePreparer(ctx context.Context, resourc
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -194,7 +220,23 @@ func (client RouteFilterRulesClient) DeleteSender(req *http.Request) (future Rou
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(client RouteFilterRulesClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.RouteFilterRulesDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.RouteFilterRulesDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
return
}
@@ -241,6 +283,7 @@ func (client RouteFilterRulesClient) Get(ctx context.Context, resourceGroupName
result, err = client.GetResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "network.RouteFilterRulesClient", "Get", resp, "Failure responding to request")
+ return
}
return
@@ -255,7 +298,7 @@ func (client RouteFilterRulesClient) GetPreparer(ctx context.Context, resourceGr
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -318,9 +361,11 @@ func (client RouteFilterRulesClient) ListByRouteFilter(ctx context.Context, reso
result.rfrlr, err = client.ListByRouteFilterResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "network.RouteFilterRulesClient", "ListByRouteFilter", resp, "Failure responding to request")
+ return
}
if result.rfrlr.hasNextLink() && result.rfrlr.IsEmpty() {
err = result.NextWithContext(ctx)
+ return
}
return
@@ -334,7 +379,7 @@ func (client RouteFilterRulesClient) ListByRouteFilterPreparer(ctx context.Conte
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -427,7 +472,7 @@ func (client RouteFilterRulesClient) Update(ctx context.Context, resourceGroupNa
result, err = client.UpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFilterRulesClient", "Update", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.RouteFilterRulesClient", "Update", nil, "Failure sending request")
return
}
@@ -443,7 +488,7 @@ func (client RouteFilterRulesClient) UpdatePreparer(ctx context.Context, resourc
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -468,7 +513,33 @@ func (client RouteFilterRulesClient) UpdateSender(req *http.Request) (future Rou
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(client RouteFilterRulesClient) (rfr RouteFilterRule, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.RouteFilterRulesUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.RouteFilterRulesUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ rfr.Response.Response, err = future.GetResult(sender)
+ if rfr.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "network.RouteFilterRulesUpdateFuture", "Result", nil, "received nil response and error")
+ }
+ if err == nil && rfr.Response.Response.StatusCode != http.StatusNoContent {
+ rfr, err = client.UpdateResponder(rfr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.RouteFilterRulesUpdateFuture", "Result", rfr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+ }
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/routefilters.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/routefilters.go
similarity index 86%
rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/routefilters.go
rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/routefilters.go
index 8ea96ea5ca6..559772ac5e3 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/routefilters.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/routefilters.go
@@ -65,7 +65,7 @@ func (client RouteFiltersClient) CreateOrUpdate(ctx context.Context, resourceGro
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFiltersClient", "CreateOrUpdate", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.RouteFiltersClient", "CreateOrUpdate", nil, "Failure sending request")
return
}
@@ -80,7 +80,7 @@ func (client RouteFiltersClient) CreateOrUpdatePreparer(ctx context.Context, res
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -104,7 +104,33 @@ func (client RouteFiltersClient) CreateOrUpdateSender(req *http.Request) (future
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(client RouteFiltersClient) (rf RouteFilter, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.RouteFiltersCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.RouteFiltersCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ rf.Response.Response, err = future.GetResult(sender)
+ if rf.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "network.RouteFiltersCreateOrUpdateFuture", "Result", nil, "received nil response and error")
+ }
+ if err == nil && rf.Response.Response.StatusCode != http.StatusNoContent {
+ rf, err = client.CreateOrUpdateResponder(rf.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.RouteFiltersCreateOrUpdateFuture", "Result", rf.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+ }
return
}
@@ -143,7 +169,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", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.RouteFiltersClient", "Delete", nil, "Failure sending request")
return
}
@@ -158,7 +184,7 @@ func (client RouteFiltersClient) DeletePreparer(ctx context.Context, resourceGro
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -179,7 +205,23 @@ func (client RouteFiltersClient) DeleteSender(req *http.Request) (future RouteFi
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(client RouteFiltersClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.RouteFiltersDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.RouteFiltersDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
return
}
@@ -226,6 +268,7 @@ func (client RouteFiltersClient) Get(ctx context.Context, resourceGroupName stri
result, err = client.GetResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "network.RouteFiltersClient", "Get", resp, "Failure responding to request")
+ return
}
return
@@ -239,7 +282,7 @@ func (client RouteFiltersClient) GetPreparer(ctx context.Context, resourceGroupN
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -302,9 +345,11 @@ func (client RouteFiltersClient) List(ctx context.Context) (result RouteFilterLi
result.rflr, err = client.ListResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "network.RouteFiltersClient", "List", resp, "Failure responding to request")
+ return
}
if result.rflr.hasNextLink() && result.rflr.IsEmpty() {
err = result.NextWithContext(ctx)
+ return
}
return
@@ -316,7 +361,7 @@ func (client RouteFiltersClient) ListPreparer(ctx context.Context) (*http.Reques
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -415,9 +460,11 @@ func (client RouteFiltersClient) ListByResourceGroup(ctx context.Context, resour
result.rflr, err = client.ListByResourceGroupResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "network.RouteFiltersClient", "ListByResourceGroup", resp, "Failure responding to request")
+ return
}
if result.rflr.hasNextLink() && result.rflr.IsEmpty() {
err = result.NextWithContext(ctx)
+ return
}
return
@@ -430,7 +477,7 @@ func (client RouteFiltersClient) ListByResourceGroupPreparer(ctx context.Context
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -522,7 +569,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", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.RouteFiltersClient", "Update", nil, "Failure sending request")
return
}
@@ -537,7 +584,7 @@ func (client RouteFiltersClient) UpdatePreparer(ctx context.Context, resourceGro
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -563,7 +610,33 @@ func (client RouteFiltersClient) UpdateSender(req *http.Request) (future RouteFi
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(client RouteFiltersClient) (rf RouteFilter, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.RouteFiltersUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.RouteFiltersUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ rf.Response.Response, err = future.GetResult(sender)
+ if rf.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "network.RouteFiltersUpdateFuture", "Result", nil, "received nil response and error")
+ }
+ if err == nil && rf.Response.Response.StatusCode != http.StatusNoContent {
+ rf, err = client.UpdateResponder(rf.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.RouteFiltersUpdateFuture", "Result", rf.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+ }
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/routes.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/routes.go
similarity index 87%
rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/routes.go
rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/routes.go
index a3ea8d83027..e395b3ef5ce 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/routes.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/routes.go
@@ -66,7 +66,7 @@ func (client RoutesClient) CreateOrUpdate(ctx context.Context, resourceGroupName
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.RoutesClient", "CreateOrUpdate", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.RoutesClient", "CreateOrUpdate", nil, "Failure sending request")
return
}
@@ -82,7 +82,7 @@ func (client RoutesClient) CreateOrUpdatePreparer(ctx context.Context, resourceG
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -105,7 +105,33 @@ func (client RoutesClient) CreateOrUpdateSender(req *http.Request) (future Route
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(client RoutesClient) (r Route, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.RoutesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.RoutesCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ r.Response.Response, err = future.GetResult(sender)
+ if r.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "network.RoutesCreateOrUpdateFuture", "Result", nil, "received nil response and error")
+ }
+ if err == nil && r.Response.Response.StatusCode != http.StatusNoContent {
+ r, err = client.CreateOrUpdateResponder(r.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.RoutesCreateOrUpdateFuture", "Result", r.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+ }
return
}
@@ -145,7 +171,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", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.RoutesClient", "Delete", nil, "Failure sending request")
return
}
@@ -161,7 +187,7 @@ func (client RoutesClient) DeletePreparer(ctx context.Context, resourceGroupName
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -182,7 +208,23 @@ func (client RoutesClient) DeleteSender(req *http.Request) (future RoutesDeleteF
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(client RoutesClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.RoutesDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.RoutesDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
return
}
@@ -229,6 +271,7 @@ func (client RoutesClient) Get(ctx context.Context, resourceGroupName string, ro
result, err = client.GetResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "network.RoutesClient", "Get", resp, "Failure responding to request")
+ return
}
return
@@ -243,7 +286,7 @@ func (client RoutesClient) GetPreparer(ctx context.Context, resourceGroupName st
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -306,9 +349,11 @@ func (client RoutesClient) List(ctx context.Context, resourceGroupName string, r
result.rlr, err = client.ListResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "network.RoutesClient", "List", resp, "Failure responding to request")
+ return
}
if result.rlr.hasNextLink() && result.rlr.IsEmpty() {
err = result.NextWithContext(ctx)
+ return
}
return
@@ -322,7 +367,7 @@ func (client RoutesClient) ListPreparer(ctx context.Context, resourceGroupName s
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/routetables.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/routetables.go
similarity index 86%
rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/routetables.go
rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/routetables.go
index 0e18600b2b1..fb8173930fc 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/routetables.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/routetables.go
@@ -65,7 +65,7 @@ func (client RouteTablesClient) CreateOrUpdate(ctx context.Context, resourceGrou
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteTablesClient", "CreateOrUpdate", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.RouteTablesClient", "CreateOrUpdate", nil, "Failure sending request")
return
}
@@ -80,7 +80,7 @@ func (client RouteTablesClient) CreateOrUpdatePreparer(ctx context.Context, reso
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -103,7 +103,33 @@ func (client RouteTablesClient) CreateOrUpdateSender(req *http.Request) (future
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(client RouteTablesClient) (rt RouteTable, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.RouteTablesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.RouteTablesCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ rt.Response.Response, err = future.GetResult(sender)
+ if rt.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "network.RouteTablesCreateOrUpdateFuture", "Result", nil, "received nil response and error")
+ }
+ if err == nil && rt.Response.Response.StatusCode != http.StatusNoContent {
+ rt, err = client.CreateOrUpdateResponder(rt.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.RouteTablesCreateOrUpdateFuture", "Result", rt.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+ }
return
}
@@ -142,7 +168,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", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.RouteTablesClient", "Delete", nil, "Failure sending request")
return
}
@@ -157,7 +183,7 @@ func (client RouteTablesClient) DeletePreparer(ctx context.Context, resourceGrou
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -178,7 +204,23 @@ func (client RouteTablesClient) DeleteSender(req *http.Request) (future RouteTab
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(client RouteTablesClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.RouteTablesDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.RouteTablesDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
return
}
@@ -225,6 +267,7 @@ func (client RouteTablesClient) Get(ctx context.Context, resourceGroupName strin
result, err = client.GetResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "network.RouteTablesClient", "Get", resp, "Failure responding to request")
+ return
}
return
@@ -238,7 +281,7 @@ func (client RouteTablesClient) GetPreparer(ctx context.Context, resourceGroupNa
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -303,9 +346,11 @@ func (client RouteTablesClient) List(ctx context.Context, resourceGroupName stri
result.rtlr, err = client.ListResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "network.RouteTablesClient", "List", resp, "Failure responding to request")
+ return
}
if result.rtlr.hasNextLink() && result.rtlr.IsEmpty() {
err = result.NextWithContext(ctx)
+ return
}
return
@@ -318,7 +363,7 @@ func (client RouteTablesClient) ListPreparer(ctx context.Context, resourceGroupN
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -415,9 +460,11 @@ func (client RouteTablesClient) ListAll(ctx context.Context) (result RouteTableL
result.rtlr, err = client.ListAllResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "network.RouteTablesClient", "ListAll", resp, "Failure responding to request")
+ return
}
if result.rtlr.hasNextLink() && result.rtlr.IsEmpty() {
err = result.NextWithContext(ctx)
+ return
}
return
@@ -429,7 +476,7 @@ func (client RouteTablesClient) ListAllPreparer(ctx context.Context) (*http.Requ
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -521,7 +568,7 @@ func (client RouteTablesClient) UpdateTags(ctx context.Context, resourceGroupNam
result, err = client.UpdateTagsSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteTablesClient", "UpdateTags", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.RouteTablesClient", "UpdateTags", nil, "Failure sending request")
return
}
@@ -536,7 +583,7 @@ func (client RouteTablesClient) UpdateTagsPreparer(ctx context.Context, resource
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -559,7 +606,33 @@ func (client RouteTablesClient) UpdateTagsSender(req *http.Request) (future Rout
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(client RouteTablesClient) (rt RouteTable, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.RouteTablesUpdateTagsFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.RouteTablesUpdateTagsFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ rt.Response.Response, err = future.GetResult(sender)
+ if rt.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "network.RouteTablesUpdateTagsFuture", "Result", nil, "received nil response and error")
+ }
+ if err == nil && rt.Response.Response.StatusCode != http.StatusNoContent {
+ rt, err = client.UpdateTagsResponder(rt.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.RouteTablesUpdateTagsFuture", "Result", rt.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+ }
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/securitygroups.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/securitygroups.go
similarity index 86%
rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/securitygroups.go
rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/securitygroups.go
index 2de92d91885..4e2f662accf 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/securitygroups.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/securitygroups.go
@@ -65,7 +65,7 @@ func (client SecurityGroupsClient) CreateOrUpdate(ctx context.Context, resourceG
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityGroupsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.SecurityGroupsClient", "CreateOrUpdate", nil, "Failure sending request")
return
}
@@ -80,7 +80,7 @@ func (client SecurityGroupsClient) CreateOrUpdatePreparer(ctx context.Context, r
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -103,7 +103,33 @@ func (client SecurityGroupsClient) CreateOrUpdateSender(req *http.Request) (futu
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(client SecurityGroupsClient) (sg SecurityGroup, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.SecurityGroupsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.SecurityGroupsCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ sg.Response.Response, err = future.GetResult(sender)
+ if sg.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "network.SecurityGroupsCreateOrUpdateFuture", "Result", nil, "received nil response and error")
+ }
+ if err == nil && sg.Response.Response.StatusCode != http.StatusNoContent {
+ sg, err = client.CreateOrUpdateResponder(sg.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.SecurityGroupsCreateOrUpdateFuture", "Result", sg.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+ }
return
}
@@ -142,7 +168,7 @@ func (client SecurityGroupsClient) Delete(ctx context.Context, resourceGroupName
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityGroupsClient", "Delete", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.SecurityGroupsClient", "Delete", nil, "Failure sending request")
return
}
@@ -157,7 +183,7 @@ func (client SecurityGroupsClient) DeletePreparer(ctx context.Context, resourceG
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -178,7 +204,23 @@ func (client SecurityGroupsClient) DeleteSender(req *http.Request) (future Secur
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(client SecurityGroupsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.SecurityGroupsDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.SecurityGroupsDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
return
}
@@ -225,6 +267,7 @@ func (client SecurityGroupsClient) Get(ctx context.Context, resourceGroupName st
result, err = client.GetResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "network.SecurityGroupsClient", "Get", resp, "Failure responding to request")
+ return
}
return
@@ -238,7 +281,7 @@ func (client SecurityGroupsClient) GetPreparer(ctx context.Context, resourceGrou
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -303,9 +346,11 @@ func (client SecurityGroupsClient) List(ctx context.Context, resourceGroupName s
result.sglr, err = client.ListResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "network.SecurityGroupsClient", "List", resp, "Failure responding to request")
+ return
}
if result.sglr.hasNextLink() && result.sglr.IsEmpty() {
err = result.NextWithContext(ctx)
+ return
}
return
@@ -318,7 +363,7 @@ func (client SecurityGroupsClient) ListPreparer(ctx context.Context, resourceGro
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -415,9 +460,11 @@ func (client SecurityGroupsClient) ListAll(ctx context.Context) (result Security
result.sglr, err = client.ListAllResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "network.SecurityGroupsClient", "ListAll", resp, "Failure responding to request")
+ return
}
if result.sglr.hasNextLink() && result.sglr.IsEmpty() {
err = result.NextWithContext(ctx)
+ return
}
return
@@ -429,7 +476,7 @@ func (client SecurityGroupsClient) ListAllPreparer(ctx context.Context) (*http.R
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -521,7 +568,7 @@ func (client SecurityGroupsClient) UpdateTags(ctx context.Context, resourceGroup
result, err = client.UpdateTagsSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityGroupsClient", "UpdateTags", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.SecurityGroupsClient", "UpdateTags", nil, "Failure sending request")
return
}
@@ -536,7 +583,7 @@ func (client SecurityGroupsClient) UpdateTagsPreparer(ctx context.Context, resou
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -559,7 +606,33 @@ func (client SecurityGroupsClient) UpdateTagsSender(req *http.Request) (future S
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(client SecurityGroupsClient) (sg SecurityGroup, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.SecurityGroupsUpdateTagsFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.SecurityGroupsUpdateTagsFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ sg.Response.Response, err = future.GetResult(sender)
+ if sg.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "network.SecurityGroupsUpdateTagsFuture", "Result", nil, "received nil response and error")
+ }
+ if err == nil && sg.Response.Response.StatusCode != http.StatusNoContent {
+ sg, err = client.UpdateTagsResponder(sg.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.SecurityGroupsUpdateTagsFuture", "Result", sg.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+ }
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/securityrules.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/securityrules.go
similarity index 88%
rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/securityrules.go
rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/securityrules.go
index 14e60bc8c80..517d8967a73 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/securityrules.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/securityrules.go
@@ -66,7 +66,7 @@ func (client SecurityRulesClient) CreateOrUpdate(ctx context.Context, resourceGr
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityRulesClient", "CreateOrUpdate", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.SecurityRulesClient", "CreateOrUpdate", nil, "Failure sending request")
return
}
@@ -82,7 +82,7 @@ func (client SecurityRulesClient) CreateOrUpdatePreparer(ctx context.Context, re
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -105,7 +105,33 @@ func (client SecurityRulesClient) CreateOrUpdateSender(req *http.Request) (futur
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(client SecurityRulesClient) (sr SecurityRule, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.SecurityRulesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.SecurityRulesCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ sr.Response.Response, err = future.GetResult(sender)
+ if sr.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "network.SecurityRulesCreateOrUpdateFuture", "Result", nil, "received nil response and error")
+ }
+ if err == nil && sr.Response.Response.StatusCode != http.StatusNoContent {
+ sr, err = client.CreateOrUpdateResponder(sr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.SecurityRulesCreateOrUpdateFuture", "Result", sr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+ }
return
}
@@ -145,7 +171,7 @@ func (client SecurityRulesClient) Delete(ctx context.Context, resourceGroupName
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityRulesClient", "Delete", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.SecurityRulesClient", "Delete", nil, "Failure sending request")
return
}
@@ -161,7 +187,7 @@ func (client SecurityRulesClient) DeletePreparer(ctx context.Context, resourceGr
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -182,7 +208,23 @@ func (client SecurityRulesClient) DeleteSender(req *http.Request) (future Securi
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(client SecurityRulesClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.SecurityRulesDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.SecurityRulesDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
return
}
@@ -229,6 +271,7 @@ func (client SecurityRulesClient) Get(ctx context.Context, resourceGroupName str
result, err = client.GetResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "network.SecurityRulesClient", "Get", resp, "Failure responding to request")
+ return
}
return
@@ -243,7 +286,7 @@ func (client SecurityRulesClient) GetPreparer(ctx context.Context, resourceGroup
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -306,9 +349,11 @@ func (client SecurityRulesClient) List(ctx context.Context, resourceGroupName st
result.srlr, err = client.ListResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "network.SecurityRulesClient", "List", resp, "Failure responding to request")
+ return
}
if result.srlr.hasNextLink() && result.srlr.IsEmpty() {
err = result.NextWithContext(ctx)
+ return
}
return
@@ -322,7 +367,7 @@ func (client SecurityRulesClient) ListPreparer(ctx context.Context, resourceGrou
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/subnets.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/subnets.go
similarity index 79%
rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/subnets.go
rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/subnets.go
index 548ad25f2e5..ad32e199d0c 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/subnets.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/subnets.go
@@ -66,7 +66,7 @@ func (client SubnetsClient) CreateOrUpdate(ctx context.Context, resourceGroupNam
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.SubnetsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.SubnetsClient", "CreateOrUpdate", nil, "Failure sending request")
return
}
@@ -82,7 +82,7 @@ func (client SubnetsClient) CreateOrUpdatePreparer(ctx context.Context, resource
"virtualNetworkName": autorest.Encode("path", virtualNetworkName),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -105,7 +105,33 @@ func (client SubnetsClient) CreateOrUpdateSender(req *http.Request) (future Subn
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(client SubnetsClient) (s Subnet, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.SubnetsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.SubnetsCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ s.Response.Response, err = future.GetResult(sender)
+ if s.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "network.SubnetsCreateOrUpdateFuture", "Result", nil, "received nil response and error")
+ }
+ if err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
+ s, err = client.CreateOrUpdateResponder(s.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.SubnetsCreateOrUpdateFuture", "Result", s.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+ }
return
}
@@ -145,7 +171,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", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.SubnetsClient", "Delete", nil, "Failure sending request")
return
}
@@ -161,7 +187,7 @@ func (client SubnetsClient) DeletePreparer(ctx context.Context, resourceGroupNam
"virtualNetworkName": autorest.Encode("path", virtualNetworkName),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -182,7 +208,23 @@ func (client SubnetsClient) DeleteSender(req *http.Request) (future SubnetsDelet
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(client SubnetsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.SubnetsDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.SubnetsDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
return
}
@@ -230,6 +272,7 @@ func (client SubnetsClient) Get(ctx context.Context, resourceGroupName string, v
result, err = client.GetResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "network.SubnetsClient", "Get", resp, "Failure responding to request")
+ return
}
return
@@ -244,7 +287,7 @@ func (client SubnetsClient) GetPreparer(ctx context.Context, resourceGroupName s
"virtualNetworkName": autorest.Encode("path", virtualNetworkName),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -310,9 +353,11 @@ func (client SubnetsClient) List(ctx context.Context, resourceGroupName string,
result.slr, err = client.ListResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "network.SubnetsClient", "List", resp, "Failure responding to request")
+ return
}
if result.slr.hasNextLink() && result.slr.IsEmpty() {
err = result.NextWithContext(ctx)
+ return
}
return
@@ -326,7 +371,7 @@ func (client SubnetsClient) ListPreparer(ctx context.Context, resourceGroupName
"virtualNetworkName": autorest.Encode("path", virtualNetworkName),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -393,83 +438,3 @@ func (client SubnetsClient) ListComplete(ctx context.Context, resourceGroupName
result.page, err = client.List(ctx, resourceGroupName, virtualNetworkName)
return
}
-
-// PrepareNetworkPolicies prepares a subnet by applying network intent policies.
-// Parameters:
-// resourceGroupName - the name of the resource group.
-// virtualNetworkName - the name of the virtual network.
-// subnetName - the name of the subnet.
-// prepareNetworkPoliciesRequestParameters - parameters supplied to prepare subnet by applying network intent
-// policies.
-func (client SubnetsClient) PrepareNetworkPolicies(ctx context.Context, resourceGroupName string, virtualNetworkName string, subnetName string, prepareNetworkPoliciesRequestParameters PrepareNetworkPoliciesRequest) (result SubnetsPrepareNetworkPoliciesFuture, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/SubnetsClient.PrepareNetworkPolicies")
- defer func() {
- sc := -1
- if result.Response() != nil {
- sc = result.Response().StatusCode
- }
- tracing.EndSpan(ctx, sc, err)
- }()
- }
- req, err := client.PrepareNetworkPoliciesPreparer(ctx, resourceGroupName, virtualNetworkName, subnetName, prepareNetworkPoliciesRequestParameters)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SubnetsClient", "PrepareNetworkPolicies", nil, "Failure preparing request")
- return
- }
-
- result, err = client.PrepareNetworkPoliciesSender(req)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SubnetsClient", "PrepareNetworkPolicies", result.Response(), "Failure sending request")
- return
- }
-
- return
-}
-
-// PrepareNetworkPoliciesPreparer prepares the PrepareNetworkPolicies request.
-func (client SubnetsClient) PrepareNetworkPoliciesPreparer(ctx context.Context, resourceGroupName string, virtualNetworkName string, subnetName string, prepareNetworkPoliciesRequestParameters PrepareNetworkPoliciesRequest) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "resourceGroupName": autorest.Encode("path", resourceGroupName),
- "subnetName": autorest.Encode("path", subnetName),
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- "virtualNetworkName": autorest.Encode("path", virtualNetworkName),
- }
-
- const APIVersion = "2018-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.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}/PrepareNetworkPolicies", pathParameters),
- autorest.WithJSON(prepareNetworkPoliciesRequestParameters),
- autorest.WithQueryParameters(queryParameters))
- return preparer.Prepare((&http.Request{}).WithContext(ctx))
-}
-
-// PrepareNetworkPoliciesSender sends the PrepareNetworkPolicies request. The method will close the
-// http.Response Body if it receives an error.
-func (client SubnetsClient) PrepareNetworkPoliciesSender(req *http.Request) (future SubnetsPrepareNetworkPoliciesFuture, err error) {
- var resp *http.Response
- resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
- if err != nil {
- return
- }
- future.Future, err = azure.NewFutureFromResponse(resp)
- return
-}
-
-// PrepareNetworkPoliciesResponder handles the response to the PrepareNetworkPolicies request. The method always
-// closes the http.Response Body.
-func (client SubnetsClient) PrepareNetworkPoliciesResponder(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/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/usages.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/usages.go
similarity index 97%
rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/usages.go
rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/usages.go
index bef4ab737b6..0ff04aae862 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/usages.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/usages.go
@@ -58,7 +58,7 @@ func (client UsagesClient) List(ctx context.Context, location string) (result Us
}
if err := validation.Validate([]validation.Validation{
{TargetValue: location,
- Constraints: []validation.Constraint{{Target: "location", Name: validation.Pattern, Rule: `^[-\w\._ ]+$`, Chain: nil}}}}); err != nil {
+ Constraints: []validation.Constraint{{Target: "location", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil {
return result, validation.NewError("network.UsagesClient", "List", err.Error())
}
@@ -79,9 +79,11 @@ func (client UsagesClient) List(ctx context.Context, location string) (result Us
result.ulr, err = client.ListResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "network.UsagesClient", "List", resp, "Failure responding to request")
+ return
}
if result.ulr.hasNextLink() && result.ulr.IsEmpty() {
err = result.NextWithContext(ctx)
+ return
}
return
@@ -94,7 +96,7 @@ func (client UsagesClient) ListPreparer(ctx context.Context, location string) (*
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/version.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/version.go
similarity index 94%
rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/version.go
rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/version.go
index 91a37daf05f..1c1d1edf694 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/version.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/version.go
@@ -21,7 +21,7 @@ import "github.com/Azure/azure-sdk-for-go/version"
// UserAgent returns the UserAgent string to use when sending http.Requests.
func UserAgent() string {
- return "Azure-SDK-For-Go/" + Version() + " network/2018-12-01"
+ return "Azure-SDK-For-Go/" + Version() + " network/2017-10-01"
}
// Version returns the semantic version (see http://semver.org) of the client.
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/virtualnetworkgatewayconnections.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/virtualnetworkgatewayconnections.go
similarity index 82%
rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/virtualnetworkgatewayconnections.go
rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/virtualnetworkgatewayconnections.go
index f90f0d03f3e..73818bf8f80 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/virtualnetworkgatewayconnections.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/virtualnetworkgatewayconnections.go
@@ -80,7 +80,7 @@ func (client VirtualNetworkGatewayConnectionsClient) CreateOrUpdate(ctx context.
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "CreateOrUpdate", nil, "Failure sending request")
return
}
@@ -95,7 +95,7 @@ func (client VirtualNetworkGatewayConnectionsClient) CreateOrUpdatePreparer(ctx
"virtualNetworkGatewayConnectionName": autorest.Encode("path", virtualNetworkGatewayConnectionName),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -118,7 +118,33 @@ func (client VirtualNetworkGatewayConnectionsClient) CreateOrUpdateSender(req *h
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(client VirtualNetworkGatewayConnectionsClient) (vngc VirtualNetworkGatewayConnection, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ vngc.Response.Response, err = future.GetResult(sender)
+ if vngc.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture", "Result", nil, "received nil response and error")
+ }
+ if err == nil && vngc.Response.Response.StatusCode != http.StatusNoContent {
+ vngc, err = client.CreateOrUpdateResponder(vngc.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture", "Result", vngc.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+ }
return
}
@@ -157,7 +183,7 @@ func (client VirtualNetworkGatewayConnectionsClient) Delete(ctx context.Context,
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "Delete", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "Delete", nil, "Failure sending request")
return
}
@@ -172,7 +198,7 @@ func (client VirtualNetworkGatewayConnectionsClient) DeletePreparer(ctx context.
"virtualNetworkGatewayConnectionName": autorest.Encode("path", virtualNetworkGatewayConnectionName),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -193,7 +219,23 @@ func (client VirtualNetworkGatewayConnectionsClient) DeleteSender(req *http.Requ
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(client VirtualNetworkGatewayConnectionsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
return
}
@@ -239,6 +281,7 @@ func (client VirtualNetworkGatewayConnectionsClient) Get(ctx context.Context, re
result, err = client.GetResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "Get", resp, "Failure responding to request")
+ return
}
return
@@ -252,7 +295,7 @@ func (client VirtualNetworkGatewayConnectionsClient) GetPreparer(ctx context.Con
"virtualNetworkGatewayConnectionName": autorest.Encode("path", virtualNetworkGatewayConnectionName),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -315,6 +358,7 @@ func (client VirtualNetworkGatewayConnectionsClient) GetSharedKey(ctx context.Co
result, err = client.GetSharedKeyResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "GetSharedKey", resp, "Failure responding to request")
+ return
}
return
@@ -328,7 +372,7 @@ func (client VirtualNetworkGatewayConnectionsClient) GetSharedKeyPreparer(ctx co
"virtualNetworkGatewayConnectionName": autorest.Encode("path", virtualNetworkGatewayConnectionName),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -391,9 +435,11 @@ func (client VirtualNetworkGatewayConnectionsClient) List(ctx context.Context, r
result.vngclr, err = client.ListResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "List", resp, "Failure responding to request")
+ return
}
if result.vngclr.hasNextLink() && result.vngclr.IsEmpty() {
err = result.NextWithContext(ctx)
+ return
}
return
@@ -406,7 +452,7 @@ func (client VirtualNetworkGatewayConnectionsClient) ListPreparer(ctx context.Co
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -510,7 +556,7 @@ func (client VirtualNetworkGatewayConnectionsClient) ResetSharedKey(ctx context.
result, err = client.ResetSharedKeySender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "ResetSharedKey", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "ResetSharedKey", nil, "Failure sending request")
return
}
@@ -525,7 +571,7 @@ func (client VirtualNetworkGatewayConnectionsClient) ResetSharedKeyPreparer(ctx
"virtualNetworkGatewayConnectionName": autorest.Encode("path", virtualNetworkGatewayConnectionName),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -548,7 +594,33 @@ func (client VirtualNetworkGatewayConnectionsClient) ResetSharedKeySender(req *h
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(client VirtualNetworkGatewayConnectionsClient) (crsk ConnectionResetSharedKey, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ crsk.Response.Response, err = future.GetResult(sender)
+ if crsk.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture", "Result", nil, "received nil response and error")
+ }
+ if err == nil && crsk.Response.Response.StatusCode != http.StatusNoContent {
+ crsk, err = client.ResetSharedKeyResponder(crsk.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture", "Result", crsk.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+ }
return
}
@@ -597,7 +669,7 @@ func (client VirtualNetworkGatewayConnectionsClient) SetSharedKey(ctx context.Co
result, err = client.SetSharedKeySender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "SetSharedKey", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "SetSharedKey", nil, "Failure sending request")
return
}
@@ -612,7 +684,7 @@ func (client VirtualNetworkGatewayConnectionsClient) SetSharedKeyPreparer(ctx co
"virtualNetworkGatewayConnectionName": autorest.Encode("path", virtualNetworkGatewayConnectionName),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -635,7 +707,33 @@ func (client VirtualNetworkGatewayConnectionsClient) SetSharedKeySender(req *htt
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(client VirtualNetworkGatewayConnectionsClient) (csk ConnectionSharedKey, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ csk.Response.Response, err = future.GetResult(sender)
+ if csk.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture", "Result", nil, "received nil response and error")
+ }
+ if err == nil && csk.Response.Response.StatusCode != http.StatusNoContent {
+ csk, err = client.SetSharedKeyResponder(csk.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture", "Result", csk.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+ }
return
}
@@ -675,7 +773,7 @@ func (client VirtualNetworkGatewayConnectionsClient) UpdateTags(ctx context.Cont
result, err = client.UpdateTagsSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "UpdateTags", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "UpdateTags", nil, "Failure sending request")
return
}
@@ -690,7 +788,7 @@ func (client VirtualNetworkGatewayConnectionsClient) UpdateTagsPreparer(ctx cont
"virtualNetworkGatewayConnectionName": autorest.Encode("path", virtualNetworkGatewayConnectionName),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -713,13 +811,39 @@ func (client VirtualNetworkGatewayConnectionsClient) UpdateTagsSender(req *http.
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(client VirtualNetworkGatewayConnectionsClient) (vngcle VirtualNetworkGatewayConnectionListEntity, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsUpdateTagsFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsUpdateTagsFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ vngcle.Response.Response, err = future.GetResult(sender)
+ if vngcle.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsUpdateTagsFuture", "Result", nil, "received nil response and error")
+ }
+ if err == nil && vngcle.Response.Response.StatusCode != http.StatusNoContent {
+ vngcle, err = client.UpdateTagsResponder(vngcle.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsUpdateTagsFuture", "Result", vngcle.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+ }
return
}
// UpdateTagsResponder handles the response to the UpdateTags request. The method always
// closes the http.Response Body.
-func (client VirtualNetworkGatewayConnectionsClient) UpdateTagsResponder(resp *http.Response) (result VirtualNetworkGatewayConnection, err error) {
+func (client VirtualNetworkGatewayConnectionsClient) UpdateTagsResponder(resp *http.Response) (result VirtualNetworkGatewayConnectionListEntity, err error) {
err = autorest.Respond(
resp,
azure.WithErrorUnlessStatusCode(http.StatusOK),
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/virtualnetworkgateways.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/virtualnetworkgateways.go
similarity index 79%
rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/virtualnetworkgateways.go
rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/virtualnetworkgateways.go
index 2c88db36ca1..4da2cbb8417 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/virtualnetworkgateways.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/virtualnetworkgateways.go
@@ -73,7 +73,7 @@ func (client VirtualNetworkGatewaysClient) CreateOrUpdate(ctx context.Context, r
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "CreateOrUpdate", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "CreateOrUpdate", nil, "Failure sending request")
return
}
@@ -88,7 +88,7 @@ func (client VirtualNetworkGatewaysClient) CreateOrUpdatePreparer(ctx context.Co
"virtualNetworkGatewayName": autorest.Encode("path", virtualNetworkGatewayName),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -111,7 +111,33 @@ func (client VirtualNetworkGatewaysClient) CreateOrUpdateSender(req *http.Reques
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ vng.Response.Response, err = future.GetResult(sender)
+ if vng.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysCreateOrUpdateFuture", "Result", nil, "received nil response and error")
+ }
+ if err == nil && vng.Response.Response.StatusCode != http.StatusNoContent {
+ vng, err = client.CreateOrUpdateResponder(vng.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysCreateOrUpdateFuture", "Result", vng.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+ }
return
}
@@ -150,7 +176,7 @@ func (client VirtualNetworkGatewaysClient) Delete(ctx context.Context, resourceG
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "Delete", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "Delete", nil, "Failure sending request")
return
}
@@ -165,7 +191,7 @@ func (client VirtualNetworkGatewaysClient) DeletePreparer(ctx context.Context, r
"virtualNetworkGatewayName": autorest.Encode("path", virtualNetworkGatewayName),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -186,7 +212,23 @@ func (client VirtualNetworkGatewaysClient) DeleteSender(req *http.Request) (futu
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(client VirtualNetworkGatewaysClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
return
}
@@ -226,7 +268,7 @@ func (client VirtualNetworkGatewaysClient) Generatevpnclientpackage(ctx context.
result, err = client.GeneratevpnclientpackageSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "Generatevpnclientpackage", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "Generatevpnclientpackage", nil, "Failure sending request")
return
}
@@ -241,7 +283,7 @@ func (client VirtualNetworkGatewaysClient) GeneratevpnclientpackagePreparer(ctx
"virtualNetworkGatewayName": autorest.Encode("path", virtualNetworkGatewayName),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -264,7 +306,33 @@ func (client VirtualNetworkGatewaysClient) GeneratevpnclientpackageSender(req *h
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(client VirtualNetworkGatewaysClient) (s String, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ s.Response.Response, err = future.GetResult(sender)
+ if s.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture", "Result", nil, "received nil response and error")
+ }
+ if err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
+ s, err = client.GeneratevpnclientpackageResponder(s.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture", "Result", s.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+ }
return
}
@@ -305,7 +373,7 @@ func (client VirtualNetworkGatewaysClient) GenerateVpnProfile(ctx context.Contex
result, err = client.GenerateVpnProfileSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "GenerateVpnProfile", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "GenerateVpnProfile", nil, "Failure sending request")
return
}
@@ -320,7 +388,7 @@ func (client VirtualNetworkGatewaysClient) GenerateVpnProfilePreparer(ctx contex
"virtualNetworkGatewayName": autorest.Encode("path", virtualNetworkGatewayName),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -343,7 +411,33 @@ func (client VirtualNetworkGatewaysClient) GenerateVpnProfileSender(req *http.Re
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(client VirtualNetworkGatewaysClient) (s String, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGenerateVpnProfileFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGenerateVpnProfileFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ s.Response.Response, err = future.GetResult(sender)
+ if s.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGenerateVpnProfileFuture", "Result", nil, "received nil response and error")
+ }
+ if err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
+ s, err = client.GenerateVpnProfileResponder(s.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGenerateVpnProfileFuture", "Result", s.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+ }
return
}
@@ -390,6 +484,7 @@ func (client VirtualNetworkGatewaysClient) Get(ctx context.Context, resourceGrou
result, err = client.GetResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "Get", resp, "Failure responding to request")
+ return
}
return
@@ -403,7 +498,7 @@ func (client VirtualNetworkGatewaysClient) GetPreparer(ctx context.Context, reso
"virtualNetworkGatewayName": autorest.Encode("path", virtualNetworkGatewayName),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -459,7 +554,7 @@ func (client VirtualNetworkGatewaysClient) GetAdvertisedRoutes(ctx context.Conte
result, err = client.GetAdvertisedRoutesSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "GetAdvertisedRoutes", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "GetAdvertisedRoutes", nil, "Failure sending request")
return
}
@@ -474,7 +569,7 @@ func (client VirtualNetworkGatewaysClient) GetAdvertisedRoutesPreparer(ctx conte
"virtualNetworkGatewayName": autorest.Encode("path", virtualNetworkGatewayName),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
"peer": autorest.Encode("query", peer),
@@ -496,7 +591,33 @@ func (client VirtualNetworkGatewaysClient) GetAdvertisedRoutesSender(req *http.R
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(client VirtualNetworkGatewaysClient) (grlr GatewayRouteListResult, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ grlr.Response.Response, err = future.GetResult(sender)
+ if grlr.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture", "Result", nil, "received nil response and error")
+ }
+ if err == nil && grlr.Response.Response.StatusCode != http.StatusNoContent {
+ grlr, err = client.GetAdvertisedRoutesResponder(grlr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture", "Result", grlr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+ }
return
}
@@ -536,7 +657,7 @@ func (client VirtualNetworkGatewaysClient) GetBgpPeerStatus(ctx context.Context,
result, err = client.GetBgpPeerStatusSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "GetBgpPeerStatus", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "GetBgpPeerStatus", nil, "Failure sending request")
return
}
@@ -551,7 +672,7 @@ func (client VirtualNetworkGatewaysClient) GetBgpPeerStatusPreparer(ctx context.
"virtualNetworkGatewayName": autorest.Encode("path", virtualNetworkGatewayName),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -575,7 +696,33 @@ func (client VirtualNetworkGatewaysClient) GetBgpPeerStatusSender(req *http.Requ
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(client VirtualNetworkGatewaysClient) (bpslr BgpPeerStatusListResult, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetBgpPeerStatusFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetBgpPeerStatusFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ bpslr.Response.Response, err = future.GetResult(sender)
+ if bpslr.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetBgpPeerStatusFuture", "Result", nil, "received nil response and error")
+ }
+ if err == nil && bpslr.Response.Response.StatusCode != http.StatusNoContent {
+ bpslr, err = client.GetBgpPeerStatusResponder(bpslr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetBgpPeerStatusFuture", "Result", bpslr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+ }
return
}
@@ -615,7 +762,7 @@ func (client VirtualNetworkGatewaysClient) GetLearnedRoutes(ctx context.Context,
result, err = client.GetLearnedRoutesSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "GetLearnedRoutes", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "GetLearnedRoutes", nil, "Failure sending request")
return
}
@@ -630,7 +777,7 @@ func (client VirtualNetworkGatewaysClient) GetLearnedRoutesPreparer(ctx context.
"virtualNetworkGatewayName": autorest.Encode("path", virtualNetworkGatewayName),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -651,93 +798,42 @@ func (client VirtualNetworkGatewaysClient) GetLearnedRoutesSender(req *http.Requ
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
- return
-}
-
-// GetLearnedRoutesResponder handles the response to the GetLearnedRoutes request. The method always
-// closes the http.Response Body.
-func (client VirtualNetworkGatewaysClient) GetLearnedRoutesResponder(resp *http.Response) (result GatewayRouteListResult, err error) {
- err = autorest.Respond(
- resp,
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
- autorest.ByUnmarshallingJSON(&result),
- autorest.ByClosing())
- result.Response = autorest.Response{Response: resp}
- return
-}
-
-// GetVpnclientIpsecParameters the Get VpnclientIpsecParameters operation retrieves information about the vpnclient
-// ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource
-// provider.
-// Parameters:
-// resourceGroupName - the name of the resource group.
-// virtualNetworkGatewayName - the virtual network gateway name.
-func (client VirtualNetworkGatewaysClient) GetVpnclientIpsecParameters(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string) (result VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewaysClient.GetVpnclientIpsecParameters")
- defer func() {
- sc := -1
- if result.Response() != nil {
- sc = result.Response().StatusCode
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(client VirtualNetworkGatewaysClient) (grlr GatewayRouteListResult, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetLearnedRoutesFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetLearnedRoutesFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ grlr.Response.Response, err = future.GetResult(sender)
+ if grlr.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetLearnedRoutesFuture", "Result", nil, "received nil response and error")
+ }
+ if err == nil && grlr.Response.Response.StatusCode != http.StatusNoContent {
+ grlr, err = client.GetLearnedRoutesResponder(grlr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetLearnedRoutesFuture", "Result", grlr.Response.Response, "Failure responding to request")
}
- tracing.EndSpan(ctx, sc, err)
- }()
- }
- req, err := client.GetVpnclientIpsecParametersPreparer(ctx, resourceGroupName, virtualNetworkGatewayName)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "GetVpnclientIpsecParameters", nil, "Failure preparing request")
- return
- }
-
- result, err = client.GetVpnclientIpsecParametersSender(req)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "GetVpnclientIpsecParameters", result.Response(), "Failure sending request")
+ }
return
}
-
return
}
-// GetVpnclientIpsecParametersPreparer prepares the GetVpnclientIpsecParameters request.
-func (client VirtualNetworkGatewaysClient) GetVpnclientIpsecParametersPreparer(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "resourceGroupName": autorest.Encode("path", resourceGroupName),
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- "virtualNetworkGatewayName": autorest.Encode("path", virtualNetworkGatewayName),
- }
-
- const APIVersion = "2018-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.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getvpnclientipsecparameters", pathParameters),
- autorest.WithQueryParameters(queryParameters))
- return preparer.Prepare((&http.Request{}).WithContext(ctx))
-}
-
-// GetVpnclientIpsecParametersSender sends the GetVpnclientIpsecParameters request. The method will close the
-// http.Response Body if it receives an error.
-func (client VirtualNetworkGatewaysClient) GetVpnclientIpsecParametersSender(req *http.Request) (future VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture, err error) {
- var resp *http.Response
- resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
- if err != nil {
- return
- }
- future.Future, err = azure.NewFutureFromResponse(resp)
- return
-}
-
-// GetVpnclientIpsecParametersResponder handles the response to the GetVpnclientIpsecParameters request. The method always
+// GetLearnedRoutesResponder handles the response to the GetLearnedRoutes request. The method always
// closes the http.Response Body.
-func (client VirtualNetworkGatewaysClient) GetVpnclientIpsecParametersResponder(resp *http.Response) (result VpnClientIPsecParameters, err error) {
+func (client VirtualNetworkGatewaysClient) GetLearnedRoutesResponder(resp *http.Response) (result GatewayRouteListResult, err error) {
err = autorest.Respond(
resp,
- azure.WithErrorUnlessStatusCode(http.StatusOK),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
@@ -768,7 +864,7 @@ func (client VirtualNetworkGatewaysClient) GetVpnProfilePackageURL(ctx context.C
result, err = client.GetVpnProfilePackageURLSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "GetVpnProfilePackageURL", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "GetVpnProfilePackageURL", nil, "Failure sending request")
return
}
@@ -783,7 +879,7 @@ func (client VirtualNetworkGatewaysClient) GetVpnProfilePackageURLPreparer(ctx c
"virtualNetworkGatewayName": autorest.Encode("path", virtualNetworkGatewayName),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -804,7 +900,33 @@ func (client VirtualNetworkGatewaysClient) GetVpnProfilePackageURLSender(req *ht
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(client VirtualNetworkGatewaysClient) (s String, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ s.Response.Response, err = future.GetResult(sender)
+ if s.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture", "Result", nil, "received nil response and error")
+ }
+ if err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
+ s, err = client.GetVpnProfilePackageURLResponder(s.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture", "Result", s.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+ }
return
}
@@ -851,9 +973,11 @@ func (client VirtualNetworkGatewaysClient) List(ctx context.Context, resourceGro
result.vnglr, err = client.ListResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "List", resp, "Failure responding to request")
+ return
}
if result.vnglr.hasNextLink() && result.vnglr.IsEmpty() {
err = result.NextWithContext(ctx)
+ return
}
return
@@ -866,7 +990,7 @@ func (client VirtualNetworkGatewaysClient) ListPreparer(ctx context.Context, res
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -966,9 +1090,11 @@ func (client VirtualNetworkGatewaysClient) ListConnections(ctx context.Context,
result.vnglcr, err = client.ListConnectionsResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "ListConnections", resp, "Failure responding to request")
+ return
}
if result.vnglcr.hasNextLink() && result.vnglcr.IsEmpty() {
err = result.NextWithContext(ctx)
+ return
}
return
@@ -982,7 +1108,7 @@ func (client VirtualNetworkGatewaysClient) ListConnectionsPreparer(ctx context.C
"virtualNetworkGatewayName": autorest.Encode("path", virtualNetworkGatewayName),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -1075,7 +1201,7 @@ func (client VirtualNetworkGatewaysClient) Reset(ctx context.Context, resourceGr
result, err = client.ResetSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "Reset", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "Reset", nil, "Failure sending request")
return
}
@@ -1090,7 +1216,7 @@ func (client VirtualNetworkGatewaysClient) ResetPreparer(ctx context.Context, re
"virtualNetworkGatewayName": autorest.Encode("path", virtualNetworkGatewayName),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -1114,175 +1240,39 @@ func (client VirtualNetworkGatewaysClient) ResetSender(req *http.Request) (futur
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
- return
-}
-
-// ResetResponder handles the response to the Reset request. The method always
-// closes the http.Response Body.
-func (client VirtualNetworkGatewaysClient) ResetResponder(resp *http.Response) (result VirtualNetworkGateway, err error) {
- err = autorest.Respond(
- resp,
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
- autorest.ByUnmarshallingJSON(&result),
- autorest.ByClosing())
- result.Response = autorest.Response{Response: resp}
- return
-}
-
-// ResetVpnClientSharedKey resets the VPN client shared key of the virtual network gateway in the specified resource
-// group.
-// Parameters:
-// resourceGroupName - the name of the resource group.
-// virtualNetworkGatewayName - the name of the virtual network gateway.
-func (client VirtualNetworkGatewaysClient) ResetVpnClientSharedKey(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string) (result VirtualNetworkGatewaysResetVpnClientSharedKeyFuture, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewaysClient.ResetVpnClientSharedKey")
- defer func() {
- sc := -1
- if result.Response() != nil {
- sc = result.Response().StatusCode
- }
- tracing.EndSpan(ctx, sc, err)
- }()
- }
- req, err := client.ResetVpnClientSharedKeyPreparer(ctx, resourceGroupName, virtualNetworkGatewayName)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "ResetVpnClientSharedKey", nil, "Failure preparing request")
- return
- }
-
- result, err = client.ResetVpnClientSharedKeySender(req)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "ResetVpnClientSharedKey", result.Response(), "Failure sending request")
- return
- }
-
- return
-}
-
-// ResetVpnClientSharedKeyPreparer prepares the ResetVpnClientSharedKey request.
-func (client VirtualNetworkGatewaysClient) ResetVpnClientSharedKeyPreparer(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "resourceGroupName": autorest.Encode("path", resourceGroupName),
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- "virtualNetworkGatewayName": autorest.Encode("path", virtualNetworkGatewayName),
- }
-
- const APIVersion = "2018-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.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/resetvpnclientsharedkey", pathParameters),
- autorest.WithQueryParameters(queryParameters))
- return preparer.Prepare((&http.Request{}).WithContext(ctx))
-}
-
-// ResetVpnClientSharedKeySender sends the ResetVpnClientSharedKey request. The method will close the
-// http.Response Body if it receives an error.
-func (client VirtualNetworkGatewaysClient) ResetVpnClientSharedKeySender(req *http.Request) (future VirtualNetworkGatewaysResetVpnClientSharedKeyFuture, err error) {
- var resp *http.Response
- resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
- if err != nil {
- return
- }
- future.Future, err = azure.NewFutureFromResponse(resp)
- return
-}
-
-// ResetVpnClientSharedKeyResponder handles the response to the ResetVpnClientSharedKey request. The method always
-// closes the http.Response Body.
-func (client VirtualNetworkGatewaysClient) ResetVpnClientSharedKeyResponder(resp *http.Response) (result autorest.Response, err error) {
- err = autorest.Respond(
- resp,
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
- autorest.ByClosing())
- result.Response = resp
- return
-}
-
-// SetVpnclientIpsecParameters the Set VpnclientIpsecParameters operation sets the vpnclient ipsec policy for P2S
-// client of virtual network gateway in the specified resource group through Network resource provider.
-// Parameters:
-// resourceGroupName - the name of the resource group.
-// virtualNetworkGatewayName - the name of the virtual network gateway.
-// vpnclientIpsecParams - parameters supplied to the Begin Set vpnclient ipsec parameters of Virtual Network
-// Gateway P2S client operation through Network resource provider.
-func (client VirtualNetworkGatewaysClient) SetVpnclientIpsecParameters(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, vpnclientIpsecParams VpnClientIPsecParameters) (result VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewaysClient.SetVpnclientIpsecParameters")
- defer func() {
- sc := -1
- if result.Response() != nil {
- sc = result.Response().StatusCode
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysResetFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ vng.Response.Response, err = future.GetResult(sender)
+ if vng.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetFuture", "Result", nil, "received nil response and error")
+ }
+ if err == nil && vng.Response.Response.StatusCode != http.StatusNoContent {
+ vng, err = client.ResetResponder(vng.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetFuture", "Result", vng.Response.Response, "Failure responding to request")
}
- tracing.EndSpan(ctx, sc, err)
- }()
- }
- if err := validation.Validate([]validation.Validation{
- {TargetValue: vpnclientIpsecParams,
- Constraints: []validation.Constraint{{Target: "vpnclientIpsecParams.SaLifeTimeSeconds", Name: validation.Null, Rule: true, Chain: nil},
- {Target: "vpnclientIpsecParams.SaDataSizeKilobytes", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
- return result, validation.NewError("network.VirtualNetworkGatewaysClient", "SetVpnclientIpsecParameters", err.Error())
- }
-
- req, err := client.SetVpnclientIpsecParametersPreparer(ctx, resourceGroupName, virtualNetworkGatewayName, vpnclientIpsecParams)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "SetVpnclientIpsecParameters", nil, "Failure preparing request")
+ }
return
}
-
- result, err = client.SetVpnclientIpsecParametersSender(req)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "SetVpnclientIpsecParameters", result.Response(), "Failure sending request")
- return
- }
-
return
}
-// SetVpnclientIpsecParametersPreparer prepares the SetVpnclientIpsecParameters request.
-func (client VirtualNetworkGatewaysClient) SetVpnclientIpsecParametersPreparer(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, vpnclientIpsecParams VpnClientIPsecParameters) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "resourceGroupName": autorest.Encode("path", resourceGroupName),
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- "virtualNetworkGatewayName": autorest.Encode("path", virtualNetworkGatewayName),
- }
-
- const APIVersion = "2018-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.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/setvpnclientipsecparameters", pathParameters),
- autorest.WithJSON(vpnclientIpsecParams),
- autorest.WithQueryParameters(queryParameters))
- return preparer.Prepare((&http.Request{}).WithContext(ctx))
-}
-
-// SetVpnclientIpsecParametersSender sends the SetVpnclientIpsecParameters request. The method will close the
-// http.Response Body if it receives an error.
-func (client VirtualNetworkGatewaysClient) SetVpnclientIpsecParametersSender(req *http.Request) (future VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture, err error) {
- var resp *http.Response
- resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
- if err != nil {
- return
- }
- future.Future, err = azure.NewFutureFromResponse(resp)
- return
-}
-
-// SetVpnclientIpsecParametersResponder handles the response to the SetVpnclientIpsecParameters request. The method always
+// ResetResponder handles the response to the Reset request. The method always
// closes the http.Response Body.
-func (client VirtualNetworkGatewaysClient) SetVpnclientIpsecParametersResponder(resp *http.Response) (result VpnClientIPsecParameters, err error) {
+func (client VirtualNetworkGatewaysClient) ResetResponder(resp *http.Response) (result VirtualNetworkGateway, err error) {
err = autorest.Respond(
resp,
azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
@@ -1323,6 +1313,7 @@ func (client VirtualNetworkGatewaysClient) SupportedVpnDevices(ctx context.Conte
result, err = client.SupportedVpnDevicesResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "SupportedVpnDevices", resp, "Failure responding to request")
+ return
}
return
@@ -1336,7 +1327,7 @@ func (client VirtualNetworkGatewaysClient) SupportedVpnDevicesPreparer(ctx conte
"virtualNetworkGatewayName": autorest.Encode("path", virtualNetworkGatewayName),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -1391,7 +1382,7 @@ func (client VirtualNetworkGatewaysClient) UpdateTags(ctx context.Context, resou
result, err = client.UpdateTagsSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "UpdateTags", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "UpdateTags", nil, "Failure sending request")
return
}
@@ -1406,7 +1397,7 @@ func (client VirtualNetworkGatewaysClient) UpdateTagsPreparer(ctx context.Contex
"virtualNetworkGatewayName": autorest.Encode("path", virtualNetworkGatewayName),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -1429,7 +1420,33 @@ func (client VirtualNetworkGatewaysClient) UpdateTagsSender(req *http.Request) (
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysUpdateTagsFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysUpdateTagsFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ vng.Response.Response, err = future.GetResult(sender)
+ if vng.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysUpdateTagsFuture", "Result", nil, "received nil response and error")
+ }
+ if err == nil && vng.Response.Response.StatusCode != http.StatusNoContent {
+ vng, err = client.UpdateTagsResponder(vng.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysUpdateTagsFuture", "Result", vng.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+ }
return
}
@@ -1478,6 +1495,7 @@ func (client VirtualNetworkGatewaysClient) VpnDeviceConfigurationScript(ctx cont
result, err = client.VpnDeviceConfigurationScriptResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "VpnDeviceConfigurationScript", resp, "Failure responding to request")
+ return
}
return
@@ -1491,7 +1509,7 @@ func (client VirtualNetworkGatewaysClient) VpnDeviceConfigurationScriptPreparer(
"virtualNetworkGatewayConnectionName": autorest.Encode("path", virtualNetworkGatewayConnectionName),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/virtualnetworkpeerings.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/virtualnetworkpeerings.go
similarity index 88%
rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/virtualnetworkpeerings.go
rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/virtualnetworkpeerings.go
index 4815f816850..e180a3bcc8c 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/virtualnetworkpeerings.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/virtualnetworkpeerings.go
@@ -68,7 +68,7 @@ func (client VirtualNetworkPeeringsClient) CreateOrUpdate(ctx context.Context, r
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsClient", "CreateOrUpdate", nil, "Failure sending request")
return
}
@@ -84,7 +84,7 @@ func (client VirtualNetworkPeeringsClient) CreateOrUpdatePreparer(ctx context.Co
"virtualNetworkPeeringName": autorest.Encode("path", virtualNetworkPeeringName),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -107,7 +107,33 @@ func (client VirtualNetworkPeeringsClient) CreateOrUpdateSender(req *http.Reques
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(client VirtualNetworkPeeringsClient) (vnp VirtualNetworkPeering, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkPeeringsCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ vnp.Response.Response, err = future.GetResult(sender)
+ if vnp.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsCreateOrUpdateFuture", "Result", nil, "received nil response and error")
+ }
+ if err == nil && vnp.Response.Response.StatusCode != http.StatusNoContent {
+ vnp, err = client.CreateOrUpdateResponder(vnp.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsCreateOrUpdateFuture", "Result", vnp.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+ }
return
}
@@ -147,7 +173,7 @@ func (client VirtualNetworkPeeringsClient) Delete(ctx context.Context, resourceG
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsClient", "Delete", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsClient", "Delete", nil, "Failure sending request")
return
}
@@ -163,7 +189,7 @@ func (client VirtualNetworkPeeringsClient) DeletePreparer(ctx context.Context, r
"virtualNetworkPeeringName": autorest.Encode("path", virtualNetworkPeeringName),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -184,7 +210,23 @@ func (client VirtualNetworkPeeringsClient) DeleteSender(req *http.Request) (futu
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(client VirtualNetworkPeeringsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkPeeringsDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
return
}
@@ -231,6 +273,7 @@ func (client VirtualNetworkPeeringsClient) Get(ctx context.Context, resourceGrou
result, err = client.GetResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsClient", "Get", resp, "Failure responding to request")
+ return
}
return
@@ -245,7 +288,7 @@ func (client VirtualNetworkPeeringsClient) GetPreparer(ctx context.Context, reso
"virtualNetworkPeeringName": autorest.Encode("path", virtualNetworkPeeringName),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -308,9 +351,11 @@ func (client VirtualNetworkPeeringsClient) List(ctx context.Context, resourceGro
result.vnplr, err = client.ListResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsClient", "List", resp, "Failure responding to request")
+ return
}
if result.vnplr.hasNextLink() && result.vnplr.IsEmpty() {
err = result.NextWithContext(ctx)
+ return
}
return
@@ -324,7 +369,7 @@ func (client VirtualNetworkPeeringsClient) ListPreparer(ctx context.Context, res
"virtualNetworkName": autorest.Encode("path", virtualNetworkName),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/virtualnetworks.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/virtualnetworks.go
similarity index 89%
rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/virtualnetworks.go
rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/virtualnetworks.go
index 5761da91950..a8c0b7b2bd7 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/virtualnetworks.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/virtualnetworks.go
@@ -73,6 +73,7 @@ func (client VirtualNetworksClient) CheckIPAddressAvailability(ctx context.Conte
result, err = client.CheckIPAddressAvailabilityResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "CheckIPAddressAvailability", resp, "Failure responding to request")
+ return
}
return
@@ -86,10 +87,12 @@ func (client VirtualNetworksClient) CheckIPAddressAvailabilityPreparer(ctx conte
"virtualNetworkName": autorest.Encode("path", virtualNetworkName),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
- "ipAddress": autorest.Encode("query", IPAddress),
+ }
+ if len(IPAddress) > 0 {
+ queryParameters["ipAddress"] = autorest.Encode("query", IPAddress)
}
preparer := autorest.CreatePreparer(
@@ -142,7 +145,7 @@ func (client VirtualNetworksClient) CreateOrUpdate(ctx context.Context, resource
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "CreateOrUpdate", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "CreateOrUpdate", nil, "Failure sending request")
return
}
@@ -157,7 +160,7 @@ func (client VirtualNetworksClient) CreateOrUpdatePreparer(ctx context.Context,
"virtualNetworkName": autorest.Encode("path", virtualNetworkName),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -180,7 +183,33 @@ func (client VirtualNetworksClient) CreateOrUpdateSender(req *http.Request) (fut
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(client VirtualNetworksClient) (vn VirtualNetwork, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworksCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworksCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ vn.Response.Response, err = future.GetResult(sender)
+ if vn.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworksCreateOrUpdateFuture", "Result", nil, "received nil response and error")
+ }
+ if err == nil && vn.Response.Response.StatusCode != http.StatusNoContent {
+ vn, err = client.CreateOrUpdateResponder(vn.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworksCreateOrUpdateFuture", "Result", vn.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+ }
return
}
@@ -219,7 +248,7 @@ func (client VirtualNetworksClient) Delete(ctx context.Context, resourceGroupNam
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "Delete", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "Delete", nil, "Failure sending request")
return
}
@@ -234,7 +263,7 @@ func (client VirtualNetworksClient) DeletePreparer(ctx context.Context, resource
"virtualNetworkName": autorest.Encode("path", virtualNetworkName),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -255,7 +284,23 @@ func (client VirtualNetworksClient) DeleteSender(req *http.Request) (future Virt
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(client VirtualNetworksClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworksDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworksDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
return
}
@@ -302,6 +347,7 @@ func (client VirtualNetworksClient) Get(ctx context.Context, resourceGroupName s
result, err = client.GetResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "Get", resp, "Failure responding to request")
+ return
}
return
@@ -315,7 +361,7 @@ func (client VirtualNetworksClient) GetPreparer(ctx context.Context, resourceGro
"virtualNetworkName": autorest.Encode("path", virtualNetworkName),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -380,9 +426,11 @@ func (client VirtualNetworksClient) List(ctx context.Context, resourceGroupName
result.vnlr, err = client.ListResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "List", resp, "Failure responding to request")
+ return
}
if result.vnlr.hasNextLink() && result.vnlr.IsEmpty() {
err = result.NextWithContext(ctx)
+ return
}
return
@@ -395,7 +443,7 @@ func (client VirtualNetworksClient) ListPreparer(ctx context.Context, resourceGr
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -492,9 +540,11 @@ func (client VirtualNetworksClient) ListAll(ctx context.Context) (result Virtual
result.vnlr, err = client.ListAllResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "ListAll", resp, "Failure responding to request")
+ return
}
if result.vnlr.hasNextLink() && result.vnlr.IsEmpty() {
err = result.NextWithContext(ctx)
+ return
}
return
@@ -506,7 +556,7 @@ func (client VirtualNetworksClient) ListAllPreparer(ctx context.Context) (*http.
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -606,9 +656,11 @@ func (client VirtualNetworksClient) ListUsage(ctx context.Context, resourceGroup
result.vnlur, err = client.ListUsageResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "ListUsage", resp, "Failure responding to request")
+ return
}
if result.vnlur.hasNextLink() && result.vnlur.IsEmpty() {
err = result.NextWithContext(ctx)
+ return
}
return
@@ -622,7 +674,7 @@ func (client VirtualNetworksClient) ListUsagePreparer(ctx context.Context, resou
"virtualNetworkName": autorest.Encode("path", virtualNetworkName),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -714,7 +766,7 @@ func (client VirtualNetworksClient) UpdateTags(ctx context.Context, resourceGrou
result, err = client.UpdateTagsSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "UpdateTags", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "UpdateTags", nil, "Failure sending request")
return
}
@@ -729,7 +781,7 @@ func (client VirtualNetworksClient) UpdateTagsPreparer(ctx context.Context, reso
"virtualNetworkName": autorest.Encode("path", virtualNetworkName),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -752,7 +804,33 @@ func (client VirtualNetworksClient) UpdateTagsSender(req *http.Request) (future
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(client VirtualNetworksClient) (vn VirtualNetwork, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworksUpdateTagsFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.VirtualNetworksUpdateTagsFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ vn.Response.Response, err = future.GetResult(sender)
+ if vn.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworksUpdateTagsFuture", "Result", nil, "received nil response and error")
+ }
+ if err == nil && vn.Response.Response.StatusCode != http.StatusNoContent {
+ vn, err = client.UpdateTagsResponder(vn.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworksUpdateTagsFuture", "Result", vn.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+ }
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/watchers.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/watchers.go
similarity index 79%
rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/watchers.go
rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/watchers.go
index 858314ed850..770f5054efd 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/watchers.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-10-01/network/watchers.go
@@ -75,7 +75,7 @@ func (client WatchersClient) CheckConnectivity(ctx context.Context, resourceGrou
result, err = client.CheckConnectivitySender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersClient", "CheckConnectivity", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.WatchersClient", "CheckConnectivity", nil, "Failure sending request")
return
}
@@ -90,7 +90,7 @@ func (client WatchersClient) CheckConnectivityPreparer(ctx context.Context, reso
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -113,7 +113,33 @@ func (client WatchersClient) CheckConnectivitySender(req *http.Request) (future
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(client WatchersClient) (ci ConnectivityInformation, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.WatchersCheckConnectivityFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.WatchersCheckConnectivityFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ ci.Response.Response, err = future.GetResult(sender)
+ if ci.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "network.WatchersCheckConnectivityFuture", "Result", nil, "received nil response and error")
+ }
+ if err == nil && ci.Response.Response.StatusCode != http.StatusNoContent {
+ ci, err = client.CheckConnectivityResponder(ci.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.WatchersCheckConnectivityFuture", "Result", ci.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+ }
return
}
@@ -161,6 +187,7 @@ func (client WatchersClient) CreateOrUpdate(ctx context.Context, resourceGroupNa
result, err = client.CreateOrUpdateResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "network.WatchersClient", "CreateOrUpdate", resp, "Failure responding to request")
+ return
}
return
@@ -174,7 +201,7 @@ func (client WatchersClient) CreateOrUpdatePreparer(ctx context.Context, resourc
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -230,7 +257,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", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.WatchersClient", "Delete", nil, "Failure sending request")
return
}
@@ -245,7 +272,7 @@ func (client WatchersClient) DeletePreparer(ctx context.Context, resourceGroupNa
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -266,7 +293,23 @@ func (client WatchersClient) DeleteSender(req *http.Request) (future WatchersDel
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(client WatchersClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.WatchersDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.WatchersDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
return
}
@@ -312,6 +355,7 @@ func (client WatchersClient) Get(ctx context.Context, resourceGroupName string,
result, err = client.GetResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "network.WatchersClient", "Get", resp, "Failure responding to request")
+ return
}
return
@@ -325,7 +369,7 @@ func (client WatchersClient) GetPreparer(ctx context.Context, resourceGroupName
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -390,7 +434,7 @@ func (client WatchersClient) GetAzureReachabilityReport(ctx context.Context, res
result, err = client.GetAzureReachabilityReportSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersClient", "GetAzureReachabilityReport", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.WatchersClient", "GetAzureReachabilityReport", nil, "Failure sending request")
return
}
@@ -405,7 +449,7 @@ func (client WatchersClient) GetAzureReachabilityReportPreparer(ctx context.Cont
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -428,7 +472,33 @@ func (client WatchersClient) GetAzureReachabilityReportSender(req *http.Request)
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(client WatchersClient) (arr AzureReachabilityReport, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.WatchersGetAzureReachabilityReportFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.WatchersGetAzureReachabilityReportFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ arr.Response.Response, err = future.GetResult(sender)
+ if arr.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "network.WatchersGetAzureReachabilityReportFuture", "Result", nil, "received nil response and error")
+ }
+ if err == nil && arr.Response.Response.StatusCode != http.StatusNoContent {
+ arr, err = client.GetAzureReachabilityReportResponder(arr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.WatchersGetAzureReachabilityReportFuture", "Result", arr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+ }
return
}
@@ -444,11 +514,11 @@ func (client WatchersClient) GetAzureReachabilityReportResponder(resp *http.Resp
return
}
-// GetFlowLogStatus queries status of flow log and traffic analytics (optional) on a specified resource.
+// GetFlowLogStatus queries status of flow log on a specified resource.
// Parameters:
// resourceGroupName - the name of the network watcher resource group.
// networkWatcherName - the name of the network watcher resource.
-// parameters - parameters that define a resource to query flow log and traffic analytics (optional) status.
+// parameters - parameters that define a resource to query flow log status.
func (client WatchersClient) GetFlowLogStatus(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters FlowLogStatusParameters) (result WatchersGetFlowLogStatusFuture, err error) {
if tracing.IsEnabled() {
ctx = tracing.StartSpan(ctx, fqdn+"/WatchersClient.GetFlowLogStatus")
@@ -474,7 +544,7 @@ func (client WatchersClient) GetFlowLogStatus(ctx context.Context, resourceGroup
result, err = client.GetFlowLogStatusSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersClient", "GetFlowLogStatus", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.WatchersClient", "GetFlowLogStatus", nil, "Failure sending request")
return
}
@@ -489,7 +559,7 @@ func (client WatchersClient) GetFlowLogStatusPreparer(ctx context.Context, resou
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -512,98 +582,39 @@ func (client WatchersClient) GetFlowLogStatusSender(req *http.Request) (future W
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
- return
-}
-
-// GetFlowLogStatusResponder handles the response to the GetFlowLogStatus request. The method always
-// closes the http.Response Body.
-func (client WatchersClient) GetFlowLogStatusResponder(resp *http.Response) (result FlowLogInformation, err error) {
- err = autorest.Respond(
- resp,
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
- autorest.ByUnmarshallingJSON(&result),
- autorest.ByClosing())
- result.Response = autorest.Response{Response: resp}
- return
-}
-
-// GetNetworkConfigurationDiagnostic get network configuration diagnostic.
-// Parameters:
-// resourceGroupName - the name of the resource group.
-// networkWatcherName - the name of the network watcher.
-// parameters - parameters to get network configuration diagnostic.
-func (client WatchersClient) GetNetworkConfigurationDiagnostic(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters ConfigurationDiagnosticParameters) (result WatchersGetNetworkConfigurationDiagnosticFuture, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/WatchersClient.GetNetworkConfigurationDiagnostic")
- defer func() {
- sc := -1
- if result.Response() != nil {
- sc = result.Response().StatusCode
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(client WatchersClient) (fli FlowLogInformation, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.WatchersGetFlowLogStatusFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.WatchersGetFlowLogStatusFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ fli.Response.Response, err = future.GetResult(sender)
+ if fli.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "network.WatchersGetFlowLogStatusFuture", "Result", nil, "received nil response and error")
+ }
+ if err == nil && fli.Response.Response.StatusCode != http.StatusNoContent {
+ fli, err = client.GetFlowLogStatusResponder(fli.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.WatchersGetFlowLogStatusFuture", "Result", fli.Response.Response, "Failure responding to request")
}
- tracing.EndSpan(ctx, sc, err)
- }()
- }
- if err := validation.Validate([]validation.Validation{
- {TargetValue: parameters,
- Constraints: []validation.Constraint{{Target: "parameters.TargetResourceID", Name: validation.Null, Rule: true, Chain: nil},
- {Target: "parameters.Profiles", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
- return result, validation.NewError("network.WatchersClient", "GetNetworkConfigurationDiagnostic", err.Error())
- }
-
- req, err := client.GetNetworkConfigurationDiagnosticPreparer(ctx, resourceGroupName, networkWatcherName, parameters)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersClient", "GetNetworkConfigurationDiagnostic", nil, "Failure preparing request")
- return
- }
-
- result, err = client.GetNetworkConfigurationDiagnosticSender(req)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersClient", "GetNetworkConfigurationDiagnostic", result.Response(), "Failure sending request")
- return
- }
-
- return
-}
-
-// GetNetworkConfigurationDiagnosticPreparer prepares the GetNetworkConfigurationDiagnostic request.
-func (client WatchersClient) GetNetworkConfigurationDiagnosticPreparer(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters ConfigurationDiagnosticParameters) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "networkWatcherName": autorest.Encode("path", networkWatcherName),
- "resourceGroupName": autorest.Encode("path", resourceGroupName),
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- }
-
- const APIVersion = "2018-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.Network/networkWatchers/{networkWatcherName}/networkConfigurationDiagnostic", pathParameters),
- autorest.WithJSON(parameters),
- autorest.WithQueryParameters(queryParameters))
- return preparer.Prepare((&http.Request{}).WithContext(ctx))
-}
-
-// GetNetworkConfigurationDiagnosticSender sends the GetNetworkConfigurationDiagnostic request. The method will close the
-// http.Response Body if it receives an error.
-func (client WatchersClient) GetNetworkConfigurationDiagnosticSender(req *http.Request) (future WatchersGetNetworkConfigurationDiagnosticFuture, err error) {
- var resp *http.Response
- resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
- if err != nil {
+ }
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
return
}
-// GetNetworkConfigurationDiagnosticResponder handles the response to the GetNetworkConfigurationDiagnostic request. The method always
+// GetFlowLogStatusResponder handles the response to the GetFlowLogStatus request. The method always
// closes the http.Response Body.
-func (client WatchersClient) GetNetworkConfigurationDiagnosticResponder(resp *http.Response) (result ConfigurationDiagnosticResponse, err error) {
+func (client WatchersClient) GetFlowLogStatusResponder(resp *http.Response) (result FlowLogInformation, err error) {
err = autorest.Respond(
resp,
azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
@@ -645,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", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.WatchersClient", "GetNextHop", nil, "Failure sending request")
return
}
@@ -660,7 +671,7 @@ func (client WatchersClient) GetNextHopPreparer(ctx context.Context, resourceGro
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -683,7 +694,33 @@ func (client WatchersClient) GetNextHopSender(req *http.Request) (future Watcher
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(client WatchersClient) (nhr NextHopResult, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.WatchersGetNextHopFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.WatchersGetNextHopFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ nhr.Response.Response, err = future.GetResult(sender)
+ if nhr.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "network.WatchersGetNextHopFuture", "Result", nil, "received nil response and error")
+ }
+ if err == nil && nhr.Response.Response.StatusCode != http.StatusNoContent {
+ nhr, err = client.GetNextHopResponder(nhr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.WatchersGetNextHopFuture", "Result", nhr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+ }
return
}
@@ -731,6 +768,7 @@ func (client WatchersClient) GetTopology(ctx context.Context, resourceGroupName
result, err = client.GetTopologyResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "network.WatchersClient", "GetTopology", resp, "Failure responding to request")
+ return
}
return
@@ -744,7 +782,7 @@ func (client WatchersClient) GetTopologyPreparer(ctx context.Context, resourceGr
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -811,7 +849,7 @@ func (client WatchersClient) GetTroubleshooting(ctx context.Context, resourceGro
result, err = client.GetTroubleshootingSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersClient", "GetTroubleshooting", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.WatchersClient", "GetTroubleshooting", nil, "Failure sending request")
return
}
@@ -826,7 +864,7 @@ func (client WatchersClient) GetTroubleshootingPreparer(ctx context.Context, res
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -849,7 +887,33 @@ func (client WatchersClient) GetTroubleshootingSender(req *http.Request) (future
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(client WatchersClient) (tr TroubleshootingResult, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.WatchersGetTroubleshootingFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ tr.Response.Response, err = future.GetResult(sender)
+ if tr.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingFuture", "Result", nil, "received nil response and error")
+ }
+ if err == nil && tr.Response.Response.StatusCode != http.StatusNoContent {
+ tr, err = client.GetTroubleshootingResponder(tr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingFuture", "Result", tr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+ }
return
}
@@ -895,7 +959,7 @@ func (client WatchersClient) GetTroubleshootingResult(ctx context.Context, resou
result, err = client.GetTroubleshootingResultSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersClient", "GetTroubleshootingResult", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.WatchersClient", "GetTroubleshootingResult", nil, "Failure sending request")
return
}
@@ -910,7 +974,7 @@ func (client WatchersClient) GetTroubleshootingResultPreparer(ctx context.Contex
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -933,7 +997,33 @@ func (client WatchersClient) GetTroubleshootingResultSender(req *http.Request) (
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(client WatchersClient) (tr TroubleshootingResult, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingResultFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.WatchersGetTroubleshootingResultFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ tr.Response.Response, err = future.GetResult(sender)
+ if tr.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingResultFuture", "Result", nil, "received nil response and error")
+ }
+ if err == nil && tr.Response.Response.StatusCode != http.StatusNoContent {
+ tr, err = client.GetTroubleshootingResultResponder(tr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingResultFuture", "Result", tr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+ }
return
}
@@ -979,7 +1069,7 @@ func (client WatchersClient) GetVMSecurityRules(ctx context.Context, resourceGro
result, err = client.GetVMSecurityRulesSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersClient", "GetVMSecurityRules", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.WatchersClient", "GetVMSecurityRules", nil, "Failure sending request")
return
}
@@ -994,7 +1084,7 @@ func (client WatchersClient) GetVMSecurityRulesPreparer(ctx context.Context, res
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -1017,7 +1107,33 @@ func (client WatchersClient) GetVMSecurityRulesSender(req *http.Request) (future
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(client WatchersClient) (sgvr SecurityGroupViewResult, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.WatchersGetVMSecurityRulesFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.WatchersGetVMSecurityRulesFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ sgvr.Response.Response, err = future.GetResult(sender)
+ if sgvr.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "network.WatchersGetVMSecurityRulesFuture", "Result", nil, "received nil response and error")
+ }
+ if err == nil && sgvr.Response.Response.StatusCode != http.StatusNoContent {
+ sgvr, err = client.GetVMSecurityRulesResponder(sgvr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.WatchersGetVMSecurityRulesFuture", "Result", sgvr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+ }
return
}
@@ -1063,6 +1179,7 @@ func (client WatchersClient) List(ctx context.Context, resourceGroupName string)
result, err = client.ListResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "network.WatchersClient", "List", resp, "Failure responding to request")
+ return
}
return
@@ -1075,7 +1192,7 @@ func (client WatchersClient) ListPreparer(ctx context.Context, resourceGroupName
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -1134,6 +1251,7 @@ func (client WatchersClient) ListAll(ctx context.Context) (result WatcherListRes
result, err = client.ListAllResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "network.WatchersClient", "ListAll", resp, "Failure responding to request")
+ return
}
return
@@ -1145,7 +1263,7 @@ func (client WatchersClient) ListAllPreparer(ctx context.Context) (*http.Request
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -1200,7 +1318,7 @@ func (client WatchersClient) ListAvailableProviders(ctx context.Context, resourc
result, err = client.ListAvailableProvidersSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersClient", "ListAvailableProviders", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.WatchersClient", "ListAvailableProviders", nil, "Failure sending request")
return
}
@@ -1215,7 +1333,7 @@ func (client WatchersClient) ListAvailableProvidersPreparer(ctx context.Context,
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -1238,7 +1356,33 @@ func (client WatchersClient) ListAvailableProvidersSender(req *http.Request) (fu
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(client WatchersClient) (apl AvailableProvidersList, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.WatchersListAvailableProvidersFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.WatchersListAvailableProvidersFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ apl.Response.Response, err = future.GetResult(sender)
+ if apl.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "network.WatchersListAvailableProvidersFuture", "Result", nil, "received nil response and error")
+ }
+ if err == nil && apl.Response.Response.StatusCode != http.StatusNoContent {
+ apl, err = client.ListAvailableProvidersResponder(apl.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.WatchersListAvailableProvidersFuture", "Result", apl.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+ }
return
}
@@ -1254,7 +1398,7 @@ func (client WatchersClient) ListAvailableProvidersResponder(resp *http.Response
return
}
-// SetFlowLogConfiguration configures flow log and traffic analytics (optional) on a specified resource.
+// SetFlowLogConfiguration configures flow log on a specified resource.
// Parameters:
// resourceGroupName - the name of the network watcher resource group.
// networkWatcherName - the name of the network watcher resource.
@@ -1276,14 +1420,6 @@ func (client WatchersClient) SetFlowLogConfiguration(ctx context.Context, resour
{Target: "parameters.FlowLogProperties", Name: validation.Null, Rule: true,
Chain: []validation.Constraint{{Target: "parameters.FlowLogProperties.StorageID", Name: validation.Null, Rule: true, Chain: nil},
{Target: "parameters.FlowLogProperties.Enabled", Name: validation.Null, Rule: true, Chain: nil},
- }},
- {Target: "parameters.FlowAnalyticsConfiguration", Name: validation.Null, Rule: false,
- Chain: []validation.Constraint{{Target: "parameters.FlowAnalyticsConfiguration.NetworkWatcherFlowAnalyticsConfiguration", Name: validation.Null, Rule: true,
- Chain: []validation.Constraint{{Target: "parameters.FlowAnalyticsConfiguration.NetworkWatcherFlowAnalyticsConfiguration.Enabled", Name: validation.Null, Rule: true, Chain: nil},
- {Target: "parameters.FlowAnalyticsConfiguration.NetworkWatcherFlowAnalyticsConfiguration.WorkspaceID", Name: validation.Null, Rule: true, Chain: nil},
- {Target: "parameters.FlowAnalyticsConfiguration.NetworkWatcherFlowAnalyticsConfiguration.WorkspaceRegion", Name: validation.Null, Rule: true, Chain: nil},
- {Target: "parameters.FlowAnalyticsConfiguration.NetworkWatcherFlowAnalyticsConfiguration.WorkspaceResourceID", Name: validation.Null, Rule: true, Chain: nil},
- }},
}}}}}); err != nil {
return result, validation.NewError("network.WatchersClient", "SetFlowLogConfiguration", err.Error())
}
@@ -1296,7 +1432,7 @@ func (client WatchersClient) SetFlowLogConfiguration(ctx context.Context, resour
result, err = client.SetFlowLogConfigurationSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersClient", "SetFlowLogConfiguration", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.WatchersClient", "SetFlowLogConfiguration", nil, "Failure sending request")
return
}
@@ -1311,7 +1447,7 @@ func (client WatchersClient) SetFlowLogConfigurationPreparer(ctx context.Context
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -1334,7 +1470,33 @@ func (client WatchersClient) SetFlowLogConfigurationSender(req *http.Request) (f
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(client WatchersClient) (fli FlowLogInformation, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.WatchersSetFlowLogConfigurationFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.WatchersSetFlowLogConfigurationFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ fli.Response.Response, err = future.GetResult(sender)
+ if fli.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "network.WatchersSetFlowLogConfigurationFuture", "Result", nil, "received nil response and error")
+ }
+ if err == nil && fli.Response.Response.StatusCode != http.StatusNoContent {
+ fli, err = client.SetFlowLogConfigurationResponder(fli.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.WatchersSetFlowLogConfigurationFuture", "Result", fli.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+ }
return
}
@@ -1382,6 +1544,7 @@ func (client WatchersClient) UpdateTags(ctx context.Context, resourceGroupName s
result, err = client.UpdateTagsResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "network.WatchersClient", "UpdateTags", resp, "Failure responding to request")
+ return
}
return
@@ -1395,7 +1558,7 @@ func (client WatchersClient) UpdateTagsPreparer(ctx context.Context, resourceGro
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -1462,7 +1625,7 @@ func (client WatchersClient) VerifyIPFlow(ctx context.Context, resourceGroupName
result, err = client.VerifyIPFlowSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersClient", "VerifyIPFlow", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.WatchersClient", "VerifyIPFlow", nil, "Failure sending request")
return
}
@@ -1477,7 +1640,7 @@ func (client WatchersClient) VerifyIPFlowPreparer(ctx context.Context, resourceG
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-12-01"
+ const APIVersion = "2017-10-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -1500,7 +1663,33 @@ func (client WatchersClient) VerifyIPFlowSender(req *http.Request) (future Watch
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(client WatchersClient) (vifr VerificationIPFlowResult, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.WatchersVerifyIPFlowFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.WatchersVerifyIPFlowFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ vifr.Response.Response, err = future.GetResult(sender)
+ if vifr.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "network.WatchersVerifyIPFlowFuture", "Result", nil, "received nil response and error")
+ }
+ if err == nil && vifr.Response.Response.StatusCode != http.StatusNoContent {
+ vifr, err = client.VerifyIPFlowResponder(vifr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.WatchersVerifyIPFlowFuture", "Result", vifr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+ }
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/availabledelegations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/availabledelegations.go
deleted file mode 100644
index 0bee568fc1b..00000000000
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/availabledelegations.go
+++ /dev/null
@@ -1,157 +0,0 @@
-package network
-
-// Copyright (c) Microsoft and contributors. All rights reserved.
-//
-// 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 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"
-)
-
-// AvailableDelegationsClient is the network Client
-type AvailableDelegationsClient struct {
- BaseClient
-}
-
-// NewAvailableDelegationsClient creates an instance of the AvailableDelegationsClient client.
-func NewAvailableDelegationsClient(subscriptionID string) AvailableDelegationsClient {
- return NewAvailableDelegationsClientWithBaseURI(DefaultBaseURI, subscriptionID)
-}
-
-// NewAvailableDelegationsClientWithBaseURI creates an instance of the AvailableDelegationsClient 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 NewAvailableDelegationsClientWithBaseURI(baseURI string, subscriptionID string) AvailableDelegationsClient {
- return AvailableDelegationsClient{NewWithBaseURI(baseURI, subscriptionID)}
-}
-
-// List gets all of the available subnet delegations for this subscription in this region.
-// Parameters:
-// location - the location of the subnet.
-func (client AvailableDelegationsClient) List(ctx context.Context, location string) (result AvailableDelegationsResultPage, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/AvailableDelegationsClient.List")
- defer func() {
- sc := -1
- if result.adr.Response.Response != nil {
- sc = result.adr.Response.Response.StatusCode
- }
- tracing.EndSpan(ctx, sc, err)
- }()
- }
- result.fn = client.listNextResults
- req, err := client.ListPreparer(ctx, location)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.AvailableDelegationsClient", "List", nil, "Failure preparing request")
- return
- }
-
- resp, err := client.ListSender(req)
- if err != nil {
- result.adr.Response = autorest.Response{Response: resp}
- err = autorest.NewErrorWithError(err, "network.AvailableDelegationsClient", "List", resp, "Failure sending request")
- return
- }
-
- result.adr, err = client.ListResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.AvailableDelegationsClient", "List", resp, "Failure responding to request")
- }
- if result.adr.hasNextLink() && result.adr.IsEmpty() {
- err = result.NextWithContext(ctx)
- }
-
- return
-}
-
-// ListPreparer prepares the List request.
-func (client AvailableDelegationsClient) 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 = "2018-12-01"
- queryParameters := map[string]interface{}{
- "api-version": APIVersion,
- }
-
- preparer := autorest.CreatePreparer(
- autorest.AsGet(),
- autorest.WithBaseURL(client.BaseURI),
- autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/availableDelegations", 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 AvailableDelegationsClient) 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 AvailableDelegationsClient) ListResponder(resp *http.Response) (result AvailableDelegationsResult, 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 AvailableDelegationsClient) listNextResults(ctx context.Context, lastResults AvailableDelegationsResult) (result AvailableDelegationsResult, err error) {
- req, err := lastResults.availableDelegationsResultPreparer(ctx)
- if err != nil {
- return result, autorest.NewErrorWithError(err, "network.AvailableDelegationsClient", "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, "network.AvailableDelegationsClient", "listNextResults", resp, "Failure sending next results request")
- }
- result, err = client.ListResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.AvailableDelegationsClient", "listNextResults", resp, "Failure responding to next results request")
- }
- return
-}
-
-// ListComplete enumerates all values, automatically crossing page boundaries as required.
-func (client AvailableDelegationsClient) ListComplete(ctx context.Context, location string) (result AvailableDelegationsResultIterator, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/AvailableDelegationsClient.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/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/availableresourcegroupdelegations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/availableresourcegroupdelegations.go
deleted file mode 100644
index 6b9147d7a7d..00000000000
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/availableresourcegroupdelegations.go
+++ /dev/null
@@ -1,160 +0,0 @@
-package network
-
-// Copyright (c) Microsoft and contributors. All rights reserved.
-//
-// 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 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"
-)
-
-// AvailableResourceGroupDelegationsClient is the network Client
-type AvailableResourceGroupDelegationsClient struct {
- BaseClient
-}
-
-// NewAvailableResourceGroupDelegationsClient creates an instance of the AvailableResourceGroupDelegationsClient
-// client.
-func NewAvailableResourceGroupDelegationsClient(subscriptionID string) AvailableResourceGroupDelegationsClient {
- return NewAvailableResourceGroupDelegationsClientWithBaseURI(DefaultBaseURI, subscriptionID)
-}
-
-// NewAvailableResourceGroupDelegationsClientWithBaseURI creates an instance of the
-// AvailableResourceGroupDelegationsClient 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 NewAvailableResourceGroupDelegationsClientWithBaseURI(baseURI string, subscriptionID string) AvailableResourceGroupDelegationsClient {
- return AvailableResourceGroupDelegationsClient{NewWithBaseURI(baseURI, subscriptionID)}
-}
-
-// List gets all of the available subnet delegations for this resource group in this region.
-// Parameters:
-// location - the location of the domain name.
-// resourceGroupName - the name of the resource group.
-func (client AvailableResourceGroupDelegationsClient) List(ctx context.Context, location string, resourceGroupName string) (result AvailableDelegationsResultPage, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/AvailableResourceGroupDelegationsClient.List")
- defer func() {
- sc := -1
- if result.adr.Response.Response != nil {
- sc = result.adr.Response.Response.StatusCode
- }
- tracing.EndSpan(ctx, sc, err)
- }()
- }
- result.fn = client.listNextResults
- req, err := client.ListPreparer(ctx, location, resourceGroupName)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.AvailableResourceGroupDelegationsClient", "List", nil, "Failure preparing request")
- return
- }
-
- resp, err := client.ListSender(req)
- if err != nil {
- result.adr.Response = autorest.Response{Response: resp}
- err = autorest.NewErrorWithError(err, "network.AvailableResourceGroupDelegationsClient", "List", resp, "Failure sending request")
- return
- }
-
- result.adr, err = client.ListResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.AvailableResourceGroupDelegationsClient", "List", resp, "Failure responding to request")
- }
- if result.adr.hasNextLink() && result.adr.IsEmpty() {
- err = result.NextWithContext(ctx)
- }
-
- return
-}
-
-// ListPreparer prepares the List request.
-func (client AvailableResourceGroupDelegationsClient) ListPreparer(ctx context.Context, location string, resourceGroupName string) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "location": autorest.Encode("path", location),
- "resourceGroupName": autorest.Encode("path", resourceGroupName),
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- }
-
- const APIVersion = "2018-12-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.Network/locations/{location}/availableDelegations", 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 AvailableResourceGroupDelegationsClient) 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 AvailableResourceGroupDelegationsClient) ListResponder(resp *http.Response) (result AvailableDelegationsResult, 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 AvailableResourceGroupDelegationsClient) listNextResults(ctx context.Context, lastResults AvailableDelegationsResult) (result AvailableDelegationsResult, err error) {
- req, err := lastResults.availableDelegationsResultPreparer(ctx)
- if err != nil {
- return result, autorest.NewErrorWithError(err, "network.AvailableResourceGroupDelegationsClient", "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, "network.AvailableResourceGroupDelegationsClient", "listNextResults", resp, "Failure sending next results request")
- }
- result, err = client.ListResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.AvailableResourceGroupDelegationsClient", "listNextResults", resp, "Failure responding to next results request")
- }
- return
-}
-
-// ListComplete enumerates all values, automatically crossing page boundaries as required.
-func (client AvailableResourceGroupDelegationsClient) ListComplete(ctx context.Context, location string, resourceGroupName string) (result AvailableDelegationsResultIterator, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/AvailableResourceGroupDelegationsClient.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, resourceGroupName)
- return
-}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/azurefirewallfqdntags.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/azurefirewallfqdntags.go
deleted file mode 100644
index 2e314381b92..00000000000
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/azurefirewallfqdntags.go
+++ /dev/null
@@ -1,154 +0,0 @@
-package network
-
-// Copyright (c) Microsoft and contributors. All rights reserved.
-//
-// 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 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"
-)
-
-// AzureFirewallFqdnTagsClient is the network Client
-type AzureFirewallFqdnTagsClient struct {
- BaseClient
-}
-
-// NewAzureFirewallFqdnTagsClient creates an instance of the AzureFirewallFqdnTagsClient client.
-func NewAzureFirewallFqdnTagsClient(subscriptionID string) AzureFirewallFqdnTagsClient {
- return NewAzureFirewallFqdnTagsClientWithBaseURI(DefaultBaseURI, subscriptionID)
-}
-
-// NewAzureFirewallFqdnTagsClientWithBaseURI creates an instance of the AzureFirewallFqdnTagsClient 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 NewAzureFirewallFqdnTagsClientWithBaseURI(baseURI string, subscriptionID string) AzureFirewallFqdnTagsClient {
- return AzureFirewallFqdnTagsClient{NewWithBaseURI(baseURI, subscriptionID)}
-}
-
-// ListAll gets all the Azure Firewall FQDN Tags in a subscription.
-func (client AzureFirewallFqdnTagsClient) ListAll(ctx context.Context) (result AzureFirewallFqdnTagListResultPage, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/AzureFirewallFqdnTagsClient.ListAll")
- defer func() {
- sc := -1
- if result.afftlr.Response.Response != nil {
- sc = result.afftlr.Response.Response.StatusCode
- }
- tracing.EndSpan(ctx, sc, err)
- }()
- }
- result.fn = client.listAllNextResults
- req, err := client.ListAllPreparer(ctx)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.AzureFirewallFqdnTagsClient", "ListAll", nil, "Failure preparing request")
- return
- }
-
- resp, err := client.ListAllSender(req)
- if err != nil {
- result.afftlr.Response = autorest.Response{Response: resp}
- err = autorest.NewErrorWithError(err, "network.AzureFirewallFqdnTagsClient", "ListAll", resp, "Failure sending request")
- return
- }
-
- result.afftlr, err = client.ListAllResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.AzureFirewallFqdnTagsClient", "ListAll", resp, "Failure responding to request")
- }
- if result.afftlr.hasNextLink() && result.afftlr.IsEmpty() {
- err = result.NextWithContext(ctx)
- }
-
- return
-}
-
-// ListAllPreparer prepares the ListAll request.
-func (client AzureFirewallFqdnTagsClient) ListAllPreparer(ctx context.Context) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- }
-
- const APIVersion = "2018-12-01"
- queryParameters := map[string]interface{}{
- "api-version": APIVersion,
- }
-
- preparer := autorest.CreatePreparer(
- autorest.AsGet(),
- autorest.WithBaseURL(client.BaseURI),
- autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/azureFirewallFqdnTags", 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 AzureFirewallFqdnTagsClient) 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 AzureFirewallFqdnTagsClient) ListAllResponder(resp *http.Response) (result AzureFirewallFqdnTagListResult, 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 AzureFirewallFqdnTagsClient) listAllNextResults(ctx context.Context, lastResults AzureFirewallFqdnTagListResult) (result AzureFirewallFqdnTagListResult, err error) {
- req, err := lastResults.azureFirewallFqdnTagListResultPreparer(ctx)
- if err != nil {
- return result, autorest.NewErrorWithError(err, "network.AzureFirewallFqdnTagsClient", "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, "network.AzureFirewallFqdnTagsClient", "listAllNextResults", resp, "Failure sending next results request")
- }
- result, err = client.ListAllResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.AzureFirewallFqdnTagsClient", "listAllNextResults", resp, "Failure responding to next results request")
- }
- return
-}
-
-// ListAllComplete enumerates all values, automatically crossing page boundaries as required.
-func (client AzureFirewallFqdnTagsClient) ListAllComplete(ctx context.Context) (result AzureFirewallFqdnTagListResultIterator, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/AzureFirewallFqdnTagsClient.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
-}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/azurefirewalls.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/azurefirewalls.go
deleted file mode 100644
index 46fcd736352..00000000000
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/azurefirewalls.go
+++ /dev/null
@@ -1,495 +0,0 @@
-package network
-
-// Copyright (c) Microsoft and contributors. All rights reserved.
-//
-// 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 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"
-)
-
-// AzureFirewallsClient is the network Client
-type AzureFirewallsClient struct {
- BaseClient
-}
-
-// NewAzureFirewallsClient creates an instance of the AzureFirewallsClient client.
-func NewAzureFirewallsClient(subscriptionID string) AzureFirewallsClient {
- return NewAzureFirewallsClientWithBaseURI(DefaultBaseURI, subscriptionID)
-}
-
-// NewAzureFirewallsClientWithBaseURI creates an instance of the AzureFirewallsClient 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 NewAzureFirewallsClientWithBaseURI(baseURI string, subscriptionID string) AzureFirewallsClient {
- return AzureFirewallsClient{NewWithBaseURI(baseURI, subscriptionID)}
-}
-
-// CreateOrUpdate creates or updates the specified Azure Firewall.
-// Parameters:
-// resourceGroupName - the name of the resource group.
-// azureFirewallName - the name of the Azure Firewall.
-// parameters - parameters supplied to the create or update Azure Firewall operation.
-func (client AzureFirewallsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, azureFirewallName string, parameters AzureFirewall) (result AzureFirewallsCreateOrUpdateFuture, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/AzureFirewallsClient.CreateOrUpdate")
- defer func() {
- sc := -1
- if result.Response() != nil {
- sc = result.Response().StatusCode
- }
- tracing.EndSpan(ctx, sc, err)
- }()
- }
- req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, azureFirewallName, parameters)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.AzureFirewallsClient", "CreateOrUpdate", nil, "Failure preparing request")
- return
- }
-
- result, err = client.CreateOrUpdateSender(req)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.AzureFirewallsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
- return
- }
-
- return
-}
-
-// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
-func (client AzureFirewallsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, azureFirewallName string, parameters AzureFirewall) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "azureFirewallName": autorest.Encode("path", azureFirewallName),
- "resourceGroupName": autorest.Encode("path", resourceGroupName),
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- }
-
- const APIVersion = "2018-12-01"
- queryParameters := map[string]interface{}{
- "api-version": APIVersion,
- }
-
- parameters.Etag = 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.Network/azureFirewalls/{azureFirewallName}", 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 AzureFirewallsClient) CreateOrUpdateSender(req *http.Request) (future AzureFirewallsCreateOrUpdateFuture, err error) {
- var resp *http.Response
- resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
- if err != nil {
- return
- }
- future.Future, err = azure.NewFutureFromResponse(resp)
- return
-}
-
-// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
-// closes the http.Response Body.
-func (client AzureFirewallsClient) CreateOrUpdateResponder(resp *http.Response) (result AzureFirewall, 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 the specified Azure Firewall.
-// Parameters:
-// resourceGroupName - the name of the resource group.
-// azureFirewallName - the name of the Azure Firewall.
-func (client AzureFirewallsClient) Delete(ctx context.Context, resourceGroupName string, azureFirewallName string) (result AzureFirewallsDeleteFuture, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/AzureFirewallsClient.Delete")
- defer func() {
- sc := -1
- if result.Response() != nil {
- sc = result.Response().StatusCode
- }
- tracing.EndSpan(ctx, sc, err)
- }()
- }
- req, err := client.DeletePreparer(ctx, resourceGroupName, azureFirewallName)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.AzureFirewallsClient", "Delete", nil, "Failure preparing request")
- return
- }
-
- result, err = client.DeleteSender(req)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.AzureFirewallsClient", "Delete", result.Response(), "Failure sending request")
- return
- }
-
- return
-}
-
-// DeletePreparer prepares the Delete request.
-func (client AzureFirewallsClient) DeletePreparer(ctx context.Context, resourceGroupName string, azureFirewallName string) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "azureFirewallName": autorest.Encode("path", azureFirewallName),
- "resourceGroupName": autorest.Encode("path", resourceGroupName),
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- }
-
- const APIVersion = "2018-12-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.Network/azureFirewalls/{azureFirewallName}", 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 AzureFirewallsClient) DeleteSender(req *http.Request) (future AzureFirewallsDeleteFuture, err error) {
- var resp *http.Response
- resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
- if err != nil {
- return
- }
- future.Future, err = azure.NewFutureFromResponse(resp)
- return
-}
-
-// DeleteResponder handles the response to the Delete request. The method always
-// closes the http.Response Body.
-func (client AzureFirewallsClient) 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 the specified Azure Firewall.
-// Parameters:
-// resourceGroupName - the name of the resource group.
-// azureFirewallName - the name of the Azure Firewall.
-func (client AzureFirewallsClient) Get(ctx context.Context, resourceGroupName string, azureFirewallName string) (result AzureFirewall, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/AzureFirewallsClient.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, azureFirewallName)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.AzureFirewallsClient", "Get", nil, "Failure preparing request")
- return
- }
-
- resp, err := client.GetSender(req)
- if err != nil {
- result.Response = autorest.Response{Response: resp}
- err = autorest.NewErrorWithError(err, "network.AzureFirewallsClient", "Get", resp, "Failure sending request")
- return
- }
-
- result, err = client.GetResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.AzureFirewallsClient", "Get", resp, "Failure responding to request")
- }
-
- return
-}
-
-// GetPreparer prepares the Get request.
-func (client AzureFirewallsClient) GetPreparer(ctx context.Context, resourceGroupName string, azureFirewallName string) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "azureFirewallName": autorest.Encode("path", azureFirewallName),
- "resourceGroupName": autorest.Encode("path", resourceGroupName),
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- }
-
- const APIVersion = "2018-12-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.Network/azureFirewalls/{azureFirewallName}", 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 AzureFirewallsClient) 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 AzureFirewallsClient) GetResponder(resp *http.Response) (result AzureFirewall, 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 Azure Firewalls in a resource group.
-// Parameters:
-// resourceGroupName - the name of the resource group.
-func (client AzureFirewallsClient) List(ctx context.Context, resourceGroupName string) (result AzureFirewallListResultPage, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/AzureFirewallsClient.List")
- defer func() {
- sc := -1
- if result.aflr.Response.Response != nil {
- sc = result.aflr.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, "network.AzureFirewallsClient", "List", nil, "Failure preparing request")
- return
- }
-
- resp, err := client.ListSender(req)
- if err != nil {
- result.aflr.Response = autorest.Response{Response: resp}
- err = autorest.NewErrorWithError(err, "network.AzureFirewallsClient", "List", resp, "Failure sending request")
- return
- }
-
- result.aflr, err = client.ListResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.AzureFirewallsClient", "List", resp, "Failure responding to request")
- }
- if result.aflr.hasNextLink() && result.aflr.IsEmpty() {
- err = result.NextWithContext(ctx)
- }
-
- return
-}
-
-// ListPreparer prepares the List request.
-func (client AzureFirewallsClient) 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 = "2018-12-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.Network/azureFirewalls", 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 AzureFirewallsClient) 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 AzureFirewallsClient) ListResponder(resp *http.Response) (result AzureFirewallListResult, 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 AzureFirewallsClient) listNextResults(ctx context.Context, lastResults AzureFirewallListResult) (result AzureFirewallListResult, err error) {
- req, err := lastResults.azureFirewallListResultPreparer(ctx)
- if err != nil {
- return result, autorest.NewErrorWithError(err, "network.AzureFirewallsClient", "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, "network.AzureFirewallsClient", "listNextResults", resp, "Failure sending next results request")
- }
- result, err = client.ListResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.AzureFirewallsClient", "listNextResults", resp, "Failure responding to next results request")
- }
- return
-}
-
-// ListComplete enumerates all values, automatically crossing page boundaries as required.
-func (client AzureFirewallsClient) ListComplete(ctx context.Context, resourceGroupName string) (result AzureFirewallListResultIterator, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/AzureFirewallsClient.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 all the Azure Firewalls in a subscription.
-func (client AzureFirewallsClient) ListAll(ctx context.Context) (result AzureFirewallListResultPage, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/AzureFirewallsClient.ListAll")
- defer func() {
- sc := -1
- if result.aflr.Response.Response != nil {
- sc = result.aflr.Response.Response.StatusCode
- }
- tracing.EndSpan(ctx, sc, err)
- }()
- }
- result.fn = client.listAllNextResults
- req, err := client.ListAllPreparer(ctx)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.AzureFirewallsClient", "ListAll", nil, "Failure preparing request")
- return
- }
-
- resp, err := client.ListAllSender(req)
- if err != nil {
- result.aflr.Response = autorest.Response{Response: resp}
- err = autorest.NewErrorWithError(err, "network.AzureFirewallsClient", "ListAll", resp, "Failure sending request")
- return
- }
-
- result.aflr, err = client.ListAllResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.AzureFirewallsClient", "ListAll", resp, "Failure responding to request")
- }
- if result.aflr.hasNextLink() && result.aflr.IsEmpty() {
- err = result.NextWithContext(ctx)
- }
-
- return
-}
-
-// ListAllPreparer prepares the ListAll request.
-func (client AzureFirewallsClient) ListAllPreparer(ctx context.Context) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- }
-
- const APIVersion = "2018-12-01"
- queryParameters := map[string]interface{}{
- "api-version": APIVersion,
- }
-
- preparer := autorest.CreatePreparer(
- autorest.AsGet(),
- autorest.WithBaseURL(client.BaseURI),
- autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/azureFirewalls", 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 AzureFirewallsClient) 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 AzureFirewallsClient) ListAllResponder(resp *http.Response) (result AzureFirewallListResult, 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 AzureFirewallsClient) listAllNextResults(ctx context.Context, lastResults AzureFirewallListResult) (result AzureFirewallListResult, err error) {
- req, err := lastResults.azureFirewallListResultPreparer(ctx)
- if err != nil {
- return result, autorest.NewErrorWithError(err, "network.AzureFirewallsClient", "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, "network.AzureFirewallsClient", "listAllNextResults", resp, "Failure sending next results request")
- }
- result, err = client.ListAllResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.AzureFirewallsClient", "listAllNextResults", resp, "Failure responding to next results request")
- }
- return
-}
-
-// ListAllComplete enumerates all values, automatically crossing page boundaries as required.
-func (client AzureFirewallsClient) ListAllComplete(ctx context.Context) (result AzureFirewallListResultIterator, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/AzureFirewallsClient.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
-}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/ddoscustompolicies.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/ddoscustompolicies.go
deleted file mode 100644
index 7575d8e1b9a..00000000000
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/ddoscustompolicies.go
+++ /dev/null
@@ -1,349 +0,0 @@
-package network
-
-// Copyright (c) Microsoft and contributors. All rights reserved.
-//
-// 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 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"
-)
-
-// DdosCustomPoliciesClient is the network Client
-type DdosCustomPoliciesClient struct {
- BaseClient
-}
-
-// NewDdosCustomPoliciesClient creates an instance of the DdosCustomPoliciesClient client.
-func NewDdosCustomPoliciesClient(subscriptionID string) DdosCustomPoliciesClient {
- return NewDdosCustomPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID)
-}
-
-// NewDdosCustomPoliciesClientWithBaseURI creates an instance of the DdosCustomPoliciesClient 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 NewDdosCustomPoliciesClientWithBaseURI(baseURI string, subscriptionID string) DdosCustomPoliciesClient {
- return DdosCustomPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)}
-}
-
-// CreateOrUpdate creates or updates a DDoS custom policy.
-// Parameters:
-// resourceGroupName - the name of the resource group.
-// ddosCustomPolicyName - the name of the DDoS custom policy.
-// parameters - parameters supplied to the create or update operation.
-func (client DdosCustomPoliciesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, ddosCustomPolicyName string, parameters DdosCustomPolicy) (result DdosCustomPoliciesCreateOrUpdateFuture, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/DdosCustomPoliciesClient.CreateOrUpdate")
- defer func() {
- sc := -1
- if result.Response() != nil {
- sc = result.Response().StatusCode
- }
- tracing.EndSpan(ctx, sc, err)
- }()
- }
- req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, ddosCustomPolicyName, parameters)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.DdosCustomPoliciesClient", "CreateOrUpdate", nil, "Failure preparing request")
- return
- }
-
- result, err = client.CreateOrUpdateSender(req)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.DdosCustomPoliciesClient", "CreateOrUpdate", result.Response(), "Failure sending request")
- return
- }
-
- return
-}
-
-// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
-func (client DdosCustomPoliciesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, ddosCustomPolicyName string, parameters DdosCustomPolicy) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "ddosCustomPolicyName": autorest.Encode("path", ddosCustomPolicyName),
- "resourceGroupName": autorest.Encode("path", resourceGroupName),
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- }
-
- const APIVersion = "2018-12-01"
- queryParameters := map[string]interface{}{
- "api-version": APIVersion,
- }
-
- parameters.Etag = 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.Network/ddosCustomPolicies/{ddosCustomPolicyName}", 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 DdosCustomPoliciesClient) CreateOrUpdateSender(req *http.Request) (future DdosCustomPoliciesCreateOrUpdateFuture, err error) {
- var resp *http.Response
- resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
- if err != nil {
- return
- }
- future.Future, err = azure.NewFutureFromResponse(resp)
- return
-}
-
-// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
-// closes the http.Response Body.
-func (client DdosCustomPoliciesClient) CreateOrUpdateResponder(resp *http.Response) (result DdosCustomPolicy, 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 the specified DDoS custom policy.
-// Parameters:
-// resourceGroupName - the name of the resource group.
-// ddosCustomPolicyName - the name of the DDoS custom policy.
-func (client DdosCustomPoliciesClient) Delete(ctx context.Context, resourceGroupName string, ddosCustomPolicyName string) (result DdosCustomPoliciesDeleteFuture, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/DdosCustomPoliciesClient.Delete")
- defer func() {
- sc := -1
- if result.Response() != nil {
- sc = result.Response().StatusCode
- }
- tracing.EndSpan(ctx, sc, err)
- }()
- }
- req, err := client.DeletePreparer(ctx, resourceGroupName, ddosCustomPolicyName)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.DdosCustomPoliciesClient", "Delete", nil, "Failure preparing request")
- return
- }
-
- result, err = client.DeleteSender(req)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.DdosCustomPoliciesClient", "Delete", result.Response(), "Failure sending request")
- return
- }
-
- return
-}
-
-// DeletePreparer prepares the Delete request.
-func (client DdosCustomPoliciesClient) DeletePreparer(ctx context.Context, resourceGroupName string, ddosCustomPolicyName string) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "ddosCustomPolicyName": autorest.Encode("path", ddosCustomPolicyName),
- "resourceGroupName": autorest.Encode("path", resourceGroupName),
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- }
-
- const APIVersion = "2018-12-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.Network/ddosCustomPolicies/{ddosCustomPolicyName}", 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 DdosCustomPoliciesClient) DeleteSender(req *http.Request) (future DdosCustomPoliciesDeleteFuture, err error) {
- var resp *http.Response
- resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
- if err != nil {
- return
- }
- future.Future, err = azure.NewFutureFromResponse(resp)
- return
-}
-
-// DeleteResponder handles the response to the Delete request. The method always
-// closes the http.Response Body.
-func (client DdosCustomPoliciesClient) 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 the specified DDoS custom policy.
-// Parameters:
-// resourceGroupName - the name of the resource group.
-// ddosCustomPolicyName - the name of the DDoS custom policy.
-func (client DdosCustomPoliciesClient) Get(ctx context.Context, resourceGroupName string, ddosCustomPolicyName string) (result DdosCustomPolicy, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/DdosCustomPoliciesClient.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, ddosCustomPolicyName)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.DdosCustomPoliciesClient", "Get", nil, "Failure preparing request")
- return
- }
-
- resp, err := client.GetSender(req)
- if err != nil {
- result.Response = autorest.Response{Response: resp}
- err = autorest.NewErrorWithError(err, "network.DdosCustomPoliciesClient", "Get", resp, "Failure sending request")
- return
- }
-
- result, err = client.GetResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.DdosCustomPoliciesClient", "Get", resp, "Failure responding to request")
- }
-
- return
-}
-
-// GetPreparer prepares the Get request.
-func (client DdosCustomPoliciesClient) GetPreparer(ctx context.Context, resourceGroupName string, ddosCustomPolicyName string) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "ddosCustomPolicyName": autorest.Encode("path", ddosCustomPolicyName),
- "resourceGroupName": autorest.Encode("path", resourceGroupName),
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- }
-
- const APIVersion = "2018-12-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.Network/ddosCustomPolicies/{ddosCustomPolicyName}", 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 DdosCustomPoliciesClient) 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 DdosCustomPoliciesClient) GetResponder(resp *http.Response) (result DdosCustomPolicy, err error) {
- err = autorest.Respond(
- resp,
- azure.WithErrorUnlessStatusCode(http.StatusOK),
- autorest.ByUnmarshallingJSON(&result),
- autorest.ByClosing())
- result.Response = autorest.Response{Response: resp}
- return
-}
-
-// UpdateTags update a DDoS custom policy tags
-// Parameters:
-// resourceGroupName - the name of the resource group.
-// ddosCustomPolicyName - the name of the DDoS custom policy.
-// parameters - parameters supplied to the update DDoS custom policy resource tags.
-func (client DdosCustomPoliciesClient) UpdateTags(ctx context.Context, resourceGroupName string, ddosCustomPolicyName string, parameters TagsObject) (result DdosCustomPoliciesUpdateTagsFuture, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/DdosCustomPoliciesClient.UpdateTags")
- defer func() {
- sc := -1
- if result.Response() != nil {
- sc = result.Response().StatusCode
- }
- tracing.EndSpan(ctx, sc, err)
- }()
- }
- req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, ddosCustomPolicyName, parameters)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.DdosCustomPoliciesClient", "UpdateTags", nil, "Failure preparing request")
- return
- }
-
- result, err = client.UpdateTagsSender(req)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.DdosCustomPoliciesClient", "UpdateTags", result.Response(), "Failure sending request")
- return
- }
-
- return
-}
-
-// UpdateTagsPreparer prepares the UpdateTags request.
-func (client DdosCustomPoliciesClient) UpdateTagsPreparer(ctx context.Context, resourceGroupName string, ddosCustomPolicyName string, parameters TagsObject) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "ddosCustomPolicyName": autorest.Encode("path", ddosCustomPolicyName),
- "resourceGroupName": autorest.Encode("path", resourceGroupName),
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- }
-
- const APIVersion = "2018-12-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.Network/ddosCustomPolicies/{ddosCustomPolicyName}", 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 DdosCustomPoliciesClient) UpdateTagsSender(req *http.Request) (future DdosCustomPoliciesUpdateTagsFuture, err error) {
- var resp *http.Response
- resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
- if err != nil {
- return
- }
- future.Future, err = azure.NewFutureFromResponse(resp)
- return
-}
-
-// UpdateTagsResponder handles the response to the UpdateTags request. The method always
-// closes the http.Response Body.
-func (client DdosCustomPoliciesClient) UpdateTagsResponder(resp *http.Response) (result DdosCustomPolicy, 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/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/ddosprotectionplans.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/ddosprotectionplans.go
deleted file mode 100644
index e087993d958..00000000000
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/ddosprotectionplans.go
+++ /dev/null
@@ -1,577 +0,0 @@
-package network
-
-// Copyright (c) Microsoft and contributors. All rights reserved.
-//
-// 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 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"
-)
-
-// DdosProtectionPlansClient is the network Client
-type DdosProtectionPlansClient struct {
- BaseClient
-}
-
-// NewDdosProtectionPlansClient creates an instance of the DdosProtectionPlansClient client.
-func NewDdosProtectionPlansClient(subscriptionID string) DdosProtectionPlansClient {
- return NewDdosProtectionPlansClientWithBaseURI(DefaultBaseURI, subscriptionID)
-}
-
-// NewDdosProtectionPlansClientWithBaseURI creates an instance of the DdosProtectionPlansClient 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 NewDdosProtectionPlansClientWithBaseURI(baseURI string, subscriptionID string) DdosProtectionPlansClient {
- return DdosProtectionPlansClient{NewWithBaseURI(baseURI, subscriptionID)}
-}
-
-// CreateOrUpdate creates or updates a DDoS protection plan.
-// Parameters:
-// resourceGroupName - the name of the resource group.
-// ddosProtectionPlanName - the name of the DDoS protection plan.
-// parameters - parameters supplied to the create or update operation.
-func (client DdosProtectionPlansClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, ddosProtectionPlanName string, parameters DdosProtectionPlan) (result DdosProtectionPlansCreateOrUpdateFuture, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/DdosProtectionPlansClient.CreateOrUpdate")
- defer func() {
- sc := -1
- if result.Response() != nil {
- sc = result.Response().StatusCode
- }
- tracing.EndSpan(ctx, sc, err)
- }()
- }
- req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, ddosProtectionPlanName, parameters)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansClient", "CreateOrUpdate", nil, "Failure preparing request")
- return
- }
-
- result, err = client.CreateOrUpdateSender(req)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansClient", "CreateOrUpdate", result.Response(), "Failure sending request")
- return
- }
-
- return
-}
-
-// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
-func (client DdosProtectionPlansClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, ddosProtectionPlanName string, parameters DdosProtectionPlan) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "ddosProtectionPlanName": autorest.Encode("path", ddosProtectionPlanName),
- "resourceGroupName": autorest.Encode("path", resourceGroupName),
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- }
-
- const APIVersion = "2018-12-01"
- queryParameters := map[string]interface{}{
- "api-version": APIVersion,
- }
-
- parameters.ID = nil
- parameters.Name = nil
- parameters.Type = nil
- parameters.Etag = 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.Network/ddosProtectionPlans/{ddosProtectionPlanName}", 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 DdosProtectionPlansClient) CreateOrUpdateSender(req *http.Request) (future DdosProtectionPlansCreateOrUpdateFuture, err error) {
- var resp *http.Response
- resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
- if err != nil {
- return
- }
- future.Future, err = azure.NewFutureFromResponse(resp)
- return
-}
-
-// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
-// closes the http.Response Body.
-func (client DdosProtectionPlansClient) CreateOrUpdateResponder(resp *http.Response) (result DdosProtectionPlan, 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 the specified DDoS protection plan.
-// Parameters:
-// resourceGroupName - the name of the resource group.
-// ddosProtectionPlanName - the name of the DDoS protection plan.
-func (client DdosProtectionPlansClient) Delete(ctx context.Context, resourceGroupName string, ddosProtectionPlanName string) (result DdosProtectionPlansDeleteFuture, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/DdosProtectionPlansClient.Delete")
- defer func() {
- sc := -1
- if result.Response() != nil {
- sc = result.Response().StatusCode
- }
- tracing.EndSpan(ctx, sc, err)
- }()
- }
- req, err := client.DeletePreparer(ctx, resourceGroupName, ddosProtectionPlanName)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansClient", "Delete", nil, "Failure preparing request")
- return
- }
-
- result, err = client.DeleteSender(req)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansClient", "Delete", result.Response(), "Failure sending request")
- return
- }
-
- return
-}
-
-// DeletePreparer prepares the Delete request.
-func (client DdosProtectionPlansClient) DeletePreparer(ctx context.Context, resourceGroupName string, ddosProtectionPlanName string) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "ddosProtectionPlanName": autorest.Encode("path", ddosProtectionPlanName),
- "resourceGroupName": autorest.Encode("path", resourceGroupName),
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- }
-
- const APIVersion = "2018-12-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.Network/ddosProtectionPlans/{ddosProtectionPlanName}", 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 DdosProtectionPlansClient) DeleteSender(req *http.Request) (future DdosProtectionPlansDeleteFuture, err error) {
- var resp *http.Response
- resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
- if err != nil {
- return
- }
- future.Future, err = azure.NewFutureFromResponse(resp)
- return
-}
-
-// DeleteResponder handles the response to the Delete request. The method always
-// closes the http.Response Body.
-func (client DdosProtectionPlansClient) 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 the specified DDoS protection plan.
-// Parameters:
-// resourceGroupName - the name of the resource group.
-// ddosProtectionPlanName - the name of the DDoS protection plan.
-func (client DdosProtectionPlansClient) Get(ctx context.Context, resourceGroupName string, ddosProtectionPlanName string) (result DdosProtectionPlan, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/DdosProtectionPlansClient.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, ddosProtectionPlanName)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansClient", "Get", nil, "Failure preparing request")
- return
- }
-
- resp, err := client.GetSender(req)
- if err != nil {
- result.Response = autorest.Response{Response: resp}
- err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansClient", "Get", resp, "Failure sending request")
- return
- }
-
- result, err = client.GetResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansClient", "Get", resp, "Failure responding to request")
- }
-
- return
-}
-
-// GetPreparer prepares the Get request.
-func (client DdosProtectionPlansClient) GetPreparer(ctx context.Context, resourceGroupName string, ddosProtectionPlanName string) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "ddosProtectionPlanName": autorest.Encode("path", ddosProtectionPlanName),
- "resourceGroupName": autorest.Encode("path", resourceGroupName),
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- }
-
- const APIVersion = "2018-12-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.Network/ddosProtectionPlans/{ddosProtectionPlanName}", 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 DdosProtectionPlansClient) 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 DdosProtectionPlansClient) GetResponder(resp *http.Response) (result DdosProtectionPlan, err error) {
- err = autorest.Respond(
- resp,
- azure.WithErrorUnlessStatusCode(http.StatusOK),
- autorest.ByUnmarshallingJSON(&result),
- autorest.ByClosing())
- result.Response = autorest.Response{Response: resp}
- return
-}
-
-// List gets all DDoS protection plans in a subscription.
-func (client DdosProtectionPlansClient) List(ctx context.Context) (result DdosProtectionPlanListResultPage, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/DdosProtectionPlansClient.List")
- defer func() {
- sc := -1
- if result.dpplr.Response.Response != nil {
- sc = result.dpplr.Response.Response.StatusCode
- }
- tracing.EndSpan(ctx, sc, err)
- }()
- }
- result.fn = client.listNextResults
- req, err := client.ListPreparer(ctx)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansClient", "List", nil, "Failure preparing request")
- return
- }
-
- resp, err := client.ListSender(req)
- if err != nil {
- result.dpplr.Response = autorest.Response{Response: resp}
- err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansClient", "List", resp, "Failure sending request")
- return
- }
-
- result.dpplr, err = client.ListResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansClient", "List", resp, "Failure responding to request")
- }
- if result.dpplr.hasNextLink() && result.dpplr.IsEmpty() {
- err = result.NextWithContext(ctx)
- }
-
- return
-}
-
-// ListPreparer prepares the List request.
-func (client DdosProtectionPlansClient) ListPreparer(ctx context.Context) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- }
-
- const APIVersion = "2018-12-01"
- queryParameters := map[string]interface{}{
- "api-version": APIVersion,
- }
-
- preparer := autorest.CreatePreparer(
- autorest.AsGet(),
- autorest.WithBaseURL(client.BaseURI),
- autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/ddosProtectionPlans", 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 DdosProtectionPlansClient) 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 DdosProtectionPlansClient) ListResponder(resp *http.Response) (result DdosProtectionPlanListResult, 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 DdosProtectionPlansClient) listNextResults(ctx context.Context, lastResults DdosProtectionPlanListResult) (result DdosProtectionPlanListResult, err error) {
- req, err := lastResults.ddosProtectionPlanListResultPreparer(ctx)
- if err != nil {
- return result, autorest.NewErrorWithError(err, "network.DdosProtectionPlansClient", "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, "network.DdosProtectionPlansClient", "listNextResults", resp, "Failure sending next results request")
- }
- result, err = client.ListResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansClient", "listNextResults", resp, "Failure responding to next results request")
- }
- return
-}
-
-// ListComplete enumerates all values, automatically crossing page boundaries as required.
-func (client DdosProtectionPlansClient) ListComplete(ctx context.Context) (result DdosProtectionPlanListResultIterator, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/DdosProtectionPlansClient.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 all the DDoS protection plans in a resource group.
-// Parameters:
-// resourceGroupName - the name of the resource group.
-func (client DdosProtectionPlansClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result DdosProtectionPlanListResultPage, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/DdosProtectionPlansClient.ListByResourceGroup")
- defer func() {
- sc := -1
- if result.dpplr.Response.Response != nil {
- sc = result.dpplr.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, "network.DdosProtectionPlansClient", "ListByResourceGroup", nil, "Failure preparing request")
- return
- }
-
- resp, err := client.ListByResourceGroupSender(req)
- if err != nil {
- result.dpplr.Response = autorest.Response{Response: resp}
- err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansClient", "ListByResourceGroup", resp, "Failure sending request")
- return
- }
-
- result.dpplr, err = client.ListByResourceGroupResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansClient", "ListByResourceGroup", resp, "Failure responding to request")
- }
- if result.dpplr.hasNextLink() && result.dpplr.IsEmpty() {
- err = result.NextWithContext(ctx)
- }
-
- return
-}
-
-// ListByResourceGroupPreparer prepares the ListByResourceGroup request.
-func (client DdosProtectionPlansClient) 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 = "2018-12-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.Network/ddosProtectionPlans", 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 DdosProtectionPlansClient) 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 DdosProtectionPlansClient) ListByResourceGroupResponder(resp *http.Response) (result DdosProtectionPlanListResult, 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 DdosProtectionPlansClient) listByResourceGroupNextResults(ctx context.Context, lastResults DdosProtectionPlanListResult) (result DdosProtectionPlanListResult, err error) {
- req, err := lastResults.ddosProtectionPlanListResultPreparer(ctx)
- if err != nil {
- return result, autorest.NewErrorWithError(err, "network.DdosProtectionPlansClient", "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, "network.DdosProtectionPlansClient", "listByResourceGroupNextResults", resp, "Failure sending next results request")
- }
- result, err = client.ListByResourceGroupResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request")
- }
- return
-}
-
-// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required.
-func (client DdosProtectionPlansClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result DdosProtectionPlanListResultIterator, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/DdosProtectionPlansClient.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 update a DDoS protection plan tags
-// Parameters:
-// resourceGroupName - the name of the resource group.
-// ddosProtectionPlanName - the name of the DDoS protection plan.
-// parameters - parameters supplied to the update DDoS protection plan resource tags.
-func (client DdosProtectionPlansClient) UpdateTags(ctx context.Context, resourceGroupName string, ddosProtectionPlanName string, parameters TagsObject) (result DdosProtectionPlansUpdateTagsFuture, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/DdosProtectionPlansClient.UpdateTags")
- defer func() {
- sc := -1
- if result.Response() != nil {
- sc = result.Response().StatusCode
- }
- tracing.EndSpan(ctx, sc, err)
- }()
- }
- req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, ddosProtectionPlanName, parameters)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansClient", "UpdateTags", nil, "Failure preparing request")
- return
- }
-
- result, err = client.UpdateTagsSender(req)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansClient", "UpdateTags", result.Response(), "Failure sending request")
- return
- }
-
- return
-}
-
-// UpdateTagsPreparer prepares the UpdateTags request.
-func (client DdosProtectionPlansClient) UpdateTagsPreparer(ctx context.Context, resourceGroupName string, ddosProtectionPlanName string, parameters TagsObject) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "ddosProtectionPlanName": autorest.Encode("path", ddosProtectionPlanName),
- "resourceGroupName": autorest.Encode("path", resourceGroupName),
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- }
-
- const APIVersion = "2018-12-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.Network/ddosProtectionPlans/{ddosProtectionPlanName}", 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 DdosProtectionPlansClient) UpdateTagsSender(req *http.Request) (future DdosProtectionPlansUpdateTagsFuture, err error) {
- var resp *http.Response
- resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
- if err != nil {
- return
- }
- future.Future, err = azure.NewFutureFromResponse(resp)
- return
-}
-
-// UpdateTagsResponder handles the response to the UpdateTags request. The method always
-// closes the http.Response Body.
-func (client DdosProtectionPlansClient) UpdateTagsResponder(resp *http.Response) (result DdosProtectionPlan, 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/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/expressroutecircuitconnections.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/expressroutecircuitconnections.go
deleted file mode 100644
index 40b7e10cadc..00000000000
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/expressroutecircuitconnections.go
+++ /dev/null
@@ -1,402 +0,0 @@
-package network
-
-// Copyright (c) Microsoft and contributors. All rights reserved.
-//
-// 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 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"
-)
-
-// ExpressRouteCircuitConnectionsClient is the network Client
-type ExpressRouteCircuitConnectionsClient struct {
- BaseClient
-}
-
-// NewExpressRouteCircuitConnectionsClient creates an instance of the ExpressRouteCircuitConnectionsClient client.
-func NewExpressRouteCircuitConnectionsClient(subscriptionID string) ExpressRouteCircuitConnectionsClient {
- return NewExpressRouteCircuitConnectionsClientWithBaseURI(DefaultBaseURI, subscriptionID)
-}
-
-// NewExpressRouteCircuitConnectionsClientWithBaseURI creates an instance of the ExpressRouteCircuitConnectionsClient
-// 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 NewExpressRouteCircuitConnectionsClientWithBaseURI(baseURI string, subscriptionID string) ExpressRouteCircuitConnectionsClient {
- return ExpressRouteCircuitConnectionsClient{NewWithBaseURI(baseURI, subscriptionID)}
-}
-
-// CreateOrUpdate creates or updates a Express Route Circuit Connection in the specified express route circuits.
-// Parameters:
-// resourceGroupName - the name of the resource group.
-// circuitName - the name of the express route circuit.
-// peeringName - the name of the peering.
-// connectionName - the name of the express route circuit connection.
-// expressRouteCircuitConnectionParameters - parameters supplied to the create or update express route circuit
-// connection operation.
-func (client ExpressRouteCircuitConnectionsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, connectionName string, expressRouteCircuitConnectionParameters ExpressRouteCircuitConnection) (result ExpressRouteCircuitConnectionsCreateOrUpdateFuture, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitConnectionsClient.CreateOrUpdate")
- defer func() {
- sc := -1
- if result.Response() != nil {
- sc = result.Response().StatusCode
- }
- tracing.EndSpan(ctx, sc, err)
- }()
- }
- req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, circuitName, peeringName, connectionName, expressRouteCircuitConnectionParameters)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsClient", "CreateOrUpdate", nil, "Failure preparing request")
- return
- }
-
- result, err = client.CreateOrUpdateSender(req)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
- return
- }
-
- return
-}
-
-// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
-func (client ExpressRouteCircuitConnectionsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, connectionName string, expressRouteCircuitConnectionParameters ExpressRouteCircuitConnection) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "circuitName": autorest.Encode("path", circuitName),
- "connectionName": autorest.Encode("path", connectionName),
- "peeringName": autorest.Encode("path", peeringName),
- "resourceGroupName": autorest.Encode("path", resourceGroupName),
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- }
-
- const APIVersion = "2018-12-01"
- queryParameters := map[string]interface{}{
- "api-version": APIVersion,
- }
-
- expressRouteCircuitConnectionParameters.Etag = 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.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/connections/{connectionName}", pathParameters),
- autorest.WithJSON(expressRouteCircuitConnectionParameters),
- 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 ExpressRouteCircuitConnectionsClient) CreateOrUpdateSender(req *http.Request) (future ExpressRouteCircuitConnectionsCreateOrUpdateFuture, err error) {
- var resp *http.Response
- resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
- if err != nil {
- return
- }
- future.Future, err = azure.NewFutureFromResponse(resp)
- return
-}
-
-// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
-// closes the http.Response Body.
-func (client ExpressRouteCircuitConnectionsClient) CreateOrUpdateResponder(resp *http.Response) (result ExpressRouteCircuitConnection, 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 the specified Express Route Circuit Connection from the specified express route circuit.
-// Parameters:
-// resourceGroupName - the name of the resource group.
-// circuitName - the name of the express route circuit.
-// peeringName - the name of the peering.
-// connectionName - the name of the express route circuit connection.
-func (client ExpressRouteCircuitConnectionsClient) Delete(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, connectionName string) (result ExpressRouteCircuitConnectionsDeleteFuture, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitConnectionsClient.Delete")
- defer func() {
- sc := -1
- if result.Response() != nil {
- sc = result.Response().StatusCode
- }
- tracing.EndSpan(ctx, sc, err)
- }()
- }
- req, err := client.DeletePreparer(ctx, resourceGroupName, circuitName, peeringName, connectionName)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsClient", "Delete", nil, "Failure preparing request")
- return
- }
-
- result, err = client.DeleteSender(req)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsClient", "Delete", result.Response(), "Failure sending request")
- return
- }
-
- return
-}
-
-// DeletePreparer prepares the Delete request.
-func (client ExpressRouteCircuitConnectionsClient) DeletePreparer(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, connectionName string) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "circuitName": autorest.Encode("path", circuitName),
- "connectionName": autorest.Encode("path", connectionName),
- "peeringName": autorest.Encode("path", peeringName),
- "resourceGroupName": autorest.Encode("path", resourceGroupName),
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- }
-
- const APIVersion = "2018-12-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.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/connections/{connectionName}", 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 ExpressRouteCircuitConnectionsClient) DeleteSender(req *http.Request) (future ExpressRouteCircuitConnectionsDeleteFuture, err error) {
- var resp *http.Response
- resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
- if err != nil {
- return
- }
- future.Future, err = azure.NewFutureFromResponse(resp)
- return
-}
-
-// DeleteResponder handles the response to the Delete request. The method always
-// closes the http.Response Body.
-func (client ExpressRouteCircuitConnectionsClient) 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 the specified Express Route Circuit Connection from the specified express route circuit.
-// Parameters:
-// resourceGroupName - the name of the resource group.
-// circuitName - the name of the express route circuit.
-// peeringName - the name of the peering.
-// connectionName - the name of the express route circuit connection.
-func (client ExpressRouteCircuitConnectionsClient) Get(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, connectionName string) (result ExpressRouteCircuitConnection, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitConnectionsClient.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, circuitName, peeringName, connectionName)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsClient", "Get", nil, "Failure preparing request")
- return
- }
-
- resp, err := client.GetSender(req)
- if err != nil {
- result.Response = autorest.Response{Response: resp}
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsClient", "Get", resp, "Failure sending request")
- return
- }
-
- result, err = client.GetResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsClient", "Get", resp, "Failure responding to request")
- }
-
- return
-}
-
-// GetPreparer prepares the Get request.
-func (client ExpressRouteCircuitConnectionsClient) GetPreparer(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, connectionName string) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "circuitName": autorest.Encode("path", circuitName),
- "connectionName": autorest.Encode("path", connectionName),
- "peeringName": autorest.Encode("path", peeringName),
- "resourceGroupName": autorest.Encode("path", resourceGroupName),
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- }
-
- const APIVersion = "2018-12-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.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/connections/{connectionName}", 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 ExpressRouteCircuitConnectionsClient) 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 ExpressRouteCircuitConnectionsClient) GetResponder(resp *http.Response) (result ExpressRouteCircuitConnection, err error) {
- err = autorest.Respond(
- resp,
- azure.WithErrorUnlessStatusCode(http.StatusOK),
- autorest.ByUnmarshallingJSON(&result),
- autorest.ByClosing())
- result.Response = autorest.Response{Response: resp}
- return
-}
-
-// List gets all global reach connections associated with a private peering in an express route circuit.
-// Parameters:
-// resourceGroupName - the name of the resource group.
-// circuitName - the name of the circuit.
-// peeringName - the name of the peering.
-func (client ExpressRouteCircuitConnectionsClient) List(ctx context.Context, resourceGroupName string, circuitName string, peeringName string) (result ExpressRouteCircuitConnectionListResultPage, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitConnectionsClient.List")
- defer func() {
- sc := -1
- if result.ercclr.Response.Response != nil {
- sc = result.ercclr.Response.Response.StatusCode
- }
- tracing.EndSpan(ctx, sc, err)
- }()
- }
- result.fn = client.listNextResults
- req, err := client.ListPreparer(ctx, resourceGroupName, circuitName, peeringName)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsClient", "List", nil, "Failure preparing request")
- return
- }
-
- resp, err := client.ListSender(req)
- if err != nil {
- result.ercclr.Response = autorest.Response{Response: resp}
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsClient", "List", resp, "Failure sending request")
- return
- }
-
- result.ercclr, err = client.ListResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsClient", "List", resp, "Failure responding to request")
- }
- if result.ercclr.hasNextLink() && result.ercclr.IsEmpty() {
- err = result.NextWithContext(ctx)
- }
-
- return
-}
-
-// ListPreparer prepares the List request.
-func (client ExpressRouteCircuitConnectionsClient) ListPreparer(ctx context.Context, resourceGroupName string, circuitName string, peeringName string) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "circuitName": autorest.Encode("path", circuitName),
- "peeringName": autorest.Encode("path", peeringName),
- "resourceGroupName": autorest.Encode("path", resourceGroupName),
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- }
-
- const APIVersion = "2018-12-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.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/connections", 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 ExpressRouteCircuitConnectionsClient) 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 ExpressRouteCircuitConnectionsClient) ListResponder(resp *http.Response) (result ExpressRouteCircuitConnectionListResult, 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 ExpressRouteCircuitConnectionsClient) listNextResults(ctx context.Context, lastResults ExpressRouteCircuitConnectionListResult) (result ExpressRouteCircuitConnectionListResult, err error) {
- req, err := lastResults.expressRouteCircuitConnectionListResultPreparer(ctx)
- if err != nil {
- return result, autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsClient", "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, "network.ExpressRouteCircuitConnectionsClient", "listNextResults", resp, "Failure sending next results request")
- }
- result, err = client.ListResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsClient", "listNextResults", resp, "Failure responding to next results request")
- }
- return
-}
-
-// ListComplete enumerates all values, automatically crossing page boundaries as required.
-func (client ExpressRouteCircuitConnectionsClient) ListComplete(ctx context.Context, resourceGroupName string, circuitName string, peeringName string) (result ExpressRouteCircuitConnectionListResultIterator, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitConnectionsClient.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, circuitName, peeringName)
- return
-}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/expressrouteconnections.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/expressrouteconnections.go
deleted file mode 100644
index c8f1361b477..00000000000
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/expressrouteconnections.go
+++ /dev/null
@@ -1,360 +0,0 @@
-package network
-
-// Copyright (c) Microsoft and contributors. All rights reserved.
-//
-// 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 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"
-)
-
-// ExpressRouteConnectionsClient is the network Client
-type ExpressRouteConnectionsClient struct {
- BaseClient
-}
-
-// NewExpressRouteConnectionsClient creates an instance of the ExpressRouteConnectionsClient client.
-func NewExpressRouteConnectionsClient(subscriptionID string) ExpressRouteConnectionsClient {
- return NewExpressRouteConnectionsClientWithBaseURI(DefaultBaseURI, subscriptionID)
-}
-
-// NewExpressRouteConnectionsClientWithBaseURI creates an instance of the ExpressRouteConnectionsClient 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 NewExpressRouteConnectionsClientWithBaseURI(baseURI string, subscriptionID string) ExpressRouteConnectionsClient {
- return ExpressRouteConnectionsClient{NewWithBaseURI(baseURI, subscriptionID)}
-}
-
-// CreateOrUpdate creates a connection between an ExpressRoute gateway and an ExpressRoute circuit.
-// Parameters:
-// resourceGroupName - the name of the resource group.
-// expressRouteGatewayName - the name of the ExpressRoute gateway.
-// connectionName - the name of the connection subresource.
-// putExpressRouteConnectionParameters - parameters required in an ExpressRouteConnection PUT operation.
-func (client ExpressRouteConnectionsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, expressRouteGatewayName string, connectionName string, putExpressRouteConnectionParameters ExpressRouteConnection) (result ExpressRouteConnectionsCreateOrUpdateFuture, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteConnectionsClient.CreateOrUpdate")
- defer func() {
- sc := -1
- if result.Response() != nil {
- sc = result.Response().StatusCode
- }
- tracing.EndSpan(ctx, sc, err)
- }()
- }
- if err := validation.Validate([]validation.Validation{
- {TargetValue: putExpressRouteConnectionParameters,
- Constraints: []validation.Constraint{{Target: "putExpressRouteConnectionParameters.ExpressRouteConnectionProperties", Name: validation.Null, Rule: false,
- Chain: []validation.Constraint{{Target: "putExpressRouteConnectionParameters.ExpressRouteConnectionProperties.ExpressRouteCircuitPeering", Name: validation.Null, Rule: true, Chain: nil}}},
- {Target: "putExpressRouteConnectionParameters.Name", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
- return result, validation.NewError("network.ExpressRouteConnectionsClient", "CreateOrUpdate", err.Error())
- }
-
- req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, expressRouteGatewayName, connectionName, putExpressRouteConnectionParameters)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteConnectionsClient", "CreateOrUpdate", nil, "Failure preparing request")
- return
- }
-
- result, err = client.CreateOrUpdateSender(req)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteConnectionsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
- return
- }
-
- return
-}
-
-// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
-func (client ExpressRouteConnectionsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, expressRouteGatewayName string, connectionName string, putExpressRouteConnectionParameters ExpressRouteConnection) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "connectionName": autorest.Encode("path", connectionName),
- "expressRouteGatewayName": autorest.Encode("path", expressRouteGatewayName),
- "resourceGroupName": autorest.Encode("path", resourceGroupName),
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- }
-
- const APIVersion = "2018-12-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.Network/expressRouteGateways/{expressRouteGatewayName}/expressRouteConnections/{connectionName}", pathParameters),
- autorest.WithJSON(putExpressRouteConnectionParameters),
- 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 ExpressRouteConnectionsClient) CreateOrUpdateSender(req *http.Request) (future ExpressRouteConnectionsCreateOrUpdateFuture, err error) {
- var resp *http.Response
- resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
- if err != nil {
- return
- }
- future.Future, err = azure.NewFutureFromResponse(resp)
- return
-}
-
-// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
-// closes the http.Response Body.
-func (client ExpressRouteConnectionsClient) CreateOrUpdateResponder(resp *http.Response) (result ExpressRouteConnection, 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 connection to a ExpressRoute circuit.
-// Parameters:
-// resourceGroupName - the name of the resource group.
-// expressRouteGatewayName - the name of the ExpressRoute gateway.
-// connectionName - the name of the connection subresource.
-func (client ExpressRouteConnectionsClient) Delete(ctx context.Context, resourceGroupName string, expressRouteGatewayName string, connectionName string) (result ExpressRouteConnectionsDeleteFuture, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteConnectionsClient.Delete")
- defer func() {
- sc := -1
- if result.Response() != nil {
- sc = result.Response().StatusCode
- }
- tracing.EndSpan(ctx, sc, err)
- }()
- }
- req, err := client.DeletePreparer(ctx, resourceGroupName, expressRouteGatewayName, connectionName)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteConnectionsClient", "Delete", nil, "Failure preparing request")
- return
- }
-
- result, err = client.DeleteSender(req)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteConnectionsClient", "Delete", result.Response(), "Failure sending request")
- return
- }
-
- return
-}
-
-// DeletePreparer prepares the Delete request.
-func (client ExpressRouteConnectionsClient) DeletePreparer(ctx context.Context, resourceGroupName string, expressRouteGatewayName string, connectionName string) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "connectionName": autorest.Encode("path", connectionName),
- "expressRouteGatewayName": autorest.Encode("path", expressRouteGatewayName),
- "resourceGroupName": autorest.Encode("path", resourceGroupName),
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- }
-
- const APIVersion = "2018-12-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.Network/expressRouteGateways/{expressRouteGatewayName}/expressRouteConnections/{connectionName}", 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 ExpressRouteConnectionsClient) DeleteSender(req *http.Request) (future ExpressRouteConnectionsDeleteFuture, err error) {
- var resp *http.Response
- resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
- if err != nil {
- return
- }
- future.Future, err = azure.NewFutureFromResponse(resp)
- return
-}
-
-// DeleteResponder handles the response to the Delete request. The method always
-// closes the http.Response Body.
-func (client ExpressRouteConnectionsClient) 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 the specified ExpressRouteConnection.
-// Parameters:
-// resourceGroupName - the name of the resource group.
-// expressRouteGatewayName - the name of the ExpressRoute gateway.
-// connectionName - the name of the ExpressRoute connection.
-func (client ExpressRouteConnectionsClient) Get(ctx context.Context, resourceGroupName string, expressRouteGatewayName string, connectionName string) (result ExpressRouteConnection, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteConnectionsClient.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, expressRouteGatewayName, connectionName)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteConnectionsClient", "Get", nil, "Failure preparing request")
- return
- }
-
- resp, err := client.GetSender(req)
- if err != nil {
- result.Response = autorest.Response{Response: resp}
- err = autorest.NewErrorWithError(err, "network.ExpressRouteConnectionsClient", "Get", resp, "Failure sending request")
- return
- }
-
- result, err = client.GetResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteConnectionsClient", "Get", resp, "Failure responding to request")
- }
-
- return
-}
-
-// GetPreparer prepares the Get request.
-func (client ExpressRouteConnectionsClient) GetPreparer(ctx context.Context, resourceGroupName string, expressRouteGatewayName string, connectionName string) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "connectionName": autorest.Encode("path", connectionName),
- "expressRouteGatewayName": autorest.Encode("path", expressRouteGatewayName),
- "resourceGroupName": autorest.Encode("path", resourceGroupName),
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- }
-
- const APIVersion = "2018-12-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.Network/expressRouteGateways/{expressRouteGatewayName}/expressRouteConnections/{connectionName}", 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 ExpressRouteConnectionsClient) 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 ExpressRouteConnectionsClient) GetResponder(resp *http.Response) (result ExpressRouteConnection, err error) {
- err = autorest.Respond(
- resp,
- azure.WithErrorUnlessStatusCode(http.StatusOK),
- autorest.ByUnmarshallingJSON(&result),
- autorest.ByClosing())
- result.Response = autorest.Response{Response: resp}
- return
-}
-
-// List lists ExpressRouteConnections.
-// Parameters:
-// resourceGroupName - the name of the resource group.
-// expressRouteGatewayName - the name of the ExpressRoute gateway.
-func (client ExpressRouteConnectionsClient) List(ctx context.Context, resourceGroupName string, expressRouteGatewayName string) (result ExpressRouteConnectionList, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteConnectionsClient.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, expressRouteGatewayName)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteConnectionsClient", "List", nil, "Failure preparing request")
- return
- }
-
- resp, err := client.ListSender(req)
- if err != nil {
- result.Response = autorest.Response{Response: resp}
- err = autorest.NewErrorWithError(err, "network.ExpressRouteConnectionsClient", "List", resp, "Failure sending request")
- return
- }
-
- result, err = client.ListResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteConnectionsClient", "List", resp, "Failure responding to request")
- }
-
- return
-}
-
-// ListPreparer prepares the List request.
-func (client ExpressRouteConnectionsClient) ListPreparer(ctx context.Context, resourceGroupName string, expressRouteGatewayName string) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "expressRouteGatewayName": autorest.Encode("path", expressRouteGatewayName),
- "resourceGroupName": autorest.Encode("path", resourceGroupName),
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- }
-
- const APIVersion = "2018-12-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.Network/expressRouteGateways/{expressRouteGatewayName}/expressRouteConnections", 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 ExpressRouteConnectionsClient) 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 ExpressRouteConnectionsClient) ListResponder(resp *http.Response) (result ExpressRouteConnectionList, 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/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/expressroutecrossconnectionpeerings.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/expressroutecrossconnectionpeerings.go
deleted file mode 100644
index 433571e6666..00000000000
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/expressroutecrossconnectionpeerings.go
+++ /dev/null
@@ -1,407 +0,0 @@
-package network
-
-// Copyright (c) Microsoft and contributors. All rights reserved.
-//
-// 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 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"
-)
-
-// ExpressRouteCrossConnectionPeeringsClient is the network Client
-type ExpressRouteCrossConnectionPeeringsClient struct {
- BaseClient
-}
-
-// NewExpressRouteCrossConnectionPeeringsClient creates an instance of the ExpressRouteCrossConnectionPeeringsClient
-// client.
-func NewExpressRouteCrossConnectionPeeringsClient(subscriptionID string) ExpressRouteCrossConnectionPeeringsClient {
- return NewExpressRouteCrossConnectionPeeringsClientWithBaseURI(DefaultBaseURI, subscriptionID)
-}
-
-// NewExpressRouteCrossConnectionPeeringsClientWithBaseURI creates an instance of the
-// ExpressRouteCrossConnectionPeeringsClient 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 NewExpressRouteCrossConnectionPeeringsClientWithBaseURI(baseURI string, subscriptionID string) ExpressRouteCrossConnectionPeeringsClient {
- return ExpressRouteCrossConnectionPeeringsClient{NewWithBaseURI(baseURI, subscriptionID)}
-}
-
-// CreateOrUpdate creates or updates a peering in the specified ExpressRouteCrossConnection.
-// Parameters:
-// resourceGroupName - the name of the resource group.
-// crossConnectionName - the name of the ExpressRouteCrossConnection.
-// peeringName - the name of the peering.
-// peeringParameters - parameters supplied to the create or update ExpressRouteCrossConnection peering
-// operation.
-func (client ExpressRouteCrossConnectionPeeringsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, crossConnectionName string, peeringName string, peeringParameters ExpressRouteCrossConnectionPeering) (result ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionPeeringsClient.CreateOrUpdate")
- defer func() {
- sc := -1
- if result.Response() != nil {
- sc = result.Response().StatusCode
- }
- tracing.EndSpan(ctx, sc, err)
- }()
- }
- if err := validation.Validate([]validation.Validation{
- {TargetValue: peeringParameters,
- Constraints: []validation.Constraint{{Target: "peeringParameters.ExpressRouteCrossConnectionPeeringProperties", Name: validation.Null, Rule: false,
- Chain: []validation.Constraint{{Target: "peeringParameters.ExpressRouteCrossConnectionPeeringProperties.PeerASN", Name: validation.Null, Rule: false,
- Chain: []validation.Constraint{{Target: "peeringParameters.ExpressRouteCrossConnectionPeeringProperties.PeerASN", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil},
- {Target: "peeringParameters.ExpressRouteCrossConnectionPeeringProperties.PeerASN", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil},
- }},
- }}}}}); err != nil {
- return result, validation.NewError("network.ExpressRouteCrossConnectionPeeringsClient", "CreateOrUpdate", err.Error())
- }
-
- req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, crossConnectionName, peeringName, peeringParameters)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsClient", "CreateOrUpdate", nil, "Failure preparing request")
- return
- }
-
- result, err = client.CreateOrUpdateSender(req)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
- return
- }
-
- return
-}
-
-// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
-func (client ExpressRouteCrossConnectionPeeringsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, crossConnectionName string, peeringName string, peeringParameters ExpressRouteCrossConnectionPeering) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "crossConnectionName": autorest.Encode("path", crossConnectionName),
- "peeringName": autorest.Encode("path", peeringName),
- "resourceGroupName": autorest.Encode("path", resourceGroupName),
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- }
-
- const APIVersion = "2018-12-01"
- queryParameters := map[string]interface{}{
- "api-version": APIVersion,
- }
-
- peeringParameters.Etag = 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.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}", pathParameters),
- autorest.WithJSON(peeringParameters),
- 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 ExpressRouteCrossConnectionPeeringsClient) CreateOrUpdateSender(req *http.Request) (future ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture, err error) {
- var resp *http.Response
- resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
- if err != nil {
- return
- }
- future.Future, err = azure.NewFutureFromResponse(resp)
- return
-}
-
-// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
-// closes the http.Response Body.
-func (client ExpressRouteCrossConnectionPeeringsClient) CreateOrUpdateResponder(resp *http.Response) (result ExpressRouteCrossConnectionPeering, 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 the specified peering from the ExpressRouteCrossConnection.
-// Parameters:
-// resourceGroupName - the name of the resource group.
-// crossConnectionName - the name of the ExpressRouteCrossConnection.
-// peeringName - the name of the peering.
-func (client ExpressRouteCrossConnectionPeeringsClient) Delete(ctx context.Context, resourceGroupName string, crossConnectionName string, peeringName string) (result ExpressRouteCrossConnectionPeeringsDeleteFuture, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionPeeringsClient.Delete")
- defer func() {
- sc := -1
- if result.Response() != nil {
- sc = result.Response().StatusCode
- }
- tracing.EndSpan(ctx, sc, err)
- }()
- }
- req, err := client.DeletePreparer(ctx, resourceGroupName, crossConnectionName, peeringName)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsClient", "Delete", nil, "Failure preparing request")
- return
- }
-
- result, err = client.DeleteSender(req)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsClient", "Delete", result.Response(), "Failure sending request")
- return
- }
-
- return
-}
-
-// DeletePreparer prepares the Delete request.
-func (client ExpressRouteCrossConnectionPeeringsClient) DeletePreparer(ctx context.Context, resourceGroupName string, crossConnectionName string, peeringName string) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "crossConnectionName": autorest.Encode("path", crossConnectionName),
- "peeringName": autorest.Encode("path", peeringName),
- "resourceGroupName": autorest.Encode("path", resourceGroupName),
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- }
-
- const APIVersion = "2018-12-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.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}", 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 ExpressRouteCrossConnectionPeeringsClient) DeleteSender(req *http.Request) (future ExpressRouteCrossConnectionPeeringsDeleteFuture, err error) {
- var resp *http.Response
- resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
- if err != nil {
- return
- }
- future.Future, err = azure.NewFutureFromResponse(resp)
- return
-}
-
-// DeleteResponder handles the response to the Delete request. The method always
-// closes the http.Response Body.
-func (client ExpressRouteCrossConnectionPeeringsClient) 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 the specified peering for the ExpressRouteCrossConnection.
-// Parameters:
-// resourceGroupName - the name of the resource group.
-// crossConnectionName - the name of the ExpressRouteCrossConnection.
-// peeringName - the name of the peering.
-func (client ExpressRouteCrossConnectionPeeringsClient) Get(ctx context.Context, resourceGroupName string, crossConnectionName string, peeringName string) (result ExpressRouteCrossConnectionPeering, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionPeeringsClient.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, crossConnectionName, peeringName)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsClient", "Get", nil, "Failure preparing request")
- return
- }
-
- resp, err := client.GetSender(req)
- if err != nil {
- result.Response = autorest.Response{Response: resp}
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsClient", "Get", resp, "Failure sending request")
- return
- }
-
- result, err = client.GetResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsClient", "Get", resp, "Failure responding to request")
- }
-
- return
-}
-
-// GetPreparer prepares the Get request.
-func (client ExpressRouteCrossConnectionPeeringsClient) GetPreparer(ctx context.Context, resourceGroupName string, crossConnectionName string, peeringName string) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "crossConnectionName": autorest.Encode("path", crossConnectionName),
- "peeringName": autorest.Encode("path", peeringName),
- "resourceGroupName": autorest.Encode("path", resourceGroupName),
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- }
-
- const APIVersion = "2018-12-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.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}", 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 ExpressRouteCrossConnectionPeeringsClient) 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 ExpressRouteCrossConnectionPeeringsClient) GetResponder(resp *http.Response) (result ExpressRouteCrossConnectionPeering, err error) {
- err = autorest.Respond(
- resp,
- azure.WithErrorUnlessStatusCode(http.StatusOK),
- autorest.ByUnmarshallingJSON(&result),
- autorest.ByClosing())
- result.Response = autorest.Response{Response: resp}
- return
-}
-
-// List gets all peerings in a specified ExpressRouteCrossConnection.
-// Parameters:
-// resourceGroupName - the name of the resource group.
-// crossConnectionName - the name of the ExpressRouteCrossConnection.
-func (client ExpressRouteCrossConnectionPeeringsClient) List(ctx context.Context, resourceGroupName string, crossConnectionName string) (result ExpressRouteCrossConnectionPeeringListPage, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionPeeringsClient.List")
- defer func() {
- sc := -1
- if result.erccpl.Response.Response != nil {
- sc = result.erccpl.Response.Response.StatusCode
- }
- tracing.EndSpan(ctx, sc, err)
- }()
- }
- result.fn = client.listNextResults
- req, err := client.ListPreparer(ctx, resourceGroupName, crossConnectionName)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsClient", "List", nil, "Failure preparing request")
- return
- }
-
- resp, err := client.ListSender(req)
- if err != nil {
- result.erccpl.Response = autorest.Response{Response: resp}
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsClient", "List", resp, "Failure sending request")
- return
- }
-
- result.erccpl, err = client.ListResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsClient", "List", resp, "Failure responding to request")
- }
- if result.erccpl.hasNextLink() && result.erccpl.IsEmpty() {
- err = result.NextWithContext(ctx)
- }
-
- return
-}
-
-// ListPreparer prepares the List request.
-func (client ExpressRouteCrossConnectionPeeringsClient) ListPreparer(ctx context.Context, resourceGroupName string, crossConnectionName string) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "crossConnectionName": autorest.Encode("path", crossConnectionName),
- "resourceGroupName": autorest.Encode("path", resourceGroupName),
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- }
-
- const APIVersion = "2018-12-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.Network/expressRouteCrossConnections/{crossConnectionName}/peerings", 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 ExpressRouteCrossConnectionPeeringsClient) 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 ExpressRouteCrossConnectionPeeringsClient) ListResponder(resp *http.Response) (result ExpressRouteCrossConnectionPeeringList, 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 ExpressRouteCrossConnectionPeeringsClient) listNextResults(ctx context.Context, lastResults ExpressRouteCrossConnectionPeeringList) (result ExpressRouteCrossConnectionPeeringList, err error) {
- req, err := lastResults.expressRouteCrossConnectionPeeringListPreparer(ctx)
- if err != nil {
- return result, autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsClient", "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, "network.ExpressRouteCrossConnectionPeeringsClient", "listNextResults", resp, "Failure sending next results request")
- }
- result, err = client.ListResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsClient", "listNextResults", resp, "Failure responding to next results request")
- }
- return
-}
-
-// ListComplete enumerates all values, automatically crossing page boundaries as required.
-func (client ExpressRouteCrossConnectionPeeringsClient) ListComplete(ctx context.Context, resourceGroupName string, crossConnectionName string) (result ExpressRouteCrossConnectionPeeringListIterator, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionPeeringsClient.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, crossConnectionName)
- return
-}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/expressroutecrossconnections.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/expressroutecrossconnections.go
deleted file mode 100644
index c6a28140863..00000000000
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/expressroutecrossconnections.go
+++ /dev/null
@@ -1,740 +0,0 @@
-package network
-
-// Copyright (c) Microsoft and contributors. All rights reserved.
-//
-// 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 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"
-)
-
-// ExpressRouteCrossConnectionsClient is the network Client
-type ExpressRouteCrossConnectionsClient struct {
- BaseClient
-}
-
-// NewExpressRouteCrossConnectionsClient creates an instance of the ExpressRouteCrossConnectionsClient client.
-func NewExpressRouteCrossConnectionsClient(subscriptionID string) ExpressRouteCrossConnectionsClient {
- return NewExpressRouteCrossConnectionsClientWithBaseURI(DefaultBaseURI, subscriptionID)
-}
-
-// NewExpressRouteCrossConnectionsClientWithBaseURI creates an instance of the ExpressRouteCrossConnectionsClient
-// 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 NewExpressRouteCrossConnectionsClientWithBaseURI(baseURI string, subscriptionID string) ExpressRouteCrossConnectionsClient {
- return ExpressRouteCrossConnectionsClient{NewWithBaseURI(baseURI, subscriptionID)}
-}
-
-// CreateOrUpdate update the specified ExpressRouteCrossConnection.
-// Parameters:
-// resourceGroupName - the name of the resource group.
-// crossConnectionName - the name of the ExpressRouteCrossConnection.
-// parameters - parameters supplied to the update express route crossConnection operation.
-func (client ExpressRouteCrossConnectionsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, crossConnectionName string, parameters ExpressRouteCrossConnection) (result ExpressRouteCrossConnectionsCreateOrUpdateFuture, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionsClient.CreateOrUpdate")
- defer func() {
- sc := -1
- if result.Response() != nil {
- sc = result.Response().StatusCode
- }
- tracing.EndSpan(ctx, sc, err)
- }()
- }
- req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, crossConnectionName, parameters)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsClient", "CreateOrUpdate", nil, "Failure preparing request")
- return
- }
-
- result, err = client.CreateOrUpdateSender(req)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
- return
- }
-
- return
-}
-
-// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
-func (client ExpressRouteCrossConnectionsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, crossConnectionName string, parameters ExpressRouteCrossConnection) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "crossConnectionName": autorest.Encode("path", crossConnectionName),
- "resourceGroupName": autorest.Encode("path", resourceGroupName),
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- }
-
- const APIVersion = "2018-12-01"
- queryParameters := map[string]interface{}{
- "api-version": APIVersion,
- }
-
- parameters.Etag = 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.Network/expressRouteCrossConnections/{crossConnectionName}", 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 ExpressRouteCrossConnectionsClient) CreateOrUpdateSender(req *http.Request) (future ExpressRouteCrossConnectionsCreateOrUpdateFuture, err error) {
- var resp *http.Response
- resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
- if err != nil {
- return
- }
- future.Future, err = azure.NewFutureFromResponse(resp)
- return
-}
-
-// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
-// closes the http.Response Body.
-func (client ExpressRouteCrossConnectionsClient) CreateOrUpdateResponder(resp *http.Response) (result ExpressRouteCrossConnection, err error) {
- err = autorest.Respond(
- resp,
- azure.WithErrorUnlessStatusCode(http.StatusOK),
- autorest.ByUnmarshallingJSON(&result),
- autorest.ByClosing())
- result.Response = autorest.Response{Response: resp}
- return
-}
-
-// Get gets details about the specified ExpressRouteCrossConnection.
-// Parameters:
-// resourceGroupName - the name of the resource group (peering location of the circuit).
-// crossConnectionName - the name of the ExpressRouteCrossConnection (service key of the circuit).
-func (client ExpressRouteCrossConnectionsClient) Get(ctx context.Context, resourceGroupName string, crossConnectionName string) (result ExpressRouteCrossConnection, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionsClient.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, crossConnectionName)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsClient", "Get", nil, "Failure preparing request")
- return
- }
-
- resp, err := client.GetSender(req)
- if err != nil {
- result.Response = autorest.Response{Response: resp}
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsClient", "Get", resp, "Failure sending request")
- return
- }
-
- result, err = client.GetResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsClient", "Get", resp, "Failure responding to request")
- }
-
- return
-}
-
-// GetPreparer prepares the Get request.
-func (client ExpressRouteCrossConnectionsClient) GetPreparer(ctx context.Context, resourceGroupName string, crossConnectionName string) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "crossConnectionName": autorest.Encode("path", crossConnectionName),
- "resourceGroupName": autorest.Encode("path", resourceGroupName),
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- }
-
- const APIVersion = "2018-12-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.Network/expressRouteCrossConnections/{crossConnectionName}", 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 ExpressRouteCrossConnectionsClient) 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 ExpressRouteCrossConnectionsClient) GetResponder(resp *http.Response) (result ExpressRouteCrossConnection, err error) {
- err = autorest.Respond(
- resp,
- azure.WithErrorUnlessStatusCode(http.StatusOK),
- autorest.ByUnmarshallingJSON(&result),
- autorest.ByClosing())
- result.Response = autorest.Response{Response: resp}
- return
-}
-
-// List retrieves all the ExpressRouteCrossConnections in a subscription.
-func (client ExpressRouteCrossConnectionsClient) List(ctx context.Context) (result ExpressRouteCrossConnectionListResultPage, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionsClient.List")
- defer func() {
- sc := -1
- if result.ercclr.Response.Response != nil {
- sc = result.ercclr.Response.Response.StatusCode
- }
- tracing.EndSpan(ctx, sc, err)
- }()
- }
- result.fn = client.listNextResults
- req, err := client.ListPreparer(ctx)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsClient", "List", nil, "Failure preparing request")
- return
- }
-
- resp, err := client.ListSender(req)
- if err != nil {
- result.ercclr.Response = autorest.Response{Response: resp}
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsClient", "List", resp, "Failure sending request")
- return
- }
-
- result.ercclr, err = client.ListResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsClient", "List", resp, "Failure responding to request")
- }
- if result.ercclr.hasNextLink() && result.ercclr.IsEmpty() {
- err = result.NextWithContext(ctx)
- }
-
- return
-}
-
-// ListPreparer prepares the List request.
-func (client ExpressRouteCrossConnectionsClient) ListPreparer(ctx context.Context) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- }
-
- const APIVersion = "2018-12-01"
- queryParameters := map[string]interface{}{
- "api-version": APIVersion,
- }
-
- preparer := autorest.CreatePreparer(
- autorest.AsGet(),
- autorest.WithBaseURL(client.BaseURI),
- autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/expressRouteCrossConnections", 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 ExpressRouteCrossConnectionsClient) 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 ExpressRouteCrossConnectionsClient) ListResponder(resp *http.Response) (result ExpressRouteCrossConnectionListResult, 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 ExpressRouteCrossConnectionsClient) listNextResults(ctx context.Context, lastResults ExpressRouteCrossConnectionListResult) (result ExpressRouteCrossConnectionListResult, err error) {
- req, err := lastResults.expressRouteCrossConnectionListResultPreparer(ctx)
- if err != nil {
- return result, autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsClient", "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, "network.ExpressRouteCrossConnectionsClient", "listNextResults", resp, "Failure sending next results request")
- }
- result, err = client.ListResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsClient", "listNextResults", resp, "Failure responding to next results request")
- }
- return
-}
-
-// ListComplete enumerates all values, automatically crossing page boundaries as required.
-func (client ExpressRouteCrossConnectionsClient) ListComplete(ctx context.Context) (result ExpressRouteCrossConnectionListResultIterator, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionsClient.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
-}
-
-// ListArpTable gets the currently advertised ARP table associated with the express route cross connection in a
-// resource group.
-// Parameters:
-// resourceGroupName - the name of the resource group.
-// crossConnectionName - the name of the ExpressRouteCrossConnection.
-// peeringName - the name of the peering.
-// devicePath - the path of the device
-func (client ExpressRouteCrossConnectionsClient) ListArpTable(ctx context.Context, resourceGroupName string, crossConnectionName string, peeringName string, devicePath string) (result ExpressRouteCrossConnectionsListArpTableFuture, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionsClient.ListArpTable")
- defer func() {
- sc := -1
- if result.Response() != nil {
- sc = result.Response().StatusCode
- }
- tracing.EndSpan(ctx, sc, err)
- }()
- }
- req, err := client.ListArpTablePreparer(ctx, resourceGroupName, crossConnectionName, peeringName, devicePath)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsClient", "ListArpTable", nil, "Failure preparing request")
- return
- }
-
- result, err = client.ListArpTableSender(req)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsClient", "ListArpTable", result.Response(), "Failure sending request")
- return
- }
-
- return
-}
-
-// ListArpTablePreparer prepares the ListArpTable request.
-func (client ExpressRouteCrossConnectionsClient) ListArpTablePreparer(ctx context.Context, resourceGroupName string, crossConnectionName string, peeringName string, devicePath string) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "crossConnectionName": autorest.Encode("path", crossConnectionName),
- "devicePath": autorest.Encode("path", devicePath),
- "peeringName": autorest.Encode("path", peeringName),
- "resourceGroupName": autorest.Encode("path", resourceGroupName),
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- }
-
- const APIVersion = "2018-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.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}/arpTables/{devicePath}", pathParameters),
- autorest.WithQueryParameters(queryParameters))
- return preparer.Prepare((&http.Request{}).WithContext(ctx))
-}
-
-// ListArpTableSender sends the ListArpTable request. The method will close the
-// http.Response Body if it receives an error.
-func (client ExpressRouteCrossConnectionsClient) ListArpTableSender(req *http.Request) (future ExpressRouteCrossConnectionsListArpTableFuture, err error) {
- var resp *http.Response
- resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
- if err != nil {
- return
- }
- future.Future, err = azure.NewFutureFromResponse(resp)
- return
-}
-
-// ListArpTableResponder handles the response to the ListArpTable request. The method always
-// closes the http.Response Body.
-func (client ExpressRouteCrossConnectionsClient) ListArpTableResponder(resp *http.Response) (result ExpressRouteCircuitsArpTableListResult, err error) {
- err = autorest.Respond(
- resp,
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
- autorest.ByUnmarshallingJSON(&result),
- autorest.ByClosing())
- result.Response = autorest.Response{Response: resp}
- return
-}
-
-// ListByResourceGroup retrieves all the ExpressRouteCrossConnections in a resource group.
-// Parameters:
-// resourceGroupName - the name of the resource group.
-func (client ExpressRouteCrossConnectionsClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result ExpressRouteCrossConnectionListResultPage, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionsClient.ListByResourceGroup")
- defer func() {
- sc := -1
- if result.ercclr.Response.Response != nil {
- sc = result.ercclr.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, "network.ExpressRouteCrossConnectionsClient", "ListByResourceGroup", nil, "Failure preparing request")
- return
- }
-
- resp, err := client.ListByResourceGroupSender(req)
- if err != nil {
- result.ercclr.Response = autorest.Response{Response: resp}
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsClient", "ListByResourceGroup", resp, "Failure sending request")
- return
- }
-
- result.ercclr, err = client.ListByResourceGroupResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsClient", "ListByResourceGroup", resp, "Failure responding to request")
- }
- if result.ercclr.hasNextLink() && result.ercclr.IsEmpty() {
- err = result.NextWithContext(ctx)
- }
-
- return
-}
-
-// ListByResourceGroupPreparer prepares the ListByResourceGroup request.
-func (client ExpressRouteCrossConnectionsClient) 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 = "2018-12-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.Network/expressRouteCrossConnections", 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 ExpressRouteCrossConnectionsClient) 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 ExpressRouteCrossConnectionsClient) ListByResourceGroupResponder(resp *http.Response) (result ExpressRouteCrossConnectionListResult, 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 ExpressRouteCrossConnectionsClient) listByResourceGroupNextResults(ctx context.Context, lastResults ExpressRouteCrossConnectionListResult) (result ExpressRouteCrossConnectionListResult, err error) {
- req, err := lastResults.expressRouteCrossConnectionListResultPreparer(ctx)
- if err != nil {
- return result, autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsClient", "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, "network.ExpressRouteCrossConnectionsClient", "listByResourceGroupNextResults", resp, "Failure sending next results request")
- }
- result, err = client.ListByResourceGroupResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request")
- }
- return
-}
-
-// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required.
-func (client ExpressRouteCrossConnectionsClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result ExpressRouteCrossConnectionListResultIterator, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionsClient.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
-}
-
-// ListRoutesTable gets the currently advertised routes table associated with the express route cross connection in a
-// resource group.
-// Parameters:
-// resourceGroupName - the name of the resource group.
-// crossConnectionName - the name of the ExpressRouteCrossConnection.
-// peeringName - the name of the peering.
-// devicePath - the path of the device.
-func (client ExpressRouteCrossConnectionsClient) ListRoutesTable(ctx context.Context, resourceGroupName string, crossConnectionName string, peeringName string, devicePath string) (result ExpressRouteCrossConnectionsListRoutesTableFuture, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionsClient.ListRoutesTable")
- defer func() {
- sc := -1
- if result.Response() != nil {
- sc = result.Response().StatusCode
- }
- tracing.EndSpan(ctx, sc, err)
- }()
- }
- req, err := client.ListRoutesTablePreparer(ctx, resourceGroupName, crossConnectionName, peeringName, devicePath)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsClient", "ListRoutesTable", nil, "Failure preparing request")
- return
- }
-
- result, err = client.ListRoutesTableSender(req)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsClient", "ListRoutesTable", result.Response(), "Failure sending request")
- return
- }
-
- return
-}
-
-// ListRoutesTablePreparer prepares the ListRoutesTable request.
-func (client ExpressRouteCrossConnectionsClient) ListRoutesTablePreparer(ctx context.Context, resourceGroupName string, crossConnectionName string, peeringName string, devicePath string) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "crossConnectionName": autorest.Encode("path", crossConnectionName),
- "devicePath": autorest.Encode("path", devicePath),
- "peeringName": autorest.Encode("path", peeringName),
- "resourceGroupName": autorest.Encode("path", resourceGroupName),
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- }
-
- const APIVersion = "2018-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.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}/routeTables/{devicePath}", pathParameters),
- autorest.WithQueryParameters(queryParameters))
- return preparer.Prepare((&http.Request{}).WithContext(ctx))
-}
-
-// ListRoutesTableSender sends the ListRoutesTable request. The method will close the
-// http.Response Body if it receives an error.
-func (client ExpressRouteCrossConnectionsClient) ListRoutesTableSender(req *http.Request) (future ExpressRouteCrossConnectionsListRoutesTableFuture, err error) {
- var resp *http.Response
- resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
- if err != nil {
- return
- }
- future.Future, err = azure.NewFutureFromResponse(resp)
- return
-}
-
-// ListRoutesTableResponder handles the response to the ListRoutesTable request. The method always
-// closes the http.Response Body.
-func (client ExpressRouteCrossConnectionsClient) ListRoutesTableResponder(resp *http.Response) (result ExpressRouteCircuitsRoutesTableListResult, err error) {
- err = autorest.Respond(
- resp,
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
- autorest.ByUnmarshallingJSON(&result),
- autorest.ByClosing())
- result.Response = autorest.Response{Response: resp}
- return
-}
-
-// ListRoutesTableSummary gets the route table summary associated with the express route cross connection in a resource
-// group.
-// Parameters:
-// resourceGroupName - the name of the resource group.
-// crossConnectionName - the name of the ExpressRouteCrossConnection.
-// peeringName - the name of the peering.
-// devicePath - the path of the device.
-func (client ExpressRouteCrossConnectionsClient) ListRoutesTableSummary(ctx context.Context, resourceGroupName string, crossConnectionName string, peeringName string, devicePath string) (result ExpressRouteCrossConnectionsListRoutesTableSummaryFuture, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionsClient.ListRoutesTableSummary")
- defer func() {
- sc := -1
- if result.Response() != nil {
- sc = result.Response().StatusCode
- }
- tracing.EndSpan(ctx, sc, err)
- }()
- }
- req, err := client.ListRoutesTableSummaryPreparer(ctx, resourceGroupName, crossConnectionName, peeringName, devicePath)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsClient", "ListRoutesTableSummary", nil, "Failure preparing request")
- return
- }
-
- result, err = client.ListRoutesTableSummarySender(req)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsClient", "ListRoutesTableSummary", result.Response(), "Failure sending request")
- return
- }
-
- return
-}
-
-// ListRoutesTableSummaryPreparer prepares the ListRoutesTableSummary request.
-func (client ExpressRouteCrossConnectionsClient) ListRoutesTableSummaryPreparer(ctx context.Context, resourceGroupName string, crossConnectionName string, peeringName string, devicePath string) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "crossConnectionName": autorest.Encode("path", crossConnectionName),
- "devicePath": autorest.Encode("path", devicePath),
- "peeringName": autorest.Encode("path", peeringName),
- "resourceGroupName": autorest.Encode("path", resourceGroupName),
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- }
-
- const APIVersion = "2018-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.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}/routeTablesSummary/{devicePath}", pathParameters),
- autorest.WithQueryParameters(queryParameters))
- return preparer.Prepare((&http.Request{}).WithContext(ctx))
-}
-
-// ListRoutesTableSummarySender sends the ListRoutesTableSummary request. The method will close the
-// http.Response Body if it receives an error.
-func (client ExpressRouteCrossConnectionsClient) ListRoutesTableSummarySender(req *http.Request) (future ExpressRouteCrossConnectionsListRoutesTableSummaryFuture, err error) {
- var resp *http.Response
- resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
- if err != nil {
- return
- }
- future.Future, err = azure.NewFutureFromResponse(resp)
- return
-}
-
-// ListRoutesTableSummaryResponder handles the response to the ListRoutesTableSummary request. The method always
-// closes the http.Response Body.
-func (client ExpressRouteCrossConnectionsClient) ListRoutesTableSummaryResponder(resp *http.Response) (result ExpressRouteCrossConnectionsRoutesTableSummaryListResult, err error) {
- err = autorest.Respond(
- resp,
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
- autorest.ByUnmarshallingJSON(&result),
- autorest.ByClosing())
- result.Response = autorest.Response{Response: resp}
- return
-}
-
-// UpdateTags updates an express route cross connection tags.
-// Parameters:
-// resourceGroupName - the name of the resource group.
-// crossConnectionName - the name of the cross connection.
-// crossConnectionParameters - parameters supplied to update express route cross connection tags.
-func (client ExpressRouteCrossConnectionsClient) UpdateTags(ctx context.Context, resourceGroupName string, crossConnectionName string, crossConnectionParameters TagsObject) (result ExpressRouteCrossConnectionsUpdateTagsFuture, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionsClient.UpdateTags")
- defer func() {
- sc := -1
- if result.Response() != nil {
- sc = result.Response().StatusCode
- }
- tracing.EndSpan(ctx, sc, err)
- }()
- }
- req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, crossConnectionName, crossConnectionParameters)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsClient", "UpdateTags", nil, "Failure preparing request")
- return
- }
-
- result, err = client.UpdateTagsSender(req)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsClient", "UpdateTags", result.Response(), "Failure sending request")
- return
- }
-
- return
-}
-
-// UpdateTagsPreparer prepares the UpdateTags request.
-func (client ExpressRouteCrossConnectionsClient) UpdateTagsPreparer(ctx context.Context, resourceGroupName string, crossConnectionName string, crossConnectionParameters TagsObject) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "crossConnectionName": autorest.Encode("path", crossConnectionName),
- "resourceGroupName": autorest.Encode("path", resourceGroupName),
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- }
-
- const APIVersion = "2018-12-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.Network/expressRouteCrossConnections/{crossConnectionName}", pathParameters),
- autorest.WithJSON(crossConnectionParameters),
- 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 ExpressRouteCrossConnectionsClient) UpdateTagsSender(req *http.Request) (future ExpressRouteCrossConnectionsUpdateTagsFuture, err error) {
- var resp *http.Response
- resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
- if err != nil {
- return
- }
- future.Future, err = azure.NewFutureFromResponse(resp)
- return
-}
-
-// UpdateTagsResponder handles the response to the UpdateTags request. The method always
-// closes the http.Response Body.
-func (client ExpressRouteCrossConnectionsClient) UpdateTagsResponder(resp *http.Response) (result ExpressRouteCrossConnection, 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/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/expressroutegateways.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/expressroutegateways.go
deleted file mode 100644
index a9f06365f0f..00000000000
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/expressroutegateways.go
+++ /dev/null
@@ -1,423 +0,0 @@
-package network
-
-// Copyright (c) Microsoft and contributors. All rights reserved.
-//
-// 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 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"
-)
-
-// ExpressRouteGatewaysClient is the network Client
-type ExpressRouteGatewaysClient struct {
- BaseClient
-}
-
-// NewExpressRouteGatewaysClient creates an instance of the ExpressRouteGatewaysClient client.
-func NewExpressRouteGatewaysClient(subscriptionID string) ExpressRouteGatewaysClient {
- return NewExpressRouteGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID)
-}
-
-// NewExpressRouteGatewaysClientWithBaseURI creates an instance of the ExpressRouteGatewaysClient 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 NewExpressRouteGatewaysClientWithBaseURI(baseURI string, subscriptionID string) ExpressRouteGatewaysClient {
- return ExpressRouteGatewaysClient{NewWithBaseURI(baseURI, subscriptionID)}
-}
-
-// CreateOrUpdate creates or updates a ExpressRoute gateway in a specified resource group.
-// Parameters:
-// resourceGroupName - the name of the resource group.
-// expressRouteGatewayName - the name of the ExpressRoute gateway.
-// putExpressRouteGatewayParameters - parameters required in an ExpressRoute gateway PUT operation.
-func (client ExpressRouteGatewaysClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, expressRouteGatewayName string, putExpressRouteGatewayParameters ExpressRouteGateway) (result ExpressRouteGatewaysCreateOrUpdateFuture, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteGatewaysClient.CreateOrUpdate")
- defer func() {
- sc := -1
- if result.Response() != nil {
- sc = result.Response().StatusCode
- }
- tracing.EndSpan(ctx, sc, err)
- }()
- }
- if err := validation.Validate([]validation.Validation{
- {TargetValue: putExpressRouteGatewayParameters,
- Constraints: []validation.Constraint{{Target: "putExpressRouteGatewayParameters.ExpressRouteGatewayProperties", Name: validation.Null, Rule: false,
- Chain: []validation.Constraint{{Target: "putExpressRouteGatewayParameters.ExpressRouteGatewayProperties.VirtualHub", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil {
- return result, validation.NewError("network.ExpressRouteGatewaysClient", "CreateOrUpdate", err.Error())
- }
-
- req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, expressRouteGatewayName, putExpressRouteGatewayParameters)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteGatewaysClient", "CreateOrUpdate", nil, "Failure preparing request")
- return
- }
-
- result, err = client.CreateOrUpdateSender(req)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteGatewaysClient", "CreateOrUpdate", result.Response(), "Failure sending request")
- return
- }
-
- return
-}
-
-// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
-func (client ExpressRouteGatewaysClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, expressRouteGatewayName string, putExpressRouteGatewayParameters ExpressRouteGateway) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "expressRouteGatewayName": autorest.Encode("path", expressRouteGatewayName),
- "resourceGroupName": autorest.Encode("path", resourceGroupName),
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- }
-
- const APIVersion = "2018-12-01"
- queryParameters := map[string]interface{}{
- "api-version": APIVersion,
- }
-
- putExpressRouteGatewayParameters.Etag = 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.Network/expressRouteGateways/{expressRouteGatewayName}", pathParameters),
- autorest.WithJSON(putExpressRouteGatewayParameters),
- 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 ExpressRouteGatewaysClient) CreateOrUpdateSender(req *http.Request) (future ExpressRouteGatewaysCreateOrUpdateFuture, err error) {
- var resp *http.Response
- resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
- if err != nil {
- return
- }
- future.Future, err = azure.NewFutureFromResponse(resp)
- return
-}
-
-// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
-// closes the http.Response Body.
-func (client ExpressRouteGatewaysClient) CreateOrUpdateResponder(resp *http.Response) (result ExpressRouteGateway, 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 the specified ExpressRoute gateway in a resource group. An ExpressRoute gateway resource can only be
-// deleted when there are no connection subresources.
-// Parameters:
-// resourceGroupName - the name of the resource group.
-// expressRouteGatewayName - the name of the ExpressRoute gateway.
-func (client ExpressRouteGatewaysClient) Delete(ctx context.Context, resourceGroupName string, expressRouteGatewayName string) (result ExpressRouteGatewaysDeleteFuture, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteGatewaysClient.Delete")
- defer func() {
- sc := -1
- if result.Response() != nil {
- sc = result.Response().StatusCode
- }
- tracing.EndSpan(ctx, sc, err)
- }()
- }
- req, err := client.DeletePreparer(ctx, resourceGroupName, expressRouteGatewayName)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteGatewaysClient", "Delete", nil, "Failure preparing request")
- return
- }
-
- result, err = client.DeleteSender(req)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteGatewaysClient", "Delete", result.Response(), "Failure sending request")
- return
- }
-
- return
-}
-
-// DeletePreparer prepares the Delete request.
-func (client ExpressRouteGatewaysClient) DeletePreparer(ctx context.Context, resourceGroupName string, expressRouteGatewayName string) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "expressRouteGatewayName": autorest.Encode("path", expressRouteGatewayName),
- "resourceGroupName": autorest.Encode("path", resourceGroupName),
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- }
-
- const APIVersion = "2018-12-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.Network/expressRouteGateways/{expressRouteGatewayName}", 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 ExpressRouteGatewaysClient) DeleteSender(req *http.Request) (future ExpressRouteGatewaysDeleteFuture, err error) {
- var resp *http.Response
- resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
- if err != nil {
- return
- }
- future.Future, err = azure.NewFutureFromResponse(resp)
- return
-}
-
-// DeleteResponder handles the response to the Delete request. The method always
-// closes the http.Response Body.
-func (client ExpressRouteGatewaysClient) 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 fetches the details of a ExpressRoute gateway in a resource group.
-// Parameters:
-// resourceGroupName - the name of the resource group.
-// expressRouteGatewayName - the name of the ExpressRoute gateway.
-func (client ExpressRouteGatewaysClient) Get(ctx context.Context, resourceGroupName string, expressRouteGatewayName string) (result ExpressRouteGateway, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteGatewaysClient.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, expressRouteGatewayName)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteGatewaysClient", "Get", nil, "Failure preparing request")
- return
- }
-
- resp, err := client.GetSender(req)
- if err != nil {
- result.Response = autorest.Response{Response: resp}
- err = autorest.NewErrorWithError(err, "network.ExpressRouteGatewaysClient", "Get", resp, "Failure sending request")
- return
- }
-
- result, err = client.GetResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteGatewaysClient", "Get", resp, "Failure responding to request")
- }
-
- return
-}
-
-// GetPreparer prepares the Get request.
-func (client ExpressRouteGatewaysClient) GetPreparer(ctx context.Context, resourceGroupName string, expressRouteGatewayName string) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "expressRouteGatewayName": autorest.Encode("path", expressRouteGatewayName),
- "resourceGroupName": autorest.Encode("path", resourceGroupName),
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- }
-
- const APIVersion = "2018-12-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.Network/expressRouteGateways/{expressRouteGatewayName}", 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 ExpressRouteGatewaysClient) 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 ExpressRouteGatewaysClient) GetResponder(resp *http.Response) (result ExpressRouteGateway, err error) {
- err = autorest.Respond(
- resp,
- azure.WithErrorUnlessStatusCode(http.StatusOK),
- autorest.ByUnmarshallingJSON(&result),
- autorest.ByClosing())
- result.Response = autorest.Response{Response: resp}
- return
-}
-
-// ListByResourceGroup lists ExpressRoute gateways in a given resource group.
-// Parameters:
-// resourceGroupName - the name of the resource group.
-func (client ExpressRouteGatewaysClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result ExpressRouteGatewayList, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteGatewaysClient.ListByResourceGroup")
- defer func() {
- sc := -1
- if result.Response.Response != nil {
- sc = result.Response.Response.StatusCode
- }
- tracing.EndSpan(ctx, sc, err)
- }()
- }
- req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteGatewaysClient", "ListByResourceGroup", nil, "Failure preparing request")
- return
- }
-
- resp, err := client.ListByResourceGroupSender(req)
- if err != nil {
- result.Response = autorest.Response{Response: resp}
- err = autorest.NewErrorWithError(err, "network.ExpressRouteGatewaysClient", "ListByResourceGroup", resp, "Failure sending request")
- return
- }
-
- result, err = client.ListByResourceGroupResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteGatewaysClient", "ListByResourceGroup", resp, "Failure responding to request")
- }
-
- return
-}
-
-// ListByResourceGroupPreparer prepares the ListByResourceGroup request.
-func (client ExpressRouteGatewaysClient) 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 = "2018-12-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.Network/expressRouteGateways", 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 ExpressRouteGatewaysClient) 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 ExpressRouteGatewaysClient) ListByResourceGroupResponder(resp *http.Response) (result ExpressRouteGatewayList, err error) {
- err = autorest.Respond(
- resp,
- azure.WithErrorUnlessStatusCode(http.StatusOK),
- autorest.ByUnmarshallingJSON(&result),
- autorest.ByClosing())
- result.Response = autorest.Response{Response: resp}
- return
-}
-
-// ListBySubscription lists ExpressRoute gateways under a given subscription.
-func (client ExpressRouteGatewaysClient) ListBySubscription(ctx context.Context) (result ExpressRouteGatewayList, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteGatewaysClient.ListBySubscription")
- defer func() {
- sc := -1
- if result.Response.Response != nil {
- sc = result.Response.Response.StatusCode
- }
- tracing.EndSpan(ctx, sc, err)
- }()
- }
- req, err := client.ListBySubscriptionPreparer(ctx)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteGatewaysClient", "ListBySubscription", nil, "Failure preparing request")
- return
- }
-
- resp, err := client.ListBySubscriptionSender(req)
- if err != nil {
- result.Response = autorest.Response{Response: resp}
- err = autorest.NewErrorWithError(err, "network.ExpressRouteGatewaysClient", "ListBySubscription", resp, "Failure sending request")
- return
- }
-
- result, err = client.ListBySubscriptionResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteGatewaysClient", "ListBySubscription", resp, "Failure responding to request")
- }
-
- return
-}
-
-// ListBySubscriptionPreparer prepares the ListBySubscription request.
-func (client ExpressRouteGatewaysClient) ListBySubscriptionPreparer(ctx context.Context) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- }
-
- const APIVersion = "2018-12-01"
- queryParameters := map[string]interface{}{
- "api-version": APIVersion,
- }
-
- preparer := autorest.CreatePreparer(
- autorest.AsGet(),
- autorest.WithBaseURL(client.BaseURI),
- autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/expressRouteGateways", 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 ExpressRouteGatewaysClient) 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 ExpressRouteGatewaysClient) ListBySubscriptionResponder(resp *http.Response) (result ExpressRouteGatewayList, 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/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/expressroutelinks.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/expressroutelinks.go
deleted file mode 100644
index 03f4ea3492b..00000000000
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/expressroutelinks.go
+++ /dev/null
@@ -1,236 +0,0 @@
-package network
-
-// Copyright (c) Microsoft and contributors. All rights reserved.
-//
-// 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 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"
-)
-
-// ExpressRouteLinksClient is the network Client
-type ExpressRouteLinksClient struct {
- BaseClient
-}
-
-// NewExpressRouteLinksClient creates an instance of the ExpressRouteLinksClient client.
-func NewExpressRouteLinksClient(subscriptionID string) ExpressRouteLinksClient {
- return NewExpressRouteLinksClientWithBaseURI(DefaultBaseURI, subscriptionID)
-}
-
-// NewExpressRouteLinksClientWithBaseURI creates an instance of the ExpressRouteLinksClient 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 NewExpressRouteLinksClientWithBaseURI(baseURI string, subscriptionID string) ExpressRouteLinksClient {
- return ExpressRouteLinksClient{NewWithBaseURI(baseURI, subscriptionID)}
-}
-
-// Get retrieves the specified ExpressRouteLink resource.
-// Parameters:
-// resourceGroupName - the name of the resource group.
-// expressRoutePortName - the name of the ExpressRoutePort resource.
-// linkName - the name of the ExpressRouteLink resource.
-func (client ExpressRouteLinksClient) Get(ctx context.Context, resourceGroupName string, expressRoutePortName string, linkName string) (result ExpressRouteLink, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteLinksClient.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, expressRoutePortName, linkName)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteLinksClient", "Get", nil, "Failure preparing request")
- return
- }
-
- resp, err := client.GetSender(req)
- if err != nil {
- result.Response = autorest.Response{Response: resp}
- err = autorest.NewErrorWithError(err, "network.ExpressRouteLinksClient", "Get", resp, "Failure sending request")
- return
- }
-
- result, err = client.GetResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteLinksClient", "Get", resp, "Failure responding to request")
- }
-
- return
-}
-
-// GetPreparer prepares the Get request.
-func (client ExpressRouteLinksClient) GetPreparer(ctx context.Context, resourceGroupName string, expressRoutePortName string, linkName string) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "expressRoutePortName": autorest.Encode("path", expressRoutePortName),
- "linkName": autorest.Encode("path", linkName),
- "resourceGroupName": autorest.Encode("path", resourceGroupName),
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- }
-
- const APIVersion = "2018-12-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.Network/ExpressRoutePorts/{expressRoutePortName}/links/{linkName}", 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 ExpressRouteLinksClient) 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 ExpressRouteLinksClient) GetResponder(resp *http.Response) (result ExpressRouteLink, err error) {
- err = autorest.Respond(
- resp,
- azure.WithErrorUnlessStatusCode(http.StatusOK),
- autorest.ByUnmarshallingJSON(&result),
- autorest.ByClosing())
- result.Response = autorest.Response{Response: resp}
- return
-}
-
-// List retrieve the ExpressRouteLink sub-resources of the specified ExpressRoutePort resource.
-// Parameters:
-// resourceGroupName - the name of the resource group.
-// expressRoutePortName - the name of the ExpressRoutePort resource.
-func (client ExpressRouteLinksClient) List(ctx context.Context, resourceGroupName string, expressRoutePortName string) (result ExpressRouteLinkListResultPage, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteLinksClient.List")
- defer func() {
- sc := -1
- if result.erllr.Response.Response != nil {
- sc = result.erllr.Response.Response.StatusCode
- }
- tracing.EndSpan(ctx, sc, err)
- }()
- }
- result.fn = client.listNextResults
- req, err := client.ListPreparer(ctx, resourceGroupName, expressRoutePortName)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteLinksClient", "List", nil, "Failure preparing request")
- return
- }
-
- resp, err := client.ListSender(req)
- if err != nil {
- result.erllr.Response = autorest.Response{Response: resp}
- err = autorest.NewErrorWithError(err, "network.ExpressRouteLinksClient", "List", resp, "Failure sending request")
- return
- }
-
- result.erllr, err = client.ListResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteLinksClient", "List", resp, "Failure responding to request")
- }
- if result.erllr.hasNextLink() && result.erllr.IsEmpty() {
- err = result.NextWithContext(ctx)
- }
-
- return
-}
-
-// ListPreparer prepares the List request.
-func (client ExpressRouteLinksClient) ListPreparer(ctx context.Context, resourceGroupName string, expressRoutePortName string) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "expressRoutePortName": autorest.Encode("path", expressRoutePortName),
- "resourceGroupName": autorest.Encode("path", resourceGroupName),
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- }
-
- const APIVersion = "2018-12-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.Network/ExpressRoutePorts/{expressRoutePortName}/links", 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 ExpressRouteLinksClient) 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 ExpressRouteLinksClient) ListResponder(resp *http.Response) (result ExpressRouteLinkListResult, 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 ExpressRouteLinksClient) listNextResults(ctx context.Context, lastResults ExpressRouteLinkListResult) (result ExpressRouteLinkListResult, err error) {
- req, err := lastResults.expressRouteLinkListResultPreparer(ctx)
- if err != nil {
- return result, autorest.NewErrorWithError(err, "network.ExpressRouteLinksClient", "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, "network.ExpressRouteLinksClient", "listNextResults", resp, "Failure sending next results request")
- }
- result, err = client.ListResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteLinksClient", "listNextResults", resp, "Failure responding to next results request")
- }
- return
-}
-
-// ListComplete enumerates all values, automatically crossing page boundaries as required.
-func (client ExpressRouteLinksClient) ListComplete(ctx context.Context, resourceGroupName string, expressRoutePortName string) (result ExpressRouteLinkListResultIterator, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteLinksClient.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, expressRoutePortName)
- return
-}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/expressrouteports.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/expressrouteports.go
deleted file mode 100644
index b1b0c396615..00000000000
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/expressrouteports.go
+++ /dev/null
@@ -1,574 +0,0 @@
-package network
-
-// Copyright (c) Microsoft and contributors. All rights reserved.
-//
-// 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 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"
-)
-
-// ExpressRoutePortsClient is the network Client
-type ExpressRoutePortsClient struct {
- BaseClient
-}
-
-// NewExpressRoutePortsClient creates an instance of the ExpressRoutePortsClient client.
-func NewExpressRoutePortsClient(subscriptionID string) ExpressRoutePortsClient {
- return NewExpressRoutePortsClientWithBaseURI(DefaultBaseURI, subscriptionID)
-}
-
-// NewExpressRoutePortsClientWithBaseURI creates an instance of the ExpressRoutePortsClient 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 NewExpressRoutePortsClientWithBaseURI(baseURI string, subscriptionID string) ExpressRoutePortsClient {
- return ExpressRoutePortsClient{NewWithBaseURI(baseURI, subscriptionID)}
-}
-
-// CreateOrUpdate creates or updates the specified ExpressRoutePort resource.
-// Parameters:
-// resourceGroupName - the name of the resource group.
-// expressRoutePortName - the name of the ExpressRoutePort resource.
-// parameters - parameters supplied to the create ExpressRoutePort operation.
-func (client ExpressRoutePortsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, expressRoutePortName string, parameters ExpressRoutePort) (result ExpressRoutePortsCreateOrUpdateFuture, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortsClient.CreateOrUpdate")
- defer func() {
- sc := -1
- if result.Response() != nil {
- sc = result.Response().StatusCode
- }
- tracing.EndSpan(ctx, sc, err)
- }()
- }
- req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, expressRoutePortName, parameters)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsClient", "CreateOrUpdate", nil, "Failure preparing request")
- return
- }
-
- result, err = client.CreateOrUpdateSender(req)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
- return
- }
-
- return
-}
-
-// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
-func (client ExpressRoutePortsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, expressRoutePortName string, parameters ExpressRoutePort) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "expressRoutePortName": autorest.Encode("path", expressRoutePortName),
- "resourceGroupName": autorest.Encode("path", resourceGroupName),
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- }
-
- const APIVersion = "2018-12-01"
- queryParameters := map[string]interface{}{
- "api-version": APIVersion,
- }
-
- parameters.Etag = 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.Network/ExpressRoutePorts/{expressRoutePortName}", 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 ExpressRoutePortsClient) CreateOrUpdateSender(req *http.Request) (future ExpressRoutePortsCreateOrUpdateFuture, err error) {
- var resp *http.Response
- resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
- if err != nil {
- return
- }
- future.Future, err = azure.NewFutureFromResponse(resp)
- return
-}
-
-// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
-// closes the http.Response Body.
-func (client ExpressRoutePortsClient) CreateOrUpdateResponder(resp *http.Response) (result ExpressRoutePort, 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 the specified ExpressRoutePort resource.
-// Parameters:
-// resourceGroupName - the name of the resource group.
-// expressRoutePortName - the name of the ExpressRoutePort resource.
-func (client ExpressRoutePortsClient) Delete(ctx context.Context, resourceGroupName string, expressRoutePortName string) (result ExpressRoutePortsDeleteFuture, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortsClient.Delete")
- defer func() {
- sc := -1
- if result.Response() != nil {
- sc = result.Response().StatusCode
- }
- tracing.EndSpan(ctx, sc, err)
- }()
- }
- req, err := client.DeletePreparer(ctx, resourceGroupName, expressRoutePortName)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsClient", "Delete", nil, "Failure preparing request")
- return
- }
-
- result, err = client.DeleteSender(req)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsClient", "Delete", result.Response(), "Failure sending request")
- return
- }
-
- return
-}
-
-// DeletePreparer prepares the Delete request.
-func (client ExpressRoutePortsClient) DeletePreparer(ctx context.Context, resourceGroupName string, expressRoutePortName string) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "expressRoutePortName": autorest.Encode("path", expressRoutePortName),
- "resourceGroupName": autorest.Encode("path", resourceGroupName),
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- }
-
- const APIVersion = "2018-12-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.Network/ExpressRoutePorts/{expressRoutePortName}", 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 ExpressRoutePortsClient) DeleteSender(req *http.Request) (future ExpressRoutePortsDeleteFuture, err error) {
- var resp *http.Response
- resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
- if err != nil {
- return
- }
- future.Future, err = azure.NewFutureFromResponse(resp)
- return
-}
-
-// DeleteResponder handles the response to the Delete request. The method always
-// closes the http.Response Body.
-func (client ExpressRoutePortsClient) 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 the requested ExpressRoutePort resource.
-// Parameters:
-// resourceGroupName - the name of the resource group.
-// expressRoutePortName - the name of ExpressRoutePort.
-func (client ExpressRoutePortsClient) Get(ctx context.Context, resourceGroupName string, expressRoutePortName string) (result ExpressRoutePort, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortsClient.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, expressRoutePortName)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsClient", "Get", nil, "Failure preparing request")
- return
- }
-
- resp, err := client.GetSender(req)
- if err != nil {
- result.Response = autorest.Response{Response: resp}
- err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsClient", "Get", resp, "Failure sending request")
- return
- }
-
- result, err = client.GetResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsClient", "Get", resp, "Failure responding to request")
- }
-
- return
-}
-
-// GetPreparer prepares the Get request.
-func (client ExpressRoutePortsClient) GetPreparer(ctx context.Context, resourceGroupName string, expressRoutePortName string) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "expressRoutePortName": autorest.Encode("path", expressRoutePortName),
- "resourceGroupName": autorest.Encode("path", resourceGroupName),
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- }
-
- const APIVersion = "2018-12-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.Network/ExpressRoutePorts/{expressRoutePortName}", 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 ExpressRoutePortsClient) 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 ExpressRoutePortsClient) GetResponder(resp *http.Response) (result ExpressRoutePort, err error) {
- err = autorest.Respond(
- resp,
- azure.WithErrorUnlessStatusCode(http.StatusOK),
- autorest.ByUnmarshallingJSON(&result),
- autorest.ByClosing())
- result.Response = autorest.Response{Response: resp}
- return
-}
-
-// List list all the ExpressRoutePort resources in the specified subscription
-func (client ExpressRoutePortsClient) List(ctx context.Context) (result ExpressRoutePortListResultPage, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortsClient.List")
- defer func() {
- sc := -1
- if result.erplr.Response.Response != nil {
- sc = result.erplr.Response.Response.StatusCode
- }
- tracing.EndSpan(ctx, sc, err)
- }()
- }
- result.fn = client.listNextResults
- req, err := client.ListPreparer(ctx)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsClient", "List", nil, "Failure preparing request")
- return
- }
-
- resp, err := client.ListSender(req)
- if err != nil {
- result.erplr.Response = autorest.Response{Response: resp}
- err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsClient", "List", resp, "Failure sending request")
- return
- }
-
- result.erplr, err = client.ListResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsClient", "List", resp, "Failure responding to request")
- }
- if result.erplr.hasNextLink() && result.erplr.IsEmpty() {
- err = result.NextWithContext(ctx)
- }
-
- return
-}
-
-// ListPreparer prepares the List request.
-func (client ExpressRoutePortsClient) ListPreparer(ctx context.Context) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- }
-
- const APIVersion = "2018-12-01"
- queryParameters := map[string]interface{}{
- "api-version": APIVersion,
- }
-
- preparer := autorest.CreatePreparer(
- autorest.AsGet(),
- autorest.WithBaseURL(client.BaseURI),
- autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/ExpressRoutePorts", 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 ExpressRoutePortsClient) 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 ExpressRoutePortsClient) ListResponder(resp *http.Response) (result ExpressRoutePortListResult, 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 ExpressRoutePortsClient) listNextResults(ctx context.Context, lastResults ExpressRoutePortListResult) (result ExpressRoutePortListResult, err error) {
- req, err := lastResults.expressRoutePortListResultPreparer(ctx)
- if err != nil {
- return result, autorest.NewErrorWithError(err, "network.ExpressRoutePortsClient", "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, "network.ExpressRoutePortsClient", "listNextResults", resp, "Failure sending next results request")
- }
- result, err = client.ListResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsClient", "listNextResults", resp, "Failure responding to next results request")
- }
- return
-}
-
-// ListComplete enumerates all values, automatically crossing page boundaries as required.
-func (client ExpressRoutePortsClient) ListComplete(ctx context.Context) (result ExpressRoutePortListResultIterator, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortsClient.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 all the ExpressRoutePort resources in the specified resource group.
-// Parameters:
-// resourceGroupName - the name of the resource group.
-func (client ExpressRoutePortsClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result ExpressRoutePortListResultPage, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortsClient.ListByResourceGroup")
- defer func() {
- sc := -1
- if result.erplr.Response.Response != nil {
- sc = result.erplr.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, "network.ExpressRoutePortsClient", "ListByResourceGroup", nil, "Failure preparing request")
- return
- }
-
- resp, err := client.ListByResourceGroupSender(req)
- if err != nil {
- result.erplr.Response = autorest.Response{Response: resp}
- err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsClient", "ListByResourceGroup", resp, "Failure sending request")
- return
- }
-
- result.erplr, err = client.ListByResourceGroupResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsClient", "ListByResourceGroup", resp, "Failure responding to request")
- }
- if result.erplr.hasNextLink() && result.erplr.IsEmpty() {
- err = result.NextWithContext(ctx)
- }
-
- return
-}
-
-// ListByResourceGroupPreparer prepares the ListByResourceGroup request.
-func (client ExpressRoutePortsClient) 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 = "2018-12-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.Network/ExpressRoutePorts", 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 ExpressRoutePortsClient) 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 ExpressRoutePortsClient) ListByResourceGroupResponder(resp *http.Response) (result ExpressRoutePortListResult, 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 ExpressRoutePortsClient) listByResourceGroupNextResults(ctx context.Context, lastResults ExpressRoutePortListResult) (result ExpressRoutePortListResult, err error) {
- req, err := lastResults.expressRoutePortListResultPreparer(ctx)
- if err != nil {
- return result, autorest.NewErrorWithError(err, "network.ExpressRoutePortsClient", "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, "network.ExpressRoutePortsClient", "listByResourceGroupNextResults", resp, "Failure sending next results request")
- }
- result, err = client.ListByResourceGroupResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request")
- }
- return
-}
-
-// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required.
-func (client ExpressRoutePortsClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result ExpressRoutePortListResultIterator, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortsClient.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 update ExpressRoutePort tags
-// Parameters:
-// resourceGroupName - the name of the resource group.
-// expressRoutePortName - the name of the ExpressRoutePort resource.
-// parameters - parameters supplied to update ExpressRoutePort resource tags.
-func (client ExpressRoutePortsClient) UpdateTags(ctx context.Context, resourceGroupName string, expressRoutePortName string, parameters TagsObject) (result ExpressRoutePortsUpdateTagsFuture, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortsClient.UpdateTags")
- defer func() {
- sc := -1
- if result.Response() != nil {
- sc = result.Response().StatusCode
- }
- tracing.EndSpan(ctx, sc, err)
- }()
- }
- req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, expressRoutePortName, parameters)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsClient", "UpdateTags", nil, "Failure preparing request")
- return
- }
-
- result, err = client.UpdateTagsSender(req)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsClient", "UpdateTags", result.Response(), "Failure sending request")
- return
- }
-
- return
-}
-
-// UpdateTagsPreparer prepares the UpdateTags request.
-func (client ExpressRoutePortsClient) UpdateTagsPreparer(ctx context.Context, resourceGroupName string, expressRoutePortName string, parameters TagsObject) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "expressRoutePortName": autorest.Encode("path", expressRoutePortName),
- "resourceGroupName": autorest.Encode("path", resourceGroupName),
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- }
-
- const APIVersion = "2018-12-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.Network/ExpressRoutePorts/{expressRoutePortName}", 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 ExpressRoutePortsClient) UpdateTagsSender(req *http.Request) (future ExpressRoutePortsUpdateTagsFuture, err error) {
- var resp *http.Response
- resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
- if err != nil {
- return
- }
- future.Future, err = azure.NewFutureFromResponse(resp)
- return
-}
-
-// UpdateTagsResponder handles the response to the UpdateTags request. The method always
-// closes the http.Response Body.
-func (client ExpressRoutePortsClient) UpdateTagsResponder(resp *http.Response) (result ExpressRoutePort, 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/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/expressrouteportslocations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/expressrouteportslocations.go
deleted file mode 100644
index 4e7d07d85fb..00000000000
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/expressrouteportslocations.go
+++ /dev/null
@@ -1,229 +0,0 @@
-package network
-
-// Copyright (c) Microsoft and contributors. All rights reserved.
-//
-// 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 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"
-)
-
-// ExpressRoutePortsLocationsClient is the network Client
-type ExpressRoutePortsLocationsClient struct {
- BaseClient
-}
-
-// NewExpressRoutePortsLocationsClient creates an instance of the ExpressRoutePortsLocationsClient client.
-func NewExpressRoutePortsLocationsClient(subscriptionID string) ExpressRoutePortsLocationsClient {
- return NewExpressRoutePortsLocationsClientWithBaseURI(DefaultBaseURI, subscriptionID)
-}
-
-// NewExpressRoutePortsLocationsClientWithBaseURI creates an instance of the ExpressRoutePortsLocationsClient 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 NewExpressRoutePortsLocationsClientWithBaseURI(baseURI string, subscriptionID string) ExpressRoutePortsLocationsClient {
- return ExpressRoutePortsLocationsClient{NewWithBaseURI(baseURI, subscriptionID)}
-}
-
-// Get retrieves a single ExpressRoutePort peering location, including the list of available bandwidths available at
-// said peering location.
-// Parameters:
-// locationName - name of the requested ExpressRoutePort peering location.
-func (client ExpressRoutePortsLocationsClient) Get(ctx context.Context, locationName string) (result ExpressRoutePortsLocation, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortsLocationsClient.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, locationName)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsLocationsClient", "Get", nil, "Failure preparing request")
- return
- }
-
- resp, err := client.GetSender(req)
- if err != nil {
- result.Response = autorest.Response{Response: resp}
- err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsLocationsClient", "Get", resp, "Failure sending request")
- return
- }
-
- result, err = client.GetResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsLocationsClient", "Get", resp, "Failure responding to request")
- }
-
- return
-}
-
-// GetPreparer prepares the Get request.
-func (client ExpressRoutePortsLocationsClient) GetPreparer(ctx context.Context, locationName string) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "locationName": autorest.Encode("path", locationName),
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- }
-
- const APIVersion = "2018-12-01"
- queryParameters := map[string]interface{}{
- "api-version": APIVersion,
- }
-
- preparer := autorest.CreatePreparer(
- autorest.AsGet(),
- autorest.WithBaseURL(client.BaseURI),
- autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/ExpressRoutePortsLocations/{locationName}", 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 ExpressRoutePortsLocationsClient) 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 ExpressRoutePortsLocationsClient) GetResponder(resp *http.Response) (result ExpressRoutePortsLocation, err error) {
- err = autorest.Respond(
- resp,
- azure.WithErrorUnlessStatusCode(http.StatusOK),
- autorest.ByUnmarshallingJSON(&result),
- autorest.ByClosing())
- result.Response = autorest.Response{Response: resp}
- return
-}
-
-// List retrieves all ExpressRoutePort peering locations. Does not return available bandwidths for each location.
-// Available bandwidths can only be obtained when retrieving a specific peering location.
-func (client ExpressRoutePortsLocationsClient) List(ctx context.Context) (result ExpressRoutePortsLocationListResultPage, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortsLocationsClient.List")
- defer func() {
- sc := -1
- if result.erpllr.Response.Response != nil {
- sc = result.erpllr.Response.Response.StatusCode
- }
- tracing.EndSpan(ctx, sc, err)
- }()
- }
- result.fn = client.listNextResults
- req, err := client.ListPreparer(ctx)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsLocationsClient", "List", nil, "Failure preparing request")
- return
- }
-
- resp, err := client.ListSender(req)
- if err != nil {
- result.erpllr.Response = autorest.Response{Response: resp}
- err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsLocationsClient", "List", resp, "Failure sending request")
- return
- }
-
- result.erpllr, err = client.ListResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsLocationsClient", "List", resp, "Failure responding to request")
- }
- if result.erpllr.hasNextLink() && result.erpllr.IsEmpty() {
- err = result.NextWithContext(ctx)
- }
-
- return
-}
-
-// ListPreparer prepares the List request.
-func (client ExpressRoutePortsLocationsClient) ListPreparer(ctx context.Context) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- }
-
- const APIVersion = "2018-12-01"
- queryParameters := map[string]interface{}{
- "api-version": APIVersion,
- }
-
- preparer := autorest.CreatePreparer(
- autorest.AsGet(),
- autorest.WithBaseURL(client.BaseURI),
- autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/ExpressRoutePortsLocations", 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 ExpressRoutePortsLocationsClient) 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 ExpressRoutePortsLocationsClient) ListResponder(resp *http.Response) (result ExpressRoutePortsLocationListResult, 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 ExpressRoutePortsLocationsClient) listNextResults(ctx context.Context, lastResults ExpressRoutePortsLocationListResult) (result ExpressRoutePortsLocationListResult, err error) {
- req, err := lastResults.expressRoutePortsLocationListResultPreparer(ctx)
- if err != nil {
- return result, autorest.NewErrorWithError(err, "network.ExpressRoutePortsLocationsClient", "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, "network.ExpressRoutePortsLocationsClient", "listNextResults", resp, "Failure sending next results request")
- }
- result, err = client.ListResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsLocationsClient", "listNextResults", resp, "Failure responding to next results request")
- }
- return
-}
-
-// ListComplete enumerates all values, automatically crossing page boundaries as required.
-func (client ExpressRoutePortsLocationsClient) ListComplete(ctx context.Context) (result ExpressRoutePortsLocationListResultIterator, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortsLocationsClient.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
-}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/hubvirtualnetworkconnections.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/hubvirtualnetworkconnections.go
deleted file mode 100644
index 57e30951f83..00000000000
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/hubvirtualnetworkconnections.go
+++ /dev/null
@@ -1,236 +0,0 @@
-package network
-
-// Copyright (c) Microsoft and contributors. All rights reserved.
-//
-// 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 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"
-)
-
-// HubVirtualNetworkConnectionsClient is the network Client
-type HubVirtualNetworkConnectionsClient struct {
- BaseClient
-}
-
-// NewHubVirtualNetworkConnectionsClient creates an instance of the HubVirtualNetworkConnectionsClient client.
-func NewHubVirtualNetworkConnectionsClient(subscriptionID string) HubVirtualNetworkConnectionsClient {
- return NewHubVirtualNetworkConnectionsClientWithBaseURI(DefaultBaseURI, subscriptionID)
-}
-
-// NewHubVirtualNetworkConnectionsClientWithBaseURI creates an instance of the HubVirtualNetworkConnectionsClient
-// 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 NewHubVirtualNetworkConnectionsClientWithBaseURI(baseURI string, subscriptionID string) HubVirtualNetworkConnectionsClient {
- return HubVirtualNetworkConnectionsClient{NewWithBaseURI(baseURI, subscriptionID)}
-}
-
-// Get retrieves the details of a HubVirtualNetworkConnection.
-// Parameters:
-// resourceGroupName - the resource group name of the VirtualHub.
-// virtualHubName - the name of the VirtualHub.
-// connectionName - the name of the vpn connection.
-func (client HubVirtualNetworkConnectionsClient) Get(ctx context.Context, resourceGroupName string, virtualHubName string, connectionName string) (result HubVirtualNetworkConnection, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/HubVirtualNetworkConnectionsClient.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, virtualHubName, connectionName)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.HubVirtualNetworkConnectionsClient", "Get", nil, "Failure preparing request")
- return
- }
-
- resp, err := client.GetSender(req)
- if err != nil {
- result.Response = autorest.Response{Response: resp}
- err = autorest.NewErrorWithError(err, "network.HubVirtualNetworkConnectionsClient", "Get", resp, "Failure sending request")
- return
- }
-
- result, err = client.GetResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.HubVirtualNetworkConnectionsClient", "Get", resp, "Failure responding to request")
- }
-
- return
-}
-
-// GetPreparer prepares the Get request.
-func (client HubVirtualNetworkConnectionsClient) GetPreparer(ctx context.Context, resourceGroupName string, virtualHubName string, connectionName string) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "connectionName": autorest.Encode("path", connectionName),
- "resourceGroupName": autorest.Encode("path", resourceGroupName),
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- "virtualHubName": autorest.Encode("path", virtualHubName),
- }
-
- const APIVersion = "2018-12-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.Network/virtualHubs/{virtualHubName}/hubVirtualNetworkConnections/{connectionName}", 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 HubVirtualNetworkConnectionsClient) 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 HubVirtualNetworkConnectionsClient) GetResponder(resp *http.Response) (result HubVirtualNetworkConnection, err error) {
- err = autorest.Respond(
- resp,
- azure.WithErrorUnlessStatusCode(http.StatusOK),
- autorest.ByUnmarshallingJSON(&result),
- autorest.ByClosing())
- result.Response = autorest.Response{Response: resp}
- return
-}
-
-// List retrieves the details of all HubVirtualNetworkConnections.
-// Parameters:
-// resourceGroupName - the resource group name of the VirtualHub.
-// virtualHubName - the name of the VirtualHub.
-func (client HubVirtualNetworkConnectionsClient) List(ctx context.Context, resourceGroupName string, virtualHubName string) (result ListHubVirtualNetworkConnectionsResultPage, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/HubVirtualNetworkConnectionsClient.List")
- defer func() {
- sc := -1
- if result.lhvncr.Response.Response != nil {
- sc = result.lhvncr.Response.Response.StatusCode
- }
- tracing.EndSpan(ctx, sc, err)
- }()
- }
- result.fn = client.listNextResults
- req, err := client.ListPreparer(ctx, resourceGroupName, virtualHubName)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.HubVirtualNetworkConnectionsClient", "List", nil, "Failure preparing request")
- return
- }
-
- resp, err := client.ListSender(req)
- if err != nil {
- result.lhvncr.Response = autorest.Response{Response: resp}
- err = autorest.NewErrorWithError(err, "network.HubVirtualNetworkConnectionsClient", "List", resp, "Failure sending request")
- return
- }
-
- result.lhvncr, err = client.ListResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.HubVirtualNetworkConnectionsClient", "List", resp, "Failure responding to request")
- }
- if result.lhvncr.hasNextLink() && result.lhvncr.IsEmpty() {
- err = result.NextWithContext(ctx)
- }
-
- return
-}
-
-// ListPreparer prepares the List request.
-func (client HubVirtualNetworkConnectionsClient) ListPreparer(ctx context.Context, resourceGroupName string, virtualHubName string) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "resourceGroupName": autorest.Encode("path", resourceGroupName),
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- "virtualHubName": autorest.Encode("path", virtualHubName),
- }
-
- const APIVersion = "2018-12-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.Network/virtualHubs/{virtualHubName}/hubVirtualNetworkConnections", 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 HubVirtualNetworkConnectionsClient) 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 HubVirtualNetworkConnectionsClient) ListResponder(resp *http.Response) (result ListHubVirtualNetworkConnectionsResult, 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 HubVirtualNetworkConnectionsClient) listNextResults(ctx context.Context, lastResults ListHubVirtualNetworkConnectionsResult) (result ListHubVirtualNetworkConnectionsResult, err error) {
- req, err := lastResults.listHubVirtualNetworkConnectionsResultPreparer(ctx)
- if err != nil {
- return result, autorest.NewErrorWithError(err, "network.HubVirtualNetworkConnectionsClient", "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, "network.HubVirtualNetworkConnectionsClient", "listNextResults", resp, "Failure sending next results request")
- }
- result, err = client.ListResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.HubVirtualNetworkConnectionsClient", "listNextResults", resp, "Failure responding to next results request")
- }
- return
-}
-
-// ListComplete enumerates all values, automatically crossing page boundaries as required.
-func (client HubVirtualNetworkConnectionsClient) ListComplete(ctx context.Context, resourceGroupName string, virtualHubName string) (result ListHubVirtualNetworkConnectionsResultIterator, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/HubVirtualNetworkConnectionsClient.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, virtualHubName)
- return
-}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/interfaceendpoints.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/interfaceendpoints.go
deleted file mode 100644
index 76a813b0e12..00000000000
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/interfaceendpoints.go
+++ /dev/null
@@ -1,499 +0,0 @@
-package network
-
-// Copyright (c) Microsoft and contributors. All rights reserved.
-//
-// 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 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"
-)
-
-// InterfaceEndpointsClient is the network Client
-type InterfaceEndpointsClient struct {
- BaseClient
-}
-
-// NewInterfaceEndpointsClient creates an instance of the InterfaceEndpointsClient client.
-func NewInterfaceEndpointsClient(subscriptionID string) InterfaceEndpointsClient {
- return NewInterfaceEndpointsClientWithBaseURI(DefaultBaseURI, subscriptionID)
-}
-
-// NewInterfaceEndpointsClientWithBaseURI creates an instance of the InterfaceEndpointsClient 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 NewInterfaceEndpointsClientWithBaseURI(baseURI string, subscriptionID string) InterfaceEndpointsClient {
- return InterfaceEndpointsClient{NewWithBaseURI(baseURI, subscriptionID)}
-}
-
-// CreateOrUpdate creates or updates an interface endpoint in the specified resource group.
-// Parameters:
-// resourceGroupName - the name of the resource group.
-// interfaceEndpointName - the name of the interface endpoint.
-// parameters - parameters supplied to the create or update interface endpoint operation
-func (client InterfaceEndpointsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, interfaceEndpointName string, parameters InterfaceEndpoint) (result InterfaceEndpointsCreateOrUpdateFuture, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceEndpointsClient.CreateOrUpdate")
- defer func() {
- sc := -1
- if result.Response() != nil {
- sc = result.Response().StatusCode
- }
- tracing.EndSpan(ctx, sc, err)
- }()
- }
- req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, interfaceEndpointName, parameters)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfaceEndpointsClient", "CreateOrUpdate", nil, "Failure preparing request")
- return
- }
-
- result, err = client.CreateOrUpdateSender(req)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfaceEndpointsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
- return
- }
-
- return
-}
-
-// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
-func (client InterfaceEndpointsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, interfaceEndpointName string, parameters InterfaceEndpoint) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "interfaceEndpointName": autorest.Encode("path", interfaceEndpointName),
- "resourceGroupName": autorest.Encode("path", resourceGroupName),
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- }
-
- const APIVersion = "2018-12-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.Network/interfaceEndpoints/{interfaceEndpointName}", 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 InterfaceEndpointsClient) CreateOrUpdateSender(req *http.Request) (future InterfaceEndpointsCreateOrUpdateFuture, err error) {
- var resp *http.Response
- resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
- if err != nil {
- return
- }
- future.Future, err = azure.NewFutureFromResponse(resp)
- return
-}
-
-// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
-// closes the http.Response Body.
-func (client InterfaceEndpointsClient) CreateOrUpdateResponder(resp *http.Response) (result InterfaceEndpoint, 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 the specified interface endpoint.
-// Parameters:
-// resourceGroupName - the name of the resource group.
-// interfaceEndpointName - the name of the interface endpoint.
-func (client InterfaceEndpointsClient) Delete(ctx context.Context, resourceGroupName string, interfaceEndpointName string) (result InterfaceEndpointsDeleteFuture, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceEndpointsClient.Delete")
- defer func() {
- sc := -1
- if result.Response() != nil {
- sc = result.Response().StatusCode
- }
- tracing.EndSpan(ctx, sc, err)
- }()
- }
- req, err := client.DeletePreparer(ctx, resourceGroupName, interfaceEndpointName)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfaceEndpointsClient", "Delete", nil, "Failure preparing request")
- return
- }
-
- result, err = client.DeleteSender(req)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfaceEndpointsClient", "Delete", result.Response(), "Failure sending request")
- return
- }
-
- return
-}
-
-// DeletePreparer prepares the Delete request.
-func (client InterfaceEndpointsClient) DeletePreparer(ctx context.Context, resourceGroupName string, interfaceEndpointName string) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "interfaceEndpointName": autorest.Encode("path", interfaceEndpointName),
- "resourceGroupName": autorest.Encode("path", resourceGroupName),
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- }
-
- const APIVersion = "2018-12-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.Network/interfaceEndpoints/{interfaceEndpointName}", 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 InterfaceEndpointsClient) DeleteSender(req *http.Request) (future InterfaceEndpointsDeleteFuture, err error) {
- var resp *http.Response
- resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
- if err != nil {
- return
- }
- future.Future, err = azure.NewFutureFromResponse(resp)
- return
-}
-
-// DeleteResponder handles the response to the Delete request. The method always
-// closes the http.Response Body.
-func (client InterfaceEndpointsClient) 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 the specified interface endpoint by resource group.
-// Parameters:
-// resourceGroupName - the name of the resource group.
-// interfaceEndpointName - the name of the interface endpoint.
-// expand - expands referenced resources.
-func (client InterfaceEndpointsClient) Get(ctx context.Context, resourceGroupName string, interfaceEndpointName string, expand string) (result InterfaceEndpoint, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceEndpointsClient.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, interfaceEndpointName, expand)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfaceEndpointsClient", "Get", nil, "Failure preparing request")
- return
- }
-
- resp, err := client.GetSender(req)
- if err != nil {
- result.Response = autorest.Response{Response: resp}
- err = autorest.NewErrorWithError(err, "network.InterfaceEndpointsClient", "Get", resp, "Failure sending request")
- return
- }
-
- result, err = client.GetResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfaceEndpointsClient", "Get", resp, "Failure responding to request")
- }
-
- return
-}
-
-// GetPreparer prepares the Get request.
-func (client InterfaceEndpointsClient) GetPreparer(ctx context.Context, resourceGroupName string, interfaceEndpointName string, expand string) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "interfaceEndpointName": autorest.Encode("path", interfaceEndpointName),
- "resourceGroupName": autorest.Encode("path", resourceGroupName),
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- }
-
- const APIVersion = "2018-12-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.Network/interfaceEndpoints/{interfaceEndpointName}", 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 InterfaceEndpointsClient) 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 InterfaceEndpointsClient) GetResponder(resp *http.Response) (result InterfaceEndpoint, err error) {
- err = autorest.Respond(
- resp,
- azure.WithErrorUnlessStatusCode(http.StatusOK),
- autorest.ByUnmarshallingJSON(&result),
- autorest.ByClosing())
- result.Response = autorest.Response{Response: resp}
- return
-}
-
-// List gets all interface endpoints in a resource group.
-// Parameters:
-// resourceGroupName - the name of the resource group.
-func (client InterfaceEndpointsClient) List(ctx context.Context, resourceGroupName string) (result InterfaceEndpointListResultPage, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceEndpointsClient.List")
- defer func() {
- sc := -1
- if result.ielr.Response.Response != nil {
- sc = result.ielr.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, "network.InterfaceEndpointsClient", "List", nil, "Failure preparing request")
- return
- }
-
- resp, err := client.ListSender(req)
- if err != nil {
- result.ielr.Response = autorest.Response{Response: resp}
- err = autorest.NewErrorWithError(err, "network.InterfaceEndpointsClient", "List", resp, "Failure sending request")
- return
- }
-
- result.ielr, err = client.ListResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfaceEndpointsClient", "List", resp, "Failure responding to request")
- }
- if result.ielr.hasNextLink() && result.ielr.IsEmpty() {
- err = result.NextWithContext(ctx)
- }
-
- return
-}
-
-// ListPreparer prepares the List request.
-func (client InterfaceEndpointsClient) 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 = "2018-12-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.Network/interfaceEndpoints", 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 InterfaceEndpointsClient) 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 InterfaceEndpointsClient) ListResponder(resp *http.Response) (result InterfaceEndpointListResult, 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 InterfaceEndpointsClient) listNextResults(ctx context.Context, lastResults InterfaceEndpointListResult) (result InterfaceEndpointListResult, err error) {
- req, err := lastResults.interfaceEndpointListResultPreparer(ctx)
- if err != nil {
- return result, autorest.NewErrorWithError(err, "network.InterfaceEndpointsClient", "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, "network.InterfaceEndpointsClient", "listNextResults", resp, "Failure sending next results request")
- }
- result, err = client.ListResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfaceEndpointsClient", "listNextResults", resp, "Failure responding to next results request")
- }
- return
-}
-
-// ListComplete enumerates all values, automatically crossing page boundaries as required.
-func (client InterfaceEndpointsClient) ListComplete(ctx context.Context, resourceGroupName string) (result InterfaceEndpointListResultIterator, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceEndpointsClient.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
-}
-
-// ListBySubscription gets all interface endpoints in a subscription.
-func (client InterfaceEndpointsClient) ListBySubscription(ctx context.Context) (result InterfaceEndpointListResultPage, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceEndpointsClient.ListBySubscription")
- defer func() {
- sc := -1
- if result.ielr.Response.Response != nil {
- sc = result.ielr.Response.Response.StatusCode
- }
- tracing.EndSpan(ctx, sc, err)
- }()
- }
- result.fn = client.listBySubscriptionNextResults
- req, err := client.ListBySubscriptionPreparer(ctx)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfaceEndpointsClient", "ListBySubscription", nil, "Failure preparing request")
- return
- }
-
- resp, err := client.ListBySubscriptionSender(req)
- if err != nil {
- result.ielr.Response = autorest.Response{Response: resp}
- err = autorest.NewErrorWithError(err, "network.InterfaceEndpointsClient", "ListBySubscription", resp, "Failure sending request")
- return
- }
-
- result.ielr, err = client.ListBySubscriptionResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfaceEndpointsClient", "ListBySubscription", resp, "Failure responding to request")
- }
- if result.ielr.hasNextLink() && result.ielr.IsEmpty() {
- err = result.NextWithContext(ctx)
- }
-
- return
-}
-
-// ListBySubscriptionPreparer prepares the ListBySubscription request.
-func (client InterfaceEndpointsClient) ListBySubscriptionPreparer(ctx context.Context) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- }
-
- const APIVersion = "2018-12-01"
- queryParameters := map[string]interface{}{
- "api-version": APIVersion,
- }
-
- preparer := autorest.CreatePreparer(
- autorest.AsGet(),
- autorest.WithBaseURL(client.BaseURI),
- autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/interfaceEndpoints", 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 InterfaceEndpointsClient) 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 InterfaceEndpointsClient) ListBySubscriptionResponder(resp *http.Response) (result InterfaceEndpointListResult, 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 InterfaceEndpointsClient) listBySubscriptionNextResults(ctx context.Context, lastResults InterfaceEndpointListResult) (result InterfaceEndpointListResult, err error) {
- req, err := lastResults.interfaceEndpointListResultPreparer(ctx)
- if err != nil {
- return result, autorest.NewErrorWithError(err, "network.InterfaceEndpointsClient", "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, "network.InterfaceEndpointsClient", "listBySubscriptionNextResults", resp, "Failure sending next results request")
- }
- result, err = client.ListBySubscriptionResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfaceEndpointsClient", "listBySubscriptionNextResults", resp, "Failure responding to next results request")
- }
- return
-}
-
-// ListBySubscriptionComplete enumerates all values, automatically crossing page boundaries as required.
-func (client InterfaceEndpointsClient) ListBySubscriptionComplete(ctx context.Context) (result InterfaceEndpointListResultIterator, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceEndpointsClient.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
-}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/interfacetapconfigurations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/interfacetapconfigurations.go
deleted file mode 100644
index 04362f47a4f..00000000000
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/interfacetapconfigurations.go
+++ /dev/null
@@ -1,429 +0,0 @@
-package network
-
-// Copyright (c) Microsoft and contributors. All rights reserved.
-//
-// 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 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"
-)
-
-// InterfaceTapConfigurationsClient is the network Client
-type InterfaceTapConfigurationsClient struct {
- BaseClient
-}
-
-// NewInterfaceTapConfigurationsClient creates an instance of the InterfaceTapConfigurationsClient client.
-func NewInterfaceTapConfigurationsClient(subscriptionID string) InterfaceTapConfigurationsClient {
- return NewInterfaceTapConfigurationsClientWithBaseURI(DefaultBaseURI, subscriptionID)
-}
-
-// NewInterfaceTapConfigurationsClientWithBaseURI creates an instance of the InterfaceTapConfigurationsClient 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 NewInterfaceTapConfigurationsClientWithBaseURI(baseURI string, subscriptionID string) InterfaceTapConfigurationsClient {
- return InterfaceTapConfigurationsClient{NewWithBaseURI(baseURI, subscriptionID)}
-}
-
-// CreateOrUpdate creates or updates a Tap configuration in the specified NetworkInterface.
-// Parameters:
-// resourceGroupName - the name of the resource group.
-// networkInterfaceName - the name of the network interface.
-// tapConfigurationName - the name of the tap configuration.
-// tapConfigurationParameters - parameters supplied to the create or update tap configuration operation.
-func (client InterfaceTapConfigurationsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, networkInterfaceName string, tapConfigurationName string, tapConfigurationParameters InterfaceTapConfiguration) (result InterfaceTapConfigurationsCreateOrUpdateFuture, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceTapConfigurationsClient.CreateOrUpdate")
- defer func() {
- sc := -1
- if result.Response() != nil {
- sc = result.Response().StatusCode
- }
- tracing.EndSpan(ctx, sc, err)
- }()
- }
- if err := validation.Validate([]validation.Validation{
- {TargetValue: tapConfigurationParameters,
- Constraints: []validation.Constraint{{Target: "tapConfigurationParameters.InterfaceTapConfigurationPropertiesFormat", Name: validation.Null, Rule: false,
- Chain: []validation.Constraint{{Target: "tapConfigurationParameters.InterfaceTapConfigurationPropertiesFormat.VirtualNetworkTap", Name: validation.Null, Rule: false,
- Chain: []validation.Constraint{{Target: "tapConfigurationParameters.InterfaceTapConfigurationPropertiesFormat.VirtualNetworkTap.VirtualNetworkTapPropertiesFormat", Name: validation.Null, Rule: false,
- Chain: []validation.Constraint{{Target: "tapConfigurationParameters.InterfaceTapConfigurationPropertiesFormat.VirtualNetworkTap.VirtualNetworkTapPropertiesFormat.DestinationNetworkInterfaceIPConfiguration", Name: validation.Null, Rule: false,
- Chain: []validation.Constraint{{Target: "tapConfigurationParameters.InterfaceTapConfigurationPropertiesFormat.VirtualNetworkTap.VirtualNetworkTapPropertiesFormat.DestinationNetworkInterfaceIPConfiguration.InterfaceIPConfigurationPropertiesFormat", Name: validation.Null, Rule: false,
- Chain: []validation.Constraint{{Target: "tapConfigurationParameters.InterfaceTapConfigurationPropertiesFormat.VirtualNetworkTap.VirtualNetworkTapPropertiesFormat.DestinationNetworkInterfaceIPConfiguration.InterfaceIPConfigurationPropertiesFormat.PublicIPAddress", Name: validation.Null, Rule: false,
- Chain: []validation.Constraint{{Target: "tapConfigurationParameters.InterfaceTapConfigurationPropertiesFormat.VirtualNetworkTap.VirtualNetworkTapPropertiesFormat.DestinationNetworkInterfaceIPConfiguration.InterfaceIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat", Name: validation.Null, Rule: false,
- Chain: []validation.Constraint{{Target: "tapConfigurationParameters.InterfaceTapConfigurationPropertiesFormat.VirtualNetworkTap.VirtualNetworkTapPropertiesFormat.DestinationNetworkInterfaceIPConfiguration.InterfaceIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat.IPConfiguration", Name: validation.Null, Rule: false,
- Chain: []validation.Constraint{{Target: "tapConfigurationParameters.InterfaceTapConfigurationPropertiesFormat.VirtualNetworkTap.VirtualNetworkTapPropertiesFormat.DestinationNetworkInterfaceIPConfiguration.InterfaceIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat.IPConfiguration.IPConfigurationPropertiesFormat", Name: validation.Null, Rule: false,
- Chain: []validation.Constraint{{Target: "tapConfigurationParameters.InterfaceTapConfigurationPropertiesFormat.VirtualNetworkTap.VirtualNetworkTapPropertiesFormat.DestinationNetworkInterfaceIPConfiguration.InterfaceIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat.IPConfiguration.IPConfigurationPropertiesFormat.PublicIPAddress", Name: validation.Null, Rule: false, Chain: nil}}},
- }},
- }},
- }},
- }},
- }},
- {Target: "tapConfigurationParameters.InterfaceTapConfigurationPropertiesFormat.VirtualNetworkTap.VirtualNetworkTapPropertiesFormat.DestinationLoadBalancerFrontEndIPConfiguration", Name: validation.Null, Rule: false,
- Chain: []validation.Constraint{{Target: "tapConfigurationParameters.InterfaceTapConfigurationPropertiesFormat.VirtualNetworkTap.VirtualNetworkTapPropertiesFormat.DestinationLoadBalancerFrontEndIPConfiguration.FrontendIPConfigurationPropertiesFormat", Name: validation.Null, Rule: false,
- Chain: []validation.Constraint{{Target: "tapConfigurationParameters.InterfaceTapConfigurationPropertiesFormat.VirtualNetworkTap.VirtualNetworkTapPropertiesFormat.DestinationLoadBalancerFrontEndIPConfiguration.FrontendIPConfigurationPropertiesFormat.PublicIPAddress", Name: validation.Null, Rule: false,
- Chain: []validation.Constraint{{Target: "tapConfigurationParameters.InterfaceTapConfigurationPropertiesFormat.VirtualNetworkTap.VirtualNetworkTapPropertiesFormat.DestinationLoadBalancerFrontEndIPConfiguration.FrontendIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat", Name: validation.Null, Rule: false,
- Chain: []validation.Constraint{{Target: "tapConfigurationParameters.InterfaceTapConfigurationPropertiesFormat.VirtualNetworkTap.VirtualNetworkTapPropertiesFormat.DestinationLoadBalancerFrontEndIPConfiguration.FrontendIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat.IPConfiguration", Name: validation.Null, Rule: false,
- Chain: []validation.Constraint{{Target: "tapConfigurationParameters.InterfaceTapConfigurationPropertiesFormat.VirtualNetworkTap.VirtualNetworkTapPropertiesFormat.DestinationLoadBalancerFrontEndIPConfiguration.FrontendIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat.IPConfiguration.IPConfigurationPropertiesFormat", Name: validation.Null, Rule: false,
- Chain: []validation.Constraint{{Target: "tapConfigurationParameters.InterfaceTapConfigurationPropertiesFormat.VirtualNetworkTap.VirtualNetworkTapPropertiesFormat.DestinationLoadBalancerFrontEndIPConfiguration.FrontendIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat.IPConfiguration.IPConfigurationPropertiesFormat.PublicIPAddress", Name: validation.Null, Rule: false, Chain: nil}}},
- }},
- }},
- }},
- }},
- }},
- }},
- }},
- }}}}}); err != nil {
- return result, validation.NewError("network.InterfaceTapConfigurationsClient", "CreateOrUpdate", err.Error())
- }
-
- req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, networkInterfaceName, tapConfigurationName, tapConfigurationParameters)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfaceTapConfigurationsClient", "CreateOrUpdate", nil, "Failure preparing request")
- return
- }
-
- result, err = client.CreateOrUpdateSender(req)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfaceTapConfigurationsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
- return
- }
-
- return
-}
-
-// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
-func (client InterfaceTapConfigurationsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, networkInterfaceName string, tapConfigurationName string, tapConfigurationParameters InterfaceTapConfiguration) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "networkInterfaceName": autorest.Encode("path", networkInterfaceName),
- "resourceGroupName": autorest.Encode("path", resourceGroupName),
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- "tapConfigurationName": autorest.Encode("path", tapConfigurationName),
- }
-
- const APIVersion = "2018-12-01"
- queryParameters := map[string]interface{}{
- "api-version": APIVersion,
- }
-
- tapConfigurationParameters.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.Network/networkInterfaces/{networkInterfaceName}/tapConfigurations/{tapConfigurationName}", pathParameters),
- autorest.WithJSON(tapConfigurationParameters),
- 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 InterfaceTapConfigurationsClient) CreateOrUpdateSender(req *http.Request) (future InterfaceTapConfigurationsCreateOrUpdateFuture, err error) {
- var resp *http.Response
- resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
- if err != nil {
- return
- }
- future.Future, err = azure.NewFutureFromResponse(resp)
- return
-}
-
-// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
-// closes the http.Response Body.
-func (client InterfaceTapConfigurationsClient) CreateOrUpdateResponder(resp *http.Response) (result InterfaceTapConfiguration, 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 the specified tap configuration from the NetworkInterface.
-// Parameters:
-// resourceGroupName - the name of the resource group.
-// networkInterfaceName - the name of the network interface.
-// tapConfigurationName - the name of the tap configuration.
-func (client InterfaceTapConfigurationsClient) Delete(ctx context.Context, resourceGroupName string, networkInterfaceName string, tapConfigurationName string) (result InterfaceTapConfigurationsDeleteFuture, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceTapConfigurationsClient.Delete")
- defer func() {
- sc := -1
- if result.Response() != nil {
- sc = result.Response().StatusCode
- }
- tracing.EndSpan(ctx, sc, err)
- }()
- }
- req, err := client.DeletePreparer(ctx, resourceGroupName, networkInterfaceName, tapConfigurationName)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfaceTapConfigurationsClient", "Delete", nil, "Failure preparing request")
- return
- }
-
- result, err = client.DeleteSender(req)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfaceTapConfigurationsClient", "Delete", result.Response(), "Failure sending request")
- return
- }
-
- return
-}
-
-// DeletePreparer prepares the Delete request.
-func (client InterfaceTapConfigurationsClient) DeletePreparer(ctx context.Context, resourceGroupName string, networkInterfaceName string, tapConfigurationName string) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "networkInterfaceName": autorest.Encode("path", networkInterfaceName),
- "resourceGroupName": autorest.Encode("path", resourceGroupName),
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- "tapConfigurationName": autorest.Encode("path", tapConfigurationName),
- }
-
- const APIVersion = "2018-12-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.Network/networkInterfaces/{networkInterfaceName}/tapConfigurations/{tapConfigurationName}", 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 InterfaceTapConfigurationsClient) DeleteSender(req *http.Request) (future InterfaceTapConfigurationsDeleteFuture, err error) {
- var resp *http.Response
- resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
- if err != nil {
- return
- }
- future.Future, err = azure.NewFutureFromResponse(resp)
- return
-}
-
-// DeleteResponder handles the response to the Delete request. The method always
-// closes the http.Response Body.
-func (client InterfaceTapConfigurationsClient) 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 get the specified tap configuration on a network interface.
-// Parameters:
-// resourceGroupName - the name of the resource group.
-// networkInterfaceName - the name of the network interface.
-// tapConfigurationName - the name of the tap configuration.
-func (client InterfaceTapConfigurationsClient) Get(ctx context.Context, resourceGroupName string, networkInterfaceName string, tapConfigurationName string) (result InterfaceTapConfiguration, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceTapConfigurationsClient.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, networkInterfaceName, tapConfigurationName)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfaceTapConfigurationsClient", "Get", nil, "Failure preparing request")
- return
- }
-
- resp, err := client.GetSender(req)
- if err != nil {
- result.Response = autorest.Response{Response: resp}
- err = autorest.NewErrorWithError(err, "network.InterfaceTapConfigurationsClient", "Get", resp, "Failure sending request")
- return
- }
-
- result, err = client.GetResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfaceTapConfigurationsClient", "Get", resp, "Failure responding to request")
- }
-
- return
-}
-
-// GetPreparer prepares the Get request.
-func (client InterfaceTapConfigurationsClient) GetPreparer(ctx context.Context, resourceGroupName string, networkInterfaceName string, tapConfigurationName string) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "networkInterfaceName": autorest.Encode("path", networkInterfaceName),
- "resourceGroupName": autorest.Encode("path", resourceGroupName),
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- "tapConfigurationName": autorest.Encode("path", tapConfigurationName),
- }
-
- const APIVersion = "2018-12-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.Network/networkInterfaces/{networkInterfaceName}/tapConfigurations/{tapConfigurationName}", 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 InterfaceTapConfigurationsClient) 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 InterfaceTapConfigurationsClient) GetResponder(resp *http.Response) (result InterfaceTapConfiguration, err error) {
- err = autorest.Respond(
- resp,
- azure.WithErrorUnlessStatusCode(http.StatusOK),
- autorest.ByUnmarshallingJSON(&result),
- autorest.ByClosing())
- result.Response = autorest.Response{Response: resp}
- return
-}
-
-// List get all Tap configurations in a network interface
-// Parameters:
-// resourceGroupName - the name of the resource group.
-// networkInterfaceName - the name of the network interface.
-func (client InterfaceTapConfigurationsClient) List(ctx context.Context, resourceGroupName string, networkInterfaceName string) (result InterfaceTapConfigurationListResultPage, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceTapConfigurationsClient.List")
- defer func() {
- sc := -1
- if result.itclr.Response.Response != nil {
- sc = result.itclr.Response.Response.StatusCode
- }
- tracing.EndSpan(ctx, sc, err)
- }()
- }
- result.fn = client.listNextResults
- req, err := client.ListPreparer(ctx, resourceGroupName, networkInterfaceName)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfaceTapConfigurationsClient", "List", nil, "Failure preparing request")
- return
- }
-
- resp, err := client.ListSender(req)
- if err != nil {
- result.itclr.Response = autorest.Response{Response: resp}
- err = autorest.NewErrorWithError(err, "network.InterfaceTapConfigurationsClient", "List", resp, "Failure sending request")
- return
- }
-
- result.itclr, err = client.ListResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfaceTapConfigurationsClient", "List", resp, "Failure responding to request")
- }
- if result.itclr.hasNextLink() && result.itclr.IsEmpty() {
- err = result.NextWithContext(ctx)
- }
-
- return
-}
-
-// ListPreparer prepares the List request.
-func (client InterfaceTapConfigurationsClient) ListPreparer(ctx context.Context, resourceGroupName string, networkInterfaceName string) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "networkInterfaceName": autorest.Encode("path", networkInterfaceName),
- "resourceGroupName": autorest.Encode("path", resourceGroupName),
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- }
-
- const APIVersion = "2018-12-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.Network/networkInterfaces/{networkInterfaceName}/tapConfigurations", 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 InterfaceTapConfigurationsClient) 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 InterfaceTapConfigurationsClient) ListResponder(resp *http.Response) (result InterfaceTapConfigurationListResult, 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 InterfaceTapConfigurationsClient) listNextResults(ctx context.Context, lastResults InterfaceTapConfigurationListResult) (result InterfaceTapConfigurationListResult, err error) {
- req, err := lastResults.interfaceTapConfigurationListResultPreparer(ctx)
- if err != nil {
- return result, autorest.NewErrorWithError(err, "network.InterfaceTapConfigurationsClient", "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, "network.InterfaceTapConfigurationsClient", "listNextResults", resp, "Failure sending next results request")
- }
- result, err = client.ListResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfaceTapConfigurationsClient", "listNextResults", resp, "Failure responding to next results request")
- }
- return
-}
-
-// ListComplete enumerates all values, automatically crossing page boundaries as required.
-func (client InterfaceTapConfigurationsClient) ListComplete(ctx context.Context, resourceGroupName string, networkInterfaceName string) (result InterfaceTapConfigurationListResultIterator, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceTapConfigurationsClient.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, networkInterfaceName)
- return
-}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/loadbalanceroutboundrules.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/loadbalanceroutboundrules.go
deleted file mode 100644
index 77c6ebfcd00..00000000000
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/loadbalanceroutboundrules.go
+++ /dev/null
@@ -1,236 +0,0 @@
-package network
-
-// Copyright (c) Microsoft and contributors. All rights reserved.
-//
-// 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 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"
-)
-
-// LoadBalancerOutboundRulesClient is the network Client
-type LoadBalancerOutboundRulesClient struct {
- BaseClient
-}
-
-// NewLoadBalancerOutboundRulesClient creates an instance of the LoadBalancerOutboundRulesClient client.
-func NewLoadBalancerOutboundRulesClient(subscriptionID string) LoadBalancerOutboundRulesClient {
- return NewLoadBalancerOutboundRulesClientWithBaseURI(DefaultBaseURI, subscriptionID)
-}
-
-// NewLoadBalancerOutboundRulesClientWithBaseURI creates an instance of the LoadBalancerOutboundRulesClient 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 NewLoadBalancerOutboundRulesClientWithBaseURI(baseURI string, subscriptionID string) LoadBalancerOutboundRulesClient {
- return LoadBalancerOutboundRulesClient{NewWithBaseURI(baseURI, subscriptionID)}
-}
-
-// Get gets the specified load balancer outbound rule.
-// Parameters:
-// resourceGroupName - the name of the resource group.
-// loadBalancerName - the name of the load balancer.
-// outboundRuleName - the name of the outbound rule.
-func (client LoadBalancerOutboundRulesClient) Get(ctx context.Context, resourceGroupName string, loadBalancerName string, outboundRuleName string) (result OutboundRule, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerOutboundRulesClient.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, loadBalancerName, outboundRuleName)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LoadBalancerOutboundRulesClient", "Get", nil, "Failure preparing request")
- return
- }
-
- resp, err := client.GetSender(req)
- if err != nil {
- result.Response = autorest.Response{Response: resp}
- err = autorest.NewErrorWithError(err, "network.LoadBalancerOutboundRulesClient", "Get", resp, "Failure sending request")
- return
- }
-
- result, err = client.GetResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LoadBalancerOutboundRulesClient", "Get", resp, "Failure responding to request")
- }
-
- return
-}
-
-// GetPreparer prepares the Get request.
-func (client LoadBalancerOutboundRulesClient) GetPreparer(ctx context.Context, resourceGroupName string, loadBalancerName string, outboundRuleName string) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "loadBalancerName": autorest.Encode("path", loadBalancerName),
- "outboundRuleName": autorest.Encode("path", outboundRuleName),
- "resourceGroupName": autorest.Encode("path", resourceGroupName),
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- }
-
- const APIVersion = "2018-12-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.Network/loadBalancers/{loadBalancerName}/outboundRules/{outboundRuleName}", 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 LoadBalancerOutboundRulesClient) 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 LoadBalancerOutboundRulesClient) GetResponder(resp *http.Response) (result OutboundRule, err error) {
- err = autorest.Respond(
- resp,
- azure.WithErrorUnlessStatusCode(http.StatusOK),
- autorest.ByUnmarshallingJSON(&result),
- autorest.ByClosing())
- result.Response = autorest.Response{Response: resp}
- return
-}
-
-// List gets all the outbound rules in a load balancer.
-// Parameters:
-// resourceGroupName - the name of the resource group.
-// loadBalancerName - the name of the load balancer.
-func (client LoadBalancerOutboundRulesClient) List(ctx context.Context, resourceGroupName string, loadBalancerName string) (result LoadBalancerOutboundRuleListResultPage, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerOutboundRulesClient.List")
- defer func() {
- sc := -1
- if result.lborlr.Response.Response != nil {
- sc = result.lborlr.Response.Response.StatusCode
- }
- tracing.EndSpan(ctx, sc, err)
- }()
- }
- result.fn = client.listNextResults
- req, err := client.ListPreparer(ctx, resourceGroupName, loadBalancerName)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LoadBalancerOutboundRulesClient", "List", nil, "Failure preparing request")
- return
- }
-
- resp, err := client.ListSender(req)
- if err != nil {
- result.lborlr.Response = autorest.Response{Response: resp}
- err = autorest.NewErrorWithError(err, "network.LoadBalancerOutboundRulesClient", "List", resp, "Failure sending request")
- return
- }
-
- result.lborlr, err = client.ListResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LoadBalancerOutboundRulesClient", "List", resp, "Failure responding to request")
- }
- if result.lborlr.hasNextLink() && result.lborlr.IsEmpty() {
- err = result.NextWithContext(ctx)
- }
-
- return
-}
-
-// ListPreparer prepares the List request.
-func (client LoadBalancerOutboundRulesClient) ListPreparer(ctx context.Context, resourceGroupName string, loadBalancerName string) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "loadBalancerName": autorest.Encode("path", loadBalancerName),
- "resourceGroupName": autorest.Encode("path", resourceGroupName),
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- }
-
- const APIVersion = "2018-12-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.Network/loadBalancers/{loadBalancerName}/outboundRules", 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 LoadBalancerOutboundRulesClient) 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 LoadBalancerOutboundRulesClient) ListResponder(resp *http.Response) (result LoadBalancerOutboundRuleListResult, 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 LoadBalancerOutboundRulesClient) listNextResults(ctx context.Context, lastResults LoadBalancerOutboundRuleListResult) (result LoadBalancerOutboundRuleListResult, err error) {
- req, err := lastResults.loadBalancerOutboundRuleListResultPreparer(ctx)
- if err != nil {
- return result, autorest.NewErrorWithError(err, "network.LoadBalancerOutboundRulesClient", "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, "network.LoadBalancerOutboundRulesClient", "listNextResults", resp, "Failure sending next results request")
- }
- result, err = client.ListResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LoadBalancerOutboundRulesClient", "listNextResults", resp, "Failure responding to next results request")
- }
- return
-}
-
-// ListComplete enumerates all values, automatically crossing page boundaries as required.
-func (client LoadBalancerOutboundRulesClient) ListComplete(ctx context.Context, resourceGroupName string, loadBalancerName string) (result LoadBalancerOutboundRuleListResultIterator, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerOutboundRulesClient.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, loadBalancerName)
- return
-}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/models.go
deleted file mode 100644
index 429c7ccb546..00000000000
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/models.go
+++ /dev/null
@@ -1,29719 +0,0 @@
-package network
-
-// Copyright (c) Microsoft and contributors. All rights reserved.
-//
-// 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 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/network/mgmt/2018-12-01/network"
-
-// AddressSpace addressSpace contains an array of IP address ranges that can be used by subnets of the virtual
-// network.
-type AddressSpace struct {
- // AddressPrefixes - A list of address blocks reserved for this virtual network in CIDR notation.
- AddressPrefixes *[]string `json:"addressPrefixes,omitempty"`
-}
-
-// ApplicationGateway application gateway resource
-type ApplicationGateway struct {
- autorest.Response `json:"-"`
- *ApplicationGatewayPropertiesFormat `json:"properties,omitempty"`
- // Etag - A unique read-only string that changes whenever the resource is updated.
- Etag *string `json:"etag,omitempty"`
- // Zones - A list of availability zones denoting where the resource needs to come from.
- Zones *[]string `json:"zones,omitempty"`
- // Identity - The identity of the application gateway, if configured.
- Identity *ManagedServiceIdentity `json:"identity,omitempty"`
- // ID - 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 ApplicationGateway.
-func (ag ApplicationGateway) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if ag.ApplicationGatewayPropertiesFormat != nil {
- objectMap["properties"] = ag.ApplicationGatewayPropertiesFormat
- }
- if ag.Etag != nil {
- objectMap["etag"] = ag.Etag
- }
- if ag.Zones != nil {
- objectMap["zones"] = ag.Zones
- }
- if ag.Identity != nil {
- objectMap["identity"] = ag.Identity
- }
- if ag.ID != nil {
- objectMap["id"] = ag.ID
- }
- if ag.Location != nil {
- objectMap["location"] = ag.Location
- }
- if ag.Tags != nil {
- objectMap["tags"] = ag.Tags
- }
- return json.Marshal(objectMap)
-}
-
-// UnmarshalJSON is the custom unmarshaler for ApplicationGateway struct.
-func (ag *ApplicationGateway) 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 applicationGatewayPropertiesFormat ApplicationGatewayPropertiesFormat
- err = json.Unmarshal(*v, &applicationGatewayPropertiesFormat)
- if err != nil {
- return err
- }
- ag.ApplicationGatewayPropertiesFormat = &applicationGatewayPropertiesFormat
- }
- case "etag":
- if v != nil {
- var etag string
- err = json.Unmarshal(*v, &etag)
- if err != nil {
- return err
- }
- ag.Etag = &etag
- }
- case "zones":
- if v != nil {
- var zones []string
- err = json.Unmarshal(*v, &zones)
- if err != nil {
- return err
- }
- ag.Zones = &zones
- }
- case "identity":
- if v != nil {
- var identity ManagedServiceIdentity
- err = json.Unmarshal(*v, &identity)
- if err != nil {
- return err
- }
- ag.Identity = &identity
- }
- case "id":
- if v != nil {
- var ID string
- err = json.Unmarshal(*v, &ID)
- if err != nil {
- return err
- }
- ag.ID = &ID
- }
- case "name":
- if v != nil {
- var name string
- err = json.Unmarshal(*v, &name)
- if err != nil {
- return err
- }
- ag.Name = &name
- }
- case "type":
- if v != nil {
- var typeVar string
- err = json.Unmarshal(*v, &typeVar)
- if err != nil {
- return err
- }
- ag.Type = &typeVar
- }
- case "location":
- if v != nil {
- var location string
- err = json.Unmarshal(*v, &location)
- if err != nil {
- return err
- }
- ag.Location = &location
- }
- case "tags":
- if v != nil {
- var tags map[string]*string
- err = json.Unmarshal(*v, &tags)
- if err != nil {
- return err
- }
- ag.Tags = tags
- }
- }
- }
-
- return nil
-}
-
-// ApplicationGatewayAuthenticationCertificate authentication certificates of an application gateway.
-type ApplicationGatewayAuthenticationCertificate struct {
- *ApplicationGatewayAuthenticationCertificatePropertiesFormat `json:"properties,omitempty"`
- // Name - Name of the authentication certificate that is unique within an Application Gateway.
- Name *string `json:"name,omitempty"`
- // Etag - A unique read-only string that changes whenever the resource is updated.
- Etag *string `json:"etag,omitempty"`
- // Type - Type of the resource.
- Type *string `json:"type,omitempty"`
- // ID - Resource ID.
- ID *string `json:"id,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for ApplicationGatewayAuthenticationCertificate.
-func (agac ApplicationGatewayAuthenticationCertificate) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if agac.ApplicationGatewayAuthenticationCertificatePropertiesFormat != nil {
- objectMap["properties"] = agac.ApplicationGatewayAuthenticationCertificatePropertiesFormat
- }
- if agac.Name != nil {
- objectMap["name"] = agac.Name
- }
- if agac.Etag != nil {
- objectMap["etag"] = agac.Etag
- }
- if agac.Type != nil {
- objectMap["type"] = agac.Type
- }
- if agac.ID != nil {
- objectMap["id"] = agac.ID
- }
- return json.Marshal(objectMap)
-}
-
-// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayAuthenticationCertificate struct.
-func (agac *ApplicationGatewayAuthenticationCertificate) 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 applicationGatewayAuthenticationCertificatePropertiesFormat ApplicationGatewayAuthenticationCertificatePropertiesFormat
- err = json.Unmarshal(*v, &applicationGatewayAuthenticationCertificatePropertiesFormat)
- if err != nil {
- return err
- }
- agac.ApplicationGatewayAuthenticationCertificatePropertiesFormat = &applicationGatewayAuthenticationCertificatePropertiesFormat
- }
- case "name":
- if v != nil {
- var name string
- err = json.Unmarshal(*v, &name)
- if err != nil {
- return err
- }
- agac.Name = &name
- }
- case "etag":
- if v != nil {
- var etag string
- err = json.Unmarshal(*v, &etag)
- if err != nil {
- return err
- }
- agac.Etag = &etag
- }
- case "type":
- if v != nil {
- var typeVar string
- err = json.Unmarshal(*v, &typeVar)
- if err != nil {
- return err
- }
- agac.Type = &typeVar
- }
- case "id":
- if v != nil {
- var ID string
- err = json.Unmarshal(*v, &ID)
- if err != nil {
- return err
- }
- agac.ID = &ID
- }
- }
- }
-
- return nil
-}
-
-// ApplicationGatewayAuthenticationCertificatePropertiesFormat authentication certificates properties of an
-// application gateway.
-type ApplicationGatewayAuthenticationCertificatePropertiesFormat struct {
- // Data - Certificate public data.
- Data *string `json:"data,omitempty"`
- // ProvisioningState - Provisioning state of the authentication certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
- ProvisioningState *string `json:"provisioningState,omitempty"`
-}
-
-// ApplicationGatewayAutoscaleConfiguration application Gateway autoscale configuration.
-type ApplicationGatewayAutoscaleConfiguration struct {
- // MinCapacity - Lower bound on number of Application Gateway capacity
- MinCapacity *int32 `json:"minCapacity,omitempty"`
- // MaxCapacity - Upper bound on number of Application Gateway capacity
- MaxCapacity *int32 `json:"maxCapacity,omitempty"`
-}
-
-// ApplicationGatewayAvailableSslOptions response for ApplicationGatewayAvailableSslOptions API service call.
-type ApplicationGatewayAvailableSslOptions struct {
- autorest.Response `json:"-"`
- *ApplicationGatewayAvailableSslOptionsPropertiesFormat `json:"properties,omitempty"`
- // ID - 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 ApplicationGatewayAvailableSslOptions.
-func (agaso ApplicationGatewayAvailableSslOptions) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if agaso.ApplicationGatewayAvailableSslOptionsPropertiesFormat != nil {
- objectMap["properties"] = agaso.ApplicationGatewayAvailableSslOptionsPropertiesFormat
- }
- if agaso.ID != nil {
- objectMap["id"] = agaso.ID
- }
- if agaso.Location != nil {
- objectMap["location"] = agaso.Location
- }
- if agaso.Tags != nil {
- objectMap["tags"] = agaso.Tags
- }
- return json.Marshal(objectMap)
-}
-
-// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayAvailableSslOptions struct.
-func (agaso *ApplicationGatewayAvailableSslOptions) 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 applicationGatewayAvailableSslOptionsPropertiesFormat ApplicationGatewayAvailableSslOptionsPropertiesFormat
- err = json.Unmarshal(*v, &applicationGatewayAvailableSslOptionsPropertiesFormat)
- if err != nil {
- return err
- }
- agaso.ApplicationGatewayAvailableSslOptionsPropertiesFormat = &applicationGatewayAvailableSslOptionsPropertiesFormat
- }
- case "id":
- if v != nil {
- var ID string
- err = json.Unmarshal(*v, &ID)
- if err != nil {
- return err
- }
- agaso.ID = &ID
- }
- case "name":
- if v != nil {
- var name string
- err = json.Unmarshal(*v, &name)
- if err != nil {
- return err
- }
- agaso.Name = &name
- }
- case "type":
- if v != nil {
- var typeVar string
- err = json.Unmarshal(*v, &typeVar)
- if err != nil {
- return err
- }
- agaso.Type = &typeVar
- }
- case "location":
- if v != nil {
- var location string
- err = json.Unmarshal(*v, &location)
- if err != nil {
- return err
- }
- agaso.Location = &location
- }
- case "tags":
- if v != nil {
- var tags map[string]*string
- err = json.Unmarshal(*v, &tags)
- if err != nil {
- return err
- }
- agaso.Tags = tags
- }
- }
- }
-
- return nil
-}
-
-// ApplicationGatewayAvailableSslOptionsPropertiesFormat properties of ApplicationGatewayAvailableSslOptions
-type ApplicationGatewayAvailableSslOptionsPropertiesFormat struct {
- // PredefinedPolicies - List of available Ssl predefined policy.
- PredefinedPolicies *[]SubResource `json:"predefinedPolicies,omitempty"`
- // DefaultPolicy - Name of the Ssl predefined policy applied by default to application gateway. Possible values include: 'AppGwSslPolicy20150501', 'AppGwSslPolicy20170401', 'AppGwSslPolicy20170401S'
- DefaultPolicy ApplicationGatewaySslPolicyName `json:"defaultPolicy,omitempty"`
- // AvailableCipherSuites - List of available Ssl cipher suites.
- AvailableCipherSuites *[]ApplicationGatewaySslCipherSuite `json:"availableCipherSuites,omitempty"`
- // AvailableProtocols - List of available Ssl protocols.
- AvailableProtocols *[]ApplicationGatewaySslProtocol `json:"availableProtocols,omitempty"`
-}
-
-// ApplicationGatewayAvailableSslPredefinedPolicies response for ApplicationGatewayAvailableSslOptions API
-// service call.
-type ApplicationGatewayAvailableSslPredefinedPolicies struct {
- autorest.Response `json:"-"`
- // Value - List of available Ssl predefined policy.
- Value *[]ApplicationGatewaySslPredefinedPolicy `json:"value,omitempty"`
- // NextLink - URL to get the next set of results.
- NextLink *string `json:"nextLink,omitempty"`
-}
-
-// ApplicationGatewayAvailableSslPredefinedPoliciesIterator provides access to a complete listing of
-// ApplicationGatewaySslPredefinedPolicy values.
-type ApplicationGatewayAvailableSslPredefinedPoliciesIterator struct {
- i int
- page ApplicationGatewayAvailableSslPredefinedPoliciesPage
-}
-
-// 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 *ApplicationGatewayAvailableSslPredefinedPoliciesIterator) NextWithContext(ctx context.Context) (err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewayAvailableSslPredefinedPoliciesIterator.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 *ApplicationGatewayAvailableSslPredefinedPoliciesIterator) Next() error {
- return iter.NextWithContext(context.Background())
-}
-
-// NotDone returns true if the enumeration should be started or is not yet complete.
-func (iter ApplicationGatewayAvailableSslPredefinedPoliciesIterator) 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 ApplicationGatewayAvailableSslPredefinedPoliciesIterator) Response() ApplicationGatewayAvailableSslPredefinedPolicies {
- 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 ApplicationGatewayAvailableSslPredefinedPoliciesIterator) Value() ApplicationGatewaySslPredefinedPolicy {
- if !iter.page.NotDone() {
- return ApplicationGatewaySslPredefinedPolicy{}
- }
- return iter.page.Values()[iter.i]
-}
-
-// Creates a new instance of the ApplicationGatewayAvailableSslPredefinedPoliciesIterator type.
-func NewApplicationGatewayAvailableSslPredefinedPoliciesIterator(page ApplicationGatewayAvailableSslPredefinedPoliciesPage) ApplicationGatewayAvailableSslPredefinedPoliciesIterator {
- return ApplicationGatewayAvailableSslPredefinedPoliciesIterator{page: page}
-}
-
-// IsEmpty returns true if the ListResult contains no values.
-func (agaspp ApplicationGatewayAvailableSslPredefinedPolicies) IsEmpty() bool {
- return agaspp.Value == nil || len(*agaspp.Value) == 0
-}
-
-// hasNextLink returns true if the NextLink is not empty.
-func (agaspp ApplicationGatewayAvailableSslPredefinedPolicies) hasNextLink() bool {
- return agaspp.NextLink != nil && len(*agaspp.NextLink) != 0
-}
-
-// applicationGatewayAvailableSslPredefinedPoliciesPreparer prepares a request to retrieve the next set of results.
-// It returns nil if no more results exist.
-func (agaspp ApplicationGatewayAvailableSslPredefinedPolicies) applicationGatewayAvailableSslPredefinedPoliciesPreparer(ctx context.Context) (*http.Request, error) {
- if !agaspp.hasNextLink() {
- return nil, nil
- }
- return autorest.Prepare((&http.Request{}).WithContext(ctx),
- autorest.AsJSON(),
- autorest.AsGet(),
- autorest.WithBaseURL(to.String(agaspp.NextLink)))
-}
-
-// ApplicationGatewayAvailableSslPredefinedPoliciesPage contains a page of
-// ApplicationGatewaySslPredefinedPolicy values.
-type ApplicationGatewayAvailableSslPredefinedPoliciesPage struct {
- fn func(context.Context, ApplicationGatewayAvailableSslPredefinedPolicies) (ApplicationGatewayAvailableSslPredefinedPolicies, error)
- agaspp ApplicationGatewayAvailableSslPredefinedPolicies
-}
-
-// 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 *ApplicationGatewayAvailableSslPredefinedPoliciesPage) NextWithContext(ctx context.Context) (err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewayAvailableSslPredefinedPoliciesPage.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.agaspp)
- if err != nil {
- return err
- }
- page.agaspp = 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 *ApplicationGatewayAvailableSslPredefinedPoliciesPage) Next() error {
- return page.NextWithContext(context.Background())
-}
-
-// NotDone returns true if the page enumeration should be started or is not yet complete.
-func (page ApplicationGatewayAvailableSslPredefinedPoliciesPage) NotDone() bool {
- return !page.agaspp.IsEmpty()
-}
-
-// Response returns the raw server response from the last page request.
-func (page ApplicationGatewayAvailableSslPredefinedPoliciesPage) Response() ApplicationGatewayAvailableSslPredefinedPolicies {
- return page.agaspp
-}
-
-// Values returns the slice of values for the current page or nil if there are no values.
-func (page ApplicationGatewayAvailableSslPredefinedPoliciesPage) Values() []ApplicationGatewaySslPredefinedPolicy {
- if page.agaspp.IsEmpty() {
- return nil
- }
- return *page.agaspp.Value
-}
-
-// Creates a new instance of the ApplicationGatewayAvailableSslPredefinedPoliciesPage type.
-func NewApplicationGatewayAvailableSslPredefinedPoliciesPage(getNextPage func(context.Context, ApplicationGatewayAvailableSslPredefinedPolicies) (ApplicationGatewayAvailableSslPredefinedPolicies, error)) ApplicationGatewayAvailableSslPredefinedPoliciesPage {
- return ApplicationGatewayAvailableSslPredefinedPoliciesPage{fn: getNextPage}
-}
-
-// ApplicationGatewayAvailableWafRuleSetsResult response for ApplicationGatewayAvailableWafRuleSets API service
-// call.
-type ApplicationGatewayAvailableWafRuleSetsResult struct {
- autorest.Response `json:"-"`
- // Value - The list of application gateway rule sets.
- Value *[]ApplicationGatewayFirewallRuleSet `json:"value,omitempty"`
-}
-
-// ApplicationGatewayBackendAddress backend address of an application gateway.
-type ApplicationGatewayBackendAddress struct {
- // Fqdn - Fully qualified domain name (FQDN).
- Fqdn *string `json:"fqdn,omitempty"`
- // IPAddress - IP address
- IPAddress *string `json:"ipAddress,omitempty"`
-}
-
-// ApplicationGatewayBackendAddressPool backend Address Pool of an application gateway.
-type ApplicationGatewayBackendAddressPool struct {
- *ApplicationGatewayBackendAddressPoolPropertiesFormat `json:"properties,omitempty"`
- // Name - Name of the backend address pool that is unique within an Application Gateway.
- Name *string `json:"name,omitempty"`
- // Etag - A unique read-only string that changes whenever the resource is updated.
- Etag *string `json:"etag,omitempty"`
- // Type - Type of the resource.
- Type *string `json:"type,omitempty"`
- // ID - Resource ID.
- ID *string `json:"id,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for ApplicationGatewayBackendAddressPool.
-func (agbap ApplicationGatewayBackendAddressPool) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if agbap.ApplicationGatewayBackendAddressPoolPropertiesFormat != nil {
- objectMap["properties"] = agbap.ApplicationGatewayBackendAddressPoolPropertiesFormat
- }
- if agbap.Name != nil {
- objectMap["name"] = agbap.Name
- }
- if agbap.Etag != nil {
- objectMap["etag"] = agbap.Etag
- }
- if agbap.Type != nil {
- objectMap["type"] = agbap.Type
- }
- if agbap.ID != nil {
- objectMap["id"] = agbap.ID
- }
- return json.Marshal(objectMap)
-}
-
-// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayBackendAddressPool struct.
-func (agbap *ApplicationGatewayBackendAddressPool) 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 applicationGatewayBackendAddressPoolPropertiesFormat ApplicationGatewayBackendAddressPoolPropertiesFormat
- err = json.Unmarshal(*v, &applicationGatewayBackendAddressPoolPropertiesFormat)
- if err != nil {
- return err
- }
- agbap.ApplicationGatewayBackendAddressPoolPropertiesFormat = &applicationGatewayBackendAddressPoolPropertiesFormat
- }
- case "name":
- if v != nil {
- var name string
- err = json.Unmarshal(*v, &name)
- if err != nil {
- return err
- }
- agbap.Name = &name
- }
- case "etag":
- if v != nil {
- var etag string
- err = json.Unmarshal(*v, &etag)
- if err != nil {
- return err
- }
- agbap.Etag = &etag
- }
- case "type":
- if v != nil {
- var typeVar string
- err = json.Unmarshal(*v, &typeVar)
- if err != nil {
- return err
- }
- agbap.Type = &typeVar
- }
- case "id":
- if v != nil {
- var ID string
- err = json.Unmarshal(*v, &ID)
- if err != nil {
- return err
- }
- agbap.ID = &ID
- }
- }
- }
-
- return nil
-}
-
-// ApplicationGatewayBackendAddressPoolPropertiesFormat properties of Backend Address Pool of an application
-// gateway.
-type ApplicationGatewayBackendAddressPoolPropertiesFormat struct {
- // BackendIPConfigurations - Collection of references to IPs defined in network interfaces.
- BackendIPConfigurations *[]InterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"`
- // BackendAddresses - Backend addresses
- BackendAddresses *[]ApplicationGatewayBackendAddress `json:"backendAddresses,omitempty"`
- // ProvisioningState - Provisioning state of the backend address pool resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
- ProvisioningState *string `json:"provisioningState,omitempty"`
-}
-
-// ApplicationGatewayBackendHealth list of ApplicationGatewayBackendHealthPool resources.
-type ApplicationGatewayBackendHealth struct {
- autorest.Response `json:"-"`
- BackendAddressPools *[]ApplicationGatewayBackendHealthPool `json:"backendAddressPools,omitempty"`
-}
-
-// ApplicationGatewayBackendHealthHTTPSettings application gateway BackendHealthHttp settings.
-type ApplicationGatewayBackendHealthHTTPSettings struct {
- // BackendHTTPSettings - Reference of an ApplicationGatewayBackendHttpSettings resource.
- BackendHTTPSettings *ApplicationGatewayBackendHTTPSettings `json:"backendHttpSettings,omitempty"`
- // Servers - List of ApplicationGatewayBackendHealthServer resources.
- Servers *[]ApplicationGatewayBackendHealthServer `json:"servers,omitempty"`
-}
-
-// ApplicationGatewayBackendHealthPool application gateway BackendHealth pool.
-type ApplicationGatewayBackendHealthPool struct {
- // BackendAddressPool - Reference of an ApplicationGatewayBackendAddressPool resource.
- BackendAddressPool *ApplicationGatewayBackendAddressPool `json:"backendAddressPool,omitempty"`
- // BackendHTTPSettingsCollection - List of ApplicationGatewayBackendHealthHttpSettings resources.
- BackendHTTPSettingsCollection *[]ApplicationGatewayBackendHealthHTTPSettings `json:"backendHttpSettingsCollection,omitempty"`
-}
-
-// ApplicationGatewayBackendHealthServer application gateway backendhealth http settings.
-type ApplicationGatewayBackendHealthServer struct {
- // Address - IP address or FQDN of backend server.
- Address *string `json:"address,omitempty"`
- // IPConfiguration - Reference of IP configuration of backend server.
- IPConfiguration *InterfaceIPConfiguration `json:"ipConfiguration,omitempty"`
- // Health - Health of backend server. Possible values include: 'Unknown', 'Up', 'Down', 'Partial', 'Draining'
- Health ApplicationGatewayBackendHealthServerHealth `json:"health,omitempty"`
- // HealthProbeLog - Health Probe Log.
- HealthProbeLog *string `json:"healthProbeLog,omitempty"`
-}
-
-// ApplicationGatewayBackendHTTPSettings backend address pool settings of an application gateway.
-type ApplicationGatewayBackendHTTPSettings struct {
- *ApplicationGatewayBackendHTTPSettingsPropertiesFormat `json:"properties,omitempty"`
- // Name - Name of the backend http settings that is unique within an Application Gateway.
- Name *string `json:"name,omitempty"`
- // Etag - A unique read-only string that changes whenever the resource is updated.
- Etag *string `json:"etag,omitempty"`
- // Type - Type of the resource.
- Type *string `json:"type,omitempty"`
- // ID - Resource ID.
- ID *string `json:"id,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for ApplicationGatewayBackendHTTPSettings.
-func (agbhs ApplicationGatewayBackendHTTPSettings) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if agbhs.ApplicationGatewayBackendHTTPSettingsPropertiesFormat != nil {
- objectMap["properties"] = agbhs.ApplicationGatewayBackendHTTPSettingsPropertiesFormat
- }
- if agbhs.Name != nil {
- objectMap["name"] = agbhs.Name
- }
- if agbhs.Etag != nil {
- objectMap["etag"] = agbhs.Etag
- }
- if agbhs.Type != nil {
- objectMap["type"] = agbhs.Type
- }
- if agbhs.ID != nil {
- objectMap["id"] = agbhs.ID
- }
- return json.Marshal(objectMap)
-}
-
-// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayBackendHTTPSettings struct.
-func (agbhs *ApplicationGatewayBackendHTTPSettings) 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 applicationGatewayBackendHTTPSettingsPropertiesFormat ApplicationGatewayBackendHTTPSettingsPropertiesFormat
- err = json.Unmarshal(*v, &applicationGatewayBackendHTTPSettingsPropertiesFormat)
- if err != nil {
- return err
- }
- agbhs.ApplicationGatewayBackendHTTPSettingsPropertiesFormat = &applicationGatewayBackendHTTPSettingsPropertiesFormat
- }
- case "name":
- if v != nil {
- var name string
- err = json.Unmarshal(*v, &name)
- if err != nil {
- return err
- }
- agbhs.Name = &name
- }
- case "etag":
- if v != nil {
- var etag string
- err = json.Unmarshal(*v, &etag)
- if err != nil {
- return err
- }
- agbhs.Etag = &etag
- }
- case "type":
- if v != nil {
- var typeVar string
- err = json.Unmarshal(*v, &typeVar)
- if err != nil {
- return err
- }
- agbhs.Type = &typeVar
- }
- case "id":
- if v != nil {
- var ID string
- err = json.Unmarshal(*v, &ID)
- if err != nil {
- return err
- }
- agbhs.ID = &ID
- }
- }
- }
-
- return nil
-}
-
-// ApplicationGatewayBackendHTTPSettingsPropertiesFormat properties of Backend address pool settings of an
-// application gateway.
-type ApplicationGatewayBackendHTTPSettingsPropertiesFormat struct {
- // Port - The destination port on the backend.
- Port *int32 `json:"port,omitempty"`
- // Protocol - The protocol used to communicate with the backend. Possible values are 'Http' and 'Https'. Possible values include: 'HTTP', 'HTTPS'
- Protocol ApplicationGatewayProtocol `json:"protocol,omitempty"`
- // CookieBasedAffinity - Cookie based affinity. Possible values include: 'Enabled', 'Disabled'
- CookieBasedAffinity ApplicationGatewayCookieBasedAffinity `json:"cookieBasedAffinity,omitempty"`
- // RequestTimeout - Request timeout in seconds. Application Gateway will fail the request if response is not received within RequestTimeout. Acceptable values are from 1 second to 86400 seconds.
- RequestTimeout *int32 `json:"requestTimeout,omitempty"`
- // Probe - Probe resource of an application gateway.
- Probe *SubResource `json:"probe,omitempty"`
- // AuthenticationCertificates - Array of references to application gateway authentication certificates.
- AuthenticationCertificates *[]SubResource `json:"authenticationCertificates,omitempty"`
- // TrustedRootCertificates - Array of references to application gateway trusted root certificates.
- TrustedRootCertificates *[]SubResource `json:"trustedRootCertificates,omitempty"`
- // ConnectionDraining - Connection draining of the backend http settings resource.
- ConnectionDraining *ApplicationGatewayConnectionDraining `json:"connectionDraining,omitempty"`
- // HostName - Host header to be sent to the backend servers.
- HostName *string `json:"hostName,omitempty"`
- // PickHostNameFromBackendAddress - Whether to pick host header should be picked from the host name of the backend server. Default value is false.
- PickHostNameFromBackendAddress *bool `json:"pickHostNameFromBackendAddress,omitempty"`
- // AffinityCookieName - Cookie name to use for the affinity cookie.
- AffinityCookieName *string `json:"affinityCookieName,omitempty"`
- // ProbeEnabled - Whether the probe is enabled. Default value is false.
- ProbeEnabled *bool `json:"probeEnabled,omitempty"`
- // Path - Path which should be used as a prefix for all HTTP requests. Null means no path will be prefixed. Default value is null.
- Path *string `json:"path,omitempty"`
- // ProvisioningState - Provisioning state of the backend http settings resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
- ProvisioningState *string `json:"provisioningState,omitempty"`
-}
-
-// ApplicationGatewayConnectionDraining connection draining allows open connections to a backend server to be
-// active for a specified time after the backend server got removed from the configuration.
-type ApplicationGatewayConnectionDraining struct {
- // Enabled - Whether connection draining is enabled or not.
- Enabled *bool `json:"enabled,omitempty"`
- // DrainTimeoutInSec - The number of seconds connection draining is active. Acceptable values are from 1 second to 3600 seconds.
- DrainTimeoutInSec *int32 `json:"drainTimeoutInSec,omitempty"`
-}
-
-// ApplicationGatewayCustomError customer error of an application gateway.
-type ApplicationGatewayCustomError struct {
- // StatusCode - Status code of the application gateway customer error. Possible values include: 'HTTPStatus403', 'HTTPStatus502'
- StatusCode ApplicationGatewayCustomErrorStatusCode `json:"statusCode,omitempty"`
- // CustomErrorPageURL - Error page URL of the application gateway customer error.
- CustomErrorPageURL *string `json:"customErrorPageUrl,omitempty"`
-}
-
-// ApplicationGatewayFirewallDisabledRuleGroup allows to disable rules within a rule group or an entire rule
-// group.
-type ApplicationGatewayFirewallDisabledRuleGroup struct {
- // RuleGroupName - The name of the rule group that will be disabled.
- RuleGroupName *string `json:"ruleGroupName,omitempty"`
- // Rules - The list of rules that will be disabled. If null, all rules of the rule group will be disabled.
- Rules *[]int32 `json:"rules,omitempty"`
-}
-
-// ApplicationGatewayFirewallExclusion allow to exclude some variable satisfy the condition for the WAF check
-type ApplicationGatewayFirewallExclusion struct {
- // MatchVariable - The variable to be excluded.
- MatchVariable *string `json:"matchVariable,omitempty"`
- // SelectorMatchOperator - When matchVariable is a collection, operate on the selector to specify which elements in the collection this exclusion applies to.
- SelectorMatchOperator *string `json:"selectorMatchOperator,omitempty"`
- // Selector - When matchVariable is a collection, operator used to specify which elements in the collection this exclusion applies to.
- Selector *string `json:"selector,omitempty"`
-}
-
-// ApplicationGatewayFirewallRule a web application firewall rule.
-type ApplicationGatewayFirewallRule struct {
- // RuleID - The identifier of the web application firewall rule.
- RuleID *int32 `json:"ruleId,omitempty"`
- // Description - The description of the web application firewall rule.
- Description *string `json:"description,omitempty"`
-}
-
-// ApplicationGatewayFirewallRuleGroup a web application firewall rule group.
-type ApplicationGatewayFirewallRuleGroup struct {
- // RuleGroupName - The name of the web application firewall rule group.
- RuleGroupName *string `json:"ruleGroupName,omitempty"`
- // Description - The description of the web application firewall rule group.
- Description *string `json:"description,omitempty"`
- // Rules - The rules of the web application firewall rule group.
- Rules *[]ApplicationGatewayFirewallRule `json:"rules,omitempty"`
-}
-
-// ApplicationGatewayFirewallRuleSet a web application firewall rule set.
-type ApplicationGatewayFirewallRuleSet struct {
- *ApplicationGatewayFirewallRuleSetPropertiesFormat `json:"properties,omitempty"`
- // ID - 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 ApplicationGatewayFirewallRuleSet.
-func (agfrs ApplicationGatewayFirewallRuleSet) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if agfrs.ApplicationGatewayFirewallRuleSetPropertiesFormat != nil {
- objectMap["properties"] = agfrs.ApplicationGatewayFirewallRuleSetPropertiesFormat
- }
- if agfrs.ID != nil {
- objectMap["id"] = agfrs.ID
- }
- if agfrs.Location != nil {
- objectMap["location"] = agfrs.Location
- }
- if agfrs.Tags != nil {
- objectMap["tags"] = agfrs.Tags
- }
- return json.Marshal(objectMap)
-}
-
-// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayFirewallRuleSet struct.
-func (agfrs *ApplicationGatewayFirewallRuleSet) 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 applicationGatewayFirewallRuleSetPropertiesFormat ApplicationGatewayFirewallRuleSetPropertiesFormat
- err = json.Unmarshal(*v, &applicationGatewayFirewallRuleSetPropertiesFormat)
- if err != nil {
- return err
- }
- agfrs.ApplicationGatewayFirewallRuleSetPropertiesFormat = &applicationGatewayFirewallRuleSetPropertiesFormat
- }
- case "id":
- if v != nil {
- var ID string
- err = json.Unmarshal(*v, &ID)
- if err != nil {
- return err
- }
- agfrs.ID = &ID
- }
- case "name":
- if v != nil {
- var name string
- err = json.Unmarshal(*v, &name)
- if err != nil {
- return err
- }
- agfrs.Name = &name
- }
- case "type":
- if v != nil {
- var typeVar string
- err = json.Unmarshal(*v, &typeVar)
- if err != nil {
- return err
- }
- agfrs.Type = &typeVar
- }
- case "location":
- if v != nil {
- var location string
- err = json.Unmarshal(*v, &location)
- if err != nil {
- return err
- }
- agfrs.Location = &location
- }
- case "tags":
- if v != nil {
- var tags map[string]*string
- err = json.Unmarshal(*v, &tags)
- if err != nil {
- return err
- }
- agfrs.Tags = tags
- }
- }
- }
-
- return nil
-}
-
-// ApplicationGatewayFirewallRuleSetPropertiesFormat properties of the web application firewall rule set.
-type ApplicationGatewayFirewallRuleSetPropertiesFormat struct {
- // ProvisioningState - The provisioning state of the web application firewall rule set.
- ProvisioningState *string `json:"provisioningState,omitempty"`
- // RuleSetType - The type of the web application firewall rule set.
- RuleSetType *string `json:"ruleSetType,omitempty"`
- // RuleSetVersion - The version of the web application firewall rule set type.
- RuleSetVersion *string `json:"ruleSetVersion,omitempty"`
- // RuleGroups - The rule groups of the web application firewall rule set.
- RuleGroups *[]ApplicationGatewayFirewallRuleGroup `json:"ruleGroups,omitempty"`
-}
-
-// ApplicationGatewayFrontendIPConfiguration frontend IP configuration of an application gateway.
-type ApplicationGatewayFrontendIPConfiguration struct {
- *ApplicationGatewayFrontendIPConfigurationPropertiesFormat `json:"properties,omitempty"`
- // Name - Name of the frontend IP configuration that is unique within an Application Gateway.
- Name *string `json:"name,omitempty"`
- // Etag - A unique read-only string that changes whenever the resource is updated.
- Etag *string `json:"etag,omitempty"`
- // Type - Type of the resource.
- Type *string `json:"type,omitempty"`
- // ID - Resource ID.
- ID *string `json:"id,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for ApplicationGatewayFrontendIPConfiguration.
-func (agfic ApplicationGatewayFrontendIPConfiguration) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if agfic.ApplicationGatewayFrontendIPConfigurationPropertiesFormat != nil {
- objectMap["properties"] = agfic.ApplicationGatewayFrontendIPConfigurationPropertiesFormat
- }
- if agfic.Name != nil {
- objectMap["name"] = agfic.Name
- }
- if agfic.Etag != nil {
- objectMap["etag"] = agfic.Etag
- }
- if agfic.Type != nil {
- objectMap["type"] = agfic.Type
- }
- if agfic.ID != nil {
- objectMap["id"] = agfic.ID
- }
- return json.Marshal(objectMap)
-}
-
-// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayFrontendIPConfiguration struct.
-func (agfic *ApplicationGatewayFrontendIPConfiguration) 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 applicationGatewayFrontendIPConfigurationPropertiesFormat ApplicationGatewayFrontendIPConfigurationPropertiesFormat
- err = json.Unmarshal(*v, &applicationGatewayFrontendIPConfigurationPropertiesFormat)
- if err != nil {
- return err
- }
- agfic.ApplicationGatewayFrontendIPConfigurationPropertiesFormat = &applicationGatewayFrontendIPConfigurationPropertiesFormat
- }
- case "name":
- if v != nil {
- var name string
- err = json.Unmarshal(*v, &name)
- if err != nil {
- return err
- }
- agfic.Name = &name
- }
- case "etag":
- if v != nil {
- var etag string
- err = json.Unmarshal(*v, &etag)
- if err != nil {
- return err
- }
- agfic.Etag = &etag
- }
- case "type":
- if v != nil {
- var typeVar string
- err = json.Unmarshal(*v, &typeVar)
- if err != nil {
- return err
- }
- agfic.Type = &typeVar
- }
- case "id":
- if v != nil {
- var ID string
- err = json.Unmarshal(*v, &ID)
- if err != nil {
- return err
- }
- agfic.ID = &ID
- }
- }
- }
-
- return nil
-}
-
-// ApplicationGatewayFrontendIPConfigurationPropertiesFormat properties of Frontend IP configuration of an
-// application gateway.
-type ApplicationGatewayFrontendIPConfigurationPropertiesFormat struct {
- // PrivateIPAddress - PrivateIPAddress of the network interface IP Configuration.
- PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
- // PrivateIPAllocationMethod - PrivateIP allocation method. Possible values include: 'Static', 'Dynamic'
- PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
- // Subnet - Reference of the subnet resource.
- Subnet *SubResource `json:"subnet,omitempty"`
- // PublicIPAddress - Reference of the PublicIP resource.
- PublicIPAddress *SubResource `json:"publicIPAddress,omitempty"`
- // ProvisioningState - Provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
- ProvisioningState *string `json:"provisioningState,omitempty"`
-}
-
-// ApplicationGatewayFrontendPort frontend port of an application gateway.
-type ApplicationGatewayFrontendPort struct {
- *ApplicationGatewayFrontendPortPropertiesFormat `json:"properties,omitempty"`
- // Name - Name of the frontend port that is unique within an Application Gateway
- Name *string `json:"name,omitempty"`
- // Etag - A unique read-only string that changes whenever the resource is updated.
- Etag *string `json:"etag,omitempty"`
- // Type - Type of the resource.
- Type *string `json:"type,omitempty"`
- // ID - Resource ID.
- ID *string `json:"id,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for ApplicationGatewayFrontendPort.
-func (agfp ApplicationGatewayFrontendPort) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if agfp.ApplicationGatewayFrontendPortPropertiesFormat != nil {
- objectMap["properties"] = agfp.ApplicationGatewayFrontendPortPropertiesFormat
- }
- if agfp.Name != nil {
- objectMap["name"] = agfp.Name
- }
- if agfp.Etag != nil {
- objectMap["etag"] = agfp.Etag
- }
- if agfp.Type != nil {
- objectMap["type"] = agfp.Type
- }
- if agfp.ID != nil {
- objectMap["id"] = agfp.ID
- }
- return json.Marshal(objectMap)
-}
-
-// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayFrontendPort struct.
-func (agfp *ApplicationGatewayFrontendPort) 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 applicationGatewayFrontendPortPropertiesFormat ApplicationGatewayFrontendPortPropertiesFormat
- err = json.Unmarshal(*v, &applicationGatewayFrontendPortPropertiesFormat)
- if err != nil {
- return err
- }
- agfp.ApplicationGatewayFrontendPortPropertiesFormat = &applicationGatewayFrontendPortPropertiesFormat
- }
- case "name":
- if v != nil {
- var name string
- err = json.Unmarshal(*v, &name)
- if err != nil {
- return err
- }
- agfp.Name = &name
- }
- case "etag":
- if v != nil {
- var etag string
- err = json.Unmarshal(*v, &etag)
- if err != nil {
- return err
- }
- agfp.Etag = &etag
- }
- case "type":
- if v != nil {
- var typeVar string
- err = json.Unmarshal(*v, &typeVar)
- if err != nil {
- return err
- }
- agfp.Type = &typeVar
- }
- case "id":
- if v != nil {
- var ID string
- err = json.Unmarshal(*v, &ID)
- if err != nil {
- return err
- }
- agfp.ID = &ID
- }
- }
- }
-
- return nil
-}
-
-// ApplicationGatewayFrontendPortPropertiesFormat properties of Frontend port of an application gateway.
-type ApplicationGatewayFrontendPortPropertiesFormat struct {
- // Port - Frontend port
- Port *int32 `json:"port,omitempty"`
- // ProvisioningState - Provisioning state of the frontend port resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
- ProvisioningState *string `json:"provisioningState,omitempty"`
-}
-
-// ApplicationGatewayHeaderConfiguration header configuration of the Actions set in Application Gateway.
-type ApplicationGatewayHeaderConfiguration struct {
- // HeaderName - Header name of the header configuration
- HeaderName *string `json:"headerName,omitempty"`
- // HeaderValue - Header value of the header configuration
- HeaderValue *string `json:"headerValue,omitempty"`
-}
-
-// ApplicationGatewayHTTPListener http listener of an application gateway.
-type ApplicationGatewayHTTPListener struct {
- *ApplicationGatewayHTTPListenerPropertiesFormat `json:"properties,omitempty"`
- // Name - Name of the HTTP listener that is unique within an Application Gateway.
- Name *string `json:"name,omitempty"`
- // Etag - A unique read-only string that changes whenever the resource is updated.
- Etag *string `json:"etag,omitempty"`
- // Type - Type of the resource.
- Type *string `json:"type,omitempty"`
- // ID - Resource ID.
- ID *string `json:"id,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for ApplicationGatewayHTTPListener.
-func (aghl ApplicationGatewayHTTPListener) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if aghl.ApplicationGatewayHTTPListenerPropertiesFormat != nil {
- objectMap["properties"] = aghl.ApplicationGatewayHTTPListenerPropertiesFormat
- }
- if aghl.Name != nil {
- objectMap["name"] = aghl.Name
- }
- if aghl.Etag != nil {
- objectMap["etag"] = aghl.Etag
- }
- if aghl.Type != nil {
- objectMap["type"] = aghl.Type
- }
- if aghl.ID != nil {
- objectMap["id"] = aghl.ID
- }
- return json.Marshal(objectMap)
-}
-
-// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayHTTPListener struct.
-func (aghl *ApplicationGatewayHTTPListener) 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 applicationGatewayHTTPListenerPropertiesFormat ApplicationGatewayHTTPListenerPropertiesFormat
- err = json.Unmarshal(*v, &applicationGatewayHTTPListenerPropertiesFormat)
- if err != nil {
- return err
- }
- aghl.ApplicationGatewayHTTPListenerPropertiesFormat = &applicationGatewayHTTPListenerPropertiesFormat
- }
- case "name":
- if v != nil {
- var name string
- err = json.Unmarshal(*v, &name)
- if err != nil {
- return err
- }
- aghl.Name = &name
- }
- case "etag":
- if v != nil {
- var etag string
- err = json.Unmarshal(*v, &etag)
- if err != nil {
- return err
- }
- aghl.Etag = &etag
- }
- case "type":
- if v != nil {
- var typeVar string
- err = json.Unmarshal(*v, &typeVar)
- if err != nil {
- return err
- }
- aghl.Type = &typeVar
- }
- case "id":
- if v != nil {
- var ID string
- err = json.Unmarshal(*v, &ID)
- if err != nil {
- return err
- }
- aghl.ID = &ID
- }
- }
- }
-
- return nil
-}
-
-// ApplicationGatewayHTTPListenerPropertiesFormat properties of HTTP listener of an application gateway.
-type ApplicationGatewayHTTPListenerPropertiesFormat struct {
- // FrontendIPConfiguration - Frontend IP configuration resource of an application gateway.
- FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"`
- // FrontendPort - Frontend port resource of an application gateway.
- FrontendPort *SubResource `json:"frontendPort,omitempty"`
- // Protocol - Protocol of the HTTP listener. Possible values are 'Http' and 'Https'. Possible values include: 'HTTP', 'HTTPS'
- Protocol ApplicationGatewayProtocol `json:"protocol,omitempty"`
- // HostName - Host name of HTTP listener.
- HostName *string `json:"hostName,omitempty"`
- // SslCertificate - SSL certificate resource of an application gateway.
- SslCertificate *SubResource `json:"sslCertificate,omitempty"`
- // RequireServerNameIndication - Applicable only if protocol is https. Enables SNI for multi-hosting.
- RequireServerNameIndication *bool `json:"requireServerNameIndication,omitempty"`
- // ProvisioningState - Provisioning state of the HTTP listener resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
- ProvisioningState *string `json:"provisioningState,omitempty"`
- // CustomErrorConfigurations - Custom error configurations of the HTTP listener.
- CustomErrorConfigurations *[]ApplicationGatewayCustomError `json:"customErrorConfigurations,omitempty"`
-}
-
-// ApplicationGatewayIPConfiguration IP configuration of an application gateway. Currently 1 public and 1
-// private IP configuration is allowed.
-type ApplicationGatewayIPConfiguration struct {
- *ApplicationGatewayIPConfigurationPropertiesFormat `json:"properties,omitempty"`
- // Name - Name of the IP configuration that is unique within an Application Gateway.
- Name *string `json:"name,omitempty"`
- // Etag - A unique read-only string that changes whenever the resource is updated.
- Etag *string `json:"etag,omitempty"`
- // Type - Type of the resource.
- Type *string `json:"type,omitempty"`
- // ID - Resource ID.
- ID *string `json:"id,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for ApplicationGatewayIPConfiguration.
-func (agic ApplicationGatewayIPConfiguration) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if agic.ApplicationGatewayIPConfigurationPropertiesFormat != nil {
- objectMap["properties"] = agic.ApplicationGatewayIPConfigurationPropertiesFormat
- }
- if agic.Name != nil {
- objectMap["name"] = agic.Name
- }
- if agic.Etag != nil {
- objectMap["etag"] = agic.Etag
- }
- if agic.Type != nil {
- objectMap["type"] = agic.Type
- }
- if agic.ID != nil {
- objectMap["id"] = agic.ID
- }
- return json.Marshal(objectMap)
-}
-
-// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayIPConfiguration struct.
-func (agic *ApplicationGatewayIPConfiguration) 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 applicationGatewayIPConfigurationPropertiesFormat ApplicationGatewayIPConfigurationPropertiesFormat
- err = json.Unmarshal(*v, &applicationGatewayIPConfigurationPropertiesFormat)
- if err != nil {
- return err
- }
- agic.ApplicationGatewayIPConfigurationPropertiesFormat = &applicationGatewayIPConfigurationPropertiesFormat
- }
- case "name":
- if v != nil {
- var name string
- err = json.Unmarshal(*v, &name)
- if err != nil {
- return err
- }
- agic.Name = &name
- }
- case "etag":
- if v != nil {
- var etag string
- err = json.Unmarshal(*v, &etag)
- if err != nil {
- return err
- }
- agic.Etag = &etag
- }
- case "type":
- if v != nil {
- var typeVar string
- err = json.Unmarshal(*v, &typeVar)
- if err != nil {
- return err
- }
- agic.Type = &typeVar
- }
- case "id":
- if v != nil {
- var ID string
- err = json.Unmarshal(*v, &ID)
- if err != nil {
- return err
- }
- agic.ID = &ID
- }
- }
- }
-
- return nil
-}
-
-// ApplicationGatewayIPConfigurationPropertiesFormat properties of IP configuration of an application gateway.
-type ApplicationGatewayIPConfigurationPropertiesFormat struct {
- // Subnet - Reference of the subnet resource. A subnet from where application gateway gets its private address.
- Subnet *SubResource `json:"subnet,omitempty"`
- // ProvisioningState - Provisioning state of the application gateway subnet resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
- ProvisioningState *string `json:"provisioningState,omitempty"`
-}
-
-// ApplicationGatewayListResult response for ListApplicationGateways API service call.
-type ApplicationGatewayListResult struct {
- autorest.Response `json:"-"`
- // Value - List of an application gateways in a resource group.
- Value *[]ApplicationGateway `json:"value,omitempty"`
- // NextLink - URL to get the next set of results.
- NextLink *string `json:"nextLink,omitempty"`
-}
-
-// ApplicationGatewayListResultIterator provides access to a complete listing of ApplicationGateway values.
-type ApplicationGatewayListResultIterator struct {
- i int
- page ApplicationGatewayListResultPage
-}
-
-// 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 *ApplicationGatewayListResultIterator) NextWithContext(ctx context.Context) (err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewayListResultIterator.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 *ApplicationGatewayListResultIterator) Next() error {
- return iter.NextWithContext(context.Background())
-}
-
-// NotDone returns true if the enumeration should be started or is not yet complete.
-func (iter ApplicationGatewayListResultIterator) 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 ApplicationGatewayListResultIterator) Response() ApplicationGatewayListResult {
- 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 ApplicationGatewayListResultIterator) Value() ApplicationGateway {
- if !iter.page.NotDone() {
- return ApplicationGateway{}
- }
- return iter.page.Values()[iter.i]
-}
-
-// Creates a new instance of the ApplicationGatewayListResultIterator type.
-func NewApplicationGatewayListResultIterator(page ApplicationGatewayListResultPage) ApplicationGatewayListResultIterator {
- return ApplicationGatewayListResultIterator{page: page}
-}
-
-// IsEmpty returns true if the ListResult contains no values.
-func (aglr ApplicationGatewayListResult) IsEmpty() bool {
- return aglr.Value == nil || len(*aglr.Value) == 0
-}
-
-// hasNextLink returns true if the NextLink is not empty.
-func (aglr ApplicationGatewayListResult) hasNextLink() bool {
- return aglr.NextLink != nil && len(*aglr.NextLink) != 0
-}
-
-// applicationGatewayListResultPreparer prepares a request to retrieve the next set of results.
-// It returns nil if no more results exist.
-func (aglr ApplicationGatewayListResult) applicationGatewayListResultPreparer(ctx context.Context) (*http.Request, error) {
- if !aglr.hasNextLink() {
- return nil, nil
- }
- return autorest.Prepare((&http.Request{}).WithContext(ctx),
- autorest.AsJSON(),
- autorest.AsGet(),
- autorest.WithBaseURL(to.String(aglr.NextLink)))
-}
-
-// ApplicationGatewayListResultPage contains a page of ApplicationGateway values.
-type ApplicationGatewayListResultPage struct {
- fn func(context.Context, ApplicationGatewayListResult) (ApplicationGatewayListResult, error)
- aglr ApplicationGatewayListResult
-}
-
-// 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 *ApplicationGatewayListResultPage) NextWithContext(ctx context.Context) (err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewayListResultPage.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.aglr)
- if err != nil {
- return err
- }
- page.aglr = 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 *ApplicationGatewayListResultPage) Next() error {
- return page.NextWithContext(context.Background())
-}
-
-// NotDone returns true if the page enumeration should be started or is not yet complete.
-func (page ApplicationGatewayListResultPage) NotDone() bool {
- return !page.aglr.IsEmpty()
-}
-
-// Response returns the raw server response from the last page request.
-func (page ApplicationGatewayListResultPage) Response() ApplicationGatewayListResult {
- return page.aglr
-}
-
-// Values returns the slice of values for the current page or nil if there are no values.
-func (page ApplicationGatewayListResultPage) Values() []ApplicationGateway {
- if page.aglr.IsEmpty() {
- return nil
- }
- return *page.aglr.Value
-}
-
-// Creates a new instance of the ApplicationGatewayListResultPage type.
-func NewApplicationGatewayListResultPage(getNextPage func(context.Context, ApplicationGatewayListResult) (ApplicationGatewayListResult, error)) ApplicationGatewayListResultPage {
- return ApplicationGatewayListResultPage{fn: getNextPage}
-}
-
-// ApplicationGatewayPathRule path rule of URL path map of an application gateway.
-type ApplicationGatewayPathRule struct {
- *ApplicationGatewayPathRulePropertiesFormat `json:"properties,omitempty"`
- // Name - Name of the path rule that is unique within an Application Gateway.
- Name *string `json:"name,omitempty"`
- // Etag - A unique read-only string that changes whenever the resource is updated.
- Etag *string `json:"etag,omitempty"`
- // Type - Type of the resource.
- Type *string `json:"type,omitempty"`
- // ID - Resource ID.
- ID *string `json:"id,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for ApplicationGatewayPathRule.
-func (agpr ApplicationGatewayPathRule) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if agpr.ApplicationGatewayPathRulePropertiesFormat != nil {
- objectMap["properties"] = agpr.ApplicationGatewayPathRulePropertiesFormat
- }
- if agpr.Name != nil {
- objectMap["name"] = agpr.Name
- }
- if agpr.Etag != nil {
- objectMap["etag"] = agpr.Etag
- }
- if agpr.Type != nil {
- objectMap["type"] = agpr.Type
- }
- if agpr.ID != nil {
- objectMap["id"] = agpr.ID
- }
- return json.Marshal(objectMap)
-}
-
-// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayPathRule struct.
-func (agpr *ApplicationGatewayPathRule) 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 applicationGatewayPathRulePropertiesFormat ApplicationGatewayPathRulePropertiesFormat
- err = json.Unmarshal(*v, &applicationGatewayPathRulePropertiesFormat)
- if err != nil {
- return err
- }
- agpr.ApplicationGatewayPathRulePropertiesFormat = &applicationGatewayPathRulePropertiesFormat
- }
- case "name":
- if v != nil {
- var name string
- err = json.Unmarshal(*v, &name)
- if err != nil {
- return err
- }
- agpr.Name = &name
- }
- case "etag":
- if v != nil {
- var etag string
- err = json.Unmarshal(*v, &etag)
- if err != nil {
- return err
- }
- agpr.Etag = &etag
- }
- case "type":
- if v != nil {
- var typeVar string
- err = json.Unmarshal(*v, &typeVar)
- if err != nil {
- return err
- }
- agpr.Type = &typeVar
- }
- case "id":
- if v != nil {
- var ID string
- err = json.Unmarshal(*v, &ID)
- if err != nil {
- return err
- }
- agpr.ID = &ID
- }
- }
- }
-
- return nil
-}
-
-// ApplicationGatewayPathRulePropertiesFormat properties of path rule of an application gateway.
-type ApplicationGatewayPathRulePropertiesFormat struct {
- // Paths - Path rules of URL path map.
- Paths *[]string `json:"paths,omitempty"`
- // BackendAddressPool - Backend address pool resource of URL path map path rule.
- BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"`
- // BackendHTTPSettings - Backend http settings resource of URL path map path rule.
- BackendHTTPSettings *SubResource `json:"backendHttpSettings,omitempty"`
- // RedirectConfiguration - Redirect configuration resource of URL path map path rule.
- RedirectConfiguration *SubResource `json:"redirectConfiguration,omitempty"`
- // RewriteRuleSet - Rewrite rule set resource of URL path map path rule.
- RewriteRuleSet *SubResource `json:"rewriteRuleSet,omitempty"`
- // ProvisioningState - Path rule of URL path map resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
- ProvisioningState *string `json:"provisioningState,omitempty"`
-}
-
-// ApplicationGatewayProbe probe of the application gateway.
-type ApplicationGatewayProbe struct {
- *ApplicationGatewayProbePropertiesFormat `json:"properties,omitempty"`
- // Name - Name of the probe that is unique within an Application Gateway.
- Name *string `json:"name,omitempty"`
- // Etag - A unique read-only string that changes whenever the resource is updated.
- Etag *string `json:"etag,omitempty"`
- // Type - Type of the resource.
- Type *string `json:"type,omitempty"`
- // ID - Resource ID.
- ID *string `json:"id,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for ApplicationGatewayProbe.
-func (agp ApplicationGatewayProbe) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if agp.ApplicationGatewayProbePropertiesFormat != nil {
- objectMap["properties"] = agp.ApplicationGatewayProbePropertiesFormat
- }
- if agp.Name != nil {
- objectMap["name"] = agp.Name
- }
- if agp.Etag != nil {
- objectMap["etag"] = agp.Etag
- }
- if agp.Type != nil {
- objectMap["type"] = agp.Type
- }
- if agp.ID != nil {
- objectMap["id"] = agp.ID
- }
- return json.Marshal(objectMap)
-}
-
-// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayProbe struct.
-func (agp *ApplicationGatewayProbe) 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 applicationGatewayProbePropertiesFormat ApplicationGatewayProbePropertiesFormat
- err = json.Unmarshal(*v, &applicationGatewayProbePropertiesFormat)
- if err != nil {
- return err
- }
- agp.ApplicationGatewayProbePropertiesFormat = &applicationGatewayProbePropertiesFormat
- }
- case "name":
- if v != nil {
- var name string
- err = json.Unmarshal(*v, &name)
- if err != nil {
- return err
- }
- agp.Name = &name
- }
- case "etag":
- if v != nil {
- var etag string
- err = json.Unmarshal(*v, &etag)
- if err != nil {
- return err
- }
- agp.Etag = &etag
- }
- case "type":
- if v != nil {
- var typeVar string
- err = json.Unmarshal(*v, &typeVar)
- if err != nil {
- return err
- }
- agp.Type = &typeVar
- }
- case "id":
- if v != nil {
- var ID string
- err = json.Unmarshal(*v, &ID)
- if err != nil {
- return err
- }
- agp.ID = &ID
- }
- }
- }
-
- return nil
-}
-
-// ApplicationGatewayProbeHealthResponseMatch application gateway probe health response match
-type ApplicationGatewayProbeHealthResponseMatch struct {
- // Body - Body that must be contained in the health response. Default value is empty.
- Body *string `json:"body,omitempty"`
- // StatusCodes - Allowed ranges of healthy status codes. Default range of healthy status codes is 200-399.
- StatusCodes *[]string `json:"statusCodes,omitempty"`
-}
-
-// ApplicationGatewayProbePropertiesFormat properties of probe of an application gateway.
-type ApplicationGatewayProbePropertiesFormat struct {
- // Protocol - The protocol used for the probe. Possible values are 'Http' and 'Https'. Possible values include: 'HTTP', 'HTTPS'
- Protocol ApplicationGatewayProtocol `json:"protocol,omitempty"`
- // Host - Host name to send the probe to.
- Host *string `json:"host,omitempty"`
- // Path - Relative path of probe. Valid path starts from '/'. Probe is sent to ://:
- Path *string `json:"path,omitempty"`
- // Interval - The probing interval in seconds. This is the time interval between two consecutive probes. Acceptable values are from 1 second to 86400 seconds.
- Interval *int32 `json:"interval,omitempty"`
- // Timeout - The probe timeout in seconds. Probe marked as failed if valid response is not received with this timeout period. Acceptable values are from 1 second to 86400 seconds.
- Timeout *int32 `json:"timeout,omitempty"`
- // UnhealthyThreshold - The probe retry count. Backend server is marked down after consecutive probe failure count reaches UnhealthyThreshold. Acceptable values are from 1 second to 20.
- UnhealthyThreshold *int32 `json:"unhealthyThreshold,omitempty"`
- // PickHostNameFromBackendHTTPSettings - Whether the host header should be picked from the backend http settings. Default value is false.
- PickHostNameFromBackendHTTPSettings *bool `json:"pickHostNameFromBackendHttpSettings,omitempty"`
- // MinServers - Minimum number of servers that are always marked healthy. Default value is 0.
- MinServers *int32 `json:"minServers,omitempty"`
- // Match - Criterion for classifying a healthy probe response.
- Match *ApplicationGatewayProbeHealthResponseMatch `json:"match,omitempty"`
- // ProvisioningState - Provisioning state of the backend http settings resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
- ProvisioningState *string `json:"provisioningState,omitempty"`
-}
-
-// ApplicationGatewayPropertiesFormat properties of the application gateway.
-type ApplicationGatewayPropertiesFormat struct {
- // Sku - SKU of the application gateway resource.
- Sku *ApplicationGatewaySku `json:"sku,omitempty"`
- // SslPolicy - SSL policy of the application gateway resource.
- SslPolicy *ApplicationGatewaySslPolicy `json:"sslPolicy,omitempty"`
- // OperationalState - READ-ONLY; Operational state of the application gateway resource. Possible values include: 'Stopped', 'Starting', 'Running', 'Stopping'
- OperationalState ApplicationGatewayOperationalState `json:"operationalState,omitempty"`
- // GatewayIPConfigurations - Subnets of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits).
- GatewayIPConfigurations *[]ApplicationGatewayIPConfiguration `json:"gatewayIPConfigurations,omitempty"`
- // AuthenticationCertificates - Authentication certificates of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits).
- AuthenticationCertificates *[]ApplicationGatewayAuthenticationCertificate `json:"authenticationCertificates,omitempty"`
- // TrustedRootCertificates - Trusted Root certificates of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits).
- TrustedRootCertificates *[]ApplicationGatewayTrustedRootCertificate `json:"trustedRootCertificates,omitempty"`
- // SslCertificates - SSL certificates of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits).
- SslCertificates *[]ApplicationGatewaySslCertificate `json:"sslCertificates,omitempty"`
- // FrontendIPConfigurations - Frontend IP addresses of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits).
- FrontendIPConfigurations *[]ApplicationGatewayFrontendIPConfiguration `json:"frontendIPConfigurations,omitempty"`
- // FrontendPorts - Frontend ports of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits).
- FrontendPorts *[]ApplicationGatewayFrontendPort `json:"frontendPorts,omitempty"`
- // Probes - Probes of the application gateway resource.
- Probes *[]ApplicationGatewayProbe `json:"probes,omitempty"`
- // BackendAddressPools - Backend address pool of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits).
- BackendAddressPools *[]ApplicationGatewayBackendAddressPool `json:"backendAddressPools,omitempty"`
- // BackendHTTPSettingsCollection - Backend http settings of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits).
- BackendHTTPSettingsCollection *[]ApplicationGatewayBackendHTTPSettings `json:"backendHttpSettingsCollection,omitempty"`
- // HTTPListeners - Http listeners of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits).
- HTTPListeners *[]ApplicationGatewayHTTPListener `json:"httpListeners,omitempty"`
- // URLPathMaps - URL path map of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits).
- URLPathMaps *[]ApplicationGatewayURLPathMap `json:"urlPathMaps,omitempty"`
- // RequestRoutingRules - Request routing rules of the application gateway resource.
- RequestRoutingRules *[]ApplicationGatewayRequestRoutingRule `json:"requestRoutingRules,omitempty"`
- // RewriteRuleSets - Rewrite rules for the application gateway resource.
- RewriteRuleSets *[]ApplicationGatewayRewriteRuleSet `json:"rewriteRuleSets,omitempty"`
- // RedirectConfigurations - Redirect configurations of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits).
- RedirectConfigurations *[]ApplicationGatewayRedirectConfiguration `json:"redirectConfigurations,omitempty"`
- // WebApplicationFirewallConfiguration - Web application firewall configuration.
- WebApplicationFirewallConfiguration *ApplicationGatewayWebApplicationFirewallConfiguration `json:"webApplicationFirewallConfiguration,omitempty"`
- // FirewallPolicy - Reference of the FirewallPolicy resource.
- FirewallPolicy *SubResource `json:"firewallPolicy,omitempty"`
- // EnableHTTP2 - Whether HTTP2 is enabled on the application gateway resource.
- EnableHTTP2 *bool `json:"enableHttp2,omitempty"`
- // EnableFips - Whether FIPS is enabled on the application gateway resource.
- EnableFips *bool `json:"enableFips,omitempty"`
- // AutoscaleConfiguration - Autoscale Configuration.
- AutoscaleConfiguration *ApplicationGatewayAutoscaleConfiguration `json:"autoscaleConfiguration,omitempty"`
- // ResourceGUID - Resource GUID property of the application gateway resource.
- ResourceGUID *string `json:"resourceGuid,omitempty"`
- // ProvisioningState - Provisioning state of the application gateway resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
- ProvisioningState *string `json:"provisioningState,omitempty"`
- // CustomErrorConfigurations - Custom error configurations of the application gateway resource.
- CustomErrorConfigurations *[]ApplicationGatewayCustomError `json:"customErrorConfigurations,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for ApplicationGatewayPropertiesFormat.
-func (agpf ApplicationGatewayPropertiesFormat) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if agpf.Sku != nil {
- objectMap["sku"] = agpf.Sku
- }
- if agpf.SslPolicy != nil {
- objectMap["sslPolicy"] = agpf.SslPolicy
- }
- if agpf.GatewayIPConfigurations != nil {
- objectMap["gatewayIPConfigurations"] = agpf.GatewayIPConfigurations
- }
- if agpf.AuthenticationCertificates != nil {
- objectMap["authenticationCertificates"] = agpf.AuthenticationCertificates
- }
- if agpf.TrustedRootCertificates != nil {
- objectMap["trustedRootCertificates"] = agpf.TrustedRootCertificates
- }
- if agpf.SslCertificates != nil {
- objectMap["sslCertificates"] = agpf.SslCertificates
- }
- if agpf.FrontendIPConfigurations != nil {
- objectMap["frontendIPConfigurations"] = agpf.FrontendIPConfigurations
- }
- if agpf.FrontendPorts != nil {
- objectMap["frontendPorts"] = agpf.FrontendPorts
- }
- if agpf.Probes != nil {
- objectMap["probes"] = agpf.Probes
- }
- if agpf.BackendAddressPools != nil {
- objectMap["backendAddressPools"] = agpf.BackendAddressPools
- }
- if agpf.BackendHTTPSettingsCollection != nil {
- objectMap["backendHttpSettingsCollection"] = agpf.BackendHTTPSettingsCollection
- }
- if agpf.HTTPListeners != nil {
- objectMap["httpListeners"] = agpf.HTTPListeners
- }
- if agpf.URLPathMaps != nil {
- objectMap["urlPathMaps"] = agpf.URLPathMaps
- }
- if agpf.RequestRoutingRules != nil {
- objectMap["requestRoutingRules"] = agpf.RequestRoutingRules
- }
- if agpf.RewriteRuleSets != nil {
- objectMap["rewriteRuleSets"] = agpf.RewriteRuleSets
- }
- if agpf.RedirectConfigurations != nil {
- objectMap["redirectConfigurations"] = agpf.RedirectConfigurations
- }
- if agpf.WebApplicationFirewallConfiguration != nil {
- objectMap["webApplicationFirewallConfiguration"] = agpf.WebApplicationFirewallConfiguration
- }
- if agpf.FirewallPolicy != nil {
- objectMap["firewallPolicy"] = agpf.FirewallPolicy
- }
- if agpf.EnableHTTP2 != nil {
- objectMap["enableHttp2"] = agpf.EnableHTTP2
- }
- if agpf.EnableFips != nil {
- objectMap["enableFips"] = agpf.EnableFips
- }
- if agpf.AutoscaleConfiguration != nil {
- objectMap["autoscaleConfiguration"] = agpf.AutoscaleConfiguration
- }
- if agpf.ResourceGUID != nil {
- objectMap["resourceGuid"] = agpf.ResourceGUID
- }
- if agpf.ProvisioningState != nil {
- objectMap["provisioningState"] = agpf.ProvisioningState
- }
- if agpf.CustomErrorConfigurations != nil {
- objectMap["customErrorConfigurations"] = agpf.CustomErrorConfigurations
- }
- return json.Marshal(objectMap)
-}
-
-// ApplicationGatewayRedirectConfiguration redirect configuration of an application gateway.
-type ApplicationGatewayRedirectConfiguration struct {
- *ApplicationGatewayRedirectConfigurationPropertiesFormat `json:"properties,omitempty"`
- // Name - Name of the redirect configuration that is unique within an Application Gateway.
- Name *string `json:"name,omitempty"`
- // Etag - A unique read-only string that changes whenever the resource is updated.
- Etag *string `json:"etag,omitempty"`
- // Type - Type of the resource.
- Type *string `json:"type,omitempty"`
- // ID - Resource ID.
- ID *string `json:"id,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for ApplicationGatewayRedirectConfiguration.
-func (agrc ApplicationGatewayRedirectConfiguration) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if agrc.ApplicationGatewayRedirectConfigurationPropertiesFormat != nil {
- objectMap["properties"] = agrc.ApplicationGatewayRedirectConfigurationPropertiesFormat
- }
- if agrc.Name != nil {
- objectMap["name"] = agrc.Name
- }
- if agrc.Etag != nil {
- objectMap["etag"] = agrc.Etag
- }
- if agrc.Type != nil {
- objectMap["type"] = agrc.Type
- }
- if agrc.ID != nil {
- objectMap["id"] = agrc.ID
- }
- return json.Marshal(objectMap)
-}
-
-// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayRedirectConfiguration struct.
-func (agrc *ApplicationGatewayRedirectConfiguration) 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 applicationGatewayRedirectConfigurationPropertiesFormat ApplicationGatewayRedirectConfigurationPropertiesFormat
- err = json.Unmarshal(*v, &applicationGatewayRedirectConfigurationPropertiesFormat)
- if err != nil {
- return err
- }
- agrc.ApplicationGatewayRedirectConfigurationPropertiesFormat = &applicationGatewayRedirectConfigurationPropertiesFormat
- }
- case "name":
- if v != nil {
- var name string
- err = json.Unmarshal(*v, &name)
- if err != nil {
- return err
- }
- agrc.Name = &name
- }
- case "etag":
- if v != nil {
- var etag string
- err = json.Unmarshal(*v, &etag)
- if err != nil {
- return err
- }
- agrc.Etag = &etag
- }
- case "type":
- if v != nil {
- var typeVar string
- err = json.Unmarshal(*v, &typeVar)
- if err != nil {
- return err
- }
- agrc.Type = &typeVar
- }
- case "id":
- if v != nil {
- var ID string
- err = json.Unmarshal(*v, &ID)
- if err != nil {
- return err
- }
- agrc.ID = &ID
- }
- }
- }
-
- return nil
-}
-
-// ApplicationGatewayRedirectConfigurationPropertiesFormat properties of redirect configuration of the
-// application gateway.
-type ApplicationGatewayRedirectConfigurationPropertiesFormat struct {
- // RedirectType - Supported http redirection types - Permanent, Temporary, Found, SeeOther. Possible values include: 'Permanent', 'Found', 'SeeOther', 'Temporary'
- RedirectType ApplicationGatewayRedirectType `json:"redirectType,omitempty"`
- // TargetListener - Reference to a listener to redirect the request to.
- TargetListener *SubResource `json:"targetListener,omitempty"`
- // TargetURL - Url to redirect the request to.
- TargetURL *string `json:"targetUrl,omitempty"`
- // IncludePath - Include path in the redirected url.
- IncludePath *bool `json:"includePath,omitempty"`
- // IncludeQueryString - Include query string in the redirected url.
- IncludeQueryString *bool `json:"includeQueryString,omitempty"`
- // RequestRoutingRules - Request routing specifying redirect configuration.
- RequestRoutingRules *[]SubResource `json:"requestRoutingRules,omitempty"`
- // URLPathMaps - Url path maps specifying default redirect configuration.
- URLPathMaps *[]SubResource `json:"urlPathMaps,omitempty"`
- // PathRules - Path rules specifying redirect configuration.
- PathRules *[]SubResource `json:"pathRules,omitempty"`
-}
-
-// ApplicationGatewayRequestRoutingRule request routing rule of an application gateway.
-type ApplicationGatewayRequestRoutingRule struct {
- *ApplicationGatewayRequestRoutingRulePropertiesFormat `json:"properties,omitempty"`
- // Name - Name of the request routing rule that is unique within an Application Gateway.
- Name *string `json:"name,omitempty"`
- // Etag - A unique read-only string that changes whenever the resource is updated.
- Etag *string `json:"etag,omitempty"`
- // Type - Type of the resource.
- Type *string `json:"type,omitempty"`
- // ID - Resource ID.
- ID *string `json:"id,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for ApplicationGatewayRequestRoutingRule.
-func (agrrr ApplicationGatewayRequestRoutingRule) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if agrrr.ApplicationGatewayRequestRoutingRulePropertiesFormat != nil {
- objectMap["properties"] = agrrr.ApplicationGatewayRequestRoutingRulePropertiesFormat
- }
- if agrrr.Name != nil {
- objectMap["name"] = agrrr.Name
- }
- if agrrr.Etag != nil {
- objectMap["etag"] = agrrr.Etag
- }
- if agrrr.Type != nil {
- objectMap["type"] = agrrr.Type
- }
- if agrrr.ID != nil {
- objectMap["id"] = agrrr.ID
- }
- return json.Marshal(objectMap)
-}
-
-// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayRequestRoutingRule struct.
-func (agrrr *ApplicationGatewayRequestRoutingRule) 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 applicationGatewayRequestRoutingRulePropertiesFormat ApplicationGatewayRequestRoutingRulePropertiesFormat
- err = json.Unmarshal(*v, &applicationGatewayRequestRoutingRulePropertiesFormat)
- if err != nil {
- return err
- }
- agrrr.ApplicationGatewayRequestRoutingRulePropertiesFormat = &applicationGatewayRequestRoutingRulePropertiesFormat
- }
- case "name":
- if v != nil {
- var name string
- err = json.Unmarshal(*v, &name)
- if err != nil {
- return err
- }
- agrrr.Name = &name
- }
- case "etag":
- if v != nil {
- var etag string
- err = json.Unmarshal(*v, &etag)
- if err != nil {
- return err
- }
- agrrr.Etag = &etag
- }
- case "type":
- if v != nil {
- var typeVar string
- err = json.Unmarshal(*v, &typeVar)
- if err != nil {
- return err
- }
- agrrr.Type = &typeVar
- }
- case "id":
- if v != nil {
- var ID string
- err = json.Unmarshal(*v, &ID)
- if err != nil {
- return err
- }
- agrrr.ID = &ID
- }
- }
- }
-
- return nil
-}
-
-// ApplicationGatewayRequestRoutingRulePropertiesFormat properties of request routing rule of the application
-// gateway.
-type ApplicationGatewayRequestRoutingRulePropertiesFormat struct {
- // RuleType - Rule type. Possible values include: 'Basic', 'PathBasedRouting'
- RuleType ApplicationGatewayRequestRoutingRuleType `json:"ruleType,omitempty"`
- // BackendAddressPool - Backend address pool resource of the application gateway.
- BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"`
- // BackendHTTPSettings - Backend http settings resource of the application gateway.
- BackendHTTPSettings *SubResource `json:"backendHttpSettings,omitempty"`
- // HTTPListener - Http listener resource of the application gateway.
- HTTPListener *SubResource `json:"httpListener,omitempty"`
- // URLPathMap - URL path map resource of the application gateway.
- URLPathMap *SubResource `json:"urlPathMap,omitempty"`
- // RewriteRuleSet - Rewrite Rule Set resource in Basic rule of the application gateway.
- RewriteRuleSet *SubResource `json:"rewriteRuleSet,omitempty"`
- // RedirectConfiguration - Redirect configuration resource of the application gateway.
- RedirectConfiguration *SubResource `json:"redirectConfiguration,omitempty"`
- // ProvisioningState - Provisioning state of the request routing rule resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
- ProvisioningState *string `json:"provisioningState,omitempty"`
-}
-
-// ApplicationGatewayRewriteRule rewrite rule of an application gateway.
-type ApplicationGatewayRewriteRule struct {
- // Name - Name of the rewrite rule that is unique within an Application Gateway.
- Name *string `json:"name,omitempty"`
- // RuleSequence - Rule Sequence of the rewrite rule that determines the order of execution of a particular rule in a RewriteRuleSet.
- RuleSequence *int32 `json:"ruleSequence,omitempty"`
- // Conditions - Conditions based on which the action set execution will be evaluated.
- Conditions *[]ApplicationGatewayRewriteRuleCondition `json:"conditions,omitempty"`
- // ActionSet - Set of actions to be done as part of the rewrite Rule.
- ActionSet *ApplicationGatewayRewriteRuleActionSet `json:"actionSet,omitempty"`
-}
-
-// ApplicationGatewayRewriteRuleActionSet set of actions in the Rewrite Rule in Application Gateway.
-type ApplicationGatewayRewriteRuleActionSet struct {
- // RequestHeaderConfigurations - Request Header Actions in the Action Set
- RequestHeaderConfigurations *[]ApplicationGatewayHeaderConfiguration `json:"requestHeaderConfigurations,omitempty"`
- // ResponseHeaderConfigurations - Response Header Actions in the Action Set
- ResponseHeaderConfigurations *[]ApplicationGatewayHeaderConfiguration `json:"responseHeaderConfigurations,omitempty"`
-}
-
-// ApplicationGatewayRewriteRuleCondition set of conditions in the Rewrite Rule in Application Gateway.
-type ApplicationGatewayRewriteRuleCondition struct {
- // Variable - The condition parameter of the RewriteRuleCondition.
- Variable *string `json:"variable,omitempty"`
- // Pattern - The pattern, either fixed string or regular expression, that evaluates the truthfulness of the condition
- Pattern *string `json:"pattern,omitempty"`
- // IgnoreCase - Setting this paramter to truth value with force the pattern to do a case in-sensitive comparison.
- IgnoreCase *bool `json:"ignoreCase,omitempty"`
- // Negate - Setting this value as truth will force to check the negation of the condition given by the user.
- Negate *bool `json:"negate,omitempty"`
-}
-
-// ApplicationGatewayRewriteRuleSet rewrite rule set of an application gateway.
-type ApplicationGatewayRewriteRuleSet struct {
- *ApplicationGatewayRewriteRuleSetPropertiesFormat `json:"properties,omitempty"`
- // Name - Name of the rewrite rule set that is unique within an Application Gateway.
- Name *string `json:"name,omitempty"`
- // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
- Etag *string `json:"etag,omitempty"`
- // ID - Resource ID.
- ID *string `json:"id,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for ApplicationGatewayRewriteRuleSet.
-func (agrrs ApplicationGatewayRewriteRuleSet) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if agrrs.ApplicationGatewayRewriteRuleSetPropertiesFormat != nil {
- objectMap["properties"] = agrrs.ApplicationGatewayRewriteRuleSetPropertiesFormat
- }
- if agrrs.Name != nil {
- objectMap["name"] = agrrs.Name
- }
- if agrrs.ID != nil {
- objectMap["id"] = agrrs.ID
- }
- return json.Marshal(objectMap)
-}
-
-// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayRewriteRuleSet struct.
-func (agrrs *ApplicationGatewayRewriteRuleSet) 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 applicationGatewayRewriteRuleSetPropertiesFormat ApplicationGatewayRewriteRuleSetPropertiesFormat
- err = json.Unmarshal(*v, &applicationGatewayRewriteRuleSetPropertiesFormat)
- if err != nil {
- return err
- }
- agrrs.ApplicationGatewayRewriteRuleSetPropertiesFormat = &applicationGatewayRewriteRuleSetPropertiesFormat
- }
- case "name":
- if v != nil {
- var name string
- err = json.Unmarshal(*v, &name)
- if err != nil {
- return err
- }
- agrrs.Name = &name
- }
- case "etag":
- if v != nil {
- var etag string
- err = json.Unmarshal(*v, &etag)
- if err != nil {
- return err
- }
- agrrs.Etag = &etag
- }
- case "id":
- if v != nil {
- var ID string
- err = json.Unmarshal(*v, &ID)
- if err != nil {
- return err
- }
- agrrs.ID = &ID
- }
- }
- }
-
- return nil
-}
-
-// ApplicationGatewayRewriteRuleSetPropertiesFormat properties of rewrite rule set of the application gateway.
-type ApplicationGatewayRewriteRuleSetPropertiesFormat struct {
- // RewriteRules - Rewrite rules in the rewrite rule set.
- RewriteRules *[]ApplicationGatewayRewriteRule `json:"rewriteRules,omitempty"`
- // ProvisioningState - READ-ONLY; Provisioning state of the rewrite rule set resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
- ProvisioningState *string `json:"provisioningState,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for ApplicationGatewayRewriteRuleSetPropertiesFormat.
-func (agrrspf ApplicationGatewayRewriteRuleSetPropertiesFormat) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if agrrspf.RewriteRules != nil {
- objectMap["rewriteRules"] = agrrspf.RewriteRules
- }
- return json.Marshal(objectMap)
-}
-
-// ApplicationGatewaysBackendHealthFuture an abstraction for monitoring and retrieving the results of a
-// long-running operation.
-type ApplicationGatewaysBackendHealthFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *ApplicationGatewaysBackendHealthFuture) Result(client ApplicationGatewaysClient) (agbh ApplicationGatewayBackendHealth, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysBackendHealthFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysBackendHealthFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if agbh.Response.Response, err = future.GetResult(sender); err == nil && agbh.Response.Response.StatusCode != http.StatusNoContent {
- agbh, err = client.BackendHealthResponder(agbh.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysBackendHealthFuture", "Result", agbh.Response.Response, "Failure responding to request")
- }
- }
- return
-}
-
-// ApplicationGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
-// long-running operation.
-type ApplicationGatewaysCreateOrUpdateFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *ApplicationGatewaysCreateOrUpdateFuture) Result(client ApplicationGatewaysClient) (ag ApplicationGateway, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysCreateOrUpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if ag.Response.Response, err = future.GetResult(sender); err == nil && ag.Response.Response.StatusCode != http.StatusNoContent {
- ag, err = client.CreateOrUpdateResponder(ag.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysCreateOrUpdateFuture", "Result", ag.Response.Response, "Failure responding to request")
- }
- }
- return
-}
-
-// ApplicationGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
-type ApplicationGatewaysDeleteFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *ApplicationGatewaysDeleteFuture) Result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysDeleteFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
-}
-
-// ApplicationGatewaySku SKU of an application gateway
-type ApplicationGatewaySku struct {
- // Name - Name of an application gateway SKU. Possible values include: 'StandardSmall', 'StandardMedium', 'StandardLarge', 'WAFMedium', 'WAFLarge', 'StandardV2', 'WAFV2'
- Name ApplicationGatewaySkuName `json:"name,omitempty"`
- // Tier - Tier of an application gateway. Possible values include: 'ApplicationGatewayTierStandard', 'ApplicationGatewayTierWAF', 'ApplicationGatewayTierStandardV2', 'ApplicationGatewayTierWAFV2'
- Tier ApplicationGatewayTier `json:"tier,omitempty"`
- // Capacity - Capacity (instance count) of an application gateway.
- Capacity *int32 `json:"capacity,omitempty"`
-}
-
-// ApplicationGatewaySslCertificate SSL certificates of an application gateway.
-type ApplicationGatewaySslCertificate struct {
- *ApplicationGatewaySslCertificatePropertiesFormat `json:"properties,omitempty"`
- // Name - Name of the SSL certificate that is unique within an Application Gateway.
- Name *string `json:"name,omitempty"`
- // Etag - A unique read-only string that changes whenever the resource is updated.
- Etag *string `json:"etag,omitempty"`
- // Type - Type of the resource.
- Type *string `json:"type,omitempty"`
- // ID - Resource ID.
- ID *string `json:"id,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for ApplicationGatewaySslCertificate.
-func (agsc ApplicationGatewaySslCertificate) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if agsc.ApplicationGatewaySslCertificatePropertiesFormat != nil {
- objectMap["properties"] = agsc.ApplicationGatewaySslCertificatePropertiesFormat
- }
- if agsc.Name != nil {
- objectMap["name"] = agsc.Name
- }
- if agsc.Etag != nil {
- objectMap["etag"] = agsc.Etag
- }
- if agsc.Type != nil {
- objectMap["type"] = agsc.Type
- }
- if agsc.ID != nil {
- objectMap["id"] = agsc.ID
- }
- return json.Marshal(objectMap)
-}
-
-// UnmarshalJSON is the custom unmarshaler for ApplicationGatewaySslCertificate struct.
-func (agsc *ApplicationGatewaySslCertificate) 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 applicationGatewaySslCertificatePropertiesFormat ApplicationGatewaySslCertificatePropertiesFormat
- err = json.Unmarshal(*v, &applicationGatewaySslCertificatePropertiesFormat)
- if err != nil {
- return err
- }
- agsc.ApplicationGatewaySslCertificatePropertiesFormat = &applicationGatewaySslCertificatePropertiesFormat
- }
- case "name":
- if v != nil {
- var name string
- err = json.Unmarshal(*v, &name)
- if err != nil {
- return err
- }
- agsc.Name = &name
- }
- case "etag":
- if v != nil {
- var etag string
- err = json.Unmarshal(*v, &etag)
- if err != nil {
- return err
- }
- agsc.Etag = &etag
- }
- case "type":
- if v != nil {
- var typeVar string
- err = json.Unmarshal(*v, &typeVar)
- if err != nil {
- return err
- }
- agsc.Type = &typeVar
- }
- case "id":
- if v != nil {
- var ID string
- err = json.Unmarshal(*v, &ID)
- if err != nil {
- return err
- }
- agsc.ID = &ID
- }
- }
- }
-
- return nil
-}
-
-// ApplicationGatewaySslCertificatePropertiesFormat properties of SSL certificates of an application gateway.
-type ApplicationGatewaySslCertificatePropertiesFormat struct {
- // Data - Base-64 encoded pfx certificate. Only applicable in PUT Request.
- Data *string `json:"data,omitempty"`
- // Password - Password for the pfx file specified in data. Only applicable in PUT request.
- Password *string `json:"password,omitempty"`
- // PublicCertData - Base-64 encoded Public cert data corresponding to pfx specified in data. Only applicable in GET request.
- PublicCertData *string `json:"publicCertData,omitempty"`
- // KeyVaultSecretID - Secret Id of (base-64 encoded unencrypted pfx) 'Secret' or 'Certificate' object stored in KeyVault.
- KeyVaultSecretID *string `json:"keyVaultSecretId,omitempty"`
- // ProvisioningState - Provisioning state of the SSL certificate resource Possible values are: 'Updating', 'Deleting', and 'Failed'.
- ProvisioningState *string `json:"provisioningState,omitempty"`
-}
-
-// ApplicationGatewaySslPolicy application Gateway Ssl policy.
-type ApplicationGatewaySslPolicy struct {
- // DisabledSslProtocols - Ssl protocols to be disabled on application gateway.
- DisabledSslProtocols *[]ApplicationGatewaySslProtocol `json:"disabledSslProtocols,omitempty"`
- // PolicyType - Type of Ssl Policy. Possible values include: 'Predefined', 'Custom'
- PolicyType ApplicationGatewaySslPolicyType `json:"policyType,omitempty"`
- // PolicyName - Name of Ssl predefined policy. Possible values include: 'AppGwSslPolicy20150501', 'AppGwSslPolicy20170401', 'AppGwSslPolicy20170401S'
- PolicyName ApplicationGatewaySslPolicyName `json:"policyName,omitempty"`
- // CipherSuites - Ssl cipher suites to be enabled in the specified order to application gateway.
- CipherSuites *[]ApplicationGatewaySslCipherSuite `json:"cipherSuites,omitempty"`
- // MinProtocolVersion - Minimum version of Ssl protocol to be supported on application gateway. Possible values include: 'TLSv10', 'TLSv11', 'TLSv12'
- MinProtocolVersion ApplicationGatewaySslProtocol `json:"minProtocolVersion,omitempty"`
-}
-
-// ApplicationGatewaySslPredefinedPolicy an Ssl predefined policy
-type ApplicationGatewaySslPredefinedPolicy struct {
- autorest.Response `json:"-"`
- // Name - Name of the Ssl predefined policy.
- Name *string `json:"name,omitempty"`
- *ApplicationGatewaySslPredefinedPolicyPropertiesFormat `json:"properties,omitempty"`
- // ID - Resource ID.
- ID *string `json:"id,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for ApplicationGatewaySslPredefinedPolicy.
-func (agspp ApplicationGatewaySslPredefinedPolicy) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if agspp.Name != nil {
- objectMap["name"] = agspp.Name
- }
- if agspp.ApplicationGatewaySslPredefinedPolicyPropertiesFormat != nil {
- objectMap["properties"] = agspp.ApplicationGatewaySslPredefinedPolicyPropertiesFormat
- }
- if agspp.ID != nil {
- objectMap["id"] = agspp.ID
- }
- return json.Marshal(objectMap)
-}
-
-// UnmarshalJSON is the custom unmarshaler for ApplicationGatewaySslPredefinedPolicy struct.
-func (agspp *ApplicationGatewaySslPredefinedPolicy) 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
- }
- agspp.Name = &name
- }
- case "properties":
- if v != nil {
- var applicationGatewaySslPredefinedPolicyPropertiesFormat ApplicationGatewaySslPredefinedPolicyPropertiesFormat
- err = json.Unmarshal(*v, &applicationGatewaySslPredefinedPolicyPropertiesFormat)
- if err != nil {
- return err
- }
- agspp.ApplicationGatewaySslPredefinedPolicyPropertiesFormat = &applicationGatewaySslPredefinedPolicyPropertiesFormat
- }
- case "id":
- if v != nil {
- var ID string
- err = json.Unmarshal(*v, &ID)
- if err != nil {
- return err
- }
- agspp.ID = &ID
- }
- }
- }
-
- return nil
-}
-
-// ApplicationGatewaySslPredefinedPolicyPropertiesFormat properties of ApplicationGatewaySslPredefinedPolicy
-type ApplicationGatewaySslPredefinedPolicyPropertiesFormat struct {
- // CipherSuites - Ssl cipher suites to be enabled in the specified order for application gateway.
- CipherSuites *[]ApplicationGatewaySslCipherSuite `json:"cipherSuites,omitempty"`
- // MinProtocolVersion - Minimum version of Ssl protocol to be supported on application gateway. Possible values include: 'TLSv10', 'TLSv11', 'TLSv12'
- MinProtocolVersion ApplicationGatewaySslProtocol `json:"minProtocolVersion,omitempty"`
-}
-
-// ApplicationGatewaysStartFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
-type ApplicationGatewaysStartFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *ApplicationGatewaysStartFuture) Result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStartFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysStartFuture")
- return
- }
- ar.Response = future.Response()
- return
-}
-
-// ApplicationGatewaysStopFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
-type ApplicationGatewaysStopFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *ApplicationGatewaysStopFuture) Result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStopFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysStopFuture")
- return
- }
- ar.Response = future.Response()
- return
-}
-
-// ApplicationGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
-// long-running operation.
-type ApplicationGatewaysUpdateTagsFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *ApplicationGatewaysUpdateTagsFuture) Result(client ApplicationGatewaysClient) (ag ApplicationGateway, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysUpdateTagsFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysUpdateTagsFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if ag.Response.Response, err = future.GetResult(sender); err == nil && ag.Response.Response.StatusCode != http.StatusNoContent {
- ag, err = client.UpdateTagsResponder(ag.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysUpdateTagsFuture", "Result", ag.Response.Response, "Failure responding to request")
- }
- }
- return
-}
-
-// ApplicationGatewayTrustedRootCertificate trusted Root certificates of an application gateway.
-type ApplicationGatewayTrustedRootCertificate struct {
- *ApplicationGatewayTrustedRootCertificatePropertiesFormat `json:"properties,omitempty"`
- // Name - Name of the trusted root certificate that is unique within an Application Gateway.
- Name *string `json:"name,omitempty"`
- // Etag - A unique read-only string that changes whenever the resource is updated.
- Etag *string `json:"etag,omitempty"`
- // Type - Type of the resource.
- Type *string `json:"type,omitempty"`
- // ID - Resource ID.
- ID *string `json:"id,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for ApplicationGatewayTrustedRootCertificate.
-func (agtrc ApplicationGatewayTrustedRootCertificate) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if agtrc.ApplicationGatewayTrustedRootCertificatePropertiesFormat != nil {
- objectMap["properties"] = agtrc.ApplicationGatewayTrustedRootCertificatePropertiesFormat
- }
- if agtrc.Name != nil {
- objectMap["name"] = agtrc.Name
- }
- if agtrc.Etag != nil {
- objectMap["etag"] = agtrc.Etag
- }
- if agtrc.Type != nil {
- objectMap["type"] = agtrc.Type
- }
- if agtrc.ID != nil {
- objectMap["id"] = agtrc.ID
- }
- return json.Marshal(objectMap)
-}
-
-// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayTrustedRootCertificate struct.
-func (agtrc *ApplicationGatewayTrustedRootCertificate) 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 applicationGatewayTrustedRootCertificatePropertiesFormat ApplicationGatewayTrustedRootCertificatePropertiesFormat
- err = json.Unmarshal(*v, &applicationGatewayTrustedRootCertificatePropertiesFormat)
- if err != nil {
- return err
- }
- agtrc.ApplicationGatewayTrustedRootCertificatePropertiesFormat = &applicationGatewayTrustedRootCertificatePropertiesFormat
- }
- case "name":
- if v != nil {
- var name string
- err = json.Unmarshal(*v, &name)
- if err != nil {
- return err
- }
- agtrc.Name = &name
- }
- case "etag":
- if v != nil {
- var etag string
- err = json.Unmarshal(*v, &etag)
- if err != nil {
- return err
- }
- agtrc.Etag = &etag
- }
- case "type":
- if v != nil {
- var typeVar string
- err = json.Unmarshal(*v, &typeVar)
- if err != nil {
- return err
- }
- agtrc.Type = &typeVar
- }
- case "id":
- if v != nil {
- var ID string
- err = json.Unmarshal(*v, &ID)
- if err != nil {
- return err
- }
- agtrc.ID = &ID
- }
- }
- }
-
- return nil
-}
-
-// ApplicationGatewayTrustedRootCertificatePropertiesFormat trusted Root certificates properties of an
-// application gateway.
-type ApplicationGatewayTrustedRootCertificatePropertiesFormat struct {
- // Data - Certificate public data.
- Data *string `json:"data,omitempty"`
- // KeyVaultSecretID - Secret Id of (base-64 encoded unencrypted pfx) 'Secret' or 'Certificate' object stored in KeyVault.
- KeyVaultSecretID *string `json:"keyVaultSecretId,omitempty"`
- // ProvisioningState - Provisioning state of the trusted root certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
- ProvisioningState *string `json:"provisioningState,omitempty"`
-}
-
-// ApplicationGatewayURLPathMap urlPathMaps give a url path to the backend mapping information for
-// PathBasedRouting.
-type ApplicationGatewayURLPathMap struct {
- *ApplicationGatewayURLPathMapPropertiesFormat `json:"properties,omitempty"`
- // Name - Name of the URL path map that is unique within an Application Gateway.
- Name *string `json:"name,omitempty"`
- // Etag - A unique read-only string that changes whenever the resource is updated.
- Etag *string `json:"etag,omitempty"`
- // Type - Type of the resource.
- Type *string `json:"type,omitempty"`
- // ID - Resource ID.
- ID *string `json:"id,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for ApplicationGatewayURLPathMap.
-func (agupm ApplicationGatewayURLPathMap) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if agupm.ApplicationGatewayURLPathMapPropertiesFormat != nil {
- objectMap["properties"] = agupm.ApplicationGatewayURLPathMapPropertiesFormat
- }
- if agupm.Name != nil {
- objectMap["name"] = agupm.Name
- }
- if agupm.Etag != nil {
- objectMap["etag"] = agupm.Etag
- }
- if agupm.Type != nil {
- objectMap["type"] = agupm.Type
- }
- if agupm.ID != nil {
- objectMap["id"] = agupm.ID
- }
- return json.Marshal(objectMap)
-}
-
-// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayURLPathMap struct.
-func (agupm *ApplicationGatewayURLPathMap) 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 applicationGatewayURLPathMapPropertiesFormat ApplicationGatewayURLPathMapPropertiesFormat
- err = json.Unmarshal(*v, &applicationGatewayURLPathMapPropertiesFormat)
- if err != nil {
- return err
- }
- agupm.ApplicationGatewayURLPathMapPropertiesFormat = &applicationGatewayURLPathMapPropertiesFormat
- }
- case "name":
- if v != nil {
- var name string
- err = json.Unmarshal(*v, &name)
- if err != nil {
- return err
- }
- agupm.Name = &name
- }
- case "etag":
- if v != nil {
- var etag string
- err = json.Unmarshal(*v, &etag)
- if err != nil {
- return err
- }
- agupm.Etag = &etag
- }
- case "type":
- if v != nil {
- var typeVar string
- err = json.Unmarshal(*v, &typeVar)
- if err != nil {
- return err
- }
- agupm.Type = &typeVar
- }
- case "id":
- if v != nil {
- var ID string
- err = json.Unmarshal(*v, &ID)
- if err != nil {
- return err
- }
- agupm.ID = &ID
- }
- }
- }
-
- return nil
-}
-
-// ApplicationGatewayURLPathMapPropertiesFormat properties of UrlPathMap of the application gateway.
-type ApplicationGatewayURLPathMapPropertiesFormat struct {
- // DefaultBackendAddressPool - Default backend address pool resource of URL path map.
- DefaultBackendAddressPool *SubResource `json:"defaultBackendAddressPool,omitempty"`
- // DefaultBackendHTTPSettings - Default backend http settings resource of URL path map.
- DefaultBackendHTTPSettings *SubResource `json:"defaultBackendHttpSettings,omitempty"`
- // DefaultRewriteRuleSet - Default Rewrite rule set resource of URL path map.
- DefaultRewriteRuleSet *SubResource `json:"defaultRewriteRuleSet,omitempty"`
- // DefaultRedirectConfiguration - Default redirect configuration resource of URL path map.
- DefaultRedirectConfiguration *SubResource `json:"defaultRedirectConfiguration,omitempty"`
- // PathRules - Path rule of URL path map resource.
- PathRules *[]ApplicationGatewayPathRule `json:"pathRules,omitempty"`
- // ProvisioningState - Provisioning state of the backend http settings resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
- ProvisioningState *string `json:"provisioningState,omitempty"`
-}
-
-// ApplicationGatewayWebApplicationFirewallConfiguration application gateway web application firewall
-// configuration.
-type ApplicationGatewayWebApplicationFirewallConfiguration struct {
- // Enabled - Whether the web application firewall is enabled or not.
- Enabled *bool `json:"enabled,omitempty"`
- // FirewallMode - Web application firewall mode. Possible values include: 'Detection', 'Prevention'
- FirewallMode ApplicationGatewayFirewallMode `json:"firewallMode,omitempty"`
- // RuleSetType - The type of the web application firewall rule set. Possible values are: 'OWASP'.
- RuleSetType *string `json:"ruleSetType,omitempty"`
- // RuleSetVersion - The version of the rule set type.
- RuleSetVersion *string `json:"ruleSetVersion,omitempty"`
- // DisabledRuleGroups - The disabled rule groups.
- DisabledRuleGroups *[]ApplicationGatewayFirewallDisabledRuleGroup `json:"disabledRuleGroups,omitempty"`
- // RequestBodyCheck - Whether allow WAF to check request Body.
- RequestBodyCheck *bool `json:"requestBodyCheck,omitempty"`
- // MaxRequestBodySize - Maximum request body size for WAF.
- MaxRequestBodySize *int32 `json:"maxRequestBodySize,omitempty"`
- // MaxRequestBodySizeInKb - Maximum request body size in Kb for WAF.
- MaxRequestBodySizeInKb *int32 `json:"maxRequestBodySizeInKb,omitempty"`
- // FileUploadLimitInMb - Maximum file upload size in Mb for WAF.
- FileUploadLimitInMb *int32 `json:"fileUploadLimitInMb,omitempty"`
- // Exclusions - The exclusion list.
- Exclusions *[]ApplicationGatewayFirewallExclusion `json:"exclusions,omitempty"`
-}
-
-// ApplicationSecurityGroup an application security group in a resource group.
-type ApplicationSecurityGroup struct {
- autorest.Response `json:"-"`
- // ApplicationSecurityGroupPropertiesFormat - Properties of the application security group.
- *ApplicationSecurityGroupPropertiesFormat `json:"properties,omitempty"`
- // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
- Etag *string `json:"etag,omitempty"`
- // ID - 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 ApplicationSecurityGroup.
-func (asg ApplicationSecurityGroup) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if asg.ApplicationSecurityGroupPropertiesFormat != nil {
- objectMap["properties"] = asg.ApplicationSecurityGroupPropertiesFormat
- }
- if asg.ID != nil {
- objectMap["id"] = asg.ID
- }
- if asg.Location != nil {
- objectMap["location"] = asg.Location
- }
- if asg.Tags != nil {
- objectMap["tags"] = asg.Tags
- }
- return json.Marshal(objectMap)
-}
-
-// UnmarshalJSON is the custom unmarshaler for ApplicationSecurityGroup struct.
-func (asg *ApplicationSecurityGroup) 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 applicationSecurityGroupPropertiesFormat ApplicationSecurityGroupPropertiesFormat
- err = json.Unmarshal(*v, &applicationSecurityGroupPropertiesFormat)
- if err != nil {
- return err
- }
- asg.ApplicationSecurityGroupPropertiesFormat = &applicationSecurityGroupPropertiesFormat
- }
- case "etag":
- if v != nil {
- var etag string
- err = json.Unmarshal(*v, &etag)
- if err != nil {
- return err
- }
- asg.Etag = &etag
- }
- case "id":
- if v != nil {
- var ID string
- err = json.Unmarshal(*v, &ID)
- if err != nil {
- return err
- }
- asg.ID = &ID
- }
- case "name":
- if v != nil {
- var name string
- err = json.Unmarshal(*v, &name)
- if err != nil {
- return err
- }
- asg.Name = &name
- }
- case "type":
- if v != nil {
- var typeVar string
- err = json.Unmarshal(*v, &typeVar)
- if err != nil {
- return err
- }
- asg.Type = &typeVar
- }
- case "location":
- if v != nil {
- var location string
- err = json.Unmarshal(*v, &location)
- if err != nil {
- return err
- }
- asg.Location = &location
- }
- case "tags":
- if v != nil {
- var tags map[string]*string
- err = json.Unmarshal(*v, &tags)
- if err != nil {
- return err
- }
- asg.Tags = tags
- }
- }
- }
-
- return nil
-}
-
-// ApplicationSecurityGroupListResult a list of application security groups.
-type ApplicationSecurityGroupListResult struct {
- autorest.Response `json:"-"`
- // Value - A list of application security groups.
- Value *[]ApplicationSecurityGroup `json:"value,omitempty"`
- // NextLink - READ-ONLY; The URL to get the next set of results.
- NextLink *string `json:"nextLink,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for ApplicationSecurityGroupListResult.
-func (asglr ApplicationSecurityGroupListResult) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if asglr.Value != nil {
- objectMap["value"] = asglr.Value
- }
- return json.Marshal(objectMap)
-}
-
-// ApplicationSecurityGroupListResultIterator provides access to a complete listing of ApplicationSecurityGroup
-// values.
-type ApplicationSecurityGroupListResultIterator struct {
- i int
- page ApplicationSecurityGroupListResultPage
-}
-
-// 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 *ApplicationSecurityGroupListResultIterator) NextWithContext(ctx context.Context) (err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationSecurityGroupListResultIterator.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 *ApplicationSecurityGroupListResultIterator) Next() error {
- return iter.NextWithContext(context.Background())
-}
-
-// NotDone returns true if the enumeration should be started or is not yet complete.
-func (iter ApplicationSecurityGroupListResultIterator) 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 ApplicationSecurityGroupListResultIterator) Response() ApplicationSecurityGroupListResult {
- 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 ApplicationSecurityGroupListResultIterator) Value() ApplicationSecurityGroup {
- if !iter.page.NotDone() {
- return ApplicationSecurityGroup{}
- }
- return iter.page.Values()[iter.i]
-}
-
-// Creates a new instance of the ApplicationSecurityGroupListResultIterator type.
-func NewApplicationSecurityGroupListResultIterator(page ApplicationSecurityGroupListResultPage) ApplicationSecurityGroupListResultIterator {
- return ApplicationSecurityGroupListResultIterator{page: page}
-}
-
-// IsEmpty returns true if the ListResult contains no values.
-func (asglr ApplicationSecurityGroupListResult) IsEmpty() bool {
- return asglr.Value == nil || len(*asglr.Value) == 0
-}
-
-// hasNextLink returns true if the NextLink is not empty.
-func (asglr ApplicationSecurityGroupListResult) hasNextLink() bool {
- return asglr.NextLink != nil && len(*asglr.NextLink) != 0
-}
-
-// applicationSecurityGroupListResultPreparer prepares a request to retrieve the next set of results.
-// It returns nil if no more results exist.
-func (asglr ApplicationSecurityGroupListResult) applicationSecurityGroupListResultPreparer(ctx context.Context) (*http.Request, error) {
- if !asglr.hasNextLink() {
- return nil, nil
- }
- return autorest.Prepare((&http.Request{}).WithContext(ctx),
- autorest.AsJSON(),
- autorest.AsGet(),
- autorest.WithBaseURL(to.String(asglr.NextLink)))
-}
-
-// ApplicationSecurityGroupListResultPage contains a page of ApplicationSecurityGroup values.
-type ApplicationSecurityGroupListResultPage struct {
- fn func(context.Context, ApplicationSecurityGroupListResult) (ApplicationSecurityGroupListResult, error)
- asglr ApplicationSecurityGroupListResult
-}
-
-// 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 *ApplicationSecurityGroupListResultPage) NextWithContext(ctx context.Context) (err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationSecurityGroupListResultPage.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.asglr)
- if err != nil {
- return err
- }
- page.asglr = 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 *ApplicationSecurityGroupListResultPage) Next() error {
- return page.NextWithContext(context.Background())
-}
-
-// NotDone returns true if the page enumeration should be started or is not yet complete.
-func (page ApplicationSecurityGroupListResultPage) NotDone() bool {
- return !page.asglr.IsEmpty()
-}
-
-// Response returns the raw server response from the last page request.
-func (page ApplicationSecurityGroupListResultPage) Response() ApplicationSecurityGroupListResult {
- return page.asglr
-}
-
-// Values returns the slice of values for the current page or nil if there are no values.
-func (page ApplicationSecurityGroupListResultPage) Values() []ApplicationSecurityGroup {
- if page.asglr.IsEmpty() {
- return nil
- }
- return *page.asglr.Value
-}
-
-// Creates a new instance of the ApplicationSecurityGroupListResultPage type.
-func NewApplicationSecurityGroupListResultPage(getNextPage func(context.Context, ApplicationSecurityGroupListResult) (ApplicationSecurityGroupListResult, error)) ApplicationSecurityGroupListResultPage {
- return ApplicationSecurityGroupListResultPage{fn: getNextPage}
-}
-
-// ApplicationSecurityGroupPropertiesFormat application security group properties.
-type ApplicationSecurityGroupPropertiesFormat struct {
- // ResourceGUID - READ-ONLY; The resource GUID property of the application security group resource. It uniquely identifies a resource, even if the user changes its name or migrate the resource across subscriptions or resource groups.
- ResourceGUID *string `json:"resourceGuid,omitempty"`
- // ProvisioningState - READ-ONLY; The provisioning state of the application security group resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'.
- ProvisioningState *string `json:"provisioningState,omitempty"`
-}
-
-// ApplicationSecurityGroupsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
-// long-running operation.
-type ApplicationSecurityGroupsCreateOrUpdateFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *ApplicationSecurityGroupsCreateOrUpdateFuture) Result(client ApplicationSecurityGroupsClient) (asg ApplicationSecurityGroup, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.ApplicationSecurityGroupsCreateOrUpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if asg.Response.Response, err = future.GetResult(sender); err == nil && asg.Response.Response.StatusCode != http.StatusNoContent {
- asg, err = client.CreateOrUpdateResponder(asg.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsCreateOrUpdateFuture", "Result", asg.Response.Response, "Failure responding to request")
- }
- }
- return
-}
-
-// ApplicationSecurityGroupsDeleteFuture an abstraction for monitoring and retrieving the results of a
-// long-running operation.
-type ApplicationSecurityGroupsDeleteFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *ApplicationSecurityGroupsDeleteFuture) Result(client ApplicationSecurityGroupsClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsDeleteFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.ApplicationSecurityGroupsDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
-}
-
-// ApplicationSecurityGroupsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
-// long-running operation.
-type ApplicationSecurityGroupsUpdateTagsFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *ApplicationSecurityGroupsUpdateTagsFuture) Result(client ApplicationSecurityGroupsClient) (asg ApplicationSecurityGroup, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsUpdateTagsFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.ApplicationSecurityGroupsUpdateTagsFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if asg.Response.Response, err = future.GetResult(sender); err == nil && asg.Response.Response.StatusCode != http.StatusNoContent {
- asg, err = client.UpdateTagsResponder(asg.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsUpdateTagsFuture", "Result", asg.Response.Response, "Failure responding to request")
- }
- }
- return
-}
-
-// AuthorizationListResult response for ListAuthorizations API service call retrieves all authorizations that
-// belongs to an ExpressRouteCircuit.
-type AuthorizationListResult struct {
- autorest.Response `json:"-"`
- // Value - The authorizations in an ExpressRoute Circuit.
- Value *[]ExpressRouteCircuitAuthorization `json:"value,omitempty"`
- // NextLink - The URL to get the next set of results.
- NextLink *string `json:"nextLink,omitempty"`
-}
-
-// AuthorizationListResultIterator provides access to a complete listing of ExpressRouteCircuitAuthorization
-// values.
-type AuthorizationListResultIterator struct {
- i int
- page AuthorizationListResultPage
-}
-
-// 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 *AuthorizationListResultIterator) NextWithContext(ctx context.Context) (err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/AuthorizationListResultIterator.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 *AuthorizationListResultIterator) Next() error {
- return iter.NextWithContext(context.Background())
-}
-
-// NotDone returns true if the enumeration should be started or is not yet complete.
-func (iter AuthorizationListResultIterator) 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 AuthorizationListResultIterator) Response() AuthorizationListResult {
- 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 AuthorizationListResultIterator) Value() ExpressRouteCircuitAuthorization {
- if !iter.page.NotDone() {
- return ExpressRouteCircuitAuthorization{}
- }
- return iter.page.Values()[iter.i]
-}
-
-// Creates a new instance of the AuthorizationListResultIterator type.
-func NewAuthorizationListResultIterator(page AuthorizationListResultPage) AuthorizationListResultIterator {
- return AuthorizationListResultIterator{page: page}
-}
-
-// IsEmpty returns true if the ListResult contains no values.
-func (alr AuthorizationListResult) IsEmpty() bool {
- return alr.Value == nil || len(*alr.Value) == 0
-}
-
-// hasNextLink returns true if the NextLink is not empty.
-func (alr AuthorizationListResult) hasNextLink() bool {
- return alr.NextLink != nil && len(*alr.NextLink) != 0
-}
-
-// authorizationListResultPreparer prepares a request to retrieve the next set of results.
-// It returns nil if no more results exist.
-func (alr AuthorizationListResult) authorizationListResultPreparer(ctx context.Context) (*http.Request, error) {
- if !alr.hasNextLink() {
- return nil, nil
- }
- return autorest.Prepare((&http.Request{}).WithContext(ctx),
- autorest.AsJSON(),
- autorest.AsGet(),
- autorest.WithBaseURL(to.String(alr.NextLink)))
-}
-
-// AuthorizationListResultPage contains a page of ExpressRouteCircuitAuthorization values.
-type AuthorizationListResultPage struct {
- fn func(context.Context, AuthorizationListResult) (AuthorizationListResult, error)
- alr AuthorizationListResult
-}
-
-// 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 *AuthorizationListResultPage) NextWithContext(ctx context.Context) (err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/AuthorizationListResultPage.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.alr)
- if err != nil {
- return err
- }
- page.alr = 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 *AuthorizationListResultPage) Next() error {
- return page.NextWithContext(context.Background())
-}
-
-// NotDone returns true if the page enumeration should be started or is not yet complete.
-func (page AuthorizationListResultPage) NotDone() bool {
- return !page.alr.IsEmpty()
-}
-
-// Response returns the raw server response from the last page request.
-func (page AuthorizationListResultPage) Response() AuthorizationListResult {
- return page.alr
-}
-
-// Values returns the slice of values for the current page or nil if there are no values.
-func (page AuthorizationListResultPage) Values() []ExpressRouteCircuitAuthorization {
- if page.alr.IsEmpty() {
- return nil
- }
- return *page.alr.Value
-}
-
-// Creates a new instance of the AuthorizationListResultPage type.
-func NewAuthorizationListResultPage(getNextPage func(context.Context, AuthorizationListResult) (AuthorizationListResult, error)) AuthorizationListResultPage {
- return AuthorizationListResultPage{fn: getNextPage}
-}
-
-// AuthorizationPropertiesFormat ...
-type AuthorizationPropertiesFormat struct {
- // AuthorizationKey - The authorization key.
- AuthorizationKey *string `json:"authorizationKey,omitempty"`
- // AuthorizationUseStatus - AuthorizationUseStatus. Possible values are: 'Available' and 'InUse'. Possible values include: 'Available', 'InUse'
- AuthorizationUseStatus AuthorizationUseStatus `json:"authorizationUseStatus,omitempty"`
- // ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
- ProvisioningState *string `json:"provisioningState,omitempty"`
-}
-
-// Availability availability of the metric.
-type Availability struct {
- // TimeGrain - The time grain of the availability.
- TimeGrain *string `json:"timeGrain,omitempty"`
- // Retention - The retention of the availability.
- Retention *string `json:"retention,omitempty"`
- // BlobDuration - Duration of the availability blob.
- BlobDuration *string `json:"blobDuration,omitempty"`
-}
-
-// AvailableDelegation the serviceName of an AvailableDelegation indicates a possible delegation for a subnet.
-type AvailableDelegation struct {
- // Name - The name of the AvailableDelegation resource.
- Name *string `json:"name,omitempty"`
- // ID - A unique identifier of the AvailableDelegation resource.
- ID *string `json:"id,omitempty"`
- // Type - Resource type.
- Type *string `json:"type,omitempty"`
- // ServiceName - The name of the service and resource
- ServiceName *string `json:"serviceName,omitempty"`
- // Actions - Describes the actions permitted to the service upon delegation
- Actions *[]string `json:"actions,omitempty"`
-}
-
-// AvailableDelegationsResult an array of available delegations.
-type AvailableDelegationsResult struct {
- autorest.Response `json:"-"`
- // Value - An array of available delegations.
- Value *[]AvailableDelegation `json:"value,omitempty"`
- // NextLink - READ-ONLY; The URL to get the next set of results.
- NextLink *string `json:"nextLink,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for AvailableDelegationsResult.
-func (adr AvailableDelegationsResult) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if adr.Value != nil {
- objectMap["value"] = adr.Value
- }
- return json.Marshal(objectMap)
-}
-
-// AvailableDelegationsResultIterator provides access to a complete listing of AvailableDelegation values.
-type AvailableDelegationsResultIterator struct {
- i int
- page AvailableDelegationsResultPage
-}
-
-// 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 *AvailableDelegationsResultIterator) NextWithContext(ctx context.Context) (err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/AvailableDelegationsResultIterator.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 *AvailableDelegationsResultIterator) Next() error {
- return iter.NextWithContext(context.Background())
-}
-
-// NotDone returns true if the enumeration should be started or is not yet complete.
-func (iter AvailableDelegationsResultIterator) 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 AvailableDelegationsResultIterator) Response() AvailableDelegationsResult {
- 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 AvailableDelegationsResultIterator) Value() AvailableDelegation {
- if !iter.page.NotDone() {
- return AvailableDelegation{}
- }
- return iter.page.Values()[iter.i]
-}
-
-// Creates a new instance of the AvailableDelegationsResultIterator type.
-func NewAvailableDelegationsResultIterator(page AvailableDelegationsResultPage) AvailableDelegationsResultIterator {
- return AvailableDelegationsResultIterator{page: page}
-}
-
-// IsEmpty returns true if the ListResult contains no values.
-func (adr AvailableDelegationsResult) IsEmpty() bool {
- return adr.Value == nil || len(*adr.Value) == 0
-}
-
-// hasNextLink returns true if the NextLink is not empty.
-func (adr AvailableDelegationsResult) hasNextLink() bool {
- return adr.NextLink != nil && len(*adr.NextLink) != 0
-}
-
-// availableDelegationsResultPreparer prepares a request to retrieve the next set of results.
-// It returns nil if no more results exist.
-func (adr AvailableDelegationsResult) availableDelegationsResultPreparer(ctx context.Context) (*http.Request, error) {
- if !adr.hasNextLink() {
- return nil, nil
- }
- return autorest.Prepare((&http.Request{}).WithContext(ctx),
- autorest.AsJSON(),
- autorest.AsGet(),
- autorest.WithBaseURL(to.String(adr.NextLink)))
-}
-
-// AvailableDelegationsResultPage contains a page of AvailableDelegation values.
-type AvailableDelegationsResultPage struct {
- fn func(context.Context, AvailableDelegationsResult) (AvailableDelegationsResult, error)
- adr AvailableDelegationsResult
-}
-
-// 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 *AvailableDelegationsResultPage) NextWithContext(ctx context.Context) (err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/AvailableDelegationsResultPage.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.adr)
- if err != nil {
- return err
- }
- page.adr = 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 *AvailableDelegationsResultPage) Next() error {
- return page.NextWithContext(context.Background())
-}
-
-// NotDone returns true if the page enumeration should be started or is not yet complete.
-func (page AvailableDelegationsResultPage) NotDone() bool {
- return !page.adr.IsEmpty()
-}
-
-// Response returns the raw server response from the last page request.
-func (page AvailableDelegationsResultPage) Response() AvailableDelegationsResult {
- return page.adr
-}
-
-// Values returns the slice of values for the current page or nil if there are no values.
-func (page AvailableDelegationsResultPage) Values() []AvailableDelegation {
- if page.adr.IsEmpty() {
- return nil
- }
- return *page.adr.Value
-}
-
-// Creates a new instance of the AvailableDelegationsResultPage type.
-func NewAvailableDelegationsResultPage(getNextPage func(context.Context, AvailableDelegationsResult) (AvailableDelegationsResult, error)) AvailableDelegationsResultPage {
- return AvailableDelegationsResultPage{fn: getNextPage}
-}
-
-// AvailableProvidersList list of available countries with details.
-type AvailableProvidersList struct {
- autorest.Response `json:"-"`
- // Countries - List of available countries.
- Countries *[]AvailableProvidersListCountry `json:"countries,omitempty"`
-}
-
-// AvailableProvidersListCity city or town details.
-type AvailableProvidersListCity struct {
- // CityName - The city or town name.
- CityName *string `json:"cityName,omitempty"`
- // Providers - A list of Internet service providers.
- Providers *[]string `json:"providers,omitempty"`
-}
-
-// AvailableProvidersListCountry country details.
-type AvailableProvidersListCountry struct {
- // CountryName - The country name.
- CountryName *string `json:"countryName,omitempty"`
- // Providers - A list of Internet service providers.
- Providers *[]string `json:"providers,omitempty"`
- // States - List of available states in the country.
- States *[]AvailableProvidersListState `json:"states,omitempty"`
-}
-
-// AvailableProvidersListParameters constraints that determine the list of available Internet service
-// providers.
-type AvailableProvidersListParameters struct {
- // AzureLocations - A list of Azure regions.
- AzureLocations *[]string `json:"azureLocations,omitempty"`
- // Country - The country for available providers list.
- Country *string `json:"country,omitempty"`
- // State - The state for available providers list.
- State *string `json:"state,omitempty"`
- // City - The city or town for available providers list.
- City *string `json:"city,omitempty"`
-}
-
-// AvailableProvidersListState state details.
-type AvailableProvidersListState struct {
- // StateName - The state name.
- StateName *string `json:"stateName,omitempty"`
- // Providers - A list of Internet service providers.
- Providers *[]string `json:"providers,omitempty"`
- // Cities - List of available cities or towns in the state.
- Cities *[]AvailableProvidersListCity `json:"cities,omitempty"`
-}
-
-// AzureAsyncOperationResult the response body contains the status of the specified asynchronous operation,
-// indicating whether it has succeeded, is in progress, or has failed. Note that this status is distinct from
-// the HTTP status code returned for the Get Operation Status operation itself. If the asynchronous operation
-// succeeded, the response body includes the HTTP status code for the successful request. If the asynchronous
-// operation failed, the response body includes the HTTP status code for the failed request and error
-// information regarding the failure.
-type AzureAsyncOperationResult struct {
- // Status - Status of the Azure async operation. Possible values are: 'InProgress', 'Succeeded', and 'Failed'. Possible values include: 'OperationStatusInProgress', 'OperationStatusSucceeded', 'OperationStatusFailed'
- Status OperationStatus `json:"status,omitempty"`
- Error *Error `json:"error,omitempty"`
-}
-
-// AzureFirewall azure Firewall resource
-type AzureFirewall struct {
- autorest.Response `json:"-"`
- *AzureFirewallPropertiesFormat `json:"properties,omitempty"`
- // Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
- Etag *string `json:"etag,omitempty"`
- // ID - 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 AzureFirewall.
-func (af AzureFirewall) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if af.AzureFirewallPropertiesFormat != nil {
- objectMap["properties"] = af.AzureFirewallPropertiesFormat
- }
- if af.ID != nil {
- objectMap["id"] = af.ID
- }
- if af.Location != nil {
- objectMap["location"] = af.Location
- }
- if af.Tags != nil {
- objectMap["tags"] = af.Tags
- }
- return json.Marshal(objectMap)
-}
-
-// UnmarshalJSON is the custom unmarshaler for AzureFirewall struct.
-func (af *AzureFirewall) 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 azureFirewallPropertiesFormat AzureFirewallPropertiesFormat
- err = json.Unmarshal(*v, &azureFirewallPropertiesFormat)
- if err != nil {
- return err
- }
- af.AzureFirewallPropertiesFormat = &azureFirewallPropertiesFormat
- }
- case "etag":
- if v != nil {
- var etag string
- err = json.Unmarshal(*v, &etag)
- if err != nil {
- return err
- }
- af.Etag = &etag
- }
- case "id":
- if v != nil {
- var ID string
- err = json.Unmarshal(*v, &ID)
- if err != nil {
- return err
- }
- af.ID = &ID
- }
- case "name":
- if v != nil {
- var name string
- err = json.Unmarshal(*v, &name)
- if err != nil {
- return err
- }
- af.Name = &name
- }
- case "type":
- if v != nil {
- var typeVar string
- err = json.Unmarshal(*v, &typeVar)
- if err != nil {
- return err
- }
- af.Type = &typeVar
- }
- case "location":
- if v != nil {
- var location string
- err = json.Unmarshal(*v, &location)
- if err != nil {
- return err
- }
- af.Location = &location
- }
- case "tags":
- if v != nil {
- var tags map[string]*string
- err = json.Unmarshal(*v, &tags)
- if err != nil {
- return err
- }
- af.Tags = tags
- }
- }
- }
-
- return nil
-}
-
-// AzureFirewallApplicationRule properties of an application rule.
-type AzureFirewallApplicationRule struct {
- // Name - Name of the application rule.
- Name *string `json:"name,omitempty"`
- // Description - Description of the rule.
- Description *string `json:"description,omitempty"`
- // SourceAddresses - List of source IP addresses for this rule.
- SourceAddresses *[]string `json:"sourceAddresses,omitempty"`
- // Protocols - Array of ApplicationRuleProtocols.
- Protocols *[]AzureFirewallApplicationRuleProtocol `json:"protocols,omitempty"`
- // TargetFqdns - List of FQDNs for this rule.
- TargetFqdns *[]string `json:"targetFqdns,omitempty"`
- // FqdnTags - List of FQDN Tags for this rule.
- FqdnTags *[]string `json:"fqdnTags,omitempty"`
-}
-
-// AzureFirewallApplicationRuleCollection application rule collection resource
-type AzureFirewallApplicationRuleCollection struct {
- *AzureFirewallApplicationRuleCollectionPropertiesFormat `json:"properties,omitempty"`
- // Name - Gets 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"`
- // Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
- Etag *string `json:"etag,omitempty"`
- // ID - Resource ID.
- ID *string `json:"id,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for AzureFirewallApplicationRuleCollection.
-func (afarc AzureFirewallApplicationRuleCollection) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if afarc.AzureFirewallApplicationRuleCollectionPropertiesFormat != nil {
- objectMap["properties"] = afarc.AzureFirewallApplicationRuleCollectionPropertiesFormat
- }
- if afarc.Name != nil {
- objectMap["name"] = afarc.Name
- }
- if afarc.ID != nil {
- objectMap["id"] = afarc.ID
- }
- return json.Marshal(objectMap)
-}
-
-// UnmarshalJSON is the custom unmarshaler for AzureFirewallApplicationRuleCollection struct.
-func (afarc *AzureFirewallApplicationRuleCollection) 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 azureFirewallApplicationRuleCollectionPropertiesFormat AzureFirewallApplicationRuleCollectionPropertiesFormat
- err = json.Unmarshal(*v, &azureFirewallApplicationRuleCollectionPropertiesFormat)
- if err != nil {
- return err
- }
- afarc.AzureFirewallApplicationRuleCollectionPropertiesFormat = &azureFirewallApplicationRuleCollectionPropertiesFormat
- }
- case "name":
- if v != nil {
- var name string
- err = json.Unmarshal(*v, &name)
- if err != nil {
- return err
- }
- afarc.Name = &name
- }
- case "etag":
- if v != nil {
- var etag string
- err = json.Unmarshal(*v, &etag)
- if err != nil {
- return err
- }
- afarc.Etag = &etag
- }
- case "id":
- if v != nil {
- var ID string
- err = json.Unmarshal(*v, &ID)
- if err != nil {
- return err
- }
- afarc.ID = &ID
- }
- }
- }
-
- return nil
-}
-
-// AzureFirewallApplicationRuleCollectionPropertiesFormat properties of the application rule collection.
-type AzureFirewallApplicationRuleCollectionPropertiesFormat struct {
- // Priority - Priority of the application rule collection resource.
- Priority *int32 `json:"priority,omitempty"`
- // Action - The action type of a rule collection
- Action *AzureFirewallRCAction `json:"action,omitempty"`
- // Rules - Collection of rules used by a application rule collection.
- Rules *[]AzureFirewallApplicationRule `json:"rules,omitempty"`
- // ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
- ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
-}
-
-// AzureFirewallApplicationRuleProtocol properties of the application rule protocol.
-type AzureFirewallApplicationRuleProtocol struct {
- // ProtocolType - Protocol type. Possible values include: 'AzureFirewallApplicationRuleProtocolTypeHTTP', 'AzureFirewallApplicationRuleProtocolTypeHTTPS'
- ProtocolType AzureFirewallApplicationRuleProtocolType `json:"protocolType,omitempty"`
- // Port - Port number for the protocol, cannot be greater than 64000. This field is optional.
- Port *int32 `json:"port,omitempty"`
-}
-
-// AzureFirewallFqdnTag azure Firewall FQDN Tag Resource
-type AzureFirewallFqdnTag struct {
- *AzureFirewallFqdnTagPropertiesFormat `json:"properties,omitempty"`
- // Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
- Etag *string `json:"etag,omitempty"`
- // ID - 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 AzureFirewallFqdnTag.
-func (afft AzureFirewallFqdnTag) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if afft.AzureFirewallFqdnTagPropertiesFormat != nil {
- objectMap["properties"] = afft.AzureFirewallFqdnTagPropertiesFormat
- }
- if afft.ID != nil {
- objectMap["id"] = afft.ID
- }
- if afft.Location != nil {
- objectMap["location"] = afft.Location
- }
- if afft.Tags != nil {
- objectMap["tags"] = afft.Tags
- }
- return json.Marshal(objectMap)
-}
-
-// UnmarshalJSON is the custom unmarshaler for AzureFirewallFqdnTag struct.
-func (afft *AzureFirewallFqdnTag) 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 azureFirewallFqdnTagPropertiesFormat AzureFirewallFqdnTagPropertiesFormat
- err = json.Unmarshal(*v, &azureFirewallFqdnTagPropertiesFormat)
- if err != nil {
- return err
- }
- afft.AzureFirewallFqdnTagPropertiesFormat = &azureFirewallFqdnTagPropertiesFormat
- }
- case "etag":
- if v != nil {
- var etag string
- err = json.Unmarshal(*v, &etag)
- if err != nil {
- return err
- }
- afft.Etag = &etag
- }
- case "id":
- if v != nil {
- var ID string
- err = json.Unmarshal(*v, &ID)
- if err != nil {
- return err
- }
- afft.ID = &ID
- }
- case "name":
- if v != nil {
- var name string
- err = json.Unmarshal(*v, &name)
- if err != nil {
- return err
- }
- afft.Name = &name
- }
- case "type":
- if v != nil {
- var typeVar string
- err = json.Unmarshal(*v, &typeVar)
- if err != nil {
- return err
- }
- afft.Type = &typeVar
- }
- case "location":
- if v != nil {
- var location string
- err = json.Unmarshal(*v, &location)
- if err != nil {
- return err
- }
- afft.Location = &location
- }
- case "tags":
- if v != nil {
- var tags map[string]*string
- err = json.Unmarshal(*v, &tags)
- if err != nil {
- return err
- }
- afft.Tags = tags
- }
- }
- }
-
- return nil
-}
-
-// AzureFirewallFqdnTagListResult response for ListAzureFirewallFqdnTags API service call.
-type AzureFirewallFqdnTagListResult struct {
- autorest.Response `json:"-"`
- // Value - List of Azure Firewall FQDN Tags in a resource group.
- Value *[]AzureFirewallFqdnTag `json:"value,omitempty"`
- // NextLink - URL to get the next set of results.
- NextLink *string `json:"nextLink,omitempty"`
-}
-
-// AzureFirewallFqdnTagListResultIterator provides access to a complete listing of AzureFirewallFqdnTag values.
-type AzureFirewallFqdnTagListResultIterator struct {
- i int
- page AzureFirewallFqdnTagListResultPage
-}
-
-// 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 *AzureFirewallFqdnTagListResultIterator) NextWithContext(ctx context.Context) (err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/AzureFirewallFqdnTagListResultIterator.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 *AzureFirewallFqdnTagListResultIterator) Next() error {
- return iter.NextWithContext(context.Background())
-}
-
-// NotDone returns true if the enumeration should be started or is not yet complete.
-func (iter AzureFirewallFqdnTagListResultIterator) 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 AzureFirewallFqdnTagListResultIterator) Response() AzureFirewallFqdnTagListResult {
- 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 AzureFirewallFqdnTagListResultIterator) Value() AzureFirewallFqdnTag {
- if !iter.page.NotDone() {
- return AzureFirewallFqdnTag{}
- }
- return iter.page.Values()[iter.i]
-}
-
-// Creates a new instance of the AzureFirewallFqdnTagListResultIterator type.
-func NewAzureFirewallFqdnTagListResultIterator(page AzureFirewallFqdnTagListResultPage) AzureFirewallFqdnTagListResultIterator {
- return AzureFirewallFqdnTagListResultIterator{page: page}
-}
-
-// IsEmpty returns true if the ListResult contains no values.
-func (afftlr AzureFirewallFqdnTagListResult) IsEmpty() bool {
- return afftlr.Value == nil || len(*afftlr.Value) == 0
-}
-
-// hasNextLink returns true if the NextLink is not empty.
-func (afftlr AzureFirewallFqdnTagListResult) hasNextLink() bool {
- return afftlr.NextLink != nil && len(*afftlr.NextLink) != 0
-}
-
-// azureFirewallFqdnTagListResultPreparer prepares a request to retrieve the next set of results.
-// It returns nil if no more results exist.
-func (afftlr AzureFirewallFqdnTagListResult) azureFirewallFqdnTagListResultPreparer(ctx context.Context) (*http.Request, error) {
- if !afftlr.hasNextLink() {
- return nil, nil
- }
- return autorest.Prepare((&http.Request{}).WithContext(ctx),
- autorest.AsJSON(),
- autorest.AsGet(),
- autorest.WithBaseURL(to.String(afftlr.NextLink)))
-}
-
-// AzureFirewallFqdnTagListResultPage contains a page of AzureFirewallFqdnTag values.
-type AzureFirewallFqdnTagListResultPage struct {
- fn func(context.Context, AzureFirewallFqdnTagListResult) (AzureFirewallFqdnTagListResult, error)
- afftlr AzureFirewallFqdnTagListResult
-}
-
-// 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 *AzureFirewallFqdnTagListResultPage) NextWithContext(ctx context.Context) (err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/AzureFirewallFqdnTagListResultPage.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.afftlr)
- if err != nil {
- return err
- }
- page.afftlr = 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 *AzureFirewallFqdnTagListResultPage) Next() error {
- return page.NextWithContext(context.Background())
-}
-
-// NotDone returns true if the page enumeration should be started or is not yet complete.
-func (page AzureFirewallFqdnTagListResultPage) NotDone() bool {
- return !page.afftlr.IsEmpty()
-}
-
-// Response returns the raw server response from the last page request.
-func (page AzureFirewallFqdnTagListResultPage) Response() AzureFirewallFqdnTagListResult {
- return page.afftlr
-}
-
-// Values returns the slice of values for the current page or nil if there are no values.
-func (page AzureFirewallFqdnTagListResultPage) Values() []AzureFirewallFqdnTag {
- if page.afftlr.IsEmpty() {
- return nil
- }
- return *page.afftlr.Value
-}
-
-// Creates a new instance of the AzureFirewallFqdnTagListResultPage type.
-func NewAzureFirewallFqdnTagListResultPage(getNextPage func(context.Context, AzureFirewallFqdnTagListResult) (AzureFirewallFqdnTagListResult, error)) AzureFirewallFqdnTagListResultPage {
- return AzureFirewallFqdnTagListResultPage{fn: getNextPage}
-}
-
-// AzureFirewallFqdnTagPropertiesFormat azure Firewall FQDN Tag Properties
-type AzureFirewallFqdnTagPropertiesFormat struct {
- // ProvisioningState - READ-ONLY; The provisioning state of the resource.
- ProvisioningState *string `json:"provisioningState,omitempty"`
- // FqdnTagName - READ-ONLY; The name of this FQDN Tag.
- FqdnTagName *string `json:"fqdnTagName,omitempty"`
-}
-
-// AzureFirewallIPConfiguration IP configuration of an Azure Firewall.
-type AzureFirewallIPConfiguration struct {
- *AzureFirewallIPConfigurationPropertiesFormat `json:"properties,omitempty"`
- // Name - 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"`
- // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
- Etag *string `json:"etag,omitempty"`
- // ID - Resource ID.
- ID *string `json:"id,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for AzureFirewallIPConfiguration.
-func (afic AzureFirewallIPConfiguration) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if afic.AzureFirewallIPConfigurationPropertiesFormat != nil {
- objectMap["properties"] = afic.AzureFirewallIPConfigurationPropertiesFormat
- }
- if afic.Name != nil {
- objectMap["name"] = afic.Name
- }
- if afic.ID != nil {
- objectMap["id"] = afic.ID
- }
- return json.Marshal(objectMap)
-}
-
-// UnmarshalJSON is the custom unmarshaler for AzureFirewallIPConfiguration struct.
-func (afic *AzureFirewallIPConfiguration) 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 azureFirewallIPConfigurationPropertiesFormat AzureFirewallIPConfigurationPropertiesFormat
- err = json.Unmarshal(*v, &azureFirewallIPConfigurationPropertiesFormat)
- if err != nil {
- return err
- }
- afic.AzureFirewallIPConfigurationPropertiesFormat = &azureFirewallIPConfigurationPropertiesFormat
- }
- case "name":
- if v != nil {
- var name string
- err = json.Unmarshal(*v, &name)
- if err != nil {
- return err
- }
- afic.Name = &name
- }
- case "etag":
- if v != nil {
- var etag string
- err = json.Unmarshal(*v, &etag)
- if err != nil {
- return err
- }
- afic.Etag = &etag
- }
- case "id":
- if v != nil {
- var ID string
- err = json.Unmarshal(*v, &ID)
- if err != nil {
- return err
- }
- afic.ID = &ID
- }
- }
- }
-
- return nil
-}
-
-// AzureFirewallIPConfigurationPropertiesFormat properties of IP configuration of an Azure Firewall.
-type AzureFirewallIPConfigurationPropertiesFormat struct {
- // PrivateIPAddress - READ-ONLY; The Firewall Internal Load Balancer IP to be used as the next hop in User Defined Routes.
- PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
- // Subnet - Reference of the subnet resource. This resource must be named 'AzureFirewallSubnet'.
- Subnet *SubResource `json:"subnet,omitempty"`
- // PublicIPAddress - Reference of the PublicIP resource. This field is a mandatory input if subnet is not null.
- PublicIPAddress *SubResource `json:"publicIPAddress,omitempty"`
- // ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
- ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for AzureFirewallIPConfigurationPropertiesFormat.
-func (aficpf AzureFirewallIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if aficpf.Subnet != nil {
- objectMap["subnet"] = aficpf.Subnet
- }
- if aficpf.PublicIPAddress != nil {
- objectMap["publicIPAddress"] = aficpf.PublicIPAddress
- }
- if aficpf.ProvisioningState != "" {
- objectMap["provisioningState"] = aficpf.ProvisioningState
- }
- return json.Marshal(objectMap)
-}
-
-// AzureFirewallListResult response for ListAzureFirewalls API service call.
-type AzureFirewallListResult struct {
- autorest.Response `json:"-"`
- // Value - List of Azure Firewalls in a resource group.
- Value *[]AzureFirewall `json:"value,omitempty"`
- // NextLink - URL to get the next set of results.
- NextLink *string `json:"nextLink,omitempty"`
-}
-
-// AzureFirewallListResultIterator provides access to a complete listing of AzureFirewall values.
-type AzureFirewallListResultIterator struct {
- i int
- page AzureFirewallListResultPage
-}
-
-// 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 *AzureFirewallListResultIterator) NextWithContext(ctx context.Context) (err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/AzureFirewallListResultIterator.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 *AzureFirewallListResultIterator) Next() error {
- return iter.NextWithContext(context.Background())
-}
-
-// NotDone returns true if the enumeration should be started or is not yet complete.
-func (iter AzureFirewallListResultIterator) 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 AzureFirewallListResultIterator) Response() AzureFirewallListResult {
- 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 AzureFirewallListResultIterator) Value() AzureFirewall {
- if !iter.page.NotDone() {
- return AzureFirewall{}
- }
- return iter.page.Values()[iter.i]
-}
-
-// Creates a new instance of the AzureFirewallListResultIterator type.
-func NewAzureFirewallListResultIterator(page AzureFirewallListResultPage) AzureFirewallListResultIterator {
- return AzureFirewallListResultIterator{page: page}
-}
-
-// IsEmpty returns true if the ListResult contains no values.
-func (aflr AzureFirewallListResult) IsEmpty() bool {
- return aflr.Value == nil || len(*aflr.Value) == 0
-}
-
-// hasNextLink returns true if the NextLink is not empty.
-func (aflr AzureFirewallListResult) hasNextLink() bool {
- return aflr.NextLink != nil && len(*aflr.NextLink) != 0
-}
-
-// azureFirewallListResultPreparer prepares a request to retrieve the next set of results.
-// It returns nil if no more results exist.
-func (aflr AzureFirewallListResult) azureFirewallListResultPreparer(ctx context.Context) (*http.Request, error) {
- if !aflr.hasNextLink() {
- return nil, nil
- }
- return autorest.Prepare((&http.Request{}).WithContext(ctx),
- autorest.AsJSON(),
- autorest.AsGet(),
- autorest.WithBaseURL(to.String(aflr.NextLink)))
-}
-
-// AzureFirewallListResultPage contains a page of AzureFirewall values.
-type AzureFirewallListResultPage struct {
- fn func(context.Context, AzureFirewallListResult) (AzureFirewallListResult, error)
- aflr AzureFirewallListResult
-}
-
-// 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 *AzureFirewallListResultPage) NextWithContext(ctx context.Context) (err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/AzureFirewallListResultPage.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.aflr)
- if err != nil {
- return err
- }
- page.aflr = 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 *AzureFirewallListResultPage) Next() error {
- return page.NextWithContext(context.Background())
-}
-
-// NotDone returns true if the page enumeration should be started or is not yet complete.
-func (page AzureFirewallListResultPage) NotDone() bool {
- return !page.aflr.IsEmpty()
-}
-
-// Response returns the raw server response from the last page request.
-func (page AzureFirewallListResultPage) Response() AzureFirewallListResult {
- return page.aflr
-}
-
-// Values returns the slice of values for the current page or nil if there are no values.
-func (page AzureFirewallListResultPage) Values() []AzureFirewall {
- if page.aflr.IsEmpty() {
- return nil
- }
- return *page.aflr.Value
-}
-
-// Creates a new instance of the AzureFirewallListResultPage type.
-func NewAzureFirewallListResultPage(getNextPage func(context.Context, AzureFirewallListResult) (AzureFirewallListResult, error)) AzureFirewallListResultPage {
- return AzureFirewallListResultPage{fn: getNextPage}
-}
-
-// AzureFirewallNatRCAction azureFirewall NAT Rule Collection Action.
-type AzureFirewallNatRCAction struct {
- // Type - The type of action. Possible values include: 'Snat', 'Dnat'
- Type AzureFirewallNatRCActionType `json:"type,omitempty"`
-}
-
-// AzureFirewallNatRule properties of a NAT rule.
-type AzureFirewallNatRule struct {
- // Name - Name of the NAT rule.
- Name *string `json:"name,omitempty"`
- // Description - Description of the rule.
- Description *string `json:"description,omitempty"`
- // SourceAddresses - List of source IP addresses for this rule.
- SourceAddresses *[]string `json:"sourceAddresses,omitempty"`
- // DestinationAddresses - List of destination IP addresses for this rule. Supports IP ranges, prefixes, and service tags.
- DestinationAddresses *[]string `json:"destinationAddresses,omitempty"`
- // DestinationPorts - List of destination ports.
- DestinationPorts *[]string `json:"destinationPorts,omitempty"`
- // Protocols - Array of AzureFirewallNetworkRuleProtocols applicable to this NAT rule.
- Protocols *[]AzureFirewallNetworkRuleProtocol `json:"protocols,omitempty"`
- // TranslatedAddress - The translated address for this NAT rule.
- TranslatedAddress *string `json:"translatedAddress,omitempty"`
- // TranslatedPort - The translated port for this NAT rule.
- TranslatedPort *string `json:"translatedPort,omitempty"`
-}
-
-// AzureFirewallNatRuleCollection NAT rule collection resource
-type AzureFirewallNatRuleCollection struct {
- *AzureFirewallNatRuleCollectionProperties `json:"properties,omitempty"`
- // Name - Gets 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"`
- // Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
- Etag *string `json:"etag,omitempty"`
- // ID - Resource ID.
- ID *string `json:"id,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for AzureFirewallNatRuleCollection.
-func (afnrc AzureFirewallNatRuleCollection) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if afnrc.AzureFirewallNatRuleCollectionProperties != nil {
- objectMap["properties"] = afnrc.AzureFirewallNatRuleCollectionProperties
- }
- if afnrc.Name != nil {
- objectMap["name"] = afnrc.Name
- }
- if afnrc.ID != nil {
- objectMap["id"] = afnrc.ID
- }
- return json.Marshal(objectMap)
-}
-
-// UnmarshalJSON is the custom unmarshaler for AzureFirewallNatRuleCollection struct.
-func (afnrc *AzureFirewallNatRuleCollection) 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 azureFirewallNatRuleCollectionProperties AzureFirewallNatRuleCollectionProperties
- err = json.Unmarshal(*v, &azureFirewallNatRuleCollectionProperties)
- if err != nil {
- return err
- }
- afnrc.AzureFirewallNatRuleCollectionProperties = &azureFirewallNatRuleCollectionProperties
- }
- case "name":
- if v != nil {
- var name string
- err = json.Unmarshal(*v, &name)
- if err != nil {
- return err
- }
- afnrc.Name = &name
- }
- case "etag":
- if v != nil {
- var etag string
- err = json.Unmarshal(*v, &etag)
- if err != nil {
- return err
- }
- afnrc.Etag = &etag
- }
- case "id":
- if v != nil {
- var ID string
- err = json.Unmarshal(*v, &ID)
- if err != nil {
- return err
- }
- afnrc.ID = &ID
- }
- }
- }
-
- return nil
-}
-
-// AzureFirewallNatRuleCollectionProperties properties of the NAT rule collection.
-type AzureFirewallNatRuleCollectionProperties struct {
- // Priority - Priority of the NAT rule collection resource.
- Priority *int32 `json:"priority,omitempty"`
- // Action - The action type of a NAT rule collection
- Action *AzureFirewallNatRCAction `json:"action,omitempty"`
- // Rules - Collection of rules used by a NAT rule collection.
- Rules *[]AzureFirewallNatRule `json:"rules,omitempty"`
- // ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
- ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
-}
-
-// AzureFirewallNetworkRule properties of the network rule.
-type AzureFirewallNetworkRule struct {
- // Name - Name of the network rule.
- Name *string `json:"name,omitempty"`
- // Description - Description of the rule.
- Description *string `json:"description,omitempty"`
- // Protocols - Array of AzureFirewallNetworkRuleProtocols.
- Protocols *[]AzureFirewallNetworkRuleProtocol `json:"protocols,omitempty"`
- // SourceAddresses - List of source IP addresses for this rule.
- SourceAddresses *[]string `json:"sourceAddresses,omitempty"`
- // DestinationAddresses - List of destination IP addresses.
- DestinationAddresses *[]string `json:"destinationAddresses,omitempty"`
- // DestinationPorts - List of destination ports.
- DestinationPorts *[]string `json:"destinationPorts,omitempty"`
-}
-
-// AzureFirewallNetworkRuleCollection network rule collection resource
-type AzureFirewallNetworkRuleCollection struct {
- *AzureFirewallNetworkRuleCollectionPropertiesFormat `json:"properties,omitempty"`
- // Name - Gets 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"`
- // Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
- Etag *string `json:"etag,omitempty"`
- // ID - Resource ID.
- ID *string `json:"id,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for AzureFirewallNetworkRuleCollection.
-func (afnrc AzureFirewallNetworkRuleCollection) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if afnrc.AzureFirewallNetworkRuleCollectionPropertiesFormat != nil {
- objectMap["properties"] = afnrc.AzureFirewallNetworkRuleCollectionPropertiesFormat
- }
- if afnrc.Name != nil {
- objectMap["name"] = afnrc.Name
- }
- if afnrc.ID != nil {
- objectMap["id"] = afnrc.ID
- }
- return json.Marshal(objectMap)
-}
-
-// UnmarshalJSON is the custom unmarshaler for AzureFirewallNetworkRuleCollection struct.
-func (afnrc *AzureFirewallNetworkRuleCollection) 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 azureFirewallNetworkRuleCollectionPropertiesFormat AzureFirewallNetworkRuleCollectionPropertiesFormat
- err = json.Unmarshal(*v, &azureFirewallNetworkRuleCollectionPropertiesFormat)
- if err != nil {
- return err
- }
- afnrc.AzureFirewallNetworkRuleCollectionPropertiesFormat = &azureFirewallNetworkRuleCollectionPropertiesFormat
- }
- case "name":
- if v != nil {
- var name string
- err = json.Unmarshal(*v, &name)
- if err != nil {
- return err
- }
- afnrc.Name = &name
- }
- case "etag":
- if v != nil {
- var etag string
- err = json.Unmarshal(*v, &etag)
- if err != nil {
- return err
- }
- afnrc.Etag = &etag
- }
- case "id":
- if v != nil {
- var ID string
- err = json.Unmarshal(*v, &ID)
- if err != nil {
- return err
- }
- afnrc.ID = &ID
- }
- }
- }
-
- return nil
-}
-
-// AzureFirewallNetworkRuleCollectionPropertiesFormat properties of the network rule collection.
-type AzureFirewallNetworkRuleCollectionPropertiesFormat struct {
- // Priority - Priority of the network rule collection resource.
- Priority *int32 `json:"priority,omitempty"`
- // Action - The action type of a rule collection
- Action *AzureFirewallRCAction `json:"action,omitempty"`
- // Rules - Collection of rules used by a network rule collection.
- Rules *[]AzureFirewallNetworkRule `json:"rules,omitempty"`
- // ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
- ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
-}
-
-// AzureFirewallPropertiesFormat properties of the Azure Firewall.
-type AzureFirewallPropertiesFormat struct {
- // ApplicationRuleCollections - Collection of application rule collections used by Azure Firewall.
- ApplicationRuleCollections *[]AzureFirewallApplicationRuleCollection `json:"applicationRuleCollections,omitempty"`
- // NatRuleCollections - Collection of NAT rule collections used by Azure Firewall.
- NatRuleCollections *[]AzureFirewallNatRuleCollection `json:"natRuleCollections,omitempty"`
- // NetworkRuleCollections - Collection of network rule collections used by Azure Firewall.
- NetworkRuleCollections *[]AzureFirewallNetworkRuleCollection `json:"networkRuleCollections,omitempty"`
- // IPConfigurations - IP configuration of the Azure Firewall resource.
- IPConfigurations *[]AzureFirewallIPConfiguration `json:"ipConfigurations,omitempty"`
- // ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
- ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
- // ThreatIntelMode - The operation mode for Threat Intelligence. Possible values include: 'AzureFirewallThreatIntelModeAlert', 'AzureFirewallThreatIntelModeDeny', 'AzureFirewallThreatIntelModeOff'
- ThreatIntelMode AzureFirewallThreatIntelMode `json:"threatIntelMode,omitempty"`
-}
-
-// AzureFirewallRCAction properties of the AzureFirewallRCAction.
-type AzureFirewallRCAction struct {
- // Type - The type of action. Possible values include: 'AzureFirewallRCActionTypeAllow', 'AzureFirewallRCActionTypeDeny', 'AzureFirewallRCActionTypeAlert'
- Type AzureFirewallRCActionType `json:"type,omitempty"`
-}
-
-// AzureFirewallsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
-// long-running operation.
-type AzureFirewallsCreateOrUpdateFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *AzureFirewallsCreateOrUpdateFuture) Result(client AzureFirewallsClient) (af AzureFirewall, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.AzureFirewallsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.AzureFirewallsCreateOrUpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if af.Response.Response, err = future.GetResult(sender); err == nil && af.Response.Response.StatusCode != http.StatusNoContent {
- af, err = client.CreateOrUpdateResponder(af.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.AzureFirewallsCreateOrUpdateFuture", "Result", af.Response.Response, "Failure responding to request")
- }
- }
- return
-}
-
-// AzureFirewallsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
-type AzureFirewallsDeleteFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *AzureFirewallsDeleteFuture) Result(client AzureFirewallsClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.AzureFirewallsDeleteFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.AzureFirewallsDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
-}
-
-// AzureReachabilityReport azure reachability report details.
-type AzureReachabilityReport struct {
- autorest.Response `json:"-"`
- // AggregationLevel - The aggregation level of Azure reachability report. Can be Country, State or City.
- AggregationLevel *string `json:"aggregationLevel,omitempty"`
- ProviderLocation *AzureReachabilityReportLocation `json:"providerLocation,omitempty"`
- // ReachabilityReport - List of Azure reachability report items.
- ReachabilityReport *[]AzureReachabilityReportItem `json:"reachabilityReport,omitempty"`
-}
-
-// AzureReachabilityReportItem azure reachability report details for a given provider location.
-type AzureReachabilityReportItem struct {
- // Provider - The Internet service provider.
- Provider *string `json:"provider,omitempty"`
- // AzureLocation - The Azure region.
- AzureLocation *string `json:"azureLocation,omitempty"`
- // Latencies - List of latency details for each of the time series.
- Latencies *[]AzureReachabilityReportLatencyInfo `json:"latencies,omitempty"`
-}
-
-// AzureReachabilityReportLatencyInfo details on latency for a time series.
-type AzureReachabilityReportLatencyInfo struct {
- // TimeStamp - The time stamp.
- TimeStamp *date.Time `json:"timeStamp,omitempty"`
- // Score - The relative latency score between 1 and 100, higher values indicating a faster connection.
- Score *int32 `json:"score,omitempty"`
-}
-
-// AzureReachabilityReportLocation parameters that define a geographic location.
-type AzureReachabilityReportLocation struct {
- // Country - The name of the country.
- Country *string `json:"country,omitempty"`
- // State - The name of the state.
- State *string `json:"state,omitempty"`
- // City - The name of the city or town.
- City *string `json:"city,omitempty"`
-}
-
-// AzureReachabilityReportParameters geographic and time constraints for Azure reachability report.
-type AzureReachabilityReportParameters struct {
- ProviderLocation *AzureReachabilityReportLocation `json:"providerLocation,omitempty"`
- // Providers - List of Internet service providers.
- Providers *[]string `json:"providers,omitempty"`
- // AzureLocations - Optional Azure regions to scope the query to.
- AzureLocations *[]string `json:"azureLocations,omitempty"`
- // StartTime - The start time for the Azure reachability report.
- StartTime *date.Time `json:"startTime,omitempty"`
- // EndTime - The end time for the Azure reachability report.
- EndTime *date.Time `json:"endTime,omitempty"`
-}
-
-// BackendAddressPool pool of backend IP addresses.
-type BackendAddressPool struct {
- autorest.Response `json:"-"`
- // BackendAddressPoolPropertiesFormat - Properties of load balancer backend address pool.
- *BackendAddressPoolPropertiesFormat `json:"properties,omitempty"`
- // Name - Gets 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"`
- // Etag - A unique read-only string that changes whenever the resource is updated.
- Etag *string `json:"etag,omitempty"`
- // ID - Resource ID.
- ID *string `json:"id,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for BackendAddressPool.
-func (bap BackendAddressPool) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if bap.BackendAddressPoolPropertiesFormat != nil {
- objectMap["properties"] = bap.BackendAddressPoolPropertiesFormat
- }
- if bap.Name != nil {
- objectMap["name"] = bap.Name
- }
- if bap.Etag != nil {
- objectMap["etag"] = bap.Etag
- }
- if bap.ID != nil {
- objectMap["id"] = bap.ID
- }
- return json.Marshal(objectMap)
-}
-
-// UnmarshalJSON is the custom unmarshaler for BackendAddressPool struct.
-func (bap *BackendAddressPool) 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 backendAddressPoolPropertiesFormat BackendAddressPoolPropertiesFormat
- err = json.Unmarshal(*v, &backendAddressPoolPropertiesFormat)
- if err != nil {
- return err
- }
- bap.BackendAddressPoolPropertiesFormat = &backendAddressPoolPropertiesFormat
- }
- case "name":
- if v != nil {
- var name string
- err = json.Unmarshal(*v, &name)
- if err != nil {
- return err
- }
- bap.Name = &name
- }
- case "etag":
- if v != nil {
- var etag string
- err = json.Unmarshal(*v, &etag)
- if err != nil {
- return err
- }
- bap.Etag = &etag
- }
- case "id":
- if v != nil {
- var ID string
- err = json.Unmarshal(*v, &ID)
- if err != nil {
- return err
- }
- bap.ID = &ID
- }
- }
- }
-
- return nil
-}
-
-// BackendAddressPoolPropertiesFormat properties of the backend address pool.
-type BackendAddressPoolPropertiesFormat struct {
- // BackendIPConfigurations - READ-ONLY; Gets collection of references to IP addresses defined in network interfaces.
- BackendIPConfigurations *[]InterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"`
- // LoadBalancingRules - READ-ONLY; Gets load balancing rules that use this backend address pool.
- LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"`
- // OutboundRule - READ-ONLY; Gets outbound rules that use this backend address pool.
- OutboundRule *SubResource `json:"outboundRule,omitempty"`
- // OutboundRules - READ-ONLY; Gets outbound rules that use this backend address pool.
- OutboundRules *[]SubResource `json:"outboundRules,omitempty"`
- // ProvisioningState - Get provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
- ProvisioningState *string `json:"provisioningState,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for BackendAddressPoolPropertiesFormat.
-func (bappf BackendAddressPoolPropertiesFormat) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if bappf.ProvisioningState != nil {
- objectMap["provisioningState"] = bappf.ProvisioningState
- }
- return json.Marshal(objectMap)
-}
-
-// BGPCommunity contains bgp community information offered in Service Community resources.
-type BGPCommunity struct {
- // ServiceSupportedRegion - The region which the service support. e.g. For O365, region is Global.
- ServiceSupportedRegion *string `json:"serviceSupportedRegion,omitempty"`
- // CommunityName - The name of the bgp community. e.g. Skype.
- CommunityName *string `json:"communityName,omitempty"`
- // CommunityValue - The value of the bgp community. For more information: https://docs.microsoft.com/en-us/azure/expressroute/expressroute-routing.
- CommunityValue *string `json:"communityValue,omitempty"`
- // CommunityPrefixes - The prefixes that the bgp community contains.
- CommunityPrefixes *[]string `json:"communityPrefixes,omitempty"`
- // IsAuthorizedToUse - Customer is authorized to use bgp community or not.
- IsAuthorizedToUse *bool `json:"isAuthorizedToUse,omitempty"`
- // ServiceGroup - The service group of the bgp community contains.
- ServiceGroup *string `json:"serviceGroup,omitempty"`
-}
-
-// BgpPeerStatus BGP peer status details
-type BgpPeerStatus struct {
- // LocalAddress - READ-ONLY; The virtual network gateway's local address
- LocalAddress *string `json:"localAddress,omitempty"`
- // Neighbor - READ-ONLY; The remote BGP peer
- Neighbor *string `json:"neighbor,omitempty"`
- // Asn - READ-ONLY; The autonomous system number of the remote BGP peer
- Asn *int32 `json:"asn,omitempty"`
- // State - READ-ONLY; The BGP peer state. Possible values include: 'BgpPeerStateUnknown', 'BgpPeerStateStopped', 'BgpPeerStateIdle', 'BgpPeerStateConnecting', 'BgpPeerStateConnected'
- State BgpPeerState `json:"state,omitempty"`
- // ConnectedDuration - READ-ONLY; For how long the peering has been up
- ConnectedDuration *string `json:"connectedDuration,omitempty"`
- // RoutesReceived - READ-ONLY; The number of routes learned from this peer
- RoutesReceived *int64 `json:"routesReceived,omitempty"`
- // MessagesSent - READ-ONLY; The number of BGP messages sent
- MessagesSent *int64 `json:"messagesSent,omitempty"`
- // MessagesReceived - READ-ONLY; The number of BGP messages received
- MessagesReceived *int64 `json:"messagesReceived,omitempty"`
-}
-
-// BgpPeerStatusListResult response for list BGP peer status API service call
-type BgpPeerStatusListResult struct {
- autorest.Response `json:"-"`
- // Value - List of BGP peers
- Value *[]BgpPeerStatus `json:"value,omitempty"`
-}
-
-// BgpServiceCommunity service Community Properties.
-type BgpServiceCommunity struct {
- *BgpServiceCommunityPropertiesFormat `json:"properties,omitempty"`
- // ID - 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 BgpServiceCommunity.
-func (bsc BgpServiceCommunity) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if bsc.BgpServiceCommunityPropertiesFormat != nil {
- objectMap["properties"] = bsc.BgpServiceCommunityPropertiesFormat
- }
- if bsc.ID != nil {
- objectMap["id"] = bsc.ID
- }
- if bsc.Location != nil {
- objectMap["location"] = bsc.Location
- }
- if bsc.Tags != nil {
- objectMap["tags"] = bsc.Tags
- }
- return json.Marshal(objectMap)
-}
-
-// UnmarshalJSON is the custom unmarshaler for BgpServiceCommunity struct.
-func (bsc *BgpServiceCommunity) 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 bgpServiceCommunityPropertiesFormat BgpServiceCommunityPropertiesFormat
- err = json.Unmarshal(*v, &bgpServiceCommunityPropertiesFormat)
- if err != nil {
- return err
- }
- bsc.BgpServiceCommunityPropertiesFormat = &bgpServiceCommunityPropertiesFormat
- }
- case "id":
- if v != nil {
- var ID string
- err = json.Unmarshal(*v, &ID)
- if err != nil {
- return err
- }
- bsc.ID = &ID
- }
- case "name":
- if v != nil {
- var name string
- err = json.Unmarshal(*v, &name)
- if err != nil {
- return err
- }
- bsc.Name = &name
- }
- case "type":
- if v != nil {
- var typeVar string
- err = json.Unmarshal(*v, &typeVar)
- if err != nil {
- return err
- }
- bsc.Type = &typeVar
- }
- case "location":
- if v != nil {
- var location string
- err = json.Unmarshal(*v, &location)
- if err != nil {
- return err
- }
- bsc.Location = &location
- }
- case "tags":
- if v != nil {
- var tags map[string]*string
- err = json.Unmarshal(*v, &tags)
- if err != nil {
- return err
- }
- bsc.Tags = tags
- }
- }
- }
-
- return nil
-}
-
-// BgpServiceCommunityListResult response for the ListServiceCommunity API service call.
-type BgpServiceCommunityListResult struct {
- autorest.Response `json:"-"`
- // Value - A list of service community resources.
- Value *[]BgpServiceCommunity `json:"value,omitempty"`
- // NextLink - The URL to get the next set of results.
- NextLink *string `json:"nextLink,omitempty"`
-}
-
-// BgpServiceCommunityListResultIterator provides access to a complete listing of BgpServiceCommunity values.
-type BgpServiceCommunityListResultIterator struct {
- i int
- page BgpServiceCommunityListResultPage
-}
-
-// 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 *BgpServiceCommunityListResultIterator) NextWithContext(ctx context.Context) (err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/BgpServiceCommunityListResultIterator.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 *BgpServiceCommunityListResultIterator) Next() error {
- return iter.NextWithContext(context.Background())
-}
-
-// NotDone returns true if the enumeration should be started or is not yet complete.
-func (iter BgpServiceCommunityListResultIterator) 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 BgpServiceCommunityListResultIterator) Response() BgpServiceCommunityListResult {
- 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 BgpServiceCommunityListResultIterator) Value() BgpServiceCommunity {
- if !iter.page.NotDone() {
- return BgpServiceCommunity{}
- }
- return iter.page.Values()[iter.i]
-}
-
-// Creates a new instance of the BgpServiceCommunityListResultIterator type.
-func NewBgpServiceCommunityListResultIterator(page BgpServiceCommunityListResultPage) BgpServiceCommunityListResultIterator {
- return BgpServiceCommunityListResultIterator{page: page}
-}
-
-// IsEmpty returns true if the ListResult contains no values.
-func (bsclr BgpServiceCommunityListResult) IsEmpty() bool {
- return bsclr.Value == nil || len(*bsclr.Value) == 0
-}
-
-// hasNextLink returns true if the NextLink is not empty.
-func (bsclr BgpServiceCommunityListResult) hasNextLink() bool {
- return bsclr.NextLink != nil && len(*bsclr.NextLink) != 0
-}
-
-// bgpServiceCommunityListResultPreparer prepares a request to retrieve the next set of results.
-// It returns nil if no more results exist.
-func (bsclr BgpServiceCommunityListResult) bgpServiceCommunityListResultPreparer(ctx context.Context) (*http.Request, error) {
- if !bsclr.hasNextLink() {
- return nil, nil
- }
- return autorest.Prepare((&http.Request{}).WithContext(ctx),
- autorest.AsJSON(),
- autorest.AsGet(),
- autorest.WithBaseURL(to.String(bsclr.NextLink)))
-}
-
-// BgpServiceCommunityListResultPage contains a page of BgpServiceCommunity values.
-type BgpServiceCommunityListResultPage struct {
- fn func(context.Context, BgpServiceCommunityListResult) (BgpServiceCommunityListResult, error)
- bsclr BgpServiceCommunityListResult
-}
-
-// 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 *BgpServiceCommunityListResultPage) NextWithContext(ctx context.Context) (err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/BgpServiceCommunityListResultPage.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.bsclr)
- if err != nil {
- return err
- }
- page.bsclr = 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 *BgpServiceCommunityListResultPage) Next() error {
- return page.NextWithContext(context.Background())
-}
-
-// NotDone returns true if the page enumeration should be started or is not yet complete.
-func (page BgpServiceCommunityListResultPage) NotDone() bool {
- return !page.bsclr.IsEmpty()
-}
-
-// Response returns the raw server response from the last page request.
-func (page BgpServiceCommunityListResultPage) Response() BgpServiceCommunityListResult {
- return page.bsclr
-}
-
-// Values returns the slice of values for the current page or nil if there are no values.
-func (page BgpServiceCommunityListResultPage) Values() []BgpServiceCommunity {
- if page.bsclr.IsEmpty() {
- return nil
- }
- return *page.bsclr.Value
-}
-
-// Creates a new instance of the BgpServiceCommunityListResultPage type.
-func NewBgpServiceCommunityListResultPage(getNextPage func(context.Context, BgpServiceCommunityListResult) (BgpServiceCommunityListResult, error)) BgpServiceCommunityListResultPage {
- return BgpServiceCommunityListResultPage{fn: getNextPage}
-}
-
-// BgpServiceCommunityPropertiesFormat properties of Service Community.
-type BgpServiceCommunityPropertiesFormat struct {
- // ServiceName - The name of the bgp community. e.g. Skype.
- ServiceName *string `json:"serviceName,omitempty"`
- // BgpCommunities - Get a list of bgp communities.
- BgpCommunities *[]BGPCommunity `json:"bgpCommunities,omitempty"`
-}
-
-// BgpSettings BGP settings details
-type BgpSettings struct {
- // Asn - The BGP speaker's ASN.
- Asn *int64 `json:"asn,omitempty"`
- // BgpPeeringAddress - The BGP peering address and BGP identifier of this BGP speaker.
- BgpPeeringAddress *string `json:"bgpPeeringAddress,omitempty"`
- // PeerWeight - The weight added to routes learned from this BGP speaker.
- PeerWeight *int32 `json:"peerWeight,omitempty"`
-}
-
-// CloudError an error response from the Batch service.
-type CloudError struct {
- // Error - Cloud error body.
- Error *CloudErrorBody `json:"error,omitempty"`
-}
-
-// CloudErrorBody an error response from the Batch 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"`
-}
-
-// ConfigurationDiagnosticParameters parameters to get network configuration diagnostic.
-type ConfigurationDiagnosticParameters struct {
- // TargetResourceID - The ID of the target resource to perform network configuration diagnostic. Valid options are VM, NetworkInterface, VMSS/NetworkInterface and Application Gateway.
- TargetResourceID *string `json:"targetResourceId,omitempty"`
- // VerbosityLevel - Verbosity level. Accepted values are 'Normal', 'Minimum', 'Full'. Possible values include: 'Normal', 'Minimum', 'Full'
- VerbosityLevel VerbosityLevel `json:"verbosityLevel,omitempty"`
- // Profiles - List of network configuration diagnostic profiles.
- Profiles *[]ConfigurationDiagnosticProfile `json:"profiles,omitempty"`
-}
-
-// ConfigurationDiagnosticProfile parameters to compare with network configuration.
-type ConfigurationDiagnosticProfile struct {
- // Direction - The direction of the traffic. Accepted values are 'Inbound' and 'Outbound'. Possible values include: 'Inbound', 'Outbound'
- Direction Direction `json:"direction,omitempty"`
- // Protocol - Protocol to be verified on. Accepted values are '*', TCP, UDP.
- Protocol *string `json:"protocol,omitempty"`
- // Source - Traffic source. Accepted values are '*', IP Address/CIDR, Service Tag.
- Source *string `json:"source,omitempty"`
- // Destination - Traffic destination. Accepted values are: '*', IP Address/CIDR, Service Tag.
- Destination *string `json:"destination,omitempty"`
- // DestinationPort - Traffic destination port. Accepted values are '*', port (for example, 3389) and port range (for example, 80-100).
- DestinationPort *string `json:"destinationPort,omitempty"`
-}
-
-// ConfigurationDiagnosticResponse results of network configuration diagnostic on the target resource.
-type ConfigurationDiagnosticResponse struct {
- autorest.Response `json:"-"`
- // Results - READ-ONLY; List of network configuration diagnostic results.
- Results *[]ConfigurationDiagnosticResult `json:"results,omitempty"`
-}
-
-// ConfigurationDiagnosticResult network configuration diagnostic result corresponded to provided traffic
-// query.
-type ConfigurationDiagnosticResult struct {
- Profile *ConfigurationDiagnosticProfile `json:"profile,omitempty"`
- NetworkSecurityGroupResult *SecurityGroupResult `json:"networkSecurityGroupResult,omitempty"`
-}
-
-// ConnectionMonitor parameters that define the operation to create a connection monitor.
-type ConnectionMonitor struct {
- // Location - Connection monitor location.
- Location *string `json:"location,omitempty"`
- // Tags - Connection monitor tags.
- Tags map[string]*string `json:"tags"`
- *ConnectionMonitorParameters `json:"properties,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for ConnectionMonitor.
-func (cm ConnectionMonitor) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if cm.Location != nil {
- objectMap["location"] = cm.Location
- }
- if cm.Tags != nil {
- objectMap["tags"] = cm.Tags
- }
- if cm.ConnectionMonitorParameters != nil {
- objectMap["properties"] = cm.ConnectionMonitorParameters
- }
- return json.Marshal(objectMap)
-}
-
-// UnmarshalJSON is the custom unmarshaler for ConnectionMonitor struct.
-func (cm *ConnectionMonitor) 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 "location":
- if v != nil {
- var location string
- err = json.Unmarshal(*v, &location)
- if err != nil {
- return err
- }
- cm.Location = &location
- }
- case "tags":
- if v != nil {
- var tags map[string]*string
- err = json.Unmarshal(*v, &tags)
- if err != nil {
- return err
- }
- cm.Tags = tags
- }
- case "properties":
- if v != nil {
- var connectionMonitorParameters ConnectionMonitorParameters
- err = json.Unmarshal(*v, &connectionMonitorParameters)
- if err != nil {
- return err
- }
- cm.ConnectionMonitorParameters = &connectionMonitorParameters
- }
- }
- }
-
- return nil
-}
-
-// ConnectionMonitorDestination describes the destination of connection monitor.
-type ConnectionMonitorDestination struct {
- // ResourceID - The ID of the resource used as the destination by connection monitor.
- ResourceID *string `json:"resourceId,omitempty"`
- // Address - Address of the connection monitor destination (IP or domain name).
- Address *string `json:"address,omitempty"`
- // Port - The destination port used by connection monitor.
- Port *int32 `json:"port,omitempty"`
-}
-
-// ConnectionMonitorListResult list of connection monitors.
-type ConnectionMonitorListResult struct {
- autorest.Response `json:"-"`
- // Value - Information about connection monitors.
- Value *[]ConnectionMonitorResult `json:"value,omitempty"`
-}
-
-// ConnectionMonitorParameters parameters that define the operation to create a connection monitor.
-type ConnectionMonitorParameters struct {
- Source *ConnectionMonitorSource `json:"source,omitempty"`
- Destination *ConnectionMonitorDestination `json:"destination,omitempty"`
- // AutoStart - Determines if the connection monitor will start automatically once created.
- AutoStart *bool `json:"autoStart,omitempty"`
- // MonitoringIntervalInSeconds - Monitoring interval in seconds.
- MonitoringIntervalInSeconds *int32 `json:"monitoringIntervalInSeconds,omitempty"`
-}
-
-// ConnectionMonitorQueryResult list of connection states snapshots.
-type ConnectionMonitorQueryResult struct {
- autorest.Response `json:"-"`
- // SourceStatus - Status of connection monitor source. Possible values include: 'ConnectionMonitorSourceStatusUnknown', 'ConnectionMonitorSourceStatusActive', 'ConnectionMonitorSourceStatusInactive'
- SourceStatus ConnectionMonitorSourceStatus `json:"sourceStatus,omitempty"`
- // States - Information about connection states.
- States *[]ConnectionStateSnapshot `json:"states,omitempty"`
-}
-
-// ConnectionMonitorResult information about the connection monitor.
-type ConnectionMonitorResult struct {
- autorest.Response `json:"-"`
- // Name - READ-ONLY; Name of the connection monitor.
- Name *string `json:"name,omitempty"`
- // ID - READ-ONLY; ID of the connection monitor.
- ID *string `json:"id,omitempty"`
- Etag *string `json:"etag,omitempty"`
- // Type - READ-ONLY; Connection monitor type.
- Type *string `json:"type,omitempty"`
- // Location - Connection monitor location.
- Location *string `json:"location,omitempty"`
- // Tags - Connection monitor tags.
- Tags map[string]*string `json:"tags"`
- *ConnectionMonitorResultProperties `json:"properties,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for ConnectionMonitorResult.
-func (cmr ConnectionMonitorResult) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if cmr.Etag != nil {
- objectMap["etag"] = cmr.Etag
- }
- if cmr.Location != nil {
- objectMap["location"] = cmr.Location
- }
- if cmr.Tags != nil {
- objectMap["tags"] = cmr.Tags
- }
- if cmr.ConnectionMonitorResultProperties != nil {
- objectMap["properties"] = cmr.ConnectionMonitorResultProperties
- }
- return json.Marshal(objectMap)
-}
-
-// UnmarshalJSON is the custom unmarshaler for ConnectionMonitorResult struct.
-func (cmr *ConnectionMonitorResult) 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
- }
- cmr.Name = &name
- }
- case "id":
- if v != nil {
- var ID string
- err = json.Unmarshal(*v, &ID)
- if err != nil {
- return err
- }
- cmr.ID = &ID
- }
- case "etag":
- if v != nil {
- var etag string
- err = json.Unmarshal(*v, &etag)
- if err != nil {
- return err
- }
- cmr.Etag = &etag
- }
- case "type":
- if v != nil {
- var typeVar string
- err = json.Unmarshal(*v, &typeVar)
- if err != nil {
- return err
- }
- cmr.Type = &typeVar
- }
- case "location":
- if v != nil {
- var location string
- err = json.Unmarshal(*v, &location)
- if err != nil {
- return err
- }
- cmr.Location = &location
- }
- case "tags":
- if v != nil {
- var tags map[string]*string
- err = json.Unmarshal(*v, &tags)
- if err != nil {
- return err
- }
- cmr.Tags = tags
- }
- case "properties":
- if v != nil {
- var connectionMonitorResultProperties ConnectionMonitorResultProperties
- err = json.Unmarshal(*v, &connectionMonitorResultProperties)
- if err != nil {
- return err
- }
- cmr.ConnectionMonitorResultProperties = &connectionMonitorResultProperties
- }
- }
- }
-
- return nil
-}
-
-// ConnectionMonitorResultProperties describes the properties of a connection monitor.
-type ConnectionMonitorResultProperties struct {
- // ProvisioningState - The provisioning state of the connection monitor. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
- ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
- // StartTime - The date and time when the connection monitor was started.
- StartTime *date.Time `json:"startTime,omitempty"`
- // MonitoringStatus - The monitoring status of the connection monitor.
- MonitoringStatus *string `json:"monitoringStatus,omitempty"`
- Source *ConnectionMonitorSource `json:"source,omitempty"`
- Destination *ConnectionMonitorDestination `json:"destination,omitempty"`
- // AutoStart - Determines if the connection monitor will start automatically once created.
- AutoStart *bool `json:"autoStart,omitempty"`
- // MonitoringIntervalInSeconds - Monitoring interval in seconds.
- MonitoringIntervalInSeconds *int32 `json:"monitoringIntervalInSeconds,omitempty"`
-}
-
-// ConnectionMonitorsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
-// long-running operation.
-type ConnectionMonitorsCreateOrUpdateFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *ConnectionMonitorsCreateOrUpdateFuture) Result(client ConnectionMonitorsClient) (cmr ConnectionMonitorResult, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsCreateOrUpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if cmr.Response.Response, err = future.GetResult(sender); err == nil && cmr.Response.Response.StatusCode != http.StatusNoContent {
- cmr, err = client.CreateOrUpdateResponder(cmr.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsCreateOrUpdateFuture", "Result", cmr.Response.Response, "Failure responding to request")
- }
- }
- return
-}
-
-// ConnectionMonitorsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
-type ConnectionMonitorsDeleteFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *ConnectionMonitorsDeleteFuture) Result(client ConnectionMonitorsClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsDeleteFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
-}
-
-// ConnectionMonitorSource describes the source of connection monitor.
-type ConnectionMonitorSource struct {
- // ResourceID - The ID of the resource used as the source by connection monitor.
- ResourceID *string `json:"resourceId,omitempty"`
- // Port - The source port used by connection monitor.
- Port *int32 `json:"port,omitempty"`
-}
-
-// ConnectionMonitorsQueryFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
-type ConnectionMonitorsQueryFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *ConnectionMonitorsQueryFuture) Result(client ConnectionMonitorsClient) (cmqr ConnectionMonitorQueryResult, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsQueryFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsQueryFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if cmqr.Response.Response, err = future.GetResult(sender); err == nil && cmqr.Response.Response.StatusCode != http.StatusNoContent {
- cmqr, err = client.QueryResponder(cmqr.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsQueryFuture", "Result", cmqr.Response.Response, "Failure responding to request")
- }
- }
- return
-}
-
-// ConnectionMonitorsStartFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
-type ConnectionMonitorsStartFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *ConnectionMonitorsStartFuture) Result(client ConnectionMonitorsClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsStartFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsStartFuture")
- return
- }
- ar.Response = future.Response()
- return
-}
-
-// ConnectionMonitorsStopFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
-type ConnectionMonitorsStopFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *ConnectionMonitorsStopFuture) Result(client ConnectionMonitorsClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsStopFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsStopFuture")
- return
- }
- ar.Response = future.Response()
- return
-}
-
-// ConnectionResetSharedKey the virtual network connection reset shared key
-type ConnectionResetSharedKey struct {
- autorest.Response `json:"-"`
- // KeyLength - The virtual network connection reset shared key length, should between 1 and 128.
- KeyLength *int32 `json:"keyLength,omitempty"`
-}
-
-// ConnectionSharedKey response for GetConnectionSharedKey API service call
-type ConnectionSharedKey struct {
- autorest.Response `json:"-"`
- // Value - The virtual network connection shared key value.
- Value *string `json:"value,omitempty"`
- // ID - Resource ID.
- ID *string `json:"id,omitempty"`
-}
-
-// ConnectionStateSnapshot connection state snapshot.
-type ConnectionStateSnapshot struct {
- // ConnectionState - The connection state. Possible values include: 'ConnectionStateReachable', 'ConnectionStateUnreachable', 'ConnectionStateUnknown'
- ConnectionState ConnectionState `json:"connectionState,omitempty"`
- // StartTime - The start time of the connection snapshot.
- StartTime *date.Time `json:"startTime,omitempty"`
- // EndTime - The end time of the connection snapshot.
- EndTime *date.Time `json:"endTime,omitempty"`
- // EvaluationState - Connectivity analysis evaluation state. Possible values include: 'NotStarted', 'InProgress', 'Completed'
- EvaluationState EvaluationState `json:"evaluationState,omitempty"`
- // AvgLatencyInMs - Average latency in ms.
- AvgLatencyInMs *int32 `json:"avgLatencyInMs,omitempty"`
- // MinLatencyInMs - Minimum latency in ms.
- MinLatencyInMs *int32 `json:"minLatencyInMs,omitempty"`
- // MaxLatencyInMs - Maximum latency in ms.
- MaxLatencyInMs *int32 `json:"maxLatencyInMs,omitempty"`
- // ProbesSent - The number of sent probes.
- ProbesSent *int32 `json:"probesSent,omitempty"`
- // ProbesFailed - The number of failed probes.
- ProbesFailed *int32 `json:"probesFailed,omitempty"`
- // Hops - READ-ONLY; List of hops between the source and the destination.
- Hops *[]ConnectivityHop `json:"hops,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for ConnectionStateSnapshot.
-func (CSS ConnectionStateSnapshot) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if CSS.ConnectionState != "" {
- objectMap["connectionState"] = CSS.ConnectionState
- }
- if CSS.StartTime != nil {
- objectMap["startTime"] = CSS.StartTime
- }
- if CSS.EndTime != nil {
- objectMap["endTime"] = CSS.EndTime
- }
- if CSS.EvaluationState != "" {
- objectMap["evaluationState"] = CSS.EvaluationState
- }
- if CSS.AvgLatencyInMs != nil {
- objectMap["avgLatencyInMs"] = CSS.AvgLatencyInMs
- }
- if CSS.MinLatencyInMs != nil {
- objectMap["minLatencyInMs"] = CSS.MinLatencyInMs
- }
- if CSS.MaxLatencyInMs != nil {
- objectMap["maxLatencyInMs"] = CSS.MaxLatencyInMs
- }
- if CSS.ProbesSent != nil {
- objectMap["probesSent"] = CSS.ProbesSent
- }
- if CSS.ProbesFailed != nil {
- objectMap["probesFailed"] = CSS.ProbesFailed
- }
- return json.Marshal(objectMap)
-}
-
-// ConnectivityDestination parameters that define destination of connection.
-type ConnectivityDestination struct {
- // ResourceID - The ID of the resource to which a connection attempt will be made.
- ResourceID *string `json:"resourceId,omitempty"`
- // Address - The IP address or URI the resource to which a connection attempt will be made.
- Address *string `json:"address,omitempty"`
- // Port - Port on which check connectivity will be performed.
- Port *int32 `json:"port,omitempty"`
-}
-
-// ConnectivityHop information about a hop between the source and the destination.
-type ConnectivityHop struct {
- // Type - READ-ONLY; The type of the hop.
- Type *string `json:"type,omitempty"`
- // ID - READ-ONLY; The ID of the hop.
- ID *string `json:"id,omitempty"`
- // Address - READ-ONLY; The IP address of the hop.
- Address *string `json:"address,omitempty"`
- // ResourceID - READ-ONLY; The ID of the resource corresponding to this hop.
- ResourceID *string `json:"resourceId,omitempty"`
- // NextHopIds - READ-ONLY; List of next hop identifiers.
- NextHopIds *[]string `json:"nextHopIds,omitempty"`
- // Issues - READ-ONLY; List of issues.
- Issues *[]ConnectivityIssue `json:"issues,omitempty"`
-}
-
-// ConnectivityInformation information on the connectivity status.
-type ConnectivityInformation struct {
- autorest.Response `json:"-"`
- // Hops - READ-ONLY; List of hops between the source and the destination.
- Hops *[]ConnectivityHop `json:"hops,omitempty"`
- // ConnectionStatus - READ-ONLY; The connection status. Possible values include: 'ConnectionStatusUnknown', 'ConnectionStatusConnected', 'ConnectionStatusDisconnected', 'ConnectionStatusDegraded'
- ConnectionStatus ConnectionStatus `json:"connectionStatus,omitempty"`
- // AvgLatencyInMs - READ-ONLY; Average latency in milliseconds.
- AvgLatencyInMs *int32 `json:"avgLatencyInMs,omitempty"`
- // MinLatencyInMs - READ-ONLY; Minimum latency in milliseconds.
- MinLatencyInMs *int32 `json:"minLatencyInMs,omitempty"`
- // MaxLatencyInMs - READ-ONLY; Maximum latency in milliseconds.
- MaxLatencyInMs *int32 `json:"maxLatencyInMs,omitempty"`
- // ProbesSent - READ-ONLY; Total number of probes sent.
- ProbesSent *int32 `json:"probesSent,omitempty"`
- // ProbesFailed - READ-ONLY; Number of failed probes.
- ProbesFailed *int32 `json:"probesFailed,omitempty"`
-}
-
-// ConnectivityIssue information about an issue encountered in the process of checking for connectivity.
-type ConnectivityIssue struct {
- // Origin - READ-ONLY; The origin of the issue. Possible values include: 'OriginLocal', 'OriginInbound', 'OriginOutbound'
- Origin Origin `json:"origin,omitempty"`
- // Severity - READ-ONLY; The severity of the issue. Possible values include: 'SeverityError', 'SeverityWarning'
- Severity Severity `json:"severity,omitempty"`
- // Type - READ-ONLY; The type of issue. Possible values include: 'IssueTypeUnknown', 'IssueTypeAgentStopped', 'IssueTypeGuestFirewall', 'IssueTypeDNSResolution', 'IssueTypeSocketBind', 'IssueTypeNetworkSecurityRule', 'IssueTypeUserDefinedRoute', 'IssueTypePortThrottled', 'IssueTypePlatform'
- Type IssueType `json:"type,omitempty"`
- // Context - READ-ONLY; Provides additional context on the issue.
- Context *[]map[string]*string `json:"context,omitempty"`
-}
-
-// ConnectivityParameters parameters that determine how the connectivity check will be performed.
-type ConnectivityParameters struct {
- Source *ConnectivitySource `json:"source,omitempty"`
- Destination *ConnectivityDestination `json:"destination,omitempty"`
- // Protocol - Network protocol. Possible values include: 'ProtocolTCP', 'ProtocolHTTP', 'ProtocolHTTPS', 'ProtocolIcmp'
- Protocol Protocol `json:"protocol,omitempty"`
- ProtocolConfiguration *ProtocolConfiguration `json:"protocolConfiguration,omitempty"`
-}
-
-// ConnectivitySource parameters that define the source of the connection.
-type ConnectivitySource struct {
- // ResourceID - The ID of the resource from which a connectivity check will be initiated.
- ResourceID *string `json:"resourceId,omitempty"`
- // Port - The source port from which a connectivity check will be performed.
- Port *int32 `json:"port,omitempty"`
-}
-
-// Container reference to container resource in remote resource provider.
-type Container struct {
- // ID - Resource ID.
- ID *string `json:"id,omitempty"`
-}
-
-// ContainerNetworkInterface container network interface child resource.
-type ContainerNetworkInterface struct {
- // ContainerNetworkInterfacePropertiesFormat - Container network interface properties.
- *ContainerNetworkInterfacePropertiesFormat `json:"properties,omitempty"`
- // Name - The name of the resource. This name can be used to access the resource.
- Name *string `json:"name,omitempty"`
- // Type - READ-ONLY; Sub Resource type.
- Type *string `json:"type,omitempty"`
- // Etag - A unique read-only string that changes whenever the resource is updated.
- Etag *string `json:"etag,omitempty"`
- // ID - Resource ID.
- ID *string `json:"id,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for ContainerNetworkInterface.
-func (cni ContainerNetworkInterface) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if cni.ContainerNetworkInterfacePropertiesFormat != nil {
- objectMap["properties"] = cni.ContainerNetworkInterfacePropertiesFormat
- }
- if cni.Name != nil {
- objectMap["name"] = cni.Name
- }
- if cni.Etag != nil {
- objectMap["etag"] = cni.Etag
- }
- if cni.ID != nil {
- objectMap["id"] = cni.ID
- }
- return json.Marshal(objectMap)
-}
-
-// UnmarshalJSON is the custom unmarshaler for ContainerNetworkInterface struct.
-func (cni *ContainerNetworkInterface) 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 containerNetworkInterfacePropertiesFormat ContainerNetworkInterfacePropertiesFormat
- err = json.Unmarshal(*v, &containerNetworkInterfacePropertiesFormat)
- if err != nil {
- return err
- }
- cni.ContainerNetworkInterfacePropertiesFormat = &containerNetworkInterfacePropertiesFormat
- }
- case "name":
- if v != nil {
- var name string
- err = json.Unmarshal(*v, &name)
- if err != nil {
- return err
- }
- cni.Name = &name
- }
- case "type":
- if v != nil {
- var typeVar string
- err = json.Unmarshal(*v, &typeVar)
- if err != nil {
- return err
- }
- cni.Type = &typeVar
- }
- case "etag":
- if v != nil {
- var etag string
- err = json.Unmarshal(*v, &etag)
- if err != nil {
- return err
- }
- cni.Etag = &etag
- }
- case "id":
- if v != nil {
- var ID string
- err = json.Unmarshal(*v, &ID)
- if err != nil {
- return err
- }
- cni.ID = &ID
- }
- }
- }
-
- return nil
-}
-
-// ContainerNetworkInterfaceConfiguration container network interface configuration child resource.
-type ContainerNetworkInterfaceConfiguration struct {
- // ContainerNetworkInterfaceConfigurationPropertiesFormat - Container network interface configuration properties.
- *ContainerNetworkInterfaceConfigurationPropertiesFormat `json:"properties,omitempty"`
- // Name - The name of the resource. This name can be used to access the resource.
- Name *string `json:"name,omitempty"`
- // Type - READ-ONLY; Sub Resource type.
- Type *string `json:"type,omitempty"`
- // Etag - A unique read-only string that changes whenever the resource is updated.
- Etag *string `json:"etag,omitempty"`
- // ID - Resource ID.
- ID *string `json:"id,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for ContainerNetworkInterfaceConfiguration.
-func (cnic ContainerNetworkInterfaceConfiguration) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if cnic.ContainerNetworkInterfaceConfigurationPropertiesFormat != nil {
- objectMap["properties"] = cnic.ContainerNetworkInterfaceConfigurationPropertiesFormat
- }
- if cnic.Name != nil {
- objectMap["name"] = cnic.Name
- }
- if cnic.Etag != nil {
- objectMap["etag"] = cnic.Etag
- }
- if cnic.ID != nil {
- objectMap["id"] = cnic.ID
- }
- return json.Marshal(objectMap)
-}
-
-// UnmarshalJSON is the custom unmarshaler for ContainerNetworkInterfaceConfiguration struct.
-func (cnic *ContainerNetworkInterfaceConfiguration) 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 containerNetworkInterfaceConfigurationPropertiesFormat ContainerNetworkInterfaceConfigurationPropertiesFormat
- err = json.Unmarshal(*v, &containerNetworkInterfaceConfigurationPropertiesFormat)
- if err != nil {
- return err
- }
- cnic.ContainerNetworkInterfaceConfigurationPropertiesFormat = &containerNetworkInterfaceConfigurationPropertiesFormat
- }
- case "name":
- if v != nil {
- var name string
- err = json.Unmarshal(*v, &name)
- if err != nil {
- return err
- }
- cnic.Name = &name
- }
- case "type":
- if v != nil {
- var typeVar string
- err = json.Unmarshal(*v, &typeVar)
- if err != nil {
- return err
- }
- cnic.Type = &typeVar
- }
- case "etag":
- if v != nil {
- var etag string
- err = json.Unmarshal(*v, &etag)
- if err != nil {
- return err
- }
- cnic.Etag = &etag
- }
- case "id":
- if v != nil {
- var ID string
- err = json.Unmarshal(*v, &ID)
- if err != nil {
- return err
- }
- cnic.ID = &ID
- }
- }
- }
-
- return nil
-}
-
-// ContainerNetworkInterfaceConfigurationPropertiesFormat container network interface configuration properties.
-type ContainerNetworkInterfaceConfigurationPropertiesFormat struct {
- // IPConfigurations - A list of ip configurations of the container network interface configuration.
- IPConfigurations *[]IPConfigurationProfile `json:"ipConfigurations,omitempty"`
- // ContainerNetworkInterfaces - A list of container network interfaces created from this container network interface configuration.
- ContainerNetworkInterfaces *[]SubResource `json:"containerNetworkInterfaces,omitempty"`
- // ProvisioningState - READ-ONLY; The provisioning state of the resource.
- ProvisioningState *string `json:"provisioningState,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for ContainerNetworkInterfaceConfigurationPropertiesFormat.
-func (cnicpf ContainerNetworkInterfaceConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if cnicpf.IPConfigurations != nil {
- objectMap["ipConfigurations"] = cnicpf.IPConfigurations
- }
- if cnicpf.ContainerNetworkInterfaces != nil {
- objectMap["containerNetworkInterfaces"] = cnicpf.ContainerNetworkInterfaces
- }
- return json.Marshal(objectMap)
-}
-
-// ContainerNetworkInterfaceIPConfiguration the ip configuration for a container network interface.
-type ContainerNetworkInterfaceIPConfiguration struct {
- // ContainerNetworkInterfaceIPConfigurationPropertiesFormat - Properties of the container network interface IP configuration.
- *ContainerNetworkInterfaceIPConfigurationPropertiesFormat `json:"properties,omitempty"`
- // Name - The name of the resource. This name can be used to access the resource.
- Name *string `json:"name,omitempty"`
- // Type - READ-ONLY; Sub Resource type.
- Type *string `json:"type,omitempty"`
- // Etag - A unique read-only string that changes whenever the resource is updated.
- Etag *string `json:"etag,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for ContainerNetworkInterfaceIPConfiguration.
-func (cniic ContainerNetworkInterfaceIPConfiguration) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if cniic.ContainerNetworkInterfaceIPConfigurationPropertiesFormat != nil {
- objectMap["properties"] = cniic.ContainerNetworkInterfaceIPConfigurationPropertiesFormat
- }
- if cniic.Name != nil {
- objectMap["name"] = cniic.Name
- }
- if cniic.Etag != nil {
- objectMap["etag"] = cniic.Etag
- }
- return json.Marshal(objectMap)
-}
-
-// UnmarshalJSON is the custom unmarshaler for ContainerNetworkInterfaceIPConfiguration struct.
-func (cniic *ContainerNetworkInterfaceIPConfiguration) 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 containerNetworkInterfaceIPConfigurationPropertiesFormat ContainerNetworkInterfaceIPConfigurationPropertiesFormat
- err = json.Unmarshal(*v, &containerNetworkInterfaceIPConfigurationPropertiesFormat)
- if err != nil {
- return err
- }
- cniic.ContainerNetworkInterfaceIPConfigurationPropertiesFormat = &containerNetworkInterfaceIPConfigurationPropertiesFormat
- }
- case "name":
- if v != nil {
- var name string
- err = json.Unmarshal(*v, &name)
- if err != nil {
- return err
- }
- cniic.Name = &name
- }
- case "type":
- if v != nil {
- var typeVar string
- err = json.Unmarshal(*v, &typeVar)
- if err != nil {
- return err
- }
- cniic.Type = &typeVar
- }
- case "etag":
- if v != nil {
- var etag string
- err = json.Unmarshal(*v, &etag)
- if err != nil {
- return err
- }
- cniic.Etag = &etag
- }
- }
- }
-
- return nil
-}
-
-// ContainerNetworkInterfaceIPConfigurationPropertiesFormat properties of the container network interface IP
-// configuration.
-type ContainerNetworkInterfaceIPConfigurationPropertiesFormat struct {
- // ProvisioningState - READ-ONLY; The provisioning state of the resource.
- ProvisioningState *string `json:"provisioningState,omitempty"`
-}
-
-// ContainerNetworkInterfacePropertiesFormat ...
-type ContainerNetworkInterfacePropertiesFormat struct {
- // ContainerNetworkInterfaceConfiguration - Container network interface configuration from which this container network interface is created.
- ContainerNetworkInterfaceConfiguration *ContainerNetworkInterfaceConfiguration `json:"containerNetworkInterfaceConfiguration,omitempty"`
- // Container - Reference to the container to which this container network interface is attached.
- Container *Container `json:"container,omitempty"`
- // IPConfigurations - Reference to the ip configuration on this container nic.
- IPConfigurations *[]ContainerNetworkInterfaceIPConfiguration `json:"ipConfigurations,omitempty"`
- // ProvisioningState - READ-ONLY; The provisioning state of the resource.
- ProvisioningState *string `json:"provisioningState,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for ContainerNetworkInterfacePropertiesFormat.
-func (cnipf ContainerNetworkInterfacePropertiesFormat) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if cnipf.ContainerNetworkInterfaceConfiguration != nil {
- objectMap["containerNetworkInterfaceConfiguration"] = cnipf.ContainerNetworkInterfaceConfiguration
- }
- if cnipf.Container != nil {
- objectMap["container"] = cnipf.Container
- }
- if cnipf.IPConfigurations != nil {
- objectMap["ipConfigurations"] = cnipf.IPConfigurations
- }
- return json.Marshal(objectMap)
-}
-
-// DdosCustomPoliciesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
-// long-running operation.
-type DdosCustomPoliciesCreateOrUpdateFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *DdosCustomPoliciesCreateOrUpdateFuture) Result(client DdosCustomPoliciesClient) (dcp DdosCustomPolicy, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.DdosCustomPoliciesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.DdosCustomPoliciesCreateOrUpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if dcp.Response.Response, err = future.GetResult(sender); err == nil && dcp.Response.Response.StatusCode != http.StatusNoContent {
- dcp, err = client.CreateOrUpdateResponder(dcp.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.DdosCustomPoliciesCreateOrUpdateFuture", "Result", dcp.Response.Response, "Failure responding to request")
- }
- }
- return
-}
-
-// DdosCustomPoliciesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
-type DdosCustomPoliciesDeleteFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *DdosCustomPoliciesDeleteFuture) Result(client DdosCustomPoliciesClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.DdosCustomPoliciesDeleteFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.DdosCustomPoliciesDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
-}
-
-// DdosCustomPoliciesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
-// long-running operation.
-type DdosCustomPoliciesUpdateTagsFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *DdosCustomPoliciesUpdateTagsFuture) Result(client DdosCustomPoliciesClient) (dcp DdosCustomPolicy, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.DdosCustomPoliciesUpdateTagsFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.DdosCustomPoliciesUpdateTagsFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if dcp.Response.Response, err = future.GetResult(sender); err == nil && dcp.Response.Response.StatusCode != http.StatusNoContent {
- dcp, err = client.UpdateTagsResponder(dcp.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.DdosCustomPoliciesUpdateTagsFuture", "Result", dcp.Response.Response, "Failure responding to request")
- }
- }
- return
-}
-
-// DdosCustomPolicy a DDoS custom policy in a resource group.
-type DdosCustomPolicy struct {
- autorest.Response `json:"-"`
- // DdosCustomPolicyPropertiesFormat - Properties of the DDoS custom policy.
- *DdosCustomPolicyPropertiesFormat `json:"properties,omitempty"`
- // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
- Etag *string `json:"etag,omitempty"`
- // ID - 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 DdosCustomPolicy.
-func (dcp DdosCustomPolicy) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if dcp.DdosCustomPolicyPropertiesFormat != nil {
- objectMap["properties"] = dcp.DdosCustomPolicyPropertiesFormat
- }
- if dcp.ID != nil {
- objectMap["id"] = dcp.ID
- }
- if dcp.Location != nil {
- objectMap["location"] = dcp.Location
- }
- if dcp.Tags != nil {
- objectMap["tags"] = dcp.Tags
- }
- return json.Marshal(objectMap)
-}
-
-// UnmarshalJSON is the custom unmarshaler for DdosCustomPolicy struct.
-func (dcp *DdosCustomPolicy) 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 ddosCustomPolicyPropertiesFormat DdosCustomPolicyPropertiesFormat
- err = json.Unmarshal(*v, &ddosCustomPolicyPropertiesFormat)
- if err != nil {
- return err
- }
- dcp.DdosCustomPolicyPropertiesFormat = &ddosCustomPolicyPropertiesFormat
- }
- case "etag":
- if v != nil {
- var etag string
- err = json.Unmarshal(*v, &etag)
- if err != nil {
- return err
- }
- dcp.Etag = &etag
- }
- case "id":
- if v != nil {
- var ID string
- err = json.Unmarshal(*v, &ID)
- if err != nil {
- return err
- }
- dcp.ID = &ID
- }
- case "name":
- if v != nil {
- var name string
- err = json.Unmarshal(*v, &name)
- if err != nil {
- return err
- }
- dcp.Name = &name
- }
- case "type":
- if v != nil {
- var typeVar string
- err = json.Unmarshal(*v, &typeVar)
- if err != nil {
- return err
- }
- dcp.Type = &typeVar
- }
- case "location":
- if v != nil {
- var location string
- err = json.Unmarshal(*v, &location)
- if err != nil {
- return err
- }
- dcp.Location = &location
- }
- case "tags":
- if v != nil {
- var tags map[string]*string
- err = json.Unmarshal(*v, &tags)
- if err != nil {
- return err
- }
- dcp.Tags = tags
- }
- }
- }
-
- return nil
-}
-
-// DdosCustomPolicyPropertiesFormat dDoS custom policy properties.
-type DdosCustomPolicyPropertiesFormat struct {
- // ResourceGUID - READ-ONLY; The resource GUID property of the DDoS custom policy resource. It uniquely identifies the resource, even if the user changes its name or migrate the resource across subscriptions or resource groups.
- ResourceGUID *string `json:"resourceGuid,omitempty"`
- // ProvisioningState - READ-ONLY; The provisioning state of the DDoS custom policy resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'.
- ProvisioningState *string `json:"provisioningState,omitempty"`
- // PublicIPAddresses - READ-ONLY; The list of public IPs associated with the DDoS custom policy resource. This list is read-only.
- PublicIPAddresses *[]SubResource `json:"publicIPAddresses,omitempty"`
- // ProtocolCustomSettings - The protocol-specific DDoS policy customization parameters.
- ProtocolCustomSettings *[]ProtocolCustomSettingsFormat `json:"protocolCustomSettings,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for DdosCustomPolicyPropertiesFormat.
-func (dcppf DdosCustomPolicyPropertiesFormat) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if dcppf.ProtocolCustomSettings != nil {
- objectMap["protocolCustomSettings"] = dcppf.ProtocolCustomSettings
- }
- return json.Marshal(objectMap)
-}
-
-// DdosProtectionPlan a DDoS protection plan in a resource group.
-type DdosProtectionPlan 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"`
- // DdosProtectionPlanPropertiesFormat - Properties of the DDoS protection plan.
- *DdosProtectionPlanPropertiesFormat `json:"properties,omitempty"`
- // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
- Etag *string `json:"etag,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for DdosProtectionPlan.
-func (dpp DdosProtectionPlan) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if dpp.Location != nil {
- objectMap["location"] = dpp.Location
- }
- if dpp.Tags != nil {
- objectMap["tags"] = dpp.Tags
- }
- if dpp.DdosProtectionPlanPropertiesFormat != nil {
- objectMap["properties"] = dpp.DdosProtectionPlanPropertiesFormat
- }
- return json.Marshal(objectMap)
-}
-
-// UnmarshalJSON is the custom unmarshaler for DdosProtectionPlan struct.
-func (dpp *DdosProtectionPlan) 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
- }
- dpp.ID = &ID
- }
- case "name":
- if v != nil {
- var name string
- err = json.Unmarshal(*v, &name)
- if err != nil {
- return err
- }
- dpp.Name = &name
- }
- case "type":
- if v != nil {
- var typeVar string
- err = json.Unmarshal(*v, &typeVar)
- if err != nil {
- return err
- }
- dpp.Type = &typeVar
- }
- case "location":
- if v != nil {
- var location string
- err = json.Unmarshal(*v, &location)
- if err != nil {
- return err
- }
- dpp.Location = &location
- }
- case "tags":
- if v != nil {
- var tags map[string]*string
- err = json.Unmarshal(*v, &tags)
- if err != nil {
- return err
- }
- dpp.Tags = tags
- }
- case "properties":
- if v != nil {
- var ddosProtectionPlanPropertiesFormat DdosProtectionPlanPropertiesFormat
- err = json.Unmarshal(*v, &ddosProtectionPlanPropertiesFormat)
- if err != nil {
- return err
- }
- dpp.DdosProtectionPlanPropertiesFormat = &ddosProtectionPlanPropertiesFormat
- }
- case "etag":
- if v != nil {
- var etag string
- err = json.Unmarshal(*v, &etag)
- if err != nil {
- return err
- }
- dpp.Etag = &etag
- }
- }
- }
-
- return nil
-}
-
-// DdosProtectionPlanListResult a list of DDoS protection plans.
-type DdosProtectionPlanListResult struct {
- autorest.Response `json:"-"`
- // Value - A list of DDoS protection plans.
- Value *[]DdosProtectionPlan `json:"value,omitempty"`
- // NextLink - READ-ONLY; The URL to get the next set of results.
- NextLink *string `json:"nextLink,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for DdosProtectionPlanListResult.
-func (dpplr DdosProtectionPlanListResult) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if dpplr.Value != nil {
- objectMap["value"] = dpplr.Value
- }
- return json.Marshal(objectMap)
-}
-
-// DdosProtectionPlanListResultIterator provides access to a complete listing of DdosProtectionPlan values.
-type DdosProtectionPlanListResultIterator struct {
- i int
- page DdosProtectionPlanListResultPage
-}
-
-// 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 *DdosProtectionPlanListResultIterator) NextWithContext(ctx context.Context) (err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/DdosProtectionPlanListResultIterator.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 *DdosProtectionPlanListResultIterator) Next() error {
- return iter.NextWithContext(context.Background())
-}
-
-// NotDone returns true if the enumeration should be started or is not yet complete.
-func (iter DdosProtectionPlanListResultIterator) 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 DdosProtectionPlanListResultIterator) Response() DdosProtectionPlanListResult {
- 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 DdosProtectionPlanListResultIterator) Value() DdosProtectionPlan {
- if !iter.page.NotDone() {
- return DdosProtectionPlan{}
- }
- return iter.page.Values()[iter.i]
-}
-
-// Creates a new instance of the DdosProtectionPlanListResultIterator type.
-func NewDdosProtectionPlanListResultIterator(page DdosProtectionPlanListResultPage) DdosProtectionPlanListResultIterator {
- return DdosProtectionPlanListResultIterator{page: page}
-}
-
-// IsEmpty returns true if the ListResult contains no values.
-func (dpplr DdosProtectionPlanListResult) IsEmpty() bool {
- return dpplr.Value == nil || len(*dpplr.Value) == 0
-}
-
-// hasNextLink returns true if the NextLink is not empty.
-func (dpplr DdosProtectionPlanListResult) hasNextLink() bool {
- return dpplr.NextLink != nil && len(*dpplr.NextLink) != 0
-}
-
-// ddosProtectionPlanListResultPreparer prepares a request to retrieve the next set of results.
-// It returns nil if no more results exist.
-func (dpplr DdosProtectionPlanListResult) ddosProtectionPlanListResultPreparer(ctx context.Context) (*http.Request, error) {
- if !dpplr.hasNextLink() {
- return nil, nil
- }
- return autorest.Prepare((&http.Request{}).WithContext(ctx),
- autorest.AsJSON(),
- autorest.AsGet(),
- autorest.WithBaseURL(to.String(dpplr.NextLink)))
-}
-
-// DdosProtectionPlanListResultPage contains a page of DdosProtectionPlan values.
-type DdosProtectionPlanListResultPage struct {
- fn func(context.Context, DdosProtectionPlanListResult) (DdosProtectionPlanListResult, error)
- dpplr DdosProtectionPlanListResult
-}
-
-// 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 *DdosProtectionPlanListResultPage) NextWithContext(ctx context.Context) (err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/DdosProtectionPlanListResultPage.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.dpplr)
- if err != nil {
- return err
- }
- page.dpplr = 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 *DdosProtectionPlanListResultPage) Next() error {
- return page.NextWithContext(context.Background())
-}
-
-// NotDone returns true if the page enumeration should be started or is not yet complete.
-func (page DdosProtectionPlanListResultPage) NotDone() bool {
- return !page.dpplr.IsEmpty()
-}
-
-// Response returns the raw server response from the last page request.
-func (page DdosProtectionPlanListResultPage) Response() DdosProtectionPlanListResult {
- return page.dpplr
-}
-
-// Values returns the slice of values for the current page or nil if there are no values.
-func (page DdosProtectionPlanListResultPage) Values() []DdosProtectionPlan {
- if page.dpplr.IsEmpty() {
- return nil
- }
- return *page.dpplr.Value
-}
-
-// Creates a new instance of the DdosProtectionPlanListResultPage type.
-func NewDdosProtectionPlanListResultPage(getNextPage func(context.Context, DdosProtectionPlanListResult) (DdosProtectionPlanListResult, error)) DdosProtectionPlanListResultPage {
- return DdosProtectionPlanListResultPage{fn: getNextPage}
-}
-
-// DdosProtectionPlanPropertiesFormat dDoS protection plan properties.
-type DdosProtectionPlanPropertiesFormat struct {
- // ResourceGUID - READ-ONLY; The resource GUID property of the DDoS protection plan resource. It uniquely identifies the resource, even if the user changes its name or migrate the resource across subscriptions or resource groups.
- ResourceGUID *string `json:"resourceGuid,omitempty"`
- // ProvisioningState - READ-ONLY; The provisioning state of the DDoS protection plan resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'.
- ProvisioningState *string `json:"provisioningState,omitempty"`
- // VirtualNetworks - READ-ONLY; The list of virtual networks associated with the DDoS protection plan resource. This list is read-only.
- VirtualNetworks *[]SubResource `json:"virtualNetworks,omitempty"`
-}
-
-// DdosProtectionPlansCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
-// long-running operation.
-type DdosProtectionPlansCreateOrUpdateFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *DdosProtectionPlansCreateOrUpdateFuture) Result(client DdosProtectionPlansClient) (dpp DdosProtectionPlan, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.DdosProtectionPlansCreateOrUpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if dpp.Response.Response, err = future.GetResult(sender); err == nil && dpp.Response.Response.StatusCode != http.StatusNoContent {
- dpp, err = client.CreateOrUpdateResponder(dpp.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansCreateOrUpdateFuture", "Result", dpp.Response.Response, "Failure responding to request")
- }
- }
- return
-}
-
-// DdosProtectionPlansDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
-type DdosProtectionPlansDeleteFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *DdosProtectionPlansDeleteFuture) Result(client DdosProtectionPlansClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansDeleteFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.DdosProtectionPlansDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
-}
-
-// DdosProtectionPlansUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
-// long-running operation.
-type DdosProtectionPlansUpdateTagsFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *DdosProtectionPlansUpdateTagsFuture) Result(client DdosProtectionPlansClient) (dpp DdosProtectionPlan, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansUpdateTagsFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.DdosProtectionPlansUpdateTagsFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if dpp.Response.Response, err = future.GetResult(sender); err == nil && dpp.Response.Response.StatusCode != http.StatusNoContent {
- dpp, err = client.UpdateTagsResponder(dpp.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansUpdateTagsFuture", "Result", dpp.Response.Response, "Failure responding to request")
- }
- }
- return
-}
-
-// DdosSettings contains the DDoS protection settings of the public IP.
-type DdosSettings struct {
- // DdosCustomPolicy - The DDoS custom policy associated with the public IP.
- DdosCustomPolicy *SubResource `json:"ddosCustomPolicy,omitempty"`
- // ProtectionCoverage - The DDoS protection policy customizability of the public IP. Only standard coverage will have the ability to be customized. Possible values include: 'ProtectionCoverageBasic', 'ProtectionCoverageStandard'
- ProtectionCoverage ProtectionCoverage `json:"protectionCoverage,omitempty"`
-}
-
-// Delegation details the service to which the subnet is delegated.
-type Delegation struct {
- // ServiceDelegationPropertiesFormat - Properties of the subnet.
- *ServiceDelegationPropertiesFormat `json:"properties,omitempty"`
- // Name - The name of the resource that is unique within a subnet. This name can be used to access the resource.
- Name *string `json:"name,omitempty"`
- // Etag - A unique read-only string that changes whenever the resource is updated.
- Etag *string `json:"etag,omitempty"`
- // ID - Resource ID.
- ID *string `json:"id,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for Delegation.
-func (d Delegation) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if d.ServiceDelegationPropertiesFormat != nil {
- objectMap["properties"] = d.ServiceDelegationPropertiesFormat
- }
- if d.Name != nil {
- objectMap["name"] = d.Name
- }
- if d.Etag != nil {
- objectMap["etag"] = d.Etag
- }
- if d.ID != nil {
- objectMap["id"] = d.ID
- }
- return json.Marshal(objectMap)
-}
-
-// UnmarshalJSON is the custom unmarshaler for Delegation struct.
-func (d *Delegation) 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 serviceDelegationPropertiesFormat ServiceDelegationPropertiesFormat
- err = json.Unmarshal(*v, &serviceDelegationPropertiesFormat)
- if err != nil {
- return err
- }
- d.ServiceDelegationPropertiesFormat = &serviceDelegationPropertiesFormat
- }
- case "name":
- if v != nil {
- var name string
- err = json.Unmarshal(*v, &name)
- if err != nil {
- return err
- }
- d.Name = &name
- }
- case "etag":
- if v != nil {
- var etag string
- err = json.Unmarshal(*v, &etag)
- if err != nil {
- return err
- }
- d.Etag = &etag
- }
- case "id":
- if v != nil {
- var ID string
- err = json.Unmarshal(*v, &ID)
- if err != nil {
- return err
- }
- d.ID = &ID
- }
- }
- }
-
- return nil
-}
-
-// DeviceProperties list of properties of the device.
-type DeviceProperties struct {
- // DeviceVendor - Name of the device Vendor.
- DeviceVendor *string `json:"deviceVendor,omitempty"`
- // DeviceModel - Model of the device.
- DeviceModel *string `json:"deviceModel,omitempty"`
- // LinkSpeedInMbps - Link speed.
- LinkSpeedInMbps *int32 `json:"linkSpeedInMbps,omitempty"`
-}
-
-// DhcpOptions dhcpOptions contains an array of DNS servers available to VMs deployed in the virtual network.
-// Standard DHCP option for a subnet overrides VNET DHCP options.
-type DhcpOptions struct {
- // DNSServers - The list of DNS servers IP addresses.
- DNSServers *[]string `json:"dnsServers,omitempty"`
-}
-
-// Dimension dimension of the metric.
-type Dimension struct {
- // Name - The name of the dimension.
- Name *string `json:"name,omitempty"`
- // DisplayName - The display name of the dimension.
- DisplayName *string `json:"displayName,omitempty"`
- // InternalName - The internal name of the dimension.
- InternalName *string `json:"internalName,omitempty"`
-}
-
-// DNSNameAvailabilityResult response for the CheckDnsNameAvailability API service call.
-type DNSNameAvailabilityResult struct {
- autorest.Response `json:"-"`
- // Available - Domain availability (True/False).
- Available *bool `json:"available,omitempty"`
-}
-
-// EffectiveNetworkSecurityGroup effective network security group.
-type EffectiveNetworkSecurityGroup struct {
- // NetworkSecurityGroup - The ID of network security group that is applied.
- NetworkSecurityGroup *SubResource `json:"networkSecurityGroup,omitempty"`
- // Association - Associated resources.
- Association *EffectiveNetworkSecurityGroupAssociation `json:"association,omitempty"`
- // EffectiveSecurityRules - A collection of effective security rules.
- EffectiveSecurityRules *[]EffectiveNetworkSecurityRule `json:"effectiveSecurityRules,omitempty"`
- // TagMap - Mapping of tags to list of IP Addresses included within the tag.
- TagMap map[string][]string `json:"tagMap"`
-}
-
-// MarshalJSON is the custom marshaler for EffectiveNetworkSecurityGroup.
-func (ensg EffectiveNetworkSecurityGroup) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if ensg.NetworkSecurityGroup != nil {
- objectMap["networkSecurityGroup"] = ensg.NetworkSecurityGroup
- }
- if ensg.Association != nil {
- objectMap["association"] = ensg.Association
- }
- if ensg.EffectiveSecurityRules != nil {
- objectMap["effectiveSecurityRules"] = ensg.EffectiveSecurityRules
- }
- if ensg.TagMap != nil {
- objectMap["tagMap"] = ensg.TagMap
- }
- return json.Marshal(objectMap)
-}
-
-// EffectiveNetworkSecurityGroupAssociation the effective network security group association.
-type EffectiveNetworkSecurityGroupAssociation struct {
- // Subnet - The ID of the subnet if assigned.
- Subnet *SubResource `json:"subnet,omitempty"`
- // NetworkInterface - The ID of the network interface if assigned.
- NetworkInterface *SubResource `json:"networkInterface,omitempty"`
-}
-
-// EffectiveNetworkSecurityGroupListResult response for list effective network security groups API service
-// call.
-type EffectiveNetworkSecurityGroupListResult struct {
- autorest.Response `json:"-"`
- // Value - A list of effective network security groups.
- Value *[]EffectiveNetworkSecurityGroup `json:"value,omitempty"`
- // NextLink - READ-ONLY; The URL to get the next set of results.
- NextLink *string `json:"nextLink,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for EffectiveNetworkSecurityGroupListResult.
-func (ensglr EffectiveNetworkSecurityGroupListResult) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if ensglr.Value != nil {
- objectMap["value"] = ensglr.Value
- }
- return json.Marshal(objectMap)
-}
-
-// EffectiveNetworkSecurityRule effective network security rules.
-type EffectiveNetworkSecurityRule struct {
- // Name - The name of the security rule specified by the user (if created by the user).
- Name *string `json:"name,omitempty"`
- // Protocol - The network protocol this rule applies to. Possible values are: 'Tcp', 'Udp', and 'All'. Possible values include: 'EffectiveSecurityRuleProtocolTCP', 'EffectiveSecurityRuleProtocolUDP', 'EffectiveSecurityRuleProtocolAll'
- Protocol EffectiveSecurityRuleProtocol `json:"protocol,omitempty"`
- // SourcePortRange - The source port or range.
- SourcePortRange *string `json:"sourcePortRange,omitempty"`
- // DestinationPortRange - The destination port or range.
- DestinationPortRange *string `json:"destinationPortRange,omitempty"`
- // SourcePortRanges - The source port ranges. Expected values include a single integer between 0 and 65535, a range using '-' as separator (e.g. 100-400), or an asterisk (*)
- SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"`
- // DestinationPortRanges - The destination port ranges. Expected values include a single integer between 0 and 65535, a range using '-' as separator (e.g. 100-400), or an asterisk (*)
- DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"`
- // SourceAddressPrefix - The source address prefix.
- SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"`
- // DestinationAddressPrefix - The destination address prefix.
- DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"`
- // SourceAddressPrefixes - The source address prefixes. Expected values include CIDR IP ranges, Default Tags (VirtualNetwork, AzureLoadBalancer, Internet), System Tags, and the asterisk (*).
- SourceAddressPrefixes *[]string `json:"sourceAddressPrefixes,omitempty"`
- // DestinationAddressPrefixes - The destination address prefixes. Expected values include CIDR IP ranges, Default Tags (VirtualNetwork, AzureLoadBalancer, Internet), System Tags, and the asterisk (*).
- DestinationAddressPrefixes *[]string `json:"destinationAddressPrefixes,omitempty"`
- // ExpandedSourceAddressPrefix - The expanded source address prefix.
- ExpandedSourceAddressPrefix *[]string `json:"expandedSourceAddressPrefix,omitempty"`
- // ExpandedDestinationAddressPrefix - Expanded destination address prefix.
- ExpandedDestinationAddressPrefix *[]string `json:"expandedDestinationAddressPrefix,omitempty"`
- // Access - Whether network traffic is allowed or denied. Possible values are: 'Allow' and 'Deny'. Possible values include: 'SecurityRuleAccessAllow', 'SecurityRuleAccessDeny'
- Access SecurityRuleAccess `json:"access,omitempty"`
- // Priority - The priority of the rule.
- Priority *int32 `json:"priority,omitempty"`
- // Direction - The direction of the rule. Possible values are: 'Inbound and Outbound'. Possible values include: 'SecurityRuleDirectionInbound', 'SecurityRuleDirectionOutbound'
- Direction SecurityRuleDirection `json:"direction,omitempty"`
-}
-
-// EffectiveRoute effective Route
-type EffectiveRoute struct {
- // Name - The name of the user defined route. This is optional.
- Name *string `json:"name,omitempty"`
- // Source - Who created the route. Possible values are: 'Unknown', 'User', 'VirtualNetworkGateway', and 'Default'. Possible values include: 'EffectiveRouteSourceUnknown', 'EffectiveRouteSourceUser', 'EffectiveRouteSourceVirtualNetworkGateway', 'EffectiveRouteSourceDefault'
- Source EffectiveRouteSource `json:"source,omitempty"`
- // State - The value of effective route. Possible values are: 'Active' and 'Invalid'. Possible values include: 'Active', 'Invalid'
- State EffectiveRouteState `json:"state,omitempty"`
- // AddressPrefix - The address prefixes of the effective routes in CIDR notation.
- AddressPrefix *[]string `json:"addressPrefix,omitempty"`
- // NextHopIPAddress - The IP address of the next hop of the effective route.
- NextHopIPAddress *[]string `json:"nextHopIpAddress,omitempty"`
- // NextHopType - The type of Azure hop the packet should be sent to. Possible values are: 'VirtualNetworkGateway', 'VnetLocal', 'Internet', 'VirtualAppliance', and 'None'. Possible values include: 'RouteNextHopTypeVirtualNetworkGateway', 'RouteNextHopTypeVnetLocal', 'RouteNextHopTypeInternet', 'RouteNextHopTypeVirtualAppliance', 'RouteNextHopTypeNone'
- NextHopType RouteNextHopType `json:"nextHopType,omitempty"`
-}
-
-// EffectiveRouteListResult response for list effective route API service call.
-type EffectiveRouteListResult struct {
- autorest.Response `json:"-"`
- // Value - A list of effective routes.
- Value *[]EffectiveRoute `json:"value,omitempty"`
- // NextLink - READ-ONLY; The URL to get the next set of results.
- NextLink *string `json:"nextLink,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for EffectiveRouteListResult.
-func (erlr EffectiveRouteListResult) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if erlr.Value != nil {
- objectMap["value"] = erlr.Value
- }
- return json.Marshal(objectMap)
-}
-
-// EndpointService identifies the service being brought into the virtual network.
-type EndpointService struct {
- // ID - A unique identifier of the service being referenced by the interface endpoint.
- ID *string `json:"id,omitempty"`
-}
-
-// EndpointServiceResult endpoint service.
-type EndpointServiceResult struct {
- // Name - READ-ONLY; Name of the endpoint service.
- Name *string `json:"name,omitempty"`
- // Type - READ-ONLY; Type of the endpoint service.
- Type *string `json:"type,omitempty"`
- // ID - Resource ID.
- ID *string `json:"id,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for EndpointServiceResult.
-func (esr EndpointServiceResult) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if esr.ID != nil {
- objectMap["id"] = esr.ID
- }
- return json.Marshal(objectMap)
-}
-
-// EndpointServicesListResult response for the ListAvailableEndpointServices API service call.
-type EndpointServicesListResult struct {
- autorest.Response `json:"-"`
- // Value - List of available endpoint services in a region.
- Value *[]EndpointServiceResult `json:"value,omitempty"`
- // NextLink - The URL to get the next set of results.
- NextLink *string `json:"nextLink,omitempty"`
-}
-
-// EndpointServicesListResultIterator provides access to a complete listing of EndpointServiceResult values.
-type EndpointServicesListResultIterator struct {
- i int
- page EndpointServicesListResultPage
-}
-
-// 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 *EndpointServicesListResultIterator) NextWithContext(ctx context.Context) (err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/EndpointServicesListResultIterator.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 *EndpointServicesListResultIterator) Next() error {
- return iter.NextWithContext(context.Background())
-}
-
-// NotDone returns true if the enumeration should be started or is not yet complete.
-func (iter EndpointServicesListResultIterator) 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 EndpointServicesListResultIterator) Response() EndpointServicesListResult {
- 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 EndpointServicesListResultIterator) Value() EndpointServiceResult {
- if !iter.page.NotDone() {
- return EndpointServiceResult{}
- }
- return iter.page.Values()[iter.i]
-}
-
-// Creates a new instance of the EndpointServicesListResultIterator type.
-func NewEndpointServicesListResultIterator(page EndpointServicesListResultPage) EndpointServicesListResultIterator {
- return EndpointServicesListResultIterator{page: page}
-}
-
-// IsEmpty returns true if the ListResult contains no values.
-func (eslr EndpointServicesListResult) IsEmpty() bool {
- return eslr.Value == nil || len(*eslr.Value) == 0
-}
-
-// hasNextLink returns true if the NextLink is not empty.
-func (eslr EndpointServicesListResult) hasNextLink() bool {
- return eslr.NextLink != nil && len(*eslr.NextLink) != 0
-}
-
-// endpointServicesListResultPreparer prepares a request to retrieve the next set of results.
-// It returns nil if no more results exist.
-func (eslr EndpointServicesListResult) endpointServicesListResultPreparer(ctx context.Context) (*http.Request, error) {
- if !eslr.hasNextLink() {
- return nil, nil
- }
- return autorest.Prepare((&http.Request{}).WithContext(ctx),
- autorest.AsJSON(),
- autorest.AsGet(),
- autorest.WithBaseURL(to.String(eslr.NextLink)))
-}
-
-// EndpointServicesListResultPage contains a page of EndpointServiceResult values.
-type EndpointServicesListResultPage struct {
- fn func(context.Context, EndpointServicesListResult) (EndpointServicesListResult, error)
- eslr EndpointServicesListResult
-}
-
-// 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 *EndpointServicesListResultPage) NextWithContext(ctx context.Context) (err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/EndpointServicesListResultPage.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.eslr)
- if err != nil {
- return err
- }
- page.eslr = 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 *EndpointServicesListResultPage) Next() error {
- return page.NextWithContext(context.Background())
-}
-
-// NotDone returns true if the page enumeration should be started or is not yet complete.
-func (page EndpointServicesListResultPage) NotDone() bool {
- return !page.eslr.IsEmpty()
-}
-
-// Response returns the raw server response from the last page request.
-func (page EndpointServicesListResultPage) Response() EndpointServicesListResult {
- return page.eslr
-}
-
-// Values returns the slice of values for the current page or nil if there are no values.
-func (page EndpointServicesListResultPage) Values() []EndpointServiceResult {
- if page.eslr.IsEmpty() {
- return nil
- }
- return *page.eslr.Value
-}
-
-// Creates a new instance of the EndpointServicesListResultPage type.
-func NewEndpointServicesListResultPage(getNextPage func(context.Context, EndpointServicesListResult) (EndpointServicesListResult, error)) EndpointServicesListResultPage {
- return EndpointServicesListResultPage{fn: getNextPage}
-}
-
-// Error ...
-type Error struct {
- Code *string `json:"code,omitempty"`
- Message *string `json:"message,omitempty"`
- Target *string `json:"target,omitempty"`
- Details *[]ErrorDetails `json:"details,omitempty"`
- InnerError *string `json:"innerError,omitempty"`
-}
-
-// ErrorDetails ...
-type ErrorDetails struct {
- Code *string `json:"code,omitempty"`
- Target *string `json:"target,omitempty"`
- Message *string `json:"message,omitempty"`
-}
-
-// ErrorResponse the error object.
-type ErrorResponse struct {
- Error *ErrorDetails `json:"error,omitempty"`
-}
-
-// EvaluatedNetworkSecurityGroup results of network security group evaluation.
-type EvaluatedNetworkSecurityGroup struct {
- // NetworkSecurityGroupID - Network security group ID.
- NetworkSecurityGroupID *string `json:"networkSecurityGroupId,omitempty"`
- // AppliedTo - Resource ID of nic or subnet to which network security group is applied.
- AppliedTo *string `json:"appliedTo,omitempty"`
- MatchedRule *MatchedRule `json:"matchedRule,omitempty"`
- // RulesEvaluationResult - READ-ONLY; List of network security rules evaluation results.
- RulesEvaluationResult *[]SecurityRulesEvaluationResult `json:"rulesEvaluationResult,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for EvaluatedNetworkSecurityGroup.
-func (ensg EvaluatedNetworkSecurityGroup) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if ensg.NetworkSecurityGroupID != nil {
- objectMap["networkSecurityGroupId"] = ensg.NetworkSecurityGroupID
- }
- if ensg.AppliedTo != nil {
- objectMap["appliedTo"] = ensg.AppliedTo
- }
- if ensg.MatchedRule != nil {
- objectMap["matchedRule"] = ensg.MatchedRule
- }
- return json.Marshal(objectMap)
-}
-
-// ExpressRouteCircuit expressRouteCircuit resource
-type ExpressRouteCircuit struct {
- autorest.Response `json:"-"`
- // Sku - The SKU.
- Sku *ExpressRouteCircuitSku `json:"sku,omitempty"`
- *ExpressRouteCircuitPropertiesFormat `json:"properties,omitempty"`
- // Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
- Etag *string `json:"etag,omitempty"`
- // ID - 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 ExpressRouteCircuit.
-func (erc ExpressRouteCircuit) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if erc.Sku != nil {
- objectMap["sku"] = erc.Sku
- }
- if erc.ExpressRouteCircuitPropertiesFormat != nil {
- objectMap["properties"] = erc.ExpressRouteCircuitPropertiesFormat
- }
- if erc.ID != nil {
- objectMap["id"] = erc.ID
- }
- if erc.Location != nil {
- objectMap["location"] = erc.Location
- }
- if erc.Tags != nil {
- objectMap["tags"] = erc.Tags
- }
- return json.Marshal(objectMap)
-}
-
-// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuit struct.
-func (erc *ExpressRouteCircuit) 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 ExpressRouteCircuitSku
- err = json.Unmarshal(*v, &sku)
- if err != nil {
- return err
- }
- erc.Sku = &sku
- }
- case "properties":
- if v != nil {
- var expressRouteCircuitPropertiesFormat ExpressRouteCircuitPropertiesFormat
- err = json.Unmarshal(*v, &expressRouteCircuitPropertiesFormat)
- if err != nil {
- return err
- }
- erc.ExpressRouteCircuitPropertiesFormat = &expressRouteCircuitPropertiesFormat
- }
- case "etag":
- if v != nil {
- var etag string
- err = json.Unmarshal(*v, &etag)
- if err != nil {
- return err
- }
- erc.Etag = &etag
- }
- case "id":
- if v != nil {
- var ID string
- err = json.Unmarshal(*v, &ID)
- if err != nil {
- return err
- }
- erc.ID = &ID
- }
- case "name":
- if v != nil {
- var name string
- err = json.Unmarshal(*v, &name)
- if err != nil {
- return err
- }
- erc.Name = &name
- }
- case "type":
- if v != nil {
- var typeVar string
- err = json.Unmarshal(*v, &typeVar)
- if err != nil {
- return err
- }
- erc.Type = &typeVar
- }
- case "location":
- if v != nil {
- var location string
- err = json.Unmarshal(*v, &location)
- if err != nil {
- return err
- }
- erc.Location = &location
- }
- case "tags":
- if v != nil {
- var tags map[string]*string
- err = json.Unmarshal(*v, &tags)
- if err != nil {
- return err
- }
- erc.Tags = tags
- }
- }
- }
-
- return nil
-}
-
-// ExpressRouteCircuitArpTable the ARP table associated with the ExpressRouteCircuit.
-type ExpressRouteCircuitArpTable struct {
- // Age - Entry age in minutes
- Age *int32 `json:"age,omitempty"`
- // Interface - Interface address
- Interface *string `json:"interface,omitempty"`
- // IPAddress - The IP address.
- IPAddress *string `json:"ipAddress,omitempty"`
- // MacAddress - The MAC address.
- MacAddress *string `json:"macAddress,omitempty"`
-}
-
-// ExpressRouteCircuitAuthorization authorization in an ExpressRouteCircuit resource.
-type ExpressRouteCircuitAuthorization struct {
- autorest.Response `json:"-"`
- *AuthorizationPropertiesFormat `json:"properties,omitempty"`
- // Name - Gets 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"`
- // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
- Etag *string `json:"etag,omitempty"`
- // ID - Resource ID.
- ID *string `json:"id,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for ExpressRouteCircuitAuthorization.
-func (erca ExpressRouteCircuitAuthorization) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if erca.AuthorizationPropertiesFormat != nil {
- objectMap["properties"] = erca.AuthorizationPropertiesFormat
- }
- if erca.Name != nil {
- objectMap["name"] = erca.Name
- }
- if erca.ID != nil {
- objectMap["id"] = erca.ID
- }
- return json.Marshal(objectMap)
-}
-
-// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuitAuthorization struct.
-func (erca *ExpressRouteCircuitAuthorization) 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 authorizationPropertiesFormat AuthorizationPropertiesFormat
- err = json.Unmarshal(*v, &authorizationPropertiesFormat)
- if err != nil {
- return err
- }
- erca.AuthorizationPropertiesFormat = &authorizationPropertiesFormat
- }
- case "name":
- if v != nil {
- var name string
- err = json.Unmarshal(*v, &name)
- if err != nil {
- return err
- }
- erca.Name = &name
- }
- case "etag":
- if v != nil {
- var etag string
- err = json.Unmarshal(*v, &etag)
- if err != nil {
- return err
- }
- erca.Etag = &etag
- }
- case "id":
- if v != nil {
- var ID string
- err = json.Unmarshal(*v, &ID)
- if err != nil {
- return err
- }
- erca.ID = &ID
- }
- }
- }
-
- return nil
-}
-
-// ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
-// results of a long-running operation.
-type ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture) Result(client ExpressRouteCircuitAuthorizationsClient) (erca ExpressRouteCircuitAuthorization, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if erca.Response.Response, err = future.GetResult(sender); err == nil && erca.Response.Response.StatusCode != http.StatusNoContent {
- erca, err = client.CreateOrUpdateResponder(erca.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture", "Result", erca.Response.Response, "Failure responding to request")
- }
- }
- return
-}
-
-// ExpressRouteCircuitAuthorizationsDeleteFuture an abstraction for monitoring and retrieving the results of a
-// long-running operation.
-type ExpressRouteCircuitAuthorizationsDeleteFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *ExpressRouteCircuitAuthorizationsDeleteFuture) Result(client ExpressRouteCircuitAuthorizationsClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsDeleteFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitAuthorizationsDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
-}
-
-// ExpressRouteCircuitConnection express Route Circuit Connection in an ExpressRouteCircuitPeering resource.
-type ExpressRouteCircuitConnection struct {
- autorest.Response `json:"-"`
- *ExpressRouteCircuitConnectionPropertiesFormat `json:"properties,omitempty"`
- // Name - Gets 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"`
- // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
- Etag *string `json:"etag,omitempty"`
- // ID - Resource ID.
- ID *string `json:"id,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for ExpressRouteCircuitConnection.
-func (ercc ExpressRouteCircuitConnection) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if ercc.ExpressRouteCircuitConnectionPropertiesFormat != nil {
- objectMap["properties"] = ercc.ExpressRouteCircuitConnectionPropertiesFormat
- }
- if ercc.Name != nil {
- objectMap["name"] = ercc.Name
- }
- if ercc.ID != nil {
- objectMap["id"] = ercc.ID
- }
- return json.Marshal(objectMap)
-}
-
-// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuitConnection struct.
-func (ercc *ExpressRouteCircuitConnection) 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 expressRouteCircuitConnectionPropertiesFormat ExpressRouteCircuitConnectionPropertiesFormat
- err = json.Unmarshal(*v, &expressRouteCircuitConnectionPropertiesFormat)
- if err != nil {
- return err
- }
- ercc.ExpressRouteCircuitConnectionPropertiesFormat = &expressRouteCircuitConnectionPropertiesFormat
- }
- case "name":
- if v != nil {
- var name string
- err = json.Unmarshal(*v, &name)
- if err != nil {
- return err
- }
- ercc.Name = &name
- }
- case "etag":
- if v != nil {
- var etag string
- err = json.Unmarshal(*v, &etag)
- if err != nil {
- return err
- }
- ercc.Etag = &etag
- }
- case "id":
- if v != nil {
- var ID string
- err = json.Unmarshal(*v, &ID)
- if err != nil {
- return err
- }
- ercc.ID = &ID
- }
- }
- }
-
- return nil
-}
-
-// ExpressRouteCircuitConnectionListResult response for ListConnections API service call retrieves all global
-// reach connections that belongs to a Private Peering for an ExpressRouteCircuit.
-type ExpressRouteCircuitConnectionListResult struct {
- autorest.Response `json:"-"`
- // Value - The global reach connection associated with Private Peering in an ExpressRoute Circuit.
- Value *[]ExpressRouteCircuitConnection `json:"value,omitempty"`
- // NextLink - The URL to get the next set of results.
- NextLink *string `json:"nextLink,omitempty"`
-}
-
-// ExpressRouteCircuitConnectionListResultIterator provides access to a complete listing of
-// ExpressRouteCircuitConnection values.
-type ExpressRouteCircuitConnectionListResultIterator struct {
- i int
- page ExpressRouteCircuitConnectionListResultPage
-}
-
-// 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 *ExpressRouteCircuitConnectionListResultIterator) NextWithContext(ctx context.Context) (err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitConnectionListResultIterator.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 *ExpressRouteCircuitConnectionListResultIterator) Next() error {
- return iter.NextWithContext(context.Background())
-}
-
-// NotDone returns true if the enumeration should be started or is not yet complete.
-func (iter ExpressRouteCircuitConnectionListResultIterator) 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 ExpressRouteCircuitConnectionListResultIterator) Response() ExpressRouteCircuitConnectionListResult {
- 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 ExpressRouteCircuitConnectionListResultIterator) Value() ExpressRouteCircuitConnection {
- if !iter.page.NotDone() {
- return ExpressRouteCircuitConnection{}
- }
- return iter.page.Values()[iter.i]
-}
-
-// Creates a new instance of the ExpressRouteCircuitConnectionListResultIterator type.
-func NewExpressRouteCircuitConnectionListResultIterator(page ExpressRouteCircuitConnectionListResultPage) ExpressRouteCircuitConnectionListResultIterator {
- return ExpressRouteCircuitConnectionListResultIterator{page: page}
-}
-
-// IsEmpty returns true if the ListResult contains no values.
-func (ercclr ExpressRouteCircuitConnectionListResult) IsEmpty() bool {
- return ercclr.Value == nil || len(*ercclr.Value) == 0
-}
-
-// hasNextLink returns true if the NextLink is not empty.
-func (ercclr ExpressRouteCircuitConnectionListResult) hasNextLink() bool {
- return ercclr.NextLink != nil && len(*ercclr.NextLink) != 0
-}
-
-// expressRouteCircuitConnectionListResultPreparer prepares a request to retrieve the next set of results.
-// It returns nil if no more results exist.
-func (ercclr ExpressRouteCircuitConnectionListResult) expressRouteCircuitConnectionListResultPreparer(ctx context.Context) (*http.Request, error) {
- if !ercclr.hasNextLink() {
- return nil, nil
- }
- return autorest.Prepare((&http.Request{}).WithContext(ctx),
- autorest.AsJSON(),
- autorest.AsGet(),
- autorest.WithBaseURL(to.String(ercclr.NextLink)))
-}
-
-// ExpressRouteCircuitConnectionListResultPage contains a page of ExpressRouteCircuitConnection values.
-type ExpressRouteCircuitConnectionListResultPage struct {
- fn func(context.Context, ExpressRouteCircuitConnectionListResult) (ExpressRouteCircuitConnectionListResult, error)
- ercclr ExpressRouteCircuitConnectionListResult
-}
-
-// 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 *ExpressRouteCircuitConnectionListResultPage) NextWithContext(ctx context.Context) (err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitConnectionListResultPage.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.ercclr)
- if err != nil {
- return err
- }
- page.ercclr = 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 *ExpressRouteCircuitConnectionListResultPage) Next() error {
- return page.NextWithContext(context.Background())
-}
-
-// NotDone returns true if the page enumeration should be started or is not yet complete.
-func (page ExpressRouteCircuitConnectionListResultPage) NotDone() bool {
- return !page.ercclr.IsEmpty()
-}
-
-// Response returns the raw server response from the last page request.
-func (page ExpressRouteCircuitConnectionListResultPage) Response() ExpressRouteCircuitConnectionListResult {
- return page.ercclr
-}
-
-// Values returns the slice of values for the current page or nil if there are no values.
-func (page ExpressRouteCircuitConnectionListResultPage) Values() []ExpressRouteCircuitConnection {
- if page.ercclr.IsEmpty() {
- return nil
- }
- return *page.ercclr.Value
-}
-
-// Creates a new instance of the ExpressRouteCircuitConnectionListResultPage type.
-func NewExpressRouteCircuitConnectionListResultPage(getNextPage func(context.Context, ExpressRouteCircuitConnectionListResult) (ExpressRouteCircuitConnectionListResult, error)) ExpressRouteCircuitConnectionListResultPage {
- return ExpressRouteCircuitConnectionListResultPage{fn: getNextPage}
-}
-
-// ExpressRouteCircuitConnectionPropertiesFormat ...
-type ExpressRouteCircuitConnectionPropertiesFormat struct {
- // ExpressRouteCircuitPeering - Reference to Express Route Circuit Private Peering Resource of the circuit initiating connection.
- ExpressRouteCircuitPeering *SubResource `json:"expressRouteCircuitPeering,omitempty"`
- // PeerExpressRouteCircuitPeering - Reference to Express Route Circuit Private Peering Resource of the peered circuit.
- PeerExpressRouteCircuitPeering *SubResource `json:"peerExpressRouteCircuitPeering,omitempty"`
- // AddressPrefix - /29 IP address space to carve out Customer addresses for tunnels.
- AddressPrefix *string `json:"addressPrefix,omitempty"`
- // AuthorizationKey - The authorization key.
- AuthorizationKey *string `json:"authorizationKey,omitempty"`
- // CircuitConnectionStatus - READ-ONLY; Express Route Circuit Connection State. Possible values are: 'Connected' and 'Disconnected'. Possible values include: 'Connected', 'Connecting', 'Disconnected'
- CircuitConnectionStatus CircuitConnectionStatus `json:"circuitConnectionStatus,omitempty"`
- // ProvisioningState - READ-ONLY; Provisioning state of the circuit connection resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'.
- ProvisioningState *string `json:"provisioningState,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for ExpressRouteCircuitConnectionPropertiesFormat.
-func (erccpf ExpressRouteCircuitConnectionPropertiesFormat) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if erccpf.ExpressRouteCircuitPeering != nil {
- objectMap["expressRouteCircuitPeering"] = erccpf.ExpressRouteCircuitPeering
- }
- if erccpf.PeerExpressRouteCircuitPeering != nil {
- objectMap["peerExpressRouteCircuitPeering"] = erccpf.PeerExpressRouteCircuitPeering
- }
- if erccpf.AddressPrefix != nil {
- objectMap["addressPrefix"] = erccpf.AddressPrefix
- }
- if erccpf.AuthorizationKey != nil {
- objectMap["authorizationKey"] = erccpf.AuthorizationKey
- }
- return json.Marshal(objectMap)
-}
-
-// ExpressRouteCircuitConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results
-// of a long-running operation.
-type ExpressRouteCircuitConnectionsCreateOrUpdateFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *ExpressRouteCircuitConnectionsCreateOrUpdateFuture) Result(client ExpressRouteCircuitConnectionsClient) (ercc ExpressRouteCircuitConnection, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitConnectionsCreateOrUpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if ercc.Response.Response, err = future.GetResult(sender); err == nil && ercc.Response.Response.StatusCode != http.StatusNoContent {
- ercc, err = client.CreateOrUpdateResponder(ercc.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsCreateOrUpdateFuture", "Result", ercc.Response.Response, "Failure responding to request")
- }
- }
- return
-}
-
-// ExpressRouteCircuitConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of a
-// long-running operation.
-type ExpressRouteCircuitConnectionsDeleteFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *ExpressRouteCircuitConnectionsDeleteFuture) Result(client ExpressRouteCircuitConnectionsClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsDeleteFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitConnectionsDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
-}
-
-// ExpressRouteCircuitListResult response for ListExpressRouteCircuit API service call.
-type ExpressRouteCircuitListResult struct {
- autorest.Response `json:"-"`
- // Value - A list of ExpressRouteCircuits in a resource group.
- Value *[]ExpressRouteCircuit `json:"value,omitempty"`
- // NextLink - The URL to get the next set of results.
- NextLink *string `json:"nextLink,omitempty"`
-}
-
-// ExpressRouteCircuitListResultIterator provides access to a complete listing of ExpressRouteCircuit values.
-type ExpressRouteCircuitListResultIterator struct {
- i int
- page ExpressRouteCircuitListResultPage
-}
-
-// 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 *ExpressRouteCircuitListResultIterator) NextWithContext(ctx context.Context) (err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitListResultIterator.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 *ExpressRouteCircuitListResultIterator) Next() error {
- return iter.NextWithContext(context.Background())
-}
-
-// NotDone returns true if the enumeration should be started or is not yet complete.
-func (iter ExpressRouteCircuitListResultIterator) 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 ExpressRouteCircuitListResultIterator) Response() ExpressRouteCircuitListResult {
- 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 ExpressRouteCircuitListResultIterator) Value() ExpressRouteCircuit {
- if !iter.page.NotDone() {
- return ExpressRouteCircuit{}
- }
- return iter.page.Values()[iter.i]
-}
-
-// Creates a new instance of the ExpressRouteCircuitListResultIterator type.
-func NewExpressRouteCircuitListResultIterator(page ExpressRouteCircuitListResultPage) ExpressRouteCircuitListResultIterator {
- return ExpressRouteCircuitListResultIterator{page: page}
-}
-
-// IsEmpty returns true if the ListResult contains no values.
-func (erclr ExpressRouteCircuitListResult) IsEmpty() bool {
- return erclr.Value == nil || len(*erclr.Value) == 0
-}
-
-// hasNextLink returns true if the NextLink is not empty.
-func (erclr ExpressRouteCircuitListResult) hasNextLink() bool {
- return erclr.NextLink != nil && len(*erclr.NextLink) != 0
-}
-
-// expressRouteCircuitListResultPreparer prepares a request to retrieve the next set of results.
-// It returns nil if no more results exist.
-func (erclr ExpressRouteCircuitListResult) expressRouteCircuitListResultPreparer(ctx context.Context) (*http.Request, error) {
- if !erclr.hasNextLink() {
- return nil, nil
- }
- return autorest.Prepare((&http.Request{}).WithContext(ctx),
- autorest.AsJSON(),
- autorest.AsGet(),
- autorest.WithBaseURL(to.String(erclr.NextLink)))
-}
-
-// ExpressRouteCircuitListResultPage contains a page of ExpressRouteCircuit values.
-type ExpressRouteCircuitListResultPage struct {
- fn func(context.Context, ExpressRouteCircuitListResult) (ExpressRouteCircuitListResult, error)
- erclr ExpressRouteCircuitListResult
-}
-
-// 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 *ExpressRouteCircuitListResultPage) NextWithContext(ctx context.Context) (err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitListResultPage.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.erclr)
- if err != nil {
- return err
- }
- page.erclr = 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 *ExpressRouteCircuitListResultPage) Next() error {
- return page.NextWithContext(context.Background())
-}
-
-// NotDone returns true if the page enumeration should be started or is not yet complete.
-func (page ExpressRouteCircuitListResultPage) NotDone() bool {
- return !page.erclr.IsEmpty()
-}
-
-// Response returns the raw server response from the last page request.
-func (page ExpressRouteCircuitListResultPage) Response() ExpressRouteCircuitListResult {
- return page.erclr
-}
-
-// Values returns the slice of values for the current page or nil if there are no values.
-func (page ExpressRouteCircuitListResultPage) Values() []ExpressRouteCircuit {
- if page.erclr.IsEmpty() {
- return nil
- }
- return *page.erclr.Value
-}
-
-// Creates a new instance of the ExpressRouteCircuitListResultPage type.
-func NewExpressRouteCircuitListResultPage(getNextPage func(context.Context, ExpressRouteCircuitListResult) (ExpressRouteCircuitListResult, error)) ExpressRouteCircuitListResultPage {
- return ExpressRouteCircuitListResultPage{fn: getNextPage}
-}
-
-// ExpressRouteCircuitPeering peering in an ExpressRouteCircuit resource.
-type ExpressRouteCircuitPeering struct {
- autorest.Response `json:"-"`
- *ExpressRouteCircuitPeeringPropertiesFormat `json:"properties,omitempty"`
- // Name - Gets 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"`
- // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
- Etag *string `json:"etag,omitempty"`
- // ID - Resource ID.
- ID *string `json:"id,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for ExpressRouteCircuitPeering.
-func (ercp ExpressRouteCircuitPeering) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if ercp.ExpressRouteCircuitPeeringPropertiesFormat != nil {
- objectMap["properties"] = ercp.ExpressRouteCircuitPeeringPropertiesFormat
- }
- if ercp.Name != nil {
- objectMap["name"] = ercp.Name
- }
- if ercp.ID != nil {
- objectMap["id"] = ercp.ID
- }
- return json.Marshal(objectMap)
-}
-
-// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuitPeering struct.
-func (ercp *ExpressRouteCircuitPeering) 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 expressRouteCircuitPeeringPropertiesFormat ExpressRouteCircuitPeeringPropertiesFormat
- err = json.Unmarshal(*v, &expressRouteCircuitPeeringPropertiesFormat)
- if err != nil {
- return err
- }
- ercp.ExpressRouteCircuitPeeringPropertiesFormat = &expressRouteCircuitPeeringPropertiesFormat
- }
- case "name":
- if v != nil {
- var name string
- err = json.Unmarshal(*v, &name)
- if err != nil {
- return err
- }
- ercp.Name = &name
- }
- case "etag":
- if v != nil {
- var etag string
- err = json.Unmarshal(*v, &etag)
- if err != nil {
- return err
- }
- ercp.Etag = &etag
- }
- case "id":
- if v != nil {
- var ID string
- err = json.Unmarshal(*v, &ID)
- if err != nil {
- return err
- }
- ercp.ID = &ID
- }
- }
- }
-
- return nil
-}
-
-// ExpressRouteCircuitPeeringConfig specifies the peering configuration.
-type ExpressRouteCircuitPeeringConfig struct {
- // AdvertisedPublicPrefixes - The reference of AdvertisedPublicPrefixes.
- AdvertisedPublicPrefixes *[]string `json:"advertisedPublicPrefixes,omitempty"`
- // AdvertisedCommunities - The communities of bgp peering. Specified for microsoft peering
- AdvertisedCommunities *[]string `json:"advertisedCommunities,omitempty"`
- // AdvertisedPublicPrefixesState - AdvertisedPublicPrefixState of the Peering resource. Possible values are 'NotConfigured', 'Configuring', 'Configured', and 'ValidationNeeded'. Possible values include: 'NotConfigured', 'Configuring', 'Configured', 'ValidationNeeded'
- AdvertisedPublicPrefixesState ExpressRouteCircuitPeeringAdvertisedPublicPrefixState `json:"advertisedPublicPrefixesState,omitempty"`
- // LegacyMode - The legacy mode of the peering.
- LegacyMode *int32 `json:"legacyMode,omitempty"`
- // CustomerASN - The CustomerASN of the peering.
- CustomerASN *int32 `json:"customerASN,omitempty"`
- // RoutingRegistryName - The RoutingRegistryName of the configuration.
- RoutingRegistryName *string `json:"routingRegistryName,omitempty"`
-}
-
-// ExpressRouteCircuitPeeringID expressRoute circuit peering identifier.
-type ExpressRouteCircuitPeeringID struct {
- // ID - The ID of the ExpressRoute circuit peering.
- ID *string `json:"id,omitempty"`
-}
-
-// ExpressRouteCircuitPeeringListResult response for ListPeering API service call retrieves all peerings that
-// belong to an ExpressRouteCircuit.
-type ExpressRouteCircuitPeeringListResult struct {
- autorest.Response `json:"-"`
- // Value - The peerings in an express route circuit.
- Value *[]ExpressRouteCircuitPeering `json:"value,omitempty"`
- // NextLink - The URL to get the next set of results.
- NextLink *string `json:"nextLink,omitempty"`
-}
-
-// ExpressRouteCircuitPeeringListResultIterator provides access to a complete listing of
-// ExpressRouteCircuitPeering values.
-type ExpressRouteCircuitPeeringListResultIterator struct {
- i int
- page ExpressRouteCircuitPeeringListResultPage
-}
-
-// 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 *ExpressRouteCircuitPeeringListResultIterator) NextWithContext(ctx context.Context) (err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitPeeringListResultIterator.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 *ExpressRouteCircuitPeeringListResultIterator) Next() error {
- return iter.NextWithContext(context.Background())
-}
-
-// NotDone returns true if the enumeration should be started or is not yet complete.
-func (iter ExpressRouteCircuitPeeringListResultIterator) 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 ExpressRouteCircuitPeeringListResultIterator) Response() ExpressRouteCircuitPeeringListResult {
- 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 ExpressRouteCircuitPeeringListResultIterator) Value() ExpressRouteCircuitPeering {
- if !iter.page.NotDone() {
- return ExpressRouteCircuitPeering{}
- }
- return iter.page.Values()[iter.i]
-}
-
-// Creates a new instance of the ExpressRouteCircuitPeeringListResultIterator type.
-func NewExpressRouteCircuitPeeringListResultIterator(page ExpressRouteCircuitPeeringListResultPage) ExpressRouteCircuitPeeringListResultIterator {
- return ExpressRouteCircuitPeeringListResultIterator{page: page}
-}
-
-// IsEmpty returns true if the ListResult contains no values.
-func (ercplr ExpressRouteCircuitPeeringListResult) IsEmpty() bool {
- return ercplr.Value == nil || len(*ercplr.Value) == 0
-}
-
-// hasNextLink returns true if the NextLink is not empty.
-func (ercplr ExpressRouteCircuitPeeringListResult) hasNextLink() bool {
- return ercplr.NextLink != nil && len(*ercplr.NextLink) != 0
-}
-
-// expressRouteCircuitPeeringListResultPreparer prepares a request to retrieve the next set of results.
-// It returns nil if no more results exist.
-func (ercplr ExpressRouteCircuitPeeringListResult) expressRouteCircuitPeeringListResultPreparer(ctx context.Context) (*http.Request, error) {
- if !ercplr.hasNextLink() {
- return nil, nil
- }
- return autorest.Prepare((&http.Request{}).WithContext(ctx),
- autorest.AsJSON(),
- autorest.AsGet(),
- autorest.WithBaseURL(to.String(ercplr.NextLink)))
-}
-
-// ExpressRouteCircuitPeeringListResultPage contains a page of ExpressRouteCircuitPeering values.
-type ExpressRouteCircuitPeeringListResultPage struct {
- fn func(context.Context, ExpressRouteCircuitPeeringListResult) (ExpressRouteCircuitPeeringListResult, error)
- ercplr ExpressRouteCircuitPeeringListResult
-}
-
-// 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 *ExpressRouteCircuitPeeringListResultPage) NextWithContext(ctx context.Context) (err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitPeeringListResultPage.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.ercplr)
- if err != nil {
- return err
- }
- page.ercplr = 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 *ExpressRouteCircuitPeeringListResultPage) Next() error {
- return page.NextWithContext(context.Background())
-}
-
-// NotDone returns true if the page enumeration should be started or is not yet complete.
-func (page ExpressRouteCircuitPeeringListResultPage) NotDone() bool {
- return !page.ercplr.IsEmpty()
-}
-
-// Response returns the raw server response from the last page request.
-func (page ExpressRouteCircuitPeeringListResultPage) Response() ExpressRouteCircuitPeeringListResult {
- return page.ercplr
-}
-
-// Values returns the slice of values for the current page or nil if there are no values.
-func (page ExpressRouteCircuitPeeringListResultPage) Values() []ExpressRouteCircuitPeering {
- if page.ercplr.IsEmpty() {
- return nil
- }
- return *page.ercplr.Value
-}
-
-// Creates a new instance of the ExpressRouteCircuitPeeringListResultPage type.
-func NewExpressRouteCircuitPeeringListResultPage(getNextPage func(context.Context, ExpressRouteCircuitPeeringListResult) (ExpressRouteCircuitPeeringListResult, error)) ExpressRouteCircuitPeeringListResultPage {
- return ExpressRouteCircuitPeeringListResultPage{fn: getNextPage}
-}
-
-// ExpressRouteCircuitPeeringPropertiesFormat ...
-type ExpressRouteCircuitPeeringPropertiesFormat struct {
- // PeeringType - The peering type. Possible values include: 'AzurePublicPeering', 'AzurePrivatePeering', 'MicrosoftPeering'
- PeeringType ExpressRoutePeeringType `json:"peeringType,omitempty"`
- // State - The peering state. Possible values include: 'ExpressRoutePeeringStateDisabled', 'ExpressRoutePeeringStateEnabled'
- State ExpressRoutePeeringState `json:"state,omitempty"`
- // AzureASN - The Azure ASN.
- AzureASN *int32 `json:"azureASN,omitempty"`
- // PeerASN - The peer ASN.
- PeerASN *int64 `json:"peerASN,omitempty"`
- // PrimaryPeerAddressPrefix - The primary address prefix.
- PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"`
- // SecondaryPeerAddressPrefix - The secondary address prefix.
- SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"`
- // PrimaryAzurePort - The primary port.
- PrimaryAzurePort *string `json:"primaryAzurePort,omitempty"`
- // SecondaryAzurePort - The secondary port.
- SecondaryAzurePort *string `json:"secondaryAzurePort,omitempty"`
- // SharedKey - The shared key.
- SharedKey *string `json:"sharedKey,omitempty"`
- // VlanID - The VLAN ID.
- VlanID *int32 `json:"vlanId,omitempty"`
- // MicrosoftPeeringConfig - The Microsoft peering configuration.
- MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"`
- // Stats - Gets peering stats.
- Stats *ExpressRouteCircuitStats `json:"stats,omitempty"`
- // ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
- ProvisioningState *string `json:"provisioningState,omitempty"`
- // GatewayManagerEtag - The GatewayManager Etag.
- GatewayManagerEtag *string `json:"gatewayManagerEtag,omitempty"`
- // LastModifiedBy - Gets whether the provider or the customer last modified the peering.
- LastModifiedBy *string `json:"lastModifiedBy,omitempty"`
- // RouteFilter - The reference of the RouteFilter resource.
- RouteFilter *RouteFilter `json:"routeFilter,omitempty"`
- // Ipv6PeeringConfig - The IPv6 peering configuration.
- Ipv6PeeringConfig *Ipv6ExpressRouteCircuitPeeringConfig `json:"ipv6PeeringConfig,omitempty"`
- // ExpressRouteConnection - The ExpressRoute connection.
- ExpressRouteConnection *ExpressRouteConnectionID `json:"expressRouteConnection,omitempty"`
- // Connections - The list of circuit connections associated with Azure Private Peering for this circuit.
- Connections *[]ExpressRouteCircuitConnection `json:"connections,omitempty"`
- // PeeredConnections - READ-ONLY; The list of peered circuit connections associated with Azure Private Peering for this circuit.
- PeeredConnections *[]PeerExpressRouteCircuitConnection `json:"peeredConnections,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for ExpressRouteCircuitPeeringPropertiesFormat.
-func (ercppf ExpressRouteCircuitPeeringPropertiesFormat) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if ercppf.PeeringType != "" {
- objectMap["peeringType"] = ercppf.PeeringType
- }
- if ercppf.State != "" {
- objectMap["state"] = ercppf.State
- }
- if ercppf.AzureASN != nil {
- objectMap["azureASN"] = ercppf.AzureASN
- }
- if ercppf.PeerASN != nil {
- objectMap["peerASN"] = ercppf.PeerASN
- }
- if ercppf.PrimaryPeerAddressPrefix != nil {
- objectMap["primaryPeerAddressPrefix"] = ercppf.PrimaryPeerAddressPrefix
- }
- if ercppf.SecondaryPeerAddressPrefix != nil {
- objectMap["secondaryPeerAddressPrefix"] = ercppf.SecondaryPeerAddressPrefix
- }
- if ercppf.PrimaryAzurePort != nil {
- objectMap["primaryAzurePort"] = ercppf.PrimaryAzurePort
- }
- if ercppf.SecondaryAzurePort != nil {
- objectMap["secondaryAzurePort"] = ercppf.SecondaryAzurePort
- }
- if ercppf.SharedKey != nil {
- objectMap["sharedKey"] = ercppf.SharedKey
- }
- if ercppf.VlanID != nil {
- objectMap["vlanId"] = ercppf.VlanID
- }
- if ercppf.MicrosoftPeeringConfig != nil {
- objectMap["microsoftPeeringConfig"] = ercppf.MicrosoftPeeringConfig
- }
- if ercppf.Stats != nil {
- objectMap["stats"] = ercppf.Stats
- }
- if ercppf.ProvisioningState != nil {
- objectMap["provisioningState"] = ercppf.ProvisioningState
- }
- if ercppf.GatewayManagerEtag != nil {
- objectMap["gatewayManagerEtag"] = ercppf.GatewayManagerEtag
- }
- if ercppf.LastModifiedBy != nil {
- objectMap["lastModifiedBy"] = ercppf.LastModifiedBy
- }
- if ercppf.RouteFilter != nil {
- objectMap["routeFilter"] = ercppf.RouteFilter
- }
- if ercppf.Ipv6PeeringConfig != nil {
- objectMap["ipv6PeeringConfig"] = ercppf.Ipv6PeeringConfig
- }
- if ercppf.ExpressRouteConnection != nil {
- objectMap["expressRouteConnection"] = ercppf.ExpressRouteConnection
- }
- if ercppf.Connections != nil {
- objectMap["connections"] = ercppf.Connections
- }
- return json.Marshal(objectMap)
-}
-
-// ExpressRouteCircuitPeeringsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of
-// a long-running operation.
-type ExpressRouteCircuitPeeringsCreateOrUpdateFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *ExpressRouteCircuitPeeringsCreateOrUpdateFuture) Result(client ExpressRouteCircuitPeeringsClient) (ercp ExpressRouteCircuitPeering, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if ercp.Response.Response, err = future.GetResult(sender); err == nil && ercp.Response.Response.StatusCode != http.StatusNoContent {
- ercp, err = client.CreateOrUpdateResponder(ercp.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture", "Result", ercp.Response.Response, "Failure responding to request")
- }
- }
- return
-}
-
-// ExpressRouteCircuitPeeringsDeleteFuture an abstraction for monitoring and retrieving the results of a
-// long-running operation.
-type ExpressRouteCircuitPeeringsDeleteFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *ExpressRouteCircuitPeeringsDeleteFuture) Result(client ExpressRouteCircuitPeeringsClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsDeleteFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitPeeringsDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
-}
-
-// ExpressRouteCircuitPropertiesFormat properties of ExpressRouteCircuit.
-type ExpressRouteCircuitPropertiesFormat struct {
- // AllowClassicOperations - Allow classic operations
- AllowClassicOperations *bool `json:"allowClassicOperations,omitempty"`
- // CircuitProvisioningState - The CircuitProvisioningState state of the resource.
- CircuitProvisioningState *string `json:"circuitProvisioningState,omitempty"`
- // ServiceProviderProvisioningState - The ServiceProviderProvisioningState state of the resource. Possible values are 'NotProvisioned', 'Provisioning', 'Provisioned', and 'Deprovisioning'. Possible values include: 'NotProvisioned', 'Provisioning', 'Provisioned', 'Deprovisioning'
- ServiceProviderProvisioningState ServiceProviderProvisioningState `json:"serviceProviderProvisioningState,omitempty"`
- // Authorizations - The list of authorizations.
- Authorizations *[]ExpressRouteCircuitAuthorization `json:"authorizations,omitempty"`
- // Peerings - The list of peerings.
- Peerings *[]ExpressRouteCircuitPeering `json:"peerings,omitempty"`
- // ServiceKey - The ServiceKey.
- ServiceKey *string `json:"serviceKey,omitempty"`
- // ServiceProviderNotes - The ServiceProviderNotes.
- ServiceProviderNotes *string `json:"serviceProviderNotes,omitempty"`
- // ServiceProviderProperties - The ServiceProviderProperties.
- ServiceProviderProperties *ExpressRouteCircuitServiceProviderProperties `json:"serviceProviderProperties,omitempty"`
- // ExpressRoutePort - The reference to the ExpressRoutePort resource when the circuit is provisioned on an ExpressRoutePort resource.
- ExpressRoutePort *SubResource `json:"expressRoutePort,omitempty"`
- // BandwidthInGbps - The bandwidth of the circuit when the circuit is provisioned on an ExpressRoutePort resource.
- BandwidthInGbps *float64 `json:"bandwidthInGbps,omitempty"`
- // Stag - READ-ONLY; The identifier of the circuit traffic. Outer tag for QinQ encapsulation.
- Stag *int32 `json:"stag,omitempty"`
- // ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
- ProvisioningState *string `json:"provisioningState,omitempty"`
- // GatewayManagerEtag - The GatewayManager Etag.
- GatewayManagerEtag *string `json:"gatewayManagerEtag,omitempty"`
- // AllowGlobalReach - Flag to enable Global Reach on the circuit.
- AllowGlobalReach *bool `json:"allowGlobalReach,omitempty"`
- // GlobalReachEnabled - Flag denoting Global reach status.
- GlobalReachEnabled *bool `json:"globalReachEnabled,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for ExpressRouteCircuitPropertiesFormat.
-func (ercpf ExpressRouteCircuitPropertiesFormat) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if ercpf.AllowClassicOperations != nil {
- objectMap["allowClassicOperations"] = ercpf.AllowClassicOperations
- }
- if ercpf.CircuitProvisioningState != nil {
- objectMap["circuitProvisioningState"] = ercpf.CircuitProvisioningState
- }
- if ercpf.ServiceProviderProvisioningState != "" {
- objectMap["serviceProviderProvisioningState"] = ercpf.ServiceProviderProvisioningState
- }
- if ercpf.Authorizations != nil {
- objectMap["authorizations"] = ercpf.Authorizations
- }
- if ercpf.Peerings != nil {
- objectMap["peerings"] = ercpf.Peerings
- }
- if ercpf.ServiceKey != nil {
- objectMap["serviceKey"] = ercpf.ServiceKey
- }
- if ercpf.ServiceProviderNotes != nil {
- objectMap["serviceProviderNotes"] = ercpf.ServiceProviderNotes
- }
- if ercpf.ServiceProviderProperties != nil {
- objectMap["serviceProviderProperties"] = ercpf.ServiceProviderProperties
- }
- if ercpf.ExpressRoutePort != nil {
- objectMap["expressRoutePort"] = ercpf.ExpressRoutePort
- }
- if ercpf.BandwidthInGbps != nil {
- objectMap["bandwidthInGbps"] = ercpf.BandwidthInGbps
- }
- if ercpf.ProvisioningState != nil {
- objectMap["provisioningState"] = ercpf.ProvisioningState
- }
- if ercpf.GatewayManagerEtag != nil {
- objectMap["gatewayManagerEtag"] = ercpf.GatewayManagerEtag
- }
- if ercpf.AllowGlobalReach != nil {
- objectMap["allowGlobalReach"] = ercpf.AllowGlobalReach
- }
- if ercpf.GlobalReachEnabled != nil {
- objectMap["globalReachEnabled"] = ercpf.GlobalReachEnabled
- }
- return json.Marshal(objectMap)
-}
-
-// ExpressRouteCircuitReference ...
-type ExpressRouteCircuitReference struct {
- // ID - Corresponding Express Route Circuit Id.
- ID *string `json:"id,omitempty"`
-}
-
-// ExpressRouteCircuitRoutesTable the routes table associated with the ExpressRouteCircuit
-type ExpressRouteCircuitRoutesTable struct {
- // NetworkProperty - IP address of a network entity
- NetworkProperty *string `json:"network,omitempty"`
- // NextHop - NextHop address
- NextHop *string `json:"nextHop,omitempty"`
- // LocPrf - Local preference value as set with the set local-preference route-map configuration command
- LocPrf *string `json:"locPrf,omitempty"`
- // Weight - Route Weight.
- Weight *int32 `json:"weight,omitempty"`
- // Path - Autonomous system paths to the destination network.
- Path *string `json:"path,omitempty"`
-}
-
-// ExpressRouteCircuitRoutesTableSummary the routes table associated with the ExpressRouteCircuit.
-type ExpressRouteCircuitRoutesTableSummary struct {
- // Neighbor - IP address of the neighbor.
- Neighbor *string `json:"neighbor,omitempty"`
- // V - BGP version number spoken to the neighbor.
- V *int32 `json:"v,omitempty"`
- // As - Autonomous system number.
- As *int32 `json:"as,omitempty"`
- // UpDown - The length of time that the BGP session has been in the Established state, or the current status if not in the Established state.
- UpDown *string `json:"upDown,omitempty"`
- // StatePfxRcd - Current state of the BGP session, and the number of prefixes that have been received from a neighbor or peer group.
- StatePfxRcd *string `json:"statePfxRcd,omitempty"`
-}
-
-// ExpressRouteCircuitsArpTableListResult response for ListArpTable associated with the Express Route Circuits
-// API.
-type ExpressRouteCircuitsArpTableListResult struct {
- autorest.Response `json:"-"`
- // Value - Gets list of the ARP table.
- Value *[]ExpressRouteCircuitArpTable `json:"value,omitempty"`
- // NextLink - The URL to get the next set of results.
- NextLink *string `json:"nextLink,omitempty"`
-}
-
-// ExpressRouteCircuitsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
-// long-running operation.
-type ExpressRouteCircuitsCreateOrUpdateFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *ExpressRouteCircuitsCreateOrUpdateFuture) Result(client ExpressRouteCircuitsClient) (erc ExpressRouteCircuit, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsCreateOrUpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if erc.Response.Response, err = future.GetResult(sender); err == nil && erc.Response.Response.StatusCode != http.StatusNoContent {
- erc, err = client.CreateOrUpdateResponder(erc.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsCreateOrUpdateFuture", "Result", erc.Response.Response, "Failure responding to request")
- }
- }
- return
-}
-
-// ExpressRouteCircuitsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
-type ExpressRouteCircuitsDeleteFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *ExpressRouteCircuitsDeleteFuture) Result(client ExpressRouteCircuitsClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsDeleteFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
-}
-
-// ExpressRouteCircuitServiceProviderProperties contains ServiceProviderProperties in an ExpressRouteCircuit.
-type ExpressRouteCircuitServiceProviderProperties struct {
- // ServiceProviderName - The serviceProviderName.
- ServiceProviderName *string `json:"serviceProviderName,omitempty"`
- // PeeringLocation - The peering location.
- PeeringLocation *string `json:"peeringLocation,omitempty"`
- // BandwidthInMbps - The BandwidthInMbps.
- BandwidthInMbps *int32 `json:"bandwidthInMbps,omitempty"`
-}
-
-// ExpressRouteCircuitSku contains SKU in an ExpressRouteCircuit.
-type ExpressRouteCircuitSku struct {
- // Name - The name of the SKU.
- Name *string `json:"name,omitempty"`
- // Tier - The tier of the SKU. Possible values are 'Standard', 'Premium' or 'Local'. Possible values include: 'ExpressRouteCircuitSkuTierStandard', 'ExpressRouteCircuitSkuTierPremium', 'ExpressRouteCircuitSkuTierBasic', 'ExpressRouteCircuitSkuTierLocal'
- Tier ExpressRouteCircuitSkuTier `json:"tier,omitempty"`
- // Family - The family of the SKU. Possible values are: 'UnlimitedData' and 'MeteredData'. Possible values include: 'UnlimitedData', 'MeteredData'
- Family ExpressRouteCircuitSkuFamily `json:"family,omitempty"`
-}
-
-// ExpressRouteCircuitsListArpTableFuture an abstraction for monitoring and retrieving the results of a
-// long-running operation.
-type ExpressRouteCircuitsListArpTableFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *ExpressRouteCircuitsListArpTableFuture) Result(client ExpressRouteCircuitsClient) (ercatlr ExpressRouteCircuitsArpTableListResult, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListArpTableFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListArpTableFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if ercatlr.Response.Response, err = future.GetResult(sender); err == nil && ercatlr.Response.Response.StatusCode != http.StatusNoContent {
- ercatlr, err = client.ListArpTableResponder(ercatlr.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListArpTableFuture", "Result", ercatlr.Response.Response, "Failure responding to request")
- }
- }
- return
-}
-
-// ExpressRouteCircuitsListRoutesTableFuture an abstraction for monitoring and retrieving the results of a
-// long-running operation.
-type ExpressRouteCircuitsListRoutesTableFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *ExpressRouteCircuitsListRoutesTableFuture) Result(client ExpressRouteCircuitsClient) (ercrtlr ExpressRouteCircuitsRoutesTableListResult, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListRoutesTableFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if ercrtlr.Response.Response, err = future.GetResult(sender); err == nil && ercrtlr.Response.Response.StatusCode != http.StatusNoContent {
- ercrtlr, err = client.ListRoutesTableResponder(ercrtlr.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableFuture", "Result", ercrtlr.Response.Response, "Failure responding to request")
- }
- }
- return
-}
-
-// ExpressRouteCircuitsListRoutesTableSummaryFuture an abstraction for monitoring and retrieving the results of
-// a long-running operation.
-type ExpressRouteCircuitsListRoutesTableSummaryFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *ExpressRouteCircuitsListRoutesTableSummaryFuture) Result(client ExpressRouteCircuitsClient) (ercrtslr ExpressRouteCircuitsRoutesTableSummaryListResult, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableSummaryFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListRoutesTableSummaryFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if ercrtslr.Response.Response, err = future.GetResult(sender); err == nil && ercrtslr.Response.Response.StatusCode != http.StatusNoContent {
- ercrtslr, err = client.ListRoutesTableSummaryResponder(ercrtslr.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableSummaryFuture", "Result", ercrtslr.Response.Response, "Failure responding to request")
- }
- }
- return
-}
-
-// ExpressRouteCircuitsRoutesTableListResult response for ListRoutesTable associated with the Express Route
-// Circuits API.
-type ExpressRouteCircuitsRoutesTableListResult struct {
- autorest.Response `json:"-"`
- // Value - The list of routes table.
- Value *[]ExpressRouteCircuitRoutesTable `json:"value,omitempty"`
- // NextLink - The URL to get the next set of results.
- NextLink *string `json:"nextLink,omitempty"`
-}
-
-// ExpressRouteCircuitsRoutesTableSummaryListResult response for ListRoutesTable associated with the Express
-// Route Circuits API.
-type ExpressRouteCircuitsRoutesTableSummaryListResult struct {
- autorest.Response `json:"-"`
- // Value - A list of the routes table.
- Value *[]ExpressRouteCircuitRoutesTableSummary `json:"value,omitempty"`
- // NextLink - The URL to get the next set of results.
- NextLink *string `json:"nextLink,omitempty"`
-}
-
-// ExpressRouteCircuitStats contains stats associated with the peering.
-type ExpressRouteCircuitStats struct {
- autorest.Response `json:"-"`
- // PrimarybytesIn - Gets BytesIn of the peering.
- PrimarybytesIn *int64 `json:"primarybytesIn,omitempty"`
- // PrimarybytesOut - Gets BytesOut of the peering.
- PrimarybytesOut *int64 `json:"primarybytesOut,omitempty"`
- // SecondarybytesIn - Gets BytesIn of the peering.
- SecondarybytesIn *int64 `json:"secondarybytesIn,omitempty"`
- // SecondarybytesOut - Gets BytesOut of the peering.
- SecondarybytesOut *int64 `json:"secondarybytesOut,omitempty"`
-}
-
-// ExpressRouteCircuitsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
-// long-running operation.
-type ExpressRouteCircuitsUpdateTagsFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *ExpressRouteCircuitsUpdateTagsFuture) Result(client ExpressRouteCircuitsClient) (erc ExpressRouteCircuit, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsUpdateTagsFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsUpdateTagsFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if erc.Response.Response, err = future.GetResult(sender); err == nil && erc.Response.Response.StatusCode != http.StatusNoContent {
- erc, err = client.UpdateTagsResponder(erc.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsUpdateTagsFuture", "Result", erc.Response.Response, "Failure responding to request")
- }
- }
- return
-}
-
-// ExpressRouteConnection expressRouteConnection resource.
-type ExpressRouteConnection struct {
- autorest.Response `json:"-"`
- *ExpressRouteConnectionProperties `json:"properties,omitempty"`
- // Name - The name of the resource.
- Name *string `json:"name,omitempty"`
- // ID - Resource ID.
- ID *string `json:"id,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for ExpressRouteConnection.
-func (erc ExpressRouteConnection) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if erc.ExpressRouteConnectionProperties != nil {
- objectMap["properties"] = erc.ExpressRouteConnectionProperties
- }
- if erc.Name != nil {
- objectMap["name"] = erc.Name
- }
- if erc.ID != nil {
- objectMap["id"] = erc.ID
- }
- return json.Marshal(objectMap)
-}
-
-// UnmarshalJSON is the custom unmarshaler for ExpressRouteConnection struct.
-func (erc *ExpressRouteConnection) 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 expressRouteConnectionProperties ExpressRouteConnectionProperties
- err = json.Unmarshal(*v, &expressRouteConnectionProperties)
- if err != nil {
- return err
- }
- erc.ExpressRouteConnectionProperties = &expressRouteConnectionProperties
- }
- case "name":
- if v != nil {
- var name string
- err = json.Unmarshal(*v, &name)
- if err != nil {
- return err
- }
- erc.Name = &name
- }
- case "id":
- if v != nil {
- var ID string
- err = json.Unmarshal(*v, &ID)
- if err != nil {
- return err
- }
- erc.ID = &ID
- }
- }
- }
-
- return nil
-}
-
-// ExpressRouteConnectionID the ID of the ExpressRouteConnection.
-type ExpressRouteConnectionID struct {
- // ID - READ-ONLY; The ID of the ExpressRouteConnection.
- ID *string `json:"id,omitempty"`
-}
-
-// ExpressRouteConnectionList expressRouteConnection list
-type ExpressRouteConnectionList struct {
- autorest.Response `json:"-"`
- // Value - The list of ExpressRoute connections
- Value *[]ExpressRouteConnection `json:"value,omitempty"`
-}
-
-// ExpressRouteConnectionProperties properties of the ExpressRouteConnection subresource.
-type ExpressRouteConnectionProperties struct {
- // ProvisioningState - READ-ONLY; The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
- ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
- // ExpressRouteCircuitPeering - The ExpressRoute circuit peering.
- ExpressRouteCircuitPeering *ExpressRouteCircuitPeeringID `json:"expressRouteCircuitPeering,omitempty"`
- // AuthorizationKey - Authorization key to establish the connection.
- AuthorizationKey *string `json:"authorizationKey,omitempty"`
- // RoutingWeight - The routing weight associated to the connection.
- RoutingWeight *int32 `json:"routingWeight,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for ExpressRouteConnectionProperties.
-func (ercp ExpressRouteConnectionProperties) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if ercp.ExpressRouteCircuitPeering != nil {
- objectMap["expressRouteCircuitPeering"] = ercp.ExpressRouteCircuitPeering
- }
- if ercp.AuthorizationKey != nil {
- objectMap["authorizationKey"] = ercp.AuthorizationKey
- }
- if ercp.RoutingWeight != nil {
- objectMap["routingWeight"] = ercp.RoutingWeight
- }
- return json.Marshal(objectMap)
-}
-
-// ExpressRouteConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
-// long-running operation.
-type ExpressRouteConnectionsCreateOrUpdateFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *ExpressRouteConnectionsCreateOrUpdateFuture) Result(client ExpressRouteConnectionsClient) (erc ExpressRouteConnection, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.ExpressRouteConnectionsCreateOrUpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if erc.Response.Response, err = future.GetResult(sender); err == nil && erc.Response.Response.StatusCode != http.StatusNoContent {
- erc, err = client.CreateOrUpdateResponder(erc.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteConnectionsCreateOrUpdateFuture", "Result", erc.Response.Response, "Failure responding to request")
- }
- }
- return
-}
-
-// ExpressRouteConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of a
-// long-running operation.
-type ExpressRouteConnectionsDeleteFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *ExpressRouteConnectionsDeleteFuture) Result(client ExpressRouteConnectionsClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteConnectionsDeleteFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.ExpressRouteConnectionsDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
-}
-
-// ExpressRouteCrossConnection expressRouteCrossConnection resource
-type ExpressRouteCrossConnection struct {
- autorest.Response `json:"-"`
- *ExpressRouteCrossConnectionProperties `json:"properties,omitempty"`
- // Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
- Etag *string `json:"etag,omitempty"`
- // ID - 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 ExpressRouteCrossConnection.
-func (ercc ExpressRouteCrossConnection) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if ercc.ExpressRouteCrossConnectionProperties != nil {
- objectMap["properties"] = ercc.ExpressRouteCrossConnectionProperties
- }
- if ercc.ID != nil {
- objectMap["id"] = ercc.ID
- }
- if ercc.Location != nil {
- objectMap["location"] = ercc.Location
- }
- if ercc.Tags != nil {
- objectMap["tags"] = ercc.Tags
- }
- return json.Marshal(objectMap)
-}
-
-// UnmarshalJSON is the custom unmarshaler for ExpressRouteCrossConnection struct.
-func (ercc *ExpressRouteCrossConnection) 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 expressRouteCrossConnectionProperties ExpressRouteCrossConnectionProperties
- err = json.Unmarshal(*v, &expressRouteCrossConnectionProperties)
- if err != nil {
- return err
- }
- ercc.ExpressRouteCrossConnectionProperties = &expressRouteCrossConnectionProperties
- }
- case "etag":
- if v != nil {
- var etag string
- err = json.Unmarshal(*v, &etag)
- if err != nil {
- return err
- }
- ercc.Etag = &etag
- }
- case "id":
- if v != nil {
- var ID string
- err = json.Unmarshal(*v, &ID)
- if err != nil {
- return err
- }
- ercc.ID = &ID
- }
- case "name":
- if v != nil {
- var name string
- err = json.Unmarshal(*v, &name)
- if err != nil {
- return err
- }
- ercc.Name = &name
- }
- case "type":
- if v != nil {
- var typeVar string
- err = json.Unmarshal(*v, &typeVar)
- if err != nil {
- return err
- }
- ercc.Type = &typeVar
- }
- case "location":
- if v != nil {
- var location string
- err = json.Unmarshal(*v, &location)
- if err != nil {
- return err
- }
- ercc.Location = &location
- }
- case "tags":
- if v != nil {
- var tags map[string]*string
- err = json.Unmarshal(*v, &tags)
- if err != nil {
- return err
- }
- ercc.Tags = tags
- }
- }
- }
-
- return nil
-}
-
-// ExpressRouteCrossConnectionListResult response for ListExpressRouteCrossConnection API service call.
-type ExpressRouteCrossConnectionListResult struct {
- autorest.Response `json:"-"`
- // Value - A list of ExpressRouteCrossConnection resources.
- Value *[]ExpressRouteCrossConnection `json:"value,omitempty"`
- // NextLink - READ-ONLY; The URL to get the next set of results.
- NextLink *string `json:"nextLink,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionListResult.
-func (ercclr ExpressRouteCrossConnectionListResult) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if ercclr.Value != nil {
- objectMap["value"] = ercclr.Value
- }
- return json.Marshal(objectMap)
-}
-
-// ExpressRouteCrossConnectionListResultIterator provides access to a complete listing of
-// ExpressRouteCrossConnection values.
-type ExpressRouteCrossConnectionListResultIterator struct {
- i int
- page ExpressRouteCrossConnectionListResultPage
-}
-
-// 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 *ExpressRouteCrossConnectionListResultIterator) NextWithContext(ctx context.Context) (err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionListResultIterator.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 *ExpressRouteCrossConnectionListResultIterator) Next() error {
- return iter.NextWithContext(context.Background())
-}
-
-// NotDone returns true if the enumeration should be started or is not yet complete.
-func (iter ExpressRouteCrossConnectionListResultIterator) 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 ExpressRouteCrossConnectionListResultIterator) Response() ExpressRouteCrossConnectionListResult {
- 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 ExpressRouteCrossConnectionListResultIterator) Value() ExpressRouteCrossConnection {
- if !iter.page.NotDone() {
- return ExpressRouteCrossConnection{}
- }
- return iter.page.Values()[iter.i]
-}
-
-// Creates a new instance of the ExpressRouteCrossConnectionListResultIterator type.
-func NewExpressRouteCrossConnectionListResultIterator(page ExpressRouteCrossConnectionListResultPage) ExpressRouteCrossConnectionListResultIterator {
- return ExpressRouteCrossConnectionListResultIterator{page: page}
-}
-
-// IsEmpty returns true if the ListResult contains no values.
-func (ercclr ExpressRouteCrossConnectionListResult) IsEmpty() bool {
- return ercclr.Value == nil || len(*ercclr.Value) == 0
-}
-
-// hasNextLink returns true if the NextLink is not empty.
-func (ercclr ExpressRouteCrossConnectionListResult) hasNextLink() bool {
- return ercclr.NextLink != nil && len(*ercclr.NextLink) != 0
-}
-
-// expressRouteCrossConnectionListResultPreparer prepares a request to retrieve the next set of results.
-// It returns nil if no more results exist.
-func (ercclr ExpressRouteCrossConnectionListResult) expressRouteCrossConnectionListResultPreparer(ctx context.Context) (*http.Request, error) {
- if !ercclr.hasNextLink() {
- return nil, nil
- }
- return autorest.Prepare((&http.Request{}).WithContext(ctx),
- autorest.AsJSON(),
- autorest.AsGet(),
- autorest.WithBaseURL(to.String(ercclr.NextLink)))
-}
-
-// ExpressRouteCrossConnectionListResultPage contains a page of ExpressRouteCrossConnection values.
-type ExpressRouteCrossConnectionListResultPage struct {
- fn func(context.Context, ExpressRouteCrossConnectionListResult) (ExpressRouteCrossConnectionListResult, error)
- ercclr ExpressRouteCrossConnectionListResult
-}
-
-// 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 *ExpressRouteCrossConnectionListResultPage) NextWithContext(ctx context.Context) (err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionListResultPage.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.ercclr)
- if err != nil {
- return err
- }
- page.ercclr = 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 *ExpressRouteCrossConnectionListResultPage) Next() error {
- return page.NextWithContext(context.Background())
-}
-
-// NotDone returns true if the page enumeration should be started or is not yet complete.
-func (page ExpressRouteCrossConnectionListResultPage) NotDone() bool {
- return !page.ercclr.IsEmpty()
-}
-
-// Response returns the raw server response from the last page request.
-func (page ExpressRouteCrossConnectionListResultPage) Response() ExpressRouteCrossConnectionListResult {
- return page.ercclr
-}
-
-// Values returns the slice of values for the current page or nil if there are no values.
-func (page ExpressRouteCrossConnectionListResultPage) Values() []ExpressRouteCrossConnection {
- if page.ercclr.IsEmpty() {
- return nil
- }
- return *page.ercclr.Value
-}
-
-// Creates a new instance of the ExpressRouteCrossConnectionListResultPage type.
-func NewExpressRouteCrossConnectionListResultPage(getNextPage func(context.Context, ExpressRouteCrossConnectionListResult) (ExpressRouteCrossConnectionListResult, error)) ExpressRouteCrossConnectionListResultPage {
- return ExpressRouteCrossConnectionListResultPage{fn: getNextPage}
-}
-
-// ExpressRouteCrossConnectionPeering peering in an ExpressRoute Cross Connection resource.
-type ExpressRouteCrossConnectionPeering struct {
- autorest.Response `json:"-"`
- *ExpressRouteCrossConnectionPeeringProperties `json:"properties,omitempty"`
- // Name - Gets 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"`
- // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
- Etag *string `json:"etag,omitempty"`
- // ID - Resource ID.
- ID *string `json:"id,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionPeering.
-func (erccp ExpressRouteCrossConnectionPeering) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if erccp.ExpressRouteCrossConnectionPeeringProperties != nil {
- objectMap["properties"] = erccp.ExpressRouteCrossConnectionPeeringProperties
- }
- if erccp.Name != nil {
- objectMap["name"] = erccp.Name
- }
- if erccp.ID != nil {
- objectMap["id"] = erccp.ID
- }
- return json.Marshal(objectMap)
-}
-
-// UnmarshalJSON is the custom unmarshaler for ExpressRouteCrossConnectionPeering struct.
-func (erccp *ExpressRouteCrossConnectionPeering) 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 expressRouteCrossConnectionPeeringProperties ExpressRouteCrossConnectionPeeringProperties
- err = json.Unmarshal(*v, &expressRouteCrossConnectionPeeringProperties)
- if err != nil {
- return err
- }
- erccp.ExpressRouteCrossConnectionPeeringProperties = &expressRouteCrossConnectionPeeringProperties
- }
- case "name":
- if v != nil {
- var name string
- err = json.Unmarshal(*v, &name)
- if err != nil {
- return err
- }
- erccp.Name = &name
- }
- case "etag":
- if v != nil {
- var etag string
- err = json.Unmarshal(*v, &etag)
- if err != nil {
- return err
- }
- erccp.Etag = &etag
- }
- case "id":
- if v != nil {
- var ID string
- err = json.Unmarshal(*v, &ID)
- if err != nil {
- return err
- }
- erccp.ID = &ID
- }
- }
- }
-
- return nil
-}
-
-// ExpressRouteCrossConnectionPeeringList response for ListPeering API service call retrieves all peerings that
-// belong to an ExpressRouteCrossConnection.
-type ExpressRouteCrossConnectionPeeringList struct {
- autorest.Response `json:"-"`
- // Value - The peerings in an express route cross connection.
- Value *[]ExpressRouteCrossConnectionPeering `json:"value,omitempty"`
- // NextLink - READ-ONLY; The URL to get the next set of results.
- NextLink *string `json:"nextLink,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionPeeringList.
-func (erccpl ExpressRouteCrossConnectionPeeringList) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if erccpl.Value != nil {
- objectMap["value"] = erccpl.Value
- }
- return json.Marshal(objectMap)
-}
-
-// ExpressRouteCrossConnectionPeeringListIterator provides access to a complete listing of
-// ExpressRouteCrossConnectionPeering values.
-type ExpressRouteCrossConnectionPeeringListIterator struct {
- i int
- page ExpressRouteCrossConnectionPeeringListPage
-}
-
-// 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 *ExpressRouteCrossConnectionPeeringListIterator) NextWithContext(ctx context.Context) (err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionPeeringListIterator.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 *ExpressRouteCrossConnectionPeeringListIterator) Next() error {
- return iter.NextWithContext(context.Background())
-}
-
-// NotDone returns true if the enumeration should be started or is not yet complete.
-func (iter ExpressRouteCrossConnectionPeeringListIterator) 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 ExpressRouteCrossConnectionPeeringListIterator) Response() ExpressRouteCrossConnectionPeeringList {
- 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 ExpressRouteCrossConnectionPeeringListIterator) Value() ExpressRouteCrossConnectionPeering {
- if !iter.page.NotDone() {
- return ExpressRouteCrossConnectionPeering{}
- }
- return iter.page.Values()[iter.i]
-}
-
-// Creates a new instance of the ExpressRouteCrossConnectionPeeringListIterator type.
-func NewExpressRouteCrossConnectionPeeringListIterator(page ExpressRouteCrossConnectionPeeringListPage) ExpressRouteCrossConnectionPeeringListIterator {
- return ExpressRouteCrossConnectionPeeringListIterator{page: page}
-}
-
-// IsEmpty returns true if the ListResult contains no values.
-func (erccpl ExpressRouteCrossConnectionPeeringList) IsEmpty() bool {
- return erccpl.Value == nil || len(*erccpl.Value) == 0
-}
-
-// hasNextLink returns true if the NextLink is not empty.
-func (erccpl ExpressRouteCrossConnectionPeeringList) hasNextLink() bool {
- return erccpl.NextLink != nil && len(*erccpl.NextLink) != 0
-}
-
-// expressRouteCrossConnectionPeeringListPreparer prepares a request to retrieve the next set of results.
-// It returns nil if no more results exist.
-func (erccpl ExpressRouteCrossConnectionPeeringList) expressRouteCrossConnectionPeeringListPreparer(ctx context.Context) (*http.Request, error) {
- if !erccpl.hasNextLink() {
- return nil, nil
- }
- return autorest.Prepare((&http.Request{}).WithContext(ctx),
- autorest.AsJSON(),
- autorest.AsGet(),
- autorest.WithBaseURL(to.String(erccpl.NextLink)))
-}
-
-// ExpressRouteCrossConnectionPeeringListPage contains a page of ExpressRouteCrossConnectionPeering values.
-type ExpressRouteCrossConnectionPeeringListPage struct {
- fn func(context.Context, ExpressRouteCrossConnectionPeeringList) (ExpressRouteCrossConnectionPeeringList, error)
- erccpl ExpressRouteCrossConnectionPeeringList
-}
-
-// 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 *ExpressRouteCrossConnectionPeeringListPage) NextWithContext(ctx context.Context) (err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionPeeringListPage.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.erccpl)
- if err != nil {
- return err
- }
- page.erccpl = 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 *ExpressRouteCrossConnectionPeeringListPage) Next() error {
- return page.NextWithContext(context.Background())
-}
-
-// NotDone returns true if the page enumeration should be started or is not yet complete.
-func (page ExpressRouteCrossConnectionPeeringListPage) NotDone() bool {
- return !page.erccpl.IsEmpty()
-}
-
-// Response returns the raw server response from the last page request.
-func (page ExpressRouteCrossConnectionPeeringListPage) Response() ExpressRouteCrossConnectionPeeringList {
- return page.erccpl
-}
-
-// Values returns the slice of values for the current page or nil if there are no values.
-func (page ExpressRouteCrossConnectionPeeringListPage) Values() []ExpressRouteCrossConnectionPeering {
- if page.erccpl.IsEmpty() {
- return nil
- }
- return *page.erccpl.Value
-}
-
-// Creates a new instance of the ExpressRouteCrossConnectionPeeringListPage type.
-func NewExpressRouteCrossConnectionPeeringListPage(getNextPage func(context.Context, ExpressRouteCrossConnectionPeeringList) (ExpressRouteCrossConnectionPeeringList, error)) ExpressRouteCrossConnectionPeeringListPage {
- return ExpressRouteCrossConnectionPeeringListPage{fn: getNextPage}
-}
-
-// ExpressRouteCrossConnectionPeeringProperties ...
-type ExpressRouteCrossConnectionPeeringProperties struct {
- // PeeringType - The peering type. Possible values include: 'AzurePublicPeering', 'AzurePrivatePeering', 'MicrosoftPeering'
- PeeringType ExpressRoutePeeringType `json:"peeringType,omitempty"`
- // State - The peering state. Possible values include: 'ExpressRoutePeeringStateDisabled', 'ExpressRoutePeeringStateEnabled'
- State ExpressRoutePeeringState `json:"state,omitempty"`
- // AzureASN - READ-ONLY; The Azure ASN.
- AzureASN *int32 `json:"azureASN,omitempty"`
- // PeerASN - The peer ASN.
- PeerASN *int64 `json:"peerASN,omitempty"`
- // PrimaryPeerAddressPrefix - The primary address prefix.
- PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"`
- // SecondaryPeerAddressPrefix - The secondary address prefix.
- SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"`
- // PrimaryAzurePort - READ-ONLY; The primary port.
- PrimaryAzurePort *string `json:"primaryAzurePort,omitempty"`
- // SecondaryAzurePort - READ-ONLY; The secondary port.
- SecondaryAzurePort *string `json:"secondaryAzurePort,omitempty"`
- // SharedKey - The shared key.
- SharedKey *string `json:"sharedKey,omitempty"`
- // VlanID - The VLAN ID.
- VlanID *int32 `json:"vlanId,omitempty"`
- // MicrosoftPeeringConfig - The Microsoft peering configuration.
- MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"`
- // ProvisioningState - READ-ONLY; Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
- ProvisioningState *string `json:"provisioningState,omitempty"`
- // GatewayManagerEtag - The GatewayManager Etag.
- GatewayManagerEtag *string `json:"gatewayManagerEtag,omitempty"`
- // LastModifiedBy - Gets whether the provider or the customer last modified the peering.
- LastModifiedBy *string `json:"lastModifiedBy,omitempty"`
- // Ipv6PeeringConfig - The IPv6 peering configuration.
- Ipv6PeeringConfig *Ipv6ExpressRouteCircuitPeeringConfig `json:"ipv6PeeringConfig,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionPeeringProperties.
-func (erccpp ExpressRouteCrossConnectionPeeringProperties) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if erccpp.PeeringType != "" {
- objectMap["peeringType"] = erccpp.PeeringType
- }
- if erccpp.State != "" {
- objectMap["state"] = erccpp.State
- }
- if erccpp.PeerASN != nil {
- objectMap["peerASN"] = erccpp.PeerASN
- }
- if erccpp.PrimaryPeerAddressPrefix != nil {
- objectMap["primaryPeerAddressPrefix"] = erccpp.PrimaryPeerAddressPrefix
- }
- if erccpp.SecondaryPeerAddressPrefix != nil {
- objectMap["secondaryPeerAddressPrefix"] = erccpp.SecondaryPeerAddressPrefix
- }
- if erccpp.SharedKey != nil {
- objectMap["sharedKey"] = erccpp.SharedKey
- }
- if erccpp.VlanID != nil {
- objectMap["vlanId"] = erccpp.VlanID
- }
- if erccpp.MicrosoftPeeringConfig != nil {
- objectMap["microsoftPeeringConfig"] = erccpp.MicrosoftPeeringConfig
- }
- if erccpp.GatewayManagerEtag != nil {
- objectMap["gatewayManagerEtag"] = erccpp.GatewayManagerEtag
- }
- if erccpp.LastModifiedBy != nil {
- objectMap["lastModifiedBy"] = erccpp.LastModifiedBy
- }
- if erccpp.Ipv6PeeringConfig != nil {
- objectMap["ipv6PeeringConfig"] = erccpp.Ipv6PeeringConfig
- }
- return json.Marshal(objectMap)
-}
-
-// ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
-// results of a long-running operation.
-type ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture) Result(client ExpressRouteCrossConnectionPeeringsClient) (erccp ExpressRouteCrossConnectionPeering, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if erccp.Response.Response, err = future.GetResult(sender); err == nil && erccp.Response.Response.StatusCode != http.StatusNoContent {
- erccp, err = client.CreateOrUpdateResponder(erccp.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture", "Result", erccp.Response.Response, "Failure responding to request")
- }
- }
- return
-}
-
-// ExpressRouteCrossConnectionPeeringsDeleteFuture an abstraction for monitoring and retrieving the results of
-// a long-running operation.
-type ExpressRouteCrossConnectionPeeringsDeleteFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *ExpressRouteCrossConnectionPeeringsDeleteFuture) Result(client ExpressRouteCrossConnectionPeeringsClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsDeleteFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionPeeringsDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
-}
-
-// ExpressRouteCrossConnectionProperties properties of ExpressRouteCrossConnection.
-type ExpressRouteCrossConnectionProperties struct {
- // PrimaryAzurePort - READ-ONLY; The name of the primary port.
- PrimaryAzurePort *string `json:"primaryAzurePort,omitempty"`
- // SecondaryAzurePort - READ-ONLY; The name of the secondary port.
- SecondaryAzurePort *string `json:"secondaryAzurePort,omitempty"`
- // STag - READ-ONLY; The identifier of the circuit traffic.
- STag *int32 `json:"sTag,omitempty"`
- // PeeringLocation - The peering location of the ExpressRoute circuit.
- PeeringLocation *string `json:"peeringLocation,omitempty"`
- // BandwidthInMbps - The circuit bandwidth In Mbps.
- BandwidthInMbps *int32 `json:"bandwidthInMbps,omitempty"`
- // ExpressRouteCircuit - The ExpressRouteCircuit
- ExpressRouteCircuit *ExpressRouteCircuitReference `json:"expressRouteCircuit,omitempty"`
- // ServiceProviderProvisioningState - The provisioning state of the circuit in the connectivity provider system. Possible values are 'NotProvisioned', 'Provisioning', 'Provisioned'. Possible values include: 'NotProvisioned', 'Provisioning', 'Provisioned', 'Deprovisioning'
- ServiceProviderProvisioningState ServiceProviderProvisioningState `json:"serviceProviderProvisioningState,omitempty"`
- // ServiceProviderNotes - Additional read only notes set by the connectivity provider.
- ServiceProviderNotes *string `json:"serviceProviderNotes,omitempty"`
- // ProvisioningState - READ-ONLY; Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
- ProvisioningState *string `json:"provisioningState,omitempty"`
- // Peerings - The list of peerings.
- Peerings *[]ExpressRouteCrossConnectionPeering `json:"peerings,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionProperties.
-func (erccp ExpressRouteCrossConnectionProperties) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if erccp.PeeringLocation != nil {
- objectMap["peeringLocation"] = erccp.PeeringLocation
- }
- if erccp.BandwidthInMbps != nil {
- objectMap["bandwidthInMbps"] = erccp.BandwidthInMbps
- }
- if erccp.ExpressRouteCircuit != nil {
- objectMap["expressRouteCircuit"] = erccp.ExpressRouteCircuit
- }
- if erccp.ServiceProviderProvisioningState != "" {
- objectMap["serviceProviderProvisioningState"] = erccp.ServiceProviderProvisioningState
- }
- if erccp.ServiceProviderNotes != nil {
- objectMap["serviceProviderNotes"] = erccp.ServiceProviderNotes
- }
- if erccp.Peerings != nil {
- objectMap["peerings"] = erccp.Peerings
- }
- return json.Marshal(objectMap)
-}
-
-// ExpressRouteCrossConnectionRoutesTableSummary the routes table associated with the ExpressRouteCircuit.
-type ExpressRouteCrossConnectionRoutesTableSummary struct {
- // Neighbor - IP address of Neighbor router
- Neighbor *string `json:"neighbor,omitempty"`
- // Asn - Autonomous system number.
- Asn *int32 `json:"asn,omitempty"`
- // UpDown - The length of time that the BGP session has been in the Established state, or the current status if not in the Established state.
- UpDown *string `json:"upDown,omitempty"`
- // StateOrPrefixesReceived - Current state of the BGP session, and the number of prefixes that have been received from a neighbor or peer group.
- StateOrPrefixesReceived *string `json:"stateOrPrefixesReceived,omitempty"`
-}
-
-// ExpressRouteCrossConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of
-// a long-running operation.
-type ExpressRouteCrossConnectionsCreateOrUpdateFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *ExpressRouteCrossConnectionsCreateOrUpdateFuture) Result(client ExpressRouteCrossConnectionsClient) (ercc ExpressRouteCrossConnection, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsCreateOrUpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if ercc.Response.Response, err = future.GetResult(sender); err == nil && ercc.Response.Response.StatusCode != http.StatusNoContent {
- ercc, err = client.CreateOrUpdateResponder(ercc.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsCreateOrUpdateFuture", "Result", ercc.Response.Response, "Failure responding to request")
- }
- }
- return
-}
-
-// ExpressRouteCrossConnectionsListArpTableFuture an abstraction for monitoring and retrieving the results of a
-// long-running operation.
-type ExpressRouteCrossConnectionsListArpTableFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *ExpressRouteCrossConnectionsListArpTableFuture) Result(client ExpressRouteCrossConnectionsClient) (ercatlr ExpressRouteCircuitsArpTableListResult, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListArpTableFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsListArpTableFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if ercatlr.Response.Response, err = future.GetResult(sender); err == nil && ercatlr.Response.Response.StatusCode != http.StatusNoContent {
- ercatlr, err = client.ListArpTableResponder(ercatlr.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListArpTableFuture", "Result", ercatlr.Response.Response, "Failure responding to request")
- }
- }
- return
-}
-
-// ExpressRouteCrossConnectionsListRoutesTableFuture an abstraction for monitoring and retrieving the results
-// of a long-running operation.
-type ExpressRouteCrossConnectionsListRoutesTableFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *ExpressRouteCrossConnectionsListRoutesTableFuture) Result(client ExpressRouteCrossConnectionsClient) (ercrtlr ExpressRouteCircuitsRoutesTableListResult, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListRoutesTableFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsListRoutesTableFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if ercrtlr.Response.Response, err = future.GetResult(sender); err == nil && ercrtlr.Response.Response.StatusCode != http.StatusNoContent {
- ercrtlr, err = client.ListRoutesTableResponder(ercrtlr.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListRoutesTableFuture", "Result", ercrtlr.Response.Response, "Failure responding to request")
- }
- }
- return
-}
-
-// ExpressRouteCrossConnectionsListRoutesTableSummaryFuture an abstraction for monitoring and retrieving the
-// results of a long-running operation.
-type ExpressRouteCrossConnectionsListRoutesTableSummaryFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *ExpressRouteCrossConnectionsListRoutesTableSummaryFuture) Result(client ExpressRouteCrossConnectionsClient) (erccrtslr ExpressRouteCrossConnectionsRoutesTableSummaryListResult, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListRoutesTableSummaryFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsListRoutesTableSummaryFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if erccrtslr.Response.Response, err = future.GetResult(sender); err == nil && erccrtslr.Response.Response.StatusCode != http.StatusNoContent {
- erccrtslr, err = client.ListRoutesTableSummaryResponder(erccrtslr.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListRoutesTableSummaryFuture", "Result", erccrtslr.Response.Response, "Failure responding to request")
- }
- }
- return
-}
-
-// ExpressRouteCrossConnectionsRoutesTableSummaryListResult response for ListRoutesTable associated with the
-// Express Route Cross Connections.
-type ExpressRouteCrossConnectionsRoutesTableSummaryListResult struct {
- autorest.Response `json:"-"`
- // Value - A list of the routes table.
- Value *[]ExpressRouteCrossConnectionRoutesTableSummary `json:"value,omitempty"`
- // NextLink - READ-ONLY; The URL to get the next set of results.
- NextLink *string `json:"nextLink,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionsRoutesTableSummaryListResult.
-func (erccrtslr ExpressRouteCrossConnectionsRoutesTableSummaryListResult) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if erccrtslr.Value != nil {
- objectMap["value"] = erccrtslr.Value
- }
- return json.Marshal(objectMap)
-}
-
-// ExpressRouteCrossConnectionsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
-// long-running operation.
-type ExpressRouteCrossConnectionsUpdateTagsFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *ExpressRouteCrossConnectionsUpdateTagsFuture) Result(client ExpressRouteCrossConnectionsClient) (ercc ExpressRouteCrossConnection, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsUpdateTagsFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsUpdateTagsFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if ercc.Response.Response, err = future.GetResult(sender); err == nil && ercc.Response.Response.StatusCode != http.StatusNoContent {
- ercc, err = client.UpdateTagsResponder(ercc.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsUpdateTagsFuture", "Result", ercc.Response.Response, "Failure responding to request")
- }
- }
- return
-}
-
-// ExpressRouteGateway expressRoute gateway resource.
-type ExpressRouteGateway struct {
- autorest.Response `json:"-"`
- *ExpressRouteGatewayProperties `json:"properties,omitempty"`
- // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
- Etag *string `json:"etag,omitempty"`
- // ID - 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 ExpressRouteGateway.
-func (erg ExpressRouteGateway) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if erg.ExpressRouteGatewayProperties != nil {
- objectMap["properties"] = erg.ExpressRouteGatewayProperties
- }
- if erg.ID != nil {
- objectMap["id"] = erg.ID
- }
- if erg.Location != nil {
- objectMap["location"] = erg.Location
- }
- if erg.Tags != nil {
- objectMap["tags"] = erg.Tags
- }
- return json.Marshal(objectMap)
-}
-
-// UnmarshalJSON is the custom unmarshaler for ExpressRouteGateway struct.
-func (erg *ExpressRouteGateway) 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 expressRouteGatewayProperties ExpressRouteGatewayProperties
- err = json.Unmarshal(*v, &expressRouteGatewayProperties)
- if err != nil {
- return err
- }
- erg.ExpressRouteGatewayProperties = &expressRouteGatewayProperties
- }
- case "etag":
- if v != nil {
- var etag string
- err = json.Unmarshal(*v, &etag)
- if err != nil {
- return err
- }
- erg.Etag = &etag
- }
- case "id":
- if v != nil {
- var ID string
- err = json.Unmarshal(*v, &ID)
- if err != nil {
- return err
- }
- erg.ID = &ID
- }
- case "name":
- if v != nil {
- var name string
- err = json.Unmarshal(*v, &name)
- if err != nil {
- return err
- }
- erg.Name = &name
- }
- case "type":
- if v != nil {
- var typeVar string
- err = json.Unmarshal(*v, &typeVar)
- if err != nil {
- return err
- }
- erg.Type = &typeVar
- }
- case "location":
- if v != nil {
- var location string
- err = json.Unmarshal(*v, &location)
- if err != nil {
- return err
- }
- erg.Location = &location
- }
- case "tags":
- if v != nil {
- var tags map[string]*string
- err = json.Unmarshal(*v, &tags)
- if err != nil {
- return err
- }
- erg.Tags = tags
- }
- }
- }
-
- return nil
-}
-
-// ExpressRouteGatewayList list of ExpressRoute gateways.
-type ExpressRouteGatewayList struct {
- autorest.Response `json:"-"`
- // Value - List of ExpressRoute gateways.
- Value *[]ExpressRouteGateway `json:"value,omitempty"`
-}
-
-// ExpressRouteGatewayProperties expressRoute gateway resource properties.
-type ExpressRouteGatewayProperties struct {
- // AutoScaleConfiguration - Configuration for auto scaling.
- AutoScaleConfiguration *ExpressRouteGatewayPropertiesAutoScaleConfiguration `json:"autoScaleConfiguration,omitempty"`
- // ExpressRouteConnections - READ-ONLY; List of ExpressRoute connections to the ExpressRoute gateway.
- ExpressRouteConnections *[]ExpressRouteConnection `json:"expressRouteConnections,omitempty"`
- // ProvisioningState - READ-ONLY; The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
- ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
- // VirtualHub - The Virtual Hub where the ExpressRoute gateway is or will be deployed.
- VirtualHub *VirtualHubID `json:"virtualHub,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for ExpressRouteGatewayProperties.
-func (ergp ExpressRouteGatewayProperties) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if ergp.AutoScaleConfiguration != nil {
- objectMap["autoScaleConfiguration"] = ergp.AutoScaleConfiguration
- }
- if ergp.VirtualHub != nil {
- objectMap["virtualHub"] = ergp.VirtualHub
- }
- return json.Marshal(objectMap)
-}
-
-// ExpressRouteGatewayPropertiesAutoScaleConfiguration configuration for auto scaling.
-type ExpressRouteGatewayPropertiesAutoScaleConfiguration struct {
- // Bounds - Minimum and maximum number of scale units to deploy.
- Bounds *ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds `json:"bounds,omitempty"`
-}
-
-// ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds minimum and maximum number of scale units to
-// deploy.
-type ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds struct {
- // Min - Minimum number of scale units deployed for ExpressRoute gateway.
- Min *int32 `json:"min,omitempty"`
- // Max - Maximum number of scale units deployed for ExpressRoute gateway.
- Max *int32 `json:"max,omitempty"`
-}
-
-// ExpressRouteGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
-// long-running operation.
-type ExpressRouteGatewaysCreateOrUpdateFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *ExpressRouteGatewaysCreateOrUpdateFuture) Result(client ExpressRouteGatewaysClient) (erg ExpressRouteGateway, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.ExpressRouteGatewaysCreateOrUpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if erg.Response.Response, err = future.GetResult(sender); err == nil && erg.Response.Response.StatusCode != http.StatusNoContent {
- erg, err = client.CreateOrUpdateResponder(erg.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteGatewaysCreateOrUpdateFuture", "Result", erg.Response.Response, "Failure responding to request")
- }
- }
- return
-}
-
-// ExpressRouteGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
-type ExpressRouteGatewaysDeleteFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *ExpressRouteGatewaysDeleteFuture) Result(client ExpressRouteGatewaysClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteGatewaysDeleteFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.ExpressRouteGatewaysDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
-}
-
-// ExpressRouteLink expressRouteLink child resource definition.
-type ExpressRouteLink struct {
- autorest.Response `json:"-"`
- // ExpressRouteLinkPropertiesFormat - ExpressRouteLink properties
- *ExpressRouteLinkPropertiesFormat `json:"properties,omitempty"`
- // Name - Name of child port resource that is unique among child port resources of the parent.
- Name *string `json:"name,omitempty"`
- // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
- Etag *string `json:"etag,omitempty"`
- // ID - Resource ID.
- ID *string `json:"id,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for ExpressRouteLink.
-func (erl ExpressRouteLink) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if erl.ExpressRouteLinkPropertiesFormat != nil {
- objectMap["properties"] = erl.ExpressRouteLinkPropertiesFormat
- }
- if erl.Name != nil {
- objectMap["name"] = erl.Name
- }
- if erl.ID != nil {
- objectMap["id"] = erl.ID
- }
- return json.Marshal(objectMap)
-}
-
-// UnmarshalJSON is the custom unmarshaler for ExpressRouteLink struct.
-func (erl *ExpressRouteLink) 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 expressRouteLinkPropertiesFormat ExpressRouteLinkPropertiesFormat
- err = json.Unmarshal(*v, &expressRouteLinkPropertiesFormat)
- if err != nil {
- return err
- }
- erl.ExpressRouteLinkPropertiesFormat = &expressRouteLinkPropertiesFormat
- }
- case "name":
- if v != nil {
- var name string
- err = json.Unmarshal(*v, &name)
- if err != nil {
- return err
- }
- erl.Name = &name
- }
- case "etag":
- if v != nil {
- var etag string
- err = json.Unmarshal(*v, &etag)
- if err != nil {
- return err
- }
- erl.Etag = &etag
- }
- case "id":
- if v != nil {
- var ID string
- err = json.Unmarshal(*v, &ID)
- if err != nil {
- return err
- }
- erl.ID = &ID
- }
- }
- }
-
- return nil
-}
-
-// ExpressRouteLinkListResult response for ListExpressRouteLinks API service call.
-type ExpressRouteLinkListResult struct {
- autorest.Response `json:"-"`
- // Value - The list of ExpressRouteLink sub-resources.
- Value *[]ExpressRouteLink `json:"value,omitempty"`
- // NextLink - The URL to get the next set of results.
- NextLink *string `json:"nextLink,omitempty"`
-}
-
-// ExpressRouteLinkListResultIterator provides access to a complete listing of ExpressRouteLink values.
-type ExpressRouteLinkListResultIterator struct {
- i int
- page ExpressRouteLinkListResultPage
-}
-
-// 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 *ExpressRouteLinkListResultIterator) NextWithContext(ctx context.Context) (err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteLinkListResultIterator.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 *ExpressRouteLinkListResultIterator) Next() error {
- return iter.NextWithContext(context.Background())
-}
-
-// NotDone returns true if the enumeration should be started or is not yet complete.
-func (iter ExpressRouteLinkListResultIterator) 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 ExpressRouteLinkListResultIterator) Response() ExpressRouteLinkListResult {
- 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 ExpressRouteLinkListResultIterator) Value() ExpressRouteLink {
- if !iter.page.NotDone() {
- return ExpressRouteLink{}
- }
- return iter.page.Values()[iter.i]
-}
-
-// Creates a new instance of the ExpressRouteLinkListResultIterator type.
-func NewExpressRouteLinkListResultIterator(page ExpressRouteLinkListResultPage) ExpressRouteLinkListResultIterator {
- return ExpressRouteLinkListResultIterator{page: page}
-}
-
-// IsEmpty returns true if the ListResult contains no values.
-func (erllr ExpressRouteLinkListResult) IsEmpty() bool {
- return erllr.Value == nil || len(*erllr.Value) == 0
-}
-
-// hasNextLink returns true if the NextLink is not empty.
-func (erllr ExpressRouteLinkListResult) hasNextLink() bool {
- return erllr.NextLink != nil && len(*erllr.NextLink) != 0
-}
-
-// expressRouteLinkListResultPreparer prepares a request to retrieve the next set of results.
-// It returns nil if no more results exist.
-func (erllr ExpressRouteLinkListResult) expressRouteLinkListResultPreparer(ctx context.Context) (*http.Request, error) {
- if !erllr.hasNextLink() {
- return nil, nil
- }
- return autorest.Prepare((&http.Request{}).WithContext(ctx),
- autorest.AsJSON(),
- autorest.AsGet(),
- autorest.WithBaseURL(to.String(erllr.NextLink)))
-}
-
-// ExpressRouteLinkListResultPage contains a page of ExpressRouteLink values.
-type ExpressRouteLinkListResultPage struct {
- fn func(context.Context, ExpressRouteLinkListResult) (ExpressRouteLinkListResult, error)
- erllr ExpressRouteLinkListResult
-}
-
-// 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 *ExpressRouteLinkListResultPage) NextWithContext(ctx context.Context) (err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteLinkListResultPage.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.erllr)
- if err != nil {
- return err
- }
- page.erllr = 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 *ExpressRouteLinkListResultPage) Next() error {
- return page.NextWithContext(context.Background())
-}
-
-// NotDone returns true if the page enumeration should be started or is not yet complete.
-func (page ExpressRouteLinkListResultPage) NotDone() bool {
- return !page.erllr.IsEmpty()
-}
-
-// Response returns the raw server response from the last page request.
-func (page ExpressRouteLinkListResultPage) Response() ExpressRouteLinkListResult {
- return page.erllr
-}
-
-// Values returns the slice of values for the current page or nil if there are no values.
-func (page ExpressRouteLinkListResultPage) Values() []ExpressRouteLink {
- if page.erllr.IsEmpty() {
- return nil
- }
- return *page.erllr.Value
-}
-
-// Creates a new instance of the ExpressRouteLinkListResultPage type.
-func NewExpressRouteLinkListResultPage(getNextPage func(context.Context, ExpressRouteLinkListResult) (ExpressRouteLinkListResult, error)) ExpressRouteLinkListResultPage {
- return ExpressRouteLinkListResultPage{fn: getNextPage}
-}
-
-// ExpressRouteLinkPropertiesFormat properties specific to ExpressRouteLink resources.
-type ExpressRouteLinkPropertiesFormat struct {
- // RouterName - READ-ONLY; Name of Azure router associated with physical port.
- RouterName *string `json:"routerName,omitempty"`
- // InterfaceName - READ-ONLY; Name of Azure router interface.
- InterfaceName *string `json:"interfaceName,omitempty"`
- // PatchPanelID - READ-ONLY; Mapping between physical port to patch panel port.
- PatchPanelID *string `json:"patchPanelId,omitempty"`
- // RackID - READ-ONLY; Mapping of physical patch panel to rack.
- RackID *string `json:"rackId,omitempty"`
- // ConnectorType - READ-ONLY; Physical fiber port type. Possible values include: 'LC', 'SC'
- ConnectorType ExpressRouteLinkConnectorType `json:"connectorType,omitempty"`
- // AdminState - Administrative state of the physical port. Possible values include: 'ExpressRouteLinkAdminStateEnabled', 'ExpressRouteLinkAdminStateDisabled'
- AdminState ExpressRouteLinkAdminState `json:"adminState,omitempty"`
- // ProvisioningState - READ-ONLY; The provisioning state of the ExpressRouteLink resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'.
- ProvisioningState *string `json:"provisioningState,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for ExpressRouteLinkPropertiesFormat.
-func (erlpf ExpressRouteLinkPropertiesFormat) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if erlpf.AdminState != "" {
- objectMap["adminState"] = erlpf.AdminState
- }
- return json.Marshal(objectMap)
-}
-
-// ExpressRoutePort expressRoutePort resource definition.
-type ExpressRoutePort struct {
- autorest.Response `json:"-"`
- // ExpressRoutePortPropertiesFormat - ExpressRoutePort properties
- *ExpressRoutePortPropertiesFormat `json:"properties,omitempty"`
- // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
- Etag *string `json:"etag,omitempty"`
- // ID - 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 ExpressRoutePort.
-func (erp ExpressRoutePort) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if erp.ExpressRoutePortPropertiesFormat != nil {
- objectMap["properties"] = erp.ExpressRoutePortPropertiesFormat
- }
- if erp.ID != nil {
- objectMap["id"] = erp.ID
- }
- if erp.Location != nil {
- objectMap["location"] = erp.Location
- }
- if erp.Tags != nil {
- objectMap["tags"] = erp.Tags
- }
- return json.Marshal(objectMap)
-}
-
-// UnmarshalJSON is the custom unmarshaler for ExpressRoutePort struct.
-func (erp *ExpressRoutePort) 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 expressRoutePortPropertiesFormat ExpressRoutePortPropertiesFormat
- err = json.Unmarshal(*v, &expressRoutePortPropertiesFormat)
- if err != nil {
- return err
- }
- erp.ExpressRoutePortPropertiesFormat = &expressRoutePortPropertiesFormat
- }
- case "etag":
- if v != nil {
- var etag string
- err = json.Unmarshal(*v, &etag)
- if err != nil {
- return err
- }
- erp.Etag = &etag
- }
- case "id":
- if v != nil {
- var ID string
- err = json.Unmarshal(*v, &ID)
- if err != nil {
- return err
- }
- erp.ID = &ID
- }
- case "name":
- if v != nil {
- var name string
- err = json.Unmarshal(*v, &name)
- if err != nil {
- return err
- }
- erp.Name = &name
- }
- case "type":
- if v != nil {
- var typeVar string
- err = json.Unmarshal(*v, &typeVar)
- if err != nil {
- return err
- }
- erp.Type = &typeVar
- }
- case "location":
- if v != nil {
- var location string
- err = json.Unmarshal(*v, &location)
- if err != nil {
- return err
- }
- erp.Location = &location
- }
- case "tags":
- if v != nil {
- var tags map[string]*string
- err = json.Unmarshal(*v, &tags)
- if err != nil {
- return err
- }
- erp.Tags = tags
- }
- }
- }
-
- return nil
-}
-
-// ExpressRoutePortListResult response for ListExpressRoutePorts API service call.
-type ExpressRoutePortListResult struct {
- autorest.Response `json:"-"`
- // Value - A list of ExpressRoutePort resources.
- Value *[]ExpressRoutePort `json:"value,omitempty"`
- // NextLink - The URL to get the next set of results.
- NextLink *string `json:"nextLink,omitempty"`
-}
-
-// ExpressRoutePortListResultIterator provides access to a complete listing of ExpressRoutePort values.
-type ExpressRoutePortListResultIterator struct {
- i int
- page ExpressRoutePortListResultPage
-}
-
-// 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 *ExpressRoutePortListResultIterator) NextWithContext(ctx context.Context) (err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortListResultIterator.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 *ExpressRoutePortListResultIterator) Next() error {
- return iter.NextWithContext(context.Background())
-}
-
-// NotDone returns true if the enumeration should be started or is not yet complete.
-func (iter ExpressRoutePortListResultIterator) 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 ExpressRoutePortListResultIterator) Response() ExpressRoutePortListResult {
- 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 ExpressRoutePortListResultIterator) Value() ExpressRoutePort {
- if !iter.page.NotDone() {
- return ExpressRoutePort{}
- }
- return iter.page.Values()[iter.i]
-}
-
-// Creates a new instance of the ExpressRoutePortListResultIterator type.
-func NewExpressRoutePortListResultIterator(page ExpressRoutePortListResultPage) ExpressRoutePortListResultIterator {
- return ExpressRoutePortListResultIterator{page: page}
-}
-
-// IsEmpty returns true if the ListResult contains no values.
-func (erplr ExpressRoutePortListResult) IsEmpty() bool {
- return erplr.Value == nil || len(*erplr.Value) == 0
-}
-
-// hasNextLink returns true if the NextLink is not empty.
-func (erplr ExpressRoutePortListResult) hasNextLink() bool {
- return erplr.NextLink != nil && len(*erplr.NextLink) != 0
-}
-
-// expressRoutePortListResultPreparer prepares a request to retrieve the next set of results.
-// It returns nil if no more results exist.
-func (erplr ExpressRoutePortListResult) expressRoutePortListResultPreparer(ctx context.Context) (*http.Request, error) {
- if !erplr.hasNextLink() {
- return nil, nil
- }
- return autorest.Prepare((&http.Request{}).WithContext(ctx),
- autorest.AsJSON(),
- autorest.AsGet(),
- autorest.WithBaseURL(to.String(erplr.NextLink)))
-}
-
-// ExpressRoutePortListResultPage contains a page of ExpressRoutePort values.
-type ExpressRoutePortListResultPage struct {
- fn func(context.Context, ExpressRoutePortListResult) (ExpressRoutePortListResult, error)
- erplr ExpressRoutePortListResult
-}
-
-// 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 *ExpressRoutePortListResultPage) NextWithContext(ctx context.Context) (err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortListResultPage.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.erplr)
- if err != nil {
- return err
- }
- page.erplr = 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 *ExpressRoutePortListResultPage) Next() error {
- return page.NextWithContext(context.Background())
-}
-
-// NotDone returns true if the page enumeration should be started or is not yet complete.
-func (page ExpressRoutePortListResultPage) NotDone() bool {
- return !page.erplr.IsEmpty()
-}
-
-// Response returns the raw server response from the last page request.
-func (page ExpressRoutePortListResultPage) Response() ExpressRoutePortListResult {
- return page.erplr
-}
-
-// Values returns the slice of values for the current page or nil if there are no values.
-func (page ExpressRoutePortListResultPage) Values() []ExpressRoutePort {
- if page.erplr.IsEmpty() {
- return nil
- }
- return *page.erplr.Value
-}
-
-// Creates a new instance of the ExpressRoutePortListResultPage type.
-func NewExpressRoutePortListResultPage(getNextPage func(context.Context, ExpressRoutePortListResult) (ExpressRoutePortListResult, error)) ExpressRoutePortListResultPage {
- return ExpressRoutePortListResultPage{fn: getNextPage}
-}
-
-// ExpressRoutePortPropertiesFormat properties specific to ExpressRoutePort resources.
-type ExpressRoutePortPropertiesFormat struct {
- // PeeringLocation - The name of the peering location that the ExpressRoutePort is mapped to physically.
- PeeringLocation *string `json:"peeringLocation,omitempty"`
- // BandwidthInGbps - Bandwidth of procured ports in Gbps
- BandwidthInGbps *int32 `json:"bandwidthInGbps,omitempty"`
- // ProvisionedBandwidthInGbps - READ-ONLY; Aggregate Gbps of associated circuit bandwidths.
- ProvisionedBandwidthInGbps *float64 `json:"provisionedBandwidthInGbps,omitempty"`
- // Mtu - READ-ONLY; Maximum transmission unit of the physical port pair(s)
- Mtu *string `json:"mtu,omitempty"`
- // Encapsulation - Encapsulation method on physical ports. Possible values include: 'Dot1Q', 'QinQ'
- Encapsulation ExpressRoutePortsEncapsulation `json:"encapsulation,omitempty"`
- // EtherType - READ-ONLY; Ether type of the physical port.
- EtherType *string `json:"etherType,omitempty"`
- // AllocationDate - READ-ONLY; Date of the physical port allocation to be used in Letter of Authorization.
- AllocationDate *string `json:"allocationDate,omitempty"`
- // Links - The set of physical links of the ExpressRoutePort resource
- Links *[]ExpressRouteLink `json:"links,omitempty"`
- // Circuits - READ-ONLY; Reference the ExpressRoute circuit(s) that are provisioned on this ExpressRoutePort resource.
- Circuits *[]SubResource `json:"circuits,omitempty"`
- // ProvisioningState - READ-ONLY; The provisioning state of the ExpressRoutePort resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'.
- ProvisioningState *string `json:"provisioningState,omitempty"`
- // ResourceGUID - The resource GUID property of the ExpressRoutePort resource.
- ResourceGUID *string `json:"resourceGuid,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for ExpressRoutePortPropertiesFormat.
-func (erppf ExpressRoutePortPropertiesFormat) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if erppf.PeeringLocation != nil {
- objectMap["peeringLocation"] = erppf.PeeringLocation
- }
- if erppf.BandwidthInGbps != nil {
- objectMap["bandwidthInGbps"] = erppf.BandwidthInGbps
- }
- if erppf.Encapsulation != "" {
- objectMap["encapsulation"] = erppf.Encapsulation
- }
- if erppf.Links != nil {
- objectMap["links"] = erppf.Links
- }
- if erppf.ResourceGUID != nil {
- objectMap["resourceGuid"] = erppf.ResourceGUID
- }
- return json.Marshal(objectMap)
-}
-
-// ExpressRoutePortsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
-// long-running operation.
-type ExpressRoutePortsCreateOrUpdateFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *ExpressRoutePortsCreateOrUpdateFuture) Result(client ExpressRoutePortsClient) (erp ExpressRoutePort, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.ExpressRoutePortsCreateOrUpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if erp.Response.Response, err = future.GetResult(sender); err == nil && erp.Response.Response.StatusCode != http.StatusNoContent {
- erp, err = client.CreateOrUpdateResponder(erp.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsCreateOrUpdateFuture", "Result", erp.Response.Response, "Failure responding to request")
- }
- }
- return
-}
-
-// ExpressRoutePortsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
-type ExpressRoutePortsDeleteFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *ExpressRoutePortsDeleteFuture) Result(client ExpressRoutePortsClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsDeleteFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.ExpressRoutePortsDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
-}
-
-// ExpressRoutePortsLocation definition of the ExpressRoutePorts peering location resource.
-type ExpressRoutePortsLocation struct {
- autorest.Response `json:"-"`
- // ExpressRoutePortsLocationPropertiesFormat - ExpressRoutePort peering location properties
- *ExpressRoutePortsLocationPropertiesFormat `json:"properties,omitempty"`
- // ID - 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 ExpressRoutePortsLocation.
-func (erpl ExpressRoutePortsLocation) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if erpl.ExpressRoutePortsLocationPropertiesFormat != nil {
- objectMap["properties"] = erpl.ExpressRoutePortsLocationPropertiesFormat
- }
- if erpl.ID != nil {
- objectMap["id"] = erpl.ID
- }
- if erpl.Location != nil {
- objectMap["location"] = erpl.Location
- }
- if erpl.Tags != nil {
- objectMap["tags"] = erpl.Tags
- }
- return json.Marshal(objectMap)
-}
-
-// UnmarshalJSON is the custom unmarshaler for ExpressRoutePortsLocation struct.
-func (erpl *ExpressRoutePortsLocation) 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 expressRoutePortsLocationPropertiesFormat ExpressRoutePortsLocationPropertiesFormat
- err = json.Unmarshal(*v, &expressRoutePortsLocationPropertiesFormat)
- if err != nil {
- return err
- }
- erpl.ExpressRoutePortsLocationPropertiesFormat = &expressRoutePortsLocationPropertiesFormat
- }
- case "id":
- if v != nil {
- var ID string
- err = json.Unmarshal(*v, &ID)
- if err != nil {
- return err
- }
- erpl.ID = &ID
- }
- case "name":
- if v != nil {
- var name string
- err = json.Unmarshal(*v, &name)
- if err != nil {
- return err
- }
- erpl.Name = &name
- }
- case "type":
- if v != nil {
- var typeVar string
- err = json.Unmarshal(*v, &typeVar)
- if err != nil {
- return err
- }
- erpl.Type = &typeVar
- }
- case "location":
- if v != nil {
- var location string
- err = json.Unmarshal(*v, &location)
- if err != nil {
- return err
- }
- erpl.Location = &location
- }
- case "tags":
- if v != nil {
- var tags map[string]*string
- err = json.Unmarshal(*v, &tags)
- if err != nil {
- return err
- }
- erpl.Tags = tags
- }
- }
- }
-
- return nil
-}
-
-// ExpressRoutePortsLocationBandwidths real-time inventory of available ExpressRoute port bandwidths.
-type ExpressRoutePortsLocationBandwidths struct {
- // OfferName - READ-ONLY; Bandwidth descriptive name
- OfferName *string `json:"offerName,omitempty"`
- // ValueInGbps - READ-ONLY; Bandwidth value in Gbps
- ValueInGbps *int32 `json:"valueInGbps,omitempty"`
-}
-
-// ExpressRoutePortsLocationListResult response for ListExpressRoutePortsLocations API service call.
-type ExpressRoutePortsLocationListResult struct {
- autorest.Response `json:"-"`
- // Value - The list of all ExpressRoutePort peering locations.
- Value *[]ExpressRoutePortsLocation `json:"value,omitempty"`
- // NextLink - The URL to get the next set of results.
- NextLink *string `json:"nextLink,omitempty"`
-}
-
-// ExpressRoutePortsLocationListResultIterator provides access to a complete listing of
-// ExpressRoutePortsLocation values.
-type ExpressRoutePortsLocationListResultIterator struct {
- i int
- page ExpressRoutePortsLocationListResultPage
-}
-
-// 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 *ExpressRoutePortsLocationListResultIterator) NextWithContext(ctx context.Context) (err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortsLocationListResultIterator.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 *ExpressRoutePortsLocationListResultIterator) Next() error {
- return iter.NextWithContext(context.Background())
-}
-
-// NotDone returns true if the enumeration should be started or is not yet complete.
-func (iter ExpressRoutePortsLocationListResultIterator) 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 ExpressRoutePortsLocationListResultIterator) Response() ExpressRoutePortsLocationListResult {
- 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 ExpressRoutePortsLocationListResultIterator) Value() ExpressRoutePortsLocation {
- if !iter.page.NotDone() {
- return ExpressRoutePortsLocation{}
- }
- return iter.page.Values()[iter.i]
-}
-
-// Creates a new instance of the ExpressRoutePortsLocationListResultIterator type.
-func NewExpressRoutePortsLocationListResultIterator(page ExpressRoutePortsLocationListResultPage) ExpressRoutePortsLocationListResultIterator {
- return ExpressRoutePortsLocationListResultIterator{page: page}
-}
-
-// IsEmpty returns true if the ListResult contains no values.
-func (erpllr ExpressRoutePortsLocationListResult) IsEmpty() bool {
- return erpllr.Value == nil || len(*erpllr.Value) == 0
-}
-
-// hasNextLink returns true if the NextLink is not empty.
-func (erpllr ExpressRoutePortsLocationListResult) hasNextLink() bool {
- return erpllr.NextLink != nil && len(*erpllr.NextLink) != 0
-}
-
-// expressRoutePortsLocationListResultPreparer prepares a request to retrieve the next set of results.
-// It returns nil if no more results exist.
-func (erpllr ExpressRoutePortsLocationListResult) expressRoutePortsLocationListResultPreparer(ctx context.Context) (*http.Request, error) {
- if !erpllr.hasNextLink() {
- return nil, nil
- }
- return autorest.Prepare((&http.Request{}).WithContext(ctx),
- autorest.AsJSON(),
- autorest.AsGet(),
- autorest.WithBaseURL(to.String(erpllr.NextLink)))
-}
-
-// ExpressRoutePortsLocationListResultPage contains a page of ExpressRoutePortsLocation values.
-type ExpressRoutePortsLocationListResultPage struct {
- fn func(context.Context, ExpressRoutePortsLocationListResult) (ExpressRoutePortsLocationListResult, error)
- erpllr ExpressRoutePortsLocationListResult
-}
-
-// 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 *ExpressRoutePortsLocationListResultPage) NextWithContext(ctx context.Context) (err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortsLocationListResultPage.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.erpllr)
- if err != nil {
- return err
- }
- page.erpllr = 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 *ExpressRoutePortsLocationListResultPage) Next() error {
- return page.NextWithContext(context.Background())
-}
-
-// NotDone returns true if the page enumeration should be started or is not yet complete.
-func (page ExpressRoutePortsLocationListResultPage) NotDone() bool {
- return !page.erpllr.IsEmpty()
-}
-
-// Response returns the raw server response from the last page request.
-func (page ExpressRoutePortsLocationListResultPage) Response() ExpressRoutePortsLocationListResult {
- return page.erpllr
-}
-
-// Values returns the slice of values for the current page or nil if there are no values.
-func (page ExpressRoutePortsLocationListResultPage) Values() []ExpressRoutePortsLocation {
- if page.erpllr.IsEmpty() {
- return nil
- }
- return *page.erpllr.Value
-}
-
-// Creates a new instance of the ExpressRoutePortsLocationListResultPage type.
-func NewExpressRoutePortsLocationListResultPage(getNextPage func(context.Context, ExpressRoutePortsLocationListResult) (ExpressRoutePortsLocationListResult, error)) ExpressRoutePortsLocationListResultPage {
- return ExpressRoutePortsLocationListResultPage{fn: getNextPage}
-}
-
-// ExpressRoutePortsLocationPropertiesFormat properties specific to ExpressRoutePorts peering location
-// resources.
-type ExpressRoutePortsLocationPropertiesFormat struct {
- // Address - READ-ONLY; Address of peering location.
- Address *string `json:"address,omitempty"`
- // Contact - READ-ONLY; Contact details of peering locations.
- Contact *string `json:"contact,omitempty"`
- // AvailableBandwidths - The inventory of available ExpressRoutePort bandwidths.
- AvailableBandwidths *[]ExpressRoutePortsLocationBandwidths `json:"availableBandwidths,omitempty"`
- // ProvisioningState - READ-ONLY; The provisioning state of the ExpressRoutePortLocation resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'.
- ProvisioningState *string `json:"provisioningState,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for ExpressRoutePortsLocationPropertiesFormat.
-func (erplpf ExpressRoutePortsLocationPropertiesFormat) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if erplpf.AvailableBandwidths != nil {
- objectMap["availableBandwidths"] = erplpf.AvailableBandwidths
- }
- return json.Marshal(objectMap)
-}
-
-// ExpressRoutePortsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
-type ExpressRoutePortsUpdateTagsFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *ExpressRoutePortsUpdateTagsFuture) Result(client ExpressRoutePortsClient) (erp ExpressRoutePort, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsUpdateTagsFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.ExpressRoutePortsUpdateTagsFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if erp.Response.Response, err = future.GetResult(sender); err == nil && erp.Response.Response.StatusCode != http.StatusNoContent {
- erp, err = client.UpdateTagsResponder(erp.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsUpdateTagsFuture", "Result", erp.Response.Response, "Failure responding to request")
- }
- }
- return
-}
-
-// ExpressRouteServiceProvider a ExpressRouteResourceProvider object.
-type ExpressRouteServiceProvider struct {
- *ExpressRouteServiceProviderPropertiesFormat `json:"properties,omitempty"`
- // ID - 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 ExpressRouteServiceProvider.
-func (ersp ExpressRouteServiceProvider) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if ersp.ExpressRouteServiceProviderPropertiesFormat != nil {
- objectMap["properties"] = ersp.ExpressRouteServiceProviderPropertiesFormat
- }
- if ersp.ID != nil {
- objectMap["id"] = ersp.ID
- }
- if ersp.Location != nil {
- objectMap["location"] = ersp.Location
- }
- if ersp.Tags != nil {
- objectMap["tags"] = ersp.Tags
- }
- return json.Marshal(objectMap)
-}
-
-// UnmarshalJSON is the custom unmarshaler for ExpressRouteServiceProvider struct.
-func (ersp *ExpressRouteServiceProvider) 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 expressRouteServiceProviderPropertiesFormat ExpressRouteServiceProviderPropertiesFormat
- err = json.Unmarshal(*v, &expressRouteServiceProviderPropertiesFormat)
- if err != nil {
- return err
- }
- ersp.ExpressRouteServiceProviderPropertiesFormat = &expressRouteServiceProviderPropertiesFormat
- }
- case "id":
- if v != nil {
- var ID string
- err = json.Unmarshal(*v, &ID)
- if err != nil {
- return err
- }
- ersp.ID = &ID
- }
- case "name":
- if v != nil {
- var name string
- err = json.Unmarshal(*v, &name)
- if err != nil {
- return err
- }
- ersp.Name = &name
- }
- case "type":
- if v != nil {
- var typeVar string
- err = json.Unmarshal(*v, &typeVar)
- if err != nil {
- return err
- }
- ersp.Type = &typeVar
- }
- case "location":
- if v != nil {
- var location string
- err = json.Unmarshal(*v, &location)
- if err != nil {
- return err
- }
- ersp.Location = &location
- }
- case "tags":
- if v != nil {
- var tags map[string]*string
- err = json.Unmarshal(*v, &tags)
- if err != nil {
- return err
- }
- ersp.Tags = tags
- }
- }
- }
-
- return nil
-}
-
-// ExpressRouteServiceProviderBandwidthsOffered contains bandwidths offered in ExpressRouteServiceProvider
-// resources.
-type ExpressRouteServiceProviderBandwidthsOffered struct {
- // OfferName - The OfferName.
- OfferName *string `json:"offerName,omitempty"`
- // ValueInMbps - The ValueInMbps.
- ValueInMbps *int32 `json:"valueInMbps,omitempty"`
-}
-
-// ExpressRouteServiceProviderListResult response for the ListExpressRouteServiceProvider API service call.
-type ExpressRouteServiceProviderListResult struct {
- autorest.Response `json:"-"`
- // Value - A list of ExpressRouteResourceProvider resources.
- Value *[]ExpressRouteServiceProvider `json:"value,omitempty"`
- // NextLink - The URL to get the next set of results.
- NextLink *string `json:"nextLink,omitempty"`
-}
-
-// ExpressRouteServiceProviderListResultIterator provides access to a complete listing of
-// ExpressRouteServiceProvider values.
-type ExpressRouteServiceProviderListResultIterator struct {
- i int
- page ExpressRouteServiceProviderListResultPage
-}
-
-// 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 *ExpressRouteServiceProviderListResultIterator) NextWithContext(ctx context.Context) (err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteServiceProviderListResultIterator.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 *ExpressRouteServiceProviderListResultIterator) Next() error {
- return iter.NextWithContext(context.Background())
-}
-
-// NotDone returns true if the enumeration should be started or is not yet complete.
-func (iter ExpressRouteServiceProviderListResultIterator) 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 ExpressRouteServiceProviderListResultIterator) Response() ExpressRouteServiceProviderListResult {
- 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 ExpressRouteServiceProviderListResultIterator) Value() ExpressRouteServiceProvider {
- if !iter.page.NotDone() {
- return ExpressRouteServiceProvider{}
- }
- return iter.page.Values()[iter.i]
-}
-
-// Creates a new instance of the ExpressRouteServiceProviderListResultIterator type.
-func NewExpressRouteServiceProviderListResultIterator(page ExpressRouteServiceProviderListResultPage) ExpressRouteServiceProviderListResultIterator {
- return ExpressRouteServiceProviderListResultIterator{page: page}
-}
-
-// IsEmpty returns true if the ListResult contains no values.
-func (ersplr ExpressRouteServiceProviderListResult) IsEmpty() bool {
- return ersplr.Value == nil || len(*ersplr.Value) == 0
-}
-
-// hasNextLink returns true if the NextLink is not empty.
-func (ersplr ExpressRouteServiceProviderListResult) hasNextLink() bool {
- return ersplr.NextLink != nil && len(*ersplr.NextLink) != 0
-}
-
-// expressRouteServiceProviderListResultPreparer prepares a request to retrieve the next set of results.
-// It returns nil if no more results exist.
-func (ersplr ExpressRouteServiceProviderListResult) expressRouteServiceProviderListResultPreparer(ctx context.Context) (*http.Request, error) {
- if !ersplr.hasNextLink() {
- return nil, nil
- }
- return autorest.Prepare((&http.Request{}).WithContext(ctx),
- autorest.AsJSON(),
- autorest.AsGet(),
- autorest.WithBaseURL(to.String(ersplr.NextLink)))
-}
-
-// ExpressRouteServiceProviderListResultPage contains a page of ExpressRouteServiceProvider values.
-type ExpressRouteServiceProviderListResultPage struct {
- fn func(context.Context, ExpressRouteServiceProviderListResult) (ExpressRouteServiceProviderListResult, error)
- ersplr ExpressRouteServiceProviderListResult
-}
-
-// 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 *ExpressRouteServiceProviderListResultPage) NextWithContext(ctx context.Context) (err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteServiceProviderListResultPage.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.ersplr)
- if err != nil {
- return err
- }
- page.ersplr = 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 *ExpressRouteServiceProviderListResultPage) Next() error {
- return page.NextWithContext(context.Background())
-}
-
-// NotDone returns true if the page enumeration should be started or is not yet complete.
-func (page ExpressRouteServiceProviderListResultPage) NotDone() bool {
- return !page.ersplr.IsEmpty()
-}
-
-// Response returns the raw server response from the last page request.
-func (page ExpressRouteServiceProviderListResultPage) Response() ExpressRouteServiceProviderListResult {
- return page.ersplr
-}
-
-// Values returns the slice of values for the current page or nil if there are no values.
-func (page ExpressRouteServiceProviderListResultPage) Values() []ExpressRouteServiceProvider {
- if page.ersplr.IsEmpty() {
- return nil
- }
- return *page.ersplr.Value
-}
-
-// Creates a new instance of the ExpressRouteServiceProviderListResultPage type.
-func NewExpressRouteServiceProviderListResultPage(getNextPage func(context.Context, ExpressRouteServiceProviderListResult) (ExpressRouteServiceProviderListResult, error)) ExpressRouteServiceProviderListResultPage {
- return ExpressRouteServiceProviderListResultPage{fn: getNextPage}
-}
-
-// ExpressRouteServiceProviderPropertiesFormat properties of ExpressRouteServiceProvider.
-type ExpressRouteServiceProviderPropertiesFormat struct {
- // PeeringLocations - Get a list of peering locations.
- PeeringLocations *[]string `json:"peeringLocations,omitempty"`
- // BandwidthsOffered - Gets bandwidths offered.
- BandwidthsOffered *[]ExpressRouteServiceProviderBandwidthsOffered `json:"bandwidthsOffered,omitempty"`
- // ProvisioningState - Gets the provisioning state of the resource.
- ProvisioningState *string `json:"provisioningState,omitempty"`
-}
-
-// FlowLogFormatParameters parameters that define the flow log format.
-type FlowLogFormatParameters struct {
- // Type - The file type of flow log. Possible values include: 'JSON'
- Type FlowLogFormatType `json:"type,omitempty"`
- // Version - The version (revision) of the flow log.
- Version *int32 `json:"version,omitempty"`
-}
-
-// FlowLogInformation information on the configuration of flow log and traffic analytics (optional) .
-type FlowLogInformation struct {
- autorest.Response `json:"-"`
- // TargetResourceID - The ID of the resource to configure for flow log and traffic analytics (optional) .
- TargetResourceID *string `json:"targetResourceId,omitempty"`
- *FlowLogProperties `json:"properties,omitempty"`
- FlowAnalyticsConfiguration *TrafficAnalyticsProperties `json:"flowAnalyticsConfiguration,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for FlowLogInformation.
-func (fli FlowLogInformation) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if fli.TargetResourceID != nil {
- objectMap["targetResourceId"] = fli.TargetResourceID
- }
- if fli.FlowLogProperties != nil {
- objectMap["properties"] = fli.FlowLogProperties
- }
- if fli.FlowAnalyticsConfiguration != nil {
- objectMap["flowAnalyticsConfiguration"] = fli.FlowAnalyticsConfiguration
- }
- return json.Marshal(objectMap)
-}
-
-// UnmarshalJSON is the custom unmarshaler for FlowLogInformation struct.
-func (fli *FlowLogInformation) 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 "targetResourceId":
- if v != nil {
- var targetResourceID string
- err = json.Unmarshal(*v, &targetResourceID)
- if err != nil {
- return err
- }
- fli.TargetResourceID = &targetResourceID
- }
- case "properties":
- if v != nil {
- var flowLogProperties FlowLogProperties
- err = json.Unmarshal(*v, &flowLogProperties)
- if err != nil {
- return err
- }
- fli.FlowLogProperties = &flowLogProperties
- }
- case "flowAnalyticsConfiguration":
- if v != nil {
- var flowAnalyticsConfiguration TrafficAnalyticsProperties
- err = json.Unmarshal(*v, &flowAnalyticsConfiguration)
- if err != nil {
- return err
- }
- fli.FlowAnalyticsConfiguration = &flowAnalyticsConfiguration
- }
- }
- }
-
- return nil
-}
-
-// FlowLogProperties parameters that define the configuration of flow log.
-type FlowLogProperties struct {
- // StorageID - ID of the storage account which is used to store the flow log.
- StorageID *string `json:"storageId,omitempty"`
- // Enabled - Flag to enable/disable flow logging.
- Enabled *bool `json:"enabled,omitempty"`
- RetentionPolicy *RetentionPolicyParameters `json:"retentionPolicy,omitempty"`
- Format *FlowLogFormatParameters `json:"format,omitempty"`
-}
-
-// FlowLogStatusParameters parameters that define a resource to query flow log and traffic analytics (optional)
-// status.
-type FlowLogStatusParameters struct {
- // TargetResourceID - The target resource where getting the flow log and traffic analytics (optional) status.
- TargetResourceID *string `json:"targetResourceId,omitempty"`
-}
-
-// FrontendIPConfiguration frontend IP address of the load balancer.
-type FrontendIPConfiguration struct {
- autorest.Response `json:"-"`
- // FrontendIPConfigurationPropertiesFormat - Properties of the load balancer probe.
- *FrontendIPConfigurationPropertiesFormat `json:"properties,omitempty"`
- // Name - 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"`
- // Etag - A unique read-only string that changes whenever the resource is updated.
- Etag *string `json:"etag,omitempty"`
- // Zones - A list of availability zones denoting the IP allocated for the resource needs to come from.
- Zones *[]string `json:"zones,omitempty"`
- // ID - Resource ID.
- ID *string `json:"id,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for FrontendIPConfiguration.
-func (fic FrontendIPConfiguration) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if fic.FrontendIPConfigurationPropertiesFormat != nil {
- objectMap["properties"] = fic.FrontendIPConfigurationPropertiesFormat
- }
- if fic.Name != nil {
- objectMap["name"] = fic.Name
- }
- if fic.Etag != nil {
- objectMap["etag"] = fic.Etag
- }
- if fic.Zones != nil {
- objectMap["zones"] = fic.Zones
- }
- if fic.ID != nil {
- objectMap["id"] = fic.ID
- }
- return json.Marshal(objectMap)
-}
-
-// UnmarshalJSON is the custom unmarshaler for FrontendIPConfiguration struct.
-func (fic *FrontendIPConfiguration) 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 frontendIPConfigurationPropertiesFormat FrontendIPConfigurationPropertiesFormat
- err = json.Unmarshal(*v, &frontendIPConfigurationPropertiesFormat)
- if err != nil {
- return err
- }
- fic.FrontendIPConfigurationPropertiesFormat = &frontendIPConfigurationPropertiesFormat
- }
- case "name":
- if v != nil {
- var name string
- err = json.Unmarshal(*v, &name)
- if err != nil {
- return err
- }
- fic.Name = &name
- }
- case "etag":
- if v != nil {
- var etag string
- err = json.Unmarshal(*v, &etag)
- if err != nil {
- return err
- }
- fic.Etag = &etag
- }
- case "zones":
- if v != nil {
- var zones []string
- err = json.Unmarshal(*v, &zones)
- if err != nil {
- return err
- }
- fic.Zones = &zones
- }
- case "id":
- if v != nil {
- var ID string
- err = json.Unmarshal(*v, &ID)
- if err != nil {
- return err
- }
- fic.ID = &ID
- }
- }
- }
-
- return nil
-}
-
-// FrontendIPConfigurationPropertiesFormat properties of Frontend IP Configuration of the load balancer.
-type FrontendIPConfigurationPropertiesFormat struct {
- // InboundNatRules - READ-ONLY; Read only. Inbound rules URIs that use this frontend IP.
- InboundNatRules *[]SubResource `json:"inboundNatRules,omitempty"`
- // InboundNatPools - READ-ONLY; Read only. Inbound pools URIs that use this frontend IP.
- InboundNatPools *[]SubResource `json:"inboundNatPools,omitempty"`
- // OutboundRules - READ-ONLY; Read only. Outbound rules URIs that use this frontend IP.
- OutboundRules *[]SubResource `json:"outboundRules,omitempty"`
- // LoadBalancingRules - READ-ONLY; Gets load balancing rules URIs that use this frontend IP.
- LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"`
- // PrivateIPAddress - The private IP address of the IP configuration.
- PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
- // PrivateIPAllocationMethod - The Private IP allocation method. Possible values are: 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic'
- PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
- // Subnet - The reference of the subnet resource.
- Subnet *Subnet `json:"subnet,omitempty"`
- // PublicIPAddress - The reference of the Public IP resource.
- PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"`
- // PublicIPPrefix - The reference of the Public IP Prefix resource.
- PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"`
- // ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
- ProvisioningState *string `json:"provisioningState,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for FrontendIPConfigurationPropertiesFormat.
-func (ficpf FrontendIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if ficpf.PrivateIPAddress != nil {
- objectMap["privateIPAddress"] = ficpf.PrivateIPAddress
- }
- if ficpf.PrivateIPAllocationMethod != "" {
- objectMap["privateIPAllocationMethod"] = ficpf.PrivateIPAllocationMethod
- }
- if ficpf.Subnet != nil {
- objectMap["subnet"] = ficpf.Subnet
- }
- if ficpf.PublicIPAddress != nil {
- objectMap["publicIPAddress"] = ficpf.PublicIPAddress
- }
- if ficpf.PublicIPPrefix != nil {
- objectMap["publicIPPrefix"] = ficpf.PublicIPPrefix
- }
- if ficpf.ProvisioningState != nil {
- objectMap["provisioningState"] = ficpf.ProvisioningState
- }
- return json.Marshal(objectMap)
-}
-
-// GatewayRoute gateway routing details
-type GatewayRoute struct {
- // LocalAddress - READ-ONLY; The gateway's local address
- LocalAddress *string `json:"localAddress,omitempty"`
- // NetworkProperty - READ-ONLY; The route's network prefix
- NetworkProperty *string `json:"network,omitempty"`
- // NextHop - READ-ONLY; The route's next hop
- NextHop *string `json:"nextHop,omitempty"`
- // SourcePeer - READ-ONLY; The peer this route was learned from
- SourcePeer *string `json:"sourcePeer,omitempty"`
- // Origin - READ-ONLY; The source this route was learned from
- Origin *string `json:"origin,omitempty"`
- // AsPath - READ-ONLY; The route's AS path sequence
- AsPath *string `json:"asPath,omitempty"`
- // Weight - READ-ONLY; The route's weight
- Weight *int32 `json:"weight,omitempty"`
-}
-
-// GatewayRouteListResult list of virtual network gateway routes
-type GatewayRouteListResult struct {
- autorest.Response `json:"-"`
- // Value - List of gateway routes
- Value *[]GatewayRoute `json:"value,omitempty"`
-}
-
-// GetVpnSitesConfigurationRequest list of Vpn-Sites
-type GetVpnSitesConfigurationRequest struct {
- // VpnSites - List of resource-ids of the vpn-sites for which config is to be downloaded.
- VpnSites *[]string `json:"vpnSites,omitempty"`
- // OutputBlobSasURL - The sas-url to download the configurations for vpn-sites
- OutputBlobSasURL *string `json:"outputBlobSasUrl,omitempty"`
-}
-
-// HTTPConfiguration HTTP configuration of the connectivity check.
-type HTTPConfiguration struct {
- // Method - HTTP method. Possible values include: 'Get'
- Method HTTPMethod `json:"method,omitempty"`
- // Headers - List of HTTP headers.
- Headers *[]HTTPHeader `json:"headers,omitempty"`
- // ValidStatusCodes - Valid status codes.
- ValidStatusCodes *[]int32 `json:"validStatusCodes,omitempty"`
-}
-
-// HTTPHeader describes the HTTP header.
-type HTTPHeader struct {
- // Name - The name in HTTP header.
- Name *string `json:"name,omitempty"`
- // Value - The value in HTTP header.
- Value *string `json:"value,omitempty"`
-}
-
-// HubVirtualNetworkConnection hubVirtualNetworkConnection Resource.
-type HubVirtualNetworkConnection struct {
- autorest.Response `json:"-"`
- *HubVirtualNetworkConnectionProperties `json:"properties,omitempty"`
- // Name - 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"`
- // Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
- Etag *string `json:"etag,omitempty"`
- // ID - Resource ID.
- ID *string `json:"id,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for HubVirtualNetworkConnection.
-func (hvnc HubVirtualNetworkConnection) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if hvnc.HubVirtualNetworkConnectionProperties != nil {
- objectMap["properties"] = hvnc.HubVirtualNetworkConnectionProperties
- }
- if hvnc.Name != nil {
- objectMap["name"] = hvnc.Name
- }
- if hvnc.ID != nil {
- objectMap["id"] = hvnc.ID
- }
- return json.Marshal(objectMap)
-}
-
-// UnmarshalJSON is the custom unmarshaler for HubVirtualNetworkConnection struct.
-func (hvnc *HubVirtualNetworkConnection) 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 hubVirtualNetworkConnectionProperties HubVirtualNetworkConnectionProperties
- err = json.Unmarshal(*v, &hubVirtualNetworkConnectionProperties)
- if err != nil {
- return err
- }
- hvnc.HubVirtualNetworkConnectionProperties = &hubVirtualNetworkConnectionProperties
- }
- case "name":
- if v != nil {
- var name string
- err = json.Unmarshal(*v, &name)
- if err != nil {
- return err
- }
- hvnc.Name = &name
- }
- case "etag":
- if v != nil {
- var etag string
- err = json.Unmarshal(*v, &etag)
- if err != nil {
- return err
- }
- hvnc.Etag = &etag
- }
- case "id":
- if v != nil {
- var ID string
- err = json.Unmarshal(*v, &ID)
- if err != nil {
- return err
- }
- hvnc.ID = &ID
- }
- }
- }
-
- return nil
-}
-
-// HubVirtualNetworkConnectionProperties parameters for HubVirtualNetworkConnection
-type HubVirtualNetworkConnectionProperties struct {
- // RemoteVirtualNetwork - Reference to the remote virtual network.
- RemoteVirtualNetwork *SubResource `json:"remoteVirtualNetwork,omitempty"`
- // AllowHubToRemoteVnetTransit - VirtualHub to RemoteVnet transit to enabled or not.
- AllowHubToRemoteVnetTransit *bool `json:"allowHubToRemoteVnetTransit,omitempty"`
- // AllowRemoteVnetToUseHubVnetGateways - Allow RemoteVnet to use Virtual Hub's gateways.
- AllowRemoteVnetToUseHubVnetGateways *bool `json:"allowRemoteVnetToUseHubVnetGateways,omitempty"`
- // EnableInternetSecurity - Enable internet security
- EnableInternetSecurity *bool `json:"enableInternetSecurity,omitempty"`
- // ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
- ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
-}
-
-// InboundNatPool inbound NAT pool of the load balancer.
-type InboundNatPool struct {
- // InboundNatPoolPropertiesFormat - Properties of load balancer inbound nat pool.
- *InboundNatPoolPropertiesFormat `json:"properties,omitempty"`
- // Name - 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"`
- // Etag - A unique read-only string that changes whenever the resource is updated.
- Etag *string `json:"etag,omitempty"`
- // ID - Resource ID.
- ID *string `json:"id,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for InboundNatPool.
-func (inp InboundNatPool) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if inp.InboundNatPoolPropertiesFormat != nil {
- objectMap["properties"] = inp.InboundNatPoolPropertiesFormat
- }
- if inp.Name != nil {
- objectMap["name"] = inp.Name
- }
- if inp.Etag != nil {
- objectMap["etag"] = inp.Etag
- }
- if inp.ID != nil {
- objectMap["id"] = inp.ID
- }
- return json.Marshal(objectMap)
-}
-
-// UnmarshalJSON is the custom unmarshaler for InboundNatPool struct.
-func (inp *InboundNatPool) 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 inboundNatPoolPropertiesFormat InboundNatPoolPropertiesFormat
- err = json.Unmarshal(*v, &inboundNatPoolPropertiesFormat)
- if err != nil {
- return err
- }
- inp.InboundNatPoolPropertiesFormat = &inboundNatPoolPropertiesFormat
- }
- case "name":
- if v != nil {
- var name string
- err = json.Unmarshal(*v, &name)
- if err != nil {
- return err
- }
- inp.Name = &name
- }
- case "etag":
- if v != nil {
- var etag string
- err = json.Unmarshal(*v, &etag)
- if err != nil {
- return err
- }
- inp.Etag = &etag
- }
- case "id":
- if v != nil {
- var ID string
- err = json.Unmarshal(*v, &ID)
- if err != nil {
- return err
- }
- inp.ID = &ID
- }
- }
- }
-
- return nil
-}
-
-// InboundNatPoolPropertiesFormat properties of Inbound NAT pool.
-type InboundNatPoolPropertiesFormat struct {
- // FrontendIPConfiguration - A reference to frontend IP addresses.
- FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"`
- // Protocol - Possible values include: 'TransportProtocolUDP', 'TransportProtocolTCP', 'TransportProtocolAll'
- Protocol TransportProtocol `json:"protocol,omitempty"`
- // FrontendPortRangeStart - The first port number in the range of external ports that will be used to provide Inbound Nat to NICs associated with a load balancer. Acceptable values range between 1 and 65534.
- FrontendPortRangeStart *int32 `json:"frontendPortRangeStart,omitempty"`
- // FrontendPortRangeEnd - The last port number in the range of external ports that will be used to provide Inbound Nat to NICs associated with a load balancer. Acceptable values range between 1 and 65535.
- FrontendPortRangeEnd *int32 `json:"frontendPortRangeEnd,omitempty"`
- // BackendPort - The port used for internal connections on the endpoint. Acceptable values are between 1 and 65535.
- BackendPort *int32 `json:"backendPort,omitempty"`
- // IdleTimeoutInMinutes - The timeout for the TCP idle connection. The value can be set between 4 and 30 minutes. The default value is 4 minutes. This element is only used when the protocol is set to TCP.
- IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
- // EnableFloatingIP - Configures a virtual machine's endpoint for the floating IP capability required to configure a SQL AlwaysOn Availability Group. This setting is required when using the SQL AlwaysOn Availability Groups in SQL server. This setting can't be changed after you create the endpoint.
- EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"`
- // EnableTCPReset - Receive bidirectional TCP Reset on TCP flow idle timeout or unexpected connection termination. This element is only used when the protocol is set to TCP.
- EnableTCPReset *bool `json:"enableTcpReset,omitempty"`
- // ProvisioningState - Gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
- ProvisioningState *string `json:"provisioningState,omitempty"`
-}
-
-// InboundNatRule inbound NAT rule of the load balancer.
-type InboundNatRule struct {
- autorest.Response `json:"-"`
- // InboundNatRulePropertiesFormat - Properties of load balancer inbound nat rule.
- *InboundNatRulePropertiesFormat `json:"properties,omitempty"`
- // Name - Gets 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"`
- // Etag - A unique read-only string that changes whenever the resource is updated.
- Etag *string `json:"etag,omitempty"`
- // ID - Resource ID.
- ID *string `json:"id,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for InboundNatRule.
-func (inr InboundNatRule) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if inr.InboundNatRulePropertiesFormat != nil {
- objectMap["properties"] = inr.InboundNatRulePropertiesFormat
- }
- if inr.Name != nil {
- objectMap["name"] = inr.Name
- }
- if inr.Etag != nil {
- objectMap["etag"] = inr.Etag
- }
- if inr.ID != nil {
- objectMap["id"] = inr.ID
- }
- return json.Marshal(objectMap)
-}
-
-// UnmarshalJSON is the custom unmarshaler for InboundNatRule struct.
-func (inr *InboundNatRule) 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 inboundNatRulePropertiesFormat InboundNatRulePropertiesFormat
- err = json.Unmarshal(*v, &inboundNatRulePropertiesFormat)
- if err != nil {
- return err
- }
- inr.InboundNatRulePropertiesFormat = &inboundNatRulePropertiesFormat
- }
- case "name":
- if v != nil {
- var name string
- err = json.Unmarshal(*v, &name)
- if err != nil {
- return err
- }
- inr.Name = &name
- }
- case "etag":
- if v != nil {
- var etag string
- err = json.Unmarshal(*v, &etag)
- if err != nil {
- return err
- }
- inr.Etag = &etag
- }
- case "id":
- if v != nil {
- var ID string
- err = json.Unmarshal(*v, &ID)
- if err != nil {
- return err
- }
- inr.ID = &ID
- }
- }
- }
-
- return nil
-}
-
-// InboundNatRuleListResult response for ListInboundNatRule API service call.
-type InboundNatRuleListResult struct {
- autorest.Response `json:"-"`
- // Value - A list of inbound nat rules in a load balancer.
- Value *[]InboundNatRule `json:"value,omitempty"`
- // NextLink - READ-ONLY; The URL to get the next set of results.
- NextLink *string `json:"nextLink,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for InboundNatRuleListResult.
-func (inrlr InboundNatRuleListResult) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if inrlr.Value != nil {
- objectMap["value"] = inrlr.Value
- }
- return json.Marshal(objectMap)
-}
-
-// InboundNatRuleListResultIterator provides access to a complete listing of InboundNatRule values.
-type InboundNatRuleListResultIterator struct {
- i int
- page InboundNatRuleListResultPage
-}
-
-// 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 *InboundNatRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/InboundNatRuleListResultIterator.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 *InboundNatRuleListResultIterator) Next() error {
- return iter.NextWithContext(context.Background())
-}
-
-// NotDone returns true if the enumeration should be started or is not yet complete.
-func (iter InboundNatRuleListResultIterator) 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 InboundNatRuleListResultIterator) Response() InboundNatRuleListResult {
- 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 InboundNatRuleListResultIterator) Value() InboundNatRule {
- if !iter.page.NotDone() {
- return InboundNatRule{}
- }
- return iter.page.Values()[iter.i]
-}
-
-// Creates a new instance of the InboundNatRuleListResultIterator type.
-func NewInboundNatRuleListResultIterator(page InboundNatRuleListResultPage) InboundNatRuleListResultIterator {
- return InboundNatRuleListResultIterator{page: page}
-}
-
-// IsEmpty returns true if the ListResult contains no values.
-func (inrlr InboundNatRuleListResult) IsEmpty() bool {
- return inrlr.Value == nil || len(*inrlr.Value) == 0
-}
-
-// hasNextLink returns true if the NextLink is not empty.
-func (inrlr InboundNatRuleListResult) hasNextLink() bool {
- return inrlr.NextLink != nil && len(*inrlr.NextLink) != 0
-}
-
-// inboundNatRuleListResultPreparer prepares a request to retrieve the next set of results.
-// It returns nil if no more results exist.
-func (inrlr InboundNatRuleListResult) inboundNatRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
- if !inrlr.hasNextLink() {
- return nil, nil
- }
- return autorest.Prepare((&http.Request{}).WithContext(ctx),
- autorest.AsJSON(),
- autorest.AsGet(),
- autorest.WithBaseURL(to.String(inrlr.NextLink)))
-}
-
-// InboundNatRuleListResultPage contains a page of InboundNatRule values.
-type InboundNatRuleListResultPage struct {
- fn func(context.Context, InboundNatRuleListResult) (InboundNatRuleListResult, error)
- inrlr InboundNatRuleListResult
-}
-
-// 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 *InboundNatRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/InboundNatRuleListResultPage.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.inrlr)
- if err != nil {
- return err
- }
- page.inrlr = 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 *InboundNatRuleListResultPage) Next() error {
- return page.NextWithContext(context.Background())
-}
-
-// NotDone returns true if the page enumeration should be started or is not yet complete.
-func (page InboundNatRuleListResultPage) NotDone() bool {
- return !page.inrlr.IsEmpty()
-}
-
-// Response returns the raw server response from the last page request.
-func (page InboundNatRuleListResultPage) Response() InboundNatRuleListResult {
- return page.inrlr
-}
-
-// Values returns the slice of values for the current page or nil if there are no values.
-func (page InboundNatRuleListResultPage) Values() []InboundNatRule {
- if page.inrlr.IsEmpty() {
- return nil
- }
- return *page.inrlr.Value
-}
-
-// Creates a new instance of the InboundNatRuleListResultPage type.
-func NewInboundNatRuleListResultPage(getNextPage func(context.Context, InboundNatRuleListResult) (InboundNatRuleListResult, error)) InboundNatRuleListResultPage {
- return InboundNatRuleListResultPage{fn: getNextPage}
-}
-
-// InboundNatRulePropertiesFormat properties of the inbound NAT rule.
-type InboundNatRulePropertiesFormat struct {
- // FrontendIPConfiguration - A reference to frontend IP addresses.
- FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"`
- // BackendIPConfiguration - READ-ONLY; A reference to a private IP address defined on a network interface of a VM. Traffic sent to the frontend port of each of the frontend IP configurations is forwarded to the backend IP.
- BackendIPConfiguration *InterfaceIPConfiguration `json:"backendIPConfiguration,omitempty"`
- // Protocol - Possible values include: 'TransportProtocolUDP', 'TransportProtocolTCP', 'TransportProtocolAll'
- Protocol TransportProtocol `json:"protocol,omitempty"`
- // FrontendPort - The port for the external endpoint. Port numbers for each rule must be unique within the Load Balancer. Acceptable values range from 1 to 65534.
- FrontendPort *int32 `json:"frontendPort,omitempty"`
- // BackendPort - The port used for the internal endpoint. Acceptable values range from 1 to 65535.
- BackendPort *int32 `json:"backendPort,omitempty"`
- // IdleTimeoutInMinutes - The timeout for the TCP idle connection. The value can be set between 4 and 30 minutes. The default value is 4 minutes. This element is only used when the protocol is set to TCP.
- IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
- // EnableFloatingIP - Configures a virtual machine's endpoint for the floating IP capability required to configure a SQL AlwaysOn Availability Group. This setting is required when using the SQL AlwaysOn Availability Groups in SQL server. This setting can't be changed after you create the endpoint.
- EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"`
- // EnableTCPReset - Receive bidirectional TCP Reset on TCP flow idle timeout or unexpected connection termination. This element is only used when the protocol is set to TCP.
- EnableTCPReset *bool `json:"enableTcpReset,omitempty"`
- // ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
- ProvisioningState *string `json:"provisioningState,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for InboundNatRulePropertiesFormat.
-func (inrpf InboundNatRulePropertiesFormat) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if inrpf.FrontendIPConfiguration != nil {
- objectMap["frontendIPConfiguration"] = inrpf.FrontendIPConfiguration
- }
- if inrpf.Protocol != "" {
- objectMap["protocol"] = inrpf.Protocol
- }
- if inrpf.FrontendPort != nil {
- objectMap["frontendPort"] = inrpf.FrontendPort
- }
- if inrpf.BackendPort != nil {
- objectMap["backendPort"] = inrpf.BackendPort
- }
- if inrpf.IdleTimeoutInMinutes != nil {
- objectMap["idleTimeoutInMinutes"] = inrpf.IdleTimeoutInMinutes
- }
- if inrpf.EnableFloatingIP != nil {
- objectMap["enableFloatingIP"] = inrpf.EnableFloatingIP
- }
- if inrpf.EnableTCPReset != nil {
- objectMap["enableTcpReset"] = inrpf.EnableTCPReset
- }
- if inrpf.ProvisioningState != nil {
- objectMap["provisioningState"] = inrpf.ProvisioningState
- }
- return json.Marshal(objectMap)
-}
-
-// InboundNatRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
-// long-running operation.
-type InboundNatRulesCreateOrUpdateFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *InboundNatRulesCreateOrUpdateFuture) Result(client InboundNatRulesClient) (inr InboundNatRule, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InboundNatRulesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.InboundNatRulesCreateOrUpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if inr.Response.Response, err = future.GetResult(sender); err == nil && inr.Response.Response.StatusCode != http.StatusNoContent {
- inr, err = client.CreateOrUpdateResponder(inr.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InboundNatRulesCreateOrUpdateFuture", "Result", inr.Response.Response, "Failure responding to request")
- }
- }
- return
-}
-
-// InboundNatRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
-type InboundNatRulesDeleteFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *InboundNatRulesDeleteFuture) Result(client InboundNatRulesClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InboundNatRulesDeleteFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.InboundNatRulesDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
-}
-
-// IntentPolicy network Intent Policy resource.
-type IntentPolicy struct {
- // Etag - Gets a unique read-only string that changes whenever the resource is updated.
- Etag *string `json:"etag,omitempty"`
- // ID - 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 IntentPolicy.
-func (IP IntentPolicy) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if IP.Etag != nil {
- objectMap["etag"] = IP.Etag
- }
- if IP.ID != nil {
- objectMap["id"] = IP.ID
- }
- if IP.Location != nil {
- objectMap["location"] = IP.Location
- }
- if IP.Tags != nil {
- objectMap["tags"] = IP.Tags
- }
- return json.Marshal(objectMap)
-}
-
-// IntentPolicyConfiguration ...
-type IntentPolicyConfiguration struct {
- // NetworkIntentPolicyName - The name of the Network Intent Policy for storing in target subscription.
- NetworkIntentPolicyName *string `json:"networkIntentPolicyName,omitempty"`
- SourceNetworkIntentPolicy *IntentPolicy `json:"sourceNetworkIntentPolicy,omitempty"`
-}
-
-// Interface a network interface in a resource group.
-type Interface struct {
- autorest.Response `json:"-"`
- // InterfacePropertiesFormat - Properties of the network interface.
- *InterfacePropertiesFormat `json:"properties,omitempty"`
- // Etag - A unique read-only string that changes whenever the resource is updated.
- Etag *string `json:"etag,omitempty"`
- // ID - 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 Interface.
-func (i Interface) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if i.InterfacePropertiesFormat != nil {
- objectMap["properties"] = i.InterfacePropertiesFormat
- }
- if i.Etag != nil {
- objectMap["etag"] = i.Etag
- }
- if i.ID != nil {
- objectMap["id"] = i.ID
- }
- 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 Interface struct.
-func (i *Interface) 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 interfacePropertiesFormat InterfacePropertiesFormat
- err = json.Unmarshal(*v, &interfacePropertiesFormat)
- if err != nil {
- return err
- }
- i.InterfacePropertiesFormat = &interfacePropertiesFormat
- }
- case "etag":
- if v != nil {
- var etag string
- err = json.Unmarshal(*v, &etag)
- if err != nil {
- return err
- }
- i.Etag = &etag
- }
- 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
-}
-
-// InterfaceAssociation network interface and its custom security rules.
-type InterfaceAssociation struct {
- // ID - READ-ONLY; Network interface ID.
- ID *string `json:"id,omitempty"`
- // SecurityRules - Collection of custom security rules.
- SecurityRules *[]SecurityRule `json:"securityRules,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for InterfaceAssociation.
-func (ia InterfaceAssociation) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if ia.SecurityRules != nil {
- objectMap["securityRules"] = ia.SecurityRules
- }
- return json.Marshal(objectMap)
-}
-
-// InterfaceDNSSettings DNS settings of a network interface.
-type InterfaceDNSSettings struct {
- // DNSServers - List of DNS servers IP addresses. Use 'AzureProvidedDNS' to switch to azure provided DNS resolution. 'AzureProvidedDNS' value cannot be combined with other IPs, it must be the only value in dnsServers collection.
- DNSServers *[]string `json:"dnsServers,omitempty"`
- // AppliedDNSServers - If the VM that uses this NIC is part of an Availability Set, then this list will have the union of all DNS servers from all NICs that are part of the Availability Set. This property is what is configured on each of those VMs.
- AppliedDNSServers *[]string `json:"appliedDnsServers,omitempty"`
- // InternalDNSNameLabel - Relative DNS name for this NIC used for internal communications between VMs in the same virtual network.
- InternalDNSNameLabel *string `json:"internalDnsNameLabel,omitempty"`
- // InternalFqdn - Fully qualified DNS name supporting internal communications between VMs in the same virtual network.
- InternalFqdn *string `json:"internalFqdn,omitempty"`
- // InternalDomainNameSuffix - Even if internalDnsNameLabel is not specified, a DNS entry is created for the primary NIC of the VM. This DNS name can be constructed by concatenating the VM name with the value of internalDomainNameSuffix.
- InternalDomainNameSuffix *string `json:"internalDomainNameSuffix,omitempty"`
-}
-
-// InterfaceEndpoint interface endpoint resource.
-type InterfaceEndpoint struct {
- autorest.Response `json:"-"`
- // InterfaceEndpointProperties - Properties of the interface endpoint.
- *InterfaceEndpointProperties `json:"properties,omitempty"`
- // Etag - Gets a unique read-only string that changes whenever the resource is updated.
- Etag *string `json:"etag,omitempty"`
- // ID - 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 InterfaceEndpoint.
-func (ie InterfaceEndpoint) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if ie.InterfaceEndpointProperties != nil {
- objectMap["properties"] = ie.InterfaceEndpointProperties
- }
- if ie.Etag != nil {
- objectMap["etag"] = ie.Etag
- }
- if ie.ID != nil {
- objectMap["id"] = ie.ID
- }
- if ie.Location != nil {
- objectMap["location"] = ie.Location
- }
- if ie.Tags != nil {
- objectMap["tags"] = ie.Tags
- }
- return json.Marshal(objectMap)
-}
-
-// UnmarshalJSON is the custom unmarshaler for InterfaceEndpoint struct.
-func (ie *InterfaceEndpoint) 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 interfaceEndpointProperties InterfaceEndpointProperties
- err = json.Unmarshal(*v, &interfaceEndpointProperties)
- if err != nil {
- return err
- }
- ie.InterfaceEndpointProperties = &interfaceEndpointProperties
- }
- case "etag":
- if v != nil {
- var etag string
- err = json.Unmarshal(*v, &etag)
- if err != nil {
- return err
- }
- ie.Etag = &etag
- }
- case "id":
- if v != nil {
- var ID string
- err = json.Unmarshal(*v, &ID)
- if err != nil {
- return err
- }
- ie.ID = &ID
- }
- case "name":
- if v != nil {
- var name string
- err = json.Unmarshal(*v, &name)
- if err != nil {
- return err
- }
- ie.Name = &name
- }
- case "type":
- if v != nil {
- var typeVar string
- err = json.Unmarshal(*v, &typeVar)
- if err != nil {
- return err
- }
- ie.Type = &typeVar
- }
- case "location":
- if v != nil {
- var location string
- err = json.Unmarshal(*v, &location)
- if err != nil {
- return err
- }
- ie.Location = &location
- }
- case "tags":
- if v != nil {
- var tags map[string]*string
- err = json.Unmarshal(*v, &tags)
- if err != nil {
- return err
- }
- ie.Tags = tags
- }
- }
- }
-
- return nil
-}
-
-// InterfaceEndpointListResult response for the ListInterfaceEndpoints API service call.
-type InterfaceEndpointListResult struct {
- autorest.Response `json:"-"`
- // Value - Gets a list of InterfaceEndpoint resources in a resource group.
- Value *[]InterfaceEndpoint `json:"value,omitempty"`
- // NextLink - READ-ONLY; The URL to get the next set of results.
- NextLink *string `json:"nextLink,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for InterfaceEndpointListResult.
-func (ielr InterfaceEndpointListResult) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if ielr.Value != nil {
- objectMap["value"] = ielr.Value
- }
- return json.Marshal(objectMap)
-}
-
-// InterfaceEndpointListResultIterator provides access to a complete listing of InterfaceEndpoint values.
-type InterfaceEndpointListResultIterator struct {
- i int
- page InterfaceEndpointListResultPage
-}
-
-// 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 *InterfaceEndpointListResultIterator) NextWithContext(ctx context.Context) (err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceEndpointListResultIterator.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 *InterfaceEndpointListResultIterator) Next() error {
- return iter.NextWithContext(context.Background())
-}
-
-// NotDone returns true if the enumeration should be started or is not yet complete.
-func (iter InterfaceEndpointListResultIterator) 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 InterfaceEndpointListResultIterator) Response() InterfaceEndpointListResult {
- 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 InterfaceEndpointListResultIterator) Value() InterfaceEndpoint {
- if !iter.page.NotDone() {
- return InterfaceEndpoint{}
- }
- return iter.page.Values()[iter.i]
-}
-
-// Creates a new instance of the InterfaceEndpointListResultIterator type.
-func NewInterfaceEndpointListResultIterator(page InterfaceEndpointListResultPage) InterfaceEndpointListResultIterator {
- return InterfaceEndpointListResultIterator{page: page}
-}
-
-// IsEmpty returns true if the ListResult contains no values.
-func (ielr InterfaceEndpointListResult) IsEmpty() bool {
- return ielr.Value == nil || len(*ielr.Value) == 0
-}
-
-// hasNextLink returns true if the NextLink is not empty.
-func (ielr InterfaceEndpointListResult) hasNextLink() bool {
- return ielr.NextLink != nil && len(*ielr.NextLink) != 0
-}
-
-// interfaceEndpointListResultPreparer prepares a request to retrieve the next set of results.
-// It returns nil if no more results exist.
-func (ielr InterfaceEndpointListResult) interfaceEndpointListResultPreparer(ctx context.Context) (*http.Request, error) {
- if !ielr.hasNextLink() {
- return nil, nil
- }
- return autorest.Prepare((&http.Request{}).WithContext(ctx),
- autorest.AsJSON(),
- autorest.AsGet(),
- autorest.WithBaseURL(to.String(ielr.NextLink)))
-}
-
-// InterfaceEndpointListResultPage contains a page of InterfaceEndpoint values.
-type InterfaceEndpointListResultPage struct {
- fn func(context.Context, InterfaceEndpointListResult) (InterfaceEndpointListResult, error)
- ielr InterfaceEndpointListResult
-}
-
-// 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 *InterfaceEndpointListResultPage) NextWithContext(ctx context.Context) (err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceEndpointListResultPage.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.ielr)
- if err != nil {
- return err
- }
- page.ielr = 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 *InterfaceEndpointListResultPage) Next() error {
- return page.NextWithContext(context.Background())
-}
-
-// NotDone returns true if the page enumeration should be started or is not yet complete.
-func (page InterfaceEndpointListResultPage) NotDone() bool {
- return !page.ielr.IsEmpty()
-}
-
-// Response returns the raw server response from the last page request.
-func (page InterfaceEndpointListResultPage) Response() InterfaceEndpointListResult {
- return page.ielr
-}
-
-// Values returns the slice of values for the current page or nil if there are no values.
-func (page InterfaceEndpointListResultPage) Values() []InterfaceEndpoint {
- if page.ielr.IsEmpty() {
- return nil
- }
- return *page.ielr.Value
-}
-
-// Creates a new instance of the InterfaceEndpointListResultPage type.
-func NewInterfaceEndpointListResultPage(getNextPage func(context.Context, InterfaceEndpointListResult) (InterfaceEndpointListResult, error)) InterfaceEndpointListResultPage {
- return InterfaceEndpointListResultPage{fn: getNextPage}
-}
-
-// InterfaceEndpointProperties properties of the interface endpoint.
-type InterfaceEndpointProperties struct {
- // Fqdn - A first-party service's FQDN that is mapped to the private IP allocated via this interface endpoint.
- Fqdn *string `json:"fqdn,omitempty"`
- // EndpointService - A reference to the service being brought into the virtual network.
- EndpointService *EndpointService `json:"endpointService,omitempty"`
- // Subnet - The ID of the subnet from which the private IP will be allocated.
- Subnet *Subnet `json:"subnet,omitempty"`
- // NetworkInterfaces - READ-ONLY; Gets an array of references to the network interfaces created for this interface endpoint.
- NetworkInterfaces *[]Interface `json:"networkInterfaces,omitempty"`
- // Owner - READ-ONLY; A read-only property that identifies who created this interface endpoint.
- Owner *string `json:"owner,omitempty"`
- // ProvisioningState - READ-ONLY; The provisioning state of the interface endpoint. Possible values are: 'Updating', 'Deleting', and 'Failed'.
- ProvisioningState *string `json:"provisioningState,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for InterfaceEndpointProperties.
-func (iep InterfaceEndpointProperties) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if iep.Fqdn != nil {
- objectMap["fqdn"] = iep.Fqdn
- }
- if iep.EndpointService != nil {
- objectMap["endpointService"] = iep.EndpointService
- }
- if iep.Subnet != nil {
- objectMap["subnet"] = iep.Subnet
- }
- return json.Marshal(objectMap)
-}
-
-// InterfaceEndpointsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
-// long-running operation.
-type InterfaceEndpointsCreateOrUpdateFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *InterfaceEndpointsCreateOrUpdateFuture) Result(client InterfaceEndpointsClient) (ie InterfaceEndpoint, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfaceEndpointsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.InterfaceEndpointsCreateOrUpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if ie.Response.Response, err = future.GetResult(sender); err == nil && ie.Response.Response.StatusCode != http.StatusNoContent {
- ie, err = client.CreateOrUpdateResponder(ie.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfaceEndpointsCreateOrUpdateFuture", "Result", ie.Response.Response, "Failure responding to request")
- }
- }
- return
-}
-
-// InterfaceEndpointsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
-type InterfaceEndpointsDeleteFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *InterfaceEndpointsDeleteFuture) Result(client InterfaceEndpointsClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfaceEndpointsDeleteFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.InterfaceEndpointsDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
-}
-
-// InterfaceIPConfiguration iPConfiguration in a network interface.
-type InterfaceIPConfiguration struct {
- autorest.Response `json:"-"`
- // InterfaceIPConfigurationPropertiesFormat - Network interface IP configuration properties.
- *InterfaceIPConfigurationPropertiesFormat `json:"properties,omitempty"`
- // Name - 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"`
- // Etag - A unique read-only string that changes whenever the resource is updated.
- Etag *string `json:"etag,omitempty"`
- // ID - Resource ID.
- ID *string `json:"id,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for InterfaceIPConfiguration.
-func (iic InterfaceIPConfiguration) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if iic.InterfaceIPConfigurationPropertiesFormat != nil {
- objectMap["properties"] = iic.InterfaceIPConfigurationPropertiesFormat
- }
- if iic.Name != nil {
- objectMap["name"] = iic.Name
- }
- if iic.Etag != nil {
- objectMap["etag"] = iic.Etag
- }
- if iic.ID != nil {
- objectMap["id"] = iic.ID
- }
- return json.Marshal(objectMap)
-}
-
-// UnmarshalJSON is the custom unmarshaler for InterfaceIPConfiguration struct.
-func (iic *InterfaceIPConfiguration) 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 interfaceIPConfigurationPropertiesFormat InterfaceIPConfigurationPropertiesFormat
- err = json.Unmarshal(*v, &interfaceIPConfigurationPropertiesFormat)
- if err != nil {
- return err
- }
- iic.InterfaceIPConfigurationPropertiesFormat = &interfaceIPConfigurationPropertiesFormat
- }
- case "name":
- if v != nil {
- var name string
- err = json.Unmarshal(*v, &name)
- if err != nil {
- return err
- }
- iic.Name = &name
- }
- case "etag":
- if v != nil {
- var etag string
- err = json.Unmarshal(*v, &etag)
- if err != nil {
- return err
- }
- iic.Etag = &etag
- }
- case "id":
- if v != nil {
- var ID string
- err = json.Unmarshal(*v, &ID)
- if err != nil {
- return err
- }
- iic.ID = &ID
- }
- }
- }
-
- return nil
-}
-
-// InterfaceIPConfigurationListResult response for list ip configurations API service call.
-type InterfaceIPConfigurationListResult struct {
- autorest.Response `json:"-"`
- // Value - A list of ip configurations.
- Value *[]InterfaceIPConfiguration `json:"value,omitempty"`
- // NextLink - READ-ONLY; The URL to get the next set of results.
- NextLink *string `json:"nextLink,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for InterfaceIPConfigurationListResult.
-func (iiclr InterfaceIPConfigurationListResult) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if iiclr.Value != nil {
- objectMap["value"] = iiclr.Value
- }
- return json.Marshal(objectMap)
-}
-
-// InterfaceIPConfigurationListResultIterator provides access to a complete listing of InterfaceIPConfiguration
-// values.
-type InterfaceIPConfigurationListResultIterator struct {
- i int
- page InterfaceIPConfigurationListResultPage
-}
-
-// 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 *InterfaceIPConfigurationListResultIterator) NextWithContext(ctx context.Context) (err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceIPConfigurationListResultIterator.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 *InterfaceIPConfigurationListResultIterator) Next() error {
- return iter.NextWithContext(context.Background())
-}
-
-// NotDone returns true if the enumeration should be started or is not yet complete.
-func (iter InterfaceIPConfigurationListResultIterator) 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 InterfaceIPConfigurationListResultIterator) Response() InterfaceIPConfigurationListResult {
- 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 InterfaceIPConfigurationListResultIterator) Value() InterfaceIPConfiguration {
- if !iter.page.NotDone() {
- return InterfaceIPConfiguration{}
- }
- return iter.page.Values()[iter.i]
-}
-
-// Creates a new instance of the InterfaceIPConfigurationListResultIterator type.
-func NewInterfaceIPConfigurationListResultIterator(page InterfaceIPConfigurationListResultPage) InterfaceIPConfigurationListResultIterator {
- return InterfaceIPConfigurationListResultIterator{page: page}
-}
-
-// IsEmpty returns true if the ListResult contains no values.
-func (iiclr InterfaceIPConfigurationListResult) IsEmpty() bool {
- return iiclr.Value == nil || len(*iiclr.Value) == 0
-}
-
-// hasNextLink returns true if the NextLink is not empty.
-func (iiclr InterfaceIPConfigurationListResult) hasNextLink() bool {
- return iiclr.NextLink != nil && len(*iiclr.NextLink) != 0
-}
-
-// interfaceIPConfigurationListResultPreparer prepares a request to retrieve the next set of results.
-// It returns nil if no more results exist.
-func (iiclr InterfaceIPConfigurationListResult) interfaceIPConfigurationListResultPreparer(ctx context.Context) (*http.Request, error) {
- if !iiclr.hasNextLink() {
- return nil, nil
- }
- return autorest.Prepare((&http.Request{}).WithContext(ctx),
- autorest.AsJSON(),
- autorest.AsGet(),
- autorest.WithBaseURL(to.String(iiclr.NextLink)))
-}
-
-// InterfaceIPConfigurationListResultPage contains a page of InterfaceIPConfiguration values.
-type InterfaceIPConfigurationListResultPage struct {
- fn func(context.Context, InterfaceIPConfigurationListResult) (InterfaceIPConfigurationListResult, error)
- iiclr InterfaceIPConfigurationListResult
-}
-
-// 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 *InterfaceIPConfigurationListResultPage) NextWithContext(ctx context.Context) (err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceIPConfigurationListResultPage.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.iiclr)
- if err != nil {
- return err
- }
- page.iiclr = 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 *InterfaceIPConfigurationListResultPage) Next() error {
- return page.NextWithContext(context.Background())
-}
-
-// NotDone returns true if the page enumeration should be started or is not yet complete.
-func (page InterfaceIPConfigurationListResultPage) NotDone() bool {
- return !page.iiclr.IsEmpty()
-}
-
-// Response returns the raw server response from the last page request.
-func (page InterfaceIPConfigurationListResultPage) Response() InterfaceIPConfigurationListResult {
- return page.iiclr
-}
-
-// Values returns the slice of values for the current page or nil if there are no values.
-func (page InterfaceIPConfigurationListResultPage) Values() []InterfaceIPConfiguration {
- if page.iiclr.IsEmpty() {
- return nil
- }
- return *page.iiclr.Value
-}
-
-// Creates a new instance of the InterfaceIPConfigurationListResultPage type.
-func NewInterfaceIPConfigurationListResultPage(getNextPage func(context.Context, InterfaceIPConfigurationListResult) (InterfaceIPConfigurationListResult, error)) InterfaceIPConfigurationListResultPage {
- return InterfaceIPConfigurationListResultPage{fn: getNextPage}
-}
-
-// InterfaceIPConfigurationPropertiesFormat properties of IP configuration.
-type InterfaceIPConfigurationPropertiesFormat struct {
- // VirtualNetworkTaps - The reference to Virtual Network Taps.
- VirtualNetworkTaps *[]VirtualNetworkTap `json:"virtualNetworkTaps,omitempty"`
- // ApplicationGatewayBackendAddressPools - The reference of ApplicationGatewayBackendAddressPool resource.
- ApplicationGatewayBackendAddressPools *[]ApplicationGatewayBackendAddressPool `json:"applicationGatewayBackendAddressPools,omitempty"`
- // LoadBalancerBackendAddressPools - The reference of LoadBalancerBackendAddressPool resource.
- LoadBalancerBackendAddressPools *[]BackendAddressPool `json:"loadBalancerBackendAddressPools,omitempty"`
- // LoadBalancerInboundNatRules - A list of references of LoadBalancerInboundNatRules.
- LoadBalancerInboundNatRules *[]InboundNatRule `json:"loadBalancerInboundNatRules,omitempty"`
- // PrivateIPAddress - Private IP address of the IP configuration.
- PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
- // PrivateIPAllocationMethod - Defines how a private IP address is assigned. Possible values are: 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic'
- PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
- // PrivateIPAddressVersion - Available from Api-Version 2016-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 IPVersion `json:"privateIPAddressVersion,omitempty"`
- // Subnet - Subnet bound to the IP configuration.
- Subnet *Subnet `json:"subnet,omitempty"`
- // Primary - Gets whether this is a primary customer address on the network interface.
- Primary *bool `json:"primary,omitempty"`
- // PublicIPAddress - Public IP address bound to the IP configuration.
- PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"`
- // ApplicationSecurityGroups - Application security groups in which the IP configuration is included.
- ApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"applicationSecurityGroups,omitempty"`
- // ProvisioningState - The provisioning state of the network interface IP configuration. Possible values are: 'Updating', 'Deleting', and 'Failed'.
- ProvisioningState *string `json:"provisioningState,omitempty"`
-}
-
-// InterfaceListResult response for the ListNetworkInterface API service call.
-type InterfaceListResult struct {
- autorest.Response `json:"-"`
- // Value - A list of network interfaces in a resource group.
- Value *[]Interface `json:"value,omitempty"`
- // NextLink - READ-ONLY; The URL to get the next set of results.
- NextLink *string `json:"nextLink,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for InterfaceListResult.
-func (ilr InterfaceListResult) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if ilr.Value != nil {
- objectMap["value"] = ilr.Value
- }
- return json.Marshal(objectMap)
-}
-
-// InterfaceListResultIterator provides access to a complete listing of Interface values.
-type InterfaceListResultIterator struct {
- i int
- page InterfaceListResultPage
-}
-
-// 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 *InterfaceListResultIterator) NextWithContext(ctx context.Context) (err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceListResultIterator.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 *InterfaceListResultIterator) Next() error {
- return iter.NextWithContext(context.Background())
-}
-
-// NotDone returns true if the enumeration should be started or is not yet complete.
-func (iter InterfaceListResultIterator) 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 InterfaceListResultIterator) Response() InterfaceListResult {
- 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 InterfaceListResultIterator) Value() Interface {
- if !iter.page.NotDone() {
- return Interface{}
- }
- return iter.page.Values()[iter.i]
-}
-
-// Creates a new instance of the InterfaceListResultIterator type.
-func NewInterfaceListResultIterator(page InterfaceListResultPage) InterfaceListResultIterator {
- return InterfaceListResultIterator{page: page}
-}
-
-// IsEmpty returns true if the ListResult contains no values.
-func (ilr InterfaceListResult) IsEmpty() bool {
- return ilr.Value == nil || len(*ilr.Value) == 0
-}
-
-// hasNextLink returns true if the NextLink is not empty.
-func (ilr InterfaceListResult) hasNextLink() bool {
- return ilr.NextLink != nil && len(*ilr.NextLink) != 0
-}
-
-// interfaceListResultPreparer prepares a request to retrieve the next set of results.
-// It returns nil if no more results exist.
-func (ilr InterfaceListResult) interfaceListResultPreparer(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)))
-}
-
-// InterfaceListResultPage contains a page of Interface values.
-type InterfaceListResultPage struct {
- fn func(context.Context, InterfaceListResult) (InterfaceListResult, error)
- ilr InterfaceListResult
-}
-
-// 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 *InterfaceListResultPage) NextWithContext(ctx context.Context) (err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceListResultPage.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 *InterfaceListResultPage) Next() error {
- return page.NextWithContext(context.Background())
-}
-
-// NotDone returns true if the page enumeration should be started or is not yet complete.
-func (page InterfaceListResultPage) NotDone() bool {
- return !page.ilr.IsEmpty()
-}
-
-// Response returns the raw server response from the last page request.
-func (page InterfaceListResultPage) Response() InterfaceListResult {
- return page.ilr
-}
-
-// Values returns the slice of values for the current page or nil if there are no values.
-func (page InterfaceListResultPage) Values() []Interface {
- if page.ilr.IsEmpty() {
- return nil
- }
- return *page.ilr.Value
-}
-
-// Creates a new instance of the InterfaceListResultPage type.
-func NewInterfaceListResultPage(getNextPage func(context.Context, InterfaceListResult) (InterfaceListResult, error)) InterfaceListResultPage {
- return InterfaceListResultPage{fn: getNextPage}
-}
-
-// InterfaceLoadBalancerListResult response for list ip configurations API service call.
-type InterfaceLoadBalancerListResult struct {
- autorest.Response `json:"-"`
- // Value - A list of load balancers.
- Value *[]LoadBalancer `json:"value,omitempty"`
- // NextLink - READ-ONLY; The URL to get the next set of results.
- NextLink *string `json:"nextLink,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for InterfaceLoadBalancerListResult.
-func (ilblr InterfaceLoadBalancerListResult) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if ilblr.Value != nil {
- objectMap["value"] = ilblr.Value
- }
- return json.Marshal(objectMap)
-}
-
-// InterfaceLoadBalancerListResultIterator provides access to a complete listing of LoadBalancer values.
-type InterfaceLoadBalancerListResultIterator struct {
- i int
- page InterfaceLoadBalancerListResultPage
-}
-
-// 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 *InterfaceLoadBalancerListResultIterator) NextWithContext(ctx context.Context) (err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceLoadBalancerListResultIterator.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 *InterfaceLoadBalancerListResultIterator) Next() error {
- return iter.NextWithContext(context.Background())
-}
-
-// NotDone returns true if the enumeration should be started or is not yet complete.
-func (iter InterfaceLoadBalancerListResultIterator) 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 InterfaceLoadBalancerListResultIterator) Response() InterfaceLoadBalancerListResult {
- 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 InterfaceLoadBalancerListResultIterator) Value() LoadBalancer {
- if !iter.page.NotDone() {
- return LoadBalancer{}
- }
- return iter.page.Values()[iter.i]
-}
-
-// Creates a new instance of the InterfaceLoadBalancerListResultIterator type.
-func NewInterfaceLoadBalancerListResultIterator(page InterfaceLoadBalancerListResultPage) InterfaceLoadBalancerListResultIterator {
- return InterfaceLoadBalancerListResultIterator{page: page}
-}
-
-// IsEmpty returns true if the ListResult contains no values.
-func (ilblr InterfaceLoadBalancerListResult) IsEmpty() bool {
- return ilblr.Value == nil || len(*ilblr.Value) == 0
-}
-
-// hasNextLink returns true if the NextLink is not empty.
-func (ilblr InterfaceLoadBalancerListResult) hasNextLink() bool {
- return ilblr.NextLink != nil && len(*ilblr.NextLink) != 0
-}
-
-// interfaceLoadBalancerListResultPreparer prepares a request to retrieve the next set of results.
-// It returns nil if no more results exist.
-func (ilblr InterfaceLoadBalancerListResult) interfaceLoadBalancerListResultPreparer(ctx context.Context) (*http.Request, error) {
- if !ilblr.hasNextLink() {
- return nil, nil
- }
- return autorest.Prepare((&http.Request{}).WithContext(ctx),
- autorest.AsJSON(),
- autorest.AsGet(),
- autorest.WithBaseURL(to.String(ilblr.NextLink)))
-}
-
-// InterfaceLoadBalancerListResultPage contains a page of LoadBalancer values.
-type InterfaceLoadBalancerListResultPage struct {
- fn func(context.Context, InterfaceLoadBalancerListResult) (InterfaceLoadBalancerListResult, error)
- ilblr InterfaceLoadBalancerListResult
-}
-
-// 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 *InterfaceLoadBalancerListResultPage) NextWithContext(ctx context.Context) (err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceLoadBalancerListResultPage.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.ilblr)
- if err != nil {
- return err
- }
- page.ilblr = 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 *InterfaceLoadBalancerListResultPage) Next() error {
- return page.NextWithContext(context.Background())
-}
-
-// NotDone returns true if the page enumeration should be started or is not yet complete.
-func (page InterfaceLoadBalancerListResultPage) NotDone() bool {
- return !page.ilblr.IsEmpty()
-}
-
-// Response returns the raw server response from the last page request.
-func (page InterfaceLoadBalancerListResultPage) Response() InterfaceLoadBalancerListResult {
- return page.ilblr
-}
-
-// Values returns the slice of values for the current page or nil if there are no values.
-func (page InterfaceLoadBalancerListResultPage) Values() []LoadBalancer {
- if page.ilblr.IsEmpty() {
- return nil
- }
- return *page.ilblr.Value
-}
-
-// Creates a new instance of the InterfaceLoadBalancerListResultPage type.
-func NewInterfaceLoadBalancerListResultPage(getNextPage func(context.Context, InterfaceLoadBalancerListResult) (InterfaceLoadBalancerListResult, error)) InterfaceLoadBalancerListResultPage {
- return InterfaceLoadBalancerListResultPage{fn: getNextPage}
-}
-
-// InterfacePropertiesFormat networkInterface properties.
-type InterfacePropertiesFormat struct {
- // VirtualMachine - READ-ONLY; The reference of a virtual machine.
- VirtualMachine *SubResource `json:"virtualMachine,omitempty"`
- // NetworkSecurityGroup - The reference of the NetworkSecurityGroup resource.
- NetworkSecurityGroup *SecurityGroup `json:"networkSecurityGroup,omitempty"`
- // InterfaceEndpoint - READ-ONLY; A reference to the interface endpoint to which the network interface is linked.
- InterfaceEndpoint *InterfaceEndpoint `json:"interfaceEndpoint,omitempty"`
- // IPConfigurations - A list of IPConfigurations of the network interface.
- IPConfigurations *[]InterfaceIPConfiguration `json:"ipConfigurations,omitempty"`
- // TapConfigurations - A list of TapConfigurations of the network interface.
- TapConfigurations *[]InterfaceTapConfiguration `json:"tapConfigurations,omitempty"`
- // DNSSettings - The DNS settings in network interface.
- DNSSettings *InterfaceDNSSettings `json:"dnsSettings,omitempty"`
- // MacAddress - The MAC address of the network interface.
- MacAddress *string `json:"macAddress,omitempty"`
- // Primary - Gets whether this is a primary network interface on a virtual machine.
- Primary *bool `json:"primary,omitempty"`
- // EnableAcceleratedNetworking - If the network interface is accelerated networking enabled.
- EnableAcceleratedNetworking *bool `json:"enableAcceleratedNetworking,omitempty"`
- // EnableIPForwarding - Indicates whether IP forwarding is enabled on this network interface.
- EnableIPForwarding *bool `json:"enableIPForwarding,omitempty"`
- // HostedWorkloads - READ-ONLY; A list of references to linked BareMetal resources
- HostedWorkloads *[]string `json:"hostedWorkloads,omitempty"`
- // ResourceGUID - The resource GUID property of the network interface resource.
- ResourceGUID *string `json:"resourceGuid,omitempty"`
- // ProvisioningState - The provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
- ProvisioningState *string `json:"provisioningState,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for InterfacePropertiesFormat.
-func (ipf InterfacePropertiesFormat) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if ipf.NetworkSecurityGroup != nil {
- objectMap["networkSecurityGroup"] = ipf.NetworkSecurityGroup
- }
- if ipf.IPConfigurations != nil {
- objectMap["ipConfigurations"] = ipf.IPConfigurations
- }
- if ipf.TapConfigurations != nil {
- objectMap["tapConfigurations"] = ipf.TapConfigurations
- }
- if ipf.DNSSettings != nil {
- objectMap["dnsSettings"] = ipf.DNSSettings
- }
- if ipf.MacAddress != nil {
- objectMap["macAddress"] = ipf.MacAddress
- }
- if ipf.Primary != nil {
- objectMap["primary"] = ipf.Primary
- }
- if ipf.EnableAcceleratedNetworking != nil {
- objectMap["enableAcceleratedNetworking"] = ipf.EnableAcceleratedNetworking
- }
- if ipf.EnableIPForwarding != nil {
- objectMap["enableIPForwarding"] = ipf.EnableIPForwarding
- }
- if ipf.ResourceGUID != nil {
- objectMap["resourceGuid"] = ipf.ResourceGUID
- }
- if ipf.ProvisioningState != nil {
- objectMap["provisioningState"] = ipf.ProvisioningState
- }
- return json.Marshal(objectMap)
-}
-
-// InterfacesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
-type InterfacesCreateOrUpdateFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *InterfacesCreateOrUpdateFuture) Result(client InterfacesClient) (i Interface, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.InterfacesCreateOrUpdateFuture")
- 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, "network.InterfacesCreateOrUpdateFuture", "Result", i.Response.Response, "Failure responding to request")
- }
- }
- return
-}
-
-// InterfacesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
-type InterfacesDeleteFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *InterfacesDeleteFuture) Result(client InterfacesClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesDeleteFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.InterfacesDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
-}
-
-// InterfacesGetEffectiveRouteTableFuture an abstraction for monitoring and retrieving the results of a
-// long-running operation.
-type InterfacesGetEffectiveRouteTableFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *InterfacesGetEffectiveRouteTableFuture) Result(client InterfacesClient) (erlr EffectiveRouteListResult, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesGetEffectiveRouteTableFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.InterfacesGetEffectiveRouteTableFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if erlr.Response.Response, err = future.GetResult(sender); err == nil && erlr.Response.Response.StatusCode != http.StatusNoContent {
- erlr, err = client.GetEffectiveRouteTableResponder(erlr.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesGetEffectiveRouteTableFuture", "Result", erlr.Response.Response, "Failure responding to request")
- }
- }
- return
-}
-
-// InterfacesListEffectiveNetworkSecurityGroupsFuture an abstraction for monitoring and retrieving the results
-// of a long-running operation.
-type InterfacesListEffectiveNetworkSecurityGroupsFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *InterfacesListEffectiveNetworkSecurityGroupsFuture) Result(client InterfacesClient) (ensglr EffectiveNetworkSecurityGroupListResult, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesListEffectiveNetworkSecurityGroupsFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.InterfacesListEffectiveNetworkSecurityGroupsFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if ensglr.Response.Response, err = future.GetResult(sender); err == nil && ensglr.Response.Response.StatusCode != http.StatusNoContent {
- ensglr, err = client.ListEffectiveNetworkSecurityGroupsResponder(ensglr.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesListEffectiveNetworkSecurityGroupsFuture", "Result", ensglr.Response.Response, "Failure responding to request")
- }
- }
- return
-}
-
-// InterfacesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
-type InterfacesUpdateTagsFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *InterfacesUpdateTagsFuture) Result(client InterfacesClient) (i Interface, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesUpdateTagsFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.InterfacesUpdateTagsFuture")
- 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.UpdateTagsResponder(i.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesUpdateTagsFuture", "Result", i.Response.Response, "Failure responding to request")
- }
- }
- return
-}
-
-// InterfaceTapConfiguration tap configuration in a Network Interface
-type InterfaceTapConfiguration struct {
- autorest.Response `json:"-"`
- // InterfaceTapConfigurationPropertiesFormat - Properties of the Virtual Network Tap configuration
- *InterfaceTapConfigurationPropertiesFormat `json:"properties,omitempty"`
- // Name - 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"`
- // Etag - A unique read-only string that changes whenever the resource is updated.
- Etag *string `json:"etag,omitempty"`
- // Type - READ-ONLY; Sub Resource type.
- Type *string `json:"type,omitempty"`
- // ID - Resource ID.
- ID *string `json:"id,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for InterfaceTapConfiguration.
-func (itc InterfaceTapConfiguration) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if itc.InterfaceTapConfigurationPropertiesFormat != nil {
- objectMap["properties"] = itc.InterfaceTapConfigurationPropertiesFormat
- }
- if itc.Name != nil {
- objectMap["name"] = itc.Name
- }
- if itc.Etag != nil {
- objectMap["etag"] = itc.Etag
- }
- if itc.ID != nil {
- objectMap["id"] = itc.ID
- }
- return json.Marshal(objectMap)
-}
-
-// UnmarshalJSON is the custom unmarshaler for InterfaceTapConfiguration struct.
-func (itc *InterfaceTapConfiguration) 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 interfaceTapConfigurationPropertiesFormat InterfaceTapConfigurationPropertiesFormat
- err = json.Unmarshal(*v, &interfaceTapConfigurationPropertiesFormat)
- if err != nil {
- return err
- }
- itc.InterfaceTapConfigurationPropertiesFormat = &interfaceTapConfigurationPropertiesFormat
- }
- case "name":
- if v != nil {
- var name string
- err = json.Unmarshal(*v, &name)
- if err != nil {
- return err
- }
- itc.Name = &name
- }
- case "etag":
- if v != nil {
- var etag string
- err = json.Unmarshal(*v, &etag)
- if err != nil {
- return err
- }
- itc.Etag = &etag
- }
- case "type":
- if v != nil {
- var typeVar string
- err = json.Unmarshal(*v, &typeVar)
- if err != nil {
- return err
- }
- itc.Type = &typeVar
- }
- case "id":
- if v != nil {
- var ID string
- err = json.Unmarshal(*v, &ID)
- if err != nil {
- return err
- }
- itc.ID = &ID
- }
- }
- }
-
- return nil
-}
-
-// InterfaceTapConfigurationListResult response for list tap configurations API service call.
-type InterfaceTapConfigurationListResult struct {
- autorest.Response `json:"-"`
- // Value - A list of tap configurations.
- Value *[]InterfaceTapConfiguration `json:"value,omitempty"`
- // NextLink - READ-ONLY; The URL to get the next set of results.
- NextLink *string `json:"nextLink,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for InterfaceTapConfigurationListResult.
-func (itclr InterfaceTapConfigurationListResult) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if itclr.Value != nil {
- objectMap["value"] = itclr.Value
- }
- return json.Marshal(objectMap)
-}
-
-// InterfaceTapConfigurationListResultIterator provides access to a complete listing of
-// InterfaceTapConfiguration values.
-type InterfaceTapConfigurationListResultIterator struct {
- i int
- page InterfaceTapConfigurationListResultPage
-}
-
-// 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 *InterfaceTapConfigurationListResultIterator) NextWithContext(ctx context.Context) (err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceTapConfigurationListResultIterator.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 *InterfaceTapConfigurationListResultIterator) Next() error {
- return iter.NextWithContext(context.Background())
-}
-
-// NotDone returns true if the enumeration should be started or is not yet complete.
-func (iter InterfaceTapConfigurationListResultIterator) 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 InterfaceTapConfigurationListResultIterator) Response() InterfaceTapConfigurationListResult {
- 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 InterfaceTapConfigurationListResultIterator) Value() InterfaceTapConfiguration {
- if !iter.page.NotDone() {
- return InterfaceTapConfiguration{}
- }
- return iter.page.Values()[iter.i]
-}
-
-// Creates a new instance of the InterfaceTapConfigurationListResultIterator type.
-func NewInterfaceTapConfigurationListResultIterator(page InterfaceTapConfigurationListResultPage) InterfaceTapConfigurationListResultIterator {
- return InterfaceTapConfigurationListResultIterator{page: page}
-}
-
-// IsEmpty returns true if the ListResult contains no values.
-func (itclr InterfaceTapConfigurationListResult) IsEmpty() bool {
- return itclr.Value == nil || len(*itclr.Value) == 0
-}
-
-// hasNextLink returns true if the NextLink is not empty.
-func (itclr InterfaceTapConfigurationListResult) hasNextLink() bool {
- return itclr.NextLink != nil && len(*itclr.NextLink) != 0
-}
-
-// interfaceTapConfigurationListResultPreparer prepares a request to retrieve the next set of results.
-// It returns nil if no more results exist.
-func (itclr InterfaceTapConfigurationListResult) interfaceTapConfigurationListResultPreparer(ctx context.Context) (*http.Request, error) {
- if !itclr.hasNextLink() {
- return nil, nil
- }
- return autorest.Prepare((&http.Request{}).WithContext(ctx),
- autorest.AsJSON(),
- autorest.AsGet(),
- autorest.WithBaseURL(to.String(itclr.NextLink)))
-}
-
-// InterfaceTapConfigurationListResultPage contains a page of InterfaceTapConfiguration values.
-type InterfaceTapConfigurationListResultPage struct {
- fn func(context.Context, InterfaceTapConfigurationListResult) (InterfaceTapConfigurationListResult, error)
- itclr InterfaceTapConfigurationListResult
-}
-
-// 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 *InterfaceTapConfigurationListResultPage) NextWithContext(ctx context.Context) (err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceTapConfigurationListResultPage.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.itclr)
- if err != nil {
- return err
- }
- page.itclr = 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 *InterfaceTapConfigurationListResultPage) Next() error {
- return page.NextWithContext(context.Background())
-}
-
-// NotDone returns true if the page enumeration should be started or is not yet complete.
-func (page InterfaceTapConfigurationListResultPage) NotDone() bool {
- return !page.itclr.IsEmpty()
-}
-
-// Response returns the raw server response from the last page request.
-func (page InterfaceTapConfigurationListResultPage) Response() InterfaceTapConfigurationListResult {
- return page.itclr
-}
-
-// Values returns the slice of values for the current page or nil if there are no values.
-func (page InterfaceTapConfigurationListResultPage) Values() []InterfaceTapConfiguration {
- if page.itclr.IsEmpty() {
- return nil
- }
- return *page.itclr.Value
-}
-
-// Creates a new instance of the InterfaceTapConfigurationListResultPage type.
-func NewInterfaceTapConfigurationListResultPage(getNextPage func(context.Context, InterfaceTapConfigurationListResult) (InterfaceTapConfigurationListResult, error)) InterfaceTapConfigurationListResultPage {
- return InterfaceTapConfigurationListResultPage{fn: getNextPage}
-}
-
-// InterfaceTapConfigurationPropertiesFormat properties of Virtual Network Tap configuration.
-type InterfaceTapConfigurationPropertiesFormat struct {
- // VirtualNetworkTap - The reference of the Virtual Network Tap resource.
- VirtualNetworkTap *VirtualNetworkTap `json:"virtualNetworkTap,omitempty"`
- // ProvisioningState - READ-ONLY; The provisioning state of the network interface tap configuration. Possible values are: 'Updating', 'Deleting', and 'Failed'.
- ProvisioningState *string `json:"provisioningState,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for InterfaceTapConfigurationPropertiesFormat.
-func (itcpf InterfaceTapConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if itcpf.VirtualNetworkTap != nil {
- objectMap["virtualNetworkTap"] = itcpf.VirtualNetworkTap
- }
- return json.Marshal(objectMap)
-}
-
-// InterfaceTapConfigurationsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
-// long-running operation.
-type InterfaceTapConfigurationsCreateOrUpdateFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *InterfaceTapConfigurationsCreateOrUpdateFuture) Result(client InterfaceTapConfigurationsClient) (itc InterfaceTapConfiguration, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfaceTapConfigurationsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.InterfaceTapConfigurationsCreateOrUpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if itc.Response.Response, err = future.GetResult(sender); err == nil && itc.Response.Response.StatusCode != http.StatusNoContent {
- itc, err = client.CreateOrUpdateResponder(itc.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfaceTapConfigurationsCreateOrUpdateFuture", "Result", itc.Response.Response, "Failure responding to request")
- }
- }
- return
-}
-
-// InterfaceTapConfigurationsDeleteFuture an abstraction for monitoring and retrieving the results of a
-// long-running operation.
-type InterfaceTapConfigurationsDeleteFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *InterfaceTapConfigurationsDeleteFuture) Result(client InterfaceTapConfigurationsClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfaceTapConfigurationsDeleteFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.InterfaceTapConfigurationsDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
-}
-
-// IPAddressAvailabilityResult response for CheckIPAddressAvailability API service call
-type IPAddressAvailabilityResult struct {
- autorest.Response `json:"-"`
- // Available - Private IP address availability.
- Available *bool `json:"available,omitempty"`
- // AvailableIPAddresses - Contains other available private IP addresses if the asked for address is taken.
- AvailableIPAddresses *[]string `json:"availableIPAddresses,omitempty"`
-}
-
-// IPConfiguration IP configuration
-type IPConfiguration struct {
- // IPConfigurationPropertiesFormat - Properties of the IP configuration
- *IPConfigurationPropertiesFormat `json:"properties,omitempty"`
- // Name - 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"`
- // Etag - A unique read-only string that changes whenever the resource is updated.
- Etag *string `json:"etag,omitempty"`
- // ID - Resource ID.
- ID *string `json:"id,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for IPConfiguration.
-func (ic IPConfiguration) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if ic.IPConfigurationPropertiesFormat != nil {
- objectMap["properties"] = ic.IPConfigurationPropertiesFormat
- }
- if ic.Name != nil {
- objectMap["name"] = ic.Name
- }
- if ic.Etag != nil {
- objectMap["etag"] = ic.Etag
- }
- if ic.ID != nil {
- objectMap["id"] = ic.ID
- }
- return json.Marshal(objectMap)
-}
-
-// UnmarshalJSON is the custom unmarshaler for IPConfiguration struct.
-func (ic *IPConfiguration) 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 IPConfigurationPropertiesFormat IPConfigurationPropertiesFormat
- err = json.Unmarshal(*v, &IPConfigurationPropertiesFormat)
- if err != nil {
- return err
- }
- ic.IPConfigurationPropertiesFormat = &IPConfigurationPropertiesFormat
- }
- case "name":
- if v != nil {
- var name string
- err = json.Unmarshal(*v, &name)
- if err != nil {
- return err
- }
- ic.Name = &name
- }
- case "etag":
- if v != nil {
- var etag string
- err = json.Unmarshal(*v, &etag)
- if err != nil {
- return err
- }
- ic.Etag = &etag
- }
- case "id":
- if v != nil {
- var ID string
- err = json.Unmarshal(*v, &ID)
- if err != nil {
- return err
- }
- ic.ID = &ID
- }
- }
- }
-
- return nil
-}
-
-// IPConfigurationProfile IP configuration profile child resource.
-type IPConfigurationProfile struct {
- // IPConfigurationProfilePropertiesFormat - Properties of the IP configuration profile.
- *IPConfigurationProfilePropertiesFormat `json:"properties,omitempty"`
- // Name - The name of the resource. This name can be used to access the resource.
- Name *string `json:"name,omitempty"`
- // Type - READ-ONLY; Sub Resource type.
- Type *string `json:"type,omitempty"`
- // Etag - A unique read-only string that changes whenever the resource is updated.
- Etag *string `json:"etag,omitempty"`
- // ID - Resource ID.
- ID *string `json:"id,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for IPConfigurationProfile.
-func (icp IPConfigurationProfile) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if icp.IPConfigurationProfilePropertiesFormat != nil {
- objectMap["properties"] = icp.IPConfigurationProfilePropertiesFormat
- }
- if icp.Name != nil {
- objectMap["name"] = icp.Name
- }
- if icp.Etag != nil {
- objectMap["etag"] = icp.Etag
- }
- if icp.ID != nil {
- objectMap["id"] = icp.ID
- }
- return json.Marshal(objectMap)
-}
-
-// UnmarshalJSON is the custom unmarshaler for IPConfigurationProfile struct.
-func (icp *IPConfigurationProfile) 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 IPConfigurationProfilePropertiesFormat IPConfigurationProfilePropertiesFormat
- err = json.Unmarshal(*v, &IPConfigurationProfilePropertiesFormat)
- if err != nil {
- return err
- }
- icp.IPConfigurationProfilePropertiesFormat = &IPConfigurationProfilePropertiesFormat
- }
- case "name":
- if v != nil {
- var name string
- err = json.Unmarshal(*v, &name)
- if err != nil {
- return err
- }
- icp.Name = &name
- }
- case "type":
- if v != nil {
- var typeVar string
- err = json.Unmarshal(*v, &typeVar)
- if err != nil {
- return err
- }
- icp.Type = &typeVar
- }
- case "etag":
- if v != nil {
- var etag string
- err = json.Unmarshal(*v, &etag)
- if err != nil {
- return err
- }
- icp.Etag = &etag
- }
- case "id":
- if v != nil {
- var ID string
- err = json.Unmarshal(*v, &ID)
- if err != nil {
- return err
- }
- icp.ID = &ID
- }
- }
- }
-
- return nil
-}
-
-// IPConfigurationProfilePropertiesFormat IP configuration profile properties.
-type IPConfigurationProfilePropertiesFormat struct {
- // Subnet - The reference of the subnet resource to create a container network interface ip configuration.
- Subnet *Subnet `json:"subnet,omitempty"`
- // ProvisioningState - READ-ONLY; The provisioning state of the resource.
- ProvisioningState *string `json:"provisioningState,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for IPConfigurationProfilePropertiesFormat.
-func (icppf IPConfigurationProfilePropertiesFormat) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if icppf.Subnet != nil {
- objectMap["subnet"] = icppf.Subnet
- }
- return json.Marshal(objectMap)
-}
-
-// IPConfigurationPropertiesFormat properties of IP configuration.
-type IPConfigurationPropertiesFormat struct {
- // PrivateIPAddress - The private IP address of the IP configuration.
- PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
- // PrivateIPAllocationMethod - The private IP allocation method. Possible values are 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic'
- PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
- // Subnet - The reference of the subnet resource.
- Subnet *Subnet `json:"subnet,omitempty"`
- // PublicIPAddress - The reference of the public IP resource.
- PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"`
- // ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
- ProvisioningState *string `json:"provisioningState,omitempty"`
-}
-
-// IpsecPolicy an IPSec Policy configuration for a virtual network gateway connection
-type IpsecPolicy struct {
- // SaLifeTimeSeconds - The IPSec Security Association (also called Quick Mode or Phase 2 SA) lifetime in seconds for a site to site VPN tunnel.
- SaLifeTimeSeconds *int32 `json:"saLifeTimeSeconds,omitempty"`
- // SaDataSizeKilobytes - The IPSec Security Association (also called Quick Mode or Phase 2 SA) payload size in KB for a site to site VPN tunnel.
- SaDataSizeKilobytes *int32 `json:"saDataSizeKilobytes,omitempty"`
- // IpsecEncryption - The IPSec encryption algorithm (IKE phase 1). Possible values include: 'IpsecEncryptionNone', 'IpsecEncryptionDES', 'IpsecEncryptionDES3', 'IpsecEncryptionAES128', 'IpsecEncryptionAES192', 'IpsecEncryptionAES256', 'IpsecEncryptionGCMAES128', 'IpsecEncryptionGCMAES192', 'IpsecEncryptionGCMAES256'
- IpsecEncryption IpsecEncryption `json:"ipsecEncryption,omitempty"`
- // IpsecIntegrity - The IPSec integrity algorithm (IKE phase 1). Possible values include: 'IpsecIntegrityMD5', 'IpsecIntegritySHA1', 'IpsecIntegritySHA256', 'IpsecIntegrityGCMAES128', 'IpsecIntegrityGCMAES192', 'IpsecIntegrityGCMAES256'
- IpsecIntegrity IpsecIntegrity `json:"ipsecIntegrity,omitempty"`
- // IkeEncryption - The IKE encryption algorithm (IKE phase 2). Possible values include: 'DES', 'DES3', 'AES128', 'AES192', 'AES256', 'GCMAES256', 'GCMAES128'
- IkeEncryption IkeEncryption `json:"ikeEncryption,omitempty"`
- // IkeIntegrity - The IKE integrity algorithm (IKE phase 2). Possible values include: 'IkeIntegrityMD5', 'IkeIntegritySHA1', 'IkeIntegritySHA256', 'IkeIntegritySHA384', 'IkeIntegrityGCMAES256', 'IkeIntegrityGCMAES128'
- IkeIntegrity IkeIntegrity `json:"ikeIntegrity,omitempty"`
- // DhGroup - The DH Groups used in IKE Phase 1 for initial SA. Possible values include: 'None', 'DHGroup1', 'DHGroup2', 'DHGroup14', 'DHGroup2048', 'ECP256', 'ECP384', 'DHGroup24'
- DhGroup DhGroup `json:"dhGroup,omitempty"`
- // PfsGroup - The Pfs Groups used in IKE Phase 2 for new child SA. Possible values include: 'PfsGroupNone', 'PfsGroupPFS1', 'PfsGroupPFS2', 'PfsGroupPFS2048', 'PfsGroupECP256', 'PfsGroupECP384', 'PfsGroupPFS24', 'PfsGroupPFS14', 'PfsGroupPFSMM'
- PfsGroup PfsGroup `json:"pfsGroup,omitempty"`
-}
-
-// IPTag contains the IpTag associated with the object
-type IPTag struct {
- // IPTagType - Gets or sets the ipTag type: Example FirstPartyUsage.
- IPTagType *string `json:"ipTagType,omitempty"`
- // Tag - Gets or sets value of the IpTag associated with the public IP. Example SQL, Storage etc
- Tag *string `json:"tag,omitempty"`
-}
-
-// Ipv6ExpressRouteCircuitPeeringConfig contains IPv6 peering config.
-type Ipv6ExpressRouteCircuitPeeringConfig struct {
- // PrimaryPeerAddressPrefix - The primary address prefix.
- PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"`
- // SecondaryPeerAddressPrefix - The secondary address prefix.
- SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"`
- // MicrosoftPeeringConfig - The Microsoft peering configuration.
- MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"`
- // RouteFilter - The reference of the RouteFilter resource.
- RouteFilter *RouteFilter `json:"routeFilter,omitempty"`
- // State - The state of peering. Possible values are: 'Disabled' and 'Enabled'. Possible values include: 'ExpressRouteCircuitPeeringStateDisabled', 'ExpressRouteCircuitPeeringStateEnabled'
- State ExpressRouteCircuitPeeringState `json:"state,omitempty"`
-}
-
-// ListHubVirtualNetworkConnectionsResult list of HubVirtualNetworkConnections and a URL nextLink to get the
-// next set of results.
-type ListHubVirtualNetworkConnectionsResult struct {
- autorest.Response `json:"-"`
- // Value - List of HubVirtualNetworkConnections.
- Value *[]HubVirtualNetworkConnection `json:"value,omitempty"`
- // NextLink - URL to get the next set of operation list results if there are any.
- NextLink *string `json:"nextLink,omitempty"`
-}
-
-// ListHubVirtualNetworkConnectionsResultIterator provides access to a complete listing of
-// HubVirtualNetworkConnection values.
-type ListHubVirtualNetworkConnectionsResultIterator struct {
- i int
- page ListHubVirtualNetworkConnectionsResultPage
-}
-
-// 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 *ListHubVirtualNetworkConnectionsResultIterator) NextWithContext(ctx context.Context) (err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/ListHubVirtualNetworkConnectionsResultIterator.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 *ListHubVirtualNetworkConnectionsResultIterator) Next() error {
- return iter.NextWithContext(context.Background())
-}
-
-// NotDone returns true if the enumeration should be started or is not yet complete.
-func (iter ListHubVirtualNetworkConnectionsResultIterator) 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 ListHubVirtualNetworkConnectionsResultIterator) Response() ListHubVirtualNetworkConnectionsResult {
- 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 ListHubVirtualNetworkConnectionsResultIterator) Value() HubVirtualNetworkConnection {
- if !iter.page.NotDone() {
- return HubVirtualNetworkConnection{}
- }
- return iter.page.Values()[iter.i]
-}
-
-// Creates a new instance of the ListHubVirtualNetworkConnectionsResultIterator type.
-func NewListHubVirtualNetworkConnectionsResultIterator(page ListHubVirtualNetworkConnectionsResultPage) ListHubVirtualNetworkConnectionsResultIterator {
- return ListHubVirtualNetworkConnectionsResultIterator{page: page}
-}
-
-// IsEmpty returns true if the ListResult contains no values.
-func (lhvncr ListHubVirtualNetworkConnectionsResult) IsEmpty() bool {
- return lhvncr.Value == nil || len(*lhvncr.Value) == 0
-}
-
-// hasNextLink returns true if the NextLink is not empty.
-func (lhvncr ListHubVirtualNetworkConnectionsResult) hasNextLink() bool {
- return lhvncr.NextLink != nil && len(*lhvncr.NextLink) != 0
-}
-
-// listHubVirtualNetworkConnectionsResultPreparer prepares a request to retrieve the next set of results.
-// It returns nil if no more results exist.
-func (lhvncr ListHubVirtualNetworkConnectionsResult) listHubVirtualNetworkConnectionsResultPreparer(ctx context.Context) (*http.Request, error) {
- if !lhvncr.hasNextLink() {
- return nil, nil
- }
- return autorest.Prepare((&http.Request{}).WithContext(ctx),
- autorest.AsJSON(),
- autorest.AsGet(),
- autorest.WithBaseURL(to.String(lhvncr.NextLink)))
-}
-
-// ListHubVirtualNetworkConnectionsResultPage contains a page of HubVirtualNetworkConnection values.
-type ListHubVirtualNetworkConnectionsResultPage struct {
- fn func(context.Context, ListHubVirtualNetworkConnectionsResult) (ListHubVirtualNetworkConnectionsResult, error)
- lhvncr ListHubVirtualNetworkConnectionsResult
-}
-
-// 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 *ListHubVirtualNetworkConnectionsResultPage) NextWithContext(ctx context.Context) (err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/ListHubVirtualNetworkConnectionsResultPage.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.lhvncr)
- if err != nil {
- return err
- }
- page.lhvncr = 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 *ListHubVirtualNetworkConnectionsResultPage) Next() error {
- return page.NextWithContext(context.Background())
-}
-
-// NotDone returns true if the page enumeration should be started or is not yet complete.
-func (page ListHubVirtualNetworkConnectionsResultPage) NotDone() bool {
- return !page.lhvncr.IsEmpty()
-}
-
-// Response returns the raw server response from the last page request.
-func (page ListHubVirtualNetworkConnectionsResultPage) Response() ListHubVirtualNetworkConnectionsResult {
- return page.lhvncr
-}
-
-// Values returns the slice of values for the current page or nil if there are no values.
-func (page ListHubVirtualNetworkConnectionsResultPage) Values() []HubVirtualNetworkConnection {
- if page.lhvncr.IsEmpty() {
- return nil
- }
- return *page.lhvncr.Value
-}
-
-// Creates a new instance of the ListHubVirtualNetworkConnectionsResultPage type.
-func NewListHubVirtualNetworkConnectionsResultPage(getNextPage func(context.Context, ListHubVirtualNetworkConnectionsResult) (ListHubVirtualNetworkConnectionsResult, error)) ListHubVirtualNetworkConnectionsResultPage {
- return ListHubVirtualNetworkConnectionsResultPage{fn: getNextPage}
-}
-
-// ListP2SVpnGatewaysResult result of the request to list P2SVpnGateways. It contains a list of P2SVpnGateways
-// and a URL nextLink to get the next set of results.
-type ListP2SVpnGatewaysResult struct {
- autorest.Response `json:"-"`
- // Value - List of P2SVpnGateways.
- Value *[]P2SVpnGateway `json:"value,omitempty"`
- // NextLink - URL to get the next set of operation list results if there are any.
- NextLink *string `json:"nextLink,omitempty"`
-}
-
-// ListP2SVpnGatewaysResultIterator provides access to a complete listing of P2SVpnGateway values.
-type ListP2SVpnGatewaysResultIterator struct {
- i int
- page ListP2SVpnGatewaysResultPage
-}
-
-// 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 *ListP2SVpnGatewaysResultIterator) NextWithContext(ctx context.Context) (err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/ListP2SVpnGatewaysResultIterator.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 *ListP2SVpnGatewaysResultIterator) Next() error {
- return iter.NextWithContext(context.Background())
-}
-
-// NotDone returns true if the enumeration should be started or is not yet complete.
-func (iter ListP2SVpnGatewaysResultIterator) 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 ListP2SVpnGatewaysResultIterator) Response() ListP2SVpnGatewaysResult {
- 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 ListP2SVpnGatewaysResultIterator) Value() P2SVpnGateway {
- if !iter.page.NotDone() {
- return P2SVpnGateway{}
- }
- return iter.page.Values()[iter.i]
-}
-
-// Creates a new instance of the ListP2SVpnGatewaysResultIterator type.
-func NewListP2SVpnGatewaysResultIterator(page ListP2SVpnGatewaysResultPage) ListP2SVpnGatewaysResultIterator {
- return ListP2SVpnGatewaysResultIterator{page: page}
-}
-
-// IsEmpty returns true if the ListResult contains no values.
-func (lpvgr ListP2SVpnGatewaysResult) IsEmpty() bool {
- return lpvgr.Value == nil || len(*lpvgr.Value) == 0
-}
-
-// hasNextLink returns true if the NextLink is not empty.
-func (lpvgr ListP2SVpnGatewaysResult) hasNextLink() bool {
- return lpvgr.NextLink != nil && len(*lpvgr.NextLink) != 0
-}
-
-// listP2SVpnGatewaysResultPreparer prepares a request to retrieve the next set of results.
-// It returns nil if no more results exist.
-func (lpvgr ListP2SVpnGatewaysResult) listP2SVpnGatewaysResultPreparer(ctx context.Context) (*http.Request, error) {
- if !lpvgr.hasNextLink() {
- return nil, nil
- }
- return autorest.Prepare((&http.Request{}).WithContext(ctx),
- autorest.AsJSON(),
- autorest.AsGet(),
- autorest.WithBaseURL(to.String(lpvgr.NextLink)))
-}
-
-// ListP2SVpnGatewaysResultPage contains a page of P2SVpnGateway values.
-type ListP2SVpnGatewaysResultPage struct {
- fn func(context.Context, ListP2SVpnGatewaysResult) (ListP2SVpnGatewaysResult, error)
- lpvgr ListP2SVpnGatewaysResult
-}
-
-// 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 *ListP2SVpnGatewaysResultPage) NextWithContext(ctx context.Context) (err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/ListP2SVpnGatewaysResultPage.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.lpvgr)
- if err != nil {
- return err
- }
- page.lpvgr = 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 *ListP2SVpnGatewaysResultPage) Next() error {
- return page.NextWithContext(context.Background())
-}
-
-// NotDone returns true if the page enumeration should be started or is not yet complete.
-func (page ListP2SVpnGatewaysResultPage) NotDone() bool {
- return !page.lpvgr.IsEmpty()
-}
-
-// Response returns the raw server response from the last page request.
-func (page ListP2SVpnGatewaysResultPage) Response() ListP2SVpnGatewaysResult {
- return page.lpvgr
-}
-
-// Values returns the slice of values for the current page or nil if there are no values.
-func (page ListP2SVpnGatewaysResultPage) Values() []P2SVpnGateway {
- if page.lpvgr.IsEmpty() {
- return nil
- }
- return *page.lpvgr.Value
-}
-
-// Creates a new instance of the ListP2SVpnGatewaysResultPage type.
-func NewListP2SVpnGatewaysResultPage(getNextPage func(context.Context, ListP2SVpnGatewaysResult) (ListP2SVpnGatewaysResult, error)) ListP2SVpnGatewaysResultPage {
- return ListP2SVpnGatewaysResultPage{fn: getNextPage}
-}
-
-// ListP2SVpnServerConfigurationsResult result of the request to list all P2SVpnServerConfigurations associated
-// to a VirtualWan. It contains a list of P2SVpnServerConfigurations and a URL nextLink to get the next set of
-// results.
-type ListP2SVpnServerConfigurationsResult struct {
- autorest.Response `json:"-"`
- // Value - List of P2SVpnServerConfigurations.
- Value *[]P2SVpnServerConfiguration `json:"value,omitempty"`
- // NextLink - URL to get the next set of operation list results if there are any.
- NextLink *string `json:"nextLink,omitempty"`
-}
-
-// ListP2SVpnServerConfigurationsResultIterator provides access to a complete listing of
-// P2SVpnServerConfiguration values.
-type ListP2SVpnServerConfigurationsResultIterator struct {
- i int
- page ListP2SVpnServerConfigurationsResultPage
-}
-
-// 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 *ListP2SVpnServerConfigurationsResultIterator) NextWithContext(ctx context.Context) (err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/ListP2SVpnServerConfigurationsResultIterator.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 *ListP2SVpnServerConfigurationsResultIterator) Next() error {
- return iter.NextWithContext(context.Background())
-}
-
-// NotDone returns true if the enumeration should be started or is not yet complete.
-func (iter ListP2SVpnServerConfigurationsResultIterator) 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 ListP2SVpnServerConfigurationsResultIterator) Response() ListP2SVpnServerConfigurationsResult {
- 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 ListP2SVpnServerConfigurationsResultIterator) Value() P2SVpnServerConfiguration {
- if !iter.page.NotDone() {
- return P2SVpnServerConfiguration{}
- }
- return iter.page.Values()[iter.i]
-}
-
-// Creates a new instance of the ListP2SVpnServerConfigurationsResultIterator type.
-func NewListP2SVpnServerConfigurationsResultIterator(page ListP2SVpnServerConfigurationsResultPage) ListP2SVpnServerConfigurationsResultIterator {
- return ListP2SVpnServerConfigurationsResultIterator{page: page}
-}
-
-// IsEmpty returns true if the ListResult contains no values.
-func (lpvscr ListP2SVpnServerConfigurationsResult) IsEmpty() bool {
- return lpvscr.Value == nil || len(*lpvscr.Value) == 0
-}
-
-// hasNextLink returns true if the NextLink is not empty.
-func (lpvscr ListP2SVpnServerConfigurationsResult) hasNextLink() bool {
- return lpvscr.NextLink != nil && len(*lpvscr.NextLink) != 0
-}
-
-// listP2SVpnServerConfigurationsResultPreparer prepares a request to retrieve the next set of results.
-// It returns nil if no more results exist.
-func (lpvscr ListP2SVpnServerConfigurationsResult) listP2SVpnServerConfigurationsResultPreparer(ctx context.Context) (*http.Request, error) {
- if !lpvscr.hasNextLink() {
- return nil, nil
- }
- return autorest.Prepare((&http.Request{}).WithContext(ctx),
- autorest.AsJSON(),
- autorest.AsGet(),
- autorest.WithBaseURL(to.String(lpvscr.NextLink)))
-}
-
-// ListP2SVpnServerConfigurationsResultPage contains a page of P2SVpnServerConfiguration values.
-type ListP2SVpnServerConfigurationsResultPage struct {
- fn func(context.Context, ListP2SVpnServerConfigurationsResult) (ListP2SVpnServerConfigurationsResult, error)
- lpvscr ListP2SVpnServerConfigurationsResult
-}
-
-// 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 *ListP2SVpnServerConfigurationsResultPage) NextWithContext(ctx context.Context) (err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/ListP2SVpnServerConfigurationsResultPage.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.lpvscr)
- if err != nil {
- return err
- }
- page.lpvscr = 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 *ListP2SVpnServerConfigurationsResultPage) Next() error {
- return page.NextWithContext(context.Background())
-}
-
-// NotDone returns true if the page enumeration should be started or is not yet complete.
-func (page ListP2SVpnServerConfigurationsResultPage) NotDone() bool {
- return !page.lpvscr.IsEmpty()
-}
-
-// Response returns the raw server response from the last page request.
-func (page ListP2SVpnServerConfigurationsResultPage) Response() ListP2SVpnServerConfigurationsResult {
- return page.lpvscr
-}
-
-// Values returns the slice of values for the current page or nil if there are no values.
-func (page ListP2SVpnServerConfigurationsResultPage) Values() []P2SVpnServerConfiguration {
- if page.lpvscr.IsEmpty() {
- return nil
- }
- return *page.lpvscr.Value
-}
-
-// Creates a new instance of the ListP2SVpnServerConfigurationsResultPage type.
-func NewListP2SVpnServerConfigurationsResultPage(getNextPage func(context.Context, ListP2SVpnServerConfigurationsResult) (ListP2SVpnServerConfigurationsResult, error)) ListP2SVpnServerConfigurationsResultPage {
- return ListP2SVpnServerConfigurationsResultPage{fn: getNextPage}
-}
-
-// ListString ...
-type ListString struct {
- autorest.Response `json:"-"`
- Value *[]string `json:"value,omitempty"`
-}
-
-// ListVirtualHubsResult result of the request to list VirtualHubs. It contains a list of VirtualHubs and a URL
-// nextLink to get the next set of results.
-type ListVirtualHubsResult struct {
- autorest.Response `json:"-"`
- // Value - List of VirtualHubs.
- Value *[]VirtualHub `json:"value,omitempty"`
- // NextLink - URL to get the next set of operation list results if there are any.
- NextLink *string `json:"nextLink,omitempty"`
-}
-
-// ListVirtualHubsResultIterator provides access to a complete listing of VirtualHub values.
-type ListVirtualHubsResultIterator struct {
- i int
- page ListVirtualHubsResultPage
-}
-
-// 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 *ListVirtualHubsResultIterator) NextWithContext(ctx context.Context) (err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualHubsResultIterator.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 *ListVirtualHubsResultIterator) Next() error {
- return iter.NextWithContext(context.Background())
-}
-
-// NotDone returns true if the enumeration should be started or is not yet complete.
-func (iter ListVirtualHubsResultIterator) 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 ListVirtualHubsResultIterator) Response() ListVirtualHubsResult {
- 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 ListVirtualHubsResultIterator) Value() VirtualHub {
- if !iter.page.NotDone() {
- return VirtualHub{}
- }
- return iter.page.Values()[iter.i]
-}
-
-// Creates a new instance of the ListVirtualHubsResultIterator type.
-func NewListVirtualHubsResultIterator(page ListVirtualHubsResultPage) ListVirtualHubsResultIterator {
- return ListVirtualHubsResultIterator{page: page}
-}
-
-// IsEmpty returns true if the ListResult contains no values.
-func (lvhr ListVirtualHubsResult) IsEmpty() bool {
- return lvhr.Value == nil || len(*lvhr.Value) == 0
-}
-
-// hasNextLink returns true if the NextLink is not empty.
-func (lvhr ListVirtualHubsResult) hasNextLink() bool {
- return lvhr.NextLink != nil && len(*lvhr.NextLink) != 0
-}
-
-// listVirtualHubsResultPreparer prepares a request to retrieve the next set of results.
-// It returns nil if no more results exist.
-func (lvhr ListVirtualHubsResult) listVirtualHubsResultPreparer(ctx context.Context) (*http.Request, error) {
- if !lvhr.hasNextLink() {
- return nil, nil
- }
- return autorest.Prepare((&http.Request{}).WithContext(ctx),
- autorest.AsJSON(),
- autorest.AsGet(),
- autorest.WithBaseURL(to.String(lvhr.NextLink)))
-}
-
-// ListVirtualHubsResultPage contains a page of VirtualHub values.
-type ListVirtualHubsResultPage struct {
- fn func(context.Context, ListVirtualHubsResult) (ListVirtualHubsResult, error)
- lvhr ListVirtualHubsResult
-}
-
-// 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 *ListVirtualHubsResultPage) NextWithContext(ctx context.Context) (err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualHubsResultPage.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.lvhr)
- if err != nil {
- return err
- }
- page.lvhr = 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 *ListVirtualHubsResultPage) Next() error {
- return page.NextWithContext(context.Background())
-}
-
-// NotDone returns true if the page enumeration should be started or is not yet complete.
-func (page ListVirtualHubsResultPage) NotDone() bool {
- return !page.lvhr.IsEmpty()
-}
-
-// Response returns the raw server response from the last page request.
-func (page ListVirtualHubsResultPage) Response() ListVirtualHubsResult {
- return page.lvhr
-}
-
-// Values returns the slice of values for the current page or nil if there are no values.
-func (page ListVirtualHubsResultPage) Values() []VirtualHub {
- if page.lvhr.IsEmpty() {
- return nil
- }
- return *page.lvhr.Value
-}
-
-// Creates a new instance of the ListVirtualHubsResultPage type.
-func NewListVirtualHubsResultPage(getNextPage func(context.Context, ListVirtualHubsResult) (ListVirtualHubsResult, error)) ListVirtualHubsResultPage {
- return ListVirtualHubsResultPage{fn: getNextPage}
-}
-
-// ListVirtualWANsResult result of the request to list VirtualWANs. It contains a list of VirtualWANs and a URL
-// nextLink to get the next set of results.
-type ListVirtualWANsResult struct {
- autorest.Response `json:"-"`
- // Value - List of VirtualWANs.
- Value *[]VirtualWAN `json:"value,omitempty"`
- // NextLink - URL to get the next set of operation list results if there are any.
- NextLink *string `json:"nextLink,omitempty"`
-}
-
-// ListVirtualWANsResultIterator provides access to a complete listing of VirtualWAN values.
-type ListVirtualWANsResultIterator struct {
- i int
- page ListVirtualWANsResultPage
-}
-
-// 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 *ListVirtualWANsResultIterator) NextWithContext(ctx context.Context) (err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualWANsResultIterator.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 *ListVirtualWANsResultIterator) Next() error {
- return iter.NextWithContext(context.Background())
-}
-
-// NotDone returns true if the enumeration should be started or is not yet complete.
-func (iter ListVirtualWANsResultIterator) 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 ListVirtualWANsResultIterator) Response() ListVirtualWANsResult {
- 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 ListVirtualWANsResultIterator) Value() VirtualWAN {
- if !iter.page.NotDone() {
- return VirtualWAN{}
- }
- return iter.page.Values()[iter.i]
-}
-
-// Creates a new instance of the ListVirtualWANsResultIterator type.
-func NewListVirtualWANsResultIterator(page ListVirtualWANsResultPage) ListVirtualWANsResultIterator {
- return ListVirtualWANsResultIterator{page: page}
-}
-
-// IsEmpty returns true if the ListResult contains no values.
-func (lvwnr ListVirtualWANsResult) IsEmpty() bool {
- return lvwnr.Value == nil || len(*lvwnr.Value) == 0
-}
-
-// hasNextLink returns true if the NextLink is not empty.
-func (lvwnr ListVirtualWANsResult) hasNextLink() bool {
- return lvwnr.NextLink != nil && len(*lvwnr.NextLink) != 0
-}
-
-// listVirtualWANsResultPreparer prepares a request to retrieve the next set of results.
-// It returns nil if no more results exist.
-func (lvwnr ListVirtualWANsResult) listVirtualWANsResultPreparer(ctx context.Context) (*http.Request, error) {
- if !lvwnr.hasNextLink() {
- return nil, nil
- }
- return autorest.Prepare((&http.Request{}).WithContext(ctx),
- autorest.AsJSON(),
- autorest.AsGet(),
- autorest.WithBaseURL(to.String(lvwnr.NextLink)))
-}
-
-// ListVirtualWANsResultPage contains a page of VirtualWAN values.
-type ListVirtualWANsResultPage struct {
- fn func(context.Context, ListVirtualWANsResult) (ListVirtualWANsResult, error)
- lvwnr ListVirtualWANsResult
-}
-
-// 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 *ListVirtualWANsResultPage) NextWithContext(ctx context.Context) (err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualWANsResultPage.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.lvwnr)
- if err != nil {
- return err
- }
- page.lvwnr = 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 *ListVirtualWANsResultPage) Next() error {
- return page.NextWithContext(context.Background())
-}
-
-// NotDone returns true if the page enumeration should be started or is not yet complete.
-func (page ListVirtualWANsResultPage) NotDone() bool {
- return !page.lvwnr.IsEmpty()
-}
-
-// Response returns the raw server response from the last page request.
-func (page ListVirtualWANsResultPage) Response() ListVirtualWANsResult {
- return page.lvwnr
-}
-
-// Values returns the slice of values for the current page or nil if there are no values.
-func (page ListVirtualWANsResultPage) Values() []VirtualWAN {
- if page.lvwnr.IsEmpty() {
- return nil
- }
- return *page.lvwnr.Value
-}
-
-// Creates a new instance of the ListVirtualWANsResultPage type.
-func NewListVirtualWANsResultPage(getNextPage func(context.Context, ListVirtualWANsResult) (ListVirtualWANsResult, error)) ListVirtualWANsResultPage {
- return ListVirtualWANsResultPage{fn: getNextPage}
-}
-
-// ListVpnConnectionsResult result of the request to list all vpn connections to a virtual wan vpn gateway. It
-// contains a list of Vpn Connections and a URL nextLink to get the next set of results.
-type ListVpnConnectionsResult struct {
- autorest.Response `json:"-"`
- // Value - List of Vpn Connections.
- Value *[]VpnConnection `json:"value,omitempty"`
- // NextLink - URL to get the next set of operation list results if there are any.
- NextLink *string `json:"nextLink,omitempty"`
-}
-
-// ListVpnConnectionsResultIterator provides access to a complete listing of VpnConnection values.
-type ListVpnConnectionsResultIterator struct {
- i int
- page ListVpnConnectionsResultPage
-}
-
-// 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 *ListVpnConnectionsResultIterator) NextWithContext(ctx context.Context) (err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnConnectionsResultIterator.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 *ListVpnConnectionsResultIterator) Next() error {
- return iter.NextWithContext(context.Background())
-}
-
-// NotDone returns true if the enumeration should be started or is not yet complete.
-func (iter ListVpnConnectionsResultIterator) 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 ListVpnConnectionsResultIterator) Response() ListVpnConnectionsResult {
- 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 ListVpnConnectionsResultIterator) Value() VpnConnection {
- if !iter.page.NotDone() {
- return VpnConnection{}
- }
- return iter.page.Values()[iter.i]
-}
-
-// Creates a new instance of the ListVpnConnectionsResultIterator type.
-func NewListVpnConnectionsResultIterator(page ListVpnConnectionsResultPage) ListVpnConnectionsResultIterator {
- return ListVpnConnectionsResultIterator{page: page}
-}
-
-// IsEmpty returns true if the ListResult contains no values.
-func (lvcr ListVpnConnectionsResult) IsEmpty() bool {
- return lvcr.Value == nil || len(*lvcr.Value) == 0
-}
-
-// hasNextLink returns true if the NextLink is not empty.
-func (lvcr ListVpnConnectionsResult) hasNextLink() bool {
- return lvcr.NextLink != nil && len(*lvcr.NextLink) != 0
-}
-
-// listVpnConnectionsResultPreparer prepares a request to retrieve the next set of results.
-// It returns nil if no more results exist.
-func (lvcr ListVpnConnectionsResult) listVpnConnectionsResultPreparer(ctx context.Context) (*http.Request, error) {
- if !lvcr.hasNextLink() {
- return nil, nil
- }
- return autorest.Prepare((&http.Request{}).WithContext(ctx),
- autorest.AsJSON(),
- autorest.AsGet(),
- autorest.WithBaseURL(to.String(lvcr.NextLink)))
-}
-
-// ListVpnConnectionsResultPage contains a page of VpnConnection values.
-type ListVpnConnectionsResultPage struct {
- fn func(context.Context, ListVpnConnectionsResult) (ListVpnConnectionsResult, error)
- lvcr ListVpnConnectionsResult
-}
-
-// 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 *ListVpnConnectionsResultPage) NextWithContext(ctx context.Context) (err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnConnectionsResultPage.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.lvcr)
- if err != nil {
- return err
- }
- page.lvcr = 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 *ListVpnConnectionsResultPage) Next() error {
- return page.NextWithContext(context.Background())
-}
-
-// NotDone returns true if the page enumeration should be started or is not yet complete.
-func (page ListVpnConnectionsResultPage) NotDone() bool {
- return !page.lvcr.IsEmpty()
-}
-
-// Response returns the raw server response from the last page request.
-func (page ListVpnConnectionsResultPage) Response() ListVpnConnectionsResult {
- return page.lvcr
-}
-
-// Values returns the slice of values for the current page or nil if there are no values.
-func (page ListVpnConnectionsResultPage) Values() []VpnConnection {
- if page.lvcr.IsEmpty() {
- return nil
- }
- return *page.lvcr.Value
-}
-
-// Creates a new instance of the ListVpnConnectionsResultPage type.
-func NewListVpnConnectionsResultPage(getNextPage func(context.Context, ListVpnConnectionsResult) (ListVpnConnectionsResult, error)) ListVpnConnectionsResultPage {
- return ListVpnConnectionsResultPage{fn: getNextPage}
-}
-
-// ListVpnGatewaysResult result of the request to list VpnGateways. It contains a list of VpnGateways and a URL
-// nextLink to get the next set of results.
-type ListVpnGatewaysResult struct {
- autorest.Response `json:"-"`
- // Value - List of VpnGateways.
- Value *[]VpnGateway `json:"value,omitempty"`
- // NextLink - URL to get the next set of operation list results if there are any.
- NextLink *string `json:"nextLink,omitempty"`
-}
-
-// ListVpnGatewaysResultIterator provides access to a complete listing of VpnGateway values.
-type ListVpnGatewaysResultIterator struct {
- i int
- page ListVpnGatewaysResultPage
-}
-
-// 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 *ListVpnGatewaysResultIterator) NextWithContext(ctx context.Context) (err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnGatewaysResultIterator.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 *ListVpnGatewaysResultIterator) Next() error {
- return iter.NextWithContext(context.Background())
-}
-
-// NotDone returns true if the enumeration should be started or is not yet complete.
-func (iter ListVpnGatewaysResultIterator) 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 ListVpnGatewaysResultIterator) Response() ListVpnGatewaysResult {
- 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 ListVpnGatewaysResultIterator) Value() VpnGateway {
- if !iter.page.NotDone() {
- return VpnGateway{}
- }
- return iter.page.Values()[iter.i]
-}
-
-// Creates a new instance of the ListVpnGatewaysResultIterator type.
-func NewListVpnGatewaysResultIterator(page ListVpnGatewaysResultPage) ListVpnGatewaysResultIterator {
- return ListVpnGatewaysResultIterator{page: page}
-}
-
-// IsEmpty returns true if the ListResult contains no values.
-func (lvgr ListVpnGatewaysResult) IsEmpty() bool {
- return lvgr.Value == nil || len(*lvgr.Value) == 0
-}
-
-// hasNextLink returns true if the NextLink is not empty.
-func (lvgr ListVpnGatewaysResult) hasNextLink() bool {
- return lvgr.NextLink != nil && len(*lvgr.NextLink) != 0
-}
-
-// listVpnGatewaysResultPreparer prepares a request to retrieve the next set of results.
-// It returns nil if no more results exist.
-func (lvgr ListVpnGatewaysResult) listVpnGatewaysResultPreparer(ctx context.Context) (*http.Request, error) {
- if !lvgr.hasNextLink() {
- return nil, nil
- }
- return autorest.Prepare((&http.Request{}).WithContext(ctx),
- autorest.AsJSON(),
- autorest.AsGet(),
- autorest.WithBaseURL(to.String(lvgr.NextLink)))
-}
-
-// ListVpnGatewaysResultPage contains a page of VpnGateway values.
-type ListVpnGatewaysResultPage struct {
- fn func(context.Context, ListVpnGatewaysResult) (ListVpnGatewaysResult, error)
- lvgr ListVpnGatewaysResult
-}
-
-// 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 *ListVpnGatewaysResultPage) NextWithContext(ctx context.Context) (err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnGatewaysResultPage.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.lvgr)
- if err != nil {
- return err
- }
- page.lvgr = 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 *ListVpnGatewaysResultPage) Next() error {
- return page.NextWithContext(context.Background())
-}
-
-// NotDone returns true if the page enumeration should be started or is not yet complete.
-func (page ListVpnGatewaysResultPage) NotDone() bool {
- return !page.lvgr.IsEmpty()
-}
-
-// Response returns the raw server response from the last page request.
-func (page ListVpnGatewaysResultPage) Response() ListVpnGatewaysResult {
- return page.lvgr
-}
-
-// Values returns the slice of values for the current page or nil if there are no values.
-func (page ListVpnGatewaysResultPage) Values() []VpnGateway {
- if page.lvgr.IsEmpty() {
- return nil
- }
- return *page.lvgr.Value
-}
-
-// Creates a new instance of the ListVpnGatewaysResultPage type.
-func NewListVpnGatewaysResultPage(getNextPage func(context.Context, ListVpnGatewaysResult) (ListVpnGatewaysResult, error)) ListVpnGatewaysResultPage {
- return ListVpnGatewaysResultPage{fn: getNextPage}
-}
-
-// ListVpnSitesResult result of the request to list VpnSites. It contains a list of VpnSites and a URL nextLink
-// to get the next set of results.
-type ListVpnSitesResult struct {
- autorest.Response `json:"-"`
- // Value - List of VpnSites.
- Value *[]VpnSite `json:"value,omitempty"`
- // NextLink - URL to get the next set of operation list results if there are any.
- NextLink *string `json:"nextLink,omitempty"`
-}
-
-// ListVpnSitesResultIterator provides access to a complete listing of VpnSite values.
-type ListVpnSitesResultIterator struct {
- i int
- page ListVpnSitesResultPage
-}
-
-// 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 *ListVpnSitesResultIterator) NextWithContext(ctx context.Context) (err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnSitesResultIterator.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 *ListVpnSitesResultIterator) Next() error {
- return iter.NextWithContext(context.Background())
-}
-
-// NotDone returns true if the enumeration should be started or is not yet complete.
-func (iter ListVpnSitesResultIterator) 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 ListVpnSitesResultIterator) Response() ListVpnSitesResult {
- 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 ListVpnSitesResultIterator) Value() VpnSite {
- if !iter.page.NotDone() {
- return VpnSite{}
- }
- return iter.page.Values()[iter.i]
-}
-
-// Creates a new instance of the ListVpnSitesResultIterator type.
-func NewListVpnSitesResultIterator(page ListVpnSitesResultPage) ListVpnSitesResultIterator {
- return ListVpnSitesResultIterator{page: page}
-}
-
-// IsEmpty returns true if the ListResult contains no values.
-func (lvsr ListVpnSitesResult) IsEmpty() bool {
- return lvsr.Value == nil || len(*lvsr.Value) == 0
-}
-
-// hasNextLink returns true if the NextLink is not empty.
-func (lvsr ListVpnSitesResult) hasNextLink() bool {
- return lvsr.NextLink != nil && len(*lvsr.NextLink) != 0
-}
-
-// listVpnSitesResultPreparer prepares a request to retrieve the next set of results.
-// It returns nil if no more results exist.
-func (lvsr ListVpnSitesResult) listVpnSitesResultPreparer(ctx context.Context) (*http.Request, error) {
- if !lvsr.hasNextLink() {
- return nil, nil
- }
- return autorest.Prepare((&http.Request{}).WithContext(ctx),
- autorest.AsJSON(),
- autorest.AsGet(),
- autorest.WithBaseURL(to.String(lvsr.NextLink)))
-}
-
-// ListVpnSitesResultPage contains a page of VpnSite values.
-type ListVpnSitesResultPage struct {
- fn func(context.Context, ListVpnSitesResult) (ListVpnSitesResult, error)
- lvsr ListVpnSitesResult
-}
-
-// 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 *ListVpnSitesResultPage) NextWithContext(ctx context.Context) (err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnSitesResultPage.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.lvsr)
- if err != nil {
- return err
- }
- page.lvsr = 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 *ListVpnSitesResultPage) Next() error {
- return page.NextWithContext(context.Background())
-}
-
-// NotDone returns true if the page enumeration should be started or is not yet complete.
-func (page ListVpnSitesResultPage) NotDone() bool {
- return !page.lvsr.IsEmpty()
-}
-
-// Response returns the raw server response from the last page request.
-func (page ListVpnSitesResultPage) Response() ListVpnSitesResult {
- return page.lvsr
-}
-
-// Values returns the slice of values for the current page or nil if there are no values.
-func (page ListVpnSitesResultPage) Values() []VpnSite {
- if page.lvsr.IsEmpty() {
- return nil
- }
- return *page.lvsr.Value
-}
-
-// Creates a new instance of the ListVpnSitesResultPage type.
-func NewListVpnSitesResultPage(getNextPage func(context.Context, ListVpnSitesResult) (ListVpnSitesResult, error)) ListVpnSitesResultPage {
- return ListVpnSitesResultPage{fn: getNextPage}
-}
-
-// LoadBalancer loadBalancer resource
-type LoadBalancer struct {
- autorest.Response `json:"-"`
- // Sku - The load balancer SKU.
- Sku *LoadBalancerSku `json:"sku,omitempty"`
- // LoadBalancerPropertiesFormat - Properties of load balancer.
- *LoadBalancerPropertiesFormat `json:"properties,omitempty"`
- // Etag - A unique read-only string that changes whenever the resource is updated.
- Etag *string `json:"etag,omitempty"`
- // ID - 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 LoadBalancer.
-func (lb LoadBalancer) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if lb.Sku != nil {
- objectMap["sku"] = lb.Sku
- }
- if lb.LoadBalancerPropertiesFormat != nil {
- objectMap["properties"] = lb.LoadBalancerPropertiesFormat
- }
- if lb.Etag != nil {
- objectMap["etag"] = lb.Etag
- }
- if lb.ID != nil {
- objectMap["id"] = lb.ID
- }
- if lb.Location != nil {
- objectMap["location"] = lb.Location
- }
- if lb.Tags != nil {
- objectMap["tags"] = lb.Tags
- }
- return json.Marshal(objectMap)
-}
-
-// UnmarshalJSON is the custom unmarshaler for LoadBalancer struct.
-func (lb *LoadBalancer) 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 LoadBalancerSku
- err = json.Unmarshal(*v, &sku)
- if err != nil {
- return err
- }
- lb.Sku = &sku
- }
- case "properties":
- if v != nil {
- var loadBalancerPropertiesFormat LoadBalancerPropertiesFormat
- err = json.Unmarshal(*v, &loadBalancerPropertiesFormat)
- if err != nil {
- return err
- }
- lb.LoadBalancerPropertiesFormat = &loadBalancerPropertiesFormat
- }
- case "etag":
- if v != nil {
- var etag string
- err = json.Unmarshal(*v, &etag)
- if err != nil {
- return err
- }
- lb.Etag = &etag
- }
- case "id":
- if v != nil {
- var ID string
- err = json.Unmarshal(*v, &ID)
- if err != nil {
- return err
- }
- lb.ID = &ID
- }
- case "name":
- if v != nil {
- var name string
- err = json.Unmarshal(*v, &name)
- if err != nil {
- return err
- }
- lb.Name = &name
- }
- case "type":
- if v != nil {
- var typeVar string
- err = json.Unmarshal(*v, &typeVar)
- if err != nil {
- return err
- }
- lb.Type = &typeVar
- }
- case "location":
- if v != nil {
- var location string
- err = json.Unmarshal(*v, &location)
- if err != nil {
- return err
- }
- lb.Location = &location
- }
- case "tags":
- if v != nil {
- var tags map[string]*string
- err = json.Unmarshal(*v, &tags)
- if err != nil {
- return err
- }
- lb.Tags = tags
- }
- }
- }
-
- return nil
-}
-
-// LoadBalancerBackendAddressPoolListResult response for ListBackendAddressPool API service call.
-type LoadBalancerBackendAddressPoolListResult struct {
- autorest.Response `json:"-"`
- // Value - A list of backend address pools in a load balancer.
- Value *[]BackendAddressPool `json:"value,omitempty"`
- // NextLink - READ-ONLY; The URL to get the next set of results.
- NextLink *string `json:"nextLink,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for LoadBalancerBackendAddressPoolListResult.
-func (lbbaplr LoadBalancerBackendAddressPoolListResult) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if lbbaplr.Value != nil {
- objectMap["value"] = lbbaplr.Value
- }
- return json.Marshal(objectMap)
-}
-
-// LoadBalancerBackendAddressPoolListResultIterator provides access to a complete listing of BackendAddressPool
-// values.
-type LoadBalancerBackendAddressPoolListResultIterator struct {
- i int
- page LoadBalancerBackendAddressPoolListResultPage
-}
-
-// 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 *LoadBalancerBackendAddressPoolListResultIterator) NextWithContext(ctx context.Context) (err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerBackendAddressPoolListResultIterator.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 *LoadBalancerBackendAddressPoolListResultIterator) Next() error {
- return iter.NextWithContext(context.Background())
-}
-
-// NotDone returns true if the enumeration should be started or is not yet complete.
-func (iter LoadBalancerBackendAddressPoolListResultIterator) 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 LoadBalancerBackendAddressPoolListResultIterator) Response() LoadBalancerBackendAddressPoolListResult {
- 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 LoadBalancerBackendAddressPoolListResultIterator) Value() BackendAddressPool {
- if !iter.page.NotDone() {
- return BackendAddressPool{}
- }
- return iter.page.Values()[iter.i]
-}
-
-// Creates a new instance of the LoadBalancerBackendAddressPoolListResultIterator type.
-func NewLoadBalancerBackendAddressPoolListResultIterator(page LoadBalancerBackendAddressPoolListResultPage) LoadBalancerBackendAddressPoolListResultIterator {
- return LoadBalancerBackendAddressPoolListResultIterator{page: page}
-}
-
-// IsEmpty returns true if the ListResult contains no values.
-func (lbbaplr LoadBalancerBackendAddressPoolListResult) IsEmpty() bool {
- return lbbaplr.Value == nil || len(*lbbaplr.Value) == 0
-}
-
-// hasNextLink returns true if the NextLink is not empty.
-func (lbbaplr LoadBalancerBackendAddressPoolListResult) hasNextLink() bool {
- return lbbaplr.NextLink != nil && len(*lbbaplr.NextLink) != 0
-}
-
-// loadBalancerBackendAddressPoolListResultPreparer prepares a request to retrieve the next set of results.
-// It returns nil if no more results exist.
-func (lbbaplr LoadBalancerBackendAddressPoolListResult) loadBalancerBackendAddressPoolListResultPreparer(ctx context.Context) (*http.Request, error) {
- if !lbbaplr.hasNextLink() {
- return nil, nil
- }
- return autorest.Prepare((&http.Request{}).WithContext(ctx),
- autorest.AsJSON(),
- autorest.AsGet(),
- autorest.WithBaseURL(to.String(lbbaplr.NextLink)))
-}
-
-// LoadBalancerBackendAddressPoolListResultPage contains a page of BackendAddressPool values.
-type LoadBalancerBackendAddressPoolListResultPage struct {
- fn func(context.Context, LoadBalancerBackendAddressPoolListResult) (LoadBalancerBackendAddressPoolListResult, error)
- lbbaplr LoadBalancerBackendAddressPoolListResult
-}
-
-// 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 *LoadBalancerBackendAddressPoolListResultPage) NextWithContext(ctx context.Context) (err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerBackendAddressPoolListResultPage.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.lbbaplr)
- if err != nil {
- return err
- }
- page.lbbaplr = 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 *LoadBalancerBackendAddressPoolListResultPage) Next() error {
- return page.NextWithContext(context.Background())
-}
-
-// NotDone returns true if the page enumeration should be started or is not yet complete.
-func (page LoadBalancerBackendAddressPoolListResultPage) NotDone() bool {
- return !page.lbbaplr.IsEmpty()
-}
-
-// Response returns the raw server response from the last page request.
-func (page LoadBalancerBackendAddressPoolListResultPage) Response() LoadBalancerBackendAddressPoolListResult {
- return page.lbbaplr
-}
-
-// Values returns the slice of values for the current page or nil if there are no values.
-func (page LoadBalancerBackendAddressPoolListResultPage) Values() []BackendAddressPool {
- if page.lbbaplr.IsEmpty() {
- return nil
- }
- return *page.lbbaplr.Value
-}
-
-// Creates a new instance of the LoadBalancerBackendAddressPoolListResultPage type.
-func NewLoadBalancerBackendAddressPoolListResultPage(getNextPage func(context.Context, LoadBalancerBackendAddressPoolListResult) (LoadBalancerBackendAddressPoolListResult, error)) LoadBalancerBackendAddressPoolListResultPage {
- return LoadBalancerBackendAddressPoolListResultPage{fn: getNextPage}
-}
-
-// LoadBalancerFrontendIPConfigurationListResult response for ListFrontendIPConfiguration API service call.
-type LoadBalancerFrontendIPConfigurationListResult struct {
- autorest.Response `json:"-"`
- // Value - A list of frontend IP configurations in a load balancer.
- Value *[]FrontendIPConfiguration `json:"value,omitempty"`
- // NextLink - READ-ONLY; The URL to get the next set of results.
- NextLink *string `json:"nextLink,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for LoadBalancerFrontendIPConfigurationListResult.
-func (lbficlr LoadBalancerFrontendIPConfigurationListResult) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if lbficlr.Value != nil {
- objectMap["value"] = lbficlr.Value
- }
- return json.Marshal(objectMap)
-}
-
-// LoadBalancerFrontendIPConfigurationListResultIterator provides access to a complete listing of
-// FrontendIPConfiguration values.
-type LoadBalancerFrontendIPConfigurationListResultIterator struct {
- i int
- page LoadBalancerFrontendIPConfigurationListResultPage
-}
-
-// 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 *LoadBalancerFrontendIPConfigurationListResultIterator) NextWithContext(ctx context.Context) (err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerFrontendIPConfigurationListResultIterator.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 *LoadBalancerFrontendIPConfigurationListResultIterator) Next() error {
- return iter.NextWithContext(context.Background())
-}
-
-// NotDone returns true if the enumeration should be started or is not yet complete.
-func (iter LoadBalancerFrontendIPConfigurationListResultIterator) 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 LoadBalancerFrontendIPConfigurationListResultIterator) Response() LoadBalancerFrontendIPConfigurationListResult {
- 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 LoadBalancerFrontendIPConfigurationListResultIterator) Value() FrontendIPConfiguration {
- if !iter.page.NotDone() {
- return FrontendIPConfiguration{}
- }
- return iter.page.Values()[iter.i]
-}
-
-// Creates a new instance of the LoadBalancerFrontendIPConfigurationListResultIterator type.
-func NewLoadBalancerFrontendIPConfigurationListResultIterator(page LoadBalancerFrontendIPConfigurationListResultPage) LoadBalancerFrontendIPConfigurationListResultIterator {
- return LoadBalancerFrontendIPConfigurationListResultIterator{page: page}
-}
-
-// IsEmpty returns true if the ListResult contains no values.
-func (lbficlr LoadBalancerFrontendIPConfigurationListResult) IsEmpty() bool {
- return lbficlr.Value == nil || len(*lbficlr.Value) == 0
-}
-
-// hasNextLink returns true if the NextLink is not empty.
-func (lbficlr LoadBalancerFrontendIPConfigurationListResult) hasNextLink() bool {
- return lbficlr.NextLink != nil && len(*lbficlr.NextLink) != 0
-}
-
-// loadBalancerFrontendIPConfigurationListResultPreparer prepares a request to retrieve the next set of results.
-// It returns nil if no more results exist.
-func (lbficlr LoadBalancerFrontendIPConfigurationListResult) loadBalancerFrontendIPConfigurationListResultPreparer(ctx context.Context) (*http.Request, error) {
- if !lbficlr.hasNextLink() {
- return nil, nil
- }
- return autorest.Prepare((&http.Request{}).WithContext(ctx),
- autorest.AsJSON(),
- autorest.AsGet(),
- autorest.WithBaseURL(to.String(lbficlr.NextLink)))
-}
-
-// LoadBalancerFrontendIPConfigurationListResultPage contains a page of FrontendIPConfiguration values.
-type LoadBalancerFrontendIPConfigurationListResultPage struct {
- fn func(context.Context, LoadBalancerFrontendIPConfigurationListResult) (LoadBalancerFrontendIPConfigurationListResult, error)
- lbficlr LoadBalancerFrontendIPConfigurationListResult
-}
-
-// 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 *LoadBalancerFrontendIPConfigurationListResultPage) NextWithContext(ctx context.Context) (err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerFrontendIPConfigurationListResultPage.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.lbficlr)
- if err != nil {
- return err
- }
- page.lbficlr = 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 *LoadBalancerFrontendIPConfigurationListResultPage) Next() error {
- return page.NextWithContext(context.Background())
-}
-
-// NotDone returns true if the page enumeration should be started or is not yet complete.
-func (page LoadBalancerFrontendIPConfigurationListResultPage) NotDone() bool {
- return !page.lbficlr.IsEmpty()
-}
-
-// Response returns the raw server response from the last page request.
-func (page LoadBalancerFrontendIPConfigurationListResultPage) Response() LoadBalancerFrontendIPConfigurationListResult {
- return page.lbficlr
-}
-
-// Values returns the slice of values for the current page or nil if there are no values.
-func (page LoadBalancerFrontendIPConfigurationListResultPage) Values() []FrontendIPConfiguration {
- if page.lbficlr.IsEmpty() {
- return nil
- }
- return *page.lbficlr.Value
-}
-
-// Creates a new instance of the LoadBalancerFrontendIPConfigurationListResultPage type.
-func NewLoadBalancerFrontendIPConfigurationListResultPage(getNextPage func(context.Context, LoadBalancerFrontendIPConfigurationListResult) (LoadBalancerFrontendIPConfigurationListResult, error)) LoadBalancerFrontendIPConfigurationListResultPage {
- return LoadBalancerFrontendIPConfigurationListResultPage{fn: getNextPage}
-}
-
-// LoadBalancerListResult response for ListLoadBalancers API service call.
-type LoadBalancerListResult struct {
- autorest.Response `json:"-"`
- // Value - A list of load balancers in a resource group.
- Value *[]LoadBalancer `json:"value,omitempty"`
- // NextLink - READ-ONLY; The URL to get the next set of results.
- NextLink *string `json:"nextLink,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for LoadBalancerListResult.
-func (lblr LoadBalancerListResult) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if lblr.Value != nil {
- objectMap["value"] = lblr.Value
- }
- return json.Marshal(objectMap)
-}
-
-// LoadBalancerListResultIterator provides access to a complete listing of LoadBalancer values.
-type LoadBalancerListResultIterator struct {
- i int
- page LoadBalancerListResultPage
-}
-
-// 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 *LoadBalancerListResultIterator) NextWithContext(ctx context.Context) (err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerListResultIterator.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 *LoadBalancerListResultIterator) Next() error {
- return iter.NextWithContext(context.Background())
-}
-
-// NotDone returns true if the enumeration should be started or is not yet complete.
-func (iter LoadBalancerListResultIterator) 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 LoadBalancerListResultIterator) Response() LoadBalancerListResult {
- 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 LoadBalancerListResultIterator) Value() LoadBalancer {
- if !iter.page.NotDone() {
- return LoadBalancer{}
- }
- return iter.page.Values()[iter.i]
-}
-
-// Creates a new instance of the LoadBalancerListResultIterator type.
-func NewLoadBalancerListResultIterator(page LoadBalancerListResultPage) LoadBalancerListResultIterator {
- return LoadBalancerListResultIterator{page: page}
-}
-
-// IsEmpty returns true if the ListResult contains no values.
-func (lblr LoadBalancerListResult) IsEmpty() bool {
- return lblr.Value == nil || len(*lblr.Value) == 0
-}
-
-// hasNextLink returns true if the NextLink is not empty.
-func (lblr LoadBalancerListResult) hasNextLink() bool {
- return lblr.NextLink != nil && len(*lblr.NextLink) != 0
-}
-
-// loadBalancerListResultPreparer prepares a request to retrieve the next set of results.
-// It returns nil if no more results exist.
-func (lblr LoadBalancerListResult) loadBalancerListResultPreparer(ctx context.Context) (*http.Request, error) {
- if !lblr.hasNextLink() {
- return nil, nil
- }
- return autorest.Prepare((&http.Request{}).WithContext(ctx),
- autorest.AsJSON(),
- autorest.AsGet(),
- autorest.WithBaseURL(to.String(lblr.NextLink)))
-}
-
-// LoadBalancerListResultPage contains a page of LoadBalancer values.
-type LoadBalancerListResultPage struct {
- fn func(context.Context, LoadBalancerListResult) (LoadBalancerListResult, error)
- lblr LoadBalancerListResult
-}
-
-// 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 *LoadBalancerListResultPage) NextWithContext(ctx context.Context) (err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerListResultPage.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.lblr)
- if err != nil {
- return err
- }
- page.lblr = 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 *LoadBalancerListResultPage) Next() error {
- return page.NextWithContext(context.Background())
-}
-
-// NotDone returns true if the page enumeration should be started or is not yet complete.
-func (page LoadBalancerListResultPage) NotDone() bool {
- return !page.lblr.IsEmpty()
-}
-
-// Response returns the raw server response from the last page request.
-func (page LoadBalancerListResultPage) Response() LoadBalancerListResult {
- return page.lblr
-}
-
-// Values returns the slice of values for the current page or nil if there are no values.
-func (page LoadBalancerListResultPage) Values() []LoadBalancer {
- if page.lblr.IsEmpty() {
- return nil
- }
- return *page.lblr.Value
-}
-
-// Creates a new instance of the LoadBalancerListResultPage type.
-func NewLoadBalancerListResultPage(getNextPage func(context.Context, LoadBalancerListResult) (LoadBalancerListResult, error)) LoadBalancerListResultPage {
- return LoadBalancerListResultPage{fn: getNextPage}
-}
-
-// LoadBalancerLoadBalancingRuleListResult response for ListLoadBalancingRule API service call.
-type LoadBalancerLoadBalancingRuleListResult struct {
- autorest.Response `json:"-"`
- // Value - A list of load balancing rules in a load balancer.
- Value *[]LoadBalancingRule `json:"value,omitempty"`
- // NextLink - READ-ONLY; The URL to get the next set of results.
- NextLink *string `json:"nextLink,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for LoadBalancerLoadBalancingRuleListResult.
-func (lblbrlr LoadBalancerLoadBalancingRuleListResult) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if lblbrlr.Value != nil {
- objectMap["value"] = lblbrlr.Value
- }
- return json.Marshal(objectMap)
-}
-
-// LoadBalancerLoadBalancingRuleListResultIterator provides access to a complete listing of LoadBalancingRule
-// values.
-type LoadBalancerLoadBalancingRuleListResultIterator struct {
- i int
- page LoadBalancerLoadBalancingRuleListResultPage
-}
-
-// 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 *LoadBalancerLoadBalancingRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerLoadBalancingRuleListResultIterator.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 *LoadBalancerLoadBalancingRuleListResultIterator) Next() error {
- return iter.NextWithContext(context.Background())
-}
-
-// NotDone returns true if the enumeration should be started or is not yet complete.
-func (iter LoadBalancerLoadBalancingRuleListResultIterator) 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 LoadBalancerLoadBalancingRuleListResultIterator) Response() LoadBalancerLoadBalancingRuleListResult {
- 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 LoadBalancerLoadBalancingRuleListResultIterator) Value() LoadBalancingRule {
- if !iter.page.NotDone() {
- return LoadBalancingRule{}
- }
- return iter.page.Values()[iter.i]
-}
-
-// Creates a new instance of the LoadBalancerLoadBalancingRuleListResultIterator type.
-func NewLoadBalancerLoadBalancingRuleListResultIterator(page LoadBalancerLoadBalancingRuleListResultPage) LoadBalancerLoadBalancingRuleListResultIterator {
- return LoadBalancerLoadBalancingRuleListResultIterator{page: page}
-}
-
-// IsEmpty returns true if the ListResult contains no values.
-func (lblbrlr LoadBalancerLoadBalancingRuleListResult) IsEmpty() bool {
- return lblbrlr.Value == nil || len(*lblbrlr.Value) == 0
-}
-
-// hasNextLink returns true if the NextLink is not empty.
-func (lblbrlr LoadBalancerLoadBalancingRuleListResult) hasNextLink() bool {
- return lblbrlr.NextLink != nil && len(*lblbrlr.NextLink) != 0
-}
-
-// loadBalancerLoadBalancingRuleListResultPreparer prepares a request to retrieve the next set of results.
-// It returns nil if no more results exist.
-func (lblbrlr LoadBalancerLoadBalancingRuleListResult) loadBalancerLoadBalancingRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
- if !lblbrlr.hasNextLink() {
- return nil, nil
- }
- return autorest.Prepare((&http.Request{}).WithContext(ctx),
- autorest.AsJSON(),
- autorest.AsGet(),
- autorest.WithBaseURL(to.String(lblbrlr.NextLink)))
-}
-
-// LoadBalancerLoadBalancingRuleListResultPage contains a page of LoadBalancingRule values.
-type LoadBalancerLoadBalancingRuleListResultPage struct {
- fn func(context.Context, LoadBalancerLoadBalancingRuleListResult) (LoadBalancerLoadBalancingRuleListResult, error)
- lblbrlr LoadBalancerLoadBalancingRuleListResult
-}
-
-// 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 *LoadBalancerLoadBalancingRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerLoadBalancingRuleListResultPage.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.lblbrlr)
- if err != nil {
- return err
- }
- page.lblbrlr = 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 *LoadBalancerLoadBalancingRuleListResultPage) Next() error {
- return page.NextWithContext(context.Background())
-}
-
-// NotDone returns true if the page enumeration should be started or is not yet complete.
-func (page LoadBalancerLoadBalancingRuleListResultPage) NotDone() bool {
- return !page.lblbrlr.IsEmpty()
-}
-
-// Response returns the raw server response from the last page request.
-func (page LoadBalancerLoadBalancingRuleListResultPage) Response() LoadBalancerLoadBalancingRuleListResult {
- return page.lblbrlr
-}
-
-// Values returns the slice of values for the current page or nil if there are no values.
-func (page LoadBalancerLoadBalancingRuleListResultPage) Values() []LoadBalancingRule {
- if page.lblbrlr.IsEmpty() {
- return nil
- }
- return *page.lblbrlr.Value
-}
-
-// Creates a new instance of the LoadBalancerLoadBalancingRuleListResultPage type.
-func NewLoadBalancerLoadBalancingRuleListResultPage(getNextPage func(context.Context, LoadBalancerLoadBalancingRuleListResult) (LoadBalancerLoadBalancingRuleListResult, error)) LoadBalancerLoadBalancingRuleListResultPage {
- return LoadBalancerLoadBalancingRuleListResultPage{fn: getNextPage}
-}
-
-// LoadBalancerOutboundRuleListResult response for ListOutboundRule API service call.
-type LoadBalancerOutboundRuleListResult struct {
- autorest.Response `json:"-"`
- // Value - A list of outbound rules in a load balancer.
- Value *[]OutboundRule `json:"value,omitempty"`
- // NextLink - READ-ONLY; The URL to get the next set of results.
- NextLink *string `json:"nextLink,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for LoadBalancerOutboundRuleListResult.
-func (lborlr LoadBalancerOutboundRuleListResult) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if lborlr.Value != nil {
- objectMap["value"] = lborlr.Value
- }
- return json.Marshal(objectMap)
-}
-
-// LoadBalancerOutboundRuleListResultIterator provides access to a complete listing of OutboundRule values.
-type LoadBalancerOutboundRuleListResultIterator struct {
- i int
- page LoadBalancerOutboundRuleListResultPage
-}
-
-// 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 *LoadBalancerOutboundRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerOutboundRuleListResultIterator.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 *LoadBalancerOutboundRuleListResultIterator) Next() error {
- return iter.NextWithContext(context.Background())
-}
-
-// NotDone returns true if the enumeration should be started or is not yet complete.
-func (iter LoadBalancerOutboundRuleListResultIterator) 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 LoadBalancerOutboundRuleListResultIterator) Response() LoadBalancerOutboundRuleListResult {
- 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 LoadBalancerOutboundRuleListResultIterator) Value() OutboundRule {
- if !iter.page.NotDone() {
- return OutboundRule{}
- }
- return iter.page.Values()[iter.i]
-}
-
-// Creates a new instance of the LoadBalancerOutboundRuleListResultIterator type.
-func NewLoadBalancerOutboundRuleListResultIterator(page LoadBalancerOutboundRuleListResultPage) LoadBalancerOutboundRuleListResultIterator {
- return LoadBalancerOutboundRuleListResultIterator{page: page}
-}
-
-// IsEmpty returns true if the ListResult contains no values.
-func (lborlr LoadBalancerOutboundRuleListResult) IsEmpty() bool {
- return lborlr.Value == nil || len(*lborlr.Value) == 0
-}
-
-// hasNextLink returns true if the NextLink is not empty.
-func (lborlr LoadBalancerOutboundRuleListResult) hasNextLink() bool {
- return lborlr.NextLink != nil && len(*lborlr.NextLink) != 0
-}
-
-// loadBalancerOutboundRuleListResultPreparer prepares a request to retrieve the next set of results.
-// It returns nil if no more results exist.
-func (lborlr LoadBalancerOutboundRuleListResult) loadBalancerOutboundRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
- if !lborlr.hasNextLink() {
- return nil, nil
- }
- return autorest.Prepare((&http.Request{}).WithContext(ctx),
- autorest.AsJSON(),
- autorest.AsGet(),
- autorest.WithBaseURL(to.String(lborlr.NextLink)))
-}
-
-// LoadBalancerOutboundRuleListResultPage contains a page of OutboundRule values.
-type LoadBalancerOutboundRuleListResultPage struct {
- fn func(context.Context, LoadBalancerOutboundRuleListResult) (LoadBalancerOutboundRuleListResult, error)
- lborlr LoadBalancerOutboundRuleListResult
-}
-
-// 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 *LoadBalancerOutboundRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerOutboundRuleListResultPage.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.lborlr)
- if err != nil {
- return err
- }
- page.lborlr = 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 *LoadBalancerOutboundRuleListResultPage) Next() error {
- return page.NextWithContext(context.Background())
-}
-
-// NotDone returns true if the page enumeration should be started or is not yet complete.
-func (page LoadBalancerOutboundRuleListResultPage) NotDone() bool {
- return !page.lborlr.IsEmpty()
-}
-
-// Response returns the raw server response from the last page request.
-func (page LoadBalancerOutboundRuleListResultPage) Response() LoadBalancerOutboundRuleListResult {
- return page.lborlr
-}
-
-// Values returns the slice of values for the current page or nil if there are no values.
-func (page LoadBalancerOutboundRuleListResultPage) Values() []OutboundRule {
- if page.lborlr.IsEmpty() {
- return nil
- }
- return *page.lborlr.Value
-}
-
-// Creates a new instance of the LoadBalancerOutboundRuleListResultPage type.
-func NewLoadBalancerOutboundRuleListResultPage(getNextPage func(context.Context, LoadBalancerOutboundRuleListResult) (LoadBalancerOutboundRuleListResult, error)) LoadBalancerOutboundRuleListResultPage {
- return LoadBalancerOutboundRuleListResultPage{fn: getNextPage}
-}
-
-// LoadBalancerProbeListResult response for ListProbe API service call.
-type LoadBalancerProbeListResult struct {
- autorest.Response `json:"-"`
- // Value - A list of probes in a load balancer.
- Value *[]Probe `json:"value,omitempty"`
- // NextLink - READ-ONLY; The URL to get the next set of results.
- NextLink *string `json:"nextLink,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for LoadBalancerProbeListResult.
-func (lbplr LoadBalancerProbeListResult) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if lbplr.Value != nil {
- objectMap["value"] = lbplr.Value
- }
- return json.Marshal(objectMap)
-}
-
-// LoadBalancerProbeListResultIterator provides access to a complete listing of Probe values.
-type LoadBalancerProbeListResultIterator struct {
- i int
- page LoadBalancerProbeListResultPage
-}
-
-// 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 *LoadBalancerProbeListResultIterator) NextWithContext(ctx context.Context) (err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerProbeListResultIterator.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 *LoadBalancerProbeListResultIterator) Next() error {
- return iter.NextWithContext(context.Background())
-}
-
-// NotDone returns true if the enumeration should be started or is not yet complete.
-func (iter LoadBalancerProbeListResultIterator) 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 LoadBalancerProbeListResultIterator) Response() LoadBalancerProbeListResult {
- 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 LoadBalancerProbeListResultIterator) Value() Probe {
- if !iter.page.NotDone() {
- return Probe{}
- }
- return iter.page.Values()[iter.i]
-}
-
-// Creates a new instance of the LoadBalancerProbeListResultIterator type.
-func NewLoadBalancerProbeListResultIterator(page LoadBalancerProbeListResultPage) LoadBalancerProbeListResultIterator {
- return LoadBalancerProbeListResultIterator{page: page}
-}
-
-// IsEmpty returns true if the ListResult contains no values.
-func (lbplr LoadBalancerProbeListResult) IsEmpty() bool {
- return lbplr.Value == nil || len(*lbplr.Value) == 0
-}
-
-// hasNextLink returns true if the NextLink is not empty.
-func (lbplr LoadBalancerProbeListResult) hasNextLink() bool {
- return lbplr.NextLink != nil && len(*lbplr.NextLink) != 0
-}
-
-// loadBalancerProbeListResultPreparer prepares a request to retrieve the next set of results.
-// It returns nil if no more results exist.
-func (lbplr LoadBalancerProbeListResult) loadBalancerProbeListResultPreparer(ctx context.Context) (*http.Request, error) {
- if !lbplr.hasNextLink() {
- return nil, nil
- }
- return autorest.Prepare((&http.Request{}).WithContext(ctx),
- autorest.AsJSON(),
- autorest.AsGet(),
- autorest.WithBaseURL(to.String(lbplr.NextLink)))
-}
-
-// LoadBalancerProbeListResultPage contains a page of Probe values.
-type LoadBalancerProbeListResultPage struct {
- fn func(context.Context, LoadBalancerProbeListResult) (LoadBalancerProbeListResult, error)
- lbplr LoadBalancerProbeListResult
-}
-
-// 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 *LoadBalancerProbeListResultPage) NextWithContext(ctx context.Context) (err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerProbeListResultPage.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.lbplr)
- if err != nil {
- return err
- }
- page.lbplr = 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 *LoadBalancerProbeListResultPage) Next() error {
- return page.NextWithContext(context.Background())
-}
-
-// NotDone returns true if the page enumeration should be started or is not yet complete.
-func (page LoadBalancerProbeListResultPage) NotDone() bool {
- return !page.lbplr.IsEmpty()
-}
-
-// Response returns the raw server response from the last page request.
-func (page LoadBalancerProbeListResultPage) Response() LoadBalancerProbeListResult {
- return page.lbplr
-}
-
-// Values returns the slice of values for the current page or nil if there are no values.
-func (page LoadBalancerProbeListResultPage) Values() []Probe {
- if page.lbplr.IsEmpty() {
- return nil
- }
- return *page.lbplr.Value
-}
-
-// Creates a new instance of the LoadBalancerProbeListResultPage type.
-func NewLoadBalancerProbeListResultPage(getNextPage func(context.Context, LoadBalancerProbeListResult) (LoadBalancerProbeListResult, error)) LoadBalancerProbeListResultPage {
- return LoadBalancerProbeListResultPage{fn: getNextPage}
-}
-
-// LoadBalancerPropertiesFormat properties of the load balancer.
-type LoadBalancerPropertiesFormat struct {
- // FrontendIPConfigurations - Object representing the frontend IPs to be used for the load balancer
- FrontendIPConfigurations *[]FrontendIPConfiguration `json:"frontendIPConfigurations,omitempty"`
- // BackendAddressPools - Collection of backend address pools used by a load balancer
- BackendAddressPools *[]BackendAddressPool `json:"backendAddressPools,omitempty"`
- // LoadBalancingRules - Object collection representing the load balancing rules Gets the provisioning
- LoadBalancingRules *[]LoadBalancingRule `json:"loadBalancingRules,omitempty"`
- // Probes - Collection of probe objects used in the load balancer
- Probes *[]Probe `json:"probes,omitempty"`
- // InboundNatRules - Collection of inbound NAT Rules used by a load balancer. Defining inbound NAT rules on your load balancer is mutually exclusive with defining an inbound NAT pool. Inbound NAT pools are referenced from virtual machine scale sets. NICs that are associated with individual virtual machines cannot reference an Inbound NAT pool. They have to reference individual inbound NAT rules.
- InboundNatRules *[]InboundNatRule `json:"inboundNatRules,omitempty"`
- // InboundNatPools - Defines an external port range for inbound NAT to a single backend port on NICs associated with a load balancer. Inbound NAT rules are created automatically for each NIC associated with the Load Balancer using an external port from this range. Defining an Inbound NAT pool on your Load Balancer is mutually exclusive with defining inbound Nat rules. Inbound NAT pools are referenced from virtual machine scale sets. NICs that are associated with individual virtual machines cannot reference an inbound NAT pool. They have to reference individual inbound NAT rules.
- InboundNatPools *[]InboundNatPool `json:"inboundNatPools,omitempty"`
- // OutboundRules - The outbound rules.
- OutboundRules *[]OutboundRule `json:"outboundRules,omitempty"`
- // ResourceGUID - The resource GUID property of the load balancer resource.
- ResourceGUID *string `json:"resourceGuid,omitempty"`
- // ProvisioningState - Gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
- ProvisioningState *string `json:"provisioningState,omitempty"`
-}
-
-// LoadBalancersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
-type LoadBalancersCreateOrUpdateFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *LoadBalancersCreateOrUpdateFuture) Result(client LoadBalancersClient) (lb LoadBalancer, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LoadBalancersCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.LoadBalancersCreateOrUpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if lb.Response.Response, err = future.GetResult(sender); err == nil && lb.Response.Response.StatusCode != http.StatusNoContent {
- lb, err = client.CreateOrUpdateResponder(lb.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LoadBalancersCreateOrUpdateFuture", "Result", lb.Response.Response, "Failure responding to request")
- }
- }
- return
-}
-
-// LoadBalancersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
-type LoadBalancersDeleteFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *LoadBalancersDeleteFuture) Result(client LoadBalancersClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LoadBalancersDeleteFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.LoadBalancersDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
-}
-
-// LoadBalancerSku SKU of a load balancer
-type LoadBalancerSku struct {
- // Name - Name of a load balancer SKU. Possible values include: 'LoadBalancerSkuNameBasic', 'LoadBalancerSkuNameStandard'
- Name LoadBalancerSkuName `json:"name,omitempty"`
-}
-
-// LoadBalancersUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
-type LoadBalancersUpdateTagsFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *LoadBalancersUpdateTagsFuture) Result(client LoadBalancersClient) (lb LoadBalancer, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LoadBalancersUpdateTagsFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.LoadBalancersUpdateTagsFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if lb.Response.Response, err = future.GetResult(sender); err == nil && lb.Response.Response.StatusCode != http.StatusNoContent {
- lb, err = client.UpdateTagsResponder(lb.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LoadBalancersUpdateTagsFuture", "Result", lb.Response.Response, "Failure responding to request")
- }
- }
- return
-}
-
-// LoadBalancingRule a load balancing rule for a load balancer.
-type LoadBalancingRule struct {
- autorest.Response `json:"-"`
- // LoadBalancingRulePropertiesFormat - Properties of load balancer load balancing rule.
- *LoadBalancingRulePropertiesFormat `json:"properties,omitempty"`
- // Name - 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"`
- // Etag - A unique read-only string that changes whenever the resource is updated.
- Etag *string `json:"etag,omitempty"`
- // ID - Resource ID.
- ID *string `json:"id,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for LoadBalancingRule.
-func (lbr LoadBalancingRule) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if lbr.LoadBalancingRulePropertiesFormat != nil {
- objectMap["properties"] = lbr.LoadBalancingRulePropertiesFormat
- }
- if lbr.Name != nil {
- objectMap["name"] = lbr.Name
- }
- if lbr.Etag != nil {
- objectMap["etag"] = lbr.Etag
- }
- if lbr.ID != nil {
- objectMap["id"] = lbr.ID
- }
- return json.Marshal(objectMap)
-}
-
-// UnmarshalJSON is the custom unmarshaler for LoadBalancingRule struct.
-func (lbr *LoadBalancingRule) 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 loadBalancingRulePropertiesFormat LoadBalancingRulePropertiesFormat
- err = json.Unmarshal(*v, &loadBalancingRulePropertiesFormat)
- if err != nil {
- return err
- }
- lbr.LoadBalancingRulePropertiesFormat = &loadBalancingRulePropertiesFormat
- }
- case "name":
- if v != nil {
- var name string
- err = json.Unmarshal(*v, &name)
- if err != nil {
- return err
- }
- lbr.Name = &name
- }
- case "etag":
- if v != nil {
- var etag string
- err = json.Unmarshal(*v, &etag)
- if err != nil {
- return err
- }
- lbr.Etag = &etag
- }
- case "id":
- if v != nil {
- var ID string
- err = json.Unmarshal(*v, &ID)
- if err != nil {
- return err
- }
- lbr.ID = &ID
- }
- }
- }
-
- return nil
-}
-
-// LoadBalancingRulePropertiesFormat properties of the load balancer.
-type LoadBalancingRulePropertiesFormat struct {
- // FrontendIPConfiguration - A reference to frontend IP addresses.
- FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"`
- // BackendAddressPool - A reference to a pool of DIPs. Inbound traffic is randomly load balanced across IPs in the backend IPs.
- BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"`
- // Probe - The reference of the load balancer probe used by the load balancing rule.
- Probe *SubResource `json:"probe,omitempty"`
- // Protocol - Possible values include: 'TransportProtocolUDP', 'TransportProtocolTCP', 'TransportProtocolAll'
- Protocol TransportProtocol `json:"protocol,omitempty"`
- // LoadDistribution - The load distribution policy for this rule. Possible values are 'Default', 'SourceIP', and 'SourceIPProtocol'. Possible values include: 'LoadDistributionDefault', 'LoadDistributionSourceIP', 'LoadDistributionSourceIPProtocol'
- LoadDistribution LoadDistribution `json:"loadDistribution,omitempty"`
- // FrontendPort - The port for the external endpoint. Port numbers for each rule must be unique within the Load Balancer. Acceptable values are between 0 and 65534. Note that value 0 enables "Any Port"
- FrontendPort *int32 `json:"frontendPort,omitempty"`
- // BackendPort - The port used for internal connections on the endpoint. Acceptable values are between 0 and 65535. Note that value 0 enables "Any Port"
- BackendPort *int32 `json:"backendPort,omitempty"`
- // IdleTimeoutInMinutes - The timeout for the TCP idle connection. The value can be set between 4 and 30 minutes. The default value is 4 minutes. This element is only used when the protocol is set to TCP.
- IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
- // EnableFloatingIP - Configures a virtual machine's endpoint for the floating IP capability required to configure a SQL AlwaysOn Availability Group. This setting is required when using the SQL AlwaysOn Availability Groups in SQL server. This setting can't be changed after you create the endpoint.
- EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"`
- // EnableTCPReset - Receive bidirectional TCP Reset on TCP flow idle timeout or unexpected connection termination. This element is only used when the protocol is set to TCP.
- EnableTCPReset *bool `json:"enableTcpReset,omitempty"`
- // DisableOutboundSnat - Configures SNAT for the VMs in the backend pool to use the publicIP address specified in the frontend of the load balancing rule.
- DisableOutboundSnat *bool `json:"disableOutboundSnat,omitempty"`
- // ProvisioningState - Gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
- ProvisioningState *string `json:"provisioningState,omitempty"`
-}
-
-// LocalNetworkGateway a common class for general resource information
-type LocalNetworkGateway struct {
- autorest.Response `json:"-"`
- // LocalNetworkGatewayPropertiesFormat - Properties of the local network gateway.
- *LocalNetworkGatewayPropertiesFormat `json:"properties,omitempty"`
- // Etag - A unique read-only string that changes whenever the resource is updated.
- Etag *string `json:"etag,omitempty"`
- // ID - 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 LocalNetworkGateway.
-func (lng LocalNetworkGateway) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if lng.LocalNetworkGatewayPropertiesFormat != nil {
- objectMap["properties"] = lng.LocalNetworkGatewayPropertiesFormat
- }
- if lng.Etag != nil {
- objectMap["etag"] = lng.Etag
- }
- if lng.ID != nil {
- objectMap["id"] = lng.ID
- }
- if lng.Location != nil {
- objectMap["location"] = lng.Location
- }
- if lng.Tags != nil {
- objectMap["tags"] = lng.Tags
- }
- return json.Marshal(objectMap)
-}
-
-// UnmarshalJSON is the custom unmarshaler for LocalNetworkGateway struct.
-func (lng *LocalNetworkGateway) 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 localNetworkGatewayPropertiesFormat LocalNetworkGatewayPropertiesFormat
- err = json.Unmarshal(*v, &localNetworkGatewayPropertiesFormat)
- if err != nil {
- return err
- }
- lng.LocalNetworkGatewayPropertiesFormat = &localNetworkGatewayPropertiesFormat
- }
- case "etag":
- if v != nil {
- var etag string
- err = json.Unmarshal(*v, &etag)
- if err != nil {
- return err
- }
- lng.Etag = &etag
- }
- case "id":
- if v != nil {
- var ID string
- err = json.Unmarshal(*v, &ID)
- if err != nil {
- return err
- }
- lng.ID = &ID
- }
- case "name":
- if v != nil {
- var name string
- err = json.Unmarshal(*v, &name)
- if err != nil {
- return err
- }
- lng.Name = &name
- }
- case "type":
- if v != nil {
- var typeVar string
- err = json.Unmarshal(*v, &typeVar)
- if err != nil {
- return err
- }
- lng.Type = &typeVar
- }
- case "location":
- if v != nil {
- var location string
- err = json.Unmarshal(*v, &location)
- if err != nil {
- return err
- }
- lng.Location = &location
- }
- case "tags":
- if v != nil {
- var tags map[string]*string
- err = json.Unmarshal(*v, &tags)
- if err != nil {
- return err
- }
- lng.Tags = tags
- }
- }
- }
-
- return nil
-}
-
-// LocalNetworkGatewayListResult response for ListLocalNetworkGateways API service call.
-type LocalNetworkGatewayListResult struct {
- autorest.Response `json:"-"`
- // Value - A list of local network gateways that exists in a resource group.
- Value *[]LocalNetworkGateway `json:"value,omitempty"`
- // NextLink - READ-ONLY; The URL to get the next set of results.
- NextLink *string `json:"nextLink,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for LocalNetworkGatewayListResult.
-func (lnglr LocalNetworkGatewayListResult) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if lnglr.Value != nil {
- objectMap["value"] = lnglr.Value
- }
- return json.Marshal(objectMap)
-}
-
-// LocalNetworkGatewayListResultIterator provides access to a complete listing of LocalNetworkGateway values.
-type LocalNetworkGatewayListResultIterator struct {
- i int
- page LocalNetworkGatewayListResultPage
-}
-
-// 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 *LocalNetworkGatewayListResultIterator) NextWithContext(ctx context.Context) (err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/LocalNetworkGatewayListResultIterator.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 *LocalNetworkGatewayListResultIterator) Next() error {
- return iter.NextWithContext(context.Background())
-}
-
-// NotDone returns true if the enumeration should be started or is not yet complete.
-func (iter LocalNetworkGatewayListResultIterator) 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 LocalNetworkGatewayListResultIterator) Response() LocalNetworkGatewayListResult {
- 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 LocalNetworkGatewayListResultIterator) Value() LocalNetworkGateway {
- if !iter.page.NotDone() {
- return LocalNetworkGateway{}
- }
- return iter.page.Values()[iter.i]
-}
-
-// Creates a new instance of the LocalNetworkGatewayListResultIterator type.
-func NewLocalNetworkGatewayListResultIterator(page LocalNetworkGatewayListResultPage) LocalNetworkGatewayListResultIterator {
- return LocalNetworkGatewayListResultIterator{page: page}
-}
-
-// IsEmpty returns true if the ListResult contains no values.
-func (lnglr LocalNetworkGatewayListResult) IsEmpty() bool {
- return lnglr.Value == nil || len(*lnglr.Value) == 0
-}
-
-// hasNextLink returns true if the NextLink is not empty.
-func (lnglr LocalNetworkGatewayListResult) hasNextLink() bool {
- return lnglr.NextLink != nil && len(*lnglr.NextLink) != 0
-}
-
-// localNetworkGatewayListResultPreparer prepares a request to retrieve the next set of results.
-// It returns nil if no more results exist.
-func (lnglr LocalNetworkGatewayListResult) localNetworkGatewayListResultPreparer(ctx context.Context) (*http.Request, error) {
- if !lnglr.hasNextLink() {
- return nil, nil
- }
- return autorest.Prepare((&http.Request{}).WithContext(ctx),
- autorest.AsJSON(),
- autorest.AsGet(),
- autorest.WithBaseURL(to.String(lnglr.NextLink)))
-}
-
-// LocalNetworkGatewayListResultPage contains a page of LocalNetworkGateway values.
-type LocalNetworkGatewayListResultPage struct {
- fn func(context.Context, LocalNetworkGatewayListResult) (LocalNetworkGatewayListResult, error)
- lnglr LocalNetworkGatewayListResult
-}
-
-// 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 *LocalNetworkGatewayListResultPage) NextWithContext(ctx context.Context) (err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/LocalNetworkGatewayListResultPage.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.lnglr)
- if err != nil {
- return err
- }
- page.lnglr = 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 *LocalNetworkGatewayListResultPage) Next() error {
- return page.NextWithContext(context.Background())
-}
-
-// NotDone returns true if the page enumeration should be started or is not yet complete.
-func (page LocalNetworkGatewayListResultPage) NotDone() bool {
- return !page.lnglr.IsEmpty()
-}
-
-// Response returns the raw server response from the last page request.
-func (page LocalNetworkGatewayListResultPage) Response() LocalNetworkGatewayListResult {
- return page.lnglr
-}
-
-// Values returns the slice of values for the current page or nil if there are no values.
-func (page LocalNetworkGatewayListResultPage) Values() []LocalNetworkGateway {
- if page.lnglr.IsEmpty() {
- return nil
- }
- return *page.lnglr.Value
-}
-
-// Creates a new instance of the LocalNetworkGatewayListResultPage type.
-func NewLocalNetworkGatewayListResultPage(getNextPage func(context.Context, LocalNetworkGatewayListResult) (LocalNetworkGatewayListResult, error)) LocalNetworkGatewayListResultPage {
- return LocalNetworkGatewayListResultPage{fn: getNextPage}
-}
-
-// LocalNetworkGatewayPropertiesFormat localNetworkGateway properties
-type LocalNetworkGatewayPropertiesFormat struct {
- // LocalNetworkAddressSpace - Local network site address space.
- LocalNetworkAddressSpace *AddressSpace `json:"localNetworkAddressSpace,omitempty"`
- // GatewayIPAddress - IP address of local network gateway.
- GatewayIPAddress *string `json:"gatewayIpAddress,omitempty"`
- // BgpSettings - Local network gateway's BGP speaker settings.
- BgpSettings *BgpSettings `json:"bgpSettings,omitempty"`
- // ResourceGUID - The resource GUID property of the LocalNetworkGateway resource.
- ResourceGUID *string `json:"resourceGuid,omitempty"`
- // ProvisioningState - READ-ONLY; The provisioning state of the LocalNetworkGateway resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
- ProvisioningState *string `json:"provisioningState,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for LocalNetworkGatewayPropertiesFormat.
-func (lngpf LocalNetworkGatewayPropertiesFormat) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if lngpf.LocalNetworkAddressSpace != nil {
- objectMap["localNetworkAddressSpace"] = lngpf.LocalNetworkAddressSpace
- }
- if lngpf.GatewayIPAddress != nil {
- objectMap["gatewayIpAddress"] = lngpf.GatewayIPAddress
- }
- if lngpf.BgpSettings != nil {
- objectMap["bgpSettings"] = lngpf.BgpSettings
- }
- if lngpf.ResourceGUID != nil {
- objectMap["resourceGuid"] = lngpf.ResourceGUID
- }
- return json.Marshal(objectMap)
-}
-
-// LocalNetworkGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
-// long-running operation.
-type LocalNetworkGatewaysCreateOrUpdateFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *LocalNetworkGatewaysCreateOrUpdateFuture) Result(client LocalNetworkGatewaysClient) (lng LocalNetworkGateway, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysCreateOrUpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if lng.Response.Response, err = future.GetResult(sender); err == nil && lng.Response.Response.StatusCode != http.StatusNoContent {
- lng, err = client.CreateOrUpdateResponder(lng.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysCreateOrUpdateFuture", "Result", lng.Response.Response, "Failure responding to request")
- }
- }
- return
-}
-
-// LocalNetworkGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
-type LocalNetworkGatewaysDeleteFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *LocalNetworkGatewaysDeleteFuture) Result(client LocalNetworkGatewaysClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysDeleteFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
-}
-
-// LocalNetworkGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
-// long-running operation.
-type LocalNetworkGatewaysUpdateTagsFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *LocalNetworkGatewaysUpdateTagsFuture) Result(client LocalNetworkGatewaysClient) (lng LocalNetworkGateway, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysUpdateTagsFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysUpdateTagsFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if lng.Response.Response, err = future.GetResult(sender); err == nil && lng.Response.Response.StatusCode != http.StatusNoContent {
- lng, err = client.UpdateTagsResponder(lng.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysUpdateTagsFuture", "Result", lng.Response.Response, "Failure responding to request")
- }
- }
- return
-}
-
-// LogSpecification description of logging specification.
-type LogSpecification struct {
- // Name - The name of the specification.
- Name *string `json:"name,omitempty"`
- // DisplayName - The display name of the specification.
- DisplayName *string `json:"displayName,omitempty"`
- // BlobDuration - Duration of the blob.
- BlobDuration *string `json:"blobDuration,omitempty"`
-}
-
-// ManagedServiceIdentity identity for the resource.
-type ManagedServiceIdentity struct {
- // PrincipalID - READ-ONLY; The principal id of the system assigned identity. This property will only be provided for a system assigned identity.
- PrincipalID *string `json:"principalId,omitempty"`
- // TenantID - READ-ONLY; The tenant id of the system assigned identity. This property will only be provided for a system assigned identity.
- TenantID *string `json:"tenantId,omitempty"`
- // Type - The type of identity used for the resource. 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 resource. 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]*ManagedServiceIdentityUserAssignedIdentitiesValue `json:"userAssignedIdentities"`
-}
-
-// MarshalJSON is the custom marshaler for ManagedServiceIdentity.
-func (msi ManagedServiceIdentity) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if msi.Type != "" {
- objectMap["type"] = msi.Type
- }
- if msi.UserAssignedIdentities != nil {
- objectMap["userAssignedIdentities"] = msi.UserAssignedIdentities
- }
- return json.Marshal(objectMap)
-}
-
-// ManagedServiceIdentityUserAssignedIdentitiesValue ...
-type ManagedServiceIdentityUserAssignedIdentitiesValue 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"`
-}
-
-// MatchCondition define match conditions
-type MatchCondition struct {
- // MatchVariables - List of match variables
- MatchVariables *[]MatchVariable `json:"matchVariables,omitempty"`
- // Operator - Describes operator to be matched. Possible values include: 'WebApplicationFirewallOperatorIPMatch', 'WebApplicationFirewallOperatorEqual', 'WebApplicationFirewallOperatorContains', 'WebApplicationFirewallOperatorLessThan', 'WebApplicationFirewallOperatorGreaterThan', 'WebApplicationFirewallOperatorLessThanOrEqual', 'WebApplicationFirewallOperatorGreaterThanOrEqual', 'WebApplicationFirewallOperatorBeginsWith', 'WebApplicationFirewallOperatorEndsWith', 'WebApplicationFirewallOperatorRegex'
- Operator WebApplicationFirewallOperator `json:"operator,omitempty"`
- // NegationConditon - Describes if this is negate condition or not
- NegationConditon *bool `json:"negationConditon,omitempty"`
- // MatchValues - Match value
- MatchValues *[]string `json:"matchValues,omitempty"`
- // Transforms - List of transforms
- Transforms *[]WebApplicationFirewallTransform `json:"transforms,omitempty"`
-}
-
-// MatchedRule matched rule.
-type MatchedRule struct {
- // RuleName - Name of the matched network security rule.
- RuleName *string `json:"ruleName,omitempty"`
- // Action - The network traffic is allowed or denied. Possible values are 'Allow' and 'Deny'.
- Action *string `json:"action,omitempty"`
-}
-
-// MatchVariable define match variables
-type MatchVariable struct {
- // VariableName - Match Variable. Possible values include: 'RemoteAddr', 'RequestMethod', 'QueryString', 'PostArgs', 'RequestURI', 'RequestHeaders', 'RequestBody', 'RequestCookies'
- VariableName WebApplicationFirewallMatchVariable `json:"variableName,omitempty"`
- // Selector - Describes field of the matchVariable collection
- Selector *string `json:"selector,omitempty"`
-}
-
-// MetricSpecification description of metrics specification.
-type MetricSpecification struct {
- // Name - The name of the metric.
- Name *string `json:"name,omitempty"`
- // DisplayName - The display name of the metric.
- DisplayName *string `json:"displayName,omitempty"`
- // DisplayDescription - The description of the metric.
- DisplayDescription *string `json:"displayDescription,omitempty"`
- // Unit - Units the metric to be displayed in.
- Unit *string `json:"unit,omitempty"`
- // AggregationType - The aggregation type.
- AggregationType *string `json:"aggregationType,omitempty"`
- // Availabilities - List of availability.
- Availabilities *[]Availability `json:"availabilities,omitempty"`
- // EnableRegionalMdmAccount - Whether regional MDM account enabled.
- EnableRegionalMdmAccount *bool `json:"enableRegionalMdmAccount,omitempty"`
- // FillGapWithZero - Whether gaps would be filled with zeros.
- FillGapWithZero *bool `json:"fillGapWithZero,omitempty"`
- // MetricFilterPattern - Pattern for the filter of the metric.
- MetricFilterPattern *string `json:"metricFilterPattern,omitempty"`
- // Dimensions - List of dimensions.
- Dimensions *[]Dimension `json:"dimensions,omitempty"`
- // IsInternal - Whether the metric is internal.
- IsInternal *bool `json:"isInternal,omitempty"`
- // SourceMdmAccount - The source MDM account.
- SourceMdmAccount *string `json:"sourceMdmAccount,omitempty"`
- // SourceMdmNamespace - The source MDM namespace.
- SourceMdmNamespace *string `json:"sourceMdmNamespace,omitempty"`
- // ResourceIDDimensionNameOverride - The resource Id dimension name override.
- ResourceIDDimensionNameOverride *string `json:"resourceIdDimensionNameOverride,omitempty"`
-}
-
-// NextHopParameters parameters that define the source and destination endpoint.
-type NextHopParameters struct {
- // TargetResourceID - The resource identifier of the target resource against which the action is to be performed.
- TargetResourceID *string `json:"targetResourceId,omitempty"`
- // SourceIPAddress - The source IP address.
- SourceIPAddress *string `json:"sourceIPAddress,omitempty"`
- // DestinationIPAddress - The destination IP address.
- DestinationIPAddress *string `json:"destinationIPAddress,omitempty"`
- // TargetNicResourceID - The NIC ID. (If VM has multiple NICs and IP forwarding is enabled on any of the nics, then this parameter must be specified. Otherwise optional).
- TargetNicResourceID *string `json:"targetNicResourceId,omitempty"`
-}
-
-// NextHopResult the information about next hop from the specified VM.
-type NextHopResult struct {
- autorest.Response `json:"-"`
- // NextHopType - Next hop type. Possible values include: 'NextHopTypeInternet', 'NextHopTypeVirtualAppliance', 'NextHopTypeVirtualNetworkGateway', 'NextHopTypeVnetLocal', 'NextHopTypeHyperNetGateway', 'NextHopTypeNone'
- NextHopType NextHopType `json:"nextHopType,omitempty"`
- // NextHopIPAddress - Next hop IP Address
- NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"`
- // RouteTableID - The resource identifier for the route table associated with the route being returned. If the route being returned does not correspond to any user created routes then this field will be the string 'System Route'.
- RouteTableID *string `json:"routeTableId,omitempty"`
-}
-
-// Operation network REST API operation definition.
-type Operation struct {
- // Name - Operation name: {provider}/{resource}/{operation}
- Name *string `json:"name,omitempty"`
- // Display - Display metadata associated with the operation.
- Display *OperationDisplay `json:"display,omitempty"`
- // Origin - Origin of the operation.
- Origin *string `json:"origin,omitempty"`
- // OperationPropertiesFormat - Operation properties format.
- *OperationPropertiesFormat `json:"properties,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for Operation.
-func (o Operation) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if o.Name != nil {
- objectMap["name"] = o.Name
- }
- if o.Display != nil {
- objectMap["display"] = o.Display
- }
- if o.Origin != nil {
- objectMap["origin"] = o.Origin
- }
- if o.OperationPropertiesFormat != nil {
- objectMap["properties"] = o.OperationPropertiesFormat
- }
- return json.Marshal(objectMap)
-}
-
-// UnmarshalJSON is the custom unmarshaler for Operation struct.
-func (o *Operation) 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
- }
- o.Name = &name
- }
- case "display":
- if v != nil {
- var display OperationDisplay
- err = json.Unmarshal(*v, &display)
- if err != nil {
- return err
- }
- o.Display = &display
- }
- case "origin":
- if v != nil {
- var origin string
- err = json.Unmarshal(*v, &origin)
- if err != nil {
- return err
- }
- o.Origin = &origin
- }
- case "properties":
- if v != nil {
- var operationPropertiesFormat OperationPropertiesFormat
- err = json.Unmarshal(*v, &operationPropertiesFormat)
- if err != nil {
- return err
- }
- o.OperationPropertiesFormat = &operationPropertiesFormat
- }
- }
- }
-
- return nil
-}
-
-// OperationDisplay display metadata associated with the operation.
-type OperationDisplay struct {
- // Provider - Service provider: Microsoft Network.
- Provider *string `json:"provider,omitempty"`
- // Resource - Resource on which the operation is performed.
- Resource *string `json:"resource,omitempty"`
- // Operation - Type of the operation: get, read, delete, etc.
- Operation *string `json:"operation,omitempty"`
- // Description - Description of the operation.
- Description *string `json:"description,omitempty"`
-}
-
-// OperationListResult result of the request to list Network operations. It contains a list of operations and a
-// URL link to get the next set of results.
-type OperationListResult struct {
- autorest.Response `json:"-"`
- // Value - List of Network operations supported by the Network resource provider.
- Value *[]Operation `json:"value,omitempty"`
- // NextLink - URL to get the next set of operation list results if there are any.
- NextLink *string `json:"nextLink,omitempty"`
-}
-
-// OperationListResultIterator provides access to a complete listing of Operation values.
-type OperationListResultIterator struct {
- i int
- page OperationListResultPage
-}
-
-// 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 *OperationListResultIterator) NextWithContext(ctx context.Context) (err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultIterator.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 *OperationListResultIterator) Next() error {
- return iter.NextWithContext(context.Background())
-}
-
-// NotDone returns true if the enumeration should be started or is not yet complete.
-func (iter OperationListResultIterator) 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 OperationListResultIterator) Response() OperationListResult {
- 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 OperationListResultIterator) Value() Operation {
- if !iter.page.NotDone() {
- return Operation{}
- }
- return iter.page.Values()[iter.i]
-}
-
-// Creates a new instance of the OperationListResultIterator type.
-func NewOperationListResultIterator(page OperationListResultPage) OperationListResultIterator {
- return OperationListResultIterator{page: page}
-}
-
-// IsEmpty returns true if the ListResult contains no values.
-func (olr OperationListResult) IsEmpty() bool {
- return olr.Value == nil || len(*olr.Value) == 0
-}
-
-// hasNextLink returns true if the NextLink is not empty.
-func (olr OperationListResult) hasNextLink() bool {
- return olr.NextLink != nil && len(*olr.NextLink) != 0
-}
-
-// operationListResultPreparer prepares a request to retrieve the next set of results.
-// It returns nil if no more results exist.
-func (olr OperationListResult) operationListResultPreparer(ctx context.Context) (*http.Request, error) {
- if !olr.hasNextLink() {
- return nil, nil
- }
- return autorest.Prepare((&http.Request{}).WithContext(ctx),
- autorest.AsJSON(),
- autorest.AsGet(),
- autorest.WithBaseURL(to.String(olr.NextLink)))
-}
-
-// OperationListResultPage contains a page of Operation values.
-type OperationListResultPage struct {
- fn func(context.Context, OperationListResult) (OperationListResult, error)
- olr OperationListResult
-}
-
-// 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 *OperationListResultPage) NextWithContext(ctx context.Context) (err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultPage.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.olr)
- if err != nil {
- return err
- }
- page.olr = 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 *OperationListResultPage) Next() error {
- return page.NextWithContext(context.Background())
-}
-
-// NotDone returns true if the page enumeration should be started or is not yet complete.
-func (page OperationListResultPage) NotDone() bool {
- return !page.olr.IsEmpty()
-}
-
-// Response returns the raw server response from the last page request.
-func (page OperationListResultPage) Response() OperationListResult {
- return page.olr
-}
-
-// Values returns the slice of values for the current page or nil if there are no values.
-func (page OperationListResultPage) Values() []Operation {
- if page.olr.IsEmpty() {
- return nil
- }
- return *page.olr.Value
-}
-
-// Creates a new instance of the OperationListResultPage type.
-func NewOperationListResultPage(getNextPage func(context.Context, OperationListResult) (OperationListResult, error)) OperationListResultPage {
- return OperationListResultPage{fn: getNextPage}
-}
-
-// OperationPropertiesFormat description of operation properties format.
-type OperationPropertiesFormat struct {
- // ServiceSpecification - Specification of the service.
- ServiceSpecification *OperationPropertiesFormatServiceSpecification `json:"serviceSpecification,omitempty"`
-}
-
-// OperationPropertiesFormatServiceSpecification specification of the service.
-type OperationPropertiesFormatServiceSpecification struct {
- // MetricSpecifications - Operation service specification.
- MetricSpecifications *[]MetricSpecification `json:"metricSpecifications,omitempty"`
- // LogSpecifications - Operation log specification.
- LogSpecifications *[]LogSpecification `json:"logSpecifications,omitempty"`
-}
-
-// OutboundRule outbound rule of the load balancer.
-type OutboundRule struct {
- autorest.Response `json:"-"`
- // OutboundRulePropertiesFormat - Properties of load balancer outbound rule.
- *OutboundRulePropertiesFormat `json:"properties,omitempty"`
- // Name - 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"`
- // Etag - A unique read-only string that changes whenever the resource is updated.
- Etag *string `json:"etag,omitempty"`
- // ID - Resource ID.
- ID *string `json:"id,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for OutboundRule.
-func (or OutboundRule) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if or.OutboundRulePropertiesFormat != nil {
- objectMap["properties"] = or.OutboundRulePropertiesFormat
- }
- if or.Name != nil {
- objectMap["name"] = or.Name
- }
- if or.Etag != nil {
- objectMap["etag"] = or.Etag
- }
- if or.ID != nil {
- objectMap["id"] = or.ID
- }
- return json.Marshal(objectMap)
-}
-
-// UnmarshalJSON is the custom unmarshaler for OutboundRule struct.
-func (or *OutboundRule) 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 outboundRulePropertiesFormat OutboundRulePropertiesFormat
- err = json.Unmarshal(*v, &outboundRulePropertiesFormat)
- if err != nil {
- return err
- }
- or.OutboundRulePropertiesFormat = &outboundRulePropertiesFormat
- }
- case "name":
- if v != nil {
- var name string
- err = json.Unmarshal(*v, &name)
- if err != nil {
- return err
- }
- or.Name = &name
- }
- case "etag":
- if v != nil {
- var etag string
- err = json.Unmarshal(*v, &etag)
- if err != nil {
- return err
- }
- or.Etag = &etag
- }
- case "id":
- if v != nil {
- var ID string
- err = json.Unmarshal(*v, &ID)
- if err != nil {
- return err
- }
- or.ID = &ID
- }
- }
- }
-
- return nil
-}
-
-// OutboundRulePropertiesFormat outbound rule of the load balancer.
-type OutboundRulePropertiesFormat struct {
- // AllocatedOutboundPorts - The number of outbound ports to be used for NAT.
- AllocatedOutboundPorts *int32 `json:"allocatedOutboundPorts,omitempty"`
- // FrontendIPConfigurations - The Frontend IP addresses of the load balancer.
- FrontendIPConfigurations *[]SubResource `json:"frontendIPConfigurations,omitempty"`
- // BackendAddressPool - A reference to a pool of DIPs. Outbound traffic is randomly load balanced across IPs in the backend IPs.
- BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"`
- // ProvisioningState - Gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
- ProvisioningState *string `json:"provisioningState,omitempty"`
- // Protocol - Protocol - TCP, UDP or All. Possible values include: 'Protocol1TCP', 'Protocol1UDP', 'Protocol1All'
- Protocol Protocol1 `json:"protocol,omitempty"`
- // EnableTCPReset - Receive bidirectional TCP Reset on TCP flow idle timeout or unexpected connection termination. This element is only used when the protocol is set to TCP.
- EnableTCPReset *bool `json:"enableTcpReset,omitempty"`
- // IdleTimeoutInMinutes - The timeout for the TCP idle connection
- IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
-}
-
-// P2SVpnGateway p2SVpnGateway Resource.
-type P2SVpnGateway struct {
- autorest.Response `json:"-"`
- *P2SVpnGatewayProperties `json:"properties,omitempty"`
- // Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
- Etag *string `json:"etag,omitempty"`
- // ID - 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 P2SVpnGateway.
-func (pvg P2SVpnGateway) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if pvg.P2SVpnGatewayProperties != nil {
- objectMap["properties"] = pvg.P2SVpnGatewayProperties
- }
- if pvg.ID != nil {
- objectMap["id"] = pvg.ID
- }
- if pvg.Location != nil {
- objectMap["location"] = pvg.Location
- }
- if pvg.Tags != nil {
- objectMap["tags"] = pvg.Tags
- }
- return json.Marshal(objectMap)
-}
-
-// UnmarshalJSON is the custom unmarshaler for P2SVpnGateway struct.
-func (pvg *P2SVpnGateway) 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 p2SVpnGatewayProperties P2SVpnGatewayProperties
- err = json.Unmarshal(*v, &p2SVpnGatewayProperties)
- if err != nil {
- return err
- }
- pvg.P2SVpnGatewayProperties = &p2SVpnGatewayProperties
- }
- case "etag":
- if v != nil {
- var etag string
- err = json.Unmarshal(*v, &etag)
- if err != nil {
- return err
- }
- pvg.Etag = &etag
- }
- case "id":
- if v != nil {
- var ID string
- err = json.Unmarshal(*v, &ID)
- if err != nil {
- return err
- }
- pvg.ID = &ID
- }
- case "name":
- if v != nil {
- var name string
- err = json.Unmarshal(*v, &name)
- if err != nil {
- return err
- }
- pvg.Name = &name
- }
- case "type":
- if v != nil {
- var typeVar string
- err = json.Unmarshal(*v, &typeVar)
- if err != nil {
- return err
- }
- pvg.Type = &typeVar
- }
- case "location":
- if v != nil {
- var location string
- err = json.Unmarshal(*v, &location)
- if err != nil {
- return err
- }
- pvg.Location = &location
- }
- case "tags":
- if v != nil {
- var tags map[string]*string
- err = json.Unmarshal(*v, &tags)
- if err != nil {
- return err
- }
- pvg.Tags = tags
- }
- }
- }
-
- return nil
-}
-
-// P2SVpnGatewayProperties parameters for P2SVpnGateway
-type P2SVpnGatewayProperties struct {
- // VirtualHub - The VirtualHub to which the gateway belongs
- VirtualHub *SubResource `json:"virtualHub,omitempty"`
- // ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
- ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
- // VpnGatewayScaleUnit - The scale unit for this p2s vpn gateway.
- VpnGatewayScaleUnit *int32 `json:"vpnGatewayScaleUnit,omitempty"`
- // P2SVpnServerConfiguration - The P2SVpnServerConfiguration to which the p2sVpnGateway is attached to.
- P2SVpnServerConfiguration *SubResource `json:"p2SVpnServerConfiguration,omitempty"`
- // VpnClientAddressPool - The reference of the address space resource which represents Address space for P2S VpnClient.
- VpnClientAddressPool *AddressSpace `json:"vpnClientAddressPool,omitempty"`
- // VpnClientConnectionHealth - READ-ONLY; All P2S VPN clients' connection health status.
- VpnClientConnectionHealth *VpnClientConnectionHealth `json:"vpnClientConnectionHealth,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for P2SVpnGatewayProperties.
-func (pvgp P2SVpnGatewayProperties) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if pvgp.VirtualHub != nil {
- objectMap["virtualHub"] = pvgp.VirtualHub
- }
- if pvgp.ProvisioningState != "" {
- objectMap["provisioningState"] = pvgp.ProvisioningState
- }
- if pvgp.VpnGatewayScaleUnit != nil {
- objectMap["vpnGatewayScaleUnit"] = pvgp.VpnGatewayScaleUnit
- }
- if pvgp.P2SVpnServerConfiguration != nil {
- objectMap["p2SVpnServerConfiguration"] = pvgp.P2SVpnServerConfiguration
- }
- if pvgp.VpnClientAddressPool != nil {
- objectMap["vpnClientAddressPool"] = pvgp.VpnClientAddressPool
- }
- return json.Marshal(objectMap)
-}
-
-// P2sVpnGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
-// long-running operation.
-type P2sVpnGatewaysCreateOrUpdateFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *P2sVpnGatewaysCreateOrUpdateFuture) Result(client P2sVpnGatewaysClient) (pvg P2SVpnGateway, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.P2sVpnGatewaysCreateOrUpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if pvg.Response.Response, err = future.GetResult(sender); err == nil && pvg.Response.Response.StatusCode != http.StatusNoContent {
- pvg, err = client.CreateOrUpdateResponder(pvg.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysCreateOrUpdateFuture", "Result", pvg.Response.Response, "Failure responding to request")
- }
- }
- return
-}
-
-// P2sVpnGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
-type P2sVpnGatewaysDeleteFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *P2sVpnGatewaysDeleteFuture) Result(client P2sVpnGatewaysClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysDeleteFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.P2sVpnGatewaysDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
-}
-
-// P2sVpnGatewaysGenerateVpnProfileFuture an abstraction for monitoring and retrieving the results of a
-// long-running operation.
-type P2sVpnGatewaysGenerateVpnProfileFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *P2sVpnGatewaysGenerateVpnProfileFuture) Result(client P2sVpnGatewaysClient) (vpr VpnProfileResponse, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysGenerateVpnProfileFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.P2sVpnGatewaysGenerateVpnProfileFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if vpr.Response.Response, err = future.GetResult(sender); err == nil && vpr.Response.Response.StatusCode != http.StatusNoContent {
- vpr, err = client.GenerateVpnProfileResponder(vpr.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysGenerateVpnProfileFuture", "Result", vpr.Response.Response, "Failure responding to request")
- }
- }
- return
-}
-
-// P2sVpnGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
-type P2sVpnGatewaysUpdateTagsFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *P2sVpnGatewaysUpdateTagsFuture) Result(client P2sVpnGatewaysClient) (pvg P2SVpnGateway, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysUpdateTagsFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.P2sVpnGatewaysUpdateTagsFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if pvg.Response.Response, err = future.GetResult(sender); err == nil && pvg.Response.Response.StatusCode != http.StatusNoContent {
- pvg, err = client.UpdateTagsResponder(pvg.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysUpdateTagsFuture", "Result", pvg.Response.Response, "Failure responding to request")
- }
- }
- return
-}
-
-// P2SVpnProfileParameters vpn Client Parameters for package generation
-type P2SVpnProfileParameters struct {
- // AuthenticationMethod - VPN client Authentication Method. Possible values are: 'EAPTLS' and 'EAPMSCHAPv2'. Possible values include: 'EAPTLS', 'EAPMSCHAPv2'
- AuthenticationMethod AuthenticationMethod `json:"authenticationMethod,omitempty"`
-}
-
-// P2SVpnServerConfigRadiusClientRootCertificate radius client root certificate of P2SVpnServerConfiguration.
-type P2SVpnServerConfigRadiusClientRootCertificate struct {
- // P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat - Properties of the Radius client root certificate.
- *P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat `json:"properties,omitempty"`
- // Name - 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"`
- // Etag - A unique read-only string that changes whenever the resource is updated.
- Etag *string `json:"etag,omitempty"`
- // ID - Resource ID.
- ID *string `json:"id,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for P2SVpnServerConfigRadiusClientRootCertificate.
-func (pvscrcrc P2SVpnServerConfigRadiusClientRootCertificate) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if pvscrcrc.P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat != nil {
- objectMap["properties"] = pvscrcrc.P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat
- }
- if pvscrcrc.Name != nil {
- objectMap["name"] = pvscrcrc.Name
- }
- if pvscrcrc.Etag != nil {
- objectMap["etag"] = pvscrcrc.Etag
- }
- if pvscrcrc.ID != nil {
- objectMap["id"] = pvscrcrc.ID
- }
- return json.Marshal(objectMap)
-}
-
-// UnmarshalJSON is the custom unmarshaler for P2SVpnServerConfigRadiusClientRootCertificate struct.
-func (pvscrcrc *P2SVpnServerConfigRadiusClientRootCertificate) 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 p2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat
- err = json.Unmarshal(*v, &p2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat)
- if err != nil {
- return err
- }
- pvscrcrc.P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat = &p2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat
- }
- case "name":
- if v != nil {
- var name string
- err = json.Unmarshal(*v, &name)
- if err != nil {
- return err
- }
- pvscrcrc.Name = &name
- }
- case "etag":
- if v != nil {
- var etag string
- err = json.Unmarshal(*v, &etag)
- if err != nil {
- return err
- }
- pvscrcrc.Etag = &etag
- }
- case "id":
- if v != nil {
- var ID string
- err = json.Unmarshal(*v, &ID)
- if err != nil {
- return err
- }
- pvscrcrc.ID = &ID
- }
- }
- }
-
- return nil
-}
-
-// P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat properties of the Radius client root
-// certificate of P2SVpnServerConfiguration.
-type P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat struct {
- // Thumbprint - The Radius client root certificate thumbprint.
- Thumbprint *string `json:"thumbprint,omitempty"`
- // ProvisioningState - READ-ONLY; The provisioning state of the Radius client root certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
- ProvisioningState *string `json:"provisioningState,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat.
-func (pvscrcrcpf P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if pvscrcrcpf.Thumbprint != nil {
- objectMap["thumbprint"] = pvscrcrcpf.Thumbprint
- }
- return json.Marshal(objectMap)
-}
-
-// P2SVpnServerConfigRadiusServerRootCertificate radius Server root certificate of P2SVpnServerConfiguration.
-type P2SVpnServerConfigRadiusServerRootCertificate struct {
- // P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat - Properties of the P2SVpnServerConfiguration Radius Server root certificate.
- *P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat `json:"properties,omitempty"`
- // Name - 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"`
- // Etag - A unique read-only string that changes whenever the resource is updated.
- Etag *string `json:"etag,omitempty"`
- // ID - Resource ID.
- ID *string `json:"id,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for P2SVpnServerConfigRadiusServerRootCertificate.
-func (pvscrsrc P2SVpnServerConfigRadiusServerRootCertificate) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if pvscrsrc.P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat != nil {
- objectMap["properties"] = pvscrsrc.P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat
- }
- if pvscrsrc.Name != nil {
- objectMap["name"] = pvscrsrc.Name
- }
- if pvscrsrc.Etag != nil {
- objectMap["etag"] = pvscrsrc.Etag
- }
- if pvscrsrc.ID != nil {
- objectMap["id"] = pvscrsrc.ID
- }
- return json.Marshal(objectMap)
-}
-
-// UnmarshalJSON is the custom unmarshaler for P2SVpnServerConfigRadiusServerRootCertificate struct.
-func (pvscrsrc *P2SVpnServerConfigRadiusServerRootCertificate) 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 p2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat
- err = json.Unmarshal(*v, &p2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat)
- if err != nil {
- return err
- }
- pvscrsrc.P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat = &p2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat
- }
- case "name":
- if v != nil {
- var name string
- err = json.Unmarshal(*v, &name)
- if err != nil {
- return err
- }
- pvscrsrc.Name = &name
- }
- case "etag":
- if v != nil {
- var etag string
- err = json.Unmarshal(*v, &etag)
- if err != nil {
- return err
- }
- pvscrsrc.Etag = &etag
- }
- case "id":
- if v != nil {
- var ID string
- err = json.Unmarshal(*v, &ID)
- if err != nil {
- return err
- }
- pvscrsrc.ID = &ID
- }
- }
- }
-
- return nil
-}
-
-// P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat properties of Radius Server root certificate
-// of P2SVpnServerConfiguration.
-type P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat struct {
- // PublicCertData - The certificate public data.
- PublicCertData *string `json:"publicCertData,omitempty"`
- // ProvisioningState - READ-ONLY; The provisioning state of the P2SVpnServerConfiguration Radius Server root certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
- ProvisioningState *string `json:"provisioningState,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat.
-func (pvscrsrcpf P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if pvscrsrcpf.PublicCertData != nil {
- objectMap["publicCertData"] = pvscrsrcpf.PublicCertData
- }
- return json.Marshal(objectMap)
-}
-
-// P2SVpnServerConfiguration p2SVpnServerConfiguration Resource.
-type P2SVpnServerConfiguration struct {
- autorest.Response `json:"-"`
- *P2SVpnServerConfigurationProperties `json:"properties,omitempty"`
- // Name - 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"`
- // Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
- Etag *string `json:"etag,omitempty"`
- // ID - Resource ID.
- ID *string `json:"id,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for P2SVpnServerConfiguration.
-func (pvsc P2SVpnServerConfiguration) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if pvsc.P2SVpnServerConfigurationProperties != nil {
- objectMap["properties"] = pvsc.P2SVpnServerConfigurationProperties
- }
- if pvsc.Name != nil {
- objectMap["name"] = pvsc.Name
- }
- if pvsc.ID != nil {
- objectMap["id"] = pvsc.ID
- }
- return json.Marshal(objectMap)
-}
-
-// UnmarshalJSON is the custom unmarshaler for P2SVpnServerConfiguration struct.
-func (pvsc *P2SVpnServerConfiguration) 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 p2SVpnServerConfigurationProperties P2SVpnServerConfigurationProperties
- err = json.Unmarshal(*v, &p2SVpnServerConfigurationProperties)
- if err != nil {
- return err
- }
- pvsc.P2SVpnServerConfigurationProperties = &p2SVpnServerConfigurationProperties
- }
- case "name":
- if v != nil {
- var name string
- err = json.Unmarshal(*v, &name)
- if err != nil {
- return err
- }
- pvsc.Name = &name
- }
- case "etag":
- if v != nil {
- var etag string
- err = json.Unmarshal(*v, &etag)
- if err != nil {
- return err
- }
- pvsc.Etag = &etag
- }
- case "id":
- if v != nil {
- var ID string
- err = json.Unmarshal(*v, &ID)
- if err != nil {
- return err
- }
- pvsc.ID = &ID
- }
- }
- }
-
- return nil
-}
-
-// P2SVpnServerConfigurationProperties parameters for P2SVpnServerConfiguration
-type P2SVpnServerConfigurationProperties struct {
- // Name - The name of the P2SVpnServerConfiguration that is unique within a VirtualWan in a resource group. This name can be used to access the resource along with Paren VirtualWan resource name.
- Name *string `json:"name,omitempty"`
- // VpnProtocols - VPN protocols for the P2SVpnServerConfiguration.
- VpnProtocols *[]VpnGatewayTunnelingProtocol `json:"vpnProtocols,omitempty"`
- // P2SVpnServerConfigVpnClientRootCertificates - VPN client root certificate of P2SVpnServerConfiguration.
- P2SVpnServerConfigVpnClientRootCertificates *[]P2SVpnServerConfigVpnClientRootCertificate `json:"p2SVpnServerConfigVpnClientRootCertificates,omitempty"`
- // P2SVpnServerConfigVpnClientRevokedCertificates - VPN client revoked certificate of P2SVpnServerConfiguration.
- P2SVpnServerConfigVpnClientRevokedCertificates *[]P2SVpnServerConfigVpnClientRevokedCertificate `json:"p2SVpnServerConfigVpnClientRevokedCertificates,omitempty"`
- // P2SVpnServerConfigRadiusServerRootCertificates - Radius Server root certificate of P2SVpnServerConfiguration.
- P2SVpnServerConfigRadiusServerRootCertificates *[]P2SVpnServerConfigRadiusServerRootCertificate `json:"p2SVpnServerConfigRadiusServerRootCertificates,omitempty"`
- // P2SVpnServerConfigRadiusClientRootCertificates - Radius client root certificate of P2SVpnServerConfiguration.
- P2SVpnServerConfigRadiusClientRootCertificates *[]P2SVpnServerConfigRadiusClientRootCertificate `json:"p2SVpnServerConfigRadiusClientRootCertificates,omitempty"`
- // VpnClientIpsecPolicies - VpnClientIpsecPolicies for P2SVpnServerConfiguration.
- VpnClientIpsecPolicies *[]IpsecPolicy `json:"vpnClientIpsecPolicies,omitempty"`
- // RadiusServerAddress - The radius server address property of the P2SVpnServerConfiguration resource for point to site client connection.
- RadiusServerAddress *string `json:"radiusServerAddress,omitempty"`
- // RadiusServerSecret - The radius secret property of the P2SVpnServerConfiguration resource for point to site client connection.
- RadiusServerSecret *string `json:"radiusServerSecret,omitempty"`
- // ProvisioningState - READ-ONLY; The provisioning state of the P2SVpnServerConfiguration resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
- ProvisioningState *string `json:"provisioningState,omitempty"`
- // P2SVpnGateways - READ-ONLY
- P2SVpnGateways *[]SubResource `json:"p2SVpnGateways,omitempty"`
- // Etag - A unique read-only string that changes whenever the resource is updated.
- Etag *string `json:"etag,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for P2SVpnServerConfigurationProperties.
-func (pvscp P2SVpnServerConfigurationProperties) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if pvscp.Name != nil {
- objectMap["name"] = pvscp.Name
- }
- if pvscp.VpnProtocols != nil {
- objectMap["vpnProtocols"] = pvscp.VpnProtocols
- }
- if pvscp.P2SVpnServerConfigVpnClientRootCertificates != nil {
- objectMap["p2SVpnServerConfigVpnClientRootCertificates"] = pvscp.P2SVpnServerConfigVpnClientRootCertificates
- }
- if pvscp.P2SVpnServerConfigVpnClientRevokedCertificates != nil {
- objectMap["p2SVpnServerConfigVpnClientRevokedCertificates"] = pvscp.P2SVpnServerConfigVpnClientRevokedCertificates
- }
- if pvscp.P2SVpnServerConfigRadiusServerRootCertificates != nil {
- objectMap["p2SVpnServerConfigRadiusServerRootCertificates"] = pvscp.P2SVpnServerConfigRadiusServerRootCertificates
- }
- if pvscp.P2SVpnServerConfigRadiusClientRootCertificates != nil {
- objectMap["p2SVpnServerConfigRadiusClientRootCertificates"] = pvscp.P2SVpnServerConfigRadiusClientRootCertificates
- }
- if pvscp.VpnClientIpsecPolicies != nil {
- objectMap["vpnClientIpsecPolicies"] = pvscp.VpnClientIpsecPolicies
- }
- if pvscp.RadiusServerAddress != nil {
- objectMap["radiusServerAddress"] = pvscp.RadiusServerAddress
- }
- if pvscp.RadiusServerSecret != nil {
- objectMap["radiusServerSecret"] = pvscp.RadiusServerSecret
- }
- if pvscp.Etag != nil {
- objectMap["etag"] = pvscp.Etag
- }
- return json.Marshal(objectMap)
-}
-
-// P2sVpnServerConfigurationsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
-// long-running operation.
-type P2sVpnServerConfigurationsCreateOrUpdateFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *P2sVpnServerConfigurationsCreateOrUpdateFuture) Result(client P2sVpnServerConfigurationsClient) (pvsc P2SVpnServerConfiguration, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.P2sVpnServerConfigurationsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.P2sVpnServerConfigurationsCreateOrUpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if pvsc.Response.Response, err = future.GetResult(sender); err == nil && pvsc.Response.Response.StatusCode != http.StatusNoContent {
- pvsc, err = client.CreateOrUpdateResponder(pvsc.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.P2sVpnServerConfigurationsCreateOrUpdateFuture", "Result", pvsc.Response.Response, "Failure responding to request")
- }
- }
- return
-}
-
-// P2sVpnServerConfigurationsDeleteFuture an abstraction for monitoring and retrieving the results of a
-// long-running operation.
-type P2sVpnServerConfigurationsDeleteFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *P2sVpnServerConfigurationsDeleteFuture) Result(client P2sVpnServerConfigurationsClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.P2sVpnServerConfigurationsDeleteFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.P2sVpnServerConfigurationsDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
-}
-
-// P2SVpnServerConfigVpnClientRevokedCertificate VPN client revoked certificate of P2SVpnServerConfiguration.
-type P2SVpnServerConfigVpnClientRevokedCertificate struct {
- // P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat - Properties of the vpn client revoked certificate.
- *P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat `json:"properties,omitempty"`
- // Name - 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"`
- // Etag - A unique read-only string that changes whenever the resource is updated.
- Etag *string `json:"etag,omitempty"`
- // ID - Resource ID.
- ID *string `json:"id,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for P2SVpnServerConfigVpnClientRevokedCertificate.
-func (pvscvcrc P2SVpnServerConfigVpnClientRevokedCertificate) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if pvscvcrc.P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat != nil {
- objectMap["properties"] = pvscvcrc.P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat
- }
- if pvscvcrc.Name != nil {
- objectMap["name"] = pvscvcrc.Name
- }
- if pvscvcrc.Etag != nil {
- objectMap["etag"] = pvscvcrc.Etag
- }
- if pvscvcrc.ID != nil {
- objectMap["id"] = pvscvcrc.ID
- }
- return json.Marshal(objectMap)
-}
-
-// UnmarshalJSON is the custom unmarshaler for P2SVpnServerConfigVpnClientRevokedCertificate struct.
-func (pvscvcrc *P2SVpnServerConfigVpnClientRevokedCertificate) 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 p2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat
- err = json.Unmarshal(*v, &p2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat)
- if err != nil {
- return err
- }
- pvscvcrc.P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat = &p2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat
- }
- case "name":
- if v != nil {
- var name string
- err = json.Unmarshal(*v, &name)
- if err != nil {
- return err
- }
- pvscvcrc.Name = &name
- }
- case "etag":
- if v != nil {
- var etag string
- err = json.Unmarshal(*v, &etag)
- if err != nil {
- return err
- }
- pvscvcrc.Etag = &etag
- }
- case "id":
- if v != nil {
- var ID string
- err = json.Unmarshal(*v, &ID)
- if err != nil {
- return err
- }
- pvscvcrc.ID = &ID
- }
- }
- }
-
- return nil
-}
-
-// P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat properties of the revoked VPN client
-// certificate of P2SVpnServerConfiguration.
-type P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat struct {
- // Thumbprint - The revoked VPN client certificate thumbprint.
- Thumbprint *string `json:"thumbprint,omitempty"`
- // ProvisioningState - READ-ONLY; The provisioning state of the VPN client revoked certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
- ProvisioningState *string `json:"provisioningState,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat.
-func (pvscvcrcpf P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if pvscvcrcpf.Thumbprint != nil {
- objectMap["thumbprint"] = pvscvcrcpf.Thumbprint
- }
- return json.Marshal(objectMap)
-}
-
-// P2SVpnServerConfigVpnClientRootCertificate VPN client root certificate of P2SVpnServerConfiguration.
-type P2SVpnServerConfigVpnClientRootCertificate struct {
- // P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat - Properties of the P2SVpnServerConfiguration VPN client root certificate.
- *P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat `json:"properties,omitempty"`
- // Name - 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"`
- // Etag - A unique read-only string that changes whenever the resource is updated.
- Etag *string `json:"etag,omitempty"`
- // ID - Resource ID.
- ID *string `json:"id,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for P2SVpnServerConfigVpnClientRootCertificate.
-func (pvscvcrc P2SVpnServerConfigVpnClientRootCertificate) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if pvscvcrc.P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat != nil {
- objectMap["properties"] = pvscvcrc.P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat
- }
- if pvscvcrc.Name != nil {
- objectMap["name"] = pvscvcrc.Name
- }
- if pvscvcrc.Etag != nil {
- objectMap["etag"] = pvscvcrc.Etag
- }
- if pvscvcrc.ID != nil {
- objectMap["id"] = pvscvcrc.ID
- }
- return json.Marshal(objectMap)
-}
-
-// UnmarshalJSON is the custom unmarshaler for P2SVpnServerConfigVpnClientRootCertificate struct.
-func (pvscvcrc *P2SVpnServerConfigVpnClientRootCertificate) 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 p2SVpnServerConfigVpnClientRootCertificatePropertiesFormat P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat
- err = json.Unmarshal(*v, &p2SVpnServerConfigVpnClientRootCertificatePropertiesFormat)
- if err != nil {
- return err
- }
- pvscvcrc.P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat = &p2SVpnServerConfigVpnClientRootCertificatePropertiesFormat
- }
- case "name":
- if v != nil {
- var name string
- err = json.Unmarshal(*v, &name)
- if err != nil {
- return err
- }
- pvscvcrc.Name = &name
- }
- case "etag":
- if v != nil {
- var etag string
- err = json.Unmarshal(*v, &etag)
- if err != nil {
- return err
- }
- pvscvcrc.Etag = &etag
- }
- case "id":
- if v != nil {
- var ID string
- err = json.Unmarshal(*v, &ID)
- if err != nil {
- return err
- }
- pvscvcrc.ID = &ID
- }
- }
- }
-
- return nil
-}
-
-// P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat properties of VPN client root certificate of
-// P2SVpnServerConfiguration.
-type P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat struct {
- // PublicCertData - The certificate public data.
- PublicCertData *string `json:"publicCertData,omitempty"`
- // ProvisioningState - READ-ONLY; The provisioning state of the P2SVpnServerConfiguration VPN client root certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
- ProvisioningState *string `json:"provisioningState,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat.
-func (pvscvcrcpf P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if pvscvcrcpf.PublicCertData != nil {
- objectMap["publicCertData"] = pvscvcrcpf.PublicCertData
- }
- return json.Marshal(objectMap)
-}
-
-// PacketCapture parameters that define the create packet capture operation.
-type PacketCapture struct {
- *PacketCaptureParameters `json:"properties,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for PacketCapture.
-func (pc PacketCapture) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if pc.PacketCaptureParameters != nil {
- objectMap["properties"] = pc.PacketCaptureParameters
- }
- return json.Marshal(objectMap)
-}
-
-// UnmarshalJSON is the custom unmarshaler for PacketCapture struct.
-func (pc *PacketCapture) 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 packetCaptureParameters PacketCaptureParameters
- err = json.Unmarshal(*v, &packetCaptureParameters)
- if err != nil {
- return err
- }
- pc.PacketCaptureParameters = &packetCaptureParameters
- }
- }
- }
-
- return nil
-}
-
-// PacketCaptureFilter filter that is applied to packet capture request. Multiple filters can be applied.
-type PacketCaptureFilter struct {
- // Protocol - Protocol to be filtered on. Possible values include: 'PcProtocolTCP', 'PcProtocolUDP', 'PcProtocolAny'
- Protocol PcProtocol `json:"protocol,omitempty"`
- // LocalIPAddress - Local IP Address to be filtered on. Notation: "127.0.0.1" for single address entry. "127.0.0.1-127.0.0.255" for range. "127.0.0.1;127.0.0.5"? for multiple entries. Multiple ranges not currently supported. Mixing ranges with multiple entries not currently supported. Default = null.
- LocalIPAddress *string `json:"localIPAddress,omitempty"`
- // RemoteIPAddress - Local IP Address to be filtered on. Notation: "127.0.0.1" for single address entry. "127.0.0.1-127.0.0.255" for range. "127.0.0.1;127.0.0.5;" for multiple entries. Multiple ranges not currently supported. Mixing ranges with multiple entries not currently supported. Default = null.
- RemoteIPAddress *string `json:"remoteIPAddress,omitempty"`
- // LocalPort - Local port to be filtered on. Notation: "80" for single port entry."80-85" for range. "80;443;" for multiple entries. Multiple ranges not currently supported. Mixing ranges with multiple entries not currently supported. Default = null.
- LocalPort *string `json:"localPort,omitempty"`
- // RemotePort - Remote port to be filtered on. Notation: "80" for single port entry."80-85" for range. "80;443;" for multiple entries. Multiple ranges not currently supported. Mixing ranges with multiple entries not currently supported. Default = null.
- RemotePort *string `json:"remotePort,omitempty"`
-}
-
-// PacketCaptureListResult list of packet capture sessions.
-type PacketCaptureListResult struct {
- autorest.Response `json:"-"`
- // Value - Information about packet capture sessions.
- Value *[]PacketCaptureResult `json:"value,omitempty"`
-}
-
-// PacketCaptureParameters parameters that define the create packet capture operation.
-type PacketCaptureParameters struct {
- // Target - The ID of the targeted resource, only VM is currently supported.
- Target *string `json:"target,omitempty"`
- // BytesToCapturePerPacket - Number of bytes captured per packet, the remaining bytes are truncated.
- BytesToCapturePerPacket *int32 `json:"bytesToCapturePerPacket,omitempty"`
- // TotalBytesPerSession - Maximum size of the capture output.
- TotalBytesPerSession *int32 `json:"totalBytesPerSession,omitempty"`
- // TimeLimitInSeconds - Maximum duration of the capture session in seconds.
- TimeLimitInSeconds *int32 `json:"timeLimitInSeconds,omitempty"`
- StorageLocation *PacketCaptureStorageLocation `json:"storageLocation,omitempty"`
- Filters *[]PacketCaptureFilter `json:"filters,omitempty"`
-}
-
-// PacketCaptureQueryStatusResult status of packet capture session.
-type PacketCaptureQueryStatusResult struct {
- autorest.Response `json:"-"`
- // Name - The name of the packet capture resource.
- Name *string `json:"name,omitempty"`
- // ID - The ID of the packet capture resource.
- ID *string `json:"id,omitempty"`
- // CaptureStartTime - The start time of the packet capture session.
- CaptureStartTime *date.Time `json:"captureStartTime,omitempty"`
- // PacketCaptureStatus - The status of the packet capture session. Possible values include: 'PcStatusNotStarted', 'PcStatusRunning', 'PcStatusStopped', 'PcStatusError', 'PcStatusUnknown'
- PacketCaptureStatus PcStatus `json:"packetCaptureStatus,omitempty"`
- // StopReason - The reason the current packet capture session was stopped.
- StopReason *string `json:"stopReason,omitempty"`
- // PacketCaptureError - List of errors of packet capture session.
- PacketCaptureError *[]PcError `json:"packetCaptureError,omitempty"`
-}
-
-// PacketCaptureResult information about packet capture session.
-type PacketCaptureResult struct {
- autorest.Response `json:"-"`
- // Name - READ-ONLY; Name of the packet capture session.
- Name *string `json:"name,omitempty"`
- // ID - READ-ONLY; ID of the packet capture operation.
- ID *string `json:"id,omitempty"`
- Etag *string `json:"etag,omitempty"`
- *PacketCaptureResultProperties `json:"properties,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for PacketCaptureResult.
-func (pcr PacketCaptureResult) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if pcr.Etag != nil {
- objectMap["etag"] = pcr.Etag
- }
- if pcr.PacketCaptureResultProperties != nil {
- objectMap["properties"] = pcr.PacketCaptureResultProperties
- }
- return json.Marshal(objectMap)
-}
-
-// UnmarshalJSON is the custom unmarshaler for PacketCaptureResult struct.
-func (pcr *PacketCaptureResult) 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
- }
- pcr.Name = &name
- }
- case "id":
- if v != nil {
- var ID string
- err = json.Unmarshal(*v, &ID)
- if err != nil {
- return err
- }
- pcr.ID = &ID
- }
- case "etag":
- if v != nil {
- var etag string
- err = json.Unmarshal(*v, &etag)
- if err != nil {
- return err
- }
- pcr.Etag = &etag
- }
- case "properties":
- if v != nil {
- var packetCaptureResultProperties PacketCaptureResultProperties
- err = json.Unmarshal(*v, &packetCaptureResultProperties)
- if err != nil {
- return err
- }
- pcr.PacketCaptureResultProperties = &packetCaptureResultProperties
- }
- }
- }
-
- return nil
-}
-
-// PacketCaptureResultProperties describes the properties of a packet capture session.
-type PacketCaptureResultProperties struct {
- // ProvisioningState - The provisioning state of the packet capture session. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
- ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
- // Target - The ID of the targeted resource, only VM is currently supported.
- Target *string `json:"target,omitempty"`
- // BytesToCapturePerPacket - Number of bytes captured per packet, the remaining bytes are truncated.
- BytesToCapturePerPacket *int32 `json:"bytesToCapturePerPacket,omitempty"`
- // TotalBytesPerSession - Maximum size of the capture output.
- TotalBytesPerSession *int32 `json:"totalBytesPerSession,omitempty"`
- // TimeLimitInSeconds - Maximum duration of the capture session in seconds.
- TimeLimitInSeconds *int32 `json:"timeLimitInSeconds,omitempty"`
- StorageLocation *PacketCaptureStorageLocation `json:"storageLocation,omitempty"`
- Filters *[]PacketCaptureFilter `json:"filters,omitempty"`
-}
-
-// PacketCapturesCreateFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
-type PacketCapturesCreateFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *PacketCapturesCreateFuture) Result(client PacketCapturesClient) (pcr PacketCaptureResult, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesCreateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.PacketCapturesCreateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if pcr.Response.Response, err = future.GetResult(sender); err == nil && pcr.Response.Response.StatusCode != http.StatusNoContent {
- pcr, err = client.CreateResponder(pcr.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesCreateFuture", "Result", pcr.Response.Response, "Failure responding to request")
- }
- }
- return
-}
-
-// PacketCapturesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
-type PacketCapturesDeleteFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *PacketCapturesDeleteFuture) Result(client PacketCapturesClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesDeleteFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.PacketCapturesDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
-}
-
-// PacketCapturesGetStatusFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
-type PacketCapturesGetStatusFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *PacketCapturesGetStatusFuture) Result(client PacketCapturesClient) (pcqsr PacketCaptureQueryStatusResult, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesGetStatusFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.PacketCapturesGetStatusFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if pcqsr.Response.Response, err = future.GetResult(sender); err == nil && pcqsr.Response.Response.StatusCode != http.StatusNoContent {
- pcqsr, err = client.GetStatusResponder(pcqsr.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesGetStatusFuture", "Result", pcqsr.Response.Response, "Failure responding to request")
- }
- }
- return
-}
-
-// PacketCapturesStopFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
-type PacketCapturesStopFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *PacketCapturesStopFuture) Result(client PacketCapturesClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesStopFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.PacketCapturesStopFuture")
- return
- }
- ar.Response = future.Response()
- return
-}
-
-// PacketCaptureStorageLocation describes the storage location for a packet capture session.
-type PacketCaptureStorageLocation struct {
- // StorageID - The ID of the storage account to save the packet capture session. Required if no local file path is provided.
- StorageID *string `json:"storageId,omitempty"`
- // StoragePath - The URI of the storage path to save the packet capture. Must be a well-formed URI describing the location to save the packet capture.
- StoragePath *string `json:"storagePath,omitempty"`
- // FilePath - A valid local path on the targeting VM. Must include the name of the capture file (*.cap). For linux virtual machine it must start with /var/captures. Required if no storage ID is provided, otherwise optional.
- FilePath *string `json:"filePath,omitempty"`
-}
-
-// PatchRouteFilter route Filter Resource.
-type PatchRouteFilter struct {
- *RouteFilterPropertiesFormat `json:"properties,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"`
- // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
- Etag *string `json:"etag,omitempty"`
- // Type - READ-ONLY; Resource type.
- Type *string `json:"type,omitempty"`
- // Tags - Resource tags.
- Tags map[string]*string `json:"tags"`
- // ID - Resource ID.
- ID *string `json:"id,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for PatchRouteFilter.
-func (prf PatchRouteFilter) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if prf.RouteFilterPropertiesFormat != nil {
- objectMap["properties"] = prf.RouteFilterPropertiesFormat
- }
- if prf.Tags != nil {
- objectMap["tags"] = prf.Tags
- }
- if prf.ID != nil {
- objectMap["id"] = prf.ID
- }
- return json.Marshal(objectMap)
-}
-
-// UnmarshalJSON is the custom unmarshaler for PatchRouteFilter struct.
-func (prf *PatchRouteFilter) 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 routeFilterPropertiesFormat RouteFilterPropertiesFormat
- err = json.Unmarshal(*v, &routeFilterPropertiesFormat)
- if err != nil {
- return err
- }
- prf.RouteFilterPropertiesFormat = &routeFilterPropertiesFormat
- }
- case "name":
- if v != nil {
- var name string
- err = json.Unmarshal(*v, &name)
- if err != nil {
- return err
- }
- prf.Name = &name
- }
- case "etag":
- if v != nil {
- var etag string
- err = json.Unmarshal(*v, &etag)
- if err != nil {
- return err
- }
- prf.Etag = &etag
- }
- case "type":
- if v != nil {
- var typeVar string
- err = json.Unmarshal(*v, &typeVar)
- if err != nil {
- return err
- }
- prf.Type = &typeVar
- }
- case "tags":
- if v != nil {
- var tags map[string]*string
- err = json.Unmarshal(*v, &tags)
- if err != nil {
- return err
- }
- prf.Tags = tags
- }
- case "id":
- if v != nil {
- var ID string
- err = json.Unmarshal(*v, &ID)
- if err != nil {
- return err
- }
- prf.ID = &ID
- }
- }
- }
-
- return nil
-}
-
-// PatchRouteFilterRule route Filter Rule Resource
-type PatchRouteFilterRule struct {
- *RouteFilterRulePropertiesFormat `json:"properties,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"`
- // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
- Etag *string `json:"etag,omitempty"`
- // ID - Resource ID.
- ID *string `json:"id,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for PatchRouteFilterRule.
-func (prfr PatchRouteFilterRule) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if prfr.RouteFilterRulePropertiesFormat != nil {
- objectMap["properties"] = prfr.RouteFilterRulePropertiesFormat
- }
- if prfr.ID != nil {
- objectMap["id"] = prfr.ID
- }
- return json.Marshal(objectMap)
-}
-
-// UnmarshalJSON is the custom unmarshaler for PatchRouteFilterRule struct.
-func (prfr *PatchRouteFilterRule) 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 routeFilterRulePropertiesFormat RouteFilterRulePropertiesFormat
- err = json.Unmarshal(*v, &routeFilterRulePropertiesFormat)
- if err != nil {
- return err
- }
- prfr.RouteFilterRulePropertiesFormat = &routeFilterRulePropertiesFormat
- }
- case "name":
- if v != nil {
- var name string
- err = json.Unmarshal(*v, &name)
- if err != nil {
- return err
- }
- prfr.Name = &name
- }
- case "etag":
- if v != nil {
- var etag string
- err = json.Unmarshal(*v, &etag)
- if err != nil {
- return err
- }
- prfr.Etag = &etag
- }
- case "id":
- if v != nil {
- var ID string
- err = json.Unmarshal(*v, &ID)
- if err != nil {
- return err
- }
- prfr.ID = &ID
- }
- }
- }
-
- return nil
-}
-
-// PeerExpressRouteCircuitConnection peer Express Route Circuit Connection in an ExpressRouteCircuitPeering
-// resource.
-type PeerExpressRouteCircuitConnection struct {
- autorest.Response `json:"-"`
- *PeerExpressRouteCircuitConnectionPropertiesFormat `json:"properties,omitempty"`
- // Name - Gets 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"`
- // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
- Etag *string `json:"etag,omitempty"`
- // ID - Resource ID.
- ID *string `json:"id,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for PeerExpressRouteCircuitConnection.
-func (percc PeerExpressRouteCircuitConnection) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if percc.PeerExpressRouteCircuitConnectionPropertiesFormat != nil {
- objectMap["properties"] = percc.PeerExpressRouteCircuitConnectionPropertiesFormat
- }
- if percc.Name != nil {
- objectMap["name"] = percc.Name
- }
- if percc.ID != nil {
- objectMap["id"] = percc.ID
- }
- return json.Marshal(objectMap)
-}
-
-// UnmarshalJSON is the custom unmarshaler for PeerExpressRouteCircuitConnection struct.
-func (percc *PeerExpressRouteCircuitConnection) 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 peerExpressRouteCircuitConnectionPropertiesFormat PeerExpressRouteCircuitConnectionPropertiesFormat
- err = json.Unmarshal(*v, &peerExpressRouteCircuitConnectionPropertiesFormat)
- if err != nil {
- return err
- }
- percc.PeerExpressRouteCircuitConnectionPropertiesFormat = &peerExpressRouteCircuitConnectionPropertiesFormat
- }
- case "name":
- if v != nil {
- var name string
- err = json.Unmarshal(*v, &name)
- if err != nil {
- return err
- }
- percc.Name = &name
- }
- case "etag":
- if v != nil {
- var etag string
- err = json.Unmarshal(*v, &etag)
- if err != nil {
- return err
- }
- percc.Etag = &etag
- }
- case "id":
- if v != nil {
- var ID string
- err = json.Unmarshal(*v, &ID)
- if err != nil {
- return err
- }
- percc.ID = &ID
- }
- }
- }
-
- return nil
-}
-
-// PeerExpressRouteCircuitConnectionListResult response for ListPeeredConnections API service call retrieves
-// all global reach peer circuit connections that belongs to a Private Peering for an ExpressRouteCircuit.
-type PeerExpressRouteCircuitConnectionListResult struct {
- autorest.Response `json:"-"`
- // Value - The global reach peer circuit connection associated with Private Peering in an ExpressRoute Circuit.
- Value *[]PeerExpressRouteCircuitConnection `json:"value,omitempty"`
- // NextLink - The URL to get the next set of results.
- NextLink *string `json:"nextLink,omitempty"`
-}
-
-// PeerExpressRouteCircuitConnectionListResultIterator provides access to a complete listing of
-// PeerExpressRouteCircuitConnection values.
-type PeerExpressRouteCircuitConnectionListResultIterator struct {
- i int
- page PeerExpressRouteCircuitConnectionListResultPage
-}
-
-// 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 *PeerExpressRouteCircuitConnectionListResultIterator) NextWithContext(ctx context.Context) (err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/PeerExpressRouteCircuitConnectionListResultIterator.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 *PeerExpressRouteCircuitConnectionListResultIterator) Next() error {
- return iter.NextWithContext(context.Background())
-}
-
-// NotDone returns true if the enumeration should be started or is not yet complete.
-func (iter PeerExpressRouteCircuitConnectionListResultIterator) 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 PeerExpressRouteCircuitConnectionListResultIterator) Response() PeerExpressRouteCircuitConnectionListResult {
- 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 PeerExpressRouteCircuitConnectionListResultIterator) Value() PeerExpressRouteCircuitConnection {
- if !iter.page.NotDone() {
- return PeerExpressRouteCircuitConnection{}
- }
- return iter.page.Values()[iter.i]
-}
-
-// Creates a new instance of the PeerExpressRouteCircuitConnectionListResultIterator type.
-func NewPeerExpressRouteCircuitConnectionListResultIterator(page PeerExpressRouteCircuitConnectionListResultPage) PeerExpressRouteCircuitConnectionListResultIterator {
- return PeerExpressRouteCircuitConnectionListResultIterator{page: page}
-}
-
-// IsEmpty returns true if the ListResult contains no values.
-func (percclr PeerExpressRouteCircuitConnectionListResult) IsEmpty() bool {
- return percclr.Value == nil || len(*percclr.Value) == 0
-}
-
-// hasNextLink returns true if the NextLink is not empty.
-func (percclr PeerExpressRouteCircuitConnectionListResult) hasNextLink() bool {
- return percclr.NextLink != nil && len(*percclr.NextLink) != 0
-}
-
-// peerExpressRouteCircuitConnectionListResultPreparer prepares a request to retrieve the next set of results.
-// It returns nil if no more results exist.
-func (percclr PeerExpressRouteCircuitConnectionListResult) peerExpressRouteCircuitConnectionListResultPreparer(ctx context.Context) (*http.Request, error) {
- if !percclr.hasNextLink() {
- return nil, nil
- }
- return autorest.Prepare((&http.Request{}).WithContext(ctx),
- autorest.AsJSON(),
- autorest.AsGet(),
- autorest.WithBaseURL(to.String(percclr.NextLink)))
-}
-
-// PeerExpressRouteCircuitConnectionListResultPage contains a page of PeerExpressRouteCircuitConnection values.
-type PeerExpressRouteCircuitConnectionListResultPage struct {
- fn func(context.Context, PeerExpressRouteCircuitConnectionListResult) (PeerExpressRouteCircuitConnectionListResult, error)
- percclr PeerExpressRouteCircuitConnectionListResult
-}
-
-// 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 *PeerExpressRouteCircuitConnectionListResultPage) NextWithContext(ctx context.Context) (err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/PeerExpressRouteCircuitConnectionListResultPage.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.percclr)
- if err != nil {
- return err
- }
- page.percclr = 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 *PeerExpressRouteCircuitConnectionListResultPage) Next() error {
- return page.NextWithContext(context.Background())
-}
-
-// NotDone returns true if the page enumeration should be started or is not yet complete.
-func (page PeerExpressRouteCircuitConnectionListResultPage) NotDone() bool {
- return !page.percclr.IsEmpty()
-}
-
-// Response returns the raw server response from the last page request.
-func (page PeerExpressRouteCircuitConnectionListResultPage) Response() PeerExpressRouteCircuitConnectionListResult {
- return page.percclr
-}
-
-// Values returns the slice of values for the current page or nil if there are no values.
-func (page PeerExpressRouteCircuitConnectionListResultPage) Values() []PeerExpressRouteCircuitConnection {
- if page.percclr.IsEmpty() {
- return nil
- }
- return *page.percclr.Value
-}
-
-// Creates a new instance of the PeerExpressRouteCircuitConnectionListResultPage type.
-func NewPeerExpressRouteCircuitConnectionListResultPage(getNextPage func(context.Context, PeerExpressRouteCircuitConnectionListResult) (PeerExpressRouteCircuitConnectionListResult, error)) PeerExpressRouteCircuitConnectionListResultPage {
- return PeerExpressRouteCircuitConnectionListResultPage{fn: getNextPage}
-}
-
-// PeerExpressRouteCircuitConnectionPropertiesFormat ...
-type PeerExpressRouteCircuitConnectionPropertiesFormat struct {
- // ExpressRouteCircuitPeering - Reference to Express Route Circuit Private Peering Resource of the circuit.
- ExpressRouteCircuitPeering *SubResource `json:"expressRouteCircuitPeering,omitempty"`
- // PeerExpressRouteCircuitPeering - Reference to Express Route Circuit Private Peering Resource of the peered circuit.
- PeerExpressRouteCircuitPeering *SubResource `json:"peerExpressRouteCircuitPeering,omitempty"`
- // AddressPrefix - /29 IP address space to carve out Customer addresses for tunnels.
- AddressPrefix *string `json:"addressPrefix,omitempty"`
- // CircuitConnectionStatus - READ-ONLY; Express Route Circuit Connection State. Possible values are: 'Connected' and 'Disconnected'. Possible values include: 'Connected', 'Connecting', 'Disconnected'
- CircuitConnectionStatus CircuitConnectionStatus `json:"circuitConnectionStatus,omitempty"`
- // ConnectionName - The name of the express route circuit connection resource.
- ConnectionName *string `json:"connectionName,omitempty"`
- // AuthResourceGUID - The resource guid of the authorization used for the express route circuit connection.
- AuthResourceGUID *string `json:"authResourceGuid,omitempty"`
- // ProvisioningState - READ-ONLY; Provisioning state of the peer express route circuit connection resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'.
- ProvisioningState *string `json:"provisioningState,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for PeerExpressRouteCircuitConnectionPropertiesFormat.
-func (perccpf PeerExpressRouteCircuitConnectionPropertiesFormat) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if perccpf.ExpressRouteCircuitPeering != nil {
- objectMap["expressRouteCircuitPeering"] = perccpf.ExpressRouteCircuitPeering
- }
- if perccpf.PeerExpressRouteCircuitPeering != nil {
- objectMap["peerExpressRouteCircuitPeering"] = perccpf.PeerExpressRouteCircuitPeering
- }
- if perccpf.AddressPrefix != nil {
- objectMap["addressPrefix"] = perccpf.AddressPrefix
- }
- if perccpf.ConnectionName != nil {
- objectMap["connectionName"] = perccpf.ConnectionName
- }
- if perccpf.AuthResourceGUID != nil {
- objectMap["authResourceGuid"] = perccpf.AuthResourceGUID
- }
- return json.Marshal(objectMap)
-}
-
-// PolicySettings defines contents of a web application firewall global configuration
-type PolicySettings struct {
- // EnabledState - Describes if the policy is in enabled state or disabled state. Possible values include: 'WebApplicationFirewallEnabledStateDisabled', 'WebApplicationFirewallEnabledStateEnabled'
- EnabledState WebApplicationFirewallEnabledState `json:"enabledState,omitempty"`
- // Mode - Describes if it is in detection mode or prevention mode at policy level. Possible values include: 'WebApplicationFirewallModePrevention', 'WebApplicationFirewallModeDetection'
- Mode WebApplicationFirewallMode `json:"mode,omitempty"`
-}
-
-// PrepareNetworkPoliciesRequest ...
-type PrepareNetworkPoliciesRequest struct {
- // ServiceName - The name of the service for which subnet is being prepared for.
- ServiceName *string `json:"serviceName,omitempty"`
- // ResourceGroupName - The name of the resource group where the Network Intent Policy will be stored.
- ResourceGroupName *string `json:"resourceGroupName,omitempty"`
- // NetworkIntentPolicyConfigurations - A list of NetworkIntentPolicyConfiguration.
- NetworkIntentPolicyConfigurations *[]IntentPolicyConfiguration `json:"networkIntentPolicyConfigurations,omitempty"`
-}
-
-// Probe a load balancer probe.
-type Probe struct {
- autorest.Response `json:"-"`
- // ProbePropertiesFormat - Properties of load balancer probe.
- *ProbePropertiesFormat `json:"properties,omitempty"`
- // Name - Gets 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"`
- // Etag - A unique read-only string that changes whenever the resource is updated.
- Etag *string `json:"etag,omitempty"`
- // ID - Resource ID.
- ID *string `json:"id,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for Probe.
-func (p Probe) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if p.ProbePropertiesFormat != nil {
- objectMap["properties"] = p.ProbePropertiesFormat
- }
- if p.Name != nil {
- objectMap["name"] = p.Name
- }
- if p.Etag != nil {
- objectMap["etag"] = p.Etag
- }
- if p.ID != nil {
- objectMap["id"] = p.ID
- }
- return json.Marshal(objectMap)
-}
-
-// UnmarshalJSON is the custom unmarshaler for Probe struct.
-func (p *Probe) 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 probePropertiesFormat ProbePropertiesFormat
- err = json.Unmarshal(*v, &probePropertiesFormat)
- if err != nil {
- return err
- }
- p.ProbePropertiesFormat = &probePropertiesFormat
- }
- case "name":
- if v != nil {
- var name string
- err = json.Unmarshal(*v, &name)
- if err != nil {
- return err
- }
- p.Name = &name
- }
- case "etag":
- if v != nil {
- var etag string
- err = json.Unmarshal(*v, &etag)
- if err != nil {
- return err
- }
- p.Etag = &etag
- }
- case "id":
- if v != nil {
- var ID string
- err = json.Unmarshal(*v, &ID)
- if err != nil {
- return err
- }
- p.ID = &ID
- }
- }
- }
-
- return nil
-}
-
-// ProbePropertiesFormat load balancer probe resource.
-type ProbePropertiesFormat struct {
- // LoadBalancingRules - READ-ONLY; The load balancer rules that use this probe.
- LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"`
- // Protocol - The protocol of the end point. Possible values are: 'Http', 'Tcp', or 'Https'. If 'Tcp' is specified, a received ACK is required for the probe to be successful. If 'Http' or 'Https' is specified, a 200 OK response from the specifies URI is required for the probe to be successful. Possible values include: 'ProbeProtocolHTTP', 'ProbeProtocolTCP', 'ProbeProtocolHTTPS'
- Protocol ProbeProtocol `json:"protocol,omitempty"`
- // Port - The port for communicating the probe. Possible values range from 1 to 65535, inclusive.
- Port *int32 `json:"port,omitempty"`
- // IntervalInSeconds - The interval, in seconds, for how frequently to probe the endpoint for health status. Typically, the interval is slightly less than half the allocated timeout period (in seconds) which allows two full probes before taking the instance out of rotation. The default value is 15, the minimum value is 5.
- IntervalInSeconds *int32 `json:"intervalInSeconds,omitempty"`
- // NumberOfProbes - The number of probes where if no response, will result in stopping further traffic from being delivered to the endpoint. This values allows endpoints to be taken out of rotation faster or slower than the typical times used in Azure.
- NumberOfProbes *int32 `json:"numberOfProbes,omitempty"`
- // RequestPath - The URI used for requesting health status from the VM. Path is required if a protocol is set to http. Otherwise, it is not allowed. There is no default value.
- RequestPath *string `json:"requestPath,omitempty"`
- // ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
- ProvisioningState *string `json:"provisioningState,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for ProbePropertiesFormat.
-func (ppf ProbePropertiesFormat) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if ppf.Protocol != "" {
- objectMap["protocol"] = ppf.Protocol
- }
- if ppf.Port != nil {
- objectMap["port"] = ppf.Port
- }
- if ppf.IntervalInSeconds != nil {
- objectMap["intervalInSeconds"] = ppf.IntervalInSeconds
- }
- if ppf.NumberOfProbes != nil {
- objectMap["numberOfProbes"] = ppf.NumberOfProbes
- }
- if ppf.RequestPath != nil {
- objectMap["requestPath"] = ppf.RequestPath
- }
- if ppf.ProvisioningState != nil {
- objectMap["provisioningState"] = ppf.ProvisioningState
- }
- return json.Marshal(objectMap)
-}
-
-// Profile network profile resource.
-type Profile struct {
- autorest.Response `json:"-"`
- // ProfilePropertiesFormat - Network profile properties.
- *ProfilePropertiesFormat `json:"properties,omitempty"`
- // Etag - A unique read-only string that changes whenever the resource is updated.
- Etag *string `json:"etag,omitempty"`
- // ID - 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 Profile.
-func (p Profile) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if p.ProfilePropertiesFormat != nil {
- objectMap["properties"] = p.ProfilePropertiesFormat
- }
- if p.Etag != nil {
- objectMap["etag"] = p.Etag
- }
- if p.ID != nil {
- objectMap["id"] = p.ID
- }
- if p.Location != nil {
- objectMap["location"] = p.Location
- }
- if p.Tags != nil {
- objectMap["tags"] = p.Tags
- }
- return json.Marshal(objectMap)
-}
-
-// UnmarshalJSON is the custom unmarshaler for Profile struct.
-func (p *Profile) 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 profilePropertiesFormat ProfilePropertiesFormat
- err = json.Unmarshal(*v, &profilePropertiesFormat)
- if err != nil {
- return err
- }
- p.ProfilePropertiesFormat = &profilePropertiesFormat
- }
- case "etag":
- if v != nil {
- var etag string
- err = json.Unmarshal(*v, &etag)
- if err != nil {
- return err
- }
- p.Etag = &etag
- }
- case "id":
- if v != nil {
- var ID string
- err = json.Unmarshal(*v, &ID)
- if err != nil {
- return err
- }
- p.ID = &ID
- }
- case "name":
- if v != nil {
- var name string
- err = json.Unmarshal(*v, &name)
- if err != nil {
- return err
- }
- p.Name = &name
- }
- case "type":
- if v != nil {
- var typeVar string
- err = json.Unmarshal(*v, &typeVar)
- if err != nil {
- return err
- }
- p.Type = &typeVar
- }
- case "location":
- if v != nil {
- var location string
- err = json.Unmarshal(*v, &location)
- if err != nil {
- return err
- }
- p.Location = &location
- }
- case "tags":
- if v != nil {
- var tags map[string]*string
- err = json.Unmarshal(*v, &tags)
- if err != nil {
- return err
- }
- p.Tags = tags
- }
- }
- }
-
- return nil
-}
-
-// ProfileListResult response for ListNetworkProfiles API service call.
-type ProfileListResult struct {
- autorest.Response `json:"-"`
- // Value - A list of network profiles that exist in a resource group.
- Value *[]Profile `json:"value,omitempty"`
- // NextLink - The URL to get the next set of results.
- NextLink *string `json:"nextLink,omitempty"`
-}
-
-// ProfileListResultIterator provides access to a complete listing of Profile values.
-type ProfileListResultIterator struct {
- i int
- page ProfileListResultPage
-}
-
-// 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 *ProfileListResultIterator) NextWithContext(ctx context.Context) (err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/ProfileListResultIterator.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 *ProfileListResultIterator) Next() error {
- return iter.NextWithContext(context.Background())
-}
-
-// NotDone returns true if the enumeration should be started or is not yet complete.
-func (iter ProfileListResultIterator) 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 ProfileListResultIterator) Response() ProfileListResult {
- 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 ProfileListResultIterator) Value() Profile {
- if !iter.page.NotDone() {
- return Profile{}
- }
- return iter.page.Values()[iter.i]
-}
-
-// Creates a new instance of the ProfileListResultIterator type.
-func NewProfileListResultIterator(page ProfileListResultPage) ProfileListResultIterator {
- return ProfileListResultIterator{page: page}
-}
-
-// IsEmpty returns true if the ListResult contains no values.
-func (plr ProfileListResult) IsEmpty() bool {
- return plr.Value == nil || len(*plr.Value) == 0
-}
-
-// hasNextLink returns true if the NextLink is not empty.
-func (plr ProfileListResult) hasNextLink() bool {
- return plr.NextLink != nil && len(*plr.NextLink) != 0
-}
-
-// profileListResultPreparer prepares a request to retrieve the next set of results.
-// It returns nil if no more results exist.
-func (plr ProfileListResult) profileListResultPreparer(ctx context.Context) (*http.Request, error) {
- if !plr.hasNextLink() {
- return nil, nil
- }
- return autorest.Prepare((&http.Request{}).WithContext(ctx),
- autorest.AsJSON(),
- autorest.AsGet(),
- autorest.WithBaseURL(to.String(plr.NextLink)))
-}
-
-// ProfileListResultPage contains a page of Profile values.
-type ProfileListResultPage struct {
- fn func(context.Context, ProfileListResult) (ProfileListResult, error)
- plr ProfileListResult
-}
-
-// 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 *ProfileListResultPage) NextWithContext(ctx context.Context) (err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/ProfileListResultPage.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.plr)
- if err != nil {
- return err
- }
- page.plr = 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 *ProfileListResultPage) Next() error {
- return page.NextWithContext(context.Background())
-}
-
-// NotDone returns true if the page enumeration should be started or is not yet complete.
-func (page ProfileListResultPage) NotDone() bool {
- return !page.plr.IsEmpty()
-}
-
-// Response returns the raw server response from the last page request.
-func (page ProfileListResultPage) Response() ProfileListResult {
- return page.plr
-}
-
-// Values returns the slice of values for the current page or nil if there are no values.
-func (page ProfileListResultPage) Values() []Profile {
- if page.plr.IsEmpty() {
- return nil
- }
- return *page.plr.Value
-}
-
-// Creates a new instance of the ProfileListResultPage type.
-func NewProfileListResultPage(getNextPage func(context.Context, ProfileListResult) (ProfileListResult, error)) ProfileListResultPage {
- return ProfileListResultPage{fn: getNextPage}
-}
-
-// ProfilePropertiesFormat network profile properties.
-type ProfilePropertiesFormat struct {
- // ContainerNetworkInterfaces - List of child container network interfaces.
- ContainerNetworkInterfaces *[]ContainerNetworkInterface `json:"containerNetworkInterfaces,omitempty"`
- // ContainerNetworkInterfaceConfigurations - List of chid container network interface configurations.
- ContainerNetworkInterfaceConfigurations *[]ContainerNetworkInterfaceConfiguration `json:"containerNetworkInterfaceConfigurations,omitempty"`
- // ResourceGUID - READ-ONLY; The resource GUID property of the network interface resource.
- ResourceGUID *string `json:"resourceGuid,omitempty"`
- // ProvisioningState - READ-ONLY; The provisioning state of the resource.
- ProvisioningState *string `json:"provisioningState,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for ProfilePropertiesFormat.
-func (ppf ProfilePropertiesFormat) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if ppf.ContainerNetworkInterfaces != nil {
- objectMap["containerNetworkInterfaces"] = ppf.ContainerNetworkInterfaces
- }
- if ppf.ContainerNetworkInterfaceConfigurations != nil {
- objectMap["containerNetworkInterfaceConfigurations"] = ppf.ContainerNetworkInterfaceConfigurations
- }
- return json.Marshal(objectMap)
-}
-
-// ProfilesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
-type ProfilesDeleteFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *ProfilesDeleteFuture) Result(client ProfilesClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ProfilesDeleteFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.ProfilesDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
-}
-
-// ProtocolConfiguration configuration of the protocol.
-type ProtocolConfiguration struct {
- HTTPConfiguration *HTTPConfiguration `json:"HTTPConfiguration,omitempty"`
-}
-
-// ProtocolCustomSettingsFormat dDoS custom policy properties.
-type ProtocolCustomSettingsFormat struct {
- // Protocol - The protocol for which the DDoS protection policy is being customized. Possible values include: 'DdosCustomPolicyProtocolTCP', 'DdosCustomPolicyProtocolUDP', 'DdosCustomPolicyProtocolSyn'
- Protocol DdosCustomPolicyProtocol `json:"protocol,omitempty"`
- // TriggerRateOverride - The customized DDoS protection trigger rate.
- TriggerRateOverride *string `json:"triggerRateOverride,omitempty"`
- // SourceRateOverride - The customized DDoS protection source rate.
- SourceRateOverride *string `json:"sourceRateOverride,omitempty"`
- // TriggerSensitivityOverride - The customized DDoS protection trigger rate sensitivity degrees. High: Trigger rate set with most sensitivity w.r.t. normal traffic. Default: Trigger rate set with moderate sensitivity w.r.t. normal traffic. Low: Trigger rate set with less sensitivity w.r.t. normal traffic. Relaxed: Trigger rate set with least sensitivity w.r.t. normal traffic. Possible values include: 'Relaxed', 'Low', 'Default', 'High'
- TriggerSensitivityOverride DdosCustomPolicyTriggerSensitivityOverride `json:"triggerSensitivityOverride,omitempty"`
-}
-
-// PublicIPAddress public IP address resource.
-type PublicIPAddress struct {
- autorest.Response `json:"-"`
- // Sku - The public IP address SKU.
- Sku *PublicIPAddressSku `json:"sku,omitempty"`
- // PublicIPAddressPropertiesFormat - Public IP address properties.
- *PublicIPAddressPropertiesFormat `json:"properties,omitempty"`
- // Etag - A unique read-only string that changes whenever the resource is updated.
- Etag *string `json:"etag,omitempty"`
- // Zones - A list of availability zones denoting the IP allocated for the resource needs to come from.
- Zones *[]string `json:"zones,omitempty"`
- // ID - 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 PublicIPAddress.
-func (pia PublicIPAddress) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if pia.Sku != nil {
- objectMap["sku"] = pia.Sku
- }
- if pia.PublicIPAddressPropertiesFormat != nil {
- objectMap["properties"] = pia.PublicIPAddressPropertiesFormat
- }
- if pia.Etag != nil {
- objectMap["etag"] = pia.Etag
- }
- if pia.Zones != nil {
- objectMap["zones"] = pia.Zones
- }
- if pia.ID != nil {
- objectMap["id"] = pia.ID
- }
- if pia.Location != nil {
- objectMap["location"] = pia.Location
- }
- if pia.Tags != nil {
- objectMap["tags"] = pia.Tags
- }
- return json.Marshal(objectMap)
-}
-
-// UnmarshalJSON is the custom unmarshaler for PublicIPAddress struct.
-func (pia *PublicIPAddress) 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 PublicIPAddressSku
- err = json.Unmarshal(*v, &sku)
- if err != nil {
- return err
- }
- pia.Sku = &sku
- }
- case "properties":
- if v != nil {
- var publicIPAddressPropertiesFormat PublicIPAddressPropertiesFormat
- err = json.Unmarshal(*v, &publicIPAddressPropertiesFormat)
- if err != nil {
- return err
- }
- pia.PublicIPAddressPropertiesFormat = &publicIPAddressPropertiesFormat
- }
- case "etag":
- if v != nil {
- var etag string
- err = json.Unmarshal(*v, &etag)
- if err != nil {
- return err
- }
- pia.Etag = &etag
- }
- case "zones":
- if v != nil {
- var zones []string
- err = json.Unmarshal(*v, &zones)
- if err != nil {
- return err
- }
- pia.Zones = &zones
- }
- case "id":
- if v != nil {
- var ID string
- err = json.Unmarshal(*v, &ID)
- if err != nil {
- return err
- }
- pia.ID = &ID
- }
- case "name":
- if v != nil {
- var name string
- err = json.Unmarshal(*v, &name)
- if err != nil {
- return err
- }
- pia.Name = &name
- }
- case "type":
- if v != nil {
- var typeVar string
- err = json.Unmarshal(*v, &typeVar)
- if err != nil {
- return err
- }
- pia.Type = &typeVar
- }
- case "location":
- if v != nil {
- var location string
- err = json.Unmarshal(*v, &location)
- if err != nil {
- return err
- }
- pia.Location = &location
- }
- case "tags":
- if v != nil {
- var tags map[string]*string
- err = json.Unmarshal(*v, &tags)
- if err != nil {
- return err
- }
- pia.Tags = tags
- }
- }
- }
-
- return nil
-}
-
-// PublicIPAddressDNSSettings contains FQDN of the DNS record associated with the public IP address
-type PublicIPAddressDNSSettings struct {
- // DomainNameLabel - Gets or sets the Domain name label.The concatenation of the domain name label and the regionalized DNS zone make up the fully qualified domain name associated with the public IP address. If a domain name label is specified, an A DNS record is created for the public IP in the Microsoft Azure DNS system.
- DomainNameLabel *string `json:"domainNameLabel,omitempty"`
- // Fqdn - Gets the FQDN, Fully qualified domain name of the A DNS record associated with the public IP. This is the concatenation of the domainNameLabel and the regionalized DNS zone.
- Fqdn *string `json:"fqdn,omitempty"`
- // ReverseFqdn - Gets or Sets the Reverse FQDN. A user-visible, fully qualified domain name that resolves to this public IP address. If the reverseFqdn is specified, then a PTR DNS record is created pointing from the IP address in the in-addr.arpa domain to the reverse FQDN.
- ReverseFqdn *string `json:"reverseFqdn,omitempty"`
-}
-
-// PublicIPAddressesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
-// long-running operation.
-type PublicIPAddressesCreateOrUpdateFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *PublicIPAddressesCreateOrUpdateFuture) Result(client PublicIPAddressesClient) (pia PublicIPAddress, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPAddressesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.PublicIPAddressesCreateOrUpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if pia.Response.Response, err = future.GetResult(sender); err == nil && pia.Response.Response.StatusCode != http.StatusNoContent {
- pia, err = client.CreateOrUpdateResponder(pia.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPAddressesCreateOrUpdateFuture", "Result", pia.Response.Response, "Failure responding to request")
- }
- }
- return
-}
-
-// PublicIPAddressesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
-type PublicIPAddressesDeleteFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *PublicIPAddressesDeleteFuture) Result(client PublicIPAddressesClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPAddressesDeleteFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.PublicIPAddressesDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
-}
-
-// PublicIPAddressesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
-type PublicIPAddressesUpdateTagsFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *PublicIPAddressesUpdateTagsFuture) Result(client PublicIPAddressesClient) (pia PublicIPAddress, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPAddressesUpdateTagsFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.PublicIPAddressesUpdateTagsFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if pia.Response.Response, err = future.GetResult(sender); err == nil && pia.Response.Response.StatusCode != http.StatusNoContent {
- pia, err = client.UpdateTagsResponder(pia.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPAddressesUpdateTagsFuture", "Result", pia.Response.Response, "Failure responding to request")
- }
- }
- return
-}
-
-// PublicIPAddressListResult response for ListPublicIpAddresses API service call.
-type PublicIPAddressListResult struct {
- autorest.Response `json:"-"`
- // Value - A list of public IP addresses that exists in a resource group.
- Value *[]PublicIPAddress `json:"value,omitempty"`
- // NextLink - The URL to get the next set of results.
- NextLink *string `json:"nextLink,omitempty"`
-}
-
-// PublicIPAddressListResultIterator provides access to a complete listing of PublicIPAddress values.
-type PublicIPAddressListResultIterator struct {
- i int
- page PublicIPAddressListResultPage
-}
-
-// 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 *PublicIPAddressListResultIterator) NextWithContext(ctx context.Context) (err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPAddressListResultIterator.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 *PublicIPAddressListResultIterator) Next() error {
- return iter.NextWithContext(context.Background())
-}
-
-// NotDone returns true if the enumeration should be started or is not yet complete.
-func (iter PublicIPAddressListResultIterator) 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 PublicIPAddressListResultIterator) Response() PublicIPAddressListResult {
- 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 PublicIPAddressListResultIterator) Value() PublicIPAddress {
- if !iter.page.NotDone() {
- return PublicIPAddress{}
- }
- return iter.page.Values()[iter.i]
-}
-
-// Creates a new instance of the PublicIPAddressListResultIterator type.
-func NewPublicIPAddressListResultIterator(page PublicIPAddressListResultPage) PublicIPAddressListResultIterator {
- return PublicIPAddressListResultIterator{page: page}
-}
-
-// IsEmpty returns true if the ListResult contains no values.
-func (pialr PublicIPAddressListResult) IsEmpty() bool {
- return pialr.Value == nil || len(*pialr.Value) == 0
-}
-
-// hasNextLink returns true if the NextLink is not empty.
-func (pialr PublicIPAddressListResult) hasNextLink() bool {
- return pialr.NextLink != nil && len(*pialr.NextLink) != 0
-}
-
-// publicIPAddressListResultPreparer prepares a request to retrieve the next set of results.
-// It returns nil if no more results exist.
-func (pialr PublicIPAddressListResult) publicIPAddressListResultPreparer(ctx context.Context) (*http.Request, error) {
- if !pialr.hasNextLink() {
- return nil, nil
- }
- return autorest.Prepare((&http.Request{}).WithContext(ctx),
- autorest.AsJSON(),
- autorest.AsGet(),
- autorest.WithBaseURL(to.String(pialr.NextLink)))
-}
-
-// PublicIPAddressListResultPage contains a page of PublicIPAddress values.
-type PublicIPAddressListResultPage struct {
- fn func(context.Context, PublicIPAddressListResult) (PublicIPAddressListResult, error)
- pialr PublicIPAddressListResult
-}
-
-// 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 *PublicIPAddressListResultPage) NextWithContext(ctx context.Context) (err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPAddressListResultPage.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.pialr)
- if err != nil {
- return err
- }
- page.pialr = 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 *PublicIPAddressListResultPage) Next() error {
- return page.NextWithContext(context.Background())
-}
-
-// NotDone returns true if the page enumeration should be started or is not yet complete.
-func (page PublicIPAddressListResultPage) NotDone() bool {
- return !page.pialr.IsEmpty()
-}
-
-// Response returns the raw server response from the last page request.
-func (page PublicIPAddressListResultPage) Response() PublicIPAddressListResult {
- return page.pialr
-}
-
-// Values returns the slice of values for the current page or nil if there are no values.
-func (page PublicIPAddressListResultPage) Values() []PublicIPAddress {
- if page.pialr.IsEmpty() {
- return nil
- }
- return *page.pialr.Value
-}
-
-// Creates a new instance of the PublicIPAddressListResultPage type.
-func NewPublicIPAddressListResultPage(getNextPage func(context.Context, PublicIPAddressListResult) (PublicIPAddressListResult, error)) PublicIPAddressListResultPage {
- return PublicIPAddressListResultPage{fn: getNextPage}
-}
-
-// PublicIPAddressPropertiesFormat public IP address properties.
-type PublicIPAddressPropertiesFormat struct {
- // PublicIPAllocationMethod - The public IP allocation method. Possible values are: 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic'
- PublicIPAllocationMethod IPAllocationMethod `json:"publicIPAllocationMethod,omitempty"`
- // PublicIPAddressVersion - The public IP address version. Possible values are: 'IPv4' and 'IPv6'. Possible values include: 'IPv4', 'IPv6'
- PublicIPAddressVersion IPVersion `json:"publicIPAddressVersion,omitempty"`
- // IPConfiguration - READ-ONLY; The IP configuration associated with the public IP address.
- IPConfiguration *IPConfiguration `json:"ipConfiguration,omitempty"`
- // DNSSettings - The FQDN of the DNS record associated with the public IP address.
- DNSSettings *PublicIPAddressDNSSettings `json:"dnsSettings,omitempty"`
- // DdosSettings - The DDoS protection custom policy associated with the public IP address.
- DdosSettings *DdosSettings `json:"ddosSettings,omitempty"`
- // IPTags - The list of tags associated with the public IP address.
- IPTags *[]IPTag `json:"ipTags,omitempty"`
- // IPAddress - The IP address associated with the public IP address resource.
- IPAddress *string `json:"ipAddress,omitempty"`
- // PublicIPPrefix - The Public IP Prefix this Public IP Address should be allocated from.
- PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"`
- // IdleTimeoutInMinutes - The idle timeout of the public IP address.
- IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
- // ResourceGUID - The resource GUID property of the public IP resource.
- ResourceGUID *string `json:"resourceGuid,omitempty"`
- // ProvisioningState - The provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
- ProvisioningState *string `json:"provisioningState,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for PublicIPAddressPropertiesFormat.
-func (piapf PublicIPAddressPropertiesFormat) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if piapf.PublicIPAllocationMethod != "" {
- objectMap["publicIPAllocationMethod"] = piapf.PublicIPAllocationMethod
- }
- if piapf.PublicIPAddressVersion != "" {
- objectMap["publicIPAddressVersion"] = piapf.PublicIPAddressVersion
- }
- if piapf.DNSSettings != nil {
- objectMap["dnsSettings"] = piapf.DNSSettings
- }
- if piapf.DdosSettings != nil {
- objectMap["ddosSettings"] = piapf.DdosSettings
- }
- if piapf.IPTags != nil {
- objectMap["ipTags"] = piapf.IPTags
- }
- if piapf.IPAddress != nil {
- objectMap["ipAddress"] = piapf.IPAddress
- }
- if piapf.PublicIPPrefix != nil {
- objectMap["publicIPPrefix"] = piapf.PublicIPPrefix
- }
- if piapf.IdleTimeoutInMinutes != nil {
- objectMap["idleTimeoutInMinutes"] = piapf.IdleTimeoutInMinutes
- }
- if piapf.ResourceGUID != nil {
- objectMap["resourceGuid"] = piapf.ResourceGUID
- }
- if piapf.ProvisioningState != nil {
- objectMap["provisioningState"] = piapf.ProvisioningState
- }
- return json.Marshal(objectMap)
-}
-
-// PublicIPAddressSku SKU of a public IP address
-type PublicIPAddressSku struct {
- // Name - Name of a public IP address SKU. Possible values include: 'PublicIPAddressSkuNameBasic', 'PublicIPAddressSkuNameStandard'
- Name PublicIPAddressSkuName `json:"name,omitempty"`
-}
-
-// PublicIPPrefix public IP prefix resource.
-type PublicIPPrefix struct {
- autorest.Response `json:"-"`
- // Sku - The public IP prefix SKU.
- Sku *PublicIPPrefixSku `json:"sku,omitempty"`
- // PublicIPPrefixPropertiesFormat - Public IP prefix properties.
- *PublicIPPrefixPropertiesFormat `json:"properties,omitempty"`
- // Etag - A unique read-only string that changes whenever the resource is updated.
- Etag *string `json:"etag,omitempty"`
- // Zones - A list of availability zones denoting the IP allocated for the resource needs to come from.
- Zones *[]string `json:"zones,omitempty"`
- // ID - 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 PublicIPPrefix.
-func (pip PublicIPPrefix) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if pip.Sku != nil {
- objectMap["sku"] = pip.Sku
- }
- if pip.PublicIPPrefixPropertiesFormat != nil {
- objectMap["properties"] = pip.PublicIPPrefixPropertiesFormat
- }
- if pip.Etag != nil {
- objectMap["etag"] = pip.Etag
- }
- if pip.Zones != nil {
- objectMap["zones"] = pip.Zones
- }
- if pip.ID != nil {
- objectMap["id"] = pip.ID
- }
- if pip.Location != nil {
- objectMap["location"] = pip.Location
- }
- if pip.Tags != nil {
- objectMap["tags"] = pip.Tags
- }
- return json.Marshal(objectMap)
-}
-
-// UnmarshalJSON is the custom unmarshaler for PublicIPPrefix struct.
-func (pip *PublicIPPrefix) 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 PublicIPPrefixSku
- err = json.Unmarshal(*v, &sku)
- if err != nil {
- return err
- }
- pip.Sku = &sku
- }
- case "properties":
- if v != nil {
- var publicIPPrefixPropertiesFormat PublicIPPrefixPropertiesFormat
- err = json.Unmarshal(*v, &publicIPPrefixPropertiesFormat)
- if err != nil {
- return err
- }
- pip.PublicIPPrefixPropertiesFormat = &publicIPPrefixPropertiesFormat
- }
- case "etag":
- if v != nil {
- var etag string
- err = json.Unmarshal(*v, &etag)
- if err != nil {
- return err
- }
- pip.Etag = &etag
- }
- case "zones":
- if v != nil {
- var zones []string
- err = json.Unmarshal(*v, &zones)
- if err != nil {
- return err
- }
- pip.Zones = &zones
- }
- case "id":
- if v != nil {
- var ID string
- err = json.Unmarshal(*v, &ID)
- if err != nil {
- return err
- }
- pip.ID = &ID
- }
- case "name":
- if v != nil {
- var name string
- err = json.Unmarshal(*v, &name)
- if err != nil {
- return err
- }
- pip.Name = &name
- }
- case "type":
- if v != nil {
- var typeVar string
- err = json.Unmarshal(*v, &typeVar)
- if err != nil {
- return err
- }
- pip.Type = &typeVar
- }
- case "location":
- if v != nil {
- var location string
- err = json.Unmarshal(*v, &location)
- if err != nil {
- return err
- }
- pip.Location = &location
- }
- case "tags":
- if v != nil {
- var tags map[string]*string
- err = json.Unmarshal(*v, &tags)
- if err != nil {
- return err
- }
- pip.Tags = tags
- }
- }
- }
-
- return nil
-}
-
-// PublicIPPrefixesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
-// long-running operation.
-type PublicIPPrefixesCreateOrUpdateFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *PublicIPPrefixesCreateOrUpdateFuture) Result(client PublicIPPrefixesClient) (pip PublicIPPrefix, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.PublicIPPrefixesCreateOrUpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if pip.Response.Response, err = future.GetResult(sender); err == nil && pip.Response.Response.StatusCode != http.StatusNoContent {
- pip, err = client.CreateOrUpdateResponder(pip.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesCreateOrUpdateFuture", "Result", pip.Response.Response, "Failure responding to request")
- }
- }
- return
-}
-
-// PublicIPPrefixesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
-type PublicIPPrefixesDeleteFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *PublicIPPrefixesDeleteFuture) Result(client PublicIPPrefixesClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesDeleteFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.PublicIPPrefixesDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
-}
-
-// PublicIPPrefixesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
-type PublicIPPrefixesUpdateTagsFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *PublicIPPrefixesUpdateTagsFuture) Result(client PublicIPPrefixesClient) (pip PublicIPPrefix, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesUpdateTagsFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.PublicIPPrefixesUpdateTagsFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if pip.Response.Response, err = future.GetResult(sender); err == nil && pip.Response.Response.StatusCode != http.StatusNoContent {
- pip, err = client.UpdateTagsResponder(pip.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesUpdateTagsFuture", "Result", pip.Response.Response, "Failure responding to request")
- }
- }
- return
-}
-
-// PublicIPPrefixListResult response for ListPublicIpPrefixes API service call.
-type PublicIPPrefixListResult struct {
- autorest.Response `json:"-"`
- // Value - A list of public IP prefixes that exists in a resource group.
- Value *[]PublicIPPrefix `json:"value,omitempty"`
- // NextLink - The URL to get the next set of results.
- NextLink *string `json:"nextLink,omitempty"`
-}
-
-// PublicIPPrefixListResultIterator provides access to a complete listing of PublicIPPrefix values.
-type PublicIPPrefixListResultIterator struct {
- i int
- page PublicIPPrefixListResultPage
-}
-
-// 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 *PublicIPPrefixListResultIterator) NextWithContext(ctx context.Context) (err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPPrefixListResultIterator.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 *PublicIPPrefixListResultIterator) Next() error {
- return iter.NextWithContext(context.Background())
-}
-
-// NotDone returns true if the enumeration should be started or is not yet complete.
-func (iter PublicIPPrefixListResultIterator) 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 PublicIPPrefixListResultIterator) Response() PublicIPPrefixListResult {
- 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 PublicIPPrefixListResultIterator) Value() PublicIPPrefix {
- if !iter.page.NotDone() {
- return PublicIPPrefix{}
- }
- return iter.page.Values()[iter.i]
-}
-
-// Creates a new instance of the PublicIPPrefixListResultIterator type.
-func NewPublicIPPrefixListResultIterator(page PublicIPPrefixListResultPage) PublicIPPrefixListResultIterator {
- return PublicIPPrefixListResultIterator{page: page}
-}
-
-// IsEmpty returns true if the ListResult contains no values.
-func (piplr PublicIPPrefixListResult) IsEmpty() bool {
- return piplr.Value == nil || len(*piplr.Value) == 0
-}
-
-// hasNextLink returns true if the NextLink is not empty.
-func (piplr PublicIPPrefixListResult) hasNextLink() bool {
- return piplr.NextLink != nil && len(*piplr.NextLink) != 0
-}
-
-// publicIPPrefixListResultPreparer prepares a request to retrieve the next set of results.
-// It returns nil if no more results exist.
-func (piplr PublicIPPrefixListResult) publicIPPrefixListResultPreparer(ctx context.Context) (*http.Request, error) {
- if !piplr.hasNextLink() {
- return nil, nil
- }
- return autorest.Prepare((&http.Request{}).WithContext(ctx),
- autorest.AsJSON(),
- autorest.AsGet(),
- autorest.WithBaseURL(to.String(piplr.NextLink)))
-}
-
-// PublicIPPrefixListResultPage contains a page of PublicIPPrefix values.
-type PublicIPPrefixListResultPage struct {
- fn func(context.Context, PublicIPPrefixListResult) (PublicIPPrefixListResult, error)
- piplr PublicIPPrefixListResult
-}
-
-// 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 *PublicIPPrefixListResultPage) NextWithContext(ctx context.Context) (err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPPrefixListResultPage.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.piplr)
- if err != nil {
- return err
- }
- page.piplr = 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 *PublicIPPrefixListResultPage) Next() error {
- return page.NextWithContext(context.Background())
-}
-
-// NotDone returns true if the page enumeration should be started or is not yet complete.
-func (page PublicIPPrefixListResultPage) NotDone() bool {
- return !page.piplr.IsEmpty()
-}
-
-// Response returns the raw server response from the last page request.
-func (page PublicIPPrefixListResultPage) Response() PublicIPPrefixListResult {
- return page.piplr
-}
-
-// Values returns the slice of values for the current page or nil if there are no values.
-func (page PublicIPPrefixListResultPage) Values() []PublicIPPrefix {
- if page.piplr.IsEmpty() {
- return nil
- }
- return *page.piplr.Value
-}
-
-// Creates a new instance of the PublicIPPrefixListResultPage type.
-func NewPublicIPPrefixListResultPage(getNextPage func(context.Context, PublicIPPrefixListResult) (PublicIPPrefixListResult, error)) PublicIPPrefixListResultPage {
- return PublicIPPrefixListResultPage{fn: getNextPage}
-}
-
-// PublicIPPrefixPropertiesFormat public IP prefix properties.
-type PublicIPPrefixPropertiesFormat struct {
- // PublicIPAddressVersion - The public IP address version. Possible values are: 'IPv4' and 'IPv6'. Possible values include: 'IPv4', 'IPv6'
- PublicIPAddressVersion IPVersion `json:"publicIPAddressVersion,omitempty"`
- // IPTags - The list of tags associated with the public IP prefix.
- IPTags *[]IPTag `json:"ipTags,omitempty"`
- // PrefixLength - The Length of the Public IP Prefix.
- PrefixLength *int32 `json:"prefixLength,omitempty"`
- // IPPrefix - The allocated Prefix
- IPPrefix *string `json:"ipPrefix,omitempty"`
- // PublicIPAddresses - The list of all referenced PublicIPAddresses
- PublicIPAddresses *[]ReferencedPublicIPAddress `json:"publicIPAddresses,omitempty"`
- // LoadBalancerFrontendIPConfiguration - READ-ONLY; The reference to load balancer frontend IP configuration associated with the public IP prefix.
- LoadBalancerFrontendIPConfiguration *SubResource `json:"loadBalancerFrontendIpConfiguration,omitempty"`
- // ResourceGUID - The resource GUID property of the public IP prefix resource.
- ResourceGUID *string `json:"resourceGuid,omitempty"`
- // ProvisioningState - The provisioning state of the Public IP prefix resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
- ProvisioningState *string `json:"provisioningState,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for PublicIPPrefixPropertiesFormat.
-func (pippf PublicIPPrefixPropertiesFormat) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if pippf.PublicIPAddressVersion != "" {
- objectMap["publicIPAddressVersion"] = pippf.PublicIPAddressVersion
- }
- if pippf.IPTags != nil {
- objectMap["ipTags"] = pippf.IPTags
- }
- if pippf.PrefixLength != nil {
- objectMap["prefixLength"] = pippf.PrefixLength
- }
- if pippf.IPPrefix != nil {
- objectMap["ipPrefix"] = pippf.IPPrefix
- }
- if pippf.PublicIPAddresses != nil {
- objectMap["publicIPAddresses"] = pippf.PublicIPAddresses
- }
- if pippf.ResourceGUID != nil {
- objectMap["resourceGuid"] = pippf.ResourceGUID
- }
- if pippf.ProvisioningState != nil {
- objectMap["provisioningState"] = pippf.ProvisioningState
- }
- return json.Marshal(objectMap)
-}
-
-// PublicIPPrefixSku SKU of a public IP prefix
-type PublicIPPrefixSku struct {
- // Name - Name of a public IP prefix SKU. Possible values include: 'Standard'
- Name PublicIPPrefixSkuName `json:"name,omitempty"`
-}
-
-// QueryTroubleshootingParameters parameters that define the resource to query the troubleshooting result.
-type QueryTroubleshootingParameters struct {
- // TargetResourceID - The target resource ID to query the troubleshooting result.
- TargetResourceID *string `json:"targetResourceId,omitempty"`
-}
-
-// ReferencedPublicIPAddress ...
-type ReferencedPublicIPAddress struct {
- // ID - The PublicIPAddress Reference
- ID *string `json:"id,omitempty"`
-}
-
-// Resource common resource representation.
-type Resource struct {
- // ID - 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.ID != nil {
- objectMap["id"] = r.ID
- }
- if r.Location != nil {
- objectMap["location"] = r.Location
- }
- if r.Tags != nil {
- objectMap["tags"] = r.Tags
- }
- return json.Marshal(objectMap)
-}
-
-// ResourceNavigationLink resourceNavigationLink resource.
-type ResourceNavigationLink struct {
- // ResourceNavigationLinkFormat - Resource navigation link properties format.
- *ResourceNavigationLinkFormat `json:"properties,omitempty"`
- // Name - 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"`
- // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
- Etag *string `json:"etag,omitempty"`
- // ID - Resource ID.
- ID *string `json:"id,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for ResourceNavigationLink.
-func (rnl ResourceNavigationLink) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if rnl.ResourceNavigationLinkFormat != nil {
- objectMap["properties"] = rnl.ResourceNavigationLinkFormat
- }
- if rnl.Name != nil {
- objectMap["name"] = rnl.Name
- }
- if rnl.ID != nil {
- objectMap["id"] = rnl.ID
- }
- return json.Marshal(objectMap)
-}
-
-// UnmarshalJSON is the custom unmarshaler for ResourceNavigationLink struct.
-func (rnl *ResourceNavigationLink) 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 resourceNavigationLinkFormat ResourceNavigationLinkFormat
- err = json.Unmarshal(*v, &resourceNavigationLinkFormat)
- if err != nil {
- return err
- }
- rnl.ResourceNavigationLinkFormat = &resourceNavigationLinkFormat
- }
- case "name":
- if v != nil {
- var name string
- err = json.Unmarshal(*v, &name)
- if err != nil {
- return err
- }
- rnl.Name = &name
- }
- case "etag":
- if v != nil {
- var etag string
- err = json.Unmarshal(*v, &etag)
- if err != nil {
- return err
- }
- rnl.Etag = &etag
- }
- case "id":
- if v != nil {
- var ID string
- err = json.Unmarshal(*v, &ID)
- if err != nil {
- return err
- }
- rnl.ID = &ID
- }
- }
- }
-
- return nil
-}
-
-// ResourceNavigationLinkFormat properties of ResourceNavigationLink.
-type ResourceNavigationLinkFormat struct {
- // LinkedResourceType - Resource type of the linked resource.
- LinkedResourceType *string `json:"linkedResourceType,omitempty"`
- // Link - Link to the external resource
- Link *string `json:"link,omitempty"`
- // ProvisioningState - READ-ONLY; Provisioning state of the ResourceNavigationLink resource.
- ProvisioningState *string `json:"provisioningState,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for ResourceNavigationLinkFormat.
-func (rnlf ResourceNavigationLinkFormat) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if rnlf.LinkedResourceType != nil {
- objectMap["linkedResourceType"] = rnlf.LinkedResourceType
- }
- if rnlf.Link != nil {
- objectMap["link"] = rnlf.Link
- }
- return json.Marshal(objectMap)
-}
-
-// RetentionPolicyParameters parameters that define the retention policy for flow log.
-type RetentionPolicyParameters struct {
- // Days - Number of days to retain flow log records.
- Days *int32 `json:"days,omitempty"`
- // Enabled - Flag to enable/disable retention.
- Enabled *bool `json:"enabled,omitempty"`
-}
-
-// Route route resource
-type Route struct {
- autorest.Response `json:"-"`
- // RoutePropertiesFormat - Properties of the route.
- *RoutePropertiesFormat `json:"properties,omitempty"`
- // Name - 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"`
- // Etag - A unique read-only string that changes whenever the resource is updated.
- Etag *string `json:"etag,omitempty"`
- // ID - Resource ID.
- ID *string `json:"id,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for Route.
-func (r Route) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if r.RoutePropertiesFormat != nil {
- objectMap["properties"] = r.RoutePropertiesFormat
- }
- if r.Name != nil {
- objectMap["name"] = r.Name
- }
- if r.Etag != nil {
- objectMap["etag"] = r.Etag
- }
- if r.ID != nil {
- objectMap["id"] = r.ID
- }
- return json.Marshal(objectMap)
-}
-
-// UnmarshalJSON is the custom unmarshaler for Route struct.
-func (r *Route) 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 routePropertiesFormat RoutePropertiesFormat
- err = json.Unmarshal(*v, &routePropertiesFormat)
- if err != nil {
- return err
- }
- r.RoutePropertiesFormat = &routePropertiesFormat
- }
- case "name":
- if v != nil {
- var name string
- err = json.Unmarshal(*v, &name)
- if err != nil {
- return err
- }
- r.Name = &name
- }
- case "etag":
- if v != nil {
- var etag string
- err = json.Unmarshal(*v, &etag)
- if err != nil {
- return err
- }
- r.Etag = &etag
- }
- case "id":
- if v != nil {
- var ID string
- err = json.Unmarshal(*v, &ID)
- if err != nil {
- return err
- }
- r.ID = &ID
- }
- }
- }
-
- return nil
-}
-
-// RouteFilter route Filter Resource.
-type RouteFilter struct {
- autorest.Response `json:"-"`
- *RouteFilterPropertiesFormat `json:"properties,omitempty"`
- // Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
- Etag *string `json:"etag,omitempty"`
- // ID - 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 RouteFilter.
-func (rf RouteFilter) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if rf.RouteFilterPropertiesFormat != nil {
- objectMap["properties"] = rf.RouteFilterPropertiesFormat
- }
- if rf.ID != nil {
- objectMap["id"] = rf.ID
- }
- if rf.Location != nil {
- objectMap["location"] = rf.Location
- }
- if rf.Tags != nil {
- objectMap["tags"] = rf.Tags
- }
- return json.Marshal(objectMap)
-}
-
-// UnmarshalJSON is the custom unmarshaler for RouteFilter struct.
-func (rf *RouteFilter) 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 routeFilterPropertiesFormat RouteFilterPropertiesFormat
- err = json.Unmarshal(*v, &routeFilterPropertiesFormat)
- if err != nil {
- return err
- }
- rf.RouteFilterPropertiesFormat = &routeFilterPropertiesFormat
- }
- case "etag":
- if v != nil {
- var etag string
- err = json.Unmarshal(*v, &etag)
- if err != nil {
- return err
- }
- rf.Etag = &etag
- }
- case "id":
- if v != nil {
- var ID string
- err = json.Unmarshal(*v, &ID)
- if err != nil {
- return err
- }
- rf.ID = &ID
- }
- case "name":
- if v != nil {
- var name string
- err = json.Unmarshal(*v, &name)
- if err != nil {
- return err
- }
- rf.Name = &name
- }
- case "type":
- if v != nil {
- var typeVar string
- err = json.Unmarshal(*v, &typeVar)
- if err != nil {
- return err
- }
- rf.Type = &typeVar
- }
- case "location":
- if v != nil {
- var location string
- err = json.Unmarshal(*v, &location)
- if err != nil {
- return err
- }
- rf.Location = &location
- }
- case "tags":
- if v != nil {
- var tags map[string]*string
- err = json.Unmarshal(*v, &tags)
- if err != nil {
- return err
- }
- rf.Tags = tags
- }
- }
- }
-
- return nil
-}
-
-// RouteFilterListResult response for the ListRouteFilters API service call.
-type RouteFilterListResult struct {
- autorest.Response `json:"-"`
- // Value - Gets a list of route filters in a resource group.
- Value *[]RouteFilter `json:"value,omitempty"`
- // NextLink - The URL to get the next set of results.
- NextLink *string `json:"nextLink,omitempty"`
-}
-
-// RouteFilterListResultIterator provides access to a complete listing of RouteFilter values.
-type RouteFilterListResultIterator struct {
- i int
- page RouteFilterListResultPage
-}
-
-// 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 *RouteFilterListResultIterator) NextWithContext(ctx context.Context) (err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterListResultIterator.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 *RouteFilterListResultIterator) Next() error {
- return iter.NextWithContext(context.Background())
-}
-
-// NotDone returns true if the enumeration should be started or is not yet complete.
-func (iter RouteFilterListResultIterator) 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 RouteFilterListResultIterator) Response() RouteFilterListResult {
- 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 RouteFilterListResultIterator) Value() RouteFilter {
- if !iter.page.NotDone() {
- return RouteFilter{}
- }
- return iter.page.Values()[iter.i]
-}
-
-// Creates a new instance of the RouteFilterListResultIterator type.
-func NewRouteFilterListResultIterator(page RouteFilterListResultPage) RouteFilterListResultIterator {
- return RouteFilterListResultIterator{page: page}
-}
-
-// IsEmpty returns true if the ListResult contains no values.
-func (rflr RouteFilterListResult) IsEmpty() bool {
- return rflr.Value == nil || len(*rflr.Value) == 0
-}
-
-// hasNextLink returns true if the NextLink is not empty.
-func (rflr RouteFilterListResult) hasNextLink() bool {
- return rflr.NextLink != nil && len(*rflr.NextLink) != 0
-}
-
-// routeFilterListResultPreparer prepares a request to retrieve the next set of results.
-// It returns nil if no more results exist.
-func (rflr RouteFilterListResult) routeFilterListResultPreparer(ctx context.Context) (*http.Request, error) {
- if !rflr.hasNextLink() {
- return nil, nil
- }
- return autorest.Prepare((&http.Request{}).WithContext(ctx),
- autorest.AsJSON(),
- autorest.AsGet(),
- autorest.WithBaseURL(to.String(rflr.NextLink)))
-}
-
-// RouteFilterListResultPage contains a page of RouteFilter values.
-type RouteFilterListResultPage struct {
- fn func(context.Context, RouteFilterListResult) (RouteFilterListResult, error)
- rflr RouteFilterListResult
-}
-
-// 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 *RouteFilterListResultPage) NextWithContext(ctx context.Context) (err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterListResultPage.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.rflr)
- if err != nil {
- return err
- }
- page.rflr = 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 *RouteFilterListResultPage) Next() error {
- return page.NextWithContext(context.Background())
-}
-
-// NotDone returns true if the page enumeration should be started or is not yet complete.
-func (page RouteFilterListResultPage) NotDone() bool {
- return !page.rflr.IsEmpty()
-}
-
-// Response returns the raw server response from the last page request.
-func (page RouteFilterListResultPage) Response() RouteFilterListResult {
- return page.rflr
-}
-
-// Values returns the slice of values for the current page or nil if there are no values.
-func (page RouteFilterListResultPage) Values() []RouteFilter {
- if page.rflr.IsEmpty() {
- return nil
- }
- return *page.rflr.Value
-}
-
-// Creates a new instance of the RouteFilterListResultPage type.
-func NewRouteFilterListResultPage(getNextPage func(context.Context, RouteFilterListResult) (RouteFilterListResult, error)) RouteFilterListResultPage {
- return RouteFilterListResultPage{fn: getNextPage}
-}
-
-// RouteFilterPropertiesFormat route Filter Resource
-type RouteFilterPropertiesFormat struct {
- // Rules - Collection of RouteFilterRules contained within a route filter.
- Rules *[]RouteFilterRule `json:"rules,omitempty"`
- // Peerings - A collection of references to express route circuit peerings.
- Peerings *[]ExpressRouteCircuitPeering `json:"peerings,omitempty"`
- // ProvisioningState - READ-ONLY; The provisioning state of the resource. Possible values are: 'Updating', 'Deleting', 'Succeeded' and 'Failed'.
- ProvisioningState *string `json:"provisioningState,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for RouteFilterPropertiesFormat.
-func (rfpf RouteFilterPropertiesFormat) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if rfpf.Rules != nil {
- objectMap["rules"] = rfpf.Rules
- }
- if rfpf.Peerings != nil {
- objectMap["peerings"] = rfpf.Peerings
- }
- return json.Marshal(objectMap)
-}
-
-// RouteFilterRule route Filter Rule Resource
-type RouteFilterRule struct {
- autorest.Response `json:"-"`
- *RouteFilterRulePropertiesFormat `json:"properties,omitempty"`
- // Name - 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"`
- // Location - Resource location.
- Location *string `json:"location,omitempty"`
- // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
- Etag *string `json:"etag,omitempty"`
- // ID - Resource ID.
- ID *string `json:"id,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for RouteFilterRule.
-func (rfr RouteFilterRule) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if rfr.RouteFilterRulePropertiesFormat != nil {
- objectMap["properties"] = rfr.RouteFilterRulePropertiesFormat
- }
- if rfr.Name != nil {
- objectMap["name"] = rfr.Name
- }
- if rfr.Location != nil {
- objectMap["location"] = rfr.Location
- }
- if rfr.ID != nil {
- objectMap["id"] = rfr.ID
- }
- return json.Marshal(objectMap)
-}
-
-// UnmarshalJSON is the custom unmarshaler for RouteFilterRule struct.
-func (rfr *RouteFilterRule) 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 routeFilterRulePropertiesFormat RouteFilterRulePropertiesFormat
- err = json.Unmarshal(*v, &routeFilterRulePropertiesFormat)
- if err != nil {
- return err
- }
- rfr.RouteFilterRulePropertiesFormat = &routeFilterRulePropertiesFormat
- }
- case "name":
- if v != nil {
- var name string
- err = json.Unmarshal(*v, &name)
- if err != nil {
- return err
- }
- rfr.Name = &name
- }
- case "location":
- if v != nil {
- var location string
- err = json.Unmarshal(*v, &location)
- if err != nil {
- return err
- }
- rfr.Location = &location
- }
- case "etag":
- if v != nil {
- var etag string
- err = json.Unmarshal(*v, &etag)
- if err != nil {
- return err
- }
- rfr.Etag = &etag
- }
- case "id":
- if v != nil {
- var ID string
- err = json.Unmarshal(*v, &ID)
- if err != nil {
- return err
- }
- rfr.ID = &ID
- }
- }
- }
-
- return nil
-}
-
-// RouteFilterRuleListResult response for the ListRouteFilterRules API service call
-type RouteFilterRuleListResult struct {
- autorest.Response `json:"-"`
- // Value - Gets a list of RouteFilterRules in a resource group.
- Value *[]RouteFilterRule `json:"value,omitempty"`
- // NextLink - The URL to get the next set of results.
- NextLink *string `json:"nextLink,omitempty"`
-}
-
-// RouteFilterRuleListResultIterator provides access to a complete listing of RouteFilterRule values.
-type RouteFilterRuleListResultIterator struct {
- i int
- page RouteFilterRuleListResultPage
-}
-
-// 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 *RouteFilterRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterRuleListResultIterator.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 *RouteFilterRuleListResultIterator) Next() error {
- return iter.NextWithContext(context.Background())
-}
-
-// NotDone returns true if the enumeration should be started or is not yet complete.
-func (iter RouteFilterRuleListResultIterator) 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 RouteFilterRuleListResultIterator) Response() RouteFilterRuleListResult {
- 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 RouteFilterRuleListResultIterator) Value() RouteFilterRule {
- if !iter.page.NotDone() {
- return RouteFilterRule{}
- }
- return iter.page.Values()[iter.i]
-}
-
-// Creates a new instance of the RouteFilterRuleListResultIterator type.
-func NewRouteFilterRuleListResultIterator(page RouteFilterRuleListResultPage) RouteFilterRuleListResultIterator {
- return RouteFilterRuleListResultIterator{page: page}
-}
-
-// IsEmpty returns true if the ListResult contains no values.
-func (rfrlr RouteFilterRuleListResult) IsEmpty() bool {
- return rfrlr.Value == nil || len(*rfrlr.Value) == 0
-}
-
-// hasNextLink returns true if the NextLink is not empty.
-func (rfrlr RouteFilterRuleListResult) hasNextLink() bool {
- return rfrlr.NextLink != nil && len(*rfrlr.NextLink) != 0
-}
-
-// routeFilterRuleListResultPreparer prepares a request to retrieve the next set of results.
-// It returns nil if no more results exist.
-func (rfrlr RouteFilterRuleListResult) routeFilterRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
- if !rfrlr.hasNextLink() {
- return nil, nil
- }
- return autorest.Prepare((&http.Request{}).WithContext(ctx),
- autorest.AsJSON(),
- autorest.AsGet(),
- autorest.WithBaseURL(to.String(rfrlr.NextLink)))
-}
-
-// RouteFilterRuleListResultPage contains a page of RouteFilterRule values.
-type RouteFilterRuleListResultPage struct {
- fn func(context.Context, RouteFilterRuleListResult) (RouteFilterRuleListResult, error)
- rfrlr RouteFilterRuleListResult
-}
-
-// 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 *RouteFilterRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterRuleListResultPage.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.rfrlr)
- if err != nil {
- return err
- }
- page.rfrlr = 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 *RouteFilterRuleListResultPage) Next() error {
- return page.NextWithContext(context.Background())
-}
-
-// NotDone returns true if the page enumeration should be started or is not yet complete.
-func (page RouteFilterRuleListResultPage) NotDone() bool {
- return !page.rfrlr.IsEmpty()
-}
-
-// Response returns the raw server response from the last page request.
-func (page RouteFilterRuleListResultPage) Response() RouteFilterRuleListResult {
- return page.rfrlr
-}
-
-// Values returns the slice of values for the current page or nil if there are no values.
-func (page RouteFilterRuleListResultPage) Values() []RouteFilterRule {
- if page.rfrlr.IsEmpty() {
- return nil
- }
- return *page.rfrlr.Value
-}
-
-// Creates a new instance of the RouteFilterRuleListResultPage type.
-func NewRouteFilterRuleListResultPage(getNextPage func(context.Context, RouteFilterRuleListResult) (RouteFilterRuleListResult, error)) RouteFilterRuleListResultPage {
- return RouteFilterRuleListResultPage{fn: getNextPage}
-}
-
-// RouteFilterRulePropertiesFormat route Filter Rule Resource
-type RouteFilterRulePropertiesFormat struct {
- // Access - The access type of the rule. Valid values are: 'Allow', 'Deny'. Possible values include: 'Allow', 'Deny'
- Access Access `json:"access,omitempty"`
- // RouteFilterRuleType - The rule type of the rule. Valid value is: 'Community'
- RouteFilterRuleType *string `json:"routeFilterRuleType,omitempty"`
- // Communities - The collection for bgp community values to filter on. e.g. ['12076:5010','12076:5020']
- Communities *[]string `json:"communities,omitempty"`
- // ProvisioningState - READ-ONLY; The provisioning state of the resource. Possible values are: 'Updating', 'Deleting', 'Succeeded' and 'Failed'.
- ProvisioningState *string `json:"provisioningState,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for RouteFilterRulePropertiesFormat.
-func (rfrpf RouteFilterRulePropertiesFormat) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if rfrpf.Access != "" {
- objectMap["access"] = rfrpf.Access
- }
- if rfrpf.RouteFilterRuleType != nil {
- objectMap["routeFilterRuleType"] = rfrpf.RouteFilterRuleType
- }
- if rfrpf.Communities != nil {
- objectMap["communities"] = rfrpf.Communities
- }
- return json.Marshal(objectMap)
-}
-
-// RouteFilterRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
-// long-running operation.
-type RouteFilterRulesCreateOrUpdateFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *RouteFilterRulesCreateOrUpdateFuture) Result(client RouteFilterRulesClient) (rfr RouteFilterRule, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFilterRulesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.RouteFilterRulesCreateOrUpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if rfr.Response.Response, err = future.GetResult(sender); err == nil && rfr.Response.Response.StatusCode != http.StatusNoContent {
- rfr, err = client.CreateOrUpdateResponder(rfr.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFilterRulesCreateOrUpdateFuture", "Result", rfr.Response.Response, "Failure responding to request")
- }
- }
- return
-}
-
-// RouteFilterRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
-type RouteFilterRulesDeleteFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *RouteFilterRulesDeleteFuture) Result(client RouteFilterRulesClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFilterRulesDeleteFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.RouteFilterRulesDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
-}
-
-// RouteFilterRulesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
-type RouteFilterRulesUpdateFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *RouteFilterRulesUpdateFuture) Result(client RouteFilterRulesClient) (rfr RouteFilterRule, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFilterRulesUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.RouteFilterRulesUpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if rfr.Response.Response, err = future.GetResult(sender); err == nil && rfr.Response.Response.StatusCode != http.StatusNoContent {
- rfr, err = client.UpdateResponder(rfr.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFilterRulesUpdateFuture", "Result", rfr.Response.Response, "Failure responding to request")
- }
- }
- return
-}
-
-// RouteFiltersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
-type RouteFiltersCreateOrUpdateFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *RouteFiltersCreateOrUpdateFuture) Result(client RouteFiltersClient) (rf RouteFilter, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFiltersCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.RouteFiltersCreateOrUpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if rf.Response.Response, err = future.GetResult(sender); err == nil && rf.Response.Response.StatusCode != http.StatusNoContent {
- rf, err = client.CreateOrUpdateResponder(rf.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFiltersCreateOrUpdateFuture", "Result", rf.Response.Response, "Failure responding to request")
- }
- }
- return
-}
-
-// RouteFiltersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
-type RouteFiltersDeleteFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *RouteFiltersDeleteFuture) Result(client RouteFiltersClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFiltersDeleteFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.RouteFiltersDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
-}
-
-// RouteFiltersUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
-type RouteFiltersUpdateFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *RouteFiltersUpdateFuture) Result(client RouteFiltersClient) (rf RouteFilter, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFiltersUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.RouteFiltersUpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if rf.Response.Response, err = future.GetResult(sender); err == nil && rf.Response.Response.StatusCode != http.StatusNoContent {
- rf, err = client.UpdateResponder(rf.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFiltersUpdateFuture", "Result", rf.Response.Response, "Failure responding to request")
- }
- }
- return
-}
-
-// RouteListResult response for the ListRoute API service call
-type RouteListResult struct {
- autorest.Response `json:"-"`
- // Value - Gets a list of routes in a resource group.
- Value *[]Route `json:"value,omitempty"`
- // NextLink - The URL to get the next set of results.
- NextLink *string `json:"nextLink,omitempty"`
-}
-
-// RouteListResultIterator provides access to a complete listing of Route values.
-type RouteListResultIterator struct {
- i int
- page RouteListResultPage
-}
-
-// 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 *RouteListResultIterator) NextWithContext(ctx context.Context) (err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/RouteListResultIterator.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 *RouteListResultIterator) Next() error {
- return iter.NextWithContext(context.Background())
-}
-
-// NotDone returns true if the enumeration should be started or is not yet complete.
-func (iter RouteListResultIterator) 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 RouteListResultIterator) Response() RouteListResult {
- 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 RouteListResultIterator) Value() Route {
- if !iter.page.NotDone() {
- return Route{}
- }
- return iter.page.Values()[iter.i]
-}
-
-// Creates a new instance of the RouteListResultIterator type.
-func NewRouteListResultIterator(page RouteListResultPage) RouteListResultIterator {
- return RouteListResultIterator{page: page}
-}
-
-// IsEmpty returns true if the ListResult contains no values.
-func (rlr RouteListResult) IsEmpty() bool {
- return rlr.Value == nil || len(*rlr.Value) == 0
-}
-
-// hasNextLink returns true if the NextLink is not empty.
-func (rlr RouteListResult) hasNextLink() bool {
- return rlr.NextLink != nil && len(*rlr.NextLink) != 0
-}
-
-// routeListResultPreparer prepares a request to retrieve the next set of results.
-// It returns nil if no more results exist.
-func (rlr RouteListResult) routeListResultPreparer(ctx context.Context) (*http.Request, error) {
- if !rlr.hasNextLink() {
- return nil, nil
- }
- return autorest.Prepare((&http.Request{}).WithContext(ctx),
- autorest.AsJSON(),
- autorest.AsGet(),
- autorest.WithBaseURL(to.String(rlr.NextLink)))
-}
-
-// RouteListResultPage contains a page of Route values.
-type RouteListResultPage struct {
- fn func(context.Context, RouteListResult) (RouteListResult, error)
- rlr RouteListResult
-}
-
-// 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 *RouteListResultPage) NextWithContext(ctx context.Context) (err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/RouteListResultPage.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.rlr)
- if err != nil {
- return err
- }
- page.rlr = 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 *RouteListResultPage) Next() error {
- return page.NextWithContext(context.Background())
-}
-
-// NotDone returns true if the page enumeration should be started or is not yet complete.
-func (page RouteListResultPage) NotDone() bool {
- return !page.rlr.IsEmpty()
-}
-
-// Response returns the raw server response from the last page request.
-func (page RouteListResultPage) Response() RouteListResult {
- return page.rlr
-}
-
-// Values returns the slice of values for the current page or nil if there are no values.
-func (page RouteListResultPage) Values() []Route {
- if page.rlr.IsEmpty() {
- return nil
- }
- return *page.rlr.Value
-}
-
-// Creates a new instance of the RouteListResultPage type.
-func NewRouteListResultPage(getNextPage func(context.Context, RouteListResult) (RouteListResult, error)) RouteListResultPage {
- return RouteListResultPage{fn: getNextPage}
-}
-
-// RoutePropertiesFormat route resource
-type RoutePropertiesFormat struct {
- // AddressPrefix - The destination CIDR to which the route applies.
- AddressPrefix *string `json:"addressPrefix,omitempty"`
- // NextHopType - The type of Azure hop the packet should be sent to. Possible values are: 'VirtualNetworkGateway', 'VnetLocal', 'Internet', 'VirtualAppliance', and 'None'. Possible values include: 'RouteNextHopTypeVirtualNetworkGateway', 'RouteNextHopTypeVnetLocal', 'RouteNextHopTypeInternet', 'RouteNextHopTypeVirtualAppliance', 'RouteNextHopTypeNone'
- NextHopType RouteNextHopType `json:"nextHopType,omitempty"`
- // NextHopIPAddress - The IP address packets should be forwarded to. Next hop values are only allowed in routes where the next hop type is VirtualAppliance.
- NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"`
- // ProvisioningState - The provisioning state of the resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
- ProvisioningState *string `json:"provisioningState,omitempty"`
-}
-
-// RoutesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
-type RoutesCreateOrUpdateFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *RoutesCreateOrUpdateFuture) Result(client RoutesClient) (r Route, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RoutesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.RoutesCreateOrUpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if r.Response.Response, err = future.GetResult(sender); err == nil && r.Response.Response.StatusCode != http.StatusNoContent {
- r, err = client.CreateOrUpdateResponder(r.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RoutesCreateOrUpdateFuture", "Result", r.Response.Response, "Failure responding to request")
- }
- }
- return
-}
-
-// RoutesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
-type RoutesDeleteFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *RoutesDeleteFuture) Result(client RoutesClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RoutesDeleteFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.RoutesDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
-}
-
-// RouteTable route table resource.
-type RouteTable struct {
- autorest.Response `json:"-"`
- // RouteTablePropertiesFormat - Properties of the route table.
- *RouteTablePropertiesFormat `json:"properties,omitempty"`
- // Etag - Gets a unique read-only string that changes whenever the resource is updated.
- Etag *string `json:"etag,omitempty"`
- // ID - 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 RouteTable.
-func (rt RouteTable) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if rt.RouteTablePropertiesFormat != nil {
- objectMap["properties"] = rt.RouteTablePropertiesFormat
- }
- if rt.Etag != nil {
- objectMap["etag"] = rt.Etag
- }
- if rt.ID != nil {
- objectMap["id"] = rt.ID
- }
- if rt.Location != nil {
- objectMap["location"] = rt.Location
- }
- if rt.Tags != nil {
- objectMap["tags"] = rt.Tags
- }
- return json.Marshal(objectMap)
-}
-
-// UnmarshalJSON is the custom unmarshaler for RouteTable struct.
-func (rt *RouteTable) 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 routeTablePropertiesFormat RouteTablePropertiesFormat
- err = json.Unmarshal(*v, &routeTablePropertiesFormat)
- if err != nil {
- return err
- }
- rt.RouteTablePropertiesFormat = &routeTablePropertiesFormat
- }
- case "etag":
- if v != nil {
- var etag string
- err = json.Unmarshal(*v, &etag)
- if err != nil {
- return err
- }
- rt.Etag = &etag
- }
- case "id":
- if v != nil {
- var ID string
- err = json.Unmarshal(*v, &ID)
- if err != nil {
- return err
- }
- rt.ID = &ID
- }
- case "name":
- if v != nil {
- var name string
- err = json.Unmarshal(*v, &name)
- if err != nil {
- return err
- }
- rt.Name = &name
- }
- case "type":
- if v != nil {
- var typeVar string
- err = json.Unmarshal(*v, &typeVar)
- if err != nil {
- return err
- }
- rt.Type = &typeVar
- }
- case "location":
- if v != nil {
- var location string
- err = json.Unmarshal(*v, &location)
- if err != nil {
- return err
- }
- rt.Location = &location
- }
- case "tags":
- if v != nil {
- var tags map[string]*string
- err = json.Unmarshal(*v, &tags)
- if err != nil {
- return err
- }
- rt.Tags = tags
- }
- }
- }
-
- return nil
-}
-
-// RouteTableListResult response for the ListRouteTable API service call.
-type RouteTableListResult struct {
- autorest.Response `json:"-"`
- // Value - Gets a list of route tables in a resource group.
- Value *[]RouteTable `json:"value,omitempty"`
- // NextLink - The URL to get the next set of results.
- NextLink *string `json:"nextLink,omitempty"`
-}
-
-// RouteTableListResultIterator provides access to a complete listing of RouteTable values.
-type RouteTableListResultIterator struct {
- i int
- page RouteTableListResultPage
-}
-
-// 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 *RouteTableListResultIterator) NextWithContext(ctx context.Context) (err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/RouteTableListResultIterator.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 *RouteTableListResultIterator) Next() error {
- return iter.NextWithContext(context.Background())
-}
-
-// NotDone returns true if the enumeration should be started or is not yet complete.
-func (iter RouteTableListResultIterator) 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 RouteTableListResultIterator) Response() RouteTableListResult {
- 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 RouteTableListResultIterator) Value() RouteTable {
- if !iter.page.NotDone() {
- return RouteTable{}
- }
- return iter.page.Values()[iter.i]
-}
-
-// Creates a new instance of the RouteTableListResultIterator type.
-func NewRouteTableListResultIterator(page RouteTableListResultPage) RouteTableListResultIterator {
- return RouteTableListResultIterator{page: page}
-}
-
-// IsEmpty returns true if the ListResult contains no values.
-func (rtlr RouteTableListResult) IsEmpty() bool {
- return rtlr.Value == nil || len(*rtlr.Value) == 0
-}
-
-// hasNextLink returns true if the NextLink is not empty.
-func (rtlr RouteTableListResult) hasNextLink() bool {
- return rtlr.NextLink != nil && len(*rtlr.NextLink) != 0
-}
-
-// routeTableListResultPreparer prepares a request to retrieve the next set of results.
-// It returns nil if no more results exist.
-func (rtlr RouteTableListResult) routeTableListResultPreparer(ctx context.Context) (*http.Request, error) {
- if !rtlr.hasNextLink() {
- return nil, nil
- }
- return autorest.Prepare((&http.Request{}).WithContext(ctx),
- autorest.AsJSON(),
- autorest.AsGet(),
- autorest.WithBaseURL(to.String(rtlr.NextLink)))
-}
-
-// RouteTableListResultPage contains a page of RouteTable values.
-type RouteTableListResultPage struct {
- fn func(context.Context, RouteTableListResult) (RouteTableListResult, error)
- rtlr RouteTableListResult
-}
-
-// 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 *RouteTableListResultPage) NextWithContext(ctx context.Context) (err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/RouteTableListResultPage.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.rtlr)
- if err != nil {
- return err
- }
- page.rtlr = 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 *RouteTableListResultPage) Next() error {
- return page.NextWithContext(context.Background())
-}
-
-// NotDone returns true if the page enumeration should be started or is not yet complete.
-func (page RouteTableListResultPage) NotDone() bool {
- return !page.rtlr.IsEmpty()
-}
-
-// Response returns the raw server response from the last page request.
-func (page RouteTableListResultPage) Response() RouteTableListResult {
- return page.rtlr
-}
-
-// Values returns the slice of values for the current page or nil if there are no values.
-func (page RouteTableListResultPage) Values() []RouteTable {
- if page.rtlr.IsEmpty() {
- return nil
- }
- return *page.rtlr.Value
-}
-
-// Creates a new instance of the RouteTableListResultPage type.
-func NewRouteTableListResultPage(getNextPage func(context.Context, RouteTableListResult) (RouteTableListResult, error)) RouteTableListResultPage {
- return RouteTableListResultPage{fn: getNextPage}
-}
-
-// RouteTablePropertiesFormat route Table resource
-type RouteTablePropertiesFormat struct {
- // Routes - Collection of routes contained within a route table.
- Routes *[]Route `json:"routes,omitempty"`
- // Subnets - READ-ONLY; A collection of references to subnets.
- Subnets *[]Subnet `json:"subnets,omitempty"`
- // DisableBgpRoutePropagation - Gets or sets whether to disable the routes learned by BGP on that route table. True means disable.
- DisableBgpRoutePropagation *bool `json:"disableBgpRoutePropagation,omitempty"`
- // ProvisioningState - The provisioning state of the resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
- ProvisioningState *string `json:"provisioningState,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for RouteTablePropertiesFormat.
-func (rtpf RouteTablePropertiesFormat) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if rtpf.Routes != nil {
- objectMap["routes"] = rtpf.Routes
- }
- if rtpf.DisableBgpRoutePropagation != nil {
- objectMap["disableBgpRoutePropagation"] = rtpf.DisableBgpRoutePropagation
- }
- if rtpf.ProvisioningState != nil {
- objectMap["provisioningState"] = rtpf.ProvisioningState
- }
- return json.Marshal(objectMap)
-}
-
-// RouteTablesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
-type RouteTablesCreateOrUpdateFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *RouteTablesCreateOrUpdateFuture) Result(client RouteTablesClient) (rt RouteTable, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteTablesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.RouteTablesCreateOrUpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if rt.Response.Response, err = future.GetResult(sender); err == nil && rt.Response.Response.StatusCode != http.StatusNoContent {
- rt, err = client.CreateOrUpdateResponder(rt.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteTablesCreateOrUpdateFuture", "Result", rt.Response.Response, "Failure responding to request")
- }
- }
- return
-}
-
-// RouteTablesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
-type RouteTablesDeleteFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *RouteTablesDeleteFuture) Result(client RouteTablesClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteTablesDeleteFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.RouteTablesDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
-}
-
-// RouteTablesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
-type RouteTablesUpdateTagsFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *RouteTablesUpdateTagsFuture) Result(client RouteTablesClient) (rt RouteTable, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteTablesUpdateTagsFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.RouteTablesUpdateTagsFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if rt.Response.Response, err = future.GetResult(sender); err == nil && rt.Response.Response.StatusCode != http.StatusNoContent {
- rt, err = client.UpdateTagsResponder(rt.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteTablesUpdateTagsFuture", "Result", rt.Response.Response, "Failure responding to request")
- }
- }
- return
-}
-
-// SecurityGroup networkSecurityGroup resource.
-type SecurityGroup struct {
- autorest.Response `json:"-"`
- // SecurityGroupPropertiesFormat - Properties of the network security group
- *SecurityGroupPropertiesFormat `json:"properties,omitempty"`
- // Etag - A unique read-only string that changes whenever the resource is updated.
- Etag *string `json:"etag,omitempty"`
- // ID - 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 SecurityGroup.
-func (sg SecurityGroup) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if sg.SecurityGroupPropertiesFormat != nil {
- objectMap["properties"] = sg.SecurityGroupPropertiesFormat
- }
- if sg.Etag != nil {
- objectMap["etag"] = sg.Etag
- }
- if sg.ID != nil {
- objectMap["id"] = sg.ID
- }
- if sg.Location != nil {
- objectMap["location"] = sg.Location
- }
- if sg.Tags != nil {
- objectMap["tags"] = sg.Tags
- }
- return json.Marshal(objectMap)
-}
-
-// UnmarshalJSON is the custom unmarshaler for SecurityGroup struct.
-func (sg *SecurityGroup) 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 securityGroupPropertiesFormat SecurityGroupPropertiesFormat
- err = json.Unmarshal(*v, &securityGroupPropertiesFormat)
- if err != nil {
- return err
- }
- sg.SecurityGroupPropertiesFormat = &securityGroupPropertiesFormat
- }
- case "etag":
- if v != nil {
- var etag string
- err = json.Unmarshal(*v, &etag)
- if err != nil {
- return err
- }
- sg.Etag = &etag
- }
- case "id":
- if v != nil {
- var ID string
- err = json.Unmarshal(*v, &ID)
- if err != nil {
- return err
- }
- sg.ID = &ID
- }
- case "name":
- if v != nil {
- var name string
- err = json.Unmarshal(*v, &name)
- if err != nil {
- return err
- }
- sg.Name = &name
- }
- case "type":
- if v != nil {
- var typeVar string
- err = json.Unmarshal(*v, &typeVar)
- if err != nil {
- return err
- }
- sg.Type = &typeVar
- }
- case "location":
- if v != nil {
- var location string
- err = json.Unmarshal(*v, &location)
- if err != nil {
- return err
- }
- sg.Location = &location
- }
- case "tags":
- if v != nil {
- var tags map[string]*string
- err = json.Unmarshal(*v, &tags)
- if err != nil {
- return err
- }
- sg.Tags = tags
- }
- }
- }
-
- return nil
-}
-
-// SecurityGroupListResult response for ListNetworkSecurityGroups API service call.
-type SecurityGroupListResult struct {
- autorest.Response `json:"-"`
- // Value - A list of NetworkSecurityGroup resources.
- Value *[]SecurityGroup `json:"value,omitempty"`
- // NextLink - The URL to get the next set of results.
- NextLink *string `json:"nextLink,omitempty"`
-}
-
-// SecurityGroupListResultIterator provides access to a complete listing of SecurityGroup values.
-type SecurityGroupListResultIterator struct {
- i int
- page SecurityGroupListResultPage
-}
-
-// 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 *SecurityGroupListResultIterator) NextWithContext(ctx context.Context) (err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/SecurityGroupListResultIterator.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 *SecurityGroupListResultIterator) Next() error {
- return iter.NextWithContext(context.Background())
-}
-
-// NotDone returns true if the enumeration should be started or is not yet complete.
-func (iter SecurityGroupListResultIterator) 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 SecurityGroupListResultIterator) Response() SecurityGroupListResult {
- 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 SecurityGroupListResultIterator) Value() SecurityGroup {
- if !iter.page.NotDone() {
- return SecurityGroup{}
- }
- return iter.page.Values()[iter.i]
-}
-
-// Creates a new instance of the SecurityGroupListResultIterator type.
-func NewSecurityGroupListResultIterator(page SecurityGroupListResultPage) SecurityGroupListResultIterator {
- return SecurityGroupListResultIterator{page: page}
-}
-
-// IsEmpty returns true if the ListResult contains no values.
-func (sglr SecurityGroupListResult) IsEmpty() bool {
- return sglr.Value == nil || len(*sglr.Value) == 0
-}
-
-// hasNextLink returns true if the NextLink is not empty.
-func (sglr SecurityGroupListResult) hasNextLink() bool {
- return sglr.NextLink != nil && len(*sglr.NextLink) != 0
-}
-
-// securityGroupListResultPreparer prepares a request to retrieve the next set of results.
-// It returns nil if no more results exist.
-func (sglr SecurityGroupListResult) securityGroupListResultPreparer(ctx context.Context) (*http.Request, error) {
- if !sglr.hasNextLink() {
- return nil, nil
- }
- return autorest.Prepare((&http.Request{}).WithContext(ctx),
- autorest.AsJSON(),
- autorest.AsGet(),
- autorest.WithBaseURL(to.String(sglr.NextLink)))
-}
-
-// SecurityGroupListResultPage contains a page of SecurityGroup values.
-type SecurityGroupListResultPage struct {
- fn func(context.Context, SecurityGroupListResult) (SecurityGroupListResult, error)
- sglr SecurityGroupListResult
-}
-
-// 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 *SecurityGroupListResultPage) NextWithContext(ctx context.Context) (err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/SecurityGroupListResultPage.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.sglr)
- if err != nil {
- return err
- }
- page.sglr = 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 *SecurityGroupListResultPage) Next() error {
- return page.NextWithContext(context.Background())
-}
-
-// NotDone returns true if the page enumeration should be started or is not yet complete.
-func (page SecurityGroupListResultPage) NotDone() bool {
- return !page.sglr.IsEmpty()
-}
-
-// Response returns the raw server response from the last page request.
-func (page SecurityGroupListResultPage) Response() SecurityGroupListResult {
- return page.sglr
-}
-
-// Values returns the slice of values for the current page or nil if there are no values.
-func (page SecurityGroupListResultPage) Values() []SecurityGroup {
- if page.sglr.IsEmpty() {
- return nil
- }
- return *page.sglr.Value
-}
-
-// Creates a new instance of the SecurityGroupListResultPage type.
-func NewSecurityGroupListResultPage(getNextPage func(context.Context, SecurityGroupListResult) (SecurityGroupListResult, error)) SecurityGroupListResultPage {
- return SecurityGroupListResultPage{fn: getNextPage}
-}
-
-// SecurityGroupNetworkInterface network interface and all its associated security rules.
-type SecurityGroupNetworkInterface struct {
- // ID - ID of the network interface.
- ID *string `json:"id,omitempty"`
- SecurityRuleAssociations *SecurityRuleAssociations `json:"securityRuleAssociations,omitempty"`
-}
-
-// SecurityGroupPropertiesFormat network Security Group resource.
-type SecurityGroupPropertiesFormat struct {
- // SecurityRules - A collection of security rules of the network security group.
- SecurityRules *[]SecurityRule `json:"securityRules,omitempty"`
- // DefaultSecurityRules - The default security rules of network security group.
- DefaultSecurityRules *[]SecurityRule `json:"defaultSecurityRules,omitempty"`
- // NetworkInterfaces - READ-ONLY; A collection of references to network interfaces.
- NetworkInterfaces *[]Interface `json:"networkInterfaces,omitempty"`
- // Subnets - READ-ONLY; A collection of references to subnets.
- Subnets *[]Subnet `json:"subnets,omitempty"`
- // ResourceGUID - The resource GUID property of the network security group resource.
- ResourceGUID *string `json:"resourceGuid,omitempty"`
- // ProvisioningState - The provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
- ProvisioningState *string `json:"provisioningState,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for SecurityGroupPropertiesFormat.
-func (sgpf SecurityGroupPropertiesFormat) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if sgpf.SecurityRules != nil {
- objectMap["securityRules"] = sgpf.SecurityRules
- }
- if sgpf.DefaultSecurityRules != nil {
- objectMap["defaultSecurityRules"] = sgpf.DefaultSecurityRules
- }
- if sgpf.ResourceGUID != nil {
- objectMap["resourceGuid"] = sgpf.ResourceGUID
- }
- if sgpf.ProvisioningState != nil {
- objectMap["provisioningState"] = sgpf.ProvisioningState
- }
- return json.Marshal(objectMap)
-}
-
-// SecurityGroupResult network configuration diagnostic result corresponded provided traffic query.
-type SecurityGroupResult struct {
- // SecurityRuleAccessResult - The network traffic is allowed or denied. Possible values are 'Allow' and 'Deny'. Possible values include: 'SecurityRuleAccessAllow', 'SecurityRuleAccessDeny'
- SecurityRuleAccessResult SecurityRuleAccess `json:"securityRuleAccessResult,omitempty"`
- // EvaluatedNetworkSecurityGroups - READ-ONLY; List of results network security groups diagnostic.
- EvaluatedNetworkSecurityGroups *[]EvaluatedNetworkSecurityGroup `json:"evaluatedNetworkSecurityGroups,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for SecurityGroupResult.
-func (sgr SecurityGroupResult) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if sgr.SecurityRuleAccessResult != "" {
- objectMap["securityRuleAccessResult"] = sgr.SecurityRuleAccessResult
- }
- return json.Marshal(objectMap)
-}
-
-// SecurityGroupsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
-// long-running operation.
-type SecurityGroupsCreateOrUpdateFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *SecurityGroupsCreateOrUpdateFuture) Result(client SecurityGroupsClient) (sg SecurityGroup, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityGroupsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.SecurityGroupsCreateOrUpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if sg.Response.Response, err = future.GetResult(sender); err == nil && sg.Response.Response.StatusCode != http.StatusNoContent {
- sg, err = client.CreateOrUpdateResponder(sg.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityGroupsCreateOrUpdateFuture", "Result", sg.Response.Response, "Failure responding to request")
- }
- }
- return
-}
-
-// SecurityGroupsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
-type SecurityGroupsDeleteFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *SecurityGroupsDeleteFuture) Result(client SecurityGroupsClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityGroupsDeleteFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.SecurityGroupsDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
-}
-
-// SecurityGroupsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
-type SecurityGroupsUpdateTagsFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *SecurityGroupsUpdateTagsFuture) Result(client SecurityGroupsClient) (sg SecurityGroup, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityGroupsUpdateTagsFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.SecurityGroupsUpdateTagsFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if sg.Response.Response, err = future.GetResult(sender); err == nil && sg.Response.Response.StatusCode != http.StatusNoContent {
- sg, err = client.UpdateTagsResponder(sg.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityGroupsUpdateTagsFuture", "Result", sg.Response.Response, "Failure responding to request")
- }
- }
- return
-}
-
-// SecurityGroupViewParameters parameters that define the VM to check security groups for.
-type SecurityGroupViewParameters struct {
- // TargetResourceID - ID of the target VM.
- TargetResourceID *string `json:"targetResourceId,omitempty"`
-}
-
-// SecurityGroupViewResult the information about security rules applied to the specified VM.
-type SecurityGroupViewResult struct {
- autorest.Response `json:"-"`
- // NetworkInterfaces - List of network interfaces on the specified VM.
- NetworkInterfaces *[]SecurityGroupNetworkInterface `json:"networkInterfaces,omitempty"`
-}
-
-// SecurityRule network security rule.
-type SecurityRule struct {
- autorest.Response `json:"-"`
- // SecurityRulePropertiesFormat - Properties of the security rule
- *SecurityRulePropertiesFormat `json:"properties,omitempty"`
- // Name - 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"`
- // Etag - A unique read-only string that changes whenever the resource is updated.
- Etag *string `json:"etag,omitempty"`
- // ID - Resource ID.
- ID *string `json:"id,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for SecurityRule.
-func (sr SecurityRule) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if sr.SecurityRulePropertiesFormat != nil {
- objectMap["properties"] = sr.SecurityRulePropertiesFormat
- }
- if sr.Name != nil {
- objectMap["name"] = sr.Name
- }
- if sr.Etag != nil {
- objectMap["etag"] = sr.Etag
- }
- if sr.ID != nil {
- objectMap["id"] = sr.ID
- }
- return json.Marshal(objectMap)
-}
-
-// UnmarshalJSON is the custom unmarshaler for SecurityRule struct.
-func (sr *SecurityRule) 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 securityRulePropertiesFormat SecurityRulePropertiesFormat
- err = json.Unmarshal(*v, &securityRulePropertiesFormat)
- if err != nil {
- return err
- }
- sr.SecurityRulePropertiesFormat = &securityRulePropertiesFormat
- }
- case "name":
- if v != nil {
- var name string
- err = json.Unmarshal(*v, &name)
- if err != nil {
- return err
- }
- sr.Name = &name
- }
- case "etag":
- if v != nil {
- var etag string
- err = json.Unmarshal(*v, &etag)
- if err != nil {
- return err
- }
- sr.Etag = &etag
- }
- case "id":
- if v != nil {
- var ID string
- err = json.Unmarshal(*v, &ID)
- if err != nil {
- return err
- }
- sr.ID = &ID
- }
- }
- }
-
- return nil
-}
-
-// SecurityRuleAssociations all security rules associated with the network interface.
-type SecurityRuleAssociations struct {
- NetworkInterfaceAssociation *InterfaceAssociation `json:"networkInterfaceAssociation,omitempty"`
- SubnetAssociation *SubnetAssociation `json:"subnetAssociation,omitempty"`
- // DefaultSecurityRules - Collection of default security rules of the network security group.
- DefaultSecurityRules *[]SecurityRule `json:"defaultSecurityRules,omitempty"`
- // EffectiveSecurityRules - Collection of effective security rules.
- EffectiveSecurityRules *[]EffectiveNetworkSecurityRule `json:"effectiveSecurityRules,omitempty"`
-}
-
-// SecurityRuleListResult response for ListSecurityRule API service call. Retrieves all security rules that
-// belongs to a network security group.
-type SecurityRuleListResult struct {
- autorest.Response `json:"-"`
- // Value - The security rules in a network security group.
- Value *[]SecurityRule `json:"value,omitempty"`
- // NextLink - The URL to get the next set of results.
- NextLink *string `json:"nextLink,omitempty"`
-}
-
-// SecurityRuleListResultIterator provides access to a complete listing of SecurityRule values.
-type SecurityRuleListResultIterator struct {
- i int
- page SecurityRuleListResultPage
-}
-
-// 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 *SecurityRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/SecurityRuleListResultIterator.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 *SecurityRuleListResultIterator) Next() error {
- return iter.NextWithContext(context.Background())
-}
-
-// NotDone returns true if the enumeration should be started or is not yet complete.
-func (iter SecurityRuleListResultIterator) 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 SecurityRuleListResultIterator) Response() SecurityRuleListResult {
- 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 SecurityRuleListResultIterator) Value() SecurityRule {
- if !iter.page.NotDone() {
- return SecurityRule{}
- }
- return iter.page.Values()[iter.i]
-}
-
-// Creates a new instance of the SecurityRuleListResultIterator type.
-func NewSecurityRuleListResultIterator(page SecurityRuleListResultPage) SecurityRuleListResultIterator {
- return SecurityRuleListResultIterator{page: page}
-}
-
-// IsEmpty returns true if the ListResult contains no values.
-func (srlr SecurityRuleListResult) IsEmpty() bool {
- return srlr.Value == nil || len(*srlr.Value) == 0
-}
-
-// hasNextLink returns true if the NextLink is not empty.
-func (srlr SecurityRuleListResult) hasNextLink() bool {
- return srlr.NextLink != nil && len(*srlr.NextLink) != 0
-}
-
-// securityRuleListResultPreparer prepares a request to retrieve the next set of results.
-// It returns nil if no more results exist.
-func (srlr SecurityRuleListResult) securityRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
- if !srlr.hasNextLink() {
- return nil, nil
- }
- return autorest.Prepare((&http.Request{}).WithContext(ctx),
- autorest.AsJSON(),
- autorest.AsGet(),
- autorest.WithBaseURL(to.String(srlr.NextLink)))
-}
-
-// SecurityRuleListResultPage contains a page of SecurityRule values.
-type SecurityRuleListResultPage struct {
- fn func(context.Context, SecurityRuleListResult) (SecurityRuleListResult, error)
- srlr SecurityRuleListResult
-}
-
-// 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 *SecurityRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/SecurityRuleListResultPage.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.srlr)
- if err != nil {
- return err
- }
- page.srlr = 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 *SecurityRuleListResultPage) Next() error {
- return page.NextWithContext(context.Background())
-}
-
-// NotDone returns true if the page enumeration should be started or is not yet complete.
-func (page SecurityRuleListResultPage) NotDone() bool {
- return !page.srlr.IsEmpty()
-}
-
-// Response returns the raw server response from the last page request.
-func (page SecurityRuleListResultPage) Response() SecurityRuleListResult {
- return page.srlr
-}
-
-// Values returns the slice of values for the current page or nil if there are no values.
-func (page SecurityRuleListResultPage) Values() []SecurityRule {
- if page.srlr.IsEmpty() {
- return nil
- }
- return *page.srlr.Value
-}
-
-// Creates a new instance of the SecurityRuleListResultPage type.
-func NewSecurityRuleListResultPage(getNextPage func(context.Context, SecurityRuleListResult) (SecurityRuleListResult, error)) SecurityRuleListResultPage {
- return SecurityRuleListResultPage{fn: getNextPage}
-}
-
-// SecurityRulePropertiesFormat security rule resource.
-type SecurityRulePropertiesFormat struct {
- // Description - A description for this rule. Restricted to 140 chars.
- Description *string `json:"description,omitempty"`
- // Protocol - Network protocol this rule applies to. Possible values are 'Tcp', 'Udp', and '*'. Possible values include: 'SecurityRuleProtocolTCP', 'SecurityRuleProtocolUDP', 'SecurityRuleProtocolAsterisk'
- Protocol SecurityRuleProtocol `json:"protocol,omitempty"`
- // SourcePortRange - The source port or range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports.
- SourcePortRange *string `json:"sourcePortRange,omitempty"`
- // DestinationPortRange - The destination port or range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports.
- DestinationPortRange *string `json:"destinationPortRange,omitempty"`
- // SourceAddressPrefix - The CIDR or source IP range. Asterisk '*' can also be used to match all source IPs. Default tags such as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' can also be used. If this is an ingress rule, specifies where network traffic originates from.
- SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"`
- // SourceAddressPrefixes - The CIDR or source IP ranges.
- SourceAddressPrefixes *[]string `json:"sourceAddressPrefixes,omitempty"`
- // SourceApplicationSecurityGroups - The application security group specified as source.
- SourceApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"sourceApplicationSecurityGroups,omitempty"`
- // DestinationAddressPrefix - The destination address prefix. CIDR or destination IP range. Asterisk '*' can also be used to match all source IPs. Default tags such as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' can also be used.
- DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"`
- // DestinationAddressPrefixes - The destination address prefixes. CIDR or destination IP ranges.
- DestinationAddressPrefixes *[]string `json:"destinationAddressPrefixes,omitempty"`
- // DestinationApplicationSecurityGroups - The application security group specified as destination.
- DestinationApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"destinationApplicationSecurityGroups,omitempty"`
- // SourcePortRanges - The source port ranges.
- SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"`
- // DestinationPortRanges - The destination port ranges.
- DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"`
- // Access - The network traffic is allowed or denied. Possible values are: 'Allow' and 'Deny'. Possible values include: 'SecurityRuleAccessAllow', 'SecurityRuleAccessDeny'
- Access SecurityRuleAccess `json:"access,omitempty"`
- // Priority - The priority of the rule. The value can be between 100 and 4096. The priority number must be unique for each rule in the collection. The lower the priority number, the higher the priority of the rule.
- Priority *int32 `json:"priority,omitempty"`
- // Direction - The direction of the rule. The direction specifies if rule will be evaluated on incoming or outgoing traffic. Possible values are: 'Inbound' and 'Outbound'. Possible values include: 'SecurityRuleDirectionInbound', 'SecurityRuleDirectionOutbound'
- Direction SecurityRuleDirection `json:"direction,omitempty"`
- // ProvisioningState - The provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
- ProvisioningState *string `json:"provisioningState,omitempty"`
-}
-
-// SecurityRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
-type SecurityRulesCreateOrUpdateFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *SecurityRulesCreateOrUpdateFuture) Result(client SecurityRulesClient) (sr SecurityRule, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityRulesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.SecurityRulesCreateOrUpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if sr.Response.Response, err = future.GetResult(sender); err == nil && sr.Response.Response.StatusCode != http.StatusNoContent {
- sr, err = client.CreateOrUpdateResponder(sr.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityRulesCreateOrUpdateFuture", "Result", sr.Response.Response, "Failure responding to request")
- }
- }
- return
-}
-
-// SecurityRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
-type SecurityRulesDeleteFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *SecurityRulesDeleteFuture) Result(client SecurityRulesClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityRulesDeleteFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.SecurityRulesDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
-}
-
-// SecurityRulesEvaluationResult network security rules evaluation result.
-type SecurityRulesEvaluationResult struct {
- // Name - Name of the network security rule.
- Name *string `json:"name,omitempty"`
- // ProtocolMatched - Value indicating whether protocol is matched.
- ProtocolMatched *bool `json:"protocolMatched,omitempty"`
- // SourceMatched - Value indicating whether source is matched.
- SourceMatched *bool `json:"sourceMatched,omitempty"`
- // SourcePortMatched - Value indicating whether source port is matched.
- SourcePortMatched *bool `json:"sourcePortMatched,omitempty"`
- // DestinationMatched - Value indicating whether destination is matched.
- DestinationMatched *bool `json:"destinationMatched,omitempty"`
- // DestinationPortMatched - Value indicating whether destination port is matched.
- DestinationPortMatched *bool `json:"destinationPortMatched,omitempty"`
-}
-
-// ServiceAssociationLink serviceAssociationLink resource.
-type ServiceAssociationLink struct {
- // ServiceAssociationLinkPropertiesFormat - Resource navigation link properties format.
- *ServiceAssociationLinkPropertiesFormat `json:"properties,omitempty"`
- // Name - 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"`
- // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
- Etag *string `json:"etag,omitempty"`
- // ID - Resource ID.
- ID *string `json:"id,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for ServiceAssociationLink.
-func (sal ServiceAssociationLink) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if sal.ServiceAssociationLinkPropertiesFormat != nil {
- objectMap["properties"] = sal.ServiceAssociationLinkPropertiesFormat
- }
- if sal.Name != nil {
- objectMap["name"] = sal.Name
- }
- if sal.ID != nil {
- objectMap["id"] = sal.ID
- }
- return json.Marshal(objectMap)
-}
-
-// UnmarshalJSON is the custom unmarshaler for ServiceAssociationLink struct.
-func (sal *ServiceAssociationLink) 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 serviceAssociationLinkPropertiesFormat ServiceAssociationLinkPropertiesFormat
- err = json.Unmarshal(*v, &serviceAssociationLinkPropertiesFormat)
- if err != nil {
- return err
- }
- sal.ServiceAssociationLinkPropertiesFormat = &serviceAssociationLinkPropertiesFormat
- }
- case "name":
- if v != nil {
- var name string
- err = json.Unmarshal(*v, &name)
- if err != nil {
- return err
- }
- sal.Name = &name
- }
- case "etag":
- if v != nil {
- var etag string
- err = json.Unmarshal(*v, &etag)
- if err != nil {
- return err
- }
- sal.Etag = &etag
- }
- case "id":
- if v != nil {
- var ID string
- err = json.Unmarshal(*v, &ID)
- if err != nil {
- return err
- }
- sal.ID = &ID
- }
- }
- }
-
- return nil
-}
-
-// ServiceAssociationLinkPropertiesFormat properties of ServiceAssociationLink.
-type ServiceAssociationLinkPropertiesFormat struct {
- // LinkedResourceType - Resource type of the linked resource.
- LinkedResourceType *string `json:"linkedResourceType,omitempty"`
- // Link - Link to the external resource.
- Link *string `json:"link,omitempty"`
- // ProvisioningState - READ-ONLY; Provisioning state of the ServiceAssociationLink resource.
- ProvisioningState *string `json:"provisioningState,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for ServiceAssociationLinkPropertiesFormat.
-func (salpf ServiceAssociationLinkPropertiesFormat) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if salpf.LinkedResourceType != nil {
- objectMap["linkedResourceType"] = salpf.LinkedResourceType
- }
- if salpf.Link != nil {
- objectMap["link"] = salpf.Link
- }
- return json.Marshal(objectMap)
-}
-
-// ServiceDelegationPropertiesFormat properties of a service delegation.
-type ServiceDelegationPropertiesFormat struct {
- // ServiceName - The name of the service to whom the subnet should be delegated (e.g. Microsoft.Sql/servers)
- ServiceName *string `json:"serviceName,omitempty"`
- // Actions - Describes the actions permitted to the service upon delegation
- Actions *[]string `json:"actions,omitempty"`
- // ProvisioningState - READ-ONLY; The provisioning state of the resource.
- ProvisioningState *string `json:"provisioningState,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for ServiceDelegationPropertiesFormat.
-func (sdpf ServiceDelegationPropertiesFormat) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if sdpf.ServiceName != nil {
- objectMap["serviceName"] = sdpf.ServiceName
- }
- if sdpf.Actions != nil {
- objectMap["actions"] = sdpf.Actions
- }
- return json.Marshal(objectMap)
-}
-
-// ServiceEndpointPoliciesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
-// long-running operation.
-type ServiceEndpointPoliciesCreateOrUpdateFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *ServiceEndpointPoliciesCreateOrUpdateFuture) Result(client ServiceEndpointPoliciesClient) (sep ServiceEndpointPolicy, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.ServiceEndpointPoliciesCreateOrUpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if sep.Response.Response, err = future.GetResult(sender); err == nil && sep.Response.Response.StatusCode != http.StatusNoContent {
- sep, err = client.CreateOrUpdateResponder(sep.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesCreateOrUpdateFuture", "Result", sep.Response.Response, "Failure responding to request")
- }
- }
- return
-}
-
-// ServiceEndpointPoliciesDeleteFuture an abstraction for monitoring and retrieving the results of a
-// long-running operation.
-type ServiceEndpointPoliciesDeleteFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *ServiceEndpointPoliciesDeleteFuture) Result(client ServiceEndpointPoliciesClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesDeleteFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.ServiceEndpointPoliciesDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
-}
-
-// ServiceEndpointPoliciesUpdateFuture an abstraction for monitoring and retrieving the results of a
-// long-running operation.
-type ServiceEndpointPoliciesUpdateFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *ServiceEndpointPoliciesUpdateFuture) Result(client ServiceEndpointPoliciesClient) (sep ServiceEndpointPolicy, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.ServiceEndpointPoliciesUpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if sep.Response.Response, err = future.GetResult(sender); err == nil && sep.Response.Response.StatusCode != http.StatusNoContent {
- sep, err = client.UpdateResponder(sep.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesUpdateFuture", "Result", sep.Response.Response, "Failure responding to request")
- }
- }
- return
-}
-
-// ServiceEndpointPolicy service End point policy resource.
-type ServiceEndpointPolicy struct {
- autorest.Response `json:"-"`
- // ServiceEndpointPolicyPropertiesFormat - Properties of the service end point policy
- *ServiceEndpointPolicyPropertiesFormat `json:"properties,omitempty"`
- // Etag - A unique read-only string that changes whenever the resource is updated.
- Etag *string `json:"etag,omitempty"`
- // ID - 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 ServiceEndpointPolicy.
-func (sep ServiceEndpointPolicy) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if sep.ServiceEndpointPolicyPropertiesFormat != nil {
- objectMap["properties"] = sep.ServiceEndpointPolicyPropertiesFormat
- }
- if sep.Etag != nil {
- objectMap["etag"] = sep.Etag
- }
- if sep.ID != nil {
- objectMap["id"] = sep.ID
- }
- if sep.Location != nil {
- objectMap["location"] = sep.Location
- }
- if sep.Tags != nil {
- objectMap["tags"] = sep.Tags
- }
- return json.Marshal(objectMap)
-}
-
-// UnmarshalJSON is the custom unmarshaler for ServiceEndpointPolicy struct.
-func (sep *ServiceEndpointPolicy) 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 serviceEndpointPolicyPropertiesFormat ServiceEndpointPolicyPropertiesFormat
- err = json.Unmarshal(*v, &serviceEndpointPolicyPropertiesFormat)
- if err != nil {
- return err
- }
- sep.ServiceEndpointPolicyPropertiesFormat = &serviceEndpointPolicyPropertiesFormat
- }
- case "etag":
- if v != nil {
- var etag string
- err = json.Unmarshal(*v, &etag)
- if err != nil {
- return err
- }
- sep.Etag = &etag
- }
- case "id":
- if v != nil {
- var ID string
- err = json.Unmarshal(*v, &ID)
- if err != nil {
- return err
- }
- sep.ID = &ID
- }
- case "name":
- if v != nil {
- var name string
- err = json.Unmarshal(*v, &name)
- if err != nil {
- return err
- }
- sep.Name = &name
- }
- case "type":
- if v != nil {
- var typeVar string
- err = json.Unmarshal(*v, &typeVar)
- if err != nil {
- return err
- }
- sep.Type = &typeVar
- }
- case "location":
- if v != nil {
- var location string
- err = json.Unmarshal(*v, &location)
- if err != nil {
- return err
- }
- sep.Location = &location
- }
- case "tags":
- if v != nil {
- var tags map[string]*string
- err = json.Unmarshal(*v, &tags)
- if err != nil {
- return err
- }
- sep.Tags = tags
- }
- }
- }
-
- return nil
-}
-
-// ServiceEndpointPolicyDefinition service Endpoint policy definitions.
-type ServiceEndpointPolicyDefinition struct {
- autorest.Response `json:"-"`
- // ServiceEndpointPolicyDefinitionPropertiesFormat - Properties of the service endpoint policy definition
- *ServiceEndpointPolicyDefinitionPropertiesFormat `json:"properties,omitempty"`
- // Name - 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"`
- // Etag - A unique read-only string that changes whenever the resource is updated.
- Etag *string `json:"etag,omitempty"`
- // ID - Resource ID.
- ID *string `json:"id,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for ServiceEndpointPolicyDefinition.
-func (sepd ServiceEndpointPolicyDefinition) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if sepd.ServiceEndpointPolicyDefinitionPropertiesFormat != nil {
- objectMap["properties"] = sepd.ServiceEndpointPolicyDefinitionPropertiesFormat
- }
- if sepd.Name != nil {
- objectMap["name"] = sepd.Name
- }
- if sepd.Etag != nil {
- objectMap["etag"] = sepd.Etag
- }
- if sepd.ID != nil {
- objectMap["id"] = sepd.ID
- }
- return json.Marshal(objectMap)
-}
-
-// UnmarshalJSON is the custom unmarshaler for ServiceEndpointPolicyDefinition struct.
-func (sepd *ServiceEndpointPolicyDefinition) 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 serviceEndpointPolicyDefinitionPropertiesFormat ServiceEndpointPolicyDefinitionPropertiesFormat
- err = json.Unmarshal(*v, &serviceEndpointPolicyDefinitionPropertiesFormat)
- if err != nil {
- return err
- }
- sepd.ServiceEndpointPolicyDefinitionPropertiesFormat = &serviceEndpointPolicyDefinitionPropertiesFormat
- }
- case "name":
- if v != nil {
- var name string
- err = json.Unmarshal(*v, &name)
- if err != nil {
- return err
- }
- sepd.Name = &name
- }
- case "etag":
- if v != nil {
- var etag string
- err = json.Unmarshal(*v, &etag)
- if err != nil {
- return err
- }
- sepd.Etag = &etag
- }
- case "id":
- if v != nil {
- var ID string
- err = json.Unmarshal(*v, &ID)
- if err != nil {
- return err
- }
- sepd.ID = &ID
- }
- }
- }
-
- return nil
-}
-
-// ServiceEndpointPolicyDefinitionListResult response for ListServiceEndpointPolicyDefinition API service call.
-// Retrieves all service endpoint policy definition that belongs to a service endpoint policy.
-type ServiceEndpointPolicyDefinitionListResult struct {
- autorest.Response `json:"-"`
- // Value - The service endpoint policy definition in a service endpoint policy.
- Value *[]ServiceEndpointPolicyDefinition `json:"value,omitempty"`
- // NextLink - The URL to get the next set of results.
- NextLink *string `json:"nextLink,omitempty"`
-}
-
-// ServiceEndpointPolicyDefinitionListResultIterator provides access to a complete listing of
-// ServiceEndpointPolicyDefinition values.
-type ServiceEndpointPolicyDefinitionListResultIterator struct {
- i int
- page ServiceEndpointPolicyDefinitionListResultPage
-}
-
-// 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 *ServiceEndpointPolicyDefinitionListResultIterator) NextWithContext(ctx context.Context) (err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPolicyDefinitionListResultIterator.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 *ServiceEndpointPolicyDefinitionListResultIterator) Next() error {
- return iter.NextWithContext(context.Background())
-}
-
-// NotDone returns true if the enumeration should be started or is not yet complete.
-func (iter ServiceEndpointPolicyDefinitionListResultIterator) 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 ServiceEndpointPolicyDefinitionListResultIterator) Response() ServiceEndpointPolicyDefinitionListResult {
- 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 ServiceEndpointPolicyDefinitionListResultIterator) Value() ServiceEndpointPolicyDefinition {
- if !iter.page.NotDone() {
- return ServiceEndpointPolicyDefinition{}
- }
- return iter.page.Values()[iter.i]
-}
-
-// Creates a new instance of the ServiceEndpointPolicyDefinitionListResultIterator type.
-func NewServiceEndpointPolicyDefinitionListResultIterator(page ServiceEndpointPolicyDefinitionListResultPage) ServiceEndpointPolicyDefinitionListResultIterator {
- return ServiceEndpointPolicyDefinitionListResultIterator{page: page}
-}
-
-// IsEmpty returns true if the ListResult contains no values.
-func (sepdlr ServiceEndpointPolicyDefinitionListResult) IsEmpty() bool {
- return sepdlr.Value == nil || len(*sepdlr.Value) == 0
-}
-
-// hasNextLink returns true if the NextLink is not empty.
-func (sepdlr ServiceEndpointPolicyDefinitionListResult) hasNextLink() bool {
- return sepdlr.NextLink != nil && len(*sepdlr.NextLink) != 0
-}
-
-// serviceEndpointPolicyDefinitionListResultPreparer prepares a request to retrieve the next set of results.
-// It returns nil if no more results exist.
-func (sepdlr ServiceEndpointPolicyDefinitionListResult) serviceEndpointPolicyDefinitionListResultPreparer(ctx context.Context) (*http.Request, error) {
- if !sepdlr.hasNextLink() {
- return nil, nil
- }
- return autorest.Prepare((&http.Request{}).WithContext(ctx),
- autorest.AsJSON(),
- autorest.AsGet(),
- autorest.WithBaseURL(to.String(sepdlr.NextLink)))
-}
-
-// ServiceEndpointPolicyDefinitionListResultPage contains a page of ServiceEndpointPolicyDefinition values.
-type ServiceEndpointPolicyDefinitionListResultPage struct {
- fn func(context.Context, ServiceEndpointPolicyDefinitionListResult) (ServiceEndpointPolicyDefinitionListResult, error)
- sepdlr ServiceEndpointPolicyDefinitionListResult
-}
-
-// 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 *ServiceEndpointPolicyDefinitionListResultPage) NextWithContext(ctx context.Context) (err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPolicyDefinitionListResultPage.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.sepdlr)
- if err != nil {
- return err
- }
- page.sepdlr = 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 *ServiceEndpointPolicyDefinitionListResultPage) Next() error {
- return page.NextWithContext(context.Background())
-}
-
-// NotDone returns true if the page enumeration should be started or is not yet complete.
-func (page ServiceEndpointPolicyDefinitionListResultPage) NotDone() bool {
- return !page.sepdlr.IsEmpty()
-}
-
-// Response returns the raw server response from the last page request.
-func (page ServiceEndpointPolicyDefinitionListResultPage) Response() ServiceEndpointPolicyDefinitionListResult {
- return page.sepdlr
-}
-
-// Values returns the slice of values for the current page or nil if there are no values.
-func (page ServiceEndpointPolicyDefinitionListResultPage) Values() []ServiceEndpointPolicyDefinition {
- if page.sepdlr.IsEmpty() {
- return nil
- }
- return *page.sepdlr.Value
-}
-
-// Creates a new instance of the ServiceEndpointPolicyDefinitionListResultPage type.
-func NewServiceEndpointPolicyDefinitionListResultPage(getNextPage func(context.Context, ServiceEndpointPolicyDefinitionListResult) (ServiceEndpointPolicyDefinitionListResult, error)) ServiceEndpointPolicyDefinitionListResultPage {
- return ServiceEndpointPolicyDefinitionListResultPage{fn: getNextPage}
-}
-
-// ServiceEndpointPolicyDefinitionPropertiesFormat service Endpoint policy definition resource.
-type ServiceEndpointPolicyDefinitionPropertiesFormat struct {
- // Description - A description for this rule. Restricted to 140 chars.
- Description *string `json:"description,omitempty"`
- // Service - Service endpoint name.
- Service *string `json:"service,omitempty"`
- // ServiceResources - A list of service resources.
- ServiceResources *[]string `json:"serviceResources,omitempty"`
- // ProvisioningState - READ-ONLY; The provisioning state of the service end point policy definition. Possible values are: 'Updating', 'Deleting', and 'Failed'.
- ProvisioningState *string `json:"provisioningState,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for ServiceEndpointPolicyDefinitionPropertiesFormat.
-func (sepdpf ServiceEndpointPolicyDefinitionPropertiesFormat) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if sepdpf.Description != nil {
- objectMap["description"] = sepdpf.Description
- }
- if sepdpf.Service != nil {
- objectMap["service"] = sepdpf.Service
- }
- if sepdpf.ServiceResources != nil {
- objectMap["serviceResources"] = sepdpf.ServiceResources
- }
- return json.Marshal(objectMap)
-}
-
-// ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
-// results of a long-running operation.
-type ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture) Result(client ServiceEndpointPolicyDefinitionsClient) (sepd ServiceEndpointPolicyDefinition, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if sepd.Response.Response, err = future.GetResult(sender); err == nil && sepd.Response.Response.StatusCode != http.StatusNoContent {
- sepd, err = client.CreateOrUpdateResponder(sepd.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture", "Result", sepd.Response.Response, "Failure responding to request")
- }
- }
- return
-}
-
-// ServiceEndpointPolicyDefinitionsDeleteFuture an abstraction for monitoring and retrieving the results of a
-// long-running operation.
-type ServiceEndpointPolicyDefinitionsDeleteFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *ServiceEndpointPolicyDefinitionsDeleteFuture) Result(client ServiceEndpointPolicyDefinitionsClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ServiceEndpointPolicyDefinitionsDeleteFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.ServiceEndpointPolicyDefinitionsDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
-}
-
-// ServiceEndpointPolicyListResult response for ListServiceEndpointPolicies API service call.
-type ServiceEndpointPolicyListResult struct {
- autorest.Response `json:"-"`
- // Value - A list of ServiceEndpointPolicy resources.
- Value *[]ServiceEndpointPolicy `json:"value,omitempty"`
- // NextLink - READ-ONLY; The URL to get the next set of results.
- NextLink *string `json:"nextLink,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for ServiceEndpointPolicyListResult.
-func (seplr ServiceEndpointPolicyListResult) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if seplr.Value != nil {
- objectMap["value"] = seplr.Value
- }
- return json.Marshal(objectMap)
-}
-
-// ServiceEndpointPolicyListResultIterator provides access to a complete listing of ServiceEndpointPolicy
-// values.
-type ServiceEndpointPolicyListResultIterator struct {
- i int
- page ServiceEndpointPolicyListResultPage
-}
-
-// 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 *ServiceEndpointPolicyListResultIterator) NextWithContext(ctx context.Context) (err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPolicyListResultIterator.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 *ServiceEndpointPolicyListResultIterator) Next() error {
- return iter.NextWithContext(context.Background())
-}
-
-// NotDone returns true if the enumeration should be started or is not yet complete.
-func (iter ServiceEndpointPolicyListResultIterator) 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 ServiceEndpointPolicyListResultIterator) Response() ServiceEndpointPolicyListResult {
- 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 ServiceEndpointPolicyListResultIterator) Value() ServiceEndpointPolicy {
- if !iter.page.NotDone() {
- return ServiceEndpointPolicy{}
- }
- return iter.page.Values()[iter.i]
-}
-
-// Creates a new instance of the ServiceEndpointPolicyListResultIterator type.
-func NewServiceEndpointPolicyListResultIterator(page ServiceEndpointPolicyListResultPage) ServiceEndpointPolicyListResultIterator {
- return ServiceEndpointPolicyListResultIterator{page: page}
-}
-
-// IsEmpty returns true if the ListResult contains no values.
-func (seplr ServiceEndpointPolicyListResult) IsEmpty() bool {
- return seplr.Value == nil || len(*seplr.Value) == 0
-}
-
-// hasNextLink returns true if the NextLink is not empty.
-func (seplr ServiceEndpointPolicyListResult) hasNextLink() bool {
- return seplr.NextLink != nil && len(*seplr.NextLink) != 0
-}
-
-// serviceEndpointPolicyListResultPreparer prepares a request to retrieve the next set of results.
-// It returns nil if no more results exist.
-func (seplr ServiceEndpointPolicyListResult) serviceEndpointPolicyListResultPreparer(ctx context.Context) (*http.Request, error) {
- if !seplr.hasNextLink() {
- return nil, nil
- }
- return autorest.Prepare((&http.Request{}).WithContext(ctx),
- autorest.AsJSON(),
- autorest.AsGet(),
- autorest.WithBaseURL(to.String(seplr.NextLink)))
-}
-
-// ServiceEndpointPolicyListResultPage contains a page of ServiceEndpointPolicy values.
-type ServiceEndpointPolicyListResultPage struct {
- fn func(context.Context, ServiceEndpointPolicyListResult) (ServiceEndpointPolicyListResult, error)
- seplr ServiceEndpointPolicyListResult
-}
-
-// 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 *ServiceEndpointPolicyListResultPage) NextWithContext(ctx context.Context) (err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPolicyListResultPage.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.seplr)
- if err != nil {
- return err
- }
- page.seplr = 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 *ServiceEndpointPolicyListResultPage) Next() error {
- return page.NextWithContext(context.Background())
-}
-
-// NotDone returns true if the page enumeration should be started or is not yet complete.
-func (page ServiceEndpointPolicyListResultPage) NotDone() bool {
- return !page.seplr.IsEmpty()
-}
-
-// Response returns the raw server response from the last page request.
-func (page ServiceEndpointPolicyListResultPage) Response() ServiceEndpointPolicyListResult {
- return page.seplr
-}
-
-// Values returns the slice of values for the current page or nil if there are no values.
-func (page ServiceEndpointPolicyListResultPage) Values() []ServiceEndpointPolicy {
- if page.seplr.IsEmpty() {
- return nil
- }
- return *page.seplr.Value
-}
-
-// Creates a new instance of the ServiceEndpointPolicyListResultPage type.
-func NewServiceEndpointPolicyListResultPage(getNextPage func(context.Context, ServiceEndpointPolicyListResult) (ServiceEndpointPolicyListResult, error)) ServiceEndpointPolicyListResultPage {
- return ServiceEndpointPolicyListResultPage{fn: getNextPage}
-}
-
-// ServiceEndpointPolicyPropertiesFormat service Endpoint Policy resource.
-type ServiceEndpointPolicyPropertiesFormat struct {
- // ServiceEndpointPolicyDefinitions - A collection of service endpoint policy definitions of the service endpoint policy.
- ServiceEndpointPolicyDefinitions *[]ServiceEndpointPolicyDefinition `json:"serviceEndpointPolicyDefinitions,omitempty"`
- // Subnets - READ-ONLY; A collection of references to subnets.
- Subnets *[]Subnet `json:"subnets,omitempty"`
- // ResourceGUID - READ-ONLY; The resource GUID property of the service endpoint policy resource.
- ResourceGUID *string `json:"resourceGuid,omitempty"`
- // ProvisioningState - READ-ONLY; The provisioning state of the service endpoint policy. Possible values are: 'Updating', 'Deleting', and 'Failed'.
- ProvisioningState *string `json:"provisioningState,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for ServiceEndpointPolicyPropertiesFormat.
-func (seppf ServiceEndpointPolicyPropertiesFormat) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if seppf.ServiceEndpointPolicyDefinitions != nil {
- objectMap["serviceEndpointPolicyDefinitions"] = seppf.ServiceEndpointPolicyDefinitions
- }
- return json.Marshal(objectMap)
-}
-
-// ServiceEndpointPropertiesFormat the service endpoint properties.
-type ServiceEndpointPropertiesFormat struct {
- // Service - The type of the endpoint service.
- Service *string `json:"service,omitempty"`
- // Locations - A list of locations.
- Locations *[]string `json:"locations,omitempty"`
- // ProvisioningState - The provisioning state of the resource.
- ProvisioningState *string `json:"provisioningState,omitempty"`
-}
-
-// String ...
-type String struct {
- autorest.Response `json:"-"`
- Value *string `json:"value,omitempty"`
-}
-
-// Subnet subnet in a virtual network resource.
-type Subnet struct {
- autorest.Response `json:"-"`
- // SubnetPropertiesFormat - Properties of the subnet.
- *SubnetPropertiesFormat `json:"properties,omitempty"`
- // Name - 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"`
- // Etag - A unique read-only string that changes whenever the resource is updated.
- Etag *string `json:"etag,omitempty"`
- // ID - Resource ID.
- ID *string `json:"id,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for Subnet.
-func (s Subnet) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if s.SubnetPropertiesFormat != nil {
- objectMap["properties"] = s.SubnetPropertiesFormat
- }
- if s.Name != nil {
- objectMap["name"] = s.Name
- }
- if s.Etag != nil {
- objectMap["etag"] = s.Etag
- }
- if s.ID != nil {
- objectMap["id"] = s.ID
- }
- return json.Marshal(objectMap)
-}
-
-// UnmarshalJSON is the custom unmarshaler for Subnet struct.
-func (s *Subnet) 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 subnetPropertiesFormat SubnetPropertiesFormat
- err = json.Unmarshal(*v, &subnetPropertiesFormat)
- if err != nil {
- return err
- }
- s.SubnetPropertiesFormat = &subnetPropertiesFormat
- }
- case "name":
- if v != nil {
- var name string
- err = json.Unmarshal(*v, &name)
- if err != nil {
- return err
- }
- s.Name = &name
- }
- case "etag":
- if v != nil {
- var etag string
- err = json.Unmarshal(*v, &etag)
- if err != nil {
- return err
- }
- s.Etag = &etag
- }
- case "id":
- if v != nil {
- var ID string
- err = json.Unmarshal(*v, &ID)
- if err != nil {
- return err
- }
- s.ID = &ID
- }
- }
- }
-
- return nil
-}
-
-// SubnetAssociation network interface and its custom security rules.
-type SubnetAssociation struct {
- // ID - READ-ONLY; Subnet ID.
- ID *string `json:"id,omitempty"`
- // SecurityRules - Collection of custom security rules.
- SecurityRules *[]SecurityRule `json:"securityRules,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for SubnetAssociation.
-func (sa SubnetAssociation) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if sa.SecurityRules != nil {
- objectMap["securityRules"] = sa.SecurityRules
- }
- return json.Marshal(objectMap)
-}
-
-// SubnetListResult response for ListSubnets API service callRetrieves all subnet that belongs to a virtual
-// network
-type SubnetListResult struct {
- autorest.Response `json:"-"`
- // Value - The subnets in a virtual network.
- Value *[]Subnet `json:"value,omitempty"`
- // NextLink - The URL to get the next set of results.
- NextLink *string `json:"nextLink,omitempty"`
-}
-
-// SubnetListResultIterator provides access to a complete listing of Subnet values.
-type SubnetListResultIterator struct {
- i int
- page SubnetListResultPage
-}
-
-// 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 *SubnetListResultIterator) NextWithContext(ctx context.Context) (err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/SubnetListResultIterator.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 *SubnetListResultIterator) Next() error {
- return iter.NextWithContext(context.Background())
-}
-
-// NotDone returns true if the enumeration should be started or is not yet complete.
-func (iter SubnetListResultIterator) 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 SubnetListResultIterator) Response() SubnetListResult {
- 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 SubnetListResultIterator) Value() Subnet {
- if !iter.page.NotDone() {
- return Subnet{}
- }
- return iter.page.Values()[iter.i]
-}
-
-// Creates a new instance of the SubnetListResultIterator type.
-func NewSubnetListResultIterator(page SubnetListResultPage) SubnetListResultIterator {
- return SubnetListResultIterator{page: page}
-}
-
-// IsEmpty returns true if the ListResult contains no values.
-func (slr SubnetListResult) IsEmpty() bool {
- return slr.Value == nil || len(*slr.Value) == 0
-}
-
-// hasNextLink returns true if the NextLink is not empty.
-func (slr SubnetListResult) hasNextLink() bool {
- return slr.NextLink != nil && len(*slr.NextLink) != 0
-}
-
-// subnetListResultPreparer prepares a request to retrieve the next set of results.
-// It returns nil if no more results exist.
-func (slr SubnetListResult) subnetListResultPreparer(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)))
-}
-
-// SubnetListResultPage contains a page of Subnet values.
-type SubnetListResultPage struct {
- fn func(context.Context, SubnetListResult) (SubnetListResult, error)
- slr SubnetListResult
-}
-
-// 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 *SubnetListResultPage) NextWithContext(ctx context.Context) (err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/SubnetListResultPage.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 *SubnetListResultPage) Next() error {
- return page.NextWithContext(context.Background())
-}
-
-// NotDone returns true if the page enumeration should be started or is not yet complete.
-func (page SubnetListResultPage) NotDone() bool {
- return !page.slr.IsEmpty()
-}
-
-// Response returns the raw server response from the last page request.
-func (page SubnetListResultPage) Response() SubnetListResult {
- return page.slr
-}
-
-// Values returns the slice of values for the current page or nil if there are no values.
-func (page SubnetListResultPage) Values() []Subnet {
- if page.slr.IsEmpty() {
- return nil
- }
- return *page.slr.Value
-}
-
-// Creates a new instance of the SubnetListResultPage type.
-func NewSubnetListResultPage(getNextPage func(context.Context, SubnetListResult) (SubnetListResult, error)) SubnetListResultPage {
- return SubnetListResultPage{fn: getNextPage}
-}
-
-// SubnetPropertiesFormat properties of the subnet.
-type SubnetPropertiesFormat struct {
- // AddressPrefix - The address prefix for the subnet.
- AddressPrefix *string `json:"addressPrefix,omitempty"`
- // AddressPrefixes - List of address prefixes for the subnet.
- AddressPrefixes *[]string `json:"addressPrefixes,omitempty"`
- // NetworkSecurityGroup - The reference of the NetworkSecurityGroup resource.
- NetworkSecurityGroup *SecurityGroup `json:"networkSecurityGroup,omitempty"`
- // RouteTable - The reference of the RouteTable resource.
- RouteTable *RouteTable `json:"routeTable,omitempty"`
- // ServiceEndpoints - An array of service endpoints.
- ServiceEndpoints *[]ServiceEndpointPropertiesFormat `json:"serviceEndpoints,omitempty"`
- // ServiceEndpointPolicies - An array of service endpoint policies.
- ServiceEndpointPolicies *[]ServiceEndpointPolicy `json:"serviceEndpointPolicies,omitempty"`
- // InterfaceEndpoints - READ-ONLY; An array of references to interface endpoints
- InterfaceEndpoints *[]InterfaceEndpoint `json:"interfaceEndpoints,omitempty"`
- // IPConfigurations - READ-ONLY; Gets an array of references to the network interface IP configurations using subnet.
- IPConfigurations *[]IPConfiguration `json:"ipConfigurations,omitempty"`
- // IPConfigurationProfiles - READ-ONLY; Array of IP configuration profiles which reference this subnet.
- IPConfigurationProfiles *[]IPConfigurationProfile `json:"ipConfigurationProfiles,omitempty"`
- // ResourceNavigationLinks - Gets an array of references to the external resources using subnet.
- ResourceNavigationLinks *[]ResourceNavigationLink `json:"resourceNavigationLinks,omitempty"`
- // ServiceAssociationLinks - Gets an array of references to services injecting into this subnet.
- ServiceAssociationLinks *[]ServiceAssociationLink `json:"serviceAssociationLinks,omitempty"`
- // Delegations - Gets an array of references to the delegations on the subnet.
- Delegations *[]Delegation `json:"delegations,omitempty"`
- // Purpose - READ-ONLY; A read-only string identifying the intention of use for this subnet based on delegations and other user-defined properties.
- Purpose *string `json:"purpose,omitempty"`
- // ProvisioningState - The provisioning state of the resource.
- ProvisioningState *string `json:"provisioningState,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for SubnetPropertiesFormat.
-func (spf SubnetPropertiesFormat) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if spf.AddressPrefix != nil {
- objectMap["addressPrefix"] = spf.AddressPrefix
- }
- if spf.AddressPrefixes != nil {
- objectMap["addressPrefixes"] = spf.AddressPrefixes
- }
- if spf.NetworkSecurityGroup != nil {
- objectMap["networkSecurityGroup"] = spf.NetworkSecurityGroup
- }
- if spf.RouteTable != nil {
- objectMap["routeTable"] = spf.RouteTable
- }
- if spf.ServiceEndpoints != nil {
- objectMap["serviceEndpoints"] = spf.ServiceEndpoints
- }
- if spf.ServiceEndpointPolicies != nil {
- objectMap["serviceEndpointPolicies"] = spf.ServiceEndpointPolicies
- }
- if spf.ResourceNavigationLinks != nil {
- objectMap["resourceNavigationLinks"] = spf.ResourceNavigationLinks
- }
- if spf.ServiceAssociationLinks != nil {
- objectMap["serviceAssociationLinks"] = spf.ServiceAssociationLinks
- }
- if spf.Delegations != nil {
- objectMap["delegations"] = spf.Delegations
- }
- if spf.ProvisioningState != nil {
- objectMap["provisioningState"] = spf.ProvisioningState
- }
- return json.Marshal(objectMap)
-}
-
-// SubnetsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
-type SubnetsCreateOrUpdateFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *SubnetsCreateOrUpdateFuture) Result(client SubnetsClient) (s Subnet, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SubnetsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.SubnetsCreateOrUpdateFuture")
- 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, "network.SubnetsCreateOrUpdateFuture", "Result", s.Response.Response, "Failure responding to request")
- }
- }
- return
-}
-
-// SubnetsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
-type SubnetsDeleteFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *SubnetsDeleteFuture) Result(client SubnetsClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SubnetsDeleteFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.SubnetsDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
-}
-
-// SubnetsPrepareNetworkPoliciesFuture an abstraction for monitoring and retrieving the results of a
-// long-running operation.
-type SubnetsPrepareNetworkPoliciesFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *SubnetsPrepareNetworkPoliciesFuture) Result(client SubnetsClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.SubnetsPrepareNetworkPoliciesFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.SubnetsPrepareNetworkPoliciesFuture")
- return
- }
- ar.Response = future.Response()
- return
-}
-
-// SubResource reference to another subresource.
-type SubResource struct {
- // ID - Resource ID.
- ID *string `json:"id,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)
-}
-
-// Topology topology of the specified resource group.
-type Topology struct {
- autorest.Response `json:"-"`
- // ID - READ-ONLY; GUID representing the operation id.
- ID *string `json:"id,omitempty"`
- // CreatedDateTime - READ-ONLY; The datetime when the topology was initially created for the resource group.
- CreatedDateTime *date.Time `json:"createdDateTime,omitempty"`
- // LastModified - READ-ONLY; The datetime when the topology was last modified.
- LastModified *date.Time `json:"lastModified,omitempty"`
- Resources *[]TopologyResource `json:"resources,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for Topology.
-func (t Topology) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if t.Resources != nil {
- objectMap["resources"] = t.Resources
- }
- return json.Marshal(objectMap)
-}
-
-// TopologyAssociation resources that have an association with the parent resource.
-type TopologyAssociation struct {
- // Name - The name of the resource that is associated with the parent resource.
- Name *string `json:"name,omitempty"`
- // ResourceID - The ID of the resource that is associated with the parent resource.
- ResourceID *string `json:"resourceId,omitempty"`
- // AssociationType - The association type of the child resource to the parent resource. Possible values include: 'Associated', 'Contains'
- AssociationType AssociationType `json:"associationType,omitempty"`
-}
-
-// TopologyParameters parameters that define the representation of topology.
-type TopologyParameters struct {
- // TargetResourceGroupName - The name of the target resource group to perform topology on.
- TargetResourceGroupName *string `json:"targetResourceGroupName,omitempty"`
- // TargetVirtualNetwork - The reference of the Virtual Network resource.
- TargetVirtualNetwork *SubResource `json:"targetVirtualNetwork,omitempty"`
- // TargetSubnet - The reference of the Subnet resource.
- TargetSubnet *SubResource `json:"targetSubnet,omitempty"`
-}
-
-// TopologyResource the network resource topology information for the given resource group.
-type TopologyResource struct {
- // Name - Name of the resource.
- Name *string `json:"name,omitempty"`
- // ID - ID of the resource.
- ID *string `json:"id,omitempty"`
- // Location - Resource location.
- Location *string `json:"location,omitempty"`
- // Associations - Holds the associations the resource has with other resources in the resource group.
- Associations *[]TopologyAssociation `json:"associations,omitempty"`
-}
-
-// TrafficAnalyticsConfigurationProperties parameters that define the configuration of traffic analytics.
-type TrafficAnalyticsConfigurationProperties struct {
- // Enabled - Flag to enable/disable traffic analytics.
- Enabled *bool `json:"enabled,omitempty"`
- // WorkspaceID - The resource guid of the attached workspace
- WorkspaceID *string `json:"workspaceId,omitempty"`
- // WorkspaceRegion - The location of the attached workspace
- WorkspaceRegion *string `json:"workspaceRegion,omitempty"`
- // WorkspaceResourceID - Resource Id of the attached workspace
- WorkspaceResourceID *string `json:"workspaceResourceId,omitempty"`
- // TrafficAnalyticsInterval - The interval in minutes which would decide how frequently TA service should do flow analytics
- TrafficAnalyticsInterval *int32 `json:"trafficAnalyticsInterval,omitempty"`
-}
-
-// TrafficAnalyticsProperties parameters that define the configuration of traffic analytics.
-type TrafficAnalyticsProperties struct {
- NetworkWatcherFlowAnalyticsConfiguration *TrafficAnalyticsConfigurationProperties `json:"networkWatcherFlowAnalyticsConfiguration,omitempty"`
-}
-
-// TroubleshootingDetails information gained from troubleshooting of specified resource.
-type TroubleshootingDetails struct {
- // ID - The id of the get troubleshoot operation.
- ID *string `json:"id,omitempty"`
- // ReasonType - Reason type of failure.
- ReasonType *string `json:"reasonType,omitempty"`
- // Summary - A summary of troubleshooting.
- Summary *string `json:"summary,omitempty"`
- // Detail - Details on troubleshooting results.
- Detail *string `json:"detail,omitempty"`
- // RecommendedActions - List of recommended actions.
- RecommendedActions *[]TroubleshootingRecommendedActions `json:"recommendedActions,omitempty"`
-}
-
-// TroubleshootingParameters parameters that define the resource to troubleshoot.
-type TroubleshootingParameters struct {
- // TargetResourceID - The target resource to troubleshoot.
- TargetResourceID *string `json:"targetResourceId,omitempty"`
- *TroubleshootingProperties `json:"properties,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for TroubleshootingParameters.
-func (tp TroubleshootingParameters) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if tp.TargetResourceID != nil {
- objectMap["targetResourceId"] = tp.TargetResourceID
- }
- if tp.TroubleshootingProperties != nil {
- objectMap["properties"] = tp.TroubleshootingProperties
- }
- return json.Marshal(objectMap)
-}
-
-// UnmarshalJSON is the custom unmarshaler for TroubleshootingParameters struct.
-func (tp *TroubleshootingParameters) 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 "targetResourceId":
- if v != nil {
- var targetResourceID string
- err = json.Unmarshal(*v, &targetResourceID)
- if err != nil {
- return err
- }
- tp.TargetResourceID = &targetResourceID
- }
- case "properties":
- if v != nil {
- var troubleshootingProperties TroubleshootingProperties
- err = json.Unmarshal(*v, &troubleshootingProperties)
- if err != nil {
- return err
- }
- tp.TroubleshootingProperties = &troubleshootingProperties
- }
- }
- }
-
- return nil
-}
-
-// TroubleshootingProperties storage location provided for troubleshoot.
-type TroubleshootingProperties struct {
- // StorageID - The ID for the storage account to save the troubleshoot result.
- StorageID *string `json:"storageId,omitempty"`
- // StoragePath - The path to the blob to save the troubleshoot result in.
- StoragePath *string `json:"storagePath,omitempty"`
-}
-
-// TroubleshootingRecommendedActions recommended actions based on discovered issues.
-type TroubleshootingRecommendedActions struct {
- // ActionID - ID of the recommended action.
- ActionID *string `json:"actionId,omitempty"`
- // ActionText - Description of recommended actions.
- ActionText *string `json:"actionText,omitempty"`
- // ActionURI - The uri linking to a documentation for the recommended troubleshooting actions.
- ActionURI *string `json:"actionUri,omitempty"`
- // ActionURIText - The information from the URI for the recommended troubleshooting actions.
- ActionURIText *string `json:"actionUriText,omitempty"`
-}
-
-// TroubleshootingResult troubleshooting information gained from specified resource.
-type TroubleshootingResult struct {
- autorest.Response `json:"-"`
- // StartTime - The start time of the troubleshooting.
- StartTime *date.Time `json:"startTime,omitempty"`
- // EndTime - The end time of the troubleshooting.
- EndTime *date.Time `json:"endTime,omitempty"`
- // Code - The result code of the troubleshooting.
- Code *string `json:"code,omitempty"`
- // Results - Information from troubleshooting.
- Results *[]TroubleshootingDetails `json:"results,omitempty"`
-}
-
-// TunnelConnectionHealth virtualNetworkGatewayConnection properties
-type TunnelConnectionHealth struct {
- // Tunnel - READ-ONLY; Tunnel name.
- Tunnel *string `json:"tunnel,omitempty"`
- // ConnectionStatus - READ-ONLY; Virtual network Gateway connection status. Possible values include: 'VirtualNetworkGatewayConnectionStatusUnknown', 'VirtualNetworkGatewayConnectionStatusConnecting', 'VirtualNetworkGatewayConnectionStatusConnected', 'VirtualNetworkGatewayConnectionStatusNotConnected'
- ConnectionStatus VirtualNetworkGatewayConnectionStatus `json:"connectionStatus,omitempty"`
- // IngressBytesTransferred - READ-ONLY; The Ingress Bytes Transferred in this connection
- IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"`
- // EgressBytesTransferred - READ-ONLY; The Egress Bytes Transferred in this connection
- EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"`
- // LastConnectionEstablishedUtcTime - READ-ONLY; The time at which connection was established in Utc format.
- LastConnectionEstablishedUtcTime *string `json:"lastConnectionEstablishedUtcTime,omitempty"`
-}
-
-// Usage describes network resource usage.
-type Usage struct {
- // ID - READ-ONLY; Resource identifier.
- ID *string `json:"id,omitempty"`
- // Unit - An enum describing the unit of measurement.
- Unit *string `json:"unit,omitempty"`
- // CurrentValue - The current value of the usage.
- CurrentValue *int64 `json:"currentValue,omitempty"`
- // Limit - The limit of usage.
- Limit *int64 `json:"limit,omitempty"`
- // Name - The name of the type of usage.
- Name *UsageName `json:"name,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for Usage.
-func (u Usage) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if u.Unit != nil {
- objectMap["unit"] = u.Unit
- }
- if u.CurrentValue != nil {
- objectMap["currentValue"] = u.CurrentValue
- }
- if u.Limit != nil {
- objectMap["limit"] = u.Limit
- }
- if u.Name != nil {
- objectMap["name"] = u.Name
- }
- return json.Marshal(objectMap)
-}
-
-// UsageName the usage names.
-type UsageName struct {
- // Value - A string describing the resource name.
- Value *string `json:"value,omitempty"`
- // LocalizedValue - A localized string describing the resource name.
- LocalizedValue *string `json:"localizedValue,omitempty"`
-}
-
-// UsagesListResult the list usages operation response.
-type UsagesListResult struct {
- autorest.Response `json:"-"`
- // Value - The list network resource usages.
- Value *[]Usage `json:"value,omitempty"`
- // NextLink - URL to get the next set of results.
- NextLink *string `json:"nextLink,omitempty"`
-}
-
-// UsagesListResultIterator provides access to a complete listing of Usage values.
-type UsagesListResultIterator struct {
- i int
- page UsagesListResultPage
-}
-
-// 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 *UsagesListResultIterator) NextWithContext(ctx context.Context) (err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/UsagesListResultIterator.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 *UsagesListResultIterator) Next() error {
- return iter.NextWithContext(context.Background())
-}
-
-// NotDone returns true if the enumeration should be started or is not yet complete.
-func (iter UsagesListResultIterator) 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 UsagesListResultIterator) Response() UsagesListResult {
- 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 UsagesListResultIterator) Value() Usage {
- if !iter.page.NotDone() {
- return Usage{}
- }
- return iter.page.Values()[iter.i]
-}
-
-// Creates a new instance of the UsagesListResultIterator type.
-func NewUsagesListResultIterator(page UsagesListResultPage) UsagesListResultIterator {
- return UsagesListResultIterator{page: page}
-}
-
-// IsEmpty returns true if the ListResult contains no values.
-func (ulr UsagesListResult) IsEmpty() bool {
- return ulr.Value == nil || len(*ulr.Value) == 0
-}
-
-// hasNextLink returns true if the NextLink is not empty.
-func (ulr UsagesListResult) hasNextLink() bool {
- return ulr.NextLink != nil && len(*ulr.NextLink) != 0
-}
-
-// usagesListResultPreparer prepares a request to retrieve the next set of results.
-// It returns nil if no more results exist.
-func (ulr UsagesListResult) usagesListResultPreparer(ctx context.Context) (*http.Request, error) {
- if !ulr.hasNextLink() {
- return nil, nil
- }
- return autorest.Prepare((&http.Request{}).WithContext(ctx),
- autorest.AsJSON(),
- autorest.AsGet(),
- autorest.WithBaseURL(to.String(ulr.NextLink)))
-}
-
-// UsagesListResultPage contains a page of Usage values.
-type UsagesListResultPage struct {
- fn func(context.Context, UsagesListResult) (UsagesListResult, error)
- ulr UsagesListResult
-}
-
-// 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 *UsagesListResultPage) NextWithContext(ctx context.Context) (err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/UsagesListResultPage.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.ulr)
- if err != nil {
- return err
- }
- page.ulr = 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 *UsagesListResultPage) Next() error {
- return page.NextWithContext(context.Background())
-}
-
-// NotDone returns true if the page enumeration should be started or is not yet complete.
-func (page UsagesListResultPage) NotDone() bool {
- return !page.ulr.IsEmpty()
-}
-
-// Response returns the raw server response from the last page request.
-func (page UsagesListResultPage) Response() UsagesListResult {
- return page.ulr
-}
-
-// Values returns the slice of values for the current page or nil if there are no values.
-func (page UsagesListResultPage) Values() []Usage {
- if page.ulr.IsEmpty() {
- return nil
- }
- return *page.ulr.Value
-}
-
-// Creates a new instance of the UsagesListResultPage type.
-func NewUsagesListResultPage(getNextPage func(context.Context, UsagesListResult) (UsagesListResult, error)) UsagesListResultPage {
- return UsagesListResultPage{fn: getNextPage}
-}
-
-// VerificationIPFlowParameters parameters that define the IP flow to be verified.
-type VerificationIPFlowParameters struct {
- // TargetResourceID - The ID of the target resource to perform next-hop on.
- TargetResourceID *string `json:"targetResourceId,omitempty"`
- // Direction - The direction of the packet represented as a 5-tuple. Possible values include: 'Inbound', 'Outbound'
- Direction Direction `json:"direction,omitempty"`
- // Protocol - Protocol to be verified on. Possible values include: 'IPFlowProtocolTCP', 'IPFlowProtocolUDP'
- Protocol IPFlowProtocol `json:"protocol,omitempty"`
- // LocalPort - The local port. Acceptable values are a single integer in the range (0-65535). Support for * for the source port, which depends on the direction.
- LocalPort *string `json:"localPort,omitempty"`
- // RemotePort - The remote port. Acceptable values are a single integer in the range (0-65535). Support for * for the source port, which depends on the direction.
- RemotePort *string `json:"remotePort,omitempty"`
- // LocalIPAddress - The local IP address. Acceptable values are valid IPv4 addresses.
- LocalIPAddress *string `json:"localIPAddress,omitempty"`
- // RemoteIPAddress - The remote IP address. Acceptable values are valid IPv4 addresses.
- RemoteIPAddress *string `json:"remoteIPAddress,omitempty"`
- // TargetNicResourceID - The NIC ID. (If VM has multiple NICs and IP forwarding is enabled on any of them, then this parameter must be specified. Otherwise optional).
- TargetNicResourceID *string `json:"targetNicResourceId,omitempty"`
-}
-
-// VerificationIPFlowResult results of IP flow verification on the target resource.
-type VerificationIPFlowResult struct {
- autorest.Response `json:"-"`
- // Access - Indicates whether the traffic is allowed or denied. Possible values include: 'Allow', 'Deny'
- Access Access `json:"access,omitempty"`
- // RuleName - Name of the rule. If input is not matched against any security rule, it is not displayed.
- RuleName *string `json:"ruleName,omitempty"`
-}
-
-// VirtualHub virtualHub Resource.
-type VirtualHub struct {
- autorest.Response `json:"-"`
- *VirtualHubProperties `json:"properties,omitempty"`
- // Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
- Etag *string `json:"etag,omitempty"`
- // ID - 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 VirtualHub.
-func (vh VirtualHub) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if vh.VirtualHubProperties != nil {
- objectMap["properties"] = vh.VirtualHubProperties
- }
- if vh.ID != nil {
- objectMap["id"] = vh.ID
- }
- if vh.Location != nil {
- objectMap["location"] = vh.Location
- }
- if vh.Tags != nil {
- objectMap["tags"] = vh.Tags
- }
- return json.Marshal(objectMap)
-}
-
-// UnmarshalJSON is the custom unmarshaler for VirtualHub struct.
-func (vh *VirtualHub) 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 virtualHubProperties VirtualHubProperties
- err = json.Unmarshal(*v, &virtualHubProperties)
- if err != nil {
- return err
- }
- vh.VirtualHubProperties = &virtualHubProperties
- }
- case "etag":
- if v != nil {
- var etag string
- err = json.Unmarshal(*v, &etag)
- if err != nil {
- return err
- }
- vh.Etag = &etag
- }
- case "id":
- if v != nil {
- var ID string
- err = json.Unmarshal(*v, &ID)
- if err != nil {
- return err
- }
- vh.ID = &ID
- }
- case "name":
- if v != nil {
- var name string
- err = json.Unmarshal(*v, &name)
- if err != nil {
- return err
- }
- vh.Name = &name
- }
- case "type":
- if v != nil {
- var typeVar string
- err = json.Unmarshal(*v, &typeVar)
- if err != nil {
- return err
- }
- vh.Type = &typeVar
- }
- case "location":
- if v != nil {
- var location string
- err = json.Unmarshal(*v, &location)
- if err != nil {
- return err
- }
- vh.Location = &location
- }
- case "tags":
- if v != nil {
- var tags map[string]*string
- err = json.Unmarshal(*v, &tags)
- if err != nil {
- return err
- }
- vh.Tags = tags
- }
- }
- }
-
- return nil
-}
-
-// VirtualHubID virtual Hub identifier.
-type VirtualHubID struct {
- // ID - The resource URI for the Virtual Hub where the ExpressRoute gateway is or will be deployed. The Virtual Hub resource and the ExpressRoute gateway resource reside in the same subscription.
- ID *string `json:"id,omitempty"`
-}
-
-// VirtualHubProperties parameters for VirtualHub
-type VirtualHubProperties struct {
- // VirtualWan - The VirtualWAN to which the VirtualHub belongs
- VirtualWan *SubResource `json:"virtualWan,omitempty"`
- // VpnGateway - The VpnGateway associated with this VirtualHub
- VpnGateway *SubResource `json:"vpnGateway,omitempty"`
- // P2SVpnGateway - The P2SVpnGateway associated with this VirtualHub
- P2SVpnGateway *SubResource `json:"p2SVpnGateway,omitempty"`
- // ExpressRouteGateway - The expressRouteGateway associated with this VirtualHub
- ExpressRouteGateway *SubResource `json:"expressRouteGateway,omitempty"`
- // VirtualNetworkConnections - List of all vnet connections with this VirtualHub.
- VirtualNetworkConnections *[]HubVirtualNetworkConnection `json:"virtualNetworkConnections,omitempty"`
- // AddressPrefix - Address-prefix for this VirtualHub.
- AddressPrefix *string `json:"addressPrefix,omitempty"`
- // RouteTable - The routeTable associated with this virtual hub.
- RouteTable *VirtualHubRouteTable `json:"routeTable,omitempty"`
- // ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
- ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
-}
-
-// VirtualHubRoute virtualHub route
-type VirtualHubRoute struct {
- // AddressPrefixes - List of all addressPrefixes.
- AddressPrefixes *[]string `json:"addressPrefixes,omitempty"`
- // NextHopIPAddress - NextHop ip address.
- NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"`
-}
-
-// VirtualHubRouteTable virtualHub route table
-type VirtualHubRouteTable struct {
- // Routes - List of all routes.
- Routes *[]VirtualHubRoute `json:"routes,omitempty"`
-}
-
-// VirtualHubsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
-type VirtualHubsCreateOrUpdateFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *VirtualHubsCreateOrUpdateFuture) Result(client VirtualHubsClient) (vh VirtualHub, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualHubsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.VirtualHubsCreateOrUpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if vh.Response.Response, err = future.GetResult(sender); err == nil && vh.Response.Response.StatusCode != http.StatusNoContent {
- vh, err = client.CreateOrUpdateResponder(vh.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualHubsCreateOrUpdateFuture", "Result", vh.Response.Response, "Failure responding to request")
- }
- }
- return
-}
-
-// VirtualHubsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
-type VirtualHubsDeleteFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *VirtualHubsDeleteFuture) Result(client VirtualHubsClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualHubsDeleteFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.VirtualHubsDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
-}
-
-// VirtualHubsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
-type VirtualHubsUpdateTagsFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *VirtualHubsUpdateTagsFuture) Result(client VirtualHubsClient) (vh VirtualHub, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualHubsUpdateTagsFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.VirtualHubsUpdateTagsFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if vh.Response.Response, err = future.GetResult(sender); err == nil && vh.Response.Response.StatusCode != http.StatusNoContent {
- vh, err = client.UpdateTagsResponder(vh.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualHubsUpdateTagsFuture", "Result", vh.Response.Response, "Failure responding to request")
- }
- }
- return
-}
-
-// VirtualNetwork virtual Network resource.
-type VirtualNetwork struct {
- autorest.Response `json:"-"`
- // VirtualNetworkPropertiesFormat - Properties of the virtual network.
- *VirtualNetworkPropertiesFormat `json:"properties,omitempty"`
- // Etag - Gets a unique read-only string that changes whenever the resource is updated.
- Etag *string `json:"etag,omitempty"`
- // ID - 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 VirtualNetwork.
-func (vn VirtualNetwork) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if vn.VirtualNetworkPropertiesFormat != nil {
- objectMap["properties"] = vn.VirtualNetworkPropertiesFormat
- }
- if vn.Etag != nil {
- objectMap["etag"] = vn.Etag
- }
- if vn.ID != nil {
- objectMap["id"] = vn.ID
- }
- if vn.Location != nil {
- objectMap["location"] = vn.Location
- }
- if vn.Tags != nil {
- objectMap["tags"] = vn.Tags
- }
- return json.Marshal(objectMap)
-}
-
-// UnmarshalJSON is the custom unmarshaler for VirtualNetwork struct.
-func (vn *VirtualNetwork) 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 virtualNetworkPropertiesFormat VirtualNetworkPropertiesFormat
- err = json.Unmarshal(*v, &virtualNetworkPropertiesFormat)
- if err != nil {
- return err
- }
- vn.VirtualNetworkPropertiesFormat = &virtualNetworkPropertiesFormat
- }
- case "etag":
- if v != nil {
- var etag string
- err = json.Unmarshal(*v, &etag)
- if err != nil {
- return err
- }
- vn.Etag = &etag
- }
- case "id":
- if v != nil {
- var ID string
- err = json.Unmarshal(*v, &ID)
- if err != nil {
- return err
- }
- vn.ID = &ID
- }
- case "name":
- if v != nil {
- var name string
- err = json.Unmarshal(*v, &name)
- if err != nil {
- return err
- }
- vn.Name = &name
- }
- case "type":
- if v != nil {
- var typeVar string
- err = json.Unmarshal(*v, &typeVar)
- if err != nil {
- return err
- }
- vn.Type = &typeVar
- }
- case "location":
- if v != nil {
- var location string
- err = json.Unmarshal(*v, &location)
- if err != nil {
- return err
- }
- vn.Location = &location
- }
- case "tags":
- if v != nil {
- var tags map[string]*string
- err = json.Unmarshal(*v, &tags)
- if err != nil {
- return err
- }
- vn.Tags = tags
- }
- }
- }
-
- return nil
-}
-
-// VirtualNetworkConnectionGatewayReference a reference to VirtualNetworkGateway or LocalNetworkGateway
-// resource.
-type VirtualNetworkConnectionGatewayReference struct {
- // ID - The ID of VirtualNetworkGateway or LocalNetworkGateway resource.
- ID *string `json:"id,omitempty"`
-}
-
-// VirtualNetworkGateway a common class for general resource information
-type VirtualNetworkGateway struct {
- autorest.Response `json:"-"`
- // VirtualNetworkGatewayPropertiesFormat - Properties of the virtual network gateway.
- *VirtualNetworkGatewayPropertiesFormat `json:"properties,omitempty"`
- // Etag - Gets a unique read-only string that changes whenever the resource is updated.
- Etag *string `json:"etag,omitempty"`
- // ID - 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 VirtualNetworkGateway.
-func (vng VirtualNetworkGateway) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if vng.VirtualNetworkGatewayPropertiesFormat != nil {
- objectMap["properties"] = vng.VirtualNetworkGatewayPropertiesFormat
- }
- if vng.Etag != nil {
- objectMap["etag"] = vng.Etag
- }
- if vng.ID != nil {
- objectMap["id"] = vng.ID
- }
- if vng.Location != nil {
- objectMap["location"] = vng.Location
- }
- if vng.Tags != nil {
- objectMap["tags"] = vng.Tags
- }
- return json.Marshal(objectMap)
-}
-
-// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGateway struct.
-func (vng *VirtualNetworkGateway) 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 virtualNetworkGatewayPropertiesFormat VirtualNetworkGatewayPropertiesFormat
- err = json.Unmarshal(*v, &virtualNetworkGatewayPropertiesFormat)
- if err != nil {
- return err
- }
- vng.VirtualNetworkGatewayPropertiesFormat = &virtualNetworkGatewayPropertiesFormat
- }
- case "etag":
- if v != nil {
- var etag string
- err = json.Unmarshal(*v, &etag)
- if err != nil {
- return err
- }
- vng.Etag = &etag
- }
- case "id":
- if v != nil {
- var ID string
- err = json.Unmarshal(*v, &ID)
- if err != nil {
- return err
- }
- vng.ID = &ID
- }
- case "name":
- if v != nil {
- var name string
- err = json.Unmarshal(*v, &name)
- if err != nil {
- return err
- }
- vng.Name = &name
- }
- case "type":
- if v != nil {
- var typeVar string
- err = json.Unmarshal(*v, &typeVar)
- if err != nil {
- return err
- }
- vng.Type = &typeVar
- }
- case "location":
- if v != nil {
- var location string
- err = json.Unmarshal(*v, &location)
- if err != nil {
- return err
- }
- vng.Location = &location
- }
- case "tags":
- if v != nil {
- var tags map[string]*string
- err = json.Unmarshal(*v, &tags)
- if err != nil {
- return err
- }
- vng.Tags = tags
- }
- }
- }
-
- return nil
-}
-
-// VirtualNetworkGatewayConnection a common class for general resource information
-type VirtualNetworkGatewayConnection struct {
- autorest.Response `json:"-"`
- // VirtualNetworkGatewayConnectionPropertiesFormat - Properties of the virtual network gateway connection.
- *VirtualNetworkGatewayConnectionPropertiesFormat `json:"properties,omitempty"`
- // Etag - Gets a unique read-only string that changes whenever the resource is updated.
- Etag *string `json:"etag,omitempty"`
- // ID - 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 VirtualNetworkGatewayConnection.
-func (vngc VirtualNetworkGatewayConnection) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if vngc.VirtualNetworkGatewayConnectionPropertiesFormat != nil {
- objectMap["properties"] = vngc.VirtualNetworkGatewayConnectionPropertiesFormat
- }
- if vngc.Etag != nil {
- objectMap["etag"] = vngc.Etag
- }
- if vngc.ID != nil {
- objectMap["id"] = vngc.ID
- }
- if vngc.Location != nil {
- objectMap["location"] = vngc.Location
- }
- if vngc.Tags != nil {
- objectMap["tags"] = vngc.Tags
- }
- return json.Marshal(objectMap)
-}
-
-// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGatewayConnection struct.
-func (vngc *VirtualNetworkGatewayConnection) 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 virtualNetworkGatewayConnectionPropertiesFormat VirtualNetworkGatewayConnectionPropertiesFormat
- err = json.Unmarshal(*v, &virtualNetworkGatewayConnectionPropertiesFormat)
- if err != nil {
- return err
- }
- vngc.VirtualNetworkGatewayConnectionPropertiesFormat = &virtualNetworkGatewayConnectionPropertiesFormat
- }
- case "etag":
- if v != nil {
- var etag string
- err = json.Unmarshal(*v, &etag)
- if err != nil {
- return err
- }
- vngc.Etag = &etag
- }
- case "id":
- if v != nil {
- var ID string
- err = json.Unmarshal(*v, &ID)
- if err != nil {
- return err
- }
- vngc.ID = &ID
- }
- case "name":
- if v != nil {
- var name string
- err = json.Unmarshal(*v, &name)
- if err != nil {
- return err
- }
- vngc.Name = &name
- }
- case "type":
- if v != nil {
- var typeVar string
- err = json.Unmarshal(*v, &typeVar)
- if err != nil {
- return err
- }
- vngc.Type = &typeVar
- }
- case "location":
- if v != nil {
- var location string
- err = json.Unmarshal(*v, &location)
- if err != nil {
- return err
- }
- vngc.Location = &location
- }
- case "tags":
- if v != nil {
- var tags map[string]*string
- err = json.Unmarshal(*v, &tags)
- if err != nil {
- return err
- }
- vngc.Tags = tags
- }
- }
- }
-
- return nil
-}
-
-// VirtualNetworkGatewayConnectionListEntity a common class for general resource information
-type VirtualNetworkGatewayConnectionListEntity struct {
- // VirtualNetworkGatewayConnectionListEntityPropertiesFormat - Properties of the virtual network gateway connection.
- *VirtualNetworkGatewayConnectionListEntityPropertiesFormat `json:"properties,omitempty"`
- // Etag - Gets a unique read-only string that changes whenever the resource is updated.
- Etag *string `json:"etag,omitempty"`
- // ID - 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 VirtualNetworkGatewayConnectionListEntity.
-func (vngcle VirtualNetworkGatewayConnectionListEntity) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if vngcle.VirtualNetworkGatewayConnectionListEntityPropertiesFormat != nil {
- objectMap["properties"] = vngcle.VirtualNetworkGatewayConnectionListEntityPropertiesFormat
- }
- if vngcle.Etag != nil {
- objectMap["etag"] = vngcle.Etag
- }
- if vngcle.ID != nil {
- objectMap["id"] = vngcle.ID
- }
- if vngcle.Location != nil {
- objectMap["location"] = vngcle.Location
- }
- if vngcle.Tags != nil {
- objectMap["tags"] = vngcle.Tags
- }
- return json.Marshal(objectMap)
-}
-
-// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGatewayConnectionListEntity struct.
-func (vngcle *VirtualNetworkGatewayConnectionListEntity) 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 virtualNetworkGatewayConnectionListEntityPropertiesFormat VirtualNetworkGatewayConnectionListEntityPropertiesFormat
- err = json.Unmarshal(*v, &virtualNetworkGatewayConnectionListEntityPropertiesFormat)
- if err != nil {
- return err
- }
- vngcle.VirtualNetworkGatewayConnectionListEntityPropertiesFormat = &virtualNetworkGatewayConnectionListEntityPropertiesFormat
- }
- case "etag":
- if v != nil {
- var etag string
- err = json.Unmarshal(*v, &etag)
- if err != nil {
- return err
- }
- vngcle.Etag = &etag
- }
- case "id":
- if v != nil {
- var ID string
- err = json.Unmarshal(*v, &ID)
- if err != nil {
- return err
- }
- vngcle.ID = &ID
- }
- case "name":
- if v != nil {
- var name string
- err = json.Unmarshal(*v, &name)
- if err != nil {
- return err
- }
- vngcle.Name = &name
- }
- case "type":
- if v != nil {
- var typeVar string
- err = json.Unmarshal(*v, &typeVar)
- if err != nil {
- return err
- }
- vngcle.Type = &typeVar
- }
- case "location":
- if v != nil {
- var location string
- err = json.Unmarshal(*v, &location)
- if err != nil {
- return err
- }
- vngcle.Location = &location
- }
- case "tags":
- if v != nil {
- var tags map[string]*string
- err = json.Unmarshal(*v, &tags)
- if err != nil {
- return err
- }
- vngcle.Tags = tags
- }
- }
- }
-
- return nil
-}
-
-// VirtualNetworkGatewayConnectionListEntityPropertiesFormat virtualNetworkGatewayConnection properties
-type VirtualNetworkGatewayConnectionListEntityPropertiesFormat struct {
- // AuthorizationKey - The authorizationKey.
- AuthorizationKey *string `json:"authorizationKey,omitempty"`
- // VirtualNetworkGateway1 - The reference to virtual network gateway resource.
- VirtualNetworkGateway1 *VirtualNetworkConnectionGatewayReference `json:"virtualNetworkGateway1,omitempty"`
- // VirtualNetworkGateway2 - The reference to virtual network gateway resource.
- VirtualNetworkGateway2 *VirtualNetworkConnectionGatewayReference `json:"virtualNetworkGateway2,omitempty"`
- // LocalNetworkGateway2 - The reference to local network gateway resource.
- LocalNetworkGateway2 *VirtualNetworkConnectionGatewayReference `json:"localNetworkGateway2,omitempty"`
- // ConnectionType - Gateway connection type. Possible values are: 'Ipsec','Vnet2Vnet','ExpressRoute', and 'VPNClient. Possible values include: 'IPsec', 'Vnet2Vnet', 'ExpressRoute', 'VPNClient'
- ConnectionType VirtualNetworkGatewayConnectionType `json:"connectionType,omitempty"`
- // ConnectionProtocol - Connection protocol used for this connection. Possible values include: 'IKEv2', 'IKEv1'
- ConnectionProtocol VirtualNetworkGatewayConnectionProtocol `json:"connectionProtocol,omitempty"`
- // RoutingWeight - The routing weight.
- RoutingWeight *int32 `json:"routingWeight,omitempty"`
- // SharedKey - The IPSec shared key.
- SharedKey *string `json:"sharedKey,omitempty"`
- // ConnectionStatus - READ-ONLY; Virtual network Gateway connection status. Possible values are 'Unknown', 'Connecting', 'Connected' and 'NotConnected'. Possible values include: 'VirtualNetworkGatewayConnectionStatusUnknown', 'VirtualNetworkGatewayConnectionStatusConnecting', 'VirtualNetworkGatewayConnectionStatusConnected', 'VirtualNetworkGatewayConnectionStatusNotConnected'
- ConnectionStatus VirtualNetworkGatewayConnectionStatus `json:"connectionStatus,omitempty"`
- // TunnelConnectionStatus - READ-ONLY; Collection of all tunnels' connection health status.
- TunnelConnectionStatus *[]TunnelConnectionHealth `json:"tunnelConnectionStatus,omitempty"`
- // EgressBytesTransferred - READ-ONLY; The egress bytes transferred in this connection.
- EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"`
- // IngressBytesTransferred - READ-ONLY; The ingress bytes transferred in this connection.
- IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"`
- // Peer - The reference to peerings resource.
- Peer *SubResource `json:"peer,omitempty"`
- // EnableBgp - EnableBgp flag
- EnableBgp *bool `json:"enableBgp,omitempty"`
- // UsePolicyBasedTrafficSelectors - Enable policy-based traffic selectors.
- UsePolicyBasedTrafficSelectors *bool `json:"usePolicyBasedTrafficSelectors,omitempty"`
- // IpsecPolicies - The IPSec Policies to be considered by this connection.
- IpsecPolicies *[]IpsecPolicy `json:"ipsecPolicies,omitempty"`
- // ResourceGUID - The resource GUID property of the VirtualNetworkGatewayConnection resource.
- ResourceGUID *string `json:"resourceGuid,omitempty"`
- // ProvisioningState - READ-ONLY; The provisioning state of the VirtualNetworkGatewayConnection resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
- ProvisioningState *string `json:"provisioningState,omitempty"`
- // ExpressRouteGatewayBypass - Bypass ExpressRoute Gateway for data forwarding
- ExpressRouteGatewayBypass *bool `json:"expressRouteGatewayBypass,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnectionListEntityPropertiesFormat.
-func (vngclepf VirtualNetworkGatewayConnectionListEntityPropertiesFormat) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if vngclepf.AuthorizationKey != nil {
- objectMap["authorizationKey"] = vngclepf.AuthorizationKey
- }
- if vngclepf.VirtualNetworkGateway1 != nil {
- objectMap["virtualNetworkGateway1"] = vngclepf.VirtualNetworkGateway1
- }
- if vngclepf.VirtualNetworkGateway2 != nil {
- objectMap["virtualNetworkGateway2"] = vngclepf.VirtualNetworkGateway2
- }
- if vngclepf.LocalNetworkGateway2 != nil {
- objectMap["localNetworkGateway2"] = vngclepf.LocalNetworkGateway2
- }
- if vngclepf.ConnectionType != "" {
- objectMap["connectionType"] = vngclepf.ConnectionType
- }
- if vngclepf.ConnectionProtocol != "" {
- objectMap["connectionProtocol"] = vngclepf.ConnectionProtocol
- }
- if vngclepf.RoutingWeight != nil {
- objectMap["routingWeight"] = vngclepf.RoutingWeight
- }
- if vngclepf.SharedKey != nil {
- objectMap["sharedKey"] = vngclepf.SharedKey
- }
- if vngclepf.Peer != nil {
- objectMap["peer"] = vngclepf.Peer
- }
- if vngclepf.EnableBgp != nil {
- objectMap["enableBgp"] = vngclepf.EnableBgp
- }
- if vngclepf.UsePolicyBasedTrafficSelectors != nil {
- objectMap["usePolicyBasedTrafficSelectors"] = vngclepf.UsePolicyBasedTrafficSelectors
- }
- if vngclepf.IpsecPolicies != nil {
- objectMap["ipsecPolicies"] = vngclepf.IpsecPolicies
- }
- if vngclepf.ResourceGUID != nil {
- objectMap["resourceGuid"] = vngclepf.ResourceGUID
- }
- if vngclepf.ExpressRouteGatewayBypass != nil {
- objectMap["expressRouteGatewayBypass"] = vngclepf.ExpressRouteGatewayBypass
- }
- return json.Marshal(objectMap)
-}
-
-// VirtualNetworkGatewayConnectionListResult response for the ListVirtualNetworkGatewayConnections API service
-// call
-type VirtualNetworkGatewayConnectionListResult struct {
- autorest.Response `json:"-"`
- // Value - Gets a list of VirtualNetworkGatewayConnection resources that exists in a resource group.
- Value *[]VirtualNetworkGatewayConnection `json:"value,omitempty"`
- // NextLink - READ-ONLY; The URL to get the next set of results.
- NextLink *string `json:"nextLink,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnectionListResult.
-func (vngclr VirtualNetworkGatewayConnectionListResult) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if vngclr.Value != nil {
- objectMap["value"] = vngclr.Value
- }
- return json.Marshal(objectMap)
-}
-
-// VirtualNetworkGatewayConnectionListResultIterator provides access to a complete listing of
-// VirtualNetworkGatewayConnection values.
-type VirtualNetworkGatewayConnectionListResultIterator struct {
- i int
- page VirtualNetworkGatewayConnectionListResultPage
-}
-
-// 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 *VirtualNetworkGatewayConnectionListResultIterator) NextWithContext(ctx context.Context) (err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayConnectionListResultIterator.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 *VirtualNetworkGatewayConnectionListResultIterator) Next() error {
- return iter.NextWithContext(context.Background())
-}
-
-// NotDone returns true if the enumeration should be started or is not yet complete.
-func (iter VirtualNetworkGatewayConnectionListResultIterator) 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 VirtualNetworkGatewayConnectionListResultIterator) Response() VirtualNetworkGatewayConnectionListResult {
- 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 VirtualNetworkGatewayConnectionListResultIterator) Value() VirtualNetworkGatewayConnection {
- if !iter.page.NotDone() {
- return VirtualNetworkGatewayConnection{}
- }
- return iter.page.Values()[iter.i]
-}
-
-// Creates a new instance of the VirtualNetworkGatewayConnectionListResultIterator type.
-func NewVirtualNetworkGatewayConnectionListResultIterator(page VirtualNetworkGatewayConnectionListResultPage) VirtualNetworkGatewayConnectionListResultIterator {
- return VirtualNetworkGatewayConnectionListResultIterator{page: page}
-}
-
-// IsEmpty returns true if the ListResult contains no values.
-func (vngclr VirtualNetworkGatewayConnectionListResult) IsEmpty() bool {
- return vngclr.Value == nil || len(*vngclr.Value) == 0
-}
-
-// hasNextLink returns true if the NextLink is not empty.
-func (vngclr VirtualNetworkGatewayConnectionListResult) hasNextLink() bool {
- return vngclr.NextLink != nil && len(*vngclr.NextLink) != 0
-}
-
-// virtualNetworkGatewayConnectionListResultPreparer prepares a request to retrieve the next set of results.
-// It returns nil if no more results exist.
-func (vngclr VirtualNetworkGatewayConnectionListResult) virtualNetworkGatewayConnectionListResultPreparer(ctx context.Context) (*http.Request, error) {
- if !vngclr.hasNextLink() {
- return nil, nil
- }
- return autorest.Prepare((&http.Request{}).WithContext(ctx),
- autorest.AsJSON(),
- autorest.AsGet(),
- autorest.WithBaseURL(to.String(vngclr.NextLink)))
-}
-
-// VirtualNetworkGatewayConnectionListResultPage contains a page of VirtualNetworkGatewayConnection values.
-type VirtualNetworkGatewayConnectionListResultPage struct {
- fn func(context.Context, VirtualNetworkGatewayConnectionListResult) (VirtualNetworkGatewayConnectionListResult, error)
- vngclr VirtualNetworkGatewayConnectionListResult
-}
-
-// 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 *VirtualNetworkGatewayConnectionListResultPage) NextWithContext(ctx context.Context) (err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayConnectionListResultPage.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.vngclr)
- if err != nil {
- return err
- }
- page.vngclr = 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 *VirtualNetworkGatewayConnectionListResultPage) Next() error {
- return page.NextWithContext(context.Background())
-}
-
-// NotDone returns true if the page enumeration should be started or is not yet complete.
-func (page VirtualNetworkGatewayConnectionListResultPage) NotDone() bool {
- return !page.vngclr.IsEmpty()
-}
-
-// Response returns the raw server response from the last page request.
-func (page VirtualNetworkGatewayConnectionListResultPage) Response() VirtualNetworkGatewayConnectionListResult {
- return page.vngclr
-}
-
-// Values returns the slice of values for the current page or nil if there are no values.
-func (page VirtualNetworkGatewayConnectionListResultPage) Values() []VirtualNetworkGatewayConnection {
- if page.vngclr.IsEmpty() {
- return nil
- }
- return *page.vngclr.Value
-}
-
-// Creates a new instance of the VirtualNetworkGatewayConnectionListResultPage type.
-func NewVirtualNetworkGatewayConnectionListResultPage(getNextPage func(context.Context, VirtualNetworkGatewayConnectionListResult) (VirtualNetworkGatewayConnectionListResult, error)) VirtualNetworkGatewayConnectionListResultPage {
- return VirtualNetworkGatewayConnectionListResultPage{fn: getNextPage}
-}
-
-// VirtualNetworkGatewayConnectionPropertiesFormat virtualNetworkGatewayConnection properties
-type VirtualNetworkGatewayConnectionPropertiesFormat struct {
- // AuthorizationKey - The authorizationKey.
- AuthorizationKey *string `json:"authorizationKey,omitempty"`
- // VirtualNetworkGateway1 - The reference to virtual network gateway resource.
- VirtualNetworkGateway1 *VirtualNetworkGateway `json:"virtualNetworkGateway1,omitempty"`
- // VirtualNetworkGateway2 - The reference to virtual network gateway resource.
- VirtualNetworkGateway2 *VirtualNetworkGateway `json:"virtualNetworkGateway2,omitempty"`
- // LocalNetworkGateway2 - The reference to local network gateway resource.
- LocalNetworkGateway2 *LocalNetworkGateway `json:"localNetworkGateway2,omitempty"`
- // ConnectionType - Gateway connection type. Possible values are: 'Ipsec','Vnet2Vnet','ExpressRoute', and 'VPNClient. Possible values include: 'IPsec', 'Vnet2Vnet', 'ExpressRoute', 'VPNClient'
- ConnectionType VirtualNetworkGatewayConnectionType `json:"connectionType,omitempty"`
- // ConnectionProtocol - Connection protocol used for this connection. Possible values include: 'IKEv2', 'IKEv1'
- ConnectionProtocol VirtualNetworkGatewayConnectionProtocol `json:"connectionProtocol,omitempty"`
- // RoutingWeight - The routing weight.
- RoutingWeight *int32 `json:"routingWeight,omitempty"`
- // SharedKey - The IPSec shared key.
- SharedKey *string `json:"sharedKey,omitempty"`
- // ConnectionStatus - READ-ONLY; Virtual network Gateway connection status. Possible values are 'Unknown', 'Connecting', 'Connected' and 'NotConnected'. Possible values include: 'VirtualNetworkGatewayConnectionStatusUnknown', 'VirtualNetworkGatewayConnectionStatusConnecting', 'VirtualNetworkGatewayConnectionStatusConnected', 'VirtualNetworkGatewayConnectionStatusNotConnected'
- ConnectionStatus VirtualNetworkGatewayConnectionStatus `json:"connectionStatus,omitempty"`
- // TunnelConnectionStatus - READ-ONLY; Collection of all tunnels' connection health status.
- TunnelConnectionStatus *[]TunnelConnectionHealth `json:"tunnelConnectionStatus,omitempty"`
- // EgressBytesTransferred - READ-ONLY; The egress bytes transferred in this connection.
- EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"`
- // IngressBytesTransferred - READ-ONLY; The ingress bytes transferred in this connection.
- IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"`
- // Peer - The reference to peerings resource.
- Peer *SubResource `json:"peer,omitempty"`
- // EnableBgp - EnableBgp flag
- EnableBgp *bool `json:"enableBgp,omitempty"`
- // UsePolicyBasedTrafficSelectors - Enable policy-based traffic selectors.
- UsePolicyBasedTrafficSelectors *bool `json:"usePolicyBasedTrafficSelectors,omitempty"`
- // IpsecPolicies - The IPSec Policies to be considered by this connection.
- IpsecPolicies *[]IpsecPolicy `json:"ipsecPolicies,omitempty"`
- // ResourceGUID - The resource GUID property of the VirtualNetworkGatewayConnection resource.
- ResourceGUID *string `json:"resourceGuid,omitempty"`
- // ProvisioningState - READ-ONLY; The provisioning state of the VirtualNetworkGatewayConnection resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
- ProvisioningState *string `json:"provisioningState,omitempty"`
- // ExpressRouteGatewayBypass - Bypass ExpressRoute Gateway for data forwarding
- ExpressRouteGatewayBypass *bool `json:"expressRouteGatewayBypass,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnectionPropertiesFormat.
-func (vngcpf VirtualNetworkGatewayConnectionPropertiesFormat) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if vngcpf.AuthorizationKey != nil {
- objectMap["authorizationKey"] = vngcpf.AuthorizationKey
- }
- if vngcpf.VirtualNetworkGateway1 != nil {
- objectMap["virtualNetworkGateway1"] = vngcpf.VirtualNetworkGateway1
- }
- if vngcpf.VirtualNetworkGateway2 != nil {
- objectMap["virtualNetworkGateway2"] = vngcpf.VirtualNetworkGateway2
- }
- if vngcpf.LocalNetworkGateway2 != nil {
- objectMap["localNetworkGateway2"] = vngcpf.LocalNetworkGateway2
- }
- if vngcpf.ConnectionType != "" {
- objectMap["connectionType"] = vngcpf.ConnectionType
- }
- if vngcpf.ConnectionProtocol != "" {
- objectMap["connectionProtocol"] = vngcpf.ConnectionProtocol
- }
- if vngcpf.RoutingWeight != nil {
- objectMap["routingWeight"] = vngcpf.RoutingWeight
- }
- if vngcpf.SharedKey != nil {
- objectMap["sharedKey"] = vngcpf.SharedKey
- }
- if vngcpf.Peer != nil {
- objectMap["peer"] = vngcpf.Peer
- }
- if vngcpf.EnableBgp != nil {
- objectMap["enableBgp"] = vngcpf.EnableBgp
- }
- if vngcpf.UsePolicyBasedTrafficSelectors != nil {
- objectMap["usePolicyBasedTrafficSelectors"] = vngcpf.UsePolicyBasedTrafficSelectors
- }
- if vngcpf.IpsecPolicies != nil {
- objectMap["ipsecPolicies"] = vngcpf.IpsecPolicies
- }
- if vngcpf.ResourceGUID != nil {
- objectMap["resourceGuid"] = vngcpf.ResourceGUID
- }
- if vngcpf.ExpressRouteGatewayBypass != nil {
- objectMap["expressRouteGatewayBypass"] = vngcpf.ExpressRouteGatewayBypass
- }
- return json.Marshal(objectMap)
-}
-
-// VirtualNetworkGatewayConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
-// results of a long-running operation.
-type VirtualNetworkGatewayConnectionsCreateOrUpdateFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *VirtualNetworkGatewayConnectionsCreateOrUpdateFuture) Result(client VirtualNetworkGatewayConnectionsClient) (vngc VirtualNetworkGatewayConnection, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if vngc.Response.Response, err = future.GetResult(sender); err == nil && vngc.Response.Response.StatusCode != http.StatusNoContent {
- vngc, err = client.CreateOrUpdateResponder(vngc.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture", "Result", vngc.Response.Response, "Failure responding to request")
- }
- }
- return
-}
-
-// VirtualNetworkGatewayConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of a
-// long-running operation.
-type VirtualNetworkGatewayConnectionsDeleteFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *VirtualNetworkGatewayConnectionsDeleteFuture) Result(client VirtualNetworkGatewayConnectionsClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsDeleteFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
-}
-
-// VirtualNetworkGatewayConnectionsResetSharedKeyFuture an abstraction for monitoring and retrieving the
-// results of a long-running operation.
-type VirtualNetworkGatewayConnectionsResetSharedKeyFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *VirtualNetworkGatewayConnectionsResetSharedKeyFuture) Result(client VirtualNetworkGatewayConnectionsClient) (crsk ConnectionResetSharedKey, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if crsk.Response.Response, err = future.GetResult(sender); err == nil && crsk.Response.Response.StatusCode != http.StatusNoContent {
- crsk, err = client.ResetSharedKeyResponder(crsk.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture", "Result", crsk.Response.Response, "Failure responding to request")
- }
- }
- return
-}
-
-// VirtualNetworkGatewayConnectionsSetSharedKeyFuture an abstraction for monitoring and retrieving the results
-// of a long-running operation.
-type VirtualNetworkGatewayConnectionsSetSharedKeyFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *VirtualNetworkGatewayConnectionsSetSharedKeyFuture) Result(client VirtualNetworkGatewayConnectionsClient) (csk ConnectionSharedKey, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if csk.Response.Response, err = future.GetResult(sender); err == nil && csk.Response.Response.StatusCode != http.StatusNoContent {
- csk, err = client.SetSharedKeyResponder(csk.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture", "Result", csk.Response.Response, "Failure responding to request")
- }
- }
- return
-}
-
-// VirtualNetworkGatewayConnectionsUpdateTagsFuture an abstraction for monitoring and retrieving the results of
-// a long-running operation.
-type VirtualNetworkGatewayConnectionsUpdateTagsFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *VirtualNetworkGatewayConnectionsUpdateTagsFuture) Result(client VirtualNetworkGatewayConnectionsClient) (vngc VirtualNetworkGatewayConnection, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsUpdateTagsFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsUpdateTagsFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if vngc.Response.Response, err = future.GetResult(sender); err == nil && vngc.Response.Response.StatusCode != http.StatusNoContent {
- vngc, err = client.UpdateTagsResponder(vngc.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsUpdateTagsFuture", "Result", vngc.Response.Response, "Failure responding to request")
- }
- }
- return
-}
-
-// VirtualNetworkGatewayIPConfiguration IP configuration for virtual network gateway
-type VirtualNetworkGatewayIPConfiguration struct {
- // VirtualNetworkGatewayIPConfigurationPropertiesFormat - Properties of the virtual network gateway ip configuration.
- *VirtualNetworkGatewayIPConfigurationPropertiesFormat `json:"properties,omitempty"`
- // Name - 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"`
- // Etag - A unique read-only string that changes whenever the resource is updated.
- Etag *string `json:"etag,omitempty"`
- // ID - Resource ID.
- ID *string `json:"id,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for VirtualNetworkGatewayIPConfiguration.
-func (vngic VirtualNetworkGatewayIPConfiguration) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if vngic.VirtualNetworkGatewayIPConfigurationPropertiesFormat != nil {
- objectMap["properties"] = vngic.VirtualNetworkGatewayIPConfigurationPropertiesFormat
- }
- if vngic.Name != nil {
- objectMap["name"] = vngic.Name
- }
- if vngic.Etag != nil {
- objectMap["etag"] = vngic.Etag
- }
- if vngic.ID != nil {
- objectMap["id"] = vngic.ID
- }
- return json.Marshal(objectMap)
-}
-
-// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGatewayIPConfiguration struct.
-func (vngic *VirtualNetworkGatewayIPConfiguration) 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 virtualNetworkGatewayIPConfigurationPropertiesFormat VirtualNetworkGatewayIPConfigurationPropertiesFormat
- err = json.Unmarshal(*v, &virtualNetworkGatewayIPConfigurationPropertiesFormat)
- if err != nil {
- return err
- }
- vngic.VirtualNetworkGatewayIPConfigurationPropertiesFormat = &virtualNetworkGatewayIPConfigurationPropertiesFormat
- }
- case "name":
- if v != nil {
- var name string
- err = json.Unmarshal(*v, &name)
- if err != nil {
- return err
- }
- vngic.Name = &name
- }
- case "etag":
- if v != nil {
- var etag string
- err = json.Unmarshal(*v, &etag)
- if err != nil {
- return err
- }
- vngic.Etag = &etag
- }
- case "id":
- if v != nil {
- var ID string
- err = json.Unmarshal(*v, &ID)
- if err != nil {
- return err
- }
- vngic.ID = &ID
- }
- }
- }
-
- return nil
-}
-
-// VirtualNetworkGatewayIPConfigurationPropertiesFormat properties of VirtualNetworkGatewayIPConfiguration
-type VirtualNetworkGatewayIPConfigurationPropertiesFormat struct {
- // PrivateIPAllocationMethod - The private IP allocation method. Possible values are: 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic'
- PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
- // Subnet - The reference of the subnet resource.
- Subnet *SubResource `json:"subnet,omitempty"`
- // PublicIPAddress - The reference of the public IP resource.
- PublicIPAddress *SubResource `json:"publicIPAddress,omitempty"`
- // ProvisioningState - READ-ONLY; The provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
- ProvisioningState *string `json:"provisioningState,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for VirtualNetworkGatewayIPConfigurationPropertiesFormat.
-func (vngicpf VirtualNetworkGatewayIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if vngicpf.PrivateIPAllocationMethod != "" {
- objectMap["privateIPAllocationMethod"] = vngicpf.PrivateIPAllocationMethod
- }
- if vngicpf.Subnet != nil {
- objectMap["subnet"] = vngicpf.Subnet
- }
- if vngicpf.PublicIPAddress != nil {
- objectMap["publicIPAddress"] = vngicpf.PublicIPAddress
- }
- return json.Marshal(objectMap)
-}
-
-// VirtualNetworkGatewayListConnectionsResult response for the VirtualNetworkGatewayListConnections API service
-// call
-type VirtualNetworkGatewayListConnectionsResult struct {
- autorest.Response `json:"-"`
- // Value - Gets a list of VirtualNetworkGatewayConnection resources that exists in a resource group.
- Value *[]VirtualNetworkGatewayConnectionListEntity `json:"value,omitempty"`
- // NextLink - READ-ONLY; The URL to get the next set of results.
- NextLink *string `json:"nextLink,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for VirtualNetworkGatewayListConnectionsResult.
-func (vnglcr VirtualNetworkGatewayListConnectionsResult) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if vnglcr.Value != nil {
- objectMap["value"] = vnglcr.Value
- }
- return json.Marshal(objectMap)
-}
-
-// VirtualNetworkGatewayListConnectionsResultIterator provides access to a complete listing of
-// VirtualNetworkGatewayConnectionListEntity values.
-type VirtualNetworkGatewayListConnectionsResultIterator struct {
- i int
- page VirtualNetworkGatewayListConnectionsResultPage
-}
-
-// 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 *VirtualNetworkGatewayListConnectionsResultIterator) NextWithContext(ctx context.Context) (err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListConnectionsResultIterator.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 *VirtualNetworkGatewayListConnectionsResultIterator) Next() error {
- return iter.NextWithContext(context.Background())
-}
-
-// NotDone returns true if the enumeration should be started or is not yet complete.
-func (iter VirtualNetworkGatewayListConnectionsResultIterator) 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 VirtualNetworkGatewayListConnectionsResultIterator) Response() VirtualNetworkGatewayListConnectionsResult {
- 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 VirtualNetworkGatewayListConnectionsResultIterator) Value() VirtualNetworkGatewayConnectionListEntity {
- if !iter.page.NotDone() {
- return VirtualNetworkGatewayConnectionListEntity{}
- }
- return iter.page.Values()[iter.i]
-}
-
-// Creates a new instance of the VirtualNetworkGatewayListConnectionsResultIterator type.
-func NewVirtualNetworkGatewayListConnectionsResultIterator(page VirtualNetworkGatewayListConnectionsResultPage) VirtualNetworkGatewayListConnectionsResultIterator {
- return VirtualNetworkGatewayListConnectionsResultIterator{page: page}
-}
-
-// IsEmpty returns true if the ListResult contains no values.
-func (vnglcr VirtualNetworkGatewayListConnectionsResult) IsEmpty() bool {
- return vnglcr.Value == nil || len(*vnglcr.Value) == 0
-}
-
-// hasNextLink returns true if the NextLink is not empty.
-func (vnglcr VirtualNetworkGatewayListConnectionsResult) hasNextLink() bool {
- return vnglcr.NextLink != nil && len(*vnglcr.NextLink) != 0
-}
-
-// virtualNetworkGatewayListConnectionsResultPreparer prepares a request to retrieve the next set of results.
-// It returns nil if no more results exist.
-func (vnglcr VirtualNetworkGatewayListConnectionsResult) virtualNetworkGatewayListConnectionsResultPreparer(ctx context.Context) (*http.Request, error) {
- if !vnglcr.hasNextLink() {
- return nil, nil
- }
- return autorest.Prepare((&http.Request{}).WithContext(ctx),
- autorest.AsJSON(),
- autorest.AsGet(),
- autorest.WithBaseURL(to.String(vnglcr.NextLink)))
-}
-
-// VirtualNetworkGatewayListConnectionsResultPage contains a page of VirtualNetworkGatewayConnectionListEntity
-// values.
-type VirtualNetworkGatewayListConnectionsResultPage struct {
- fn func(context.Context, VirtualNetworkGatewayListConnectionsResult) (VirtualNetworkGatewayListConnectionsResult, error)
- vnglcr VirtualNetworkGatewayListConnectionsResult
-}
-
-// 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 *VirtualNetworkGatewayListConnectionsResultPage) NextWithContext(ctx context.Context) (err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListConnectionsResultPage.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.vnglcr)
- if err != nil {
- return err
- }
- page.vnglcr = 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 *VirtualNetworkGatewayListConnectionsResultPage) Next() error {
- return page.NextWithContext(context.Background())
-}
-
-// NotDone returns true if the page enumeration should be started or is not yet complete.
-func (page VirtualNetworkGatewayListConnectionsResultPage) NotDone() bool {
- return !page.vnglcr.IsEmpty()
-}
-
-// Response returns the raw server response from the last page request.
-func (page VirtualNetworkGatewayListConnectionsResultPage) Response() VirtualNetworkGatewayListConnectionsResult {
- return page.vnglcr
-}
-
-// Values returns the slice of values for the current page or nil if there are no values.
-func (page VirtualNetworkGatewayListConnectionsResultPage) Values() []VirtualNetworkGatewayConnectionListEntity {
- if page.vnglcr.IsEmpty() {
- return nil
- }
- return *page.vnglcr.Value
-}
-
-// Creates a new instance of the VirtualNetworkGatewayListConnectionsResultPage type.
-func NewVirtualNetworkGatewayListConnectionsResultPage(getNextPage func(context.Context, VirtualNetworkGatewayListConnectionsResult) (VirtualNetworkGatewayListConnectionsResult, error)) VirtualNetworkGatewayListConnectionsResultPage {
- return VirtualNetworkGatewayListConnectionsResultPage{fn: getNextPage}
-}
-
-// VirtualNetworkGatewayListResult response for the ListVirtualNetworkGateways API service call.
-type VirtualNetworkGatewayListResult struct {
- autorest.Response `json:"-"`
- // Value - Gets a list of VirtualNetworkGateway resources that exists in a resource group.
- Value *[]VirtualNetworkGateway `json:"value,omitempty"`
- // NextLink - READ-ONLY; The URL to get the next set of results.
- NextLink *string `json:"nextLink,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for VirtualNetworkGatewayListResult.
-func (vnglr VirtualNetworkGatewayListResult) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if vnglr.Value != nil {
- objectMap["value"] = vnglr.Value
- }
- return json.Marshal(objectMap)
-}
-
-// VirtualNetworkGatewayListResultIterator provides access to a complete listing of VirtualNetworkGateway
-// values.
-type VirtualNetworkGatewayListResultIterator struct {
- i int
- page VirtualNetworkGatewayListResultPage
-}
-
-// 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 *VirtualNetworkGatewayListResultIterator) NextWithContext(ctx context.Context) (err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListResultIterator.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 *VirtualNetworkGatewayListResultIterator) Next() error {
- return iter.NextWithContext(context.Background())
-}
-
-// NotDone returns true if the enumeration should be started or is not yet complete.
-func (iter VirtualNetworkGatewayListResultIterator) 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 VirtualNetworkGatewayListResultIterator) Response() VirtualNetworkGatewayListResult {
- 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 VirtualNetworkGatewayListResultIterator) Value() VirtualNetworkGateway {
- if !iter.page.NotDone() {
- return VirtualNetworkGateway{}
- }
- return iter.page.Values()[iter.i]
-}
-
-// Creates a new instance of the VirtualNetworkGatewayListResultIterator type.
-func NewVirtualNetworkGatewayListResultIterator(page VirtualNetworkGatewayListResultPage) VirtualNetworkGatewayListResultIterator {
- return VirtualNetworkGatewayListResultIterator{page: page}
-}
-
-// IsEmpty returns true if the ListResult contains no values.
-func (vnglr VirtualNetworkGatewayListResult) IsEmpty() bool {
- return vnglr.Value == nil || len(*vnglr.Value) == 0
-}
-
-// hasNextLink returns true if the NextLink is not empty.
-func (vnglr VirtualNetworkGatewayListResult) hasNextLink() bool {
- return vnglr.NextLink != nil && len(*vnglr.NextLink) != 0
-}
-
-// virtualNetworkGatewayListResultPreparer prepares a request to retrieve the next set of results.
-// It returns nil if no more results exist.
-func (vnglr VirtualNetworkGatewayListResult) virtualNetworkGatewayListResultPreparer(ctx context.Context) (*http.Request, error) {
- if !vnglr.hasNextLink() {
- return nil, nil
- }
- return autorest.Prepare((&http.Request{}).WithContext(ctx),
- autorest.AsJSON(),
- autorest.AsGet(),
- autorest.WithBaseURL(to.String(vnglr.NextLink)))
-}
-
-// VirtualNetworkGatewayListResultPage contains a page of VirtualNetworkGateway values.
-type VirtualNetworkGatewayListResultPage struct {
- fn func(context.Context, VirtualNetworkGatewayListResult) (VirtualNetworkGatewayListResult, error)
- vnglr VirtualNetworkGatewayListResult
-}
-
-// 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 *VirtualNetworkGatewayListResultPage) NextWithContext(ctx context.Context) (err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListResultPage.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.vnglr)
- if err != nil {
- return err
- }
- page.vnglr = 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 *VirtualNetworkGatewayListResultPage) Next() error {
- return page.NextWithContext(context.Background())
-}
-
-// NotDone returns true if the page enumeration should be started or is not yet complete.
-func (page VirtualNetworkGatewayListResultPage) NotDone() bool {
- return !page.vnglr.IsEmpty()
-}
-
-// Response returns the raw server response from the last page request.
-func (page VirtualNetworkGatewayListResultPage) Response() VirtualNetworkGatewayListResult {
- return page.vnglr
-}
-
-// Values returns the slice of values for the current page or nil if there are no values.
-func (page VirtualNetworkGatewayListResultPage) Values() []VirtualNetworkGateway {
- if page.vnglr.IsEmpty() {
- return nil
- }
- return *page.vnglr.Value
-}
-
-// Creates a new instance of the VirtualNetworkGatewayListResultPage type.
-func NewVirtualNetworkGatewayListResultPage(getNextPage func(context.Context, VirtualNetworkGatewayListResult) (VirtualNetworkGatewayListResult, error)) VirtualNetworkGatewayListResultPage {
- return VirtualNetworkGatewayListResultPage{fn: getNextPage}
-}
-
-// VirtualNetworkGatewayPropertiesFormat virtualNetworkGateway properties
-type VirtualNetworkGatewayPropertiesFormat struct {
- // IPConfigurations - IP configurations for virtual network gateway.
- IPConfigurations *[]VirtualNetworkGatewayIPConfiguration `json:"ipConfigurations,omitempty"`
- // GatewayType - The type of this virtual network gateway. Possible values are: 'Vpn' and 'ExpressRoute'. Possible values include: 'VirtualNetworkGatewayTypeVpn', 'VirtualNetworkGatewayTypeExpressRoute'
- GatewayType VirtualNetworkGatewayType `json:"gatewayType,omitempty"`
- // VpnType - The type of this virtual network gateway. Possible values are: 'PolicyBased' and 'RouteBased'. Possible values include: 'PolicyBased', 'RouteBased'
- VpnType VpnType `json:"vpnType,omitempty"`
- // EnableBgp - Whether BGP is enabled for this virtual network gateway or not.
- EnableBgp *bool `json:"enableBgp,omitempty"`
- // ActiveActive - ActiveActive flag
- ActiveActive *bool `json:"activeActive,omitempty"`
- // GatewayDefaultSite - The reference of the LocalNetworkGateway resource which represents local network site having default routes. Assign Null value in case of removing existing default site setting.
- GatewayDefaultSite *SubResource `json:"gatewayDefaultSite,omitempty"`
- // Sku - The reference of the VirtualNetworkGatewaySku resource which represents the SKU selected for Virtual network gateway.
- Sku *VirtualNetworkGatewaySku `json:"sku,omitempty"`
- // VpnClientConfiguration - The reference of the VpnClientConfiguration resource which represents the P2S VpnClient configurations.
- VpnClientConfiguration *VpnClientConfiguration `json:"vpnClientConfiguration,omitempty"`
- // BgpSettings - Virtual network gateway's BGP speaker settings.
- BgpSettings *BgpSettings `json:"bgpSettings,omitempty"`
- // ResourceGUID - The resource GUID property of the VirtualNetworkGateway resource.
- ResourceGUID *string `json:"resourceGuid,omitempty"`
- // ProvisioningState - READ-ONLY; The provisioning state of the VirtualNetworkGateway resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
- ProvisioningState *string `json:"provisioningState,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for VirtualNetworkGatewayPropertiesFormat.
-func (vngpf VirtualNetworkGatewayPropertiesFormat) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if vngpf.IPConfigurations != nil {
- objectMap["ipConfigurations"] = vngpf.IPConfigurations
- }
- if vngpf.GatewayType != "" {
- objectMap["gatewayType"] = vngpf.GatewayType
- }
- if vngpf.VpnType != "" {
- objectMap["vpnType"] = vngpf.VpnType
- }
- if vngpf.EnableBgp != nil {
- objectMap["enableBgp"] = vngpf.EnableBgp
- }
- if vngpf.ActiveActive != nil {
- objectMap["activeActive"] = vngpf.ActiveActive
- }
- if vngpf.GatewayDefaultSite != nil {
- objectMap["gatewayDefaultSite"] = vngpf.GatewayDefaultSite
- }
- if vngpf.Sku != nil {
- objectMap["sku"] = vngpf.Sku
- }
- if vngpf.VpnClientConfiguration != nil {
- objectMap["vpnClientConfiguration"] = vngpf.VpnClientConfiguration
- }
- if vngpf.BgpSettings != nil {
- objectMap["bgpSettings"] = vngpf.BgpSettings
- }
- if vngpf.ResourceGUID != nil {
- objectMap["resourceGuid"] = vngpf.ResourceGUID
- }
- return json.Marshal(objectMap)
-}
-
-// VirtualNetworkGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
-// long-running operation.
-type VirtualNetworkGatewaysCreateOrUpdateFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *VirtualNetworkGatewaysCreateOrUpdateFuture) Result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysCreateOrUpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if vng.Response.Response, err = future.GetResult(sender); err == nil && vng.Response.Response.StatusCode != http.StatusNoContent {
- vng, err = client.CreateOrUpdateResponder(vng.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysCreateOrUpdateFuture", "Result", vng.Response.Response, "Failure responding to request")
- }
- }
- return
-}
-
-// VirtualNetworkGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a
-// long-running operation.
-type VirtualNetworkGatewaysDeleteFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *VirtualNetworkGatewaysDeleteFuture) Result(client VirtualNetworkGatewaysClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysDeleteFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
-}
-
-// VirtualNetworkGatewaysGeneratevpnclientpackageFuture an abstraction for monitoring and retrieving the
-// results of a long-running operation.
-type VirtualNetworkGatewaysGeneratevpnclientpackageFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *VirtualNetworkGatewaysGeneratevpnclientpackageFuture) Result(client VirtualNetworkGatewaysClient) (s String, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture")
- 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.GeneratevpnclientpackageResponder(s.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture", "Result", s.Response.Response, "Failure responding to request")
- }
- }
- return
-}
-
-// VirtualNetworkGatewaysGenerateVpnProfileFuture an abstraction for monitoring and retrieving the results of a
-// long-running operation.
-type VirtualNetworkGatewaysGenerateVpnProfileFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *VirtualNetworkGatewaysGenerateVpnProfileFuture) Result(client VirtualNetworkGatewaysClient) (s String, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGenerateVpnProfileFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGenerateVpnProfileFuture")
- 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.GenerateVpnProfileResponder(s.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGenerateVpnProfileFuture", "Result", s.Response.Response, "Failure responding to request")
- }
- }
- return
-}
-
-// VirtualNetworkGatewaysGetAdvertisedRoutesFuture an abstraction for monitoring and retrieving the results of
-// a long-running operation.
-type VirtualNetworkGatewaysGetAdvertisedRoutesFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *VirtualNetworkGatewaysGetAdvertisedRoutesFuture) Result(client VirtualNetworkGatewaysClient) (grlr GatewayRouteListResult, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if grlr.Response.Response, err = future.GetResult(sender); err == nil && grlr.Response.Response.StatusCode != http.StatusNoContent {
- grlr, err = client.GetAdvertisedRoutesResponder(grlr.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture", "Result", grlr.Response.Response, "Failure responding to request")
- }
- }
- return
-}
-
-// VirtualNetworkGatewaysGetBgpPeerStatusFuture an abstraction for monitoring and retrieving the results of a
-// long-running operation.
-type VirtualNetworkGatewaysGetBgpPeerStatusFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *VirtualNetworkGatewaysGetBgpPeerStatusFuture) Result(client VirtualNetworkGatewaysClient) (bpslr BgpPeerStatusListResult, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetBgpPeerStatusFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetBgpPeerStatusFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if bpslr.Response.Response, err = future.GetResult(sender); err == nil && bpslr.Response.Response.StatusCode != http.StatusNoContent {
- bpslr, err = client.GetBgpPeerStatusResponder(bpslr.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetBgpPeerStatusFuture", "Result", bpslr.Response.Response, "Failure responding to request")
- }
- }
- return
-}
-
-// VirtualNetworkGatewaysGetLearnedRoutesFuture an abstraction for monitoring and retrieving the results of a
-// long-running operation.
-type VirtualNetworkGatewaysGetLearnedRoutesFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *VirtualNetworkGatewaysGetLearnedRoutesFuture) Result(client VirtualNetworkGatewaysClient) (grlr GatewayRouteListResult, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetLearnedRoutesFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetLearnedRoutesFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if grlr.Response.Response, err = future.GetResult(sender); err == nil && grlr.Response.Response.StatusCode != http.StatusNoContent {
- grlr, err = client.GetLearnedRoutesResponder(grlr.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetLearnedRoutesFuture", "Result", grlr.Response.Response, "Failure responding to request")
- }
- }
- return
-}
-
-// VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture an abstraction for monitoring and retrieving the
-// results of a long-running operation.
-type VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture) Result(client VirtualNetworkGatewaysClient) (vcipp VpnClientIPsecParameters, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if vcipp.Response.Response, err = future.GetResult(sender); err == nil && vcipp.Response.Response.StatusCode != http.StatusNoContent {
- vcipp, err = client.GetVpnclientIpsecParametersResponder(vcipp.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture", "Result", vcipp.Response.Response, "Failure responding to request")
- }
- }
- return
-}
-
-// VirtualNetworkGatewaysGetVpnProfilePackageURLFuture an abstraction for monitoring and retrieving the results
-// of a long-running operation.
-type VirtualNetworkGatewaysGetVpnProfilePackageURLFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *VirtualNetworkGatewaysGetVpnProfilePackageURLFuture) Result(client VirtualNetworkGatewaysClient) (s String, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture")
- 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.GetVpnProfilePackageURLResponder(s.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture", "Result", s.Response.Response, "Failure responding to request")
- }
- }
- return
-}
-
-// VirtualNetworkGatewaySku virtualNetworkGatewaySku details
-type VirtualNetworkGatewaySku struct {
- // Name - Gateway SKU name. Possible values include: 'VirtualNetworkGatewaySkuNameBasic', 'VirtualNetworkGatewaySkuNameHighPerformance', 'VirtualNetworkGatewaySkuNameStandard', 'VirtualNetworkGatewaySkuNameUltraPerformance', 'VirtualNetworkGatewaySkuNameVpnGw1', 'VirtualNetworkGatewaySkuNameVpnGw2', 'VirtualNetworkGatewaySkuNameVpnGw3', 'VirtualNetworkGatewaySkuNameVpnGw1AZ', 'VirtualNetworkGatewaySkuNameVpnGw2AZ', 'VirtualNetworkGatewaySkuNameVpnGw3AZ', 'VirtualNetworkGatewaySkuNameErGw1AZ', 'VirtualNetworkGatewaySkuNameErGw2AZ', 'VirtualNetworkGatewaySkuNameErGw3AZ'
- Name VirtualNetworkGatewaySkuName `json:"name,omitempty"`
- // Tier - Gateway SKU tier. Possible values include: 'VirtualNetworkGatewaySkuTierBasic', 'VirtualNetworkGatewaySkuTierHighPerformance', 'VirtualNetworkGatewaySkuTierStandard', 'VirtualNetworkGatewaySkuTierUltraPerformance', 'VirtualNetworkGatewaySkuTierVpnGw1', 'VirtualNetworkGatewaySkuTierVpnGw2', 'VirtualNetworkGatewaySkuTierVpnGw3', 'VirtualNetworkGatewaySkuTierVpnGw1AZ', 'VirtualNetworkGatewaySkuTierVpnGw2AZ', 'VirtualNetworkGatewaySkuTierVpnGw3AZ', 'VirtualNetworkGatewaySkuTierErGw1AZ', 'VirtualNetworkGatewaySkuTierErGw2AZ', 'VirtualNetworkGatewaySkuTierErGw3AZ'
- Tier VirtualNetworkGatewaySkuTier `json:"tier,omitempty"`
- // Capacity - The capacity.
- Capacity *int32 `json:"capacity,omitempty"`
-}
-
-// VirtualNetworkGatewaysResetFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
-type VirtualNetworkGatewaysResetFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *VirtualNetworkGatewaysResetFuture) Result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysResetFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if vng.Response.Response, err = future.GetResult(sender); err == nil && vng.Response.Response.StatusCode != http.StatusNoContent {
- vng, err = client.ResetResponder(vng.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetFuture", "Result", vng.Response.Response, "Failure responding to request")
- }
- }
- return
-}
-
-// VirtualNetworkGatewaysResetVpnClientSharedKeyFuture an abstraction for monitoring and retrieving the results
-// of a long-running operation.
-type VirtualNetworkGatewaysResetVpnClientSharedKeyFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *VirtualNetworkGatewaysResetVpnClientSharedKeyFuture) Result(client VirtualNetworkGatewaysClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetVpnClientSharedKeyFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysResetVpnClientSharedKeyFuture")
- return
- }
- ar.Response = future.Response()
- return
-}
-
-// VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture an abstraction for monitoring and retrieving the
-// results of a long-running operation.
-type VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture) Result(client VirtualNetworkGatewaysClient) (vcipp VpnClientIPsecParameters, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if vcipp.Response.Response, err = future.GetResult(sender); err == nil && vcipp.Response.Response.StatusCode != http.StatusNoContent {
- vcipp, err = client.SetVpnclientIpsecParametersResponder(vcipp.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture", "Result", vcipp.Response.Response, "Failure responding to request")
- }
- }
- return
-}
-
-// VirtualNetworkGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
-// long-running operation.
-type VirtualNetworkGatewaysUpdateTagsFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *VirtualNetworkGatewaysUpdateTagsFuture) Result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysUpdateTagsFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysUpdateTagsFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if vng.Response.Response, err = future.GetResult(sender); err == nil && vng.Response.Response.StatusCode != http.StatusNoContent {
- vng, err = client.UpdateTagsResponder(vng.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysUpdateTagsFuture", "Result", vng.Response.Response, "Failure responding to request")
- }
- }
- return
-}
-
-// VirtualNetworkListResult response for the ListVirtualNetworks API service call.
-type VirtualNetworkListResult struct {
- autorest.Response `json:"-"`
- // Value - Gets a list of VirtualNetwork resources in a resource group.
- Value *[]VirtualNetwork `json:"value,omitempty"`
- // NextLink - The URL to get the next set of results.
- NextLink *string `json:"nextLink,omitempty"`
-}
-
-// VirtualNetworkListResultIterator provides access to a complete listing of VirtualNetwork values.
-type VirtualNetworkListResultIterator struct {
- i int
- page VirtualNetworkListResultPage
-}
-
-// 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 *VirtualNetworkListResultIterator) NextWithContext(ctx context.Context) (err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListResultIterator.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 *VirtualNetworkListResultIterator) Next() error {
- return iter.NextWithContext(context.Background())
-}
-
-// NotDone returns true if the enumeration should be started or is not yet complete.
-func (iter VirtualNetworkListResultIterator) 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 VirtualNetworkListResultIterator) Response() VirtualNetworkListResult {
- 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 VirtualNetworkListResultIterator) Value() VirtualNetwork {
- if !iter.page.NotDone() {
- return VirtualNetwork{}
- }
- return iter.page.Values()[iter.i]
-}
-
-// Creates a new instance of the VirtualNetworkListResultIterator type.
-func NewVirtualNetworkListResultIterator(page VirtualNetworkListResultPage) VirtualNetworkListResultIterator {
- return VirtualNetworkListResultIterator{page: page}
-}
-
-// IsEmpty returns true if the ListResult contains no values.
-func (vnlr VirtualNetworkListResult) IsEmpty() bool {
- return vnlr.Value == nil || len(*vnlr.Value) == 0
-}
-
-// hasNextLink returns true if the NextLink is not empty.
-func (vnlr VirtualNetworkListResult) hasNextLink() bool {
- return vnlr.NextLink != nil && len(*vnlr.NextLink) != 0
-}
-
-// virtualNetworkListResultPreparer prepares a request to retrieve the next set of results.
-// It returns nil if no more results exist.
-func (vnlr VirtualNetworkListResult) virtualNetworkListResultPreparer(ctx context.Context) (*http.Request, error) {
- if !vnlr.hasNextLink() {
- return nil, nil
- }
- return autorest.Prepare((&http.Request{}).WithContext(ctx),
- autorest.AsJSON(),
- autorest.AsGet(),
- autorest.WithBaseURL(to.String(vnlr.NextLink)))
-}
-
-// VirtualNetworkListResultPage contains a page of VirtualNetwork values.
-type VirtualNetworkListResultPage struct {
- fn func(context.Context, VirtualNetworkListResult) (VirtualNetworkListResult, error)
- vnlr VirtualNetworkListResult
-}
-
-// 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 *VirtualNetworkListResultPage) NextWithContext(ctx context.Context) (err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListResultPage.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.vnlr)
- if err != nil {
- return err
- }
- page.vnlr = 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 *VirtualNetworkListResultPage) Next() error {
- return page.NextWithContext(context.Background())
-}
-
-// NotDone returns true if the page enumeration should be started or is not yet complete.
-func (page VirtualNetworkListResultPage) NotDone() bool {
- return !page.vnlr.IsEmpty()
-}
-
-// Response returns the raw server response from the last page request.
-func (page VirtualNetworkListResultPage) Response() VirtualNetworkListResult {
- return page.vnlr
-}
-
-// Values returns the slice of values for the current page or nil if there are no values.
-func (page VirtualNetworkListResultPage) Values() []VirtualNetwork {
- if page.vnlr.IsEmpty() {
- return nil
- }
- return *page.vnlr.Value
-}
-
-// Creates a new instance of the VirtualNetworkListResultPage type.
-func NewVirtualNetworkListResultPage(getNextPage func(context.Context, VirtualNetworkListResult) (VirtualNetworkListResult, error)) VirtualNetworkListResultPage {
- return VirtualNetworkListResultPage{fn: getNextPage}
-}
-
-// VirtualNetworkListUsageResult response for the virtual networks GetUsage API service call.
-type VirtualNetworkListUsageResult struct {
- autorest.Response `json:"-"`
- // Value - READ-ONLY; VirtualNetwork usage stats.
- Value *[]VirtualNetworkUsage `json:"value,omitempty"`
- // NextLink - The URL to get the next set of results.
- NextLink *string `json:"nextLink,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for VirtualNetworkListUsageResult.
-func (vnlur VirtualNetworkListUsageResult) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if vnlur.NextLink != nil {
- objectMap["nextLink"] = vnlur.NextLink
- }
- return json.Marshal(objectMap)
-}
-
-// VirtualNetworkListUsageResultIterator provides access to a complete listing of VirtualNetworkUsage values.
-type VirtualNetworkListUsageResultIterator struct {
- i int
- page VirtualNetworkListUsageResultPage
-}
-
-// 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 *VirtualNetworkListUsageResultIterator) NextWithContext(ctx context.Context) (err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListUsageResultIterator.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 *VirtualNetworkListUsageResultIterator) Next() error {
- return iter.NextWithContext(context.Background())
-}
-
-// NotDone returns true if the enumeration should be started or is not yet complete.
-func (iter VirtualNetworkListUsageResultIterator) 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 VirtualNetworkListUsageResultIterator) Response() VirtualNetworkListUsageResult {
- 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 VirtualNetworkListUsageResultIterator) Value() VirtualNetworkUsage {
- if !iter.page.NotDone() {
- return VirtualNetworkUsage{}
- }
- return iter.page.Values()[iter.i]
-}
-
-// Creates a new instance of the VirtualNetworkListUsageResultIterator type.
-func NewVirtualNetworkListUsageResultIterator(page VirtualNetworkListUsageResultPage) VirtualNetworkListUsageResultIterator {
- return VirtualNetworkListUsageResultIterator{page: page}
-}
-
-// IsEmpty returns true if the ListResult contains no values.
-func (vnlur VirtualNetworkListUsageResult) IsEmpty() bool {
- return vnlur.Value == nil || len(*vnlur.Value) == 0
-}
-
-// hasNextLink returns true if the NextLink is not empty.
-func (vnlur VirtualNetworkListUsageResult) hasNextLink() bool {
- return vnlur.NextLink != nil && len(*vnlur.NextLink) != 0
-}
-
-// virtualNetworkListUsageResultPreparer prepares a request to retrieve the next set of results.
-// It returns nil if no more results exist.
-func (vnlur VirtualNetworkListUsageResult) virtualNetworkListUsageResultPreparer(ctx context.Context) (*http.Request, error) {
- if !vnlur.hasNextLink() {
- return nil, nil
- }
- return autorest.Prepare((&http.Request{}).WithContext(ctx),
- autorest.AsJSON(),
- autorest.AsGet(),
- autorest.WithBaseURL(to.String(vnlur.NextLink)))
-}
-
-// VirtualNetworkListUsageResultPage contains a page of VirtualNetworkUsage values.
-type VirtualNetworkListUsageResultPage struct {
- fn func(context.Context, VirtualNetworkListUsageResult) (VirtualNetworkListUsageResult, error)
- vnlur VirtualNetworkListUsageResult
-}
-
-// 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 *VirtualNetworkListUsageResultPage) NextWithContext(ctx context.Context) (err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListUsageResultPage.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.vnlur)
- if err != nil {
- return err
- }
- page.vnlur = 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 *VirtualNetworkListUsageResultPage) Next() error {
- return page.NextWithContext(context.Background())
-}
-
-// NotDone returns true if the page enumeration should be started or is not yet complete.
-func (page VirtualNetworkListUsageResultPage) NotDone() bool {
- return !page.vnlur.IsEmpty()
-}
-
-// Response returns the raw server response from the last page request.
-func (page VirtualNetworkListUsageResultPage) Response() VirtualNetworkListUsageResult {
- return page.vnlur
-}
-
-// Values returns the slice of values for the current page or nil if there are no values.
-func (page VirtualNetworkListUsageResultPage) Values() []VirtualNetworkUsage {
- if page.vnlur.IsEmpty() {
- return nil
- }
- return *page.vnlur.Value
-}
-
-// Creates a new instance of the VirtualNetworkListUsageResultPage type.
-func NewVirtualNetworkListUsageResultPage(getNextPage func(context.Context, VirtualNetworkListUsageResult) (VirtualNetworkListUsageResult, error)) VirtualNetworkListUsageResultPage {
- return VirtualNetworkListUsageResultPage{fn: getNextPage}
-}
-
-// VirtualNetworkPeering peerings in a virtual network resource.
-type VirtualNetworkPeering struct {
- autorest.Response `json:"-"`
- // VirtualNetworkPeeringPropertiesFormat - Properties of the virtual network peering.
- *VirtualNetworkPeeringPropertiesFormat `json:"properties,omitempty"`
- // Name - 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"`
- // Etag - A unique read-only string that changes whenever the resource is updated.
- Etag *string `json:"etag,omitempty"`
- // ID - Resource ID.
- ID *string `json:"id,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for VirtualNetworkPeering.
-func (vnp VirtualNetworkPeering) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if vnp.VirtualNetworkPeeringPropertiesFormat != nil {
- objectMap["properties"] = vnp.VirtualNetworkPeeringPropertiesFormat
- }
- if vnp.Name != nil {
- objectMap["name"] = vnp.Name
- }
- if vnp.Etag != nil {
- objectMap["etag"] = vnp.Etag
- }
- if vnp.ID != nil {
- objectMap["id"] = vnp.ID
- }
- return json.Marshal(objectMap)
-}
-
-// UnmarshalJSON is the custom unmarshaler for VirtualNetworkPeering struct.
-func (vnp *VirtualNetworkPeering) 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 virtualNetworkPeeringPropertiesFormat VirtualNetworkPeeringPropertiesFormat
- err = json.Unmarshal(*v, &virtualNetworkPeeringPropertiesFormat)
- if err != nil {
- return err
- }
- vnp.VirtualNetworkPeeringPropertiesFormat = &virtualNetworkPeeringPropertiesFormat
- }
- case "name":
- if v != nil {
- var name string
- err = json.Unmarshal(*v, &name)
- if err != nil {
- return err
- }
- vnp.Name = &name
- }
- case "etag":
- if v != nil {
- var etag string
- err = json.Unmarshal(*v, &etag)
- if err != nil {
- return err
- }
- vnp.Etag = &etag
- }
- case "id":
- if v != nil {
- var ID string
- err = json.Unmarshal(*v, &ID)
- if err != nil {
- return err
- }
- vnp.ID = &ID
- }
- }
- }
-
- return nil
-}
-
-// VirtualNetworkPeeringListResult response for ListSubnets API service call. Retrieves all subnets that belong
-// to a virtual network.
-type VirtualNetworkPeeringListResult struct {
- autorest.Response `json:"-"`
- // Value - The peerings in a virtual network.
- Value *[]VirtualNetworkPeering `json:"value,omitempty"`
- // NextLink - The URL to get the next set of results.
- NextLink *string `json:"nextLink,omitempty"`
-}
-
-// VirtualNetworkPeeringListResultIterator provides access to a complete listing of VirtualNetworkPeering
-// values.
-type VirtualNetworkPeeringListResultIterator struct {
- i int
- page VirtualNetworkPeeringListResultPage
-}
-
-// 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 *VirtualNetworkPeeringListResultIterator) NextWithContext(ctx context.Context) (err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkPeeringListResultIterator.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 *VirtualNetworkPeeringListResultIterator) Next() error {
- return iter.NextWithContext(context.Background())
-}
-
-// NotDone returns true if the enumeration should be started or is not yet complete.
-func (iter VirtualNetworkPeeringListResultIterator) 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 VirtualNetworkPeeringListResultIterator) Response() VirtualNetworkPeeringListResult {
- 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 VirtualNetworkPeeringListResultIterator) Value() VirtualNetworkPeering {
- if !iter.page.NotDone() {
- return VirtualNetworkPeering{}
- }
- return iter.page.Values()[iter.i]
-}
-
-// Creates a new instance of the VirtualNetworkPeeringListResultIterator type.
-func NewVirtualNetworkPeeringListResultIterator(page VirtualNetworkPeeringListResultPage) VirtualNetworkPeeringListResultIterator {
- return VirtualNetworkPeeringListResultIterator{page: page}
-}
-
-// IsEmpty returns true if the ListResult contains no values.
-func (vnplr VirtualNetworkPeeringListResult) IsEmpty() bool {
- return vnplr.Value == nil || len(*vnplr.Value) == 0
-}
-
-// hasNextLink returns true if the NextLink is not empty.
-func (vnplr VirtualNetworkPeeringListResult) hasNextLink() bool {
- return vnplr.NextLink != nil && len(*vnplr.NextLink) != 0
-}
-
-// virtualNetworkPeeringListResultPreparer prepares a request to retrieve the next set of results.
-// It returns nil if no more results exist.
-func (vnplr VirtualNetworkPeeringListResult) virtualNetworkPeeringListResultPreparer(ctx context.Context) (*http.Request, error) {
- if !vnplr.hasNextLink() {
- return nil, nil
- }
- return autorest.Prepare((&http.Request{}).WithContext(ctx),
- autorest.AsJSON(),
- autorest.AsGet(),
- autorest.WithBaseURL(to.String(vnplr.NextLink)))
-}
-
-// VirtualNetworkPeeringListResultPage contains a page of VirtualNetworkPeering values.
-type VirtualNetworkPeeringListResultPage struct {
- fn func(context.Context, VirtualNetworkPeeringListResult) (VirtualNetworkPeeringListResult, error)
- vnplr VirtualNetworkPeeringListResult
-}
-
-// 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 *VirtualNetworkPeeringListResultPage) NextWithContext(ctx context.Context) (err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkPeeringListResultPage.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.vnplr)
- if err != nil {
- return err
- }
- page.vnplr = 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 *VirtualNetworkPeeringListResultPage) Next() error {
- return page.NextWithContext(context.Background())
-}
-
-// NotDone returns true if the page enumeration should be started or is not yet complete.
-func (page VirtualNetworkPeeringListResultPage) NotDone() bool {
- return !page.vnplr.IsEmpty()
-}
-
-// Response returns the raw server response from the last page request.
-func (page VirtualNetworkPeeringListResultPage) Response() VirtualNetworkPeeringListResult {
- return page.vnplr
-}
-
-// Values returns the slice of values for the current page or nil if there are no values.
-func (page VirtualNetworkPeeringListResultPage) Values() []VirtualNetworkPeering {
- if page.vnplr.IsEmpty() {
- return nil
- }
- return *page.vnplr.Value
-}
-
-// Creates a new instance of the VirtualNetworkPeeringListResultPage type.
-func NewVirtualNetworkPeeringListResultPage(getNextPage func(context.Context, VirtualNetworkPeeringListResult) (VirtualNetworkPeeringListResult, error)) VirtualNetworkPeeringListResultPage {
- return VirtualNetworkPeeringListResultPage{fn: getNextPage}
-}
-
-// VirtualNetworkPeeringPropertiesFormat properties of the virtual network peering.
-type VirtualNetworkPeeringPropertiesFormat struct {
- // AllowVirtualNetworkAccess - Whether the VMs in the linked virtual network space would be able to access all the VMs in local Virtual network space.
- AllowVirtualNetworkAccess *bool `json:"allowVirtualNetworkAccess,omitempty"`
- // AllowForwardedTraffic - Whether the forwarded traffic from the VMs in the remote virtual network will be allowed/disallowed.
- AllowForwardedTraffic *bool `json:"allowForwardedTraffic,omitempty"`
- // AllowGatewayTransit - If gateway links can be used in remote virtual networking to link to this virtual network.
- AllowGatewayTransit *bool `json:"allowGatewayTransit,omitempty"`
- // UseRemoteGateways - If remote gateways can be used on this virtual network. If the flag is set to true, and allowGatewayTransit on remote peering is also true, virtual network will use gateways of remote virtual network for transit. Only one peering can have this flag set to true. This flag cannot be set if virtual network already has a gateway.
- UseRemoteGateways *bool `json:"useRemoteGateways,omitempty"`
- // RemoteVirtualNetwork - The reference of the remote virtual network. The remote virtual network can be in the same or different region (preview). See here to register for the preview and learn more (https://docs.microsoft.com/en-us/azure/virtual-network/virtual-network-create-peering).
- RemoteVirtualNetwork *SubResource `json:"remoteVirtualNetwork,omitempty"`
- // RemoteAddressSpace - The reference of the remote virtual network address space.
- RemoteAddressSpace *AddressSpace `json:"remoteAddressSpace,omitempty"`
- // PeeringState - The status of the virtual network peering. Possible values are 'Initiated', 'Connected', and 'Disconnected'. Possible values include: 'VirtualNetworkPeeringStateInitiated', 'VirtualNetworkPeeringStateConnected', 'VirtualNetworkPeeringStateDisconnected'
- PeeringState VirtualNetworkPeeringState `json:"peeringState,omitempty"`
- // ProvisioningState - The provisioning state of the resource.
- ProvisioningState *string `json:"provisioningState,omitempty"`
-}
-
-// VirtualNetworkPeeringsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
-// long-running operation.
-type VirtualNetworkPeeringsCreateOrUpdateFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *VirtualNetworkPeeringsCreateOrUpdateFuture) Result(client VirtualNetworkPeeringsClient) (vnp VirtualNetworkPeering, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkPeeringsCreateOrUpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if vnp.Response.Response, err = future.GetResult(sender); err == nil && vnp.Response.Response.StatusCode != http.StatusNoContent {
- vnp, err = client.CreateOrUpdateResponder(vnp.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsCreateOrUpdateFuture", "Result", vnp.Response.Response, "Failure responding to request")
- }
- }
- return
-}
-
-// VirtualNetworkPeeringsDeleteFuture an abstraction for monitoring and retrieving the results of a
-// long-running operation.
-type VirtualNetworkPeeringsDeleteFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *VirtualNetworkPeeringsDeleteFuture) Result(client VirtualNetworkPeeringsClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsDeleteFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkPeeringsDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
-}
-
-// VirtualNetworkPropertiesFormat properties of the virtual network.
-type VirtualNetworkPropertiesFormat struct {
- // AddressSpace - The AddressSpace that contains an array of IP address ranges that can be used by subnets.
- AddressSpace *AddressSpace `json:"addressSpace,omitempty"`
- // DhcpOptions - The dhcpOptions that contains an array of DNS servers available to VMs deployed in the virtual network.
- DhcpOptions *DhcpOptions `json:"dhcpOptions,omitempty"`
- // Subnets - A list of subnets in a Virtual Network.
- Subnets *[]Subnet `json:"subnets,omitempty"`
- // VirtualNetworkPeerings - A list of peerings in a Virtual Network.
- VirtualNetworkPeerings *[]VirtualNetworkPeering `json:"virtualNetworkPeerings,omitempty"`
- // ResourceGUID - The resourceGuid property of the Virtual Network resource.
- ResourceGUID *string `json:"resourceGuid,omitempty"`
- // ProvisioningState - The provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
- ProvisioningState *string `json:"provisioningState,omitempty"`
- // EnableDdosProtection - Indicates if DDoS protection is enabled for all the protected resources in the virtual network. It requires a DDoS protection plan associated with the resource.
- EnableDdosProtection *bool `json:"enableDdosProtection,omitempty"`
- // EnableVMProtection - Indicates if VM protection is enabled for all the subnets in the virtual network.
- EnableVMProtection *bool `json:"enableVmProtection,omitempty"`
- // DdosProtectionPlan - The DDoS protection plan associated with the virtual network.
- DdosProtectionPlan *SubResource `json:"ddosProtectionPlan,omitempty"`
-}
-
-// VirtualNetworksCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
-// long-running operation.
-type VirtualNetworksCreateOrUpdateFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *VirtualNetworksCreateOrUpdateFuture) Result(client VirtualNetworksClient) (vn VirtualNetwork, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworksCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.VirtualNetworksCreateOrUpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if vn.Response.Response, err = future.GetResult(sender); err == nil && vn.Response.Response.StatusCode != http.StatusNoContent {
- vn, err = client.CreateOrUpdateResponder(vn.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworksCreateOrUpdateFuture", "Result", vn.Response.Response, "Failure responding to request")
- }
- }
- return
-}
-
-// VirtualNetworksDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
-type VirtualNetworksDeleteFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *VirtualNetworksDeleteFuture) Result(client VirtualNetworksClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworksDeleteFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.VirtualNetworksDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
-}
-
-// VirtualNetworksUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
-type VirtualNetworksUpdateTagsFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *VirtualNetworksUpdateTagsFuture) Result(client VirtualNetworksClient) (vn VirtualNetwork, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworksUpdateTagsFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.VirtualNetworksUpdateTagsFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if vn.Response.Response, err = future.GetResult(sender); err == nil && vn.Response.Response.StatusCode != http.StatusNoContent {
- vn, err = client.UpdateTagsResponder(vn.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworksUpdateTagsFuture", "Result", vn.Response.Response, "Failure responding to request")
- }
- }
- return
-}
-
-// VirtualNetworkTap virtual Network Tap resource
-type VirtualNetworkTap struct {
- autorest.Response `json:"-"`
- // VirtualNetworkTapPropertiesFormat - Virtual Network Tap Properties.
- *VirtualNetworkTapPropertiesFormat `json:"properties,omitempty"`
- // Etag - Gets a unique read-only string that changes whenever the resource is updated.
- Etag *string `json:"etag,omitempty"`
- // ID - 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 VirtualNetworkTap.
-func (vnt VirtualNetworkTap) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if vnt.VirtualNetworkTapPropertiesFormat != nil {
- objectMap["properties"] = vnt.VirtualNetworkTapPropertiesFormat
- }
- if vnt.Etag != nil {
- objectMap["etag"] = vnt.Etag
- }
- if vnt.ID != nil {
- objectMap["id"] = vnt.ID
- }
- if vnt.Location != nil {
- objectMap["location"] = vnt.Location
- }
- if vnt.Tags != nil {
- objectMap["tags"] = vnt.Tags
- }
- return json.Marshal(objectMap)
-}
-
-// UnmarshalJSON is the custom unmarshaler for VirtualNetworkTap struct.
-func (vnt *VirtualNetworkTap) 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 virtualNetworkTapPropertiesFormat VirtualNetworkTapPropertiesFormat
- err = json.Unmarshal(*v, &virtualNetworkTapPropertiesFormat)
- if err != nil {
- return err
- }
- vnt.VirtualNetworkTapPropertiesFormat = &virtualNetworkTapPropertiesFormat
- }
- case "etag":
- if v != nil {
- var etag string
- err = json.Unmarshal(*v, &etag)
- if err != nil {
- return err
- }
- vnt.Etag = &etag
- }
- case "id":
- if v != nil {
- var ID string
- err = json.Unmarshal(*v, &ID)
- if err != nil {
- return err
- }
- vnt.ID = &ID
- }
- case "name":
- if v != nil {
- var name string
- err = json.Unmarshal(*v, &name)
- if err != nil {
- return err
- }
- vnt.Name = &name
- }
- case "type":
- if v != nil {
- var typeVar string
- err = json.Unmarshal(*v, &typeVar)
- if err != nil {
- return err
- }
- vnt.Type = &typeVar
- }
- case "location":
- if v != nil {
- var location string
- err = json.Unmarshal(*v, &location)
- if err != nil {
- return err
- }
- vnt.Location = &location
- }
- case "tags":
- if v != nil {
- var tags map[string]*string
- err = json.Unmarshal(*v, &tags)
- if err != nil {
- return err
- }
- vnt.Tags = tags
- }
- }
- }
-
- return nil
-}
-
-// VirtualNetworkTapListResult response for ListVirtualNetworkTap API service call.
-type VirtualNetworkTapListResult struct {
- autorest.Response `json:"-"`
- // Value - A list of VirtualNetworkTaps in a resource group.
- Value *[]VirtualNetworkTap `json:"value,omitempty"`
- // NextLink - The URL to get the next set of results.
- NextLink *string `json:"nextLink,omitempty"`
-}
-
-// VirtualNetworkTapListResultIterator provides access to a complete listing of VirtualNetworkTap values.
-type VirtualNetworkTapListResultIterator struct {
- i int
- page VirtualNetworkTapListResultPage
-}
-
-// 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 *VirtualNetworkTapListResultIterator) NextWithContext(ctx context.Context) (err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkTapListResultIterator.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 *VirtualNetworkTapListResultIterator) Next() error {
- return iter.NextWithContext(context.Background())
-}
-
-// NotDone returns true if the enumeration should be started or is not yet complete.
-func (iter VirtualNetworkTapListResultIterator) 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 VirtualNetworkTapListResultIterator) Response() VirtualNetworkTapListResult {
- 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 VirtualNetworkTapListResultIterator) Value() VirtualNetworkTap {
- if !iter.page.NotDone() {
- return VirtualNetworkTap{}
- }
- return iter.page.Values()[iter.i]
-}
-
-// Creates a new instance of the VirtualNetworkTapListResultIterator type.
-func NewVirtualNetworkTapListResultIterator(page VirtualNetworkTapListResultPage) VirtualNetworkTapListResultIterator {
- return VirtualNetworkTapListResultIterator{page: page}
-}
-
-// IsEmpty returns true if the ListResult contains no values.
-func (vntlr VirtualNetworkTapListResult) IsEmpty() bool {
- return vntlr.Value == nil || len(*vntlr.Value) == 0
-}
-
-// hasNextLink returns true if the NextLink is not empty.
-func (vntlr VirtualNetworkTapListResult) hasNextLink() bool {
- return vntlr.NextLink != nil && len(*vntlr.NextLink) != 0
-}
-
-// virtualNetworkTapListResultPreparer prepares a request to retrieve the next set of results.
-// It returns nil if no more results exist.
-func (vntlr VirtualNetworkTapListResult) virtualNetworkTapListResultPreparer(ctx context.Context) (*http.Request, error) {
- if !vntlr.hasNextLink() {
- return nil, nil
- }
- return autorest.Prepare((&http.Request{}).WithContext(ctx),
- autorest.AsJSON(),
- autorest.AsGet(),
- autorest.WithBaseURL(to.String(vntlr.NextLink)))
-}
-
-// VirtualNetworkTapListResultPage contains a page of VirtualNetworkTap values.
-type VirtualNetworkTapListResultPage struct {
- fn func(context.Context, VirtualNetworkTapListResult) (VirtualNetworkTapListResult, error)
- vntlr VirtualNetworkTapListResult
-}
-
-// 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 *VirtualNetworkTapListResultPage) NextWithContext(ctx context.Context) (err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkTapListResultPage.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.vntlr)
- if err != nil {
- return err
- }
- page.vntlr = 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 *VirtualNetworkTapListResultPage) Next() error {
- return page.NextWithContext(context.Background())
-}
-
-// NotDone returns true if the page enumeration should be started or is not yet complete.
-func (page VirtualNetworkTapListResultPage) NotDone() bool {
- return !page.vntlr.IsEmpty()
-}
-
-// Response returns the raw server response from the last page request.
-func (page VirtualNetworkTapListResultPage) Response() VirtualNetworkTapListResult {
- return page.vntlr
-}
-
-// Values returns the slice of values for the current page or nil if there are no values.
-func (page VirtualNetworkTapListResultPage) Values() []VirtualNetworkTap {
- if page.vntlr.IsEmpty() {
- return nil
- }
- return *page.vntlr.Value
-}
-
-// Creates a new instance of the VirtualNetworkTapListResultPage type.
-func NewVirtualNetworkTapListResultPage(getNextPage func(context.Context, VirtualNetworkTapListResult) (VirtualNetworkTapListResult, error)) VirtualNetworkTapListResultPage {
- return VirtualNetworkTapListResultPage{fn: getNextPage}
-}
-
-// VirtualNetworkTapPropertiesFormat virtual Network Tap properties.
-type VirtualNetworkTapPropertiesFormat struct {
- // NetworkInterfaceTapConfigurations - READ-ONLY; Specifies the list of resource IDs for the network interface IP configuration that needs to be tapped.
- NetworkInterfaceTapConfigurations *[]InterfaceTapConfiguration `json:"networkInterfaceTapConfigurations,omitempty"`
- // ResourceGUID - READ-ONLY; The resourceGuid property of the virtual network tap.
- ResourceGUID *string `json:"resourceGuid,omitempty"`
- // ProvisioningState - READ-ONLY; The provisioning state of the virtual network tap. Possible values are: 'Updating', 'Deleting', and 'Failed'.
- ProvisioningState *string `json:"provisioningState,omitempty"`
- // DestinationNetworkInterfaceIPConfiguration - The reference to the private IP Address of the collector nic that will receive the tap
- DestinationNetworkInterfaceIPConfiguration *InterfaceIPConfiguration `json:"destinationNetworkInterfaceIPConfiguration,omitempty"`
- // DestinationLoadBalancerFrontEndIPConfiguration - The reference to the private IP address on the internal Load Balancer that will receive the tap
- DestinationLoadBalancerFrontEndIPConfiguration *FrontendIPConfiguration `json:"destinationLoadBalancerFrontEndIPConfiguration,omitempty"`
- // DestinationPort - The VXLAN destination port that will receive the tapped traffic.
- DestinationPort *int32 `json:"destinationPort,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for VirtualNetworkTapPropertiesFormat.
-func (vntpf VirtualNetworkTapPropertiesFormat) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if vntpf.DestinationNetworkInterfaceIPConfiguration != nil {
- objectMap["destinationNetworkInterfaceIPConfiguration"] = vntpf.DestinationNetworkInterfaceIPConfiguration
- }
- if vntpf.DestinationLoadBalancerFrontEndIPConfiguration != nil {
- objectMap["destinationLoadBalancerFrontEndIPConfiguration"] = vntpf.DestinationLoadBalancerFrontEndIPConfiguration
- }
- if vntpf.DestinationPort != nil {
- objectMap["destinationPort"] = vntpf.DestinationPort
- }
- return json.Marshal(objectMap)
-}
-
-// VirtualNetworkTapsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
-// long-running operation.
-type VirtualNetworkTapsCreateOrUpdateFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *VirtualNetworkTapsCreateOrUpdateFuture) Result(client VirtualNetworkTapsClient) (vnt VirtualNetworkTap, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkTapsCreateOrUpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if vnt.Response.Response, err = future.GetResult(sender); err == nil && vnt.Response.Response.StatusCode != http.StatusNoContent {
- vnt, err = client.CreateOrUpdateResponder(vnt.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsCreateOrUpdateFuture", "Result", vnt.Response.Response, "Failure responding to request")
- }
- }
- return
-}
-
-// VirtualNetworkTapsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
-type VirtualNetworkTapsDeleteFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *VirtualNetworkTapsDeleteFuture) Result(client VirtualNetworkTapsClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsDeleteFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkTapsDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
-}
-
-// VirtualNetworkTapsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
-// long-running operation.
-type VirtualNetworkTapsUpdateTagsFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *VirtualNetworkTapsUpdateTagsFuture) Result(client VirtualNetworkTapsClient) (vnt VirtualNetworkTap, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsUpdateTagsFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkTapsUpdateTagsFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if vnt.Response.Response, err = future.GetResult(sender); err == nil && vnt.Response.Response.StatusCode != http.StatusNoContent {
- vnt, err = client.UpdateTagsResponder(vnt.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsUpdateTagsFuture", "Result", vnt.Response.Response, "Failure responding to request")
- }
- }
- return
-}
-
-// VirtualNetworkUsage usage details for subnet.
-type VirtualNetworkUsage struct {
- // CurrentValue - READ-ONLY; Indicates number of IPs used from the Subnet.
- CurrentValue *float64 `json:"currentValue,omitempty"`
- // ID - READ-ONLY; Subnet identifier.
- ID *string `json:"id,omitempty"`
- // Limit - READ-ONLY; Indicates the size of the subnet.
- Limit *float64 `json:"limit,omitempty"`
- // Name - READ-ONLY; The name containing common and localized value for usage.
- Name *VirtualNetworkUsageName `json:"name,omitempty"`
- // Unit - READ-ONLY; Usage units. Returns 'Count'
- Unit *string `json:"unit,omitempty"`
-}
-
-// VirtualNetworkUsageName usage strings container.
-type VirtualNetworkUsageName struct {
- // LocalizedValue - READ-ONLY; Localized subnet size and usage string.
- LocalizedValue *string `json:"localizedValue,omitempty"`
- // Value - READ-ONLY; Subnet size and usage string.
- Value *string `json:"value,omitempty"`
-}
-
-// VirtualWAN virtualWAN Resource.
-type VirtualWAN struct {
- autorest.Response `json:"-"`
- *VirtualWanProperties `json:"properties,omitempty"`
- // Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
- Etag *string `json:"etag,omitempty"`
- // ID - 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 VirtualWAN.
-func (vw VirtualWAN) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if vw.VirtualWanProperties != nil {
- objectMap["properties"] = vw.VirtualWanProperties
- }
- if vw.ID != nil {
- objectMap["id"] = vw.ID
- }
- if vw.Location != nil {
- objectMap["location"] = vw.Location
- }
- if vw.Tags != nil {
- objectMap["tags"] = vw.Tags
- }
- return json.Marshal(objectMap)
-}
-
-// UnmarshalJSON is the custom unmarshaler for VirtualWAN struct.
-func (vw *VirtualWAN) 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 virtualWanProperties VirtualWanProperties
- err = json.Unmarshal(*v, &virtualWanProperties)
- if err != nil {
- return err
- }
- vw.VirtualWanProperties = &virtualWanProperties
- }
- case "etag":
- if v != nil {
- var etag string
- err = json.Unmarshal(*v, &etag)
- if err != nil {
- return err
- }
- vw.Etag = &etag
- }
- case "id":
- if v != nil {
- var ID string
- err = json.Unmarshal(*v, &ID)
- if err != nil {
- return err
- }
- vw.ID = &ID
- }
- case "name":
- if v != nil {
- var name string
- err = json.Unmarshal(*v, &name)
- if err != nil {
- return err
- }
- vw.Name = &name
- }
- case "type":
- if v != nil {
- var typeVar string
- err = json.Unmarshal(*v, &typeVar)
- if err != nil {
- return err
- }
- vw.Type = &typeVar
- }
- case "location":
- if v != nil {
- var location string
- err = json.Unmarshal(*v, &location)
- if err != nil {
- return err
- }
- vw.Location = &location
- }
- case "tags":
- if v != nil {
- var tags map[string]*string
- err = json.Unmarshal(*v, &tags)
- if err != nil {
- return err
- }
- vw.Tags = tags
- }
- }
- }
-
- return nil
-}
-
-// VirtualWanProperties parameters for VirtualWAN
-type VirtualWanProperties struct {
- // DisableVpnEncryption - Vpn encryption to be disabled or not.
- DisableVpnEncryption *bool `json:"disableVpnEncryption,omitempty"`
- // VirtualHubs - READ-ONLY; List of VirtualHubs in the VirtualWAN.
- VirtualHubs *[]SubResource `json:"virtualHubs,omitempty"`
- // VpnSites - READ-ONLY
- VpnSites *[]SubResource `json:"vpnSites,omitempty"`
- // SecurityProviderName - The Security Provider name.
- SecurityProviderName *string `json:"securityProviderName,omitempty"`
- // AllowBranchToBranchTraffic - True if branch to branch traffic is allowed.
- AllowBranchToBranchTraffic *bool `json:"allowBranchToBranchTraffic,omitempty"`
- // AllowVnetToVnetTraffic - True if Vnet to Vnet traffic is allowed.
- AllowVnetToVnetTraffic *bool `json:"allowVnetToVnetTraffic,omitempty"`
- // Office365LocalBreakoutCategory - The office local breakout category. Possible values include: 'OfficeTrafficCategoryOptimize', 'OfficeTrafficCategoryOptimizeAndAllow', 'OfficeTrafficCategoryAll', 'OfficeTrafficCategoryNone'
- Office365LocalBreakoutCategory OfficeTrafficCategory `json:"office365LocalBreakoutCategory,omitempty"`
- // P2SVpnServerConfigurations - List of all P2SVpnServerConfigurations associated with the virtual wan.
- P2SVpnServerConfigurations *[]P2SVpnServerConfiguration `json:"p2SVpnServerConfigurations,omitempty"`
- // ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
- ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for VirtualWanProperties.
-func (vwp VirtualWanProperties) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if vwp.DisableVpnEncryption != nil {
- objectMap["disableVpnEncryption"] = vwp.DisableVpnEncryption
- }
- if vwp.SecurityProviderName != nil {
- objectMap["securityProviderName"] = vwp.SecurityProviderName
- }
- if vwp.AllowBranchToBranchTraffic != nil {
- objectMap["allowBranchToBranchTraffic"] = vwp.AllowBranchToBranchTraffic
- }
- if vwp.AllowVnetToVnetTraffic != nil {
- objectMap["allowVnetToVnetTraffic"] = vwp.AllowVnetToVnetTraffic
- }
- if vwp.Office365LocalBreakoutCategory != "" {
- objectMap["office365LocalBreakoutCategory"] = vwp.Office365LocalBreakoutCategory
- }
- if vwp.P2SVpnServerConfigurations != nil {
- objectMap["p2SVpnServerConfigurations"] = vwp.P2SVpnServerConfigurations
- }
- if vwp.ProvisioningState != "" {
- objectMap["provisioningState"] = vwp.ProvisioningState
- }
- return json.Marshal(objectMap)
-}
-
-// VirtualWansCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
-type VirtualWansCreateOrUpdateFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *VirtualWansCreateOrUpdateFuture) Result(client VirtualWansClient) (vw VirtualWAN, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualWansCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.VirtualWansCreateOrUpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if vw.Response.Response, err = future.GetResult(sender); err == nil && vw.Response.Response.StatusCode != http.StatusNoContent {
- vw, err = client.CreateOrUpdateResponder(vw.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualWansCreateOrUpdateFuture", "Result", vw.Response.Response, "Failure responding to request")
- }
- }
- return
-}
-
-// VirtualWansDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
-type VirtualWansDeleteFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *VirtualWansDeleteFuture) Result(client VirtualWansClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualWansDeleteFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.VirtualWansDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
-}
-
-// VirtualWanSecurityProvider collection of SecurityProviders.
-type VirtualWanSecurityProvider struct {
- // Name - Name of the security provider.
- Name *string `json:"name,omitempty"`
- // URL - Url of the security provider.
- URL *string `json:"url,omitempty"`
- // Type - Name of the security provider. Possible values include: 'External', 'Native'
- Type VirtualWanSecurityProviderType `json:"type,omitempty"`
-}
-
-// VirtualWanSecurityProviders collection of SecurityProviders.
-type VirtualWanSecurityProviders struct {
- autorest.Response `json:"-"`
- SupportedProviders *[]VirtualWanSecurityProvider `json:"supportedProviders,omitempty"`
-}
-
-// VirtualWansUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
-type VirtualWansUpdateTagsFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *VirtualWansUpdateTagsFuture) Result(client VirtualWansClient) (vw VirtualWAN, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualWansUpdateTagsFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.VirtualWansUpdateTagsFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if vw.Response.Response, err = future.GetResult(sender); err == nil && vw.Response.Response.StatusCode != http.StatusNoContent {
- vw, err = client.UpdateTagsResponder(vw.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualWansUpdateTagsFuture", "Result", vw.Response.Response, "Failure responding to request")
- }
- }
- return
-}
-
-// VpnClientConfiguration vpnClientConfiguration for P2S client.
-type VpnClientConfiguration struct {
- // VpnClientAddressPool - The reference of the address space resource which represents Address space for P2S VpnClient.
- VpnClientAddressPool *AddressSpace `json:"vpnClientAddressPool,omitempty"`
- // VpnClientRootCertificates - VpnClientRootCertificate for virtual network gateway.
- VpnClientRootCertificates *[]VpnClientRootCertificate `json:"vpnClientRootCertificates,omitempty"`
- // VpnClientRevokedCertificates - VpnClientRevokedCertificate for Virtual network gateway.
- VpnClientRevokedCertificates *[]VpnClientRevokedCertificate `json:"vpnClientRevokedCertificates,omitempty"`
- // VpnClientProtocols - VpnClientProtocols for Virtual network gateway.
- VpnClientProtocols *[]VpnClientProtocol `json:"vpnClientProtocols,omitempty"`
- // VpnClientIpsecPolicies - VpnClientIpsecPolicies for virtual network gateway P2S client.
- VpnClientIpsecPolicies *[]IpsecPolicy `json:"vpnClientIpsecPolicies,omitempty"`
- // RadiusServerAddress - The radius server address property of the VirtualNetworkGateway resource for vpn client connection.
- RadiusServerAddress *string `json:"radiusServerAddress,omitempty"`
- // RadiusServerSecret - The radius secret property of the VirtualNetworkGateway resource for vpn client connection.
- RadiusServerSecret *string `json:"radiusServerSecret,omitempty"`
-}
-
-// VpnClientConnectionHealth vpnClientConnectionHealth properties
-type VpnClientConnectionHealth struct {
- // TotalIngressBytesTransferred - READ-ONLY; Total of the Ingress Bytes Transferred in this P2S Vpn connection
- TotalIngressBytesTransferred *int64 `json:"totalIngressBytesTransferred,omitempty"`
- // TotalEgressBytesTransferred - READ-ONLY; Total of the Egress Bytes Transferred in this connection
- TotalEgressBytesTransferred *int64 `json:"totalEgressBytesTransferred,omitempty"`
- // VpnClientConnectionsCount - The total of p2s vpn clients connected at this time to this P2SVpnGateway.
- VpnClientConnectionsCount *int32 `json:"vpnClientConnectionsCount,omitempty"`
- // AllocatedIPAddresses - List of allocated ip addresses to the connected p2s vpn clients.
- AllocatedIPAddresses *[]string `json:"allocatedIpAddresses,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for VpnClientConnectionHealth.
-func (vcch VpnClientConnectionHealth) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if vcch.VpnClientConnectionsCount != nil {
- objectMap["vpnClientConnectionsCount"] = vcch.VpnClientConnectionsCount
- }
- if vcch.AllocatedIPAddresses != nil {
- objectMap["allocatedIpAddresses"] = vcch.AllocatedIPAddresses
- }
- return json.Marshal(objectMap)
-}
-
-// VpnClientIPsecParameters an IPSec parameters for a virtual network gateway P2S connection.
-type VpnClientIPsecParameters struct {
- autorest.Response `json:"-"`
- // SaLifeTimeSeconds - The IPSec Security Association (also called Quick Mode or Phase 2 SA) lifetime in seconds for P2S client.
- SaLifeTimeSeconds *int32 `json:"saLifeTimeSeconds,omitempty"`
- // SaDataSizeKilobytes - The IPSec Security Association (also called Quick Mode or Phase 2 SA) payload size in KB for P2S client..
- SaDataSizeKilobytes *int32 `json:"saDataSizeKilobytes,omitempty"`
- // IpsecEncryption - The IPSec encryption algorithm (IKE phase 1). Possible values include: 'IpsecEncryptionNone', 'IpsecEncryptionDES', 'IpsecEncryptionDES3', 'IpsecEncryptionAES128', 'IpsecEncryptionAES192', 'IpsecEncryptionAES256', 'IpsecEncryptionGCMAES128', 'IpsecEncryptionGCMAES192', 'IpsecEncryptionGCMAES256'
- IpsecEncryption IpsecEncryption `json:"ipsecEncryption,omitempty"`
- // IpsecIntegrity - The IPSec integrity algorithm (IKE phase 1). Possible values include: 'IpsecIntegrityMD5', 'IpsecIntegritySHA1', 'IpsecIntegritySHA256', 'IpsecIntegrityGCMAES128', 'IpsecIntegrityGCMAES192', 'IpsecIntegrityGCMAES256'
- IpsecIntegrity IpsecIntegrity `json:"ipsecIntegrity,omitempty"`
- // IkeEncryption - The IKE encryption algorithm (IKE phase 2). Possible values include: 'DES', 'DES3', 'AES128', 'AES192', 'AES256', 'GCMAES256', 'GCMAES128'
- IkeEncryption IkeEncryption `json:"ikeEncryption,omitempty"`
- // IkeIntegrity - The IKE integrity algorithm (IKE phase 2). Possible values include: 'IkeIntegrityMD5', 'IkeIntegritySHA1', 'IkeIntegritySHA256', 'IkeIntegritySHA384', 'IkeIntegrityGCMAES256', 'IkeIntegrityGCMAES128'
- IkeIntegrity IkeIntegrity `json:"ikeIntegrity,omitempty"`
- // DhGroup - The DH Groups used in IKE Phase 1 for initial SA. Possible values include: 'None', 'DHGroup1', 'DHGroup2', 'DHGroup14', 'DHGroup2048', 'ECP256', 'ECP384', 'DHGroup24'
- DhGroup DhGroup `json:"dhGroup,omitempty"`
- // PfsGroup - The Pfs Groups used in IKE Phase 2 for new child SA. Possible values include: 'PfsGroupNone', 'PfsGroupPFS1', 'PfsGroupPFS2', 'PfsGroupPFS2048', 'PfsGroupECP256', 'PfsGroupECP384', 'PfsGroupPFS24', 'PfsGroupPFS14', 'PfsGroupPFSMM'
- PfsGroup PfsGroup `json:"pfsGroup,omitempty"`
-}
-
-// VpnClientParameters vpn Client Parameters for package generation
-type VpnClientParameters struct {
- // ProcessorArchitecture - VPN client Processor Architecture. Possible values are: 'AMD64' and 'X86'. Possible values include: 'Amd64', 'X86'
- ProcessorArchitecture ProcessorArchitecture `json:"processorArchitecture,omitempty"`
- // AuthenticationMethod - VPN client Authentication Method. Possible values are: 'EAPTLS' and 'EAPMSCHAPv2'. Possible values include: 'EAPTLS', 'EAPMSCHAPv2'
- AuthenticationMethod AuthenticationMethod `json:"authenticationMethod,omitempty"`
- // RadiusServerAuthCertificate - The public certificate data for the radius server authentication certificate as a Base-64 encoded string. Required only if external radius authentication has been configured with EAPTLS authentication.
- RadiusServerAuthCertificate *string `json:"radiusServerAuthCertificate,omitempty"`
- // ClientRootCertificates - A list of client root certificates public certificate data encoded as Base-64 strings. Optional parameter for external radius based authentication with EAPTLS.
- ClientRootCertificates *[]string `json:"clientRootCertificates,omitempty"`
-}
-
-// VpnClientRevokedCertificate VPN client revoked certificate of virtual network gateway.
-type VpnClientRevokedCertificate struct {
- // VpnClientRevokedCertificatePropertiesFormat - Properties of the vpn client revoked certificate.
- *VpnClientRevokedCertificatePropertiesFormat `json:"properties,omitempty"`
- // Name - 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"`
- // Etag - A unique read-only string that changes whenever the resource is updated.
- Etag *string `json:"etag,omitempty"`
- // ID - Resource ID.
- ID *string `json:"id,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for VpnClientRevokedCertificate.
-func (vcrc VpnClientRevokedCertificate) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if vcrc.VpnClientRevokedCertificatePropertiesFormat != nil {
- objectMap["properties"] = vcrc.VpnClientRevokedCertificatePropertiesFormat
- }
- if vcrc.Name != nil {
- objectMap["name"] = vcrc.Name
- }
- if vcrc.Etag != nil {
- objectMap["etag"] = vcrc.Etag
- }
- if vcrc.ID != nil {
- objectMap["id"] = vcrc.ID
- }
- return json.Marshal(objectMap)
-}
-
-// UnmarshalJSON is the custom unmarshaler for VpnClientRevokedCertificate struct.
-func (vcrc *VpnClientRevokedCertificate) 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 vpnClientRevokedCertificatePropertiesFormat VpnClientRevokedCertificatePropertiesFormat
- err = json.Unmarshal(*v, &vpnClientRevokedCertificatePropertiesFormat)
- if err != nil {
- return err
- }
- vcrc.VpnClientRevokedCertificatePropertiesFormat = &vpnClientRevokedCertificatePropertiesFormat
- }
- case "name":
- if v != nil {
- var name string
- err = json.Unmarshal(*v, &name)
- if err != nil {
- return err
- }
- vcrc.Name = &name
- }
- case "etag":
- if v != nil {
- var etag string
- err = json.Unmarshal(*v, &etag)
- if err != nil {
- return err
- }
- vcrc.Etag = &etag
- }
- case "id":
- if v != nil {
- var ID string
- err = json.Unmarshal(*v, &ID)
- if err != nil {
- return err
- }
- vcrc.ID = &ID
- }
- }
- }
-
- return nil
-}
-
-// VpnClientRevokedCertificatePropertiesFormat properties of the revoked VPN client certificate of virtual
-// network gateway.
-type VpnClientRevokedCertificatePropertiesFormat struct {
- // Thumbprint - The revoked VPN client certificate thumbprint.
- Thumbprint *string `json:"thumbprint,omitempty"`
- // ProvisioningState - READ-ONLY; The provisioning state of the VPN client revoked certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
- ProvisioningState *string `json:"provisioningState,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for VpnClientRevokedCertificatePropertiesFormat.
-func (vcrcpf VpnClientRevokedCertificatePropertiesFormat) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if vcrcpf.Thumbprint != nil {
- objectMap["thumbprint"] = vcrcpf.Thumbprint
- }
- return json.Marshal(objectMap)
-}
-
-// VpnClientRootCertificate VPN client root certificate of virtual network gateway
-type VpnClientRootCertificate struct {
- // VpnClientRootCertificatePropertiesFormat - Properties of the vpn client root certificate.
- *VpnClientRootCertificatePropertiesFormat `json:"properties,omitempty"`
- // Name - 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"`
- // Etag - A unique read-only string that changes whenever the resource is updated.
- Etag *string `json:"etag,omitempty"`
- // ID - Resource ID.
- ID *string `json:"id,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for VpnClientRootCertificate.
-func (vcrc VpnClientRootCertificate) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if vcrc.VpnClientRootCertificatePropertiesFormat != nil {
- objectMap["properties"] = vcrc.VpnClientRootCertificatePropertiesFormat
- }
- if vcrc.Name != nil {
- objectMap["name"] = vcrc.Name
- }
- if vcrc.Etag != nil {
- objectMap["etag"] = vcrc.Etag
- }
- if vcrc.ID != nil {
- objectMap["id"] = vcrc.ID
- }
- return json.Marshal(objectMap)
-}
-
-// UnmarshalJSON is the custom unmarshaler for VpnClientRootCertificate struct.
-func (vcrc *VpnClientRootCertificate) 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 vpnClientRootCertificatePropertiesFormat VpnClientRootCertificatePropertiesFormat
- err = json.Unmarshal(*v, &vpnClientRootCertificatePropertiesFormat)
- if err != nil {
- return err
- }
- vcrc.VpnClientRootCertificatePropertiesFormat = &vpnClientRootCertificatePropertiesFormat
- }
- case "name":
- if v != nil {
- var name string
- err = json.Unmarshal(*v, &name)
- if err != nil {
- return err
- }
- vcrc.Name = &name
- }
- case "etag":
- if v != nil {
- var etag string
- err = json.Unmarshal(*v, &etag)
- if err != nil {
- return err
- }
- vcrc.Etag = &etag
- }
- case "id":
- if v != nil {
- var ID string
- err = json.Unmarshal(*v, &ID)
- if err != nil {
- return err
- }
- vcrc.ID = &ID
- }
- }
- }
-
- return nil
-}
-
-// VpnClientRootCertificatePropertiesFormat properties of SSL certificates of application gateway
-type VpnClientRootCertificatePropertiesFormat struct {
- // PublicCertData - The certificate public data.
- PublicCertData *string `json:"publicCertData,omitempty"`
- // ProvisioningState - READ-ONLY; The provisioning state of the VPN client root certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
- ProvisioningState *string `json:"provisioningState,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for VpnClientRootCertificatePropertiesFormat.
-func (vcrcpf VpnClientRootCertificatePropertiesFormat) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if vcrcpf.PublicCertData != nil {
- objectMap["publicCertData"] = vcrcpf.PublicCertData
- }
- return json.Marshal(objectMap)
-}
-
-// VpnConnection vpnConnection Resource.
-type VpnConnection struct {
- autorest.Response `json:"-"`
- *VpnConnectionProperties `json:"properties,omitempty"`
- // Name - 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"`
- // Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
- Etag *string `json:"etag,omitempty"`
- // ID - Resource ID.
- ID *string `json:"id,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for VpnConnection.
-func (vc VpnConnection) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if vc.VpnConnectionProperties != nil {
- objectMap["properties"] = vc.VpnConnectionProperties
- }
- if vc.Name != nil {
- objectMap["name"] = vc.Name
- }
- if vc.ID != nil {
- objectMap["id"] = vc.ID
- }
- return json.Marshal(objectMap)
-}
-
-// UnmarshalJSON is the custom unmarshaler for VpnConnection struct.
-func (vc *VpnConnection) 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 vpnConnectionProperties VpnConnectionProperties
- err = json.Unmarshal(*v, &vpnConnectionProperties)
- if err != nil {
- return err
- }
- vc.VpnConnectionProperties = &vpnConnectionProperties
- }
- case "name":
- if v != nil {
- var name string
- err = json.Unmarshal(*v, &name)
- if err != nil {
- return err
- }
- vc.Name = &name
- }
- case "etag":
- if v != nil {
- var etag string
- err = json.Unmarshal(*v, &etag)
- if err != nil {
- return err
- }
- vc.Etag = &etag
- }
- case "id":
- if v != nil {
- var ID string
- err = json.Unmarshal(*v, &ID)
- if err != nil {
- return err
- }
- vc.ID = &ID
- }
- }
- }
-
- return nil
-}
-
-// VpnConnectionProperties parameters for VpnConnection
-type VpnConnectionProperties struct {
- // RemoteVpnSite - Id of the connected vpn site.
- RemoteVpnSite *SubResource `json:"remoteVpnSite,omitempty"`
- // RoutingWeight - Routing weight for vpn connection.
- RoutingWeight *int32 `json:"routingWeight,omitempty"`
- // ConnectionStatus - The connection status. Possible values include: 'VpnConnectionStatusUnknown', 'VpnConnectionStatusConnecting', 'VpnConnectionStatusConnected', 'VpnConnectionStatusNotConnected'
- ConnectionStatus VpnConnectionStatus `json:"connectionStatus,omitempty"`
- // VpnConnectionProtocolType - Connection protocol used for this connection. Possible values include: 'IKEv2', 'IKEv1'
- VpnConnectionProtocolType VirtualNetworkGatewayConnectionProtocol `json:"vpnConnectionProtocolType,omitempty"`
- // IngressBytesTransferred - READ-ONLY; Ingress bytes transferred.
- IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"`
- // EgressBytesTransferred - READ-ONLY; Egress bytes transferred.
- EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"`
- // ConnectionBandwidth - Expected bandwidth in MBPS.
- ConnectionBandwidth *int32 `json:"connectionBandwidth,omitempty"`
- // SharedKey - SharedKey for the vpn connection.
- SharedKey *string `json:"sharedKey,omitempty"`
- // EnableBgp - EnableBgp flag
- EnableBgp *bool `json:"enableBgp,omitempty"`
- // IpsecPolicies - The IPSec Policies to be considered by this connection.
- IpsecPolicies *[]IpsecPolicy `json:"ipsecPolicies,omitempty"`
- // EnableRateLimiting - EnableBgp flag
- EnableRateLimiting *bool `json:"enableRateLimiting,omitempty"`
- // EnableInternetSecurity - Enable internet security
- EnableInternetSecurity *bool `json:"enableInternetSecurity,omitempty"`
- // ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
- ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for VpnConnectionProperties.
-func (vcp VpnConnectionProperties) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if vcp.RemoteVpnSite != nil {
- objectMap["remoteVpnSite"] = vcp.RemoteVpnSite
- }
- if vcp.RoutingWeight != nil {
- objectMap["routingWeight"] = vcp.RoutingWeight
- }
- if vcp.ConnectionStatus != "" {
- objectMap["connectionStatus"] = vcp.ConnectionStatus
- }
- if vcp.VpnConnectionProtocolType != "" {
- objectMap["vpnConnectionProtocolType"] = vcp.VpnConnectionProtocolType
- }
- if vcp.ConnectionBandwidth != nil {
- objectMap["connectionBandwidth"] = vcp.ConnectionBandwidth
- }
- if vcp.SharedKey != nil {
- objectMap["sharedKey"] = vcp.SharedKey
- }
- if vcp.EnableBgp != nil {
- objectMap["enableBgp"] = vcp.EnableBgp
- }
- if vcp.IpsecPolicies != nil {
- objectMap["ipsecPolicies"] = vcp.IpsecPolicies
- }
- if vcp.EnableRateLimiting != nil {
- objectMap["enableRateLimiting"] = vcp.EnableRateLimiting
- }
- if vcp.EnableInternetSecurity != nil {
- objectMap["enableInternetSecurity"] = vcp.EnableInternetSecurity
- }
- if vcp.ProvisioningState != "" {
- objectMap["provisioningState"] = vcp.ProvisioningState
- }
- return json.Marshal(objectMap)
-}
-
-// VpnConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
-// long-running operation.
-type VpnConnectionsCreateOrUpdateFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *VpnConnectionsCreateOrUpdateFuture) Result(client VpnConnectionsClient) (vc VpnConnection, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VpnConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.VpnConnectionsCreateOrUpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if vc.Response.Response, err = future.GetResult(sender); err == nil && vc.Response.Response.StatusCode != http.StatusNoContent {
- vc, err = client.CreateOrUpdateResponder(vc.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VpnConnectionsCreateOrUpdateFuture", "Result", vc.Response.Response, "Failure responding to request")
- }
- }
- return
-}
-
-// VpnConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
-type VpnConnectionsDeleteFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *VpnConnectionsDeleteFuture) Result(client VpnConnectionsClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VpnConnectionsDeleteFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.VpnConnectionsDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
-}
-
-// VpnDeviceScriptParameters vpn device configuration script generation parameters
-type VpnDeviceScriptParameters struct {
- // Vendor - The vendor for the vpn device.
- Vendor *string `json:"vendor,omitempty"`
- // DeviceFamily - The device family for the vpn device.
- DeviceFamily *string `json:"deviceFamily,omitempty"`
- // FirmwareVersion - The firmware version for the vpn device.
- FirmwareVersion *string `json:"firmwareVersion,omitempty"`
-}
-
-// VpnGateway vpnGateway Resource.
-type VpnGateway struct {
- autorest.Response `json:"-"`
- *VpnGatewayProperties `json:"properties,omitempty"`
- // Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
- Etag *string `json:"etag,omitempty"`
- // ID - 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 VpnGateway.
-func (vg VpnGateway) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if vg.VpnGatewayProperties != nil {
- objectMap["properties"] = vg.VpnGatewayProperties
- }
- if vg.ID != nil {
- objectMap["id"] = vg.ID
- }
- if vg.Location != nil {
- objectMap["location"] = vg.Location
- }
- if vg.Tags != nil {
- objectMap["tags"] = vg.Tags
- }
- return json.Marshal(objectMap)
-}
-
-// UnmarshalJSON is the custom unmarshaler for VpnGateway struct.
-func (vg *VpnGateway) 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 vpnGatewayProperties VpnGatewayProperties
- err = json.Unmarshal(*v, &vpnGatewayProperties)
- if err != nil {
- return err
- }
- vg.VpnGatewayProperties = &vpnGatewayProperties
- }
- case "etag":
- if v != nil {
- var etag string
- err = json.Unmarshal(*v, &etag)
- if err != nil {
- return err
- }
- vg.Etag = &etag
- }
- case "id":
- if v != nil {
- var ID string
- err = json.Unmarshal(*v, &ID)
- if err != nil {
- return err
- }
- vg.ID = &ID
- }
- case "name":
- if v != nil {
- var name string
- err = json.Unmarshal(*v, &name)
- if err != nil {
- return err
- }
- vg.Name = &name
- }
- case "type":
- if v != nil {
- var typeVar string
- err = json.Unmarshal(*v, &typeVar)
- if err != nil {
- return err
- }
- vg.Type = &typeVar
- }
- case "location":
- if v != nil {
- var location string
- err = json.Unmarshal(*v, &location)
- if err != nil {
- return err
- }
- vg.Location = &location
- }
- case "tags":
- if v != nil {
- var tags map[string]*string
- err = json.Unmarshal(*v, &tags)
- if err != nil {
- return err
- }
- vg.Tags = tags
- }
- }
- }
-
- return nil
-}
-
-// VpnGatewayProperties parameters for VpnGateway
-type VpnGatewayProperties struct {
- // VirtualHub - The VirtualHub to which the gateway belongs
- VirtualHub *SubResource `json:"virtualHub,omitempty"`
- // Connections - List of all vpn connections to the gateway.
- Connections *[]VpnConnection `json:"connections,omitempty"`
- // BgpSettings - Local network gateway's BGP speaker settings.
- BgpSettings *BgpSettings `json:"bgpSettings,omitempty"`
- // ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
- ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
- // VpnGatewayScaleUnit - The scale unit for this vpn gateway.
- VpnGatewayScaleUnit *int32 `json:"vpnGatewayScaleUnit,omitempty"`
-}
-
-// VpnGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
-type VpnGatewaysCreateOrUpdateFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *VpnGatewaysCreateOrUpdateFuture) Result(client VpnGatewaysClient) (vg VpnGateway, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VpnGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.VpnGatewaysCreateOrUpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if vg.Response.Response, err = future.GetResult(sender); err == nil && vg.Response.Response.StatusCode != http.StatusNoContent {
- vg, err = client.CreateOrUpdateResponder(vg.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VpnGatewaysCreateOrUpdateFuture", "Result", vg.Response.Response, "Failure responding to request")
- }
- }
- return
-}
-
-// VpnGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
-type VpnGatewaysDeleteFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *VpnGatewaysDeleteFuture) Result(client VpnGatewaysClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VpnGatewaysDeleteFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.VpnGatewaysDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
-}
-
-// VpnGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
-type VpnGatewaysUpdateTagsFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *VpnGatewaysUpdateTagsFuture) Result(client VpnGatewaysClient) (vg VpnGateway, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VpnGatewaysUpdateTagsFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.VpnGatewaysUpdateTagsFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if vg.Response.Response, err = future.GetResult(sender); err == nil && vg.Response.Response.StatusCode != http.StatusNoContent {
- vg, err = client.UpdateTagsResponder(vg.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VpnGatewaysUpdateTagsFuture", "Result", vg.Response.Response, "Failure responding to request")
- }
- }
- return
-}
-
-// VpnProfileResponse vpn Profile Response for package generation
-type VpnProfileResponse struct {
- autorest.Response `json:"-"`
- // ProfileURL - URL to the VPN profile
- ProfileURL *string `json:"profileUrl,omitempty"`
-}
-
-// VpnSite vpnSite Resource.
-type VpnSite struct {
- autorest.Response `json:"-"`
- *VpnSiteProperties `json:"properties,omitempty"`
- // Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
- Etag *string `json:"etag,omitempty"`
- // ID - 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 VpnSite.
-func (vs VpnSite) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if vs.VpnSiteProperties != nil {
- objectMap["properties"] = vs.VpnSiteProperties
- }
- if vs.ID != nil {
- objectMap["id"] = vs.ID
- }
- if vs.Location != nil {
- objectMap["location"] = vs.Location
- }
- if vs.Tags != nil {
- objectMap["tags"] = vs.Tags
- }
- return json.Marshal(objectMap)
-}
-
-// UnmarshalJSON is the custom unmarshaler for VpnSite struct.
-func (vs *VpnSite) 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 vpnSiteProperties VpnSiteProperties
- err = json.Unmarshal(*v, &vpnSiteProperties)
- if err != nil {
- return err
- }
- vs.VpnSiteProperties = &vpnSiteProperties
- }
- case "etag":
- if v != nil {
- var etag string
- err = json.Unmarshal(*v, &etag)
- if err != nil {
- return err
- }
- vs.Etag = &etag
- }
- case "id":
- if v != nil {
- var ID string
- err = json.Unmarshal(*v, &ID)
- if err != nil {
- return err
- }
- vs.ID = &ID
- }
- case "name":
- if v != nil {
- var name string
- err = json.Unmarshal(*v, &name)
- if err != nil {
- return err
- }
- vs.Name = &name
- }
- case "type":
- if v != nil {
- var typeVar string
- err = json.Unmarshal(*v, &typeVar)
- if err != nil {
- return err
- }
- vs.Type = &typeVar
- }
- case "location":
- if v != nil {
- var location string
- err = json.Unmarshal(*v, &location)
- if err != nil {
- return err
- }
- vs.Location = &location
- }
- case "tags":
- if v != nil {
- var tags map[string]*string
- err = json.Unmarshal(*v, &tags)
- if err != nil {
- return err
- }
- vs.Tags = tags
- }
- }
- }
-
- return nil
-}
-
-// VpnSiteID vpnSite Resource.
-type VpnSiteID struct {
- // VpnSite - READ-ONLY; The resource-uri of the vpn-site for which config is to be fetched.
- VpnSite *string `json:"vpnSite,omitempty"`
-}
-
-// VpnSiteProperties parameters for VpnSite
-type VpnSiteProperties struct {
- // VirtualWan - The VirtualWAN to which the vpnSite belongs
- VirtualWan *SubResource `json:"virtualWan,omitempty"`
- // DeviceProperties - The device properties
- DeviceProperties *DeviceProperties `json:"deviceProperties,omitempty"`
- // IPAddress - The ip-address for the vpn-site.
- IPAddress *string `json:"ipAddress,omitempty"`
- // SiteKey - The key for vpn-site that can be used for connections.
- SiteKey *string `json:"siteKey,omitempty"`
- // AddressSpace - The AddressSpace that contains an array of IP address ranges.
- AddressSpace *AddressSpace `json:"addressSpace,omitempty"`
- // BgpProperties - The set of bgp properties.
- BgpProperties *BgpSettings `json:"bgpProperties,omitempty"`
- // ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
- ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
- // IsSecuritySite - IsSecuritySite flag
- IsSecuritySite *bool `json:"isSecuritySite,omitempty"`
-}
-
-// VpnSitesConfigurationDownloadFuture an abstraction for monitoring and retrieving the results of a
-// long-running operation.
-type VpnSitesConfigurationDownloadFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *VpnSitesConfigurationDownloadFuture) Result(client VpnSitesConfigurationClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VpnSitesConfigurationDownloadFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.VpnSitesConfigurationDownloadFuture")
- return
- }
- ar.Response = future.Response()
- return
-}
-
-// VpnSitesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
-type VpnSitesCreateOrUpdateFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *VpnSitesCreateOrUpdateFuture) Result(client VpnSitesClient) (vs VpnSite, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VpnSitesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.VpnSitesCreateOrUpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if vs.Response.Response, err = future.GetResult(sender); err == nil && vs.Response.Response.StatusCode != http.StatusNoContent {
- vs, err = client.CreateOrUpdateResponder(vs.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VpnSitesCreateOrUpdateFuture", "Result", vs.Response.Response, "Failure responding to request")
- }
- }
- return
-}
-
-// VpnSitesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
-type VpnSitesDeleteFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *VpnSitesDeleteFuture) Result(client VpnSitesClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VpnSitesDeleteFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.VpnSitesDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
-}
-
-// VpnSitesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
-type VpnSitesUpdateTagsFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *VpnSitesUpdateTagsFuture) Result(client VpnSitesClient) (vs VpnSite, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VpnSitesUpdateTagsFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.VpnSitesUpdateTagsFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if vs.Response.Response, err = future.GetResult(sender); err == nil && vs.Response.Response.StatusCode != http.StatusNoContent {
- vs, err = client.UpdateTagsResponder(vs.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VpnSitesUpdateTagsFuture", "Result", vs.Response.Response, "Failure responding to request")
- }
- }
- return
-}
-
-// Watcher network watcher in a resource group.
-type Watcher struct {
- autorest.Response `json:"-"`
- // Etag - A unique read-only string that changes whenever the resource is updated.
- Etag *string `json:"etag,omitempty"`
- *WatcherPropertiesFormat `json:"properties,omitempty"`
- // ID - 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 Watcher.
-func (w Watcher) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if w.Etag != nil {
- objectMap["etag"] = w.Etag
- }
- if w.WatcherPropertiesFormat != nil {
- objectMap["properties"] = w.WatcherPropertiesFormat
- }
- if w.ID != nil {
- objectMap["id"] = w.ID
- }
- if w.Location != nil {
- objectMap["location"] = w.Location
- }
- if w.Tags != nil {
- objectMap["tags"] = w.Tags
- }
- return json.Marshal(objectMap)
-}
-
-// UnmarshalJSON is the custom unmarshaler for Watcher struct.
-func (w *Watcher) 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 "etag":
- if v != nil {
- var etag string
- err = json.Unmarshal(*v, &etag)
- if err != nil {
- return err
- }
- w.Etag = &etag
- }
- case "properties":
- if v != nil {
- var watcherPropertiesFormat WatcherPropertiesFormat
- err = json.Unmarshal(*v, &watcherPropertiesFormat)
- if err != nil {
- return err
- }
- w.WatcherPropertiesFormat = &watcherPropertiesFormat
- }
- case "id":
- if v != nil {
- var ID string
- err = json.Unmarshal(*v, &ID)
- if err != nil {
- return err
- }
- w.ID = &ID
- }
- case "name":
- if v != nil {
- var name string
- err = json.Unmarshal(*v, &name)
- if err != nil {
- return err
- }
- w.Name = &name
- }
- case "type":
- if v != nil {
- var typeVar string
- err = json.Unmarshal(*v, &typeVar)
- if err != nil {
- return err
- }
- w.Type = &typeVar
- }
- case "location":
- if v != nil {
- var location string
- err = json.Unmarshal(*v, &location)
- if err != nil {
- return err
- }
- w.Location = &location
- }
- case "tags":
- if v != nil {
- var tags map[string]*string
- err = json.Unmarshal(*v, &tags)
- if err != nil {
- return err
- }
- w.Tags = tags
- }
- }
- }
-
- return nil
-}
-
-// WatcherListResult list of network watcher resources.
-type WatcherListResult struct {
- autorest.Response `json:"-"`
- Value *[]Watcher `json:"value,omitempty"`
-}
-
-// WatcherPropertiesFormat the network watcher properties.
-type WatcherPropertiesFormat struct {
- // ProvisioningState - READ-ONLY; The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
- ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
-}
-
-// WatchersCheckConnectivityFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
-type WatchersCheckConnectivityFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *WatchersCheckConnectivityFuture) Result(client WatchersClient) (ci ConnectivityInformation, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersCheckConnectivityFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.WatchersCheckConnectivityFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if ci.Response.Response, err = future.GetResult(sender); err == nil && ci.Response.Response.StatusCode != http.StatusNoContent {
- ci, err = client.CheckConnectivityResponder(ci.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersCheckConnectivityFuture", "Result", ci.Response.Response, "Failure responding to request")
- }
- }
- return
-}
-
-// WatchersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
-type WatchersDeleteFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *WatchersDeleteFuture) Result(client WatchersClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersDeleteFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.WatchersDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
-}
-
-// WatchersGetAzureReachabilityReportFuture an abstraction for monitoring and retrieving the results of a
-// long-running operation.
-type WatchersGetAzureReachabilityReportFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *WatchersGetAzureReachabilityReportFuture) Result(client WatchersClient) (arr AzureReachabilityReport, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetAzureReachabilityReportFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.WatchersGetAzureReachabilityReportFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if arr.Response.Response, err = future.GetResult(sender); err == nil && arr.Response.Response.StatusCode != http.StatusNoContent {
- arr, err = client.GetAzureReachabilityReportResponder(arr.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetAzureReachabilityReportFuture", "Result", arr.Response.Response, "Failure responding to request")
- }
- }
- return
-}
-
-// WatchersGetFlowLogStatusFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
-type WatchersGetFlowLogStatusFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *WatchersGetFlowLogStatusFuture) Result(client WatchersClient) (fli FlowLogInformation, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetFlowLogStatusFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.WatchersGetFlowLogStatusFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if fli.Response.Response, err = future.GetResult(sender); err == nil && fli.Response.Response.StatusCode != http.StatusNoContent {
- fli, err = client.GetFlowLogStatusResponder(fli.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetFlowLogStatusFuture", "Result", fli.Response.Response, "Failure responding to request")
- }
- }
- return
-}
-
-// WatchersGetNetworkConfigurationDiagnosticFuture an abstraction for monitoring and retrieving the results of
-// a long-running operation.
-type WatchersGetNetworkConfigurationDiagnosticFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *WatchersGetNetworkConfigurationDiagnosticFuture) Result(client WatchersClient) (cdr ConfigurationDiagnosticResponse, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetNetworkConfigurationDiagnosticFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.WatchersGetNetworkConfigurationDiagnosticFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if cdr.Response.Response, err = future.GetResult(sender); err == nil && cdr.Response.Response.StatusCode != http.StatusNoContent {
- cdr, err = client.GetNetworkConfigurationDiagnosticResponder(cdr.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetNetworkConfigurationDiagnosticFuture", "Result", cdr.Response.Response, "Failure responding to request")
- }
- }
- return
-}
-
-// WatchersGetNextHopFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
-type WatchersGetNextHopFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *WatchersGetNextHopFuture) Result(client WatchersClient) (nhr NextHopResult, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetNextHopFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.WatchersGetNextHopFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if nhr.Response.Response, err = future.GetResult(sender); err == nil && nhr.Response.Response.StatusCode != http.StatusNoContent {
- nhr, err = client.GetNextHopResponder(nhr.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetNextHopFuture", "Result", nhr.Response.Response, "Failure responding to request")
- }
- }
- return
-}
-
-// WatchersGetTroubleshootingFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
-type WatchersGetTroubleshootingFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *WatchersGetTroubleshootingFuture) Result(client WatchersClient) (tr TroubleshootingResult, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.WatchersGetTroubleshootingFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if tr.Response.Response, err = future.GetResult(sender); err == nil && tr.Response.Response.StatusCode != http.StatusNoContent {
- tr, err = client.GetTroubleshootingResponder(tr.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingFuture", "Result", tr.Response.Response, "Failure responding to request")
- }
- }
- return
-}
-
-// WatchersGetTroubleshootingResultFuture an abstraction for monitoring and retrieving the results of a
-// long-running operation.
-type WatchersGetTroubleshootingResultFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *WatchersGetTroubleshootingResultFuture) Result(client WatchersClient) (tr TroubleshootingResult, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingResultFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.WatchersGetTroubleshootingResultFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if tr.Response.Response, err = future.GetResult(sender); err == nil && tr.Response.Response.StatusCode != http.StatusNoContent {
- tr, err = client.GetTroubleshootingResultResponder(tr.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingResultFuture", "Result", tr.Response.Response, "Failure responding to request")
- }
- }
- return
-}
-
-// WatchersGetVMSecurityRulesFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
-type WatchersGetVMSecurityRulesFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *WatchersGetVMSecurityRulesFuture) Result(client WatchersClient) (sgvr SecurityGroupViewResult, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetVMSecurityRulesFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.WatchersGetVMSecurityRulesFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if sgvr.Response.Response, err = future.GetResult(sender); err == nil && sgvr.Response.Response.StatusCode != http.StatusNoContent {
- sgvr, err = client.GetVMSecurityRulesResponder(sgvr.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersGetVMSecurityRulesFuture", "Result", sgvr.Response.Response, "Failure responding to request")
- }
- }
- return
-}
-
-// WatchersListAvailableProvidersFuture an abstraction for monitoring and retrieving the results of a
-// long-running operation.
-type WatchersListAvailableProvidersFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *WatchersListAvailableProvidersFuture) Result(client WatchersClient) (apl AvailableProvidersList, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersListAvailableProvidersFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.WatchersListAvailableProvidersFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if apl.Response.Response, err = future.GetResult(sender); err == nil && apl.Response.Response.StatusCode != http.StatusNoContent {
- apl, err = client.ListAvailableProvidersResponder(apl.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersListAvailableProvidersFuture", "Result", apl.Response.Response, "Failure responding to request")
- }
- }
- return
-}
-
-// WatchersSetFlowLogConfigurationFuture an abstraction for monitoring and retrieving the results of a
-// long-running operation.
-type WatchersSetFlowLogConfigurationFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *WatchersSetFlowLogConfigurationFuture) Result(client WatchersClient) (fli FlowLogInformation, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersSetFlowLogConfigurationFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.WatchersSetFlowLogConfigurationFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if fli.Response.Response, err = future.GetResult(sender); err == nil && fli.Response.Response.StatusCode != http.StatusNoContent {
- fli, err = client.SetFlowLogConfigurationResponder(fli.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersSetFlowLogConfigurationFuture", "Result", fli.Response.Response, "Failure responding to request")
- }
- }
- return
-}
-
-// WatchersVerifyIPFlowFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
-type WatchersVerifyIPFlowFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *WatchersVerifyIPFlowFuture) Result(client WatchersClient) (vifr VerificationIPFlowResult, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersVerifyIPFlowFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.WatchersVerifyIPFlowFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if vifr.Response.Response, err = future.GetResult(sender); err == nil && vifr.Response.Response.StatusCode != http.StatusNoContent {
- vifr, err = client.VerifyIPFlowResponder(vifr.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersVerifyIPFlowFuture", "Result", vifr.Response.Response, "Failure responding to request")
- }
- }
- return
-}
-
-// WebApplicationFirewallCustomRule defines contents of a web application rule
-type WebApplicationFirewallCustomRule struct {
- // Name - Gets name of the resource that is unique within a policy. This name can be used to access the resource.
- Name *string `json:"name,omitempty"`
- // Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
- Etag *string `json:"etag,omitempty"`
- // Priority - Describes priority of the rule. Rules with a lower value will be evaluated before rules with a higher value
- Priority *int32 `json:"priority,omitempty"`
- // RuleType - Describes type of rule. Possible values include: 'WebApplicationFirewallRuleTypeMatchRule', 'WebApplicationFirewallRuleTypeInvalid'
- RuleType WebApplicationFirewallRuleType `json:"ruleType,omitempty"`
- // MatchConditions - List of match conditions
- MatchConditions *[]MatchCondition `json:"matchConditions,omitempty"`
- // Action - Type of Actions. Possible values include: 'WebApplicationFirewallActionAllow', 'WebApplicationFirewallActionBlock', 'WebApplicationFirewallActionLog'
- Action WebApplicationFirewallAction `json:"action,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for WebApplicationFirewallCustomRule.
-func (wafcr WebApplicationFirewallCustomRule) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if wafcr.Name != nil {
- objectMap["name"] = wafcr.Name
- }
- if wafcr.Priority != nil {
- objectMap["priority"] = wafcr.Priority
- }
- if wafcr.RuleType != "" {
- objectMap["ruleType"] = wafcr.RuleType
- }
- if wafcr.MatchConditions != nil {
- objectMap["matchConditions"] = wafcr.MatchConditions
- }
- if wafcr.Action != "" {
- objectMap["action"] = wafcr.Action
- }
- return json.Marshal(objectMap)
-}
-
-// WebApplicationFirewallPoliciesDeleteFuture an abstraction for monitoring and retrieving the results of a
-// long-running operation.
-type WebApplicationFirewallPoliciesDeleteFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *WebApplicationFirewallPoliciesDeleteFuture) Result(client WebApplicationFirewallPoliciesClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WebApplicationFirewallPoliciesDeleteFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("network.WebApplicationFirewallPoliciesDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
-}
-
-// WebApplicationFirewallPolicy defines web application firewall policy.
-type WebApplicationFirewallPolicy struct {
- autorest.Response `json:"-"`
- // WebApplicationFirewallPolicyPropertiesFormat - Properties of the web application firewall policy.
- *WebApplicationFirewallPolicyPropertiesFormat `json:"properties,omitempty"`
- // Etag - Gets a unique read-only string that changes whenever the resource is updated.
- Etag *string `json:"etag,omitempty"`
- // ID - 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 WebApplicationFirewallPolicy.
-func (wafp WebApplicationFirewallPolicy) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if wafp.WebApplicationFirewallPolicyPropertiesFormat != nil {
- objectMap["properties"] = wafp.WebApplicationFirewallPolicyPropertiesFormat
- }
- if wafp.Etag != nil {
- objectMap["etag"] = wafp.Etag
- }
- if wafp.ID != nil {
- objectMap["id"] = wafp.ID
- }
- if wafp.Location != nil {
- objectMap["location"] = wafp.Location
- }
- if wafp.Tags != nil {
- objectMap["tags"] = wafp.Tags
- }
- return json.Marshal(objectMap)
-}
-
-// UnmarshalJSON is the custom unmarshaler for WebApplicationFirewallPolicy struct.
-func (wafp *WebApplicationFirewallPolicy) 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 webApplicationFirewallPolicyPropertiesFormat WebApplicationFirewallPolicyPropertiesFormat
- err = json.Unmarshal(*v, &webApplicationFirewallPolicyPropertiesFormat)
- if err != nil {
- return err
- }
- wafp.WebApplicationFirewallPolicyPropertiesFormat = &webApplicationFirewallPolicyPropertiesFormat
- }
- case "etag":
- if v != nil {
- var etag string
- err = json.Unmarshal(*v, &etag)
- if err != nil {
- return err
- }
- wafp.Etag = &etag
- }
- case "id":
- if v != nil {
- var ID string
- err = json.Unmarshal(*v, &ID)
- if err != nil {
- return err
- }
- wafp.ID = &ID
- }
- case "name":
- if v != nil {
- var name string
- err = json.Unmarshal(*v, &name)
- if err != nil {
- return err
- }
- wafp.Name = &name
- }
- case "type":
- if v != nil {
- var typeVar string
- err = json.Unmarshal(*v, &typeVar)
- if err != nil {
- return err
- }
- wafp.Type = &typeVar
- }
- case "location":
- if v != nil {
- var location string
- err = json.Unmarshal(*v, &location)
- if err != nil {
- return err
- }
- wafp.Location = &location
- }
- case "tags":
- if v != nil {
- var tags map[string]*string
- err = json.Unmarshal(*v, &tags)
- if err != nil {
- return err
- }
- wafp.Tags = tags
- }
- }
- }
-
- return nil
-}
-
-// WebApplicationFirewallPolicyListResult result of the request to list WebApplicationFirewallPolicies. It
-// contains a list of WebApplicationFirewallPolicy objects and a URL link to get the next set of results.
-type WebApplicationFirewallPolicyListResult struct {
- autorest.Response `json:"-"`
- // Value - READ-ONLY; List of WebApplicationFirewallPolicies within a resource group.
- Value *[]WebApplicationFirewallPolicy `json:"value,omitempty"`
- // NextLink - READ-ONLY; URL to get the next set of WebApplicationFirewallPolicy objects if there are any.
- NextLink *string `json:"nextLink,omitempty"`
-}
-
-// WebApplicationFirewallPolicyListResultIterator provides access to a complete listing of
-// WebApplicationFirewallPolicy values.
-type WebApplicationFirewallPolicyListResultIterator struct {
- i int
- page WebApplicationFirewallPolicyListResultPage
-}
-
-// 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 *WebApplicationFirewallPolicyListResultIterator) NextWithContext(ctx context.Context) (err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/WebApplicationFirewallPolicyListResultIterator.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 *WebApplicationFirewallPolicyListResultIterator) Next() error {
- return iter.NextWithContext(context.Background())
-}
-
-// NotDone returns true if the enumeration should be started or is not yet complete.
-func (iter WebApplicationFirewallPolicyListResultIterator) 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 WebApplicationFirewallPolicyListResultIterator) Response() WebApplicationFirewallPolicyListResult {
- 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 WebApplicationFirewallPolicyListResultIterator) Value() WebApplicationFirewallPolicy {
- if !iter.page.NotDone() {
- return WebApplicationFirewallPolicy{}
- }
- return iter.page.Values()[iter.i]
-}
-
-// Creates a new instance of the WebApplicationFirewallPolicyListResultIterator type.
-func NewWebApplicationFirewallPolicyListResultIterator(page WebApplicationFirewallPolicyListResultPage) WebApplicationFirewallPolicyListResultIterator {
- return WebApplicationFirewallPolicyListResultIterator{page: page}
-}
-
-// IsEmpty returns true if the ListResult contains no values.
-func (wafplr WebApplicationFirewallPolicyListResult) IsEmpty() bool {
- return wafplr.Value == nil || len(*wafplr.Value) == 0
-}
-
-// hasNextLink returns true if the NextLink is not empty.
-func (wafplr WebApplicationFirewallPolicyListResult) hasNextLink() bool {
- return wafplr.NextLink != nil && len(*wafplr.NextLink) != 0
-}
-
-// webApplicationFirewallPolicyListResultPreparer prepares a request to retrieve the next set of results.
-// It returns nil if no more results exist.
-func (wafplr WebApplicationFirewallPolicyListResult) webApplicationFirewallPolicyListResultPreparer(ctx context.Context) (*http.Request, error) {
- if !wafplr.hasNextLink() {
- return nil, nil
- }
- return autorest.Prepare((&http.Request{}).WithContext(ctx),
- autorest.AsJSON(),
- autorest.AsGet(),
- autorest.WithBaseURL(to.String(wafplr.NextLink)))
-}
-
-// WebApplicationFirewallPolicyListResultPage contains a page of WebApplicationFirewallPolicy values.
-type WebApplicationFirewallPolicyListResultPage struct {
- fn func(context.Context, WebApplicationFirewallPolicyListResult) (WebApplicationFirewallPolicyListResult, error)
- wafplr WebApplicationFirewallPolicyListResult
-}
-
-// 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 *WebApplicationFirewallPolicyListResultPage) NextWithContext(ctx context.Context) (err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/WebApplicationFirewallPolicyListResultPage.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.wafplr)
- if err != nil {
- return err
- }
- page.wafplr = 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 *WebApplicationFirewallPolicyListResultPage) Next() error {
- return page.NextWithContext(context.Background())
-}
-
-// NotDone returns true if the page enumeration should be started or is not yet complete.
-func (page WebApplicationFirewallPolicyListResultPage) NotDone() bool {
- return !page.wafplr.IsEmpty()
-}
-
-// Response returns the raw server response from the last page request.
-func (page WebApplicationFirewallPolicyListResultPage) Response() WebApplicationFirewallPolicyListResult {
- return page.wafplr
-}
-
-// Values returns the slice of values for the current page or nil if there are no values.
-func (page WebApplicationFirewallPolicyListResultPage) Values() []WebApplicationFirewallPolicy {
- if page.wafplr.IsEmpty() {
- return nil
- }
- return *page.wafplr.Value
-}
-
-// Creates a new instance of the WebApplicationFirewallPolicyListResultPage type.
-func NewWebApplicationFirewallPolicyListResultPage(getNextPage func(context.Context, WebApplicationFirewallPolicyListResult) (WebApplicationFirewallPolicyListResult, error)) WebApplicationFirewallPolicyListResultPage {
- return WebApplicationFirewallPolicyListResultPage{fn: getNextPage}
-}
-
-// WebApplicationFirewallPolicyPropertiesFormat defines web application firewall policy properties
-type WebApplicationFirewallPolicyPropertiesFormat struct {
- // PolicySettings - Describes policySettings for policy
- PolicySettings *PolicySettings `json:"policySettings,omitempty"`
- // CustomRules - Describes custom rules inside the policy
- CustomRules *[]WebApplicationFirewallCustomRule `json:"customRules,omitempty"`
- // ApplicationGateways - READ-ONLY; A collection of references to application gateways.
- ApplicationGateways *[]ApplicationGateway `json:"applicationGateways,omitempty"`
- // ProvisioningState - READ-ONLY; Provisioning state of the WebApplicationFirewallPolicy.
- ProvisioningState *string `json:"provisioningState,omitempty"`
- // ResourceState - READ-ONLY; Possible values include: 'WebApplicationFirewallPolicyResourceStateCreating', 'WebApplicationFirewallPolicyResourceStateEnabling', 'WebApplicationFirewallPolicyResourceStateEnabled', 'WebApplicationFirewallPolicyResourceStateDisabling', 'WebApplicationFirewallPolicyResourceStateDisabled', 'WebApplicationFirewallPolicyResourceStateDeleting'
- ResourceState WebApplicationFirewallPolicyResourceState `json:"resourceState,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for WebApplicationFirewallPolicyPropertiesFormat.
-func (wafppf WebApplicationFirewallPolicyPropertiesFormat) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if wafppf.PolicySettings != nil {
- objectMap["policySettings"] = wafppf.PolicySettings
- }
- if wafppf.CustomRules != nil {
- objectMap["customRules"] = wafppf.CustomRules
- }
- return json.Marshal(objectMap)
-}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/p2svpngateways.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/p2svpngateways.go
deleted file mode 100644
index f24075e392d..00000000000
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/p2svpngateways.go
+++ /dev/null
@@ -1,651 +0,0 @@
-package network
-
-// Copyright (c) Microsoft and contributors. All rights reserved.
-//
-// 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 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"
-)
-
-// P2sVpnGatewaysClient is the network Client
-type P2sVpnGatewaysClient struct {
- BaseClient
-}
-
-// NewP2sVpnGatewaysClient creates an instance of the P2sVpnGatewaysClient client.
-func NewP2sVpnGatewaysClient(subscriptionID string) P2sVpnGatewaysClient {
- return NewP2sVpnGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID)
-}
-
-// NewP2sVpnGatewaysClientWithBaseURI creates an instance of the P2sVpnGatewaysClient 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 NewP2sVpnGatewaysClientWithBaseURI(baseURI string, subscriptionID string) P2sVpnGatewaysClient {
- return P2sVpnGatewaysClient{NewWithBaseURI(baseURI, subscriptionID)}
-}
-
-// CreateOrUpdate creates a virtual wan p2s vpn gateway if it doesn't exist else updates the existing gateway.
-// Parameters:
-// resourceGroupName - the resource group name of the P2SVpnGateway.
-// gatewayName - the name of the gateway.
-// p2SVpnGatewayParameters - parameters supplied to create or Update a virtual wan p2s vpn gateway.
-func (client P2sVpnGatewaysClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, gatewayName string, p2SVpnGatewayParameters P2SVpnGateway) (result P2sVpnGatewaysCreateOrUpdateFuture, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/P2sVpnGatewaysClient.CreateOrUpdate")
- defer func() {
- sc := -1
- if result.Response() != nil {
- sc = result.Response().StatusCode
- }
- tracing.EndSpan(ctx, sc, err)
- }()
- }
- req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, gatewayName, p2SVpnGatewayParameters)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysClient", "CreateOrUpdate", nil, "Failure preparing request")
- return
- }
-
- result, err = client.CreateOrUpdateSender(req)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysClient", "CreateOrUpdate", result.Response(), "Failure sending request")
- return
- }
-
- return
-}
-
-// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
-func (client P2sVpnGatewaysClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, gatewayName string, p2SVpnGatewayParameters P2SVpnGateway) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "gatewayName": autorest.Encode("path", gatewayName),
- "resourceGroupName": autorest.Encode("path", resourceGroupName),
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- }
-
- const APIVersion = "2018-12-01"
- queryParameters := map[string]interface{}{
- "api-version": APIVersion,
- }
-
- p2SVpnGatewayParameters.Etag = 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.Network/p2svpnGateways/{gatewayName}", pathParameters),
- autorest.WithJSON(p2SVpnGatewayParameters),
- 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 P2sVpnGatewaysClient) CreateOrUpdateSender(req *http.Request) (future P2sVpnGatewaysCreateOrUpdateFuture, err error) {
- var resp *http.Response
- resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
- if err != nil {
- return
- }
- future.Future, err = azure.NewFutureFromResponse(resp)
- return
-}
-
-// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
-// closes the http.Response Body.
-func (client P2sVpnGatewaysClient) CreateOrUpdateResponder(resp *http.Response) (result P2SVpnGateway, 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 virtual wan p2s vpn gateway.
-// Parameters:
-// resourceGroupName - the resource group name of the P2SVpnGateway.
-// gatewayName - the name of the gateway.
-func (client P2sVpnGatewaysClient) Delete(ctx context.Context, resourceGroupName string, gatewayName string) (result P2sVpnGatewaysDeleteFuture, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/P2sVpnGatewaysClient.Delete")
- defer func() {
- sc := -1
- if result.Response() != nil {
- sc = result.Response().StatusCode
- }
- tracing.EndSpan(ctx, sc, err)
- }()
- }
- req, err := client.DeletePreparer(ctx, resourceGroupName, gatewayName)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysClient", "Delete", nil, "Failure preparing request")
- return
- }
-
- result, err = client.DeleteSender(req)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysClient", "Delete", result.Response(), "Failure sending request")
- return
- }
-
- return
-}
-
-// DeletePreparer prepares the Delete request.
-func (client P2sVpnGatewaysClient) DeletePreparer(ctx context.Context, resourceGroupName string, gatewayName string) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "gatewayName": autorest.Encode("path", gatewayName),
- "resourceGroupName": autorest.Encode("path", resourceGroupName),
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- }
-
- const APIVersion = "2018-12-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.Network/p2svpnGateways/{gatewayName}", 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 P2sVpnGatewaysClient) DeleteSender(req *http.Request) (future P2sVpnGatewaysDeleteFuture, err error) {
- var resp *http.Response
- resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
- if err != nil {
- return
- }
- future.Future, err = azure.NewFutureFromResponse(resp)
- return
-}
-
-// DeleteResponder handles the response to the Delete request. The method always
-// closes the http.Response Body.
-func (client P2sVpnGatewaysClient) 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
-}
-
-// GenerateVpnProfile generates VPN profile for P2S client of the P2SVpnGateway in the specified resource group.
-// Parameters:
-// resourceGroupName - the name of the resource group.
-// gatewayName - the name of the P2SVpnGateway.
-// parameters - parameters supplied to the generate P2SVpnGateway VPN client package operation.
-func (client P2sVpnGatewaysClient) GenerateVpnProfile(ctx context.Context, resourceGroupName string, gatewayName string, parameters P2SVpnProfileParameters) (result P2sVpnGatewaysGenerateVpnProfileFuture, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/P2sVpnGatewaysClient.GenerateVpnProfile")
- defer func() {
- sc := -1
- if result.Response() != nil {
- sc = result.Response().StatusCode
- }
- tracing.EndSpan(ctx, sc, err)
- }()
- }
- req, err := client.GenerateVpnProfilePreparer(ctx, resourceGroupName, gatewayName, parameters)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysClient", "GenerateVpnProfile", nil, "Failure preparing request")
- return
- }
-
- result, err = client.GenerateVpnProfileSender(req)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysClient", "GenerateVpnProfile", result.Response(), "Failure sending request")
- return
- }
-
- return
-}
-
-// GenerateVpnProfilePreparer prepares the GenerateVpnProfile request.
-func (client P2sVpnGatewaysClient) GenerateVpnProfilePreparer(ctx context.Context, resourceGroupName string, gatewayName string, parameters P2SVpnProfileParameters) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "gatewayName": autorest.Encode("path", gatewayName),
- "resourceGroupName": autorest.Encode("path", resourceGroupName),
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- }
-
- const APIVersion = "2018-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.Network/p2svpnGateways/{gatewayName}/generatevpnprofile", pathParameters),
- autorest.WithJSON(parameters),
- autorest.WithQueryParameters(queryParameters))
- return preparer.Prepare((&http.Request{}).WithContext(ctx))
-}
-
-// GenerateVpnProfileSender sends the GenerateVpnProfile request. The method will close the
-// http.Response Body if it receives an error.
-func (client P2sVpnGatewaysClient) GenerateVpnProfileSender(req *http.Request) (future P2sVpnGatewaysGenerateVpnProfileFuture, err error) {
- var resp *http.Response
- resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
- if err != nil {
- return
- }
- future.Future, err = azure.NewFutureFromResponse(resp)
- return
-}
-
-// GenerateVpnProfileResponder handles the response to the GenerateVpnProfile request. The method always
-// closes the http.Response Body.
-func (client P2sVpnGatewaysClient) GenerateVpnProfileResponder(resp *http.Response) (result VpnProfileResponse, err error) {
- err = autorest.Respond(
- resp,
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
- autorest.ByUnmarshallingJSON(&result),
- autorest.ByClosing())
- result.Response = autorest.Response{Response: resp}
- return
-}
-
-// Get retrieves the details of a virtual wan p2s vpn gateway.
-// Parameters:
-// resourceGroupName - the resource group name of the P2SVpnGateway.
-// gatewayName - the name of the gateway.
-func (client P2sVpnGatewaysClient) Get(ctx context.Context, resourceGroupName string, gatewayName string) (result P2SVpnGateway, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/P2sVpnGatewaysClient.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, gatewayName)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysClient", "Get", nil, "Failure preparing request")
- return
- }
-
- resp, err := client.GetSender(req)
- if err != nil {
- result.Response = autorest.Response{Response: resp}
- err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysClient", "Get", resp, "Failure sending request")
- return
- }
-
- result, err = client.GetResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysClient", "Get", resp, "Failure responding to request")
- }
-
- return
-}
-
-// GetPreparer prepares the Get request.
-func (client P2sVpnGatewaysClient) GetPreparer(ctx context.Context, resourceGroupName string, gatewayName string) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "gatewayName": autorest.Encode("path", gatewayName),
- "resourceGroupName": autorest.Encode("path", resourceGroupName),
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- }
-
- const APIVersion = "2018-12-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.Network/p2svpnGateways/{gatewayName}", 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 P2sVpnGatewaysClient) 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 P2sVpnGatewaysClient) GetResponder(resp *http.Response) (result P2SVpnGateway, 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 P2SVpnGateways in a subscription.
-func (client P2sVpnGatewaysClient) List(ctx context.Context) (result ListP2SVpnGatewaysResultPage, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/P2sVpnGatewaysClient.List")
- defer func() {
- sc := -1
- if result.lpvgr.Response.Response != nil {
- sc = result.lpvgr.Response.Response.StatusCode
- }
- tracing.EndSpan(ctx, sc, err)
- }()
- }
- result.fn = client.listNextResults
- req, err := client.ListPreparer(ctx)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysClient", "List", nil, "Failure preparing request")
- return
- }
-
- resp, err := client.ListSender(req)
- if err != nil {
- result.lpvgr.Response = autorest.Response{Response: resp}
- err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysClient", "List", resp, "Failure sending request")
- return
- }
-
- result.lpvgr, err = client.ListResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysClient", "List", resp, "Failure responding to request")
- }
- if result.lpvgr.hasNextLink() && result.lpvgr.IsEmpty() {
- err = result.NextWithContext(ctx)
- }
-
- return
-}
-
-// ListPreparer prepares the List request.
-func (client P2sVpnGatewaysClient) ListPreparer(ctx context.Context) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- }
-
- const APIVersion = "2018-12-01"
- queryParameters := map[string]interface{}{
- "api-version": APIVersion,
- }
-
- preparer := autorest.CreatePreparer(
- autorest.AsGet(),
- autorest.WithBaseURL(client.BaseURI),
- autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/p2svpnGateways", 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 P2sVpnGatewaysClient) 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 P2sVpnGatewaysClient) ListResponder(resp *http.Response) (result ListP2SVpnGatewaysResult, 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 P2sVpnGatewaysClient) listNextResults(ctx context.Context, lastResults ListP2SVpnGatewaysResult) (result ListP2SVpnGatewaysResult, err error) {
- req, err := lastResults.listP2SVpnGatewaysResultPreparer(ctx)
- if err != nil {
- return result, autorest.NewErrorWithError(err, "network.P2sVpnGatewaysClient", "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, "network.P2sVpnGatewaysClient", "listNextResults", resp, "Failure sending next results request")
- }
- result, err = client.ListResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysClient", "listNextResults", resp, "Failure responding to next results request")
- }
- return
-}
-
-// ListComplete enumerates all values, automatically crossing page boundaries as required.
-func (client P2sVpnGatewaysClient) ListComplete(ctx context.Context) (result ListP2SVpnGatewaysResultIterator, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/P2sVpnGatewaysClient.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 P2SVpnGateways in a resource group.
-// Parameters:
-// resourceGroupName - the resource group name of the P2SVpnGateway.
-func (client P2sVpnGatewaysClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result ListP2SVpnGatewaysResultPage, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/P2sVpnGatewaysClient.ListByResourceGroup")
- defer func() {
- sc := -1
- if result.lpvgr.Response.Response != nil {
- sc = result.lpvgr.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, "network.P2sVpnGatewaysClient", "ListByResourceGroup", nil, "Failure preparing request")
- return
- }
-
- resp, err := client.ListByResourceGroupSender(req)
- if err != nil {
- result.lpvgr.Response = autorest.Response{Response: resp}
- err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysClient", "ListByResourceGroup", resp, "Failure sending request")
- return
- }
-
- result.lpvgr, err = client.ListByResourceGroupResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysClient", "ListByResourceGroup", resp, "Failure responding to request")
- }
- if result.lpvgr.hasNextLink() && result.lpvgr.IsEmpty() {
- err = result.NextWithContext(ctx)
- }
-
- return
-}
-
-// ListByResourceGroupPreparer prepares the ListByResourceGroup request.
-func (client P2sVpnGatewaysClient) 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 = "2018-12-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.Network/p2svpnGateways", 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 P2sVpnGatewaysClient) 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 P2sVpnGatewaysClient) ListByResourceGroupResponder(resp *http.Response) (result ListP2SVpnGatewaysResult, 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 P2sVpnGatewaysClient) listByResourceGroupNextResults(ctx context.Context, lastResults ListP2SVpnGatewaysResult) (result ListP2SVpnGatewaysResult, err error) {
- req, err := lastResults.listP2SVpnGatewaysResultPreparer(ctx)
- if err != nil {
- return result, autorest.NewErrorWithError(err, "network.P2sVpnGatewaysClient", "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, "network.P2sVpnGatewaysClient", "listByResourceGroupNextResults", resp, "Failure sending next results request")
- }
- result, err = client.ListByResourceGroupResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request")
- }
- return
-}
-
-// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required.
-func (client P2sVpnGatewaysClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result ListP2SVpnGatewaysResultIterator, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/P2sVpnGatewaysClient.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 updates virtual wan p2s vpn gateway tags.
-// Parameters:
-// resourceGroupName - the resource group name of the P2SVpnGateway.
-// gatewayName - the name of the gateway.
-// p2SVpnGatewayParameters - parameters supplied to update a virtual wan p2s vpn gateway tags.
-func (client P2sVpnGatewaysClient) UpdateTags(ctx context.Context, resourceGroupName string, gatewayName string, p2SVpnGatewayParameters TagsObject) (result P2sVpnGatewaysUpdateTagsFuture, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/P2sVpnGatewaysClient.UpdateTags")
- defer func() {
- sc := -1
- if result.Response() != nil {
- sc = result.Response().StatusCode
- }
- tracing.EndSpan(ctx, sc, err)
- }()
- }
- req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, gatewayName, p2SVpnGatewayParameters)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysClient", "UpdateTags", nil, "Failure preparing request")
- return
- }
-
- result, err = client.UpdateTagsSender(req)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysClient", "UpdateTags", result.Response(), "Failure sending request")
- return
- }
-
- return
-}
-
-// UpdateTagsPreparer prepares the UpdateTags request.
-func (client P2sVpnGatewaysClient) UpdateTagsPreparer(ctx context.Context, resourceGroupName string, gatewayName string, p2SVpnGatewayParameters TagsObject) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "gatewayName": autorest.Encode("path", gatewayName),
- "resourceGroupName": autorest.Encode("path", resourceGroupName),
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- }
-
- const APIVersion = "2018-12-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.Network/p2svpnGateways/{gatewayName}", pathParameters),
- autorest.WithJSON(p2SVpnGatewayParameters),
- 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 P2sVpnGatewaysClient) UpdateTagsSender(req *http.Request) (future P2sVpnGatewaysUpdateTagsFuture, err error) {
- var resp *http.Response
- resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
- if err != nil {
- return
- }
- future.Future, err = azure.NewFutureFromResponse(resp)
- return
-}
-
-// UpdateTagsResponder handles the response to the UpdateTags request. The method always
-// closes the http.Response Body.
-func (client P2sVpnGatewaysClient) UpdateTagsResponder(resp *http.Response) (result P2SVpnGateway, 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/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/p2svpnserverconfigurations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/p2svpnserverconfigurations.go
deleted file mode 100644
index 9464571dd68..00000000000
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/p2svpnserverconfigurations.go
+++ /dev/null
@@ -1,394 +0,0 @@
-package network
-
-// Copyright (c) Microsoft and contributors. All rights reserved.
-//
-// 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 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"
-)
-
-// P2sVpnServerConfigurationsClient is the network Client
-type P2sVpnServerConfigurationsClient struct {
- BaseClient
-}
-
-// NewP2sVpnServerConfigurationsClient creates an instance of the P2sVpnServerConfigurationsClient client.
-func NewP2sVpnServerConfigurationsClient(subscriptionID string) P2sVpnServerConfigurationsClient {
- return NewP2sVpnServerConfigurationsClientWithBaseURI(DefaultBaseURI, subscriptionID)
-}
-
-// NewP2sVpnServerConfigurationsClientWithBaseURI creates an instance of the P2sVpnServerConfigurationsClient 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 NewP2sVpnServerConfigurationsClientWithBaseURI(baseURI string, subscriptionID string) P2sVpnServerConfigurationsClient {
- return P2sVpnServerConfigurationsClient{NewWithBaseURI(baseURI, subscriptionID)}
-}
-
-// CreateOrUpdate creates a P2SVpnServerConfiguration to associate with a VirtualWan if it doesn't exist else updates
-// the existing P2SVpnServerConfiguration.
-// Parameters:
-// resourceGroupName - the resource group name of the VirtualWan.
-// virtualWanName - the name of the VirtualWan.
-// p2SVpnServerConfigurationName - the name of the P2SVpnServerConfiguration.
-// p2SVpnServerConfigurationParameters - parameters supplied to create or Update a P2SVpnServerConfiguration.
-func (client P2sVpnServerConfigurationsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, virtualWanName string, p2SVpnServerConfigurationName string, p2SVpnServerConfigurationParameters P2SVpnServerConfiguration) (result P2sVpnServerConfigurationsCreateOrUpdateFuture, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/P2sVpnServerConfigurationsClient.CreateOrUpdate")
- defer func() {
- sc := -1
- if result.Response() != nil {
- sc = result.Response().StatusCode
- }
- tracing.EndSpan(ctx, sc, err)
- }()
- }
- req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, virtualWanName, p2SVpnServerConfigurationName, p2SVpnServerConfigurationParameters)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.P2sVpnServerConfigurationsClient", "CreateOrUpdate", nil, "Failure preparing request")
- return
- }
-
- result, err = client.CreateOrUpdateSender(req)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.P2sVpnServerConfigurationsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
- return
- }
-
- return
-}
-
-// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
-func (client P2sVpnServerConfigurationsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, virtualWanName string, p2SVpnServerConfigurationName string, p2SVpnServerConfigurationParameters P2SVpnServerConfiguration) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "p2SVpnServerConfigurationName": autorest.Encode("path", p2SVpnServerConfigurationName),
- "resourceGroupName": autorest.Encode("path", resourceGroupName),
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- "virtualWanName": autorest.Encode("path", virtualWanName),
- }
-
- const APIVersion = "2018-12-01"
- queryParameters := map[string]interface{}{
- "api-version": APIVersion,
- }
-
- p2SVpnServerConfigurationParameters.Etag = 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.Network/virtualWans/{virtualWanName}/p2sVpnServerConfigurations/{p2SVpnServerConfigurationName}", pathParameters),
- autorest.WithJSON(p2SVpnServerConfigurationParameters),
- 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 P2sVpnServerConfigurationsClient) CreateOrUpdateSender(req *http.Request) (future P2sVpnServerConfigurationsCreateOrUpdateFuture, err error) {
- var resp *http.Response
- resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
- if err != nil {
- return
- }
- future.Future, err = azure.NewFutureFromResponse(resp)
- return
-}
-
-// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
-// closes the http.Response Body.
-func (client P2sVpnServerConfigurationsClient) CreateOrUpdateResponder(resp *http.Response) (result P2SVpnServerConfiguration, 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 P2SVpnServerConfiguration.
-// Parameters:
-// resourceGroupName - the resource group name of the P2SVpnServerConfiguration.
-// virtualWanName - the name of the VirtualWan.
-// p2SVpnServerConfigurationName - the name of the P2SVpnServerConfiguration.
-func (client P2sVpnServerConfigurationsClient) Delete(ctx context.Context, resourceGroupName string, virtualWanName string, p2SVpnServerConfigurationName string) (result P2sVpnServerConfigurationsDeleteFuture, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/P2sVpnServerConfigurationsClient.Delete")
- defer func() {
- sc := -1
- if result.Response() != nil {
- sc = result.Response().StatusCode
- }
- tracing.EndSpan(ctx, sc, err)
- }()
- }
- req, err := client.DeletePreparer(ctx, resourceGroupName, virtualWanName, p2SVpnServerConfigurationName)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.P2sVpnServerConfigurationsClient", "Delete", nil, "Failure preparing request")
- return
- }
-
- result, err = client.DeleteSender(req)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.P2sVpnServerConfigurationsClient", "Delete", result.Response(), "Failure sending request")
- return
- }
-
- return
-}
-
-// DeletePreparer prepares the Delete request.
-func (client P2sVpnServerConfigurationsClient) DeletePreparer(ctx context.Context, resourceGroupName string, virtualWanName string, p2SVpnServerConfigurationName string) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "p2SVpnServerConfigurationName": autorest.Encode("path", p2SVpnServerConfigurationName),
- "resourceGroupName": autorest.Encode("path", resourceGroupName),
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- "virtualWanName": autorest.Encode("path", virtualWanName),
- }
-
- const APIVersion = "2018-12-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.Network/virtualWans/{virtualWanName}/p2sVpnServerConfigurations/{p2SVpnServerConfigurationName}", 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 P2sVpnServerConfigurationsClient) DeleteSender(req *http.Request) (future P2sVpnServerConfigurationsDeleteFuture, err error) {
- var resp *http.Response
- resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
- if err != nil {
- return
- }
- future.Future, err = azure.NewFutureFromResponse(resp)
- return
-}
-
-// DeleteResponder handles the response to the Delete request. The method always
-// closes the http.Response Body.
-func (client P2sVpnServerConfigurationsClient) 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 the details of a P2SVpnServerConfiguration.
-// Parameters:
-// resourceGroupName - the resource group name of the P2SVpnServerConfiguration.
-// virtualWanName - the name of the VirtualWan.
-// p2SVpnServerConfigurationName - the name of the P2SVpnServerConfiguration.
-func (client P2sVpnServerConfigurationsClient) Get(ctx context.Context, resourceGroupName string, virtualWanName string, p2SVpnServerConfigurationName string) (result P2SVpnServerConfiguration, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/P2sVpnServerConfigurationsClient.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, virtualWanName, p2SVpnServerConfigurationName)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.P2sVpnServerConfigurationsClient", "Get", nil, "Failure preparing request")
- return
- }
-
- resp, err := client.GetSender(req)
- if err != nil {
- result.Response = autorest.Response{Response: resp}
- err = autorest.NewErrorWithError(err, "network.P2sVpnServerConfigurationsClient", "Get", resp, "Failure sending request")
- return
- }
-
- result, err = client.GetResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.P2sVpnServerConfigurationsClient", "Get", resp, "Failure responding to request")
- }
-
- return
-}
-
-// GetPreparer prepares the Get request.
-func (client P2sVpnServerConfigurationsClient) GetPreparer(ctx context.Context, resourceGroupName string, virtualWanName string, p2SVpnServerConfigurationName string) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "p2SVpnServerConfigurationName": autorest.Encode("path", p2SVpnServerConfigurationName),
- "resourceGroupName": autorest.Encode("path", resourceGroupName),
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- "virtualWanName": autorest.Encode("path", virtualWanName),
- }
-
- const APIVersion = "2018-12-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.Network/virtualWans/{virtualWanName}/p2sVpnServerConfigurations/{p2SVpnServerConfigurationName}", 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 P2sVpnServerConfigurationsClient) 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 P2sVpnServerConfigurationsClient) GetResponder(resp *http.Response) (result P2SVpnServerConfiguration, err error) {
- err = autorest.Respond(
- resp,
- azure.WithErrorUnlessStatusCode(http.StatusOK),
- autorest.ByUnmarshallingJSON(&result),
- autorest.ByClosing())
- result.Response = autorest.Response{Response: resp}
- return
-}
-
-// ListByVirtualWan retrieves all P2SVpnServerConfigurations for a particular VirtualWan.
-// Parameters:
-// resourceGroupName - the resource group name of the VirtualWan.
-// virtualWanName - the name of the VirtualWan.
-func (client P2sVpnServerConfigurationsClient) ListByVirtualWan(ctx context.Context, resourceGroupName string, virtualWanName string) (result ListP2SVpnServerConfigurationsResultPage, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/P2sVpnServerConfigurationsClient.ListByVirtualWan")
- defer func() {
- sc := -1
- if result.lpvscr.Response.Response != nil {
- sc = result.lpvscr.Response.Response.StatusCode
- }
- tracing.EndSpan(ctx, sc, err)
- }()
- }
- result.fn = client.listByVirtualWanNextResults
- req, err := client.ListByVirtualWanPreparer(ctx, resourceGroupName, virtualWanName)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.P2sVpnServerConfigurationsClient", "ListByVirtualWan", nil, "Failure preparing request")
- return
- }
-
- resp, err := client.ListByVirtualWanSender(req)
- if err != nil {
- result.lpvscr.Response = autorest.Response{Response: resp}
- err = autorest.NewErrorWithError(err, "network.P2sVpnServerConfigurationsClient", "ListByVirtualWan", resp, "Failure sending request")
- return
- }
-
- result.lpvscr, err = client.ListByVirtualWanResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.P2sVpnServerConfigurationsClient", "ListByVirtualWan", resp, "Failure responding to request")
- }
- if result.lpvscr.hasNextLink() && result.lpvscr.IsEmpty() {
- err = result.NextWithContext(ctx)
- }
-
- return
-}
-
-// ListByVirtualWanPreparer prepares the ListByVirtualWan request.
-func (client P2sVpnServerConfigurationsClient) ListByVirtualWanPreparer(ctx context.Context, resourceGroupName string, virtualWanName string) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "resourceGroupName": autorest.Encode("path", resourceGroupName),
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- "virtualWanName": autorest.Encode("path", virtualWanName),
- }
-
- const APIVersion = "2018-12-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.Network/virtualWans/{virtualWanName}/p2sVpnServerConfigurations", pathParameters),
- autorest.WithQueryParameters(queryParameters))
- return preparer.Prepare((&http.Request{}).WithContext(ctx))
-}
-
-// ListByVirtualWanSender sends the ListByVirtualWan request. The method will close the
-// http.Response Body if it receives an error.
-func (client P2sVpnServerConfigurationsClient) ListByVirtualWanSender(req *http.Request) (*http.Response, error) {
- return client.Send(req, azure.DoRetryWithRegistration(client.Client))
-}
-
-// ListByVirtualWanResponder handles the response to the ListByVirtualWan request. The method always
-// closes the http.Response Body.
-func (client P2sVpnServerConfigurationsClient) ListByVirtualWanResponder(resp *http.Response) (result ListP2SVpnServerConfigurationsResult, err error) {
- err = autorest.Respond(
- resp,
- azure.WithErrorUnlessStatusCode(http.StatusOK),
- autorest.ByUnmarshallingJSON(&result),
- autorest.ByClosing())
- result.Response = autorest.Response{Response: resp}
- return
-}
-
-// listByVirtualWanNextResults retrieves the next set of results, if any.
-func (client P2sVpnServerConfigurationsClient) listByVirtualWanNextResults(ctx context.Context, lastResults ListP2SVpnServerConfigurationsResult) (result ListP2SVpnServerConfigurationsResult, err error) {
- req, err := lastResults.listP2SVpnServerConfigurationsResultPreparer(ctx)
- if err != nil {
- return result, autorest.NewErrorWithError(err, "network.P2sVpnServerConfigurationsClient", "listByVirtualWanNextResults", nil, "Failure preparing next results request")
- }
- if req == nil {
- return
- }
- resp, err := client.ListByVirtualWanSender(req)
- if err != nil {
- result.Response = autorest.Response{Response: resp}
- return result, autorest.NewErrorWithError(err, "network.P2sVpnServerConfigurationsClient", "listByVirtualWanNextResults", resp, "Failure sending next results request")
- }
- result, err = client.ListByVirtualWanResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.P2sVpnServerConfigurationsClient", "listByVirtualWanNextResults", resp, "Failure responding to next results request")
- }
- return
-}
-
-// ListByVirtualWanComplete enumerates all values, automatically crossing page boundaries as required.
-func (client P2sVpnServerConfigurationsClient) ListByVirtualWanComplete(ctx context.Context, resourceGroupName string, virtualWanName string) (result ListP2SVpnServerConfigurationsResultIterator, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/P2sVpnServerConfigurationsClient.ListByVirtualWan")
- 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.ListByVirtualWan(ctx, resourceGroupName, virtualWanName)
- return
-}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/peerexpressroutecircuitconnections.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/peerexpressroutecircuitconnections.go
deleted file mode 100644
index 852f6cf62d1..00000000000
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/peerexpressroutecircuitconnections.go
+++ /dev/null
@@ -1,241 +0,0 @@
-package network
-
-// Copyright (c) Microsoft and contributors. All rights reserved.
-//
-// 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 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"
-)
-
-// PeerExpressRouteCircuitConnectionsClient is the network Client
-type PeerExpressRouteCircuitConnectionsClient struct {
- BaseClient
-}
-
-// NewPeerExpressRouteCircuitConnectionsClient creates an instance of the PeerExpressRouteCircuitConnectionsClient
-// client.
-func NewPeerExpressRouteCircuitConnectionsClient(subscriptionID string) PeerExpressRouteCircuitConnectionsClient {
- return NewPeerExpressRouteCircuitConnectionsClientWithBaseURI(DefaultBaseURI, subscriptionID)
-}
-
-// NewPeerExpressRouteCircuitConnectionsClientWithBaseURI creates an instance of the
-// PeerExpressRouteCircuitConnectionsClient 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 NewPeerExpressRouteCircuitConnectionsClientWithBaseURI(baseURI string, subscriptionID string) PeerExpressRouteCircuitConnectionsClient {
- return PeerExpressRouteCircuitConnectionsClient{NewWithBaseURI(baseURI, subscriptionID)}
-}
-
-// Get gets the specified Peer Express Route Circuit Connection from the specified express route circuit.
-// Parameters:
-// resourceGroupName - the name of the resource group.
-// circuitName - the name of the express route circuit.
-// peeringName - the name of the peering.
-// connectionName - the name of the peer express route circuit connection.
-func (client PeerExpressRouteCircuitConnectionsClient) Get(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, connectionName string) (result PeerExpressRouteCircuitConnection, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/PeerExpressRouteCircuitConnectionsClient.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, circuitName, peeringName, connectionName)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PeerExpressRouteCircuitConnectionsClient", "Get", nil, "Failure preparing request")
- return
- }
-
- resp, err := client.GetSender(req)
- if err != nil {
- result.Response = autorest.Response{Response: resp}
- err = autorest.NewErrorWithError(err, "network.PeerExpressRouteCircuitConnectionsClient", "Get", resp, "Failure sending request")
- return
- }
-
- result, err = client.GetResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PeerExpressRouteCircuitConnectionsClient", "Get", resp, "Failure responding to request")
- }
-
- return
-}
-
-// GetPreparer prepares the Get request.
-func (client PeerExpressRouteCircuitConnectionsClient) GetPreparer(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, connectionName string) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "circuitName": autorest.Encode("path", circuitName),
- "connectionName": autorest.Encode("path", connectionName),
- "peeringName": autorest.Encode("path", peeringName),
- "resourceGroupName": autorest.Encode("path", resourceGroupName),
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- }
-
- const APIVersion = "2018-12-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.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/peerConnections/{connectionName}", 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 PeerExpressRouteCircuitConnectionsClient) 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 PeerExpressRouteCircuitConnectionsClient) GetResponder(resp *http.Response) (result PeerExpressRouteCircuitConnection, err error) {
- err = autorest.Respond(
- resp,
- azure.WithErrorUnlessStatusCode(http.StatusOK),
- autorest.ByUnmarshallingJSON(&result),
- autorest.ByClosing())
- result.Response = autorest.Response{Response: resp}
- return
-}
-
-// List gets all global reach peer connections associated with a private peering in an express route circuit.
-// Parameters:
-// resourceGroupName - the name of the resource group.
-// circuitName - the name of the circuit.
-// peeringName - the name of the peering.
-func (client PeerExpressRouteCircuitConnectionsClient) List(ctx context.Context, resourceGroupName string, circuitName string, peeringName string) (result PeerExpressRouteCircuitConnectionListResultPage, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/PeerExpressRouteCircuitConnectionsClient.List")
- defer func() {
- sc := -1
- if result.percclr.Response.Response != nil {
- sc = result.percclr.Response.Response.StatusCode
- }
- tracing.EndSpan(ctx, sc, err)
- }()
- }
- result.fn = client.listNextResults
- req, err := client.ListPreparer(ctx, resourceGroupName, circuitName, peeringName)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PeerExpressRouteCircuitConnectionsClient", "List", nil, "Failure preparing request")
- return
- }
-
- resp, err := client.ListSender(req)
- if err != nil {
- result.percclr.Response = autorest.Response{Response: resp}
- err = autorest.NewErrorWithError(err, "network.PeerExpressRouteCircuitConnectionsClient", "List", resp, "Failure sending request")
- return
- }
-
- result.percclr, err = client.ListResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PeerExpressRouteCircuitConnectionsClient", "List", resp, "Failure responding to request")
- }
- if result.percclr.hasNextLink() && result.percclr.IsEmpty() {
- err = result.NextWithContext(ctx)
- }
-
- return
-}
-
-// ListPreparer prepares the List request.
-func (client PeerExpressRouteCircuitConnectionsClient) ListPreparer(ctx context.Context, resourceGroupName string, circuitName string, peeringName string) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "circuitName": autorest.Encode("path", circuitName),
- "peeringName": autorest.Encode("path", peeringName),
- "resourceGroupName": autorest.Encode("path", resourceGroupName),
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- }
-
- const APIVersion = "2018-12-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.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/peerConnections", 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 PeerExpressRouteCircuitConnectionsClient) 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 PeerExpressRouteCircuitConnectionsClient) ListResponder(resp *http.Response) (result PeerExpressRouteCircuitConnectionListResult, 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 PeerExpressRouteCircuitConnectionsClient) listNextResults(ctx context.Context, lastResults PeerExpressRouteCircuitConnectionListResult) (result PeerExpressRouteCircuitConnectionListResult, err error) {
- req, err := lastResults.peerExpressRouteCircuitConnectionListResultPreparer(ctx)
- if err != nil {
- return result, autorest.NewErrorWithError(err, "network.PeerExpressRouteCircuitConnectionsClient", "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, "network.PeerExpressRouteCircuitConnectionsClient", "listNextResults", resp, "Failure sending next results request")
- }
- result, err = client.ListResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PeerExpressRouteCircuitConnectionsClient", "listNextResults", resp, "Failure responding to next results request")
- }
- return
-}
-
-// ListComplete enumerates all values, automatically crossing page boundaries as required.
-func (client PeerExpressRouteCircuitConnectionsClient) ListComplete(ctx context.Context, resourceGroupName string, circuitName string, peeringName string) (result PeerExpressRouteCircuitConnectionListResultIterator, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/PeerExpressRouteCircuitConnectionsClient.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, circuitName, peeringName)
- return
-}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/profiles.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/profiles.go
deleted file mode 100644
index 1fecf9b14ae..00000000000
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/profiles.go
+++ /dev/null
@@ -1,576 +0,0 @@
-package network
-
-// Copyright (c) Microsoft and contributors. All rights reserved.
-//
-// 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 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"
-)
-
-// ProfilesClient is the network Client
-type ProfilesClient struct {
- BaseClient
-}
-
-// NewProfilesClient creates an instance of the ProfilesClient client.
-func NewProfilesClient(subscriptionID string) ProfilesClient {
- return NewProfilesClientWithBaseURI(DefaultBaseURI, subscriptionID)
-}
-
-// NewProfilesClientWithBaseURI creates an instance of the ProfilesClient 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 NewProfilesClientWithBaseURI(baseURI string, subscriptionID string) ProfilesClient {
- return ProfilesClient{NewWithBaseURI(baseURI, subscriptionID)}
-}
-
-// CreateOrUpdate creates or updates a network profile.
-// Parameters:
-// resourceGroupName - the name of the resource group.
-// networkProfileName - the name of the network profile.
-// parameters - parameters supplied to the create or update network profile operation.
-func (client ProfilesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, networkProfileName string, parameters Profile) (result Profile, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/ProfilesClient.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, networkProfileName, parameters)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ProfilesClient", "CreateOrUpdate", nil, "Failure preparing request")
- return
- }
-
- resp, err := client.CreateOrUpdateSender(req)
- if err != nil {
- result.Response = autorest.Response{Response: resp}
- err = autorest.NewErrorWithError(err, "network.ProfilesClient", "CreateOrUpdate", resp, "Failure sending request")
- return
- }
-
- result, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ProfilesClient", "CreateOrUpdate", resp, "Failure responding to request")
- }
-
- return
-}
-
-// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
-func (client ProfilesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, networkProfileName string, parameters Profile) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "networkProfileName": autorest.Encode("path", networkProfileName),
- "resourceGroupName": autorest.Encode("path", resourceGroupName),
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- }
-
- const APIVersion = "2018-12-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.Network/networkProfiles/{networkProfileName}", 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 ProfilesClient) 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 ProfilesClient) CreateOrUpdateResponder(resp *http.Response) (result Profile, 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 the specified network profile.
-// Parameters:
-// resourceGroupName - the name of the resource group.
-// networkProfileName - the name of the NetworkProfile.
-func (client ProfilesClient) Delete(ctx context.Context, resourceGroupName string, networkProfileName string) (result ProfilesDeleteFuture, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/ProfilesClient.Delete")
- defer func() {
- sc := -1
- if result.Response() != nil {
- sc = result.Response().StatusCode
- }
- tracing.EndSpan(ctx, sc, err)
- }()
- }
- req, err := client.DeletePreparer(ctx, resourceGroupName, networkProfileName)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ProfilesClient", "Delete", nil, "Failure preparing request")
- return
- }
-
- result, err = client.DeleteSender(req)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ProfilesClient", "Delete", result.Response(), "Failure sending request")
- return
- }
-
- return
-}
-
-// DeletePreparer prepares the Delete request.
-func (client ProfilesClient) DeletePreparer(ctx context.Context, resourceGroupName string, networkProfileName string) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "networkProfileName": autorest.Encode("path", networkProfileName),
- "resourceGroupName": autorest.Encode("path", resourceGroupName),
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- }
-
- const APIVersion = "2018-12-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.Network/networkProfiles/{networkProfileName}", 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 ProfilesClient) DeleteSender(req *http.Request) (future ProfilesDeleteFuture, err error) {
- var resp *http.Response
- resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
- if err != nil {
- return
- }
- future.Future, err = azure.NewFutureFromResponse(resp)
- return
-}
-
-// DeleteResponder handles the response to the Delete request. The method always
-// closes the http.Response Body.
-func (client ProfilesClient) 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 the specified network profile in a specified resource group.
-// Parameters:
-// resourceGroupName - the name of the resource group.
-// networkProfileName - the name of the public IP prefix.
-// expand - expands referenced resources.
-func (client ProfilesClient) Get(ctx context.Context, resourceGroupName string, networkProfileName string, expand string) (result Profile, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/ProfilesClient.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, networkProfileName, expand)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ProfilesClient", "Get", nil, "Failure preparing request")
- return
- }
-
- resp, err := client.GetSender(req)
- if err != nil {
- result.Response = autorest.Response{Response: resp}
- err = autorest.NewErrorWithError(err, "network.ProfilesClient", "Get", resp, "Failure sending request")
- return
- }
-
- result, err = client.GetResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ProfilesClient", "Get", resp, "Failure responding to request")
- }
-
- return
-}
-
-// GetPreparer prepares the Get request.
-func (client ProfilesClient) GetPreparer(ctx context.Context, resourceGroupName string, networkProfileName string, expand string) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "networkProfileName": autorest.Encode("path", networkProfileName),
- "resourceGroupName": autorest.Encode("path", resourceGroupName),
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- }
-
- const APIVersion = "2018-12-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.Network/networkProfiles/{networkProfileName}", 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 ProfilesClient) 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 ProfilesClient) GetResponder(resp *http.Response) (result Profile, err error) {
- err = autorest.Respond(
- resp,
- azure.WithErrorUnlessStatusCode(http.StatusOK),
- autorest.ByUnmarshallingJSON(&result),
- autorest.ByClosing())
- result.Response = autorest.Response{Response: resp}
- return
-}
-
-// List gets all network profiles in a resource group.
-// Parameters:
-// resourceGroupName - the name of the resource group.
-func (client ProfilesClient) List(ctx context.Context, resourceGroupName string) (result ProfileListResultPage, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/ProfilesClient.List")
- defer func() {
- sc := -1
- if result.plr.Response.Response != nil {
- sc = result.plr.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, "network.ProfilesClient", "List", nil, "Failure preparing request")
- return
- }
-
- resp, err := client.ListSender(req)
- if err != nil {
- result.plr.Response = autorest.Response{Response: resp}
- err = autorest.NewErrorWithError(err, "network.ProfilesClient", "List", resp, "Failure sending request")
- return
- }
-
- result.plr, err = client.ListResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ProfilesClient", "List", resp, "Failure responding to request")
- }
- if result.plr.hasNextLink() && result.plr.IsEmpty() {
- err = result.NextWithContext(ctx)
- }
-
- return
-}
-
-// ListPreparer prepares the List request.
-func (client ProfilesClient) 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 = "2018-12-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.Network/networkProfiles", 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 ProfilesClient) 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 ProfilesClient) ListResponder(resp *http.Response) (result ProfileListResult, 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 ProfilesClient) listNextResults(ctx context.Context, lastResults ProfileListResult) (result ProfileListResult, err error) {
- req, err := lastResults.profileListResultPreparer(ctx)
- if err != nil {
- return result, autorest.NewErrorWithError(err, "network.ProfilesClient", "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, "network.ProfilesClient", "listNextResults", resp, "Failure sending next results request")
- }
- result, err = client.ListResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ProfilesClient", "listNextResults", resp, "Failure responding to next results request")
- }
- return
-}
-
-// ListComplete enumerates all values, automatically crossing page boundaries as required.
-func (client ProfilesClient) ListComplete(ctx context.Context, resourceGroupName string) (result ProfileListResultIterator, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/ProfilesClient.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 all the network profiles in a subscription.
-func (client ProfilesClient) ListAll(ctx context.Context) (result ProfileListResultPage, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/ProfilesClient.ListAll")
- defer func() {
- sc := -1
- if result.plr.Response.Response != nil {
- sc = result.plr.Response.Response.StatusCode
- }
- tracing.EndSpan(ctx, sc, err)
- }()
- }
- result.fn = client.listAllNextResults
- req, err := client.ListAllPreparer(ctx)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ProfilesClient", "ListAll", nil, "Failure preparing request")
- return
- }
-
- resp, err := client.ListAllSender(req)
- if err != nil {
- result.plr.Response = autorest.Response{Response: resp}
- err = autorest.NewErrorWithError(err, "network.ProfilesClient", "ListAll", resp, "Failure sending request")
- return
- }
-
- result.plr, err = client.ListAllResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ProfilesClient", "ListAll", resp, "Failure responding to request")
- }
- if result.plr.hasNextLink() && result.plr.IsEmpty() {
- err = result.NextWithContext(ctx)
- }
-
- return
-}
-
-// ListAllPreparer prepares the ListAll request.
-func (client ProfilesClient) ListAllPreparer(ctx context.Context) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- }
-
- const APIVersion = "2018-12-01"
- queryParameters := map[string]interface{}{
- "api-version": APIVersion,
- }
-
- preparer := autorest.CreatePreparer(
- autorest.AsGet(),
- autorest.WithBaseURL(client.BaseURI),
- autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/networkProfiles", 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 ProfilesClient) 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 ProfilesClient) ListAllResponder(resp *http.Response) (result ProfileListResult, 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 ProfilesClient) listAllNextResults(ctx context.Context, lastResults ProfileListResult) (result ProfileListResult, err error) {
- req, err := lastResults.profileListResultPreparer(ctx)
- if err != nil {
- return result, autorest.NewErrorWithError(err, "network.ProfilesClient", "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, "network.ProfilesClient", "listAllNextResults", resp, "Failure sending next results request")
- }
- result, err = client.ListAllResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ProfilesClient", "listAllNextResults", resp, "Failure responding to next results request")
- }
- return
-}
-
-// ListAllComplete enumerates all values, automatically crossing page boundaries as required.
-func (client ProfilesClient) ListAllComplete(ctx context.Context) (result ProfileListResultIterator, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/ProfilesClient.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
-}
-
-// UpdateTags updates network profile tags.
-// Parameters:
-// resourceGroupName - the name of the resource group.
-// networkProfileName - the name of the network profile.
-// parameters - parameters supplied to update network profile tags.
-func (client ProfilesClient) UpdateTags(ctx context.Context, resourceGroupName string, networkProfileName string, parameters TagsObject) (result Profile, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/ProfilesClient.UpdateTags")
- defer func() {
- sc := -1
- if result.Response.Response != nil {
- sc = result.Response.Response.StatusCode
- }
- tracing.EndSpan(ctx, sc, err)
- }()
- }
- req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, networkProfileName, parameters)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ProfilesClient", "UpdateTags", nil, "Failure preparing request")
- return
- }
-
- resp, err := client.UpdateTagsSender(req)
- if err != nil {
- result.Response = autorest.Response{Response: resp}
- err = autorest.NewErrorWithError(err, "network.ProfilesClient", "UpdateTags", resp, "Failure sending request")
- return
- }
-
- result, err = client.UpdateTagsResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ProfilesClient", "UpdateTags", resp, "Failure responding to request")
- }
-
- return
-}
-
-// UpdateTagsPreparer prepares the UpdateTags request.
-func (client ProfilesClient) UpdateTagsPreparer(ctx context.Context, resourceGroupName string, networkProfileName string, parameters TagsObject) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "networkProfileName": autorest.Encode("path", networkProfileName),
- "resourceGroupName": autorest.Encode("path", resourceGroupName),
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- }
-
- const APIVersion = "2018-12-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.Network/networkProfiles/{networkProfileName}", 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 ProfilesClient) 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 ProfilesClient) UpdateTagsResponder(resp *http.Response) (result Profile, 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/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/publicipprefixes.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/publicipprefixes.go
deleted file mode 100644
index 525d67ebd21..00000000000
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/publicipprefixes.go
+++ /dev/null
@@ -1,577 +0,0 @@
-package network
-
-// Copyright (c) Microsoft and contributors. All rights reserved.
-//
-// 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 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"
-)
-
-// PublicIPPrefixesClient is the network Client
-type PublicIPPrefixesClient struct {
- BaseClient
-}
-
-// NewPublicIPPrefixesClient creates an instance of the PublicIPPrefixesClient client.
-func NewPublicIPPrefixesClient(subscriptionID string) PublicIPPrefixesClient {
- return NewPublicIPPrefixesClientWithBaseURI(DefaultBaseURI, subscriptionID)
-}
-
-// NewPublicIPPrefixesClientWithBaseURI creates an instance of the PublicIPPrefixesClient 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 NewPublicIPPrefixesClientWithBaseURI(baseURI string, subscriptionID string) PublicIPPrefixesClient {
- return PublicIPPrefixesClient{NewWithBaseURI(baseURI, subscriptionID)}
-}
-
-// CreateOrUpdate creates or updates a static or dynamic public IP prefix.
-// Parameters:
-// resourceGroupName - the name of the resource group.
-// publicIPPrefixName - the name of the public IP prefix.
-// parameters - parameters supplied to the create or update public IP prefix operation.
-func (client PublicIPPrefixesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, publicIPPrefixName string, parameters PublicIPPrefix) (result PublicIPPrefixesCreateOrUpdateFuture, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPPrefixesClient.CreateOrUpdate")
- defer func() {
- sc := -1
- if result.Response() != nil {
- sc = result.Response().StatusCode
- }
- tracing.EndSpan(ctx, sc, err)
- }()
- }
- req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, publicIPPrefixName, parameters)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesClient", "CreateOrUpdate", nil, "Failure preparing request")
- return
- }
-
- result, err = client.CreateOrUpdateSender(req)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesClient", "CreateOrUpdate", result.Response(), "Failure sending request")
- return
- }
-
- return
-}
-
-// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
-func (client PublicIPPrefixesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, publicIPPrefixName string, parameters PublicIPPrefix) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "publicIpPrefixName": autorest.Encode("path", publicIPPrefixName),
- "resourceGroupName": autorest.Encode("path", resourceGroupName),
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- }
-
- const APIVersion = "2018-12-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.Network/publicIPPrefixes/{publicIpPrefixName}", 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 PublicIPPrefixesClient) CreateOrUpdateSender(req *http.Request) (future PublicIPPrefixesCreateOrUpdateFuture, err error) {
- var resp *http.Response
- resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
- if err != nil {
- return
- }
- future.Future, err = azure.NewFutureFromResponse(resp)
- return
-}
-
-// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
-// closes the http.Response Body.
-func (client PublicIPPrefixesClient) CreateOrUpdateResponder(resp *http.Response) (result PublicIPPrefix, 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 the specified public IP prefix.
-// Parameters:
-// resourceGroupName - the name of the resource group.
-// publicIPPrefixName - the name of the PublicIpPrefix.
-func (client PublicIPPrefixesClient) Delete(ctx context.Context, resourceGroupName string, publicIPPrefixName string) (result PublicIPPrefixesDeleteFuture, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPPrefixesClient.Delete")
- defer func() {
- sc := -1
- if result.Response() != nil {
- sc = result.Response().StatusCode
- }
- tracing.EndSpan(ctx, sc, err)
- }()
- }
- req, err := client.DeletePreparer(ctx, resourceGroupName, publicIPPrefixName)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesClient", "Delete", nil, "Failure preparing request")
- return
- }
-
- result, err = client.DeleteSender(req)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesClient", "Delete", result.Response(), "Failure sending request")
- return
- }
-
- return
-}
-
-// DeletePreparer prepares the Delete request.
-func (client PublicIPPrefixesClient) DeletePreparer(ctx context.Context, resourceGroupName string, publicIPPrefixName string) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "publicIpPrefixName": autorest.Encode("path", publicIPPrefixName),
- "resourceGroupName": autorest.Encode("path", resourceGroupName),
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- }
-
- const APIVersion = "2018-12-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.Network/publicIPPrefixes/{publicIpPrefixName}", 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 PublicIPPrefixesClient) DeleteSender(req *http.Request) (future PublicIPPrefixesDeleteFuture, err error) {
- var resp *http.Response
- resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
- if err != nil {
- return
- }
- future.Future, err = azure.NewFutureFromResponse(resp)
- return
-}
-
-// DeleteResponder handles the response to the Delete request. The method always
-// closes the http.Response Body.
-func (client PublicIPPrefixesClient) 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 the specified public IP prefix in a specified resource group.
-// Parameters:
-// resourceGroupName - the name of the resource group.
-// publicIPPrefixName - the name of the public IP prefix.
-// expand - expands referenced resources.
-func (client PublicIPPrefixesClient) Get(ctx context.Context, resourceGroupName string, publicIPPrefixName string, expand string) (result PublicIPPrefix, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPPrefixesClient.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, publicIPPrefixName, expand)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesClient", "Get", nil, "Failure preparing request")
- return
- }
-
- resp, err := client.GetSender(req)
- if err != nil {
- result.Response = autorest.Response{Response: resp}
- err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesClient", "Get", resp, "Failure sending request")
- return
- }
-
- result, err = client.GetResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesClient", "Get", resp, "Failure responding to request")
- }
-
- return
-}
-
-// GetPreparer prepares the Get request.
-func (client PublicIPPrefixesClient) GetPreparer(ctx context.Context, resourceGroupName string, publicIPPrefixName string, expand string) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "publicIpPrefixName": autorest.Encode("path", publicIPPrefixName),
- "resourceGroupName": autorest.Encode("path", resourceGroupName),
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- }
-
- const APIVersion = "2018-12-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.Network/publicIPPrefixes/{publicIpPrefixName}", 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 PublicIPPrefixesClient) 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 PublicIPPrefixesClient) GetResponder(resp *http.Response) (result PublicIPPrefix, err error) {
- err = autorest.Respond(
- resp,
- azure.WithErrorUnlessStatusCode(http.StatusOK),
- autorest.ByUnmarshallingJSON(&result),
- autorest.ByClosing())
- result.Response = autorest.Response{Response: resp}
- return
-}
-
-// List gets all public IP prefixes in a resource group.
-// Parameters:
-// resourceGroupName - the name of the resource group.
-func (client PublicIPPrefixesClient) List(ctx context.Context, resourceGroupName string) (result PublicIPPrefixListResultPage, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPPrefixesClient.List")
- defer func() {
- sc := -1
- if result.piplr.Response.Response != nil {
- sc = result.piplr.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, "network.PublicIPPrefixesClient", "List", nil, "Failure preparing request")
- return
- }
-
- resp, err := client.ListSender(req)
- if err != nil {
- result.piplr.Response = autorest.Response{Response: resp}
- err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesClient", "List", resp, "Failure sending request")
- return
- }
-
- result.piplr, err = client.ListResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesClient", "List", resp, "Failure responding to request")
- }
- if result.piplr.hasNextLink() && result.piplr.IsEmpty() {
- err = result.NextWithContext(ctx)
- }
-
- return
-}
-
-// ListPreparer prepares the List request.
-func (client PublicIPPrefixesClient) 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 = "2018-12-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.Network/publicIPPrefixes", 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 PublicIPPrefixesClient) 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 PublicIPPrefixesClient) ListResponder(resp *http.Response) (result PublicIPPrefixListResult, 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 PublicIPPrefixesClient) listNextResults(ctx context.Context, lastResults PublicIPPrefixListResult) (result PublicIPPrefixListResult, err error) {
- req, err := lastResults.publicIPPrefixListResultPreparer(ctx)
- if err != nil {
- return result, autorest.NewErrorWithError(err, "network.PublicIPPrefixesClient", "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, "network.PublicIPPrefixesClient", "listNextResults", resp, "Failure sending next results request")
- }
- result, err = client.ListResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesClient", "listNextResults", resp, "Failure responding to next results request")
- }
- return
-}
-
-// ListComplete enumerates all values, automatically crossing page boundaries as required.
-func (client PublicIPPrefixesClient) ListComplete(ctx context.Context, resourceGroupName string) (result PublicIPPrefixListResultIterator, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPPrefixesClient.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 all the public IP prefixes in a subscription.
-func (client PublicIPPrefixesClient) ListAll(ctx context.Context) (result PublicIPPrefixListResultPage, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPPrefixesClient.ListAll")
- defer func() {
- sc := -1
- if result.piplr.Response.Response != nil {
- sc = result.piplr.Response.Response.StatusCode
- }
- tracing.EndSpan(ctx, sc, err)
- }()
- }
- result.fn = client.listAllNextResults
- req, err := client.ListAllPreparer(ctx)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesClient", "ListAll", nil, "Failure preparing request")
- return
- }
-
- resp, err := client.ListAllSender(req)
- if err != nil {
- result.piplr.Response = autorest.Response{Response: resp}
- err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesClient", "ListAll", resp, "Failure sending request")
- return
- }
-
- result.piplr, err = client.ListAllResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesClient", "ListAll", resp, "Failure responding to request")
- }
- if result.piplr.hasNextLink() && result.piplr.IsEmpty() {
- err = result.NextWithContext(ctx)
- }
-
- return
-}
-
-// ListAllPreparer prepares the ListAll request.
-func (client PublicIPPrefixesClient) ListAllPreparer(ctx context.Context) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- }
-
- const APIVersion = "2018-12-01"
- queryParameters := map[string]interface{}{
- "api-version": APIVersion,
- }
-
- preparer := autorest.CreatePreparer(
- autorest.AsGet(),
- autorest.WithBaseURL(client.BaseURI),
- autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/publicIPPrefixes", 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 PublicIPPrefixesClient) 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 PublicIPPrefixesClient) ListAllResponder(resp *http.Response) (result PublicIPPrefixListResult, 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 PublicIPPrefixesClient) listAllNextResults(ctx context.Context, lastResults PublicIPPrefixListResult) (result PublicIPPrefixListResult, err error) {
- req, err := lastResults.publicIPPrefixListResultPreparer(ctx)
- if err != nil {
- return result, autorest.NewErrorWithError(err, "network.PublicIPPrefixesClient", "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, "network.PublicIPPrefixesClient", "listAllNextResults", resp, "Failure sending next results request")
- }
- result, err = client.ListAllResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesClient", "listAllNextResults", resp, "Failure responding to next results request")
- }
- return
-}
-
-// ListAllComplete enumerates all values, automatically crossing page boundaries as required.
-func (client PublicIPPrefixesClient) ListAllComplete(ctx context.Context) (result PublicIPPrefixListResultIterator, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPPrefixesClient.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
-}
-
-// UpdateTags updates public IP prefix tags.
-// Parameters:
-// resourceGroupName - the name of the resource group.
-// publicIPPrefixName - the name of the public IP prefix.
-// parameters - parameters supplied to update public IP prefix tags.
-func (client PublicIPPrefixesClient) UpdateTags(ctx context.Context, resourceGroupName string, publicIPPrefixName string, parameters TagsObject) (result PublicIPPrefixesUpdateTagsFuture, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPPrefixesClient.UpdateTags")
- defer func() {
- sc := -1
- if result.Response() != nil {
- sc = result.Response().StatusCode
- }
- tracing.EndSpan(ctx, sc, err)
- }()
- }
- req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, publicIPPrefixName, parameters)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesClient", "UpdateTags", nil, "Failure preparing request")
- return
- }
-
- result, err = client.UpdateTagsSender(req)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesClient", "UpdateTags", result.Response(), "Failure sending request")
- return
- }
-
- return
-}
-
-// UpdateTagsPreparer prepares the UpdateTags request.
-func (client PublicIPPrefixesClient) UpdateTagsPreparer(ctx context.Context, resourceGroupName string, publicIPPrefixName string, parameters TagsObject) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "publicIpPrefixName": autorest.Encode("path", publicIPPrefixName),
- "resourceGroupName": autorest.Encode("path", resourceGroupName),
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- }
-
- const APIVersion = "2018-12-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.Network/publicIPPrefixes/{publicIpPrefixName}", 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 PublicIPPrefixesClient) UpdateTagsSender(req *http.Request) (future PublicIPPrefixesUpdateTagsFuture, err error) {
- var resp *http.Response
- resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
- if err != nil {
- return
- }
- future.Future, err = azure.NewFutureFromResponse(resp)
- return
-}
-
-// UpdateTagsResponder handles the response to the UpdateTags request. The method always
-// closes the http.Response Body.
-func (client PublicIPPrefixesClient) UpdateTagsResponder(resp *http.Response) (result PublicIPPrefix, 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/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/serviceendpointpolicies.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/serviceendpointpolicies.go
deleted file mode 100644
index b3706507136..00000000000
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/serviceendpointpolicies.go
+++ /dev/null
@@ -1,577 +0,0 @@
-package network
-
-// Copyright (c) Microsoft and contributors. All rights reserved.
-//
-// 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 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"
-)
-
-// ServiceEndpointPoliciesClient is the network Client
-type ServiceEndpointPoliciesClient struct {
- BaseClient
-}
-
-// NewServiceEndpointPoliciesClient creates an instance of the ServiceEndpointPoliciesClient client.
-func NewServiceEndpointPoliciesClient(subscriptionID string) ServiceEndpointPoliciesClient {
- return NewServiceEndpointPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID)
-}
-
-// NewServiceEndpointPoliciesClientWithBaseURI creates an instance of the ServiceEndpointPoliciesClient 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 NewServiceEndpointPoliciesClientWithBaseURI(baseURI string, subscriptionID string) ServiceEndpointPoliciesClient {
- return ServiceEndpointPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)}
-}
-
-// CreateOrUpdate creates or updates a service Endpoint Policies.
-// Parameters:
-// resourceGroupName - the name of the resource group.
-// serviceEndpointPolicyName - the name of the service endpoint policy.
-// parameters - parameters supplied to the create or update service endpoint policy operation.
-func (client ServiceEndpointPoliciesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string, parameters ServiceEndpointPolicy) (result ServiceEndpointPoliciesCreateOrUpdateFuture, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPoliciesClient.CreateOrUpdate")
- defer func() {
- sc := -1
- if result.Response() != nil {
- sc = result.Response().StatusCode
- }
- tracing.EndSpan(ctx, sc, err)
- }()
- }
- req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, serviceEndpointPolicyName, parameters)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesClient", "CreateOrUpdate", nil, "Failure preparing request")
- return
- }
-
- result, err = client.CreateOrUpdateSender(req)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesClient", "CreateOrUpdate", result.Response(), "Failure sending request")
- return
- }
-
- return
-}
-
-// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
-func (client ServiceEndpointPoliciesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string, parameters ServiceEndpointPolicy) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "resourceGroupName": autorest.Encode("path", resourceGroupName),
- "serviceEndpointPolicyName": autorest.Encode("path", serviceEndpointPolicyName),
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- }
-
- const APIVersion = "2018-12-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.Network/serviceEndpointPolicies/{serviceEndpointPolicyName}", 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 ServiceEndpointPoliciesClient) CreateOrUpdateSender(req *http.Request) (future ServiceEndpointPoliciesCreateOrUpdateFuture, err error) {
- var resp *http.Response
- resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
- if err != nil {
- return
- }
- future.Future, err = azure.NewFutureFromResponse(resp)
- return
-}
-
-// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
-// closes the http.Response Body.
-func (client ServiceEndpointPoliciesClient) CreateOrUpdateResponder(resp *http.Response) (result ServiceEndpointPolicy, 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 the specified service endpoint policy.
-// Parameters:
-// resourceGroupName - the name of the resource group.
-// serviceEndpointPolicyName - the name of the service endpoint policy.
-func (client ServiceEndpointPoliciesClient) Delete(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string) (result ServiceEndpointPoliciesDeleteFuture, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPoliciesClient.Delete")
- defer func() {
- sc := -1
- if result.Response() != nil {
- sc = result.Response().StatusCode
- }
- tracing.EndSpan(ctx, sc, err)
- }()
- }
- req, err := client.DeletePreparer(ctx, resourceGroupName, serviceEndpointPolicyName)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesClient", "Delete", nil, "Failure preparing request")
- return
- }
-
- result, err = client.DeleteSender(req)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesClient", "Delete", result.Response(), "Failure sending request")
- return
- }
-
- return
-}
-
-// DeletePreparer prepares the Delete request.
-func (client ServiceEndpointPoliciesClient) DeletePreparer(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "resourceGroupName": autorest.Encode("path", resourceGroupName),
- "serviceEndpointPolicyName": autorest.Encode("path", serviceEndpointPolicyName),
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- }
-
- const APIVersion = "2018-12-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.Network/serviceEndpointPolicies/{serviceEndpointPolicyName}", 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 ServiceEndpointPoliciesClient) DeleteSender(req *http.Request) (future ServiceEndpointPoliciesDeleteFuture, err error) {
- var resp *http.Response
- resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
- if err != nil {
- return
- }
- future.Future, err = azure.NewFutureFromResponse(resp)
- return
-}
-
-// DeleteResponder handles the response to the Delete request. The method always
-// closes the http.Response Body.
-func (client ServiceEndpointPoliciesClient) 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 the specified service Endpoint Policies in a specified resource group.
-// Parameters:
-// resourceGroupName - the name of the resource group.
-// serviceEndpointPolicyName - the name of the service endpoint policy.
-// expand - expands referenced resources.
-func (client ServiceEndpointPoliciesClient) Get(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string, expand string) (result ServiceEndpointPolicy, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPoliciesClient.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, serviceEndpointPolicyName, expand)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesClient", "Get", nil, "Failure preparing request")
- return
- }
-
- resp, err := client.GetSender(req)
- if err != nil {
- result.Response = autorest.Response{Response: resp}
- err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesClient", "Get", resp, "Failure sending request")
- return
- }
-
- result, err = client.GetResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesClient", "Get", resp, "Failure responding to request")
- }
-
- return
-}
-
-// GetPreparer prepares the Get request.
-func (client ServiceEndpointPoliciesClient) GetPreparer(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string, expand string) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "resourceGroupName": autorest.Encode("path", resourceGroupName),
- "serviceEndpointPolicyName": autorest.Encode("path", serviceEndpointPolicyName),
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- }
-
- const APIVersion = "2018-12-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.Network/serviceEndpointPolicies/{serviceEndpointPolicyName}", 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 ServiceEndpointPoliciesClient) 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 ServiceEndpointPoliciesClient) GetResponder(resp *http.Response) (result ServiceEndpointPolicy, err error) {
- err = autorest.Respond(
- resp,
- azure.WithErrorUnlessStatusCode(http.StatusOK),
- autorest.ByUnmarshallingJSON(&result),
- autorest.ByClosing())
- result.Response = autorest.Response{Response: resp}
- return
-}
-
-// List gets all the service endpoint policies in a subscription.
-func (client ServiceEndpointPoliciesClient) List(ctx context.Context) (result ServiceEndpointPolicyListResultPage, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPoliciesClient.List")
- defer func() {
- sc := -1
- if result.seplr.Response.Response != nil {
- sc = result.seplr.Response.Response.StatusCode
- }
- tracing.EndSpan(ctx, sc, err)
- }()
- }
- result.fn = client.listNextResults
- req, err := client.ListPreparer(ctx)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesClient", "List", nil, "Failure preparing request")
- return
- }
-
- resp, err := client.ListSender(req)
- if err != nil {
- result.seplr.Response = autorest.Response{Response: resp}
- err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesClient", "List", resp, "Failure sending request")
- return
- }
-
- result.seplr, err = client.ListResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesClient", "List", resp, "Failure responding to request")
- }
- if result.seplr.hasNextLink() && result.seplr.IsEmpty() {
- err = result.NextWithContext(ctx)
- }
-
- return
-}
-
-// ListPreparer prepares the List request.
-func (client ServiceEndpointPoliciesClient) ListPreparer(ctx context.Context) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- }
-
- const APIVersion = "2018-12-01"
- queryParameters := map[string]interface{}{
- "api-version": APIVersion,
- }
-
- preparer := autorest.CreatePreparer(
- autorest.AsGet(),
- autorest.WithBaseURL(client.BaseURI),
- autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/ServiceEndpointPolicies", 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 ServiceEndpointPoliciesClient) 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 ServiceEndpointPoliciesClient) ListResponder(resp *http.Response) (result ServiceEndpointPolicyListResult, 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 ServiceEndpointPoliciesClient) listNextResults(ctx context.Context, lastResults ServiceEndpointPolicyListResult) (result ServiceEndpointPolicyListResult, err error) {
- req, err := lastResults.serviceEndpointPolicyListResultPreparer(ctx)
- if err != nil {
- return result, autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesClient", "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, "network.ServiceEndpointPoliciesClient", "listNextResults", resp, "Failure sending next results request")
- }
- result, err = client.ListResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesClient", "listNextResults", resp, "Failure responding to next results request")
- }
- return
-}
-
-// ListComplete enumerates all values, automatically crossing page boundaries as required.
-func (client ServiceEndpointPoliciesClient) ListComplete(ctx context.Context) (result ServiceEndpointPolicyListResultIterator, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPoliciesClient.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 all service endpoint Policies in a resource group.
-// Parameters:
-// resourceGroupName - the name of the resource group.
-func (client ServiceEndpointPoliciesClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result ServiceEndpointPolicyListResultPage, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPoliciesClient.ListByResourceGroup")
- defer func() {
- sc := -1
- if result.seplr.Response.Response != nil {
- sc = result.seplr.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, "network.ServiceEndpointPoliciesClient", "ListByResourceGroup", nil, "Failure preparing request")
- return
- }
-
- resp, err := client.ListByResourceGroupSender(req)
- if err != nil {
- result.seplr.Response = autorest.Response{Response: resp}
- err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesClient", "ListByResourceGroup", resp, "Failure sending request")
- return
- }
-
- result.seplr, err = client.ListByResourceGroupResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesClient", "ListByResourceGroup", resp, "Failure responding to request")
- }
- if result.seplr.hasNextLink() && result.seplr.IsEmpty() {
- err = result.NextWithContext(ctx)
- }
-
- return
-}
-
-// ListByResourceGroupPreparer prepares the ListByResourceGroup request.
-func (client ServiceEndpointPoliciesClient) 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 = "2018-12-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.Network/serviceEndpointPolicies", 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 ServiceEndpointPoliciesClient) 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 ServiceEndpointPoliciesClient) ListByResourceGroupResponder(resp *http.Response) (result ServiceEndpointPolicyListResult, 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 ServiceEndpointPoliciesClient) listByResourceGroupNextResults(ctx context.Context, lastResults ServiceEndpointPolicyListResult) (result ServiceEndpointPolicyListResult, err error) {
- req, err := lastResults.serviceEndpointPolicyListResultPreparer(ctx)
- if err != nil {
- return result, autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesClient", "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, "network.ServiceEndpointPoliciesClient", "listByResourceGroupNextResults", resp, "Failure sending next results request")
- }
- result, err = client.ListByResourceGroupResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request")
- }
- return
-}
-
-// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required.
-func (client ServiceEndpointPoliciesClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result ServiceEndpointPolicyListResultIterator, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPoliciesClient.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 service Endpoint Policies.
-// Parameters:
-// resourceGroupName - the name of the resource group.
-// serviceEndpointPolicyName - the name of the service endpoint policy.
-// parameters - parameters supplied to update service endpoint policy tags.
-func (client ServiceEndpointPoliciesClient) Update(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string, parameters TagsObject) (result ServiceEndpointPoliciesUpdateFuture, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPoliciesClient.Update")
- defer func() {
- sc := -1
- if result.Response() != nil {
- sc = result.Response().StatusCode
- }
- tracing.EndSpan(ctx, sc, err)
- }()
- }
- req, err := client.UpdatePreparer(ctx, resourceGroupName, serviceEndpointPolicyName, parameters)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesClient", "Update", nil, "Failure preparing request")
- return
- }
-
- result, err = client.UpdateSender(req)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesClient", "Update", result.Response(), "Failure sending request")
- return
- }
-
- return
-}
-
-// UpdatePreparer prepares the Update request.
-func (client ServiceEndpointPoliciesClient) UpdatePreparer(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string, parameters TagsObject) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "resourceGroupName": autorest.Encode("path", resourceGroupName),
- "serviceEndpointPolicyName": autorest.Encode("path", serviceEndpointPolicyName),
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- }
-
- const APIVersion = "2018-12-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.Network/serviceEndpointPolicies/{serviceEndpointPolicyName}", 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 ServiceEndpointPoliciesClient) UpdateSender(req *http.Request) (future ServiceEndpointPoliciesUpdateFuture, err error) {
- var resp *http.Response
- resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
- if err != nil {
- return
- }
- future.Future, err = azure.NewFutureFromResponse(resp)
- return
-}
-
-// UpdateResponder handles the response to the Update request. The method always
-// closes the http.Response Body.
-func (client ServiceEndpointPoliciesClient) UpdateResponder(resp *http.Response) (result ServiceEndpointPolicy, 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/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/serviceendpointpolicydefinitions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/serviceendpointpolicydefinitions.go
deleted file mode 100644
index 91bea5a462d..00000000000
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/serviceendpointpolicydefinitions.go
+++ /dev/null
@@ -1,393 +0,0 @@
-package network
-
-// Copyright (c) Microsoft and contributors. All rights reserved.
-//
-// 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 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"
-)
-
-// ServiceEndpointPolicyDefinitionsClient is the network Client
-type ServiceEndpointPolicyDefinitionsClient struct {
- BaseClient
-}
-
-// NewServiceEndpointPolicyDefinitionsClient creates an instance of the ServiceEndpointPolicyDefinitionsClient client.
-func NewServiceEndpointPolicyDefinitionsClient(subscriptionID string) ServiceEndpointPolicyDefinitionsClient {
- return NewServiceEndpointPolicyDefinitionsClientWithBaseURI(DefaultBaseURI, subscriptionID)
-}
-
-// NewServiceEndpointPolicyDefinitionsClientWithBaseURI creates an instance of the
-// ServiceEndpointPolicyDefinitionsClient 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 NewServiceEndpointPolicyDefinitionsClientWithBaseURI(baseURI string, subscriptionID string) ServiceEndpointPolicyDefinitionsClient {
- return ServiceEndpointPolicyDefinitionsClient{NewWithBaseURI(baseURI, subscriptionID)}
-}
-
-// CreateOrUpdate creates or updates a service endpoint policy definition in the specified service endpoint policy.
-// Parameters:
-// resourceGroupName - the name of the resource group.
-// serviceEndpointPolicyName - the name of the service endpoint policy.
-// serviceEndpointPolicyDefinitionName - the name of the service endpoint policy definition name.
-// serviceEndpointPolicyDefinitions - parameters supplied to the create or update service endpoint policy
-// operation.
-func (client ServiceEndpointPolicyDefinitionsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string, serviceEndpointPolicyDefinitionName string, serviceEndpointPolicyDefinitions ServiceEndpointPolicyDefinition) (result ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPolicyDefinitionsClient.CreateOrUpdate")
- defer func() {
- sc := -1
- if result.Response() != nil {
- sc = result.Response().StatusCode
- }
- tracing.EndSpan(ctx, sc, err)
- }()
- }
- req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, serviceEndpointPolicyName, serviceEndpointPolicyDefinitionName, serviceEndpointPolicyDefinitions)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ServiceEndpointPolicyDefinitionsClient", "CreateOrUpdate", nil, "Failure preparing request")
- return
- }
-
- result, err = client.CreateOrUpdateSender(req)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ServiceEndpointPolicyDefinitionsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
- return
- }
-
- return
-}
-
-// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
-func (client ServiceEndpointPolicyDefinitionsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string, serviceEndpointPolicyDefinitionName string, serviceEndpointPolicyDefinitions ServiceEndpointPolicyDefinition) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "resourceGroupName": autorest.Encode("path", resourceGroupName),
- "serviceEndpointPolicyDefinitionName": autorest.Encode("path", serviceEndpointPolicyDefinitionName),
- "serviceEndpointPolicyName": autorest.Encode("path", serviceEndpointPolicyName),
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- }
-
- const APIVersion = "2018-12-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.Network/serviceEndpointPolicies/{serviceEndpointPolicyName}/serviceEndpointPolicyDefinitions/{serviceEndpointPolicyDefinitionName}", pathParameters),
- autorest.WithJSON(serviceEndpointPolicyDefinitions),
- 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 ServiceEndpointPolicyDefinitionsClient) CreateOrUpdateSender(req *http.Request) (future ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture, err error) {
- var resp *http.Response
- resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
- if err != nil {
- return
- }
- future.Future, err = azure.NewFutureFromResponse(resp)
- return
-}
-
-// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
-// closes the http.Response Body.
-func (client ServiceEndpointPolicyDefinitionsClient) CreateOrUpdateResponder(resp *http.Response) (result ServiceEndpointPolicyDefinition, 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 the specified ServiceEndpoint policy definitions.
-// Parameters:
-// resourceGroupName - the name of the resource group.
-// serviceEndpointPolicyName - the name of the Service Endpoint Policy.
-// serviceEndpointPolicyDefinitionName - the name of the service endpoint policy definition.
-func (client ServiceEndpointPolicyDefinitionsClient) Delete(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string, serviceEndpointPolicyDefinitionName string) (result ServiceEndpointPolicyDefinitionsDeleteFuture, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPolicyDefinitionsClient.Delete")
- defer func() {
- sc := -1
- if result.Response() != nil {
- sc = result.Response().StatusCode
- }
- tracing.EndSpan(ctx, sc, err)
- }()
- }
- req, err := client.DeletePreparer(ctx, resourceGroupName, serviceEndpointPolicyName, serviceEndpointPolicyDefinitionName)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ServiceEndpointPolicyDefinitionsClient", "Delete", nil, "Failure preparing request")
- return
- }
-
- result, err = client.DeleteSender(req)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ServiceEndpointPolicyDefinitionsClient", "Delete", result.Response(), "Failure sending request")
- return
- }
-
- return
-}
-
-// DeletePreparer prepares the Delete request.
-func (client ServiceEndpointPolicyDefinitionsClient) DeletePreparer(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string, serviceEndpointPolicyDefinitionName string) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "resourceGroupName": autorest.Encode("path", resourceGroupName),
- "serviceEndpointPolicyDefinitionName": autorest.Encode("path", serviceEndpointPolicyDefinitionName),
- "serviceEndpointPolicyName": autorest.Encode("path", serviceEndpointPolicyName),
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- }
-
- const APIVersion = "2018-12-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.Network/serviceEndpointPolicies/{serviceEndpointPolicyName}/serviceEndpointPolicyDefinitions/{serviceEndpointPolicyDefinitionName}", 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 ServiceEndpointPolicyDefinitionsClient) DeleteSender(req *http.Request) (future ServiceEndpointPolicyDefinitionsDeleteFuture, err error) {
- var resp *http.Response
- resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
- if err != nil {
- return
- }
- future.Future, err = azure.NewFutureFromResponse(resp)
- return
-}
-
-// DeleteResponder handles the response to the Delete request. The method always
-// closes the http.Response Body.
-func (client ServiceEndpointPolicyDefinitionsClient) 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 get the specified service endpoint policy definitions from service endpoint policy.
-// Parameters:
-// resourceGroupName - the name of the resource group.
-// serviceEndpointPolicyName - the name of the service endpoint policy name.
-// serviceEndpointPolicyDefinitionName - the name of the service endpoint policy definition name.
-func (client ServiceEndpointPolicyDefinitionsClient) Get(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string, serviceEndpointPolicyDefinitionName string) (result ServiceEndpointPolicyDefinition, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPolicyDefinitionsClient.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, serviceEndpointPolicyName, serviceEndpointPolicyDefinitionName)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ServiceEndpointPolicyDefinitionsClient", "Get", nil, "Failure preparing request")
- return
- }
-
- resp, err := client.GetSender(req)
- if err != nil {
- result.Response = autorest.Response{Response: resp}
- err = autorest.NewErrorWithError(err, "network.ServiceEndpointPolicyDefinitionsClient", "Get", resp, "Failure sending request")
- return
- }
-
- result, err = client.GetResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ServiceEndpointPolicyDefinitionsClient", "Get", resp, "Failure responding to request")
- }
-
- return
-}
-
-// GetPreparer prepares the Get request.
-func (client ServiceEndpointPolicyDefinitionsClient) GetPreparer(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string, serviceEndpointPolicyDefinitionName string) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "resourceGroupName": autorest.Encode("path", resourceGroupName),
- "serviceEndpointPolicyDefinitionName": autorest.Encode("path", serviceEndpointPolicyDefinitionName),
- "serviceEndpointPolicyName": autorest.Encode("path", serviceEndpointPolicyName),
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- }
-
- const APIVersion = "2018-12-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.Network/serviceEndpointPolicies/{serviceEndpointPolicyName}/serviceEndpointPolicyDefinitions/{serviceEndpointPolicyDefinitionName}", 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 ServiceEndpointPolicyDefinitionsClient) 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 ServiceEndpointPolicyDefinitionsClient) GetResponder(resp *http.Response) (result ServiceEndpointPolicyDefinition, err error) {
- err = autorest.Respond(
- resp,
- azure.WithErrorUnlessStatusCode(http.StatusOK),
- autorest.ByUnmarshallingJSON(&result),
- autorest.ByClosing())
- result.Response = autorest.Response{Response: resp}
- return
-}
-
-// ListByResourceGroup gets all service endpoint policy definitions in a service end point policy.
-// Parameters:
-// resourceGroupName - the name of the resource group.
-// serviceEndpointPolicyName - the name of the service endpoint policy name.
-func (client ServiceEndpointPolicyDefinitionsClient) ListByResourceGroup(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string) (result ServiceEndpointPolicyDefinitionListResultPage, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPolicyDefinitionsClient.ListByResourceGroup")
- defer func() {
- sc := -1
- if result.sepdlr.Response.Response != nil {
- sc = result.sepdlr.Response.Response.StatusCode
- }
- tracing.EndSpan(ctx, sc, err)
- }()
- }
- result.fn = client.listByResourceGroupNextResults
- req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName, serviceEndpointPolicyName)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ServiceEndpointPolicyDefinitionsClient", "ListByResourceGroup", nil, "Failure preparing request")
- return
- }
-
- resp, err := client.ListByResourceGroupSender(req)
- if err != nil {
- result.sepdlr.Response = autorest.Response{Response: resp}
- err = autorest.NewErrorWithError(err, "network.ServiceEndpointPolicyDefinitionsClient", "ListByResourceGroup", resp, "Failure sending request")
- return
- }
-
- result.sepdlr, err = client.ListByResourceGroupResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ServiceEndpointPolicyDefinitionsClient", "ListByResourceGroup", resp, "Failure responding to request")
- }
- if result.sepdlr.hasNextLink() && result.sepdlr.IsEmpty() {
- err = result.NextWithContext(ctx)
- }
-
- return
-}
-
-// ListByResourceGroupPreparer prepares the ListByResourceGroup request.
-func (client ServiceEndpointPolicyDefinitionsClient) ListByResourceGroupPreparer(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "resourceGroupName": autorest.Encode("path", resourceGroupName),
- "serviceEndpointPolicyName": autorest.Encode("path", serviceEndpointPolicyName),
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- }
-
- const APIVersion = "2018-12-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.Network/serviceEndpointPolicies/{serviceEndpointPolicyName}/serviceEndpointPolicyDefinitions", 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 ServiceEndpointPolicyDefinitionsClient) 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 ServiceEndpointPolicyDefinitionsClient) ListByResourceGroupResponder(resp *http.Response) (result ServiceEndpointPolicyDefinitionListResult, 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 ServiceEndpointPolicyDefinitionsClient) listByResourceGroupNextResults(ctx context.Context, lastResults ServiceEndpointPolicyDefinitionListResult) (result ServiceEndpointPolicyDefinitionListResult, err error) {
- req, err := lastResults.serviceEndpointPolicyDefinitionListResultPreparer(ctx)
- if err != nil {
- return result, autorest.NewErrorWithError(err, "network.ServiceEndpointPolicyDefinitionsClient", "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, "network.ServiceEndpointPolicyDefinitionsClient", "listByResourceGroupNextResults", resp, "Failure sending next results request")
- }
- result, err = client.ListByResourceGroupResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.ServiceEndpointPolicyDefinitionsClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request")
- }
- return
-}
-
-// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required.
-func (client ServiceEndpointPolicyDefinitionsClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string) (result ServiceEndpointPolicyDefinitionListResultIterator, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPolicyDefinitionsClient.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, serviceEndpointPolicyName)
- return
-}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/virtualhubs.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/virtualhubs.go
deleted file mode 100644
index 24c5a94eb07..00000000000
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/virtualhubs.go
+++ /dev/null
@@ -1,573 +0,0 @@
-package network
-
-// Copyright (c) Microsoft and contributors. All rights reserved.
-//
-// 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 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"
-)
-
-// VirtualHubsClient is the network Client
-type VirtualHubsClient struct {
- BaseClient
-}
-
-// NewVirtualHubsClient creates an instance of the VirtualHubsClient client.
-func NewVirtualHubsClient(subscriptionID string) VirtualHubsClient {
- return NewVirtualHubsClientWithBaseURI(DefaultBaseURI, subscriptionID)
-}
-
-// NewVirtualHubsClientWithBaseURI creates an instance of the VirtualHubsClient 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 NewVirtualHubsClientWithBaseURI(baseURI string, subscriptionID string) VirtualHubsClient {
- return VirtualHubsClient{NewWithBaseURI(baseURI, subscriptionID)}
-}
-
-// CreateOrUpdate creates a VirtualHub resource if it doesn't exist else updates the existing VirtualHub.
-// Parameters:
-// resourceGroupName - the resource group name of the VirtualHub.
-// virtualHubName - the name of the VirtualHub.
-// virtualHubParameters - parameters supplied to create or update VirtualHub.
-func (client VirtualHubsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, virtualHubName string, virtualHubParameters VirtualHub) (result VirtualHubsCreateOrUpdateFuture, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/VirtualHubsClient.CreateOrUpdate")
- defer func() {
- sc := -1
- if result.Response() != nil {
- sc = result.Response().StatusCode
- }
- tracing.EndSpan(ctx, sc, err)
- }()
- }
- req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, virtualHubName, virtualHubParameters)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualHubsClient", "CreateOrUpdate", nil, "Failure preparing request")
- return
- }
-
- result, err = client.CreateOrUpdateSender(req)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualHubsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
- return
- }
-
- return
-}
-
-// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
-func (client VirtualHubsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, virtualHubName string, virtualHubParameters VirtualHub) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "resourceGroupName": autorest.Encode("path", resourceGroupName),
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- "virtualHubName": autorest.Encode("path", virtualHubName),
- }
-
- const APIVersion = "2018-12-01"
- queryParameters := map[string]interface{}{
- "api-version": APIVersion,
- }
-
- virtualHubParameters.Etag = 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.Network/virtualHubs/{virtualHubName}", pathParameters),
- autorest.WithJSON(virtualHubParameters),
- 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 VirtualHubsClient) CreateOrUpdateSender(req *http.Request) (future VirtualHubsCreateOrUpdateFuture, err error) {
- var resp *http.Response
- resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
- if err != nil {
- return
- }
- future.Future, err = azure.NewFutureFromResponse(resp)
- return
-}
-
-// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
-// closes the http.Response Body.
-func (client VirtualHubsClient) CreateOrUpdateResponder(resp *http.Response) (result VirtualHub, 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 VirtualHub.
-// Parameters:
-// resourceGroupName - the resource group name of the VirtualHub.
-// virtualHubName - the name of the VirtualHub.
-func (client VirtualHubsClient) Delete(ctx context.Context, resourceGroupName string, virtualHubName string) (result VirtualHubsDeleteFuture, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/VirtualHubsClient.Delete")
- defer func() {
- sc := -1
- if result.Response() != nil {
- sc = result.Response().StatusCode
- }
- tracing.EndSpan(ctx, sc, err)
- }()
- }
- req, err := client.DeletePreparer(ctx, resourceGroupName, virtualHubName)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualHubsClient", "Delete", nil, "Failure preparing request")
- return
- }
-
- result, err = client.DeleteSender(req)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualHubsClient", "Delete", result.Response(), "Failure sending request")
- return
- }
-
- return
-}
-
-// DeletePreparer prepares the Delete request.
-func (client VirtualHubsClient) DeletePreparer(ctx context.Context, resourceGroupName string, virtualHubName string) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "resourceGroupName": autorest.Encode("path", resourceGroupName),
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- "virtualHubName": autorest.Encode("path", virtualHubName),
- }
-
- const APIVersion = "2018-12-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.Network/virtualHubs/{virtualHubName}", 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 VirtualHubsClient) DeleteSender(req *http.Request) (future VirtualHubsDeleteFuture, err error) {
- var resp *http.Response
- resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
- if err != nil {
- return
- }
- future.Future, err = azure.NewFutureFromResponse(resp)
- return
-}
-
-// DeleteResponder handles the response to the Delete request. The method always
-// closes the http.Response Body.
-func (client VirtualHubsClient) 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 the details of a VirtualHub.
-// Parameters:
-// resourceGroupName - the resource group name of the VirtualHub.
-// virtualHubName - the name of the VirtualHub.
-func (client VirtualHubsClient) Get(ctx context.Context, resourceGroupName string, virtualHubName string) (result VirtualHub, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/VirtualHubsClient.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, virtualHubName)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualHubsClient", "Get", nil, "Failure preparing request")
- return
- }
-
- resp, err := client.GetSender(req)
- if err != nil {
- result.Response = autorest.Response{Response: resp}
- err = autorest.NewErrorWithError(err, "network.VirtualHubsClient", "Get", resp, "Failure sending request")
- return
- }
-
- result, err = client.GetResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualHubsClient", "Get", resp, "Failure responding to request")
- }
-
- return
-}
-
-// GetPreparer prepares the Get request.
-func (client VirtualHubsClient) GetPreparer(ctx context.Context, resourceGroupName string, virtualHubName string) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "resourceGroupName": autorest.Encode("path", resourceGroupName),
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- "virtualHubName": autorest.Encode("path", virtualHubName),
- }
-
- const APIVersion = "2018-12-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.Network/virtualHubs/{virtualHubName}", 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 VirtualHubsClient) 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 VirtualHubsClient) GetResponder(resp *http.Response) (result VirtualHub, 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 VirtualHubs in a subscription.
-func (client VirtualHubsClient) List(ctx context.Context) (result ListVirtualHubsResultPage, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/VirtualHubsClient.List")
- defer func() {
- sc := -1
- if result.lvhr.Response.Response != nil {
- sc = result.lvhr.Response.Response.StatusCode
- }
- tracing.EndSpan(ctx, sc, err)
- }()
- }
- result.fn = client.listNextResults
- req, err := client.ListPreparer(ctx)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualHubsClient", "List", nil, "Failure preparing request")
- return
- }
-
- resp, err := client.ListSender(req)
- if err != nil {
- result.lvhr.Response = autorest.Response{Response: resp}
- err = autorest.NewErrorWithError(err, "network.VirtualHubsClient", "List", resp, "Failure sending request")
- return
- }
-
- result.lvhr, err = client.ListResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualHubsClient", "List", resp, "Failure responding to request")
- }
- if result.lvhr.hasNextLink() && result.lvhr.IsEmpty() {
- err = result.NextWithContext(ctx)
- }
-
- return
-}
-
-// ListPreparer prepares the List request.
-func (client VirtualHubsClient) ListPreparer(ctx context.Context) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- }
-
- const APIVersion = "2018-12-01"
- queryParameters := map[string]interface{}{
- "api-version": APIVersion,
- }
-
- preparer := autorest.CreatePreparer(
- autorest.AsGet(),
- autorest.WithBaseURL(client.BaseURI),
- autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/virtualHubs", 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 VirtualHubsClient) 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 VirtualHubsClient) ListResponder(resp *http.Response) (result ListVirtualHubsResult, 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 VirtualHubsClient) listNextResults(ctx context.Context, lastResults ListVirtualHubsResult) (result ListVirtualHubsResult, err error) {
- req, err := lastResults.listVirtualHubsResultPreparer(ctx)
- if err != nil {
- return result, autorest.NewErrorWithError(err, "network.VirtualHubsClient", "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, "network.VirtualHubsClient", "listNextResults", resp, "Failure sending next results request")
- }
- result, err = client.ListResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualHubsClient", "listNextResults", resp, "Failure responding to next results request")
- }
- return
-}
-
-// ListComplete enumerates all values, automatically crossing page boundaries as required.
-func (client VirtualHubsClient) ListComplete(ctx context.Context) (result ListVirtualHubsResultIterator, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/VirtualHubsClient.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 VirtualHubs in a resource group.
-// Parameters:
-// resourceGroupName - the resource group name of the VirtualHub.
-func (client VirtualHubsClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result ListVirtualHubsResultPage, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/VirtualHubsClient.ListByResourceGroup")
- defer func() {
- sc := -1
- if result.lvhr.Response.Response != nil {
- sc = result.lvhr.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, "network.VirtualHubsClient", "ListByResourceGroup", nil, "Failure preparing request")
- return
- }
-
- resp, err := client.ListByResourceGroupSender(req)
- if err != nil {
- result.lvhr.Response = autorest.Response{Response: resp}
- err = autorest.NewErrorWithError(err, "network.VirtualHubsClient", "ListByResourceGroup", resp, "Failure sending request")
- return
- }
-
- result.lvhr, err = client.ListByResourceGroupResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualHubsClient", "ListByResourceGroup", resp, "Failure responding to request")
- }
- if result.lvhr.hasNextLink() && result.lvhr.IsEmpty() {
- err = result.NextWithContext(ctx)
- }
-
- return
-}
-
-// ListByResourceGroupPreparer prepares the ListByResourceGroup request.
-func (client VirtualHubsClient) 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 = "2018-12-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.Network/virtualHubs", 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 VirtualHubsClient) 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 VirtualHubsClient) ListByResourceGroupResponder(resp *http.Response) (result ListVirtualHubsResult, 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 VirtualHubsClient) listByResourceGroupNextResults(ctx context.Context, lastResults ListVirtualHubsResult) (result ListVirtualHubsResult, err error) {
- req, err := lastResults.listVirtualHubsResultPreparer(ctx)
- if err != nil {
- return result, autorest.NewErrorWithError(err, "network.VirtualHubsClient", "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, "network.VirtualHubsClient", "listByResourceGroupNextResults", resp, "Failure sending next results request")
- }
- result, err = client.ListByResourceGroupResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualHubsClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request")
- }
- return
-}
-
-// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required.
-func (client VirtualHubsClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result ListVirtualHubsResultIterator, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/VirtualHubsClient.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 updates VirtualHub tags.
-// Parameters:
-// resourceGroupName - the resource group name of the VirtualHub.
-// virtualHubName - the name of the VirtualHub.
-// virtualHubParameters - parameters supplied to update VirtualHub tags.
-func (client VirtualHubsClient) UpdateTags(ctx context.Context, resourceGroupName string, virtualHubName string, virtualHubParameters TagsObject) (result VirtualHubsUpdateTagsFuture, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/VirtualHubsClient.UpdateTags")
- defer func() {
- sc := -1
- if result.Response() != nil {
- sc = result.Response().StatusCode
- }
- tracing.EndSpan(ctx, sc, err)
- }()
- }
- req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, virtualHubName, virtualHubParameters)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualHubsClient", "UpdateTags", nil, "Failure preparing request")
- return
- }
-
- result, err = client.UpdateTagsSender(req)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualHubsClient", "UpdateTags", result.Response(), "Failure sending request")
- return
- }
-
- return
-}
-
-// UpdateTagsPreparer prepares the UpdateTags request.
-func (client VirtualHubsClient) UpdateTagsPreparer(ctx context.Context, resourceGroupName string, virtualHubName string, virtualHubParameters TagsObject) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "resourceGroupName": autorest.Encode("path", resourceGroupName),
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- "virtualHubName": autorest.Encode("path", virtualHubName),
- }
-
- const APIVersion = "2018-12-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.Network/virtualHubs/{virtualHubName}", pathParameters),
- autorest.WithJSON(virtualHubParameters),
- 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 VirtualHubsClient) UpdateTagsSender(req *http.Request) (future VirtualHubsUpdateTagsFuture, err error) {
- var resp *http.Response
- resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
- if err != nil {
- return
- }
- future.Future, err = azure.NewFutureFromResponse(resp)
- return
-}
-
-// UpdateTagsResponder handles the response to the UpdateTags request. The method always
-// closes the http.Response Body.
-func (client VirtualHubsClient) UpdateTagsResponder(resp *http.Response) (result VirtualHub, 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/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/virtualnetworktaps.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/virtualnetworktaps.go
deleted file mode 100644
index 73d0b0b94c5..00000000000
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/virtualnetworktaps.go
+++ /dev/null
@@ -1,605 +0,0 @@
-package network
-
-// Copyright (c) Microsoft and contributors. All rights reserved.
-//
-// 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 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"
-)
-
-// VirtualNetworkTapsClient is the network Client
-type VirtualNetworkTapsClient struct {
- BaseClient
-}
-
-// NewVirtualNetworkTapsClient creates an instance of the VirtualNetworkTapsClient client.
-func NewVirtualNetworkTapsClient(subscriptionID string) VirtualNetworkTapsClient {
- return NewVirtualNetworkTapsClientWithBaseURI(DefaultBaseURI, subscriptionID)
-}
-
-// NewVirtualNetworkTapsClientWithBaseURI creates an instance of the VirtualNetworkTapsClient 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 NewVirtualNetworkTapsClientWithBaseURI(baseURI string, subscriptionID string) VirtualNetworkTapsClient {
- return VirtualNetworkTapsClient{NewWithBaseURI(baseURI, subscriptionID)}
-}
-
-// CreateOrUpdate creates or updates a Virtual Network Tap.
-// Parameters:
-// resourceGroupName - the name of the resource group.
-// tapName - the name of the virtual network tap.
-// parameters - parameters supplied to the create or update virtual network tap operation.
-func (client VirtualNetworkTapsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, tapName string, parameters VirtualNetworkTap) (result VirtualNetworkTapsCreateOrUpdateFuture, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkTapsClient.CreateOrUpdate")
- defer func() {
- sc := -1
- if result.Response() != nil {
- sc = result.Response().StatusCode
- }
- tracing.EndSpan(ctx, sc, err)
- }()
- }
- if err := validation.Validate([]validation.Validation{
- {TargetValue: parameters,
- Constraints: []validation.Constraint{{Target: "parameters.VirtualNetworkTapPropertiesFormat", Name: validation.Null, Rule: false,
- Chain: []validation.Constraint{{Target: "parameters.VirtualNetworkTapPropertiesFormat.DestinationNetworkInterfaceIPConfiguration", Name: validation.Null, Rule: false,
- Chain: []validation.Constraint{{Target: "parameters.VirtualNetworkTapPropertiesFormat.DestinationNetworkInterfaceIPConfiguration.InterfaceIPConfigurationPropertiesFormat", Name: validation.Null, Rule: false,
- Chain: []validation.Constraint{{Target: "parameters.VirtualNetworkTapPropertiesFormat.DestinationNetworkInterfaceIPConfiguration.InterfaceIPConfigurationPropertiesFormat.PublicIPAddress", Name: validation.Null, Rule: false,
- Chain: []validation.Constraint{{Target: "parameters.VirtualNetworkTapPropertiesFormat.DestinationNetworkInterfaceIPConfiguration.InterfaceIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat", Name: validation.Null, Rule: false,
- Chain: []validation.Constraint{{Target: "parameters.VirtualNetworkTapPropertiesFormat.DestinationNetworkInterfaceIPConfiguration.InterfaceIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat.IPConfiguration", Name: validation.Null, Rule: false,
- Chain: []validation.Constraint{{Target: "parameters.VirtualNetworkTapPropertiesFormat.DestinationNetworkInterfaceIPConfiguration.InterfaceIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat.IPConfiguration.IPConfigurationPropertiesFormat", Name: validation.Null, Rule: false,
- Chain: []validation.Constraint{{Target: "parameters.VirtualNetworkTapPropertiesFormat.DestinationNetworkInterfaceIPConfiguration.InterfaceIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat.IPConfiguration.IPConfigurationPropertiesFormat.PublicIPAddress", Name: validation.Null, Rule: false, Chain: nil}}},
- }},
- }},
- }},
- }},
- }},
- {Target: "parameters.VirtualNetworkTapPropertiesFormat.DestinationLoadBalancerFrontEndIPConfiguration", Name: validation.Null, Rule: false,
- Chain: []validation.Constraint{{Target: "parameters.VirtualNetworkTapPropertiesFormat.DestinationLoadBalancerFrontEndIPConfiguration.FrontendIPConfigurationPropertiesFormat", Name: validation.Null, Rule: false,
- Chain: []validation.Constraint{{Target: "parameters.VirtualNetworkTapPropertiesFormat.DestinationLoadBalancerFrontEndIPConfiguration.FrontendIPConfigurationPropertiesFormat.PublicIPAddress", Name: validation.Null, Rule: false,
- Chain: []validation.Constraint{{Target: "parameters.VirtualNetworkTapPropertiesFormat.DestinationLoadBalancerFrontEndIPConfiguration.FrontendIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat", Name: validation.Null, Rule: false,
- Chain: []validation.Constraint{{Target: "parameters.VirtualNetworkTapPropertiesFormat.DestinationLoadBalancerFrontEndIPConfiguration.FrontendIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat.IPConfiguration", Name: validation.Null, Rule: false,
- Chain: []validation.Constraint{{Target: "parameters.VirtualNetworkTapPropertiesFormat.DestinationLoadBalancerFrontEndIPConfiguration.FrontendIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat.IPConfiguration.IPConfigurationPropertiesFormat", Name: validation.Null, Rule: false,
- Chain: []validation.Constraint{{Target: "parameters.VirtualNetworkTapPropertiesFormat.DestinationLoadBalancerFrontEndIPConfiguration.FrontendIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat.IPConfiguration.IPConfigurationPropertiesFormat.PublicIPAddress", Name: validation.Null, Rule: false, Chain: nil}}},
- }},
- }},
- }},
- }},
- }},
- }}}}}); err != nil {
- return result, validation.NewError("network.VirtualNetworkTapsClient", "CreateOrUpdate", err.Error())
- }
-
- req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, tapName, parameters)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsClient", "CreateOrUpdate", nil, "Failure preparing request")
- return
- }
-
- result, err = client.CreateOrUpdateSender(req)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
- return
- }
-
- return
-}
-
-// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
-func (client VirtualNetworkTapsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, tapName string, parameters VirtualNetworkTap) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "resourceGroupName": autorest.Encode("path", resourceGroupName),
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- "tapName": autorest.Encode("path", tapName),
- }
-
- const APIVersion = "2018-12-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.Network/virtualNetworkTaps/{tapName}", 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 VirtualNetworkTapsClient) CreateOrUpdateSender(req *http.Request) (future VirtualNetworkTapsCreateOrUpdateFuture, err error) {
- var resp *http.Response
- resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
- if err != nil {
- return
- }
- future.Future, err = azure.NewFutureFromResponse(resp)
- return
-}
-
-// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
-// closes the http.Response Body.
-func (client VirtualNetworkTapsClient) CreateOrUpdateResponder(resp *http.Response) (result VirtualNetworkTap, 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 the specified virtual network tap.
-// Parameters:
-// resourceGroupName - the name of the resource group.
-// tapName - the name of the virtual network tap.
-func (client VirtualNetworkTapsClient) Delete(ctx context.Context, resourceGroupName string, tapName string) (result VirtualNetworkTapsDeleteFuture, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkTapsClient.Delete")
- defer func() {
- sc := -1
- if result.Response() != nil {
- sc = result.Response().StatusCode
- }
- tracing.EndSpan(ctx, sc, err)
- }()
- }
- req, err := client.DeletePreparer(ctx, resourceGroupName, tapName)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsClient", "Delete", nil, "Failure preparing request")
- return
- }
-
- result, err = client.DeleteSender(req)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsClient", "Delete", result.Response(), "Failure sending request")
- return
- }
-
- return
-}
-
-// DeletePreparer prepares the Delete request.
-func (client VirtualNetworkTapsClient) DeletePreparer(ctx context.Context, resourceGroupName string, tapName string) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "resourceGroupName": autorest.Encode("path", resourceGroupName),
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- "tapName": autorest.Encode("path", tapName),
- }
-
- const APIVersion = "2018-12-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.Network/virtualNetworkTaps/{tapName}", 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 VirtualNetworkTapsClient) DeleteSender(req *http.Request) (future VirtualNetworkTapsDeleteFuture, err error) {
- var resp *http.Response
- resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
- if err != nil {
- return
- }
- future.Future, err = azure.NewFutureFromResponse(resp)
- return
-}
-
-// DeleteResponder handles the response to the Delete request. The method always
-// closes the http.Response Body.
-func (client VirtualNetworkTapsClient) 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 the specified virtual network tap.
-// Parameters:
-// resourceGroupName - the name of the resource group.
-// tapName - the name of virtual network tap.
-func (client VirtualNetworkTapsClient) Get(ctx context.Context, resourceGroupName string, tapName string) (result VirtualNetworkTap, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkTapsClient.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, tapName)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsClient", "Get", nil, "Failure preparing request")
- return
- }
-
- resp, err := client.GetSender(req)
- if err != nil {
- result.Response = autorest.Response{Response: resp}
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsClient", "Get", resp, "Failure sending request")
- return
- }
-
- result, err = client.GetResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsClient", "Get", resp, "Failure responding to request")
- }
-
- return
-}
-
-// GetPreparer prepares the Get request.
-func (client VirtualNetworkTapsClient) GetPreparer(ctx context.Context, resourceGroupName string, tapName string) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "resourceGroupName": autorest.Encode("path", resourceGroupName),
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- "tapName": autorest.Encode("path", tapName),
- }
-
- const APIVersion = "2018-12-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.Network/virtualNetworkTaps/{tapName}", 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 VirtualNetworkTapsClient) 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 VirtualNetworkTapsClient) GetResponder(resp *http.Response) (result VirtualNetworkTap, err error) {
- err = autorest.Respond(
- resp,
- azure.WithErrorUnlessStatusCode(http.StatusOK),
- autorest.ByUnmarshallingJSON(&result),
- autorest.ByClosing())
- result.Response = autorest.Response{Response: resp}
- return
-}
-
-// ListAll gets all the VirtualNetworkTaps in a subscription.
-func (client VirtualNetworkTapsClient) ListAll(ctx context.Context) (result VirtualNetworkTapListResultPage, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkTapsClient.ListAll")
- defer func() {
- sc := -1
- if result.vntlr.Response.Response != nil {
- sc = result.vntlr.Response.Response.StatusCode
- }
- tracing.EndSpan(ctx, sc, err)
- }()
- }
- result.fn = client.listAllNextResults
- req, err := client.ListAllPreparer(ctx)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsClient", "ListAll", nil, "Failure preparing request")
- return
- }
-
- resp, err := client.ListAllSender(req)
- if err != nil {
- result.vntlr.Response = autorest.Response{Response: resp}
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsClient", "ListAll", resp, "Failure sending request")
- return
- }
-
- result.vntlr, err = client.ListAllResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsClient", "ListAll", resp, "Failure responding to request")
- }
- if result.vntlr.hasNextLink() && result.vntlr.IsEmpty() {
- err = result.NextWithContext(ctx)
- }
-
- return
-}
-
-// ListAllPreparer prepares the ListAll request.
-func (client VirtualNetworkTapsClient) ListAllPreparer(ctx context.Context) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- }
-
- const APIVersion = "2018-12-01"
- queryParameters := map[string]interface{}{
- "api-version": APIVersion,
- }
-
- preparer := autorest.CreatePreparer(
- autorest.AsGet(),
- autorest.WithBaseURL(client.BaseURI),
- autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/virtualNetworkTaps", 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 VirtualNetworkTapsClient) 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 VirtualNetworkTapsClient) ListAllResponder(resp *http.Response) (result VirtualNetworkTapListResult, 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 VirtualNetworkTapsClient) listAllNextResults(ctx context.Context, lastResults VirtualNetworkTapListResult) (result VirtualNetworkTapListResult, err error) {
- req, err := lastResults.virtualNetworkTapListResultPreparer(ctx)
- if err != nil {
- return result, autorest.NewErrorWithError(err, "network.VirtualNetworkTapsClient", "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, "network.VirtualNetworkTapsClient", "listAllNextResults", resp, "Failure sending next results request")
- }
- result, err = client.ListAllResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsClient", "listAllNextResults", resp, "Failure responding to next results request")
- }
- return
-}
-
-// ListAllComplete enumerates all values, automatically crossing page boundaries as required.
-func (client VirtualNetworkTapsClient) ListAllComplete(ctx context.Context) (result VirtualNetworkTapListResultIterator, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkTapsClient.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
-}
-
-// ListByResourceGroup gets all the VirtualNetworkTaps in a subscription.
-// Parameters:
-// resourceGroupName - the name of the resource group.
-func (client VirtualNetworkTapsClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result VirtualNetworkTapListResultPage, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkTapsClient.ListByResourceGroup")
- defer func() {
- sc := -1
- if result.vntlr.Response.Response != nil {
- sc = result.vntlr.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, "network.VirtualNetworkTapsClient", "ListByResourceGroup", nil, "Failure preparing request")
- return
- }
-
- resp, err := client.ListByResourceGroupSender(req)
- if err != nil {
- result.vntlr.Response = autorest.Response{Response: resp}
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsClient", "ListByResourceGroup", resp, "Failure sending request")
- return
- }
-
- result.vntlr, err = client.ListByResourceGroupResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsClient", "ListByResourceGroup", resp, "Failure responding to request")
- }
- if result.vntlr.hasNextLink() && result.vntlr.IsEmpty() {
- err = result.NextWithContext(ctx)
- }
-
- return
-}
-
-// ListByResourceGroupPreparer prepares the ListByResourceGroup request.
-func (client VirtualNetworkTapsClient) 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 = "2018-12-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.Network/virtualNetworkTaps", 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 VirtualNetworkTapsClient) 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 VirtualNetworkTapsClient) ListByResourceGroupResponder(resp *http.Response) (result VirtualNetworkTapListResult, 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 VirtualNetworkTapsClient) listByResourceGroupNextResults(ctx context.Context, lastResults VirtualNetworkTapListResult) (result VirtualNetworkTapListResult, err error) {
- req, err := lastResults.virtualNetworkTapListResultPreparer(ctx)
- if err != nil {
- return result, autorest.NewErrorWithError(err, "network.VirtualNetworkTapsClient", "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, "network.VirtualNetworkTapsClient", "listByResourceGroupNextResults", resp, "Failure sending next results request")
- }
- result, err = client.ListByResourceGroupResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request")
- }
- return
-}
-
-// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required.
-func (client VirtualNetworkTapsClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result VirtualNetworkTapListResultIterator, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkTapsClient.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 updates an VirtualNetworkTap tags.
-// Parameters:
-// resourceGroupName - the name of the resource group.
-// tapName - the name of the tap.
-// tapParameters - parameters supplied to update VirtualNetworkTap tags.
-func (client VirtualNetworkTapsClient) UpdateTags(ctx context.Context, resourceGroupName string, tapName string, tapParameters TagsObject) (result VirtualNetworkTapsUpdateTagsFuture, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkTapsClient.UpdateTags")
- defer func() {
- sc := -1
- if result.Response() != nil {
- sc = result.Response().StatusCode
- }
- tracing.EndSpan(ctx, sc, err)
- }()
- }
- req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, tapName, tapParameters)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsClient", "UpdateTags", nil, "Failure preparing request")
- return
- }
-
- result, err = client.UpdateTagsSender(req)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsClient", "UpdateTags", result.Response(), "Failure sending request")
- return
- }
-
- return
-}
-
-// UpdateTagsPreparer prepares the UpdateTags request.
-func (client VirtualNetworkTapsClient) UpdateTagsPreparer(ctx context.Context, resourceGroupName string, tapName string, tapParameters TagsObject) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "resourceGroupName": autorest.Encode("path", resourceGroupName),
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- "tapName": autorest.Encode("path", tapName),
- }
-
- const APIVersion = "2018-12-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.Network/virtualNetworkTaps/{tapName}", pathParameters),
- autorest.WithJSON(tapParameters),
- 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 VirtualNetworkTapsClient) UpdateTagsSender(req *http.Request) (future VirtualNetworkTapsUpdateTagsFuture, err error) {
- var resp *http.Response
- resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
- if err != nil {
- return
- }
- future.Future, err = azure.NewFutureFromResponse(resp)
- return
-}
-
-// UpdateTagsResponder handles the response to the UpdateTags request. The method always
-// closes the http.Response Body.
-func (client VirtualNetworkTapsClient) UpdateTagsResponder(resp *http.Response) (result VirtualNetworkTap, 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/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/virtualwans.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/virtualwans.go
deleted file mode 100644
index 10938d2ffcb..00000000000
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/virtualwans.go
+++ /dev/null
@@ -1,573 +0,0 @@
-package network
-
-// Copyright (c) Microsoft and contributors. All rights reserved.
-//
-// 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 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"
-)
-
-// VirtualWansClient is the network Client
-type VirtualWansClient struct {
- BaseClient
-}
-
-// NewVirtualWansClient creates an instance of the VirtualWansClient client.
-func NewVirtualWansClient(subscriptionID string) VirtualWansClient {
- return NewVirtualWansClientWithBaseURI(DefaultBaseURI, subscriptionID)
-}
-
-// NewVirtualWansClientWithBaseURI creates an instance of the VirtualWansClient 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 NewVirtualWansClientWithBaseURI(baseURI string, subscriptionID string) VirtualWansClient {
- return VirtualWansClient{NewWithBaseURI(baseURI, subscriptionID)}
-}
-
-// CreateOrUpdate creates a VirtualWAN resource if it doesn't exist else updates the existing VirtualWAN.
-// Parameters:
-// resourceGroupName - the resource group name of the VirtualWan.
-// virtualWANName - the name of the VirtualWAN being created or updated.
-// wANParameters - parameters supplied to create or update VirtualWAN.
-func (client VirtualWansClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, virtualWANName string, wANParameters VirtualWAN) (result VirtualWansCreateOrUpdateFuture, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/VirtualWansClient.CreateOrUpdate")
- defer func() {
- sc := -1
- if result.Response() != nil {
- sc = result.Response().StatusCode
- }
- tracing.EndSpan(ctx, sc, err)
- }()
- }
- req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, virtualWANName, wANParameters)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualWansClient", "CreateOrUpdate", nil, "Failure preparing request")
- return
- }
-
- result, err = client.CreateOrUpdateSender(req)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualWansClient", "CreateOrUpdate", result.Response(), "Failure sending request")
- return
- }
-
- return
-}
-
-// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
-func (client VirtualWansClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, virtualWANName string, wANParameters VirtualWAN) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "resourceGroupName": autorest.Encode("path", resourceGroupName),
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- "VirtualWANName": autorest.Encode("path", virtualWANName),
- }
-
- const APIVersion = "2018-12-01"
- queryParameters := map[string]interface{}{
- "api-version": APIVersion,
- }
-
- wANParameters.Etag = 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.Network/virtualWans/{VirtualWANName}", pathParameters),
- autorest.WithJSON(wANParameters),
- 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 VirtualWansClient) CreateOrUpdateSender(req *http.Request) (future VirtualWansCreateOrUpdateFuture, err error) {
- var resp *http.Response
- resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
- if err != nil {
- return
- }
- future.Future, err = azure.NewFutureFromResponse(resp)
- return
-}
-
-// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
-// closes the http.Response Body.
-func (client VirtualWansClient) CreateOrUpdateResponder(resp *http.Response) (result VirtualWAN, 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 VirtualWAN.
-// Parameters:
-// resourceGroupName - the resource group name of the VirtualWan.
-// virtualWANName - the name of the VirtualWAN being deleted.
-func (client VirtualWansClient) Delete(ctx context.Context, resourceGroupName string, virtualWANName string) (result VirtualWansDeleteFuture, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/VirtualWansClient.Delete")
- defer func() {
- sc := -1
- if result.Response() != nil {
- sc = result.Response().StatusCode
- }
- tracing.EndSpan(ctx, sc, err)
- }()
- }
- req, err := client.DeletePreparer(ctx, resourceGroupName, virtualWANName)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualWansClient", "Delete", nil, "Failure preparing request")
- return
- }
-
- result, err = client.DeleteSender(req)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualWansClient", "Delete", result.Response(), "Failure sending request")
- return
- }
-
- return
-}
-
-// DeletePreparer prepares the Delete request.
-func (client VirtualWansClient) DeletePreparer(ctx context.Context, resourceGroupName string, virtualWANName string) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "resourceGroupName": autorest.Encode("path", resourceGroupName),
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- "VirtualWANName": autorest.Encode("path", virtualWANName),
- }
-
- const APIVersion = "2018-12-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.Network/virtualWans/{VirtualWANName}", 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 VirtualWansClient) DeleteSender(req *http.Request) (future VirtualWansDeleteFuture, err error) {
- var resp *http.Response
- resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
- if err != nil {
- return
- }
- future.Future, err = azure.NewFutureFromResponse(resp)
- return
-}
-
-// DeleteResponder handles the response to the Delete request. The method always
-// closes the http.Response Body.
-func (client VirtualWansClient) 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 the details of a VirtualWAN.
-// Parameters:
-// resourceGroupName - the resource group name of the VirtualWan.
-// virtualWANName - the name of the VirtualWAN being retrieved.
-func (client VirtualWansClient) Get(ctx context.Context, resourceGroupName string, virtualWANName string) (result VirtualWAN, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/VirtualWansClient.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, virtualWANName)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualWansClient", "Get", nil, "Failure preparing request")
- return
- }
-
- resp, err := client.GetSender(req)
- if err != nil {
- result.Response = autorest.Response{Response: resp}
- err = autorest.NewErrorWithError(err, "network.VirtualWansClient", "Get", resp, "Failure sending request")
- return
- }
-
- result, err = client.GetResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualWansClient", "Get", resp, "Failure responding to request")
- }
-
- return
-}
-
-// GetPreparer prepares the Get request.
-func (client VirtualWansClient) GetPreparer(ctx context.Context, resourceGroupName string, virtualWANName string) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "resourceGroupName": autorest.Encode("path", resourceGroupName),
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- "VirtualWANName": autorest.Encode("path", virtualWANName),
- }
-
- const APIVersion = "2018-12-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.Network/virtualWans/{VirtualWANName}", 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 VirtualWansClient) 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 VirtualWansClient) GetResponder(resp *http.Response) (result VirtualWAN, 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 VirtualWANs in a subscription.
-func (client VirtualWansClient) List(ctx context.Context) (result ListVirtualWANsResultPage, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/VirtualWansClient.List")
- defer func() {
- sc := -1
- if result.lvwnr.Response.Response != nil {
- sc = result.lvwnr.Response.Response.StatusCode
- }
- tracing.EndSpan(ctx, sc, err)
- }()
- }
- result.fn = client.listNextResults
- req, err := client.ListPreparer(ctx)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualWansClient", "List", nil, "Failure preparing request")
- return
- }
-
- resp, err := client.ListSender(req)
- if err != nil {
- result.lvwnr.Response = autorest.Response{Response: resp}
- err = autorest.NewErrorWithError(err, "network.VirtualWansClient", "List", resp, "Failure sending request")
- return
- }
-
- result.lvwnr, err = client.ListResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualWansClient", "List", resp, "Failure responding to request")
- }
- if result.lvwnr.hasNextLink() && result.lvwnr.IsEmpty() {
- err = result.NextWithContext(ctx)
- }
-
- return
-}
-
-// ListPreparer prepares the List request.
-func (client VirtualWansClient) ListPreparer(ctx context.Context) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- }
-
- const APIVersion = "2018-12-01"
- queryParameters := map[string]interface{}{
- "api-version": APIVersion,
- }
-
- preparer := autorest.CreatePreparer(
- autorest.AsGet(),
- autorest.WithBaseURL(client.BaseURI),
- autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/virtualWans", 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 VirtualWansClient) 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 VirtualWansClient) ListResponder(resp *http.Response) (result ListVirtualWANsResult, 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 VirtualWansClient) listNextResults(ctx context.Context, lastResults ListVirtualWANsResult) (result ListVirtualWANsResult, err error) {
- req, err := lastResults.listVirtualWANsResultPreparer(ctx)
- if err != nil {
- return result, autorest.NewErrorWithError(err, "network.VirtualWansClient", "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, "network.VirtualWansClient", "listNextResults", resp, "Failure sending next results request")
- }
- result, err = client.ListResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualWansClient", "listNextResults", resp, "Failure responding to next results request")
- }
- return
-}
-
-// ListComplete enumerates all values, automatically crossing page boundaries as required.
-func (client VirtualWansClient) ListComplete(ctx context.Context) (result ListVirtualWANsResultIterator, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/VirtualWansClient.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 VirtualWANs in a resource group.
-// Parameters:
-// resourceGroupName - the resource group name of the VirtualWan.
-func (client VirtualWansClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result ListVirtualWANsResultPage, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/VirtualWansClient.ListByResourceGroup")
- defer func() {
- sc := -1
- if result.lvwnr.Response.Response != nil {
- sc = result.lvwnr.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, "network.VirtualWansClient", "ListByResourceGroup", nil, "Failure preparing request")
- return
- }
-
- resp, err := client.ListByResourceGroupSender(req)
- if err != nil {
- result.lvwnr.Response = autorest.Response{Response: resp}
- err = autorest.NewErrorWithError(err, "network.VirtualWansClient", "ListByResourceGroup", resp, "Failure sending request")
- return
- }
-
- result.lvwnr, err = client.ListByResourceGroupResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualWansClient", "ListByResourceGroup", resp, "Failure responding to request")
- }
- if result.lvwnr.hasNextLink() && result.lvwnr.IsEmpty() {
- err = result.NextWithContext(ctx)
- }
-
- return
-}
-
-// ListByResourceGroupPreparer prepares the ListByResourceGroup request.
-func (client VirtualWansClient) 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 = "2018-12-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.Network/virtualWans", 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 VirtualWansClient) 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 VirtualWansClient) ListByResourceGroupResponder(resp *http.Response) (result ListVirtualWANsResult, 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 VirtualWansClient) listByResourceGroupNextResults(ctx context.Context, lastResults ListVirtualWANsResult) (result ListVirtualWANsResult, err error) {
- req, err := lastResults.listVirtualWANsResultPreparer(ctx)
- if err != nil {
- return result, autorest.NewErrorWithError(err, "network.VirtualWansClient", "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, "network.VirtualWansClient", "listByResourceGroupNextResults", resp, "Failure sending next results request")
- }
- result, err = client.ListByResourceGroupResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualWansClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request")
- }
- return
-}
-
-// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required.
-func (client VirtualWansClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result ListVirtualWANsResultIterator, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/VirtualWansClient.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 updates a VirtualWAN tags.
-// Parameters:
-// resourceGroupName - the resource group name of the VirtualWan.
-// virtualWANName - the name of the VirtualWAN being updated.
-// wANParameters - parameters supplied to Update VirtualWAN tags.
-func (client VirtualWansClient) UpdateTags(ctx context.Context, resourceGroupName string, virtualWANName string, wANParameters TagsObject) (result VirtualWansUpdateTagsFuture, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/VirtualWansClient.UpdateTags")
- defer func() {
- sc := -1
- if result.Response() != nil {
- sc = result.Response().StatusCode
- }
- tracing.EndSpan(ctx, sc, err)
- }()
- }
- req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, virtualWANName, wANParameters)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualWansClient", "UpdateTags", nil, "Failure preparing request")
- return
- }
-
- result, err = client.UpdateTagsSender(req)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualWansClient", "UpdateTags", result.Response(), "Failure sending request")
- return
- }
-
- return
-}
-
-// UpdateTagsPreparer prepares the UpdateTags request.
-func (client VirtualWansClient) UpdateTagsPreparer(ctx context.Context, resourceGroupName string, virtualWANName string, wANParameters TagsObject) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "resourceGroupName": autorest.Encode("path", resourceGroupName),
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- "VirtualWANName": autorest.Encode("path", virtualWANName),
- }
-
- const APIVersion = "2018-12-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.Network/virtualWans/{VirtualWANName}", pathParameters),
- autorest.WithJSON(wANParameters),
- 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 VirtualWansClient) UpdateTagsSender(req *http.Request) (future VirtualWansUpdateTagsFuture, err error) {
- var resp *http.Response
- resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
- if err != nil {
- return
- }
- future.Future, err = azure.NewFutureFromResponse(resp)
- return
-}
-
-// UpdateTagsResponder handles the response to the UpdateTags request. The method always
-// closes the http.Response Body.
-func (client VirtualWansClient) UpdateTagsResponder(resp *http.Response) (result VirtualWAN, 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/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/vpnconnections.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/vpnconnections.go
deleted file mode 100644
index 9463bfbdcb1..00000000000
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/vpnconnections.go
+++ /dev/null
@@ -1,393 +0,0 @@
-package network
-
-// Copyright (c) Microsoft and contributors. All rights reserved.
-//
-// 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 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"
-)
-
-// VpnConnectionsClient is the network Client
-type VpnConnectionsClient struct {
- BaseClient
-}
-
-// NewVpnConnectionsClient creates an instance of the VpnConnectionsClient client.
-func NewVpnConnectionsClient(subscriptionID string) VpnConnectionsClient {
- return NewVpnConnectionsClientWithBaseURI(DefaultBaseURI, subscriptionID)
-}
-
-// NewVpnConnectionsClientWithBaseURI creates an instance of the VpnConnectionsClient 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 NewVpnConnectionsClientWithBaseURI(baseURI string, subscriptionID string) VpnConnectionsClient {
- return VpnConnectionsClient{NewWithBaseURI(baseURI, subscriptionID)}
-}
-
-// CreateOrUpdate creates a vpn connection to a scalable vpn gateway if it doesn't exist else updates the existing
-// connection.
-// Parameters:
-// resourceGroupName - the resource group name of the VpnGateway.
-// gatewayName - the name of the gateway.
-// connectionName - the name of the connection.
-// vpnConnectionParameters - parameters supplied to create or Update a VPN Connection.
-func (client VpnConnectionsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, gatewayName string, connectionName string, vpnConnectionParameters VpnConnection) (result VpnConnectionsCreateOrUpdateFuture, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/VpnConnectionsClient.CreateOrUpdate")
- defer func() {
- sc := -1
- if result.Response() != nil {
- sc = result.Response().StatusCode
- }
- tracing.EndSpan(ctx, sc, err)
- }()
- }
- req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, gatewayName, connectionName, vpnConnectionParameters)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VpnConnectionsClient", "CreateOrUpdate", nil, "Failure preparing request")
- return
- }
-
- result, err = client.CreateOrUpdateSender(req)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VpnConnectionsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
- return
- }
-
- return
-}
-
-// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
-func (client VpnConnectionsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, gatewayName string, connectionName string, vpnConnectionParameters VpnConnection) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "connectionName": autorest.Encode("path", connectionName),
- "gatewayName": autorest.Encode("path", gatewayName),
- "resourceGroupName": autorest.Encode("path", resourceGroupName),
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- }
-
- const APIVersion = "2018-12-01"
- queryParameters := map[string]interface{}{
- "api-version": APIVersion,
- }
-
- vpnConnectionParameters.Etag = 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.Network/vpnGateways/{gatewayName}/vpnConnections/{connectionName}", pathParameters),
- autorest.WithJSON(vpnConnectionParameters),
- 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 VpnConnectionsClient) CreateOrUpdateSender(req *http.Request) (future VpnConnectionsCreateOrUpdateFuture, err error) {
- var resp *http.Response
- resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
- if err != nil {
- return
- }
- future.Future, err = azure.NewFutureFromResponse(resp)
- return
-}
-
-// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
-// closes the http.Response Body.
-func (client VpnConnectionsClient) CreateOrUpdateResponder(resp *http.Response) (result VpnConnection, 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 vpn connection.
-// Parameters:
-// resourceGroupName - the resource group name of the VpnGateway.
-// gatewayName - the name of the gateway.
-// connectionName - the name of the connection.
-func (client VpnConnectionsClient) Delete(ctx context.Context, resourceGroupName string, gatewayName string, connectionName string) (result VpnConnectionsDeleteFuture, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/VpnConnectionsClient.Delete")
- defer func() {
- sc := -1
- if result.Response() != nil {
- sc = result.Response().StatusCode
- }
- tracing.EndSpan(ctx, sc, err)
- }()
- }
- req, err := client.DeletePreparer(ctx, resourceGroupName, gatewayName, connectionName)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VpnConnectionsClient", "Delete", nil, "Failure preparing request")
- return
- }
-
- result, err = client.DeleteSender(req)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VpnConnectionsClient", "Delete", result.Response(), "Failure sending request")
- return
- }
-
- return
-}
-
-// DeletePreparer prepares the Delete request.
-func (client VpnConnectionsClient) DeletePreparer(ctx context.Context, resourceGroupName string, gatewayName string, connectionName string) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "connectionName": autorest.Encode("path", connectionName),
- "gatewayName": autorest.Encode("path", gatewayName),
- "resourceGroupName": autorest.Encode("path", resourceGroupName),
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- }
-
- const APIVersion = "2018-12-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.Network/vpnGateways/{gatewayName}/vpnConnections/{connectionName}", 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 VpnConnectionsClient) DeleteSender(req *http.Request) (future VpnConnectionsDeleteFuture, err error) {
- var resp *http.Response
- resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
- if err != nil {
- return
- }
- future.Future, err = azure.NewFutureFromResponse(resp)
- return
-}
-
-// DeleteResponder handles the response to the Delete request. The method always
-// closes the http.Response Body.
-func (client VpnConnectionsClient) 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 the details of a vpn connection.
-// Parameters:
-// resourceGroupName - the resource group name of the VpnGateway.
-// gatewayName - the name of the gateway.
-// connectionName - the name of the vpn connection.
-func (client VpnConnectionsClient) Get(ctx context.Context, resourceGroupName string, gatewayName string, connectionName string) (result VpnConnection, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/VpnConnectionsClient.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, gatewayName, connectionName)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VpnConnectionsClient", "Get", nil, "Failure preparing request")
- return
- }
-
- resp, err := client.GetSender(req)
- if err != nil {
- result.Response = autorest.Response{Response: resp}
- err = autorest.NewErrorWithError(err, "network.VpnConnectionsClient", "Get", resp, "Failure sending request")
- return
- }
-
- result, err = client.GetResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VpnConnectionsClient", "Get", resp, "Failure responding to request")
- }
-
- return
-}
-
-// GetPreparer prepares the Get request.
-func (client VpnConnectionsClient) GetPreparer(ctx context.Context, resourceGroupName string, gatewayName string, connectionName string) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "connectionName": autorest.Encode("path", connectionName),
- "gatewayName": autorest.Encode("path", gatewayName),
- "resourceGroupName": autorest.Encode("path", resourceGroupName),
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- }
-
- const APIVersion = "2018-12-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.Network/vpnGateways/{gatewayName}/vpnConnections/{connectionName}", 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 VpnConnectionsClient) 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 VpnConnectionsClient) GetResponder(resp *http.Response) (result VpnConnection, err error) {
- err = autorest.Respond(
- resp,
- azure.WithErrorUnlessStatusCode(http.StatusOK),
- autorest.ByUnmarshallingJSON(&result),
- autorest.ByClosing())
- result.Response = autorest.Response{Response: resp}
- return
-}
-
-// ListByVpnGateway retrieves all vpn connections for a particular virtual wan vpn gateway.
-// Parameters:
-// resourceGroupName - the resource group name of the VpnGateway.
-// gatewayName - the name of the gateway.
-func (client VpnConnectionsClient) ListByVpnGateway(ctx context.Context, resourceGroupName string, gatewayName string) (result ListVpnConnectionsResultPage, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/VpnConnectionsClient.ListByVpnGateway")
- defer func() {
- sc := -1
- if result.lvcr.Response.Response != nil {
- sc = result.lvcr.Response.Response.StatusCode
- }
- tracing.EndSpan(ctx, sc, err)
- }()
- }
- result.fn = client.listByVpnGatewayNextResults
- req, err := client.ListByVpnGatewayPreparer(ctx, resourceGroupName, gatewayName)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VpnConnectionsClient", "ListByVpnGateway", nil, "Failure preparing request")
- return
- }
-
- resp, err := client.ListByVpnGatewaySender(req)
- if err != nil {
- result.lvcr.Response = autorest.Response{Response: resp}
- err = autorest.NewErrorWithError(err, "network.VpnConnectionsClient", "ListByVpnGateway", resp, "Failure sending request")
- return
- }
-
- result.lvcr, err = client.ListByVpnGatewayResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VpnConnectionsClient", "ListByVpnGateway", resp, "Failure responding to request")
- }
- if result.lvcr.hasNextLink() && result.lvcr.IsEmpty() {
- err = result.NextWithContext(ctx)
- }
-
- return
-}
-
-// ListByVpnGatewayPreparer prepares the ListByVpnGateway request.
-func (client VpnConnectionsClient) ListByVpnGatewayPreparer(ctx context.Context, resourceGroupName string, gatewayName string) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "gatewayName": autorest.Encode("path", gatewayName),
- "resourceGroupName": autorest.Encode("path", resourceGroupName),
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- }
-
- const APIVersion = "2018-12-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.Network/vpnGateways/{gatewayName}/vpnConnections", pathParameters),
- autorest.WithQueryParameters(queryParameters))
- return preparer.Prepare((&http.Request{}).WithContext(ctx))
-}
-
-// ListByVpnGatewaySender sends the ListByVpnGateway request. The method will close the
-// http.Response Body if it receives an error.
-func (client VpnConnectionsClient) ListByVpnGatewaySender(req *http.Request) (*http.Response, error) {
- return client.Send(req, azure.DoRetryWithRegistration(client.Client))
-}
-
-// ListByVpnGatewayResponder handles the response to the ListByVpnGateway request. The method always
-// closes the http.Response Body.
-func (client VpnConnectionsClient) ListByVpnGatewayResponder(resp *http.Response) (result ListVpnConnectionsResult, err error) {
- err = autorest.Respond(
- resp,
- azure.WithErrorUnlessStatusCode(http.StatusOK),
- autorest.ByUnmarshallingJSON(&result),
- autorest.ByClosing())
- result.Response = autorest.Response{Response: resp}
- return
-}
-
-// listByVpnGatewayNextResults retrieves the next set of results, if any.
-func (client VpnConnectionsClient) listByVpnGatewayNextResults(ctx context.Context, lastResults ListVpnConnectionsResult) (result ListVpnConnectionsResult, err error) {
- req, err := lastResults.listVpnConnectionsResultPreparer(ctx)
- if err != nil {
- return result, autorest.NewErrorWithError(err, "network.VpnConnectionsClient", "listByVpnGatewayNextResults", nil, "Failure preparing next results request")
- }
- if req == nil {
- return
- }
- resp, err := client.ListByVpnGatewaySender(req)
- if err != nil {
- result.Response = autorest.Response{Response: resp}
- return result, autorest.NewErrorWithError(err, "network.VpnConnectionsClient", "listByVpnGatewayNextResults", resp, "Failure sending next results request")
- }
- result, err = client.ListByVpnGatewayResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VpnConnectionsClient", "listByVpnGatewayNextResults", resp, "Failure responding to next results request")
- }
- return
-}
-
-// ListByVpnGatewayComplete enumerates all values, automatically crossing page boundaries as required.
-func (client VpnConnectionsClient) ListByVpnGatewayComplete(ctx context.Context, resourceGroupName string, gatewayName string) (result ListVpnConnectionsResultIterator, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/VpnConnectionsClient.ListByVpnGateway")
- 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.ListByVpnGateway(ctx, resourceGroupName, gatewayName)
- return
-}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/vpngateways.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/vpngateways.go
deleted file mode 100644
index f32f3cf1538..00000000000
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/vpngateways.go
+++ /dev/null
@@ -1,573 +0,0 @@
-package network
-
-// Copyright (c) Microsoft and contributors. All rights reserved.
-//
-// 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 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"
-)
-
-// VpnGatewaysClient is the network Client
-type VpnGatewaysClient struct {
- BaseClient
-}
-
-// NewVpnGatewaysClient creates an instance of the VpnGatewaysClient client.
-func NewVpnGatewaysClient(subscriptionID string) VpnGatewaysClient {
- return NewVpnGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID)
-}
-
-// NewVpnGatewaysClientWithBaseURI creates an instance of the VpnGatewaysClient 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 NewVpnGatewaysClientWithBaseURI(baseURI string, subscriptionID string) VpnGatewaysClient {
- return VpnGatewaysClient{NewWithBaseURI(baseURI, subscriptionID)}
-}
-
-// CreateOrUpdate creates a virtual wan vpn gateway if it doesn't exist else updates the existing gateway.
-// Parameters:
-// resourceGroupName - the resource group name of the VpnGateway.
-// gatewayName - the name of the gateway.
-// vpnGatewayParameters - parameters supplied to create or Update a virtual wan vpn gateway.
-func (client VpnGatewaysClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, gatewayName string, vpnGatewayParameters VpnGateway) (result VpnGatewaysCreateOrUpdateFuture, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/VpnGatewaysClient.CreateOrUpdate")
- defer func() {
- sc := -1
- if result.Response() != nil {
- sc = result.Response().StatusCode
- }
- tracing.EndSpan(ctx, sc, err)
- }()
- }
- req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, gatewayName, vpnGatewayParameters)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VpnGatewaysClient", "CreateOrUpdate", nil, "Failure preparing request")
- return
- }
-
- result, err = client.CreateOrUpdateSender(req)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VpnGatewaysClient", "CreateOrUpdate", result.Response(), "Failure sending request")
- return
- }
-
- return
-}
-
-// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
-func (client VpnGatewaysClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, gatewayName string, vpnGatewayParameters VpnGateway) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "gatewayName": autorest.Encode("path", gatewayName),
- "resourceGroupName": autorest.Encode("path", resourceGroupName),
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- }
-
- const APIVersion = "2018-12-01"
- queryParameters := map[string]interface{}{
- "api-version": APIVersion,
- }
-
- vpnGatewayParameters.Etag = 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.Network/vpnGateways/{gatewayName}", pathParameters),
- autorest.WithJSON(vpnGatewayParameters),
- 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 VpnGatewaysClient) CreateOrUpdateSender(req *http.Request) (future VpnGatewaysCreateOrUpdateFuture, err error) {
- var resp *http.Response
- resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
- if err != nil {
- return
- }
- future.Future, err = azure.NewFutureFromResponse(resp)
- return
-}
-
-// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
-// closes the http.Response Body.
-func (client VpnGatewaysClient) CreateOrUpdateResponder(resp *http.Response) (result VpnGateway, 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 virtual wan vpn gateway.
-// Parameters:
-// resourceGroupName - the resource group name of the VpnGateway.
-// gatewayName - the name of the gateway.
-func (client VpnGatewaysClient) Delete(ctx context.Context, resourceGroupName string, gatewayName string) (result VpnGatewaysDeleteFuture, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/VpnGatewaysClient.Delete")
- defer func() {
- sc := -1
- if result.Response() != nil {
- sc = result.Response().StatusCode
- }
- tracing.EndSpan(ctx, sc, err)
- }()
- }
- req, err := client.DeletePreparer(ctx, resourceGroupName, gatewayName)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VpnGatewaysClient", "Delete", nil, "Failure preparing request")
- return
- }
-
- result, err = client.DeleteSender(req)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VpnGatewaysClient", "Delete", result.Response(), "Failure sending request")
- return
- }
-
- return
-}
-
-// DeletePreparer prepares the Delete request.
-func (client VpnGatewaysClient) DeletePreparer(ctx context.Context, resourceGroupName string, gatewayName string) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "gatewayName": autorest.Encode("path", gatewayName),
- "resourceGroupName": autorest.Encode("path", resourceGroupName),
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- }
-
- const APIVersion = "2018-12-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.Network/vpnGateways/{gatewayName}", 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 VpnGatewaysClient) DeleteSender(req *http.Request) (future VpnGatewaysDeleteFuture, err error) {
- var resp *http.Response
- resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
- if err != nil {
- return
- }
- future.Future, err = azure.NewFutureFromResponse(resp)
- return
-}
-
-// DeleteResponder handles the response to the Delete request. The method always
-// closes the http.Response Body.
-func (client VpnGatewaysClient) 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 the details of a virtual wan vpn gateway.
-// Parameters:
-// resourceGroupName - the resource group name of the VpnGateway.
-// gatewayName - the name of the gateway.
-func (client VpnGatewaysClient) Get(ctx context.Context, resourceGroupName string, gatewayName string) (result VpnGateway, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/VpnGatewaysClient.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, gatewayName)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VpnGatewaysClient", "Get", nil, "Failure preparing request")
- return
- }
-
- resp, err := client.GetSender(req)
- if err != nil {
- result.Response = autorest.Response{Response: resp}
- err = autorest.NewErrorWithError(err, "network.VpnGatewaysClient", "Get", resp, "Failure sending request")
- return
- }
-
- result, err = client.GetResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VpnGatewaysClient", "Get", resp, "Failure responding to request")
- }
-
- return
-}
-
-// GetPreparer prepares the Get request.
-func (client VpnGatewaysClient) GetPreparer(ctx context.Context, resourceGroupName string, gatewayName string) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "gatewayName": autorest.Encode("path", gatewayName),
- "resourceGroupName": autorest.Encode("path", resourceGroupName),
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- }
-
- const APIVersion = "2018-12-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.Network/vpnGateways/{gatewayName}", 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 VpnGatewaysClient) 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 VpnGatewaysClient) GetResponder(resp *http.Response) (result VpnGateway, 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 VpnGateways in a subscription.
-func (client VpnGatewaysClient) List(ctx context.Context) (result ListVpnGatewaysResultPage, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/VpnGatewaysClient.List")
- defer func() {
- sc := -1
- if result.lvgr.Response.Response != nil {
- sc = result.lvgr.Response.Response.StatusCode
- }
- tracing.EndSpan(ctx, sc, err)
- }()
- }
- result.fn = client.listNextResults
- req, err := client.ListPreparer(ctx)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VpnGatewaysClient", "List", nil, "Failure preparing request")
- return
- }
-
- resp, err := client.ListSender(req)
- if err != nil {
- result.lvgr.Response = autorest.Response{Response: resp}
- err = autorest.NewErrorWithError(err, "network.VpnGatewaysClient", "List", resp, "Failure sending request")
- return
- }
-
- result.lvgr, err = client.ListResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VpnGatewaysClient", "List", resp, "Failure responding to request")
- }
- if result.lvgr.hasNextLink() && result.lvgr.IsEmpty() {
- err = result.NextWithContext(ctx)
- }
-
- return
-}
-
-// ListPreparer prepares the List request.
-func (client VpnGatewaysClient) ListPreparer(ctx context.Context) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- }
-
- const APIVersion = "2018-12-01"
- queryParameters := map[string]interface{}{
- "api-version": APIVersion,
- }
-
- preparer := autorest.CreatePreparer(
- autorest.AsGet(),
- autorest.WithBaseURL(client.BaseURI),
- autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/vpnGateways", 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 VpnGatewaysClient) 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 VpnGatewaysClient) ListResponder(resp *http.Response) (result ListVpnGatewaysResult, 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 VpnGatewaysClient) listNextResults(ctx context.Context, lastResults ListVpnGatewaysResult) (result ListVpnGatewaysResult, err error) {
- req, err := lastResults.listVpnGatewaysResultPreparer(ctx)
- if err != nil {
- return result, autorest.NewErrorWithError(err, "network.VpnGatewaysClient", "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, "network.VpnGatewaysClient", "listNextResults", resp, "Failure sending next results request")
- }
- result, err = client.ListResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VpnGatewaysClient", "listNextResults", resp, "Failure responding to next results request")
- }
- return
-}
-
-// ListComplete enumerates all values, automatically crossing page boundaries as required.
-func (client VpnGatewaysClient) ListComplete(ctx context.Context) (result ListVpnGatewaysResultIterator, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/VpnGatewaysClient.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 VpnGateways in a resource group.
-// Parameters:
-// resourceGroupName - the resource group name of the VpnGateway.
-func (client VpnGatewaysClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result ListVpnGatewaysResultPage, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/VpnGatewaysClient.ListByResourceGroup")
- defer func() {
- sc := -1
- if result.lvgr.Response.Response != nil {
- sc = result.lvgr.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, "network.VpnGatewaysClient", "ListByResourceGroup", nil, "Failure preparing request")
- return
- }
-
- resp, err := client.ListByResourceGroupSender(req)
- if err != nil {
- result.lvgr.Response = autorest.Response{Response: resp}
- err = autorest.NewErrorWithError(err, "network.VpnGatewaysClient", "ListByResourceGroup", resp, "Failure sending request")
- return
- }
-
- result.lvgr, err = client.ListByResourceGroupResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VpnGatewaysClient", "ListByResourceGroup", resp, "Failure responding to request")
- }
- if result.lvgr.hasNextLink() && result.lvgr.IsEmpty() {
- err = result.NextWithContext(ctx)
- }
-
- return
-}
-
-// ListByResourceGroupPreparer prepares the ListByResourceGroup request.
-func (client VpnGatewaysClient) 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 = "2018-12-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.Network/vpnGateways", 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 VpnGatewaysClient) 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 VpnGatewaysClient) ListByResourceGroupResponder(resp *http.Response) (result ListVpnGatewaysResult, 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 VpnGatewaysClient) listByResourceGroupNextResults(ctx context.Context, lastResults ListVpnGatewaysResult) (result ListVpnGatewaysResult, err error) {
- req, err := lastResults.listVpnGatewaysResultPreparer(ctx)
- if err != nil {
- return result, autorest.NewErrorWithError(err, "network.VpnGatewaysClient", "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, "network.VpnGatewaysClient", "listByResourceGroupNextResults", resp, "Failure sending next results request")
- }
- result, err = client.ListByResourceGroupResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VpnGatewaysClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request")
- }
- return
-}
-
-// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required.
-func (client VpnGatewaysClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result ListVpnGatewaysResultIterator, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/VpnGatewaysClient.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 updates virtual wan vpn gateway tags.
-// Parameters:
-// resourceGroupName - the resource group name of the VpnGateway.
-// gatewayName - the name of the gateway.
-// vpnGatewayParameters - parameters supplied to update a virtual wan vpn gateway tags.
-func (client VpnGatewaysClient) UpdateTags(ctx context.Context, resourceGroupName string, gatewayName string, vpnGatewayParameters TagsObject) (result VpnGatewaysUpdateTagsFuture, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/VpnGatewaysClient.UpdateTags")
- defer func() {
- sc := -1
- if result.Response() != nil {
- sc = result.Response().StatusCode
- }
- tracing.EndSpan(ctx, sc, err)
- }()
- }
- req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, gatewayName, vpnGatewayParameters)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VpnGatewaysClient", "UpdateTags", nil, "Failure preparing request")
- return
- }
-
- result, err = client.UpdateTagsSender(req)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VpnGatewaysClient", "UpdateTags", result.Response(), "Failure sending request")
- return
- }
-
- return
-}
-
-// UpdateTagsPreparer prepares the UpdateTags request.
-func (client VpnGatewaysClient) UpdateTagsPreparer(ctx context.Context, resourceGroupName string, gatewayName string, vpnGatewayParameters TagsObject) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "gatewayName": autorest.Encode("path", gatewayName),
- "resourceGroupName": autorest.Encode("path", resourceGroupName),
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- }
-
- const APIVersion = "2018-12-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.Network/vpnGateways/{gatewayName}", pathParameters),
- autorest.WithJSON(vpnGatewayParameters),
- 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 VpnGatewaysClient) UpdateTagsSender(req *http.Request) (future VpnGatewaysUpdateTagsFuture, err error) {
- var resp *http.Response
- resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
- if err != nil {
- return
- }
- future.Future, err = azure.NewFutureFromResponse(resp)
- return
-}
-
-// UpdateTagsResponder handles the response to the UpdateTags request. The method always
-// closes the http.Response Body.
-func (client VpnGatewaysClient) UpdateTagsResponder(resp *http.Response) (result VpnGateway, 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/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/vpnsites.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/vpnsites.go
deleted file mode 100644
index 284ac723ed5..00000000000
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/vpnsites.go
+++ /dev/null
@@ -1,573 +0,0 @@
-package network
-
-// Copyright (c) Microsoft and contributors. All rights reserved.
-//
-// 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 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"
-)
-
-// VpnSitesClient is the network Client
-type VpnSitesClient struct {
- BaseClient
-}
-
-// NewVpnSitesClient creates an instance of the VpnSitesClient client.
-func NewVpnSitesClient(subscriptionID string) VpnSitesClient {
- return NewVpnSitesClientWithBaseURI(DefaultBaseURI, subscriptionID)
-}
-
-// NewVpnSitesClientWithBaseURI creates an instance of the VpnSitesClient 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 NewVpnSitesClientWithBaseURI(baseURI string, subscriptionID string) VpnSitesClient {
- return VpnSitesClient{NewWithBaseURI(baseURI, subscriptionID)}
-}
-
-// CreateOrUpdate creates a VpnSite resource if it doesn't exist else updates the existing VpnSite.
-// Parameters:
-// resourceGroupName - the resource group name of the VpnSite.
-// vpnSiteName - the name of the VpnSite being created or updated.
-// vpnSiteParameters - parameters supplied to create or update VpnSite.
-func (client VpnSitesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, vpnSiteName string, vpnSiteParameters VpnSite) (result VpnSitesCreateOrUpdateFuture, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/VpnSitesClient.CreateOrUpdate")
- defer func() {
- sc := -1
- if result.Response() != nil {
- sc = result.Response().StatusCode
- }
- tracing.EndSpan(ctx, sc, err)
- }()
- }
- req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, vpnSiteName, vpnSiteParameters)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VpnSitesClient", "CreateOrUpdate", nil, "Failure preparing request")
- return
- }
-
- result, err = client.CreateOrUpdateSender(req)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VpnSitesClient", "CreateOrUpdate", result.Response(), "Failure sending request")
- return
- }
-
- return
-}
-
-// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
-func (client VpnSitesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, vpnSiteName string, vpnSiteParameters VpnSite) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "resourceGroupName": autorest.Encode("path", resourceGroupName),
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- "vpnSiteName": autorest.Encode("path", vpnSiteName),
- }
-
- const APIVersion = "2018-12-01"
- queryParameters := map[string]interface{}{
- "api-version": APIVersion,
- }
-
- vpnSiteParameters.Etag = 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.Network/vpnSites/{vpnSiteName}", pathParameters),
- autorest.WithJSON(vpnSiteParameters),
- 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 VpnSitesClient) CreateOrUpdateSender(req *http.Request) (future VpnSitesCreateOrUpdateFuture, err error) {
- var resp *http.Response
- resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
- if err != nil {
- return
- }
- future.Future, err = azure.NewFutureFromResponse(resp)
- return
-}
-
-// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
-// closes the http.Response Body.
-func (client VpnSitesClient) CreateOrUpdateResponder(resp *http.Response) (result VpnSite, 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 VpnSite.
-// Parameters:
-// resourceGroupName - the resource group name of the VpnSite.
-// vpnSiteName - the name of the VpnSite being deleted.
-func (client VpnSitesClient) Delete(ctx context.Context, resourceGroupName string, vpnSiteName string) (result VpnSitesDeleteFuture, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/VpnSitesClient.Delete")
- defer func() {
- sc := -1
- if result.Response() != nil {
- sc = result.Response().StatusCode
- }
- tracing.EndSpan(ctx, sc, err)
- }()
- }
- req, err := client.DeletePreparer(ctx, resourceGroupName, vpnSiteName)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VpnSitesClient", "Delete", nil, "Failure preparing request")
- return
- }
-
- result, err = client.DeleteSender(req)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VpnSitesClient", "Delete", result.Response(), "Failure sending request")
- return
- }
-
- return
-}
-
-// DeletePreparer prepares the Delete request.
-func (client VpnSitesClient) DeletePreparer(ctx context.Context, resourceGroupName string, vpnSiteName string) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "resourceGroupName": autorest.Encode("path", resourceGroupName),
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- "vpnSiteName": autorest.Encode("path", vpnSiteName),
- }
-
- const APIVersion = "2018-12-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.Network/vpnSites/{vpnSiteName}", 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 VpnSitesClient) DeleteSender(req *http.Request) (future VpnSitesDeleteFuture, err error) {
- var resp *http.Response
- resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
- if err != nil {
- return
- }
- future.Future, err = azure.NewFutureFromResponse(resp)
- return
-}
-
-// DeleteResponder handles the response to the Delete request. The method always
-// closes the http.Response Body.
-func (client VpnSitesClient) 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 the details of a VPN site.
-// Parameters:
-// resourceGroupName - the resource group name of the VpnSite.
-// vpnSiteName - the name of the VpnSite being retrieved.
-func (client VpnSitesClient) Get(ctx context.Context, resourceGroupName string, vpnSiteName string) (result VpnSite, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/VpnSitesClient.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, vpnSiteName)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VpnSitesClient", "Get", nil, "Failure preparing request")
- return
- }
-
- resp, err := client.GetSender(req)
- if err != nil {
- result.Response = autorest.Response{Response: resp}
- err = autorest.NewErrorWithError(err, "network.VpnSitesClient", "Get", resp, "Failure sending request")
- return
- }
-
- result, err = client.GetResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VpnSitesClient", "Get", resp, "Failure responding to request")
- }
-
- return
-}
-
-// GetPreparer prepares the Get request.
-func (client VpnSitesClient) GetPreparer(ctx context.Context, resourceGroupName string, vpnSiteName string) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "resourceGroupName": autorest.Encode("path", resourceGroupName),
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- "vpnSiteName": autorest.Encode("path", vpnSiteName),
- }
-
- const APIVersion = "2018-12-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.Network/vpnSites/{vpnSiteName}", 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 VpnSitesClient) 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 VpnSitesClient) GetResponder(resp *http.Response) (result VpnSite, 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 VpnSites in a subscription.
-func (client VpnSitesClient) List(ctx context.Context) (result ListVpnSitesResultPage, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/VpnSitesClient.List")
- defer func() {
- sc := -1
- if result.lvsr.Response.Response != nil {
- sc = result.lvsr.Response.Response.StatusCode
- }
- tracing.EndSpan(ctx, sc, err)
- }()
- }
- result.fn = client.listNextResults
- req, err := client.ListPreparer(ctx)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VpnSitesClient", "List", nil, "Failure preparing request")
- return
- }
-
- resp, err := client.ListSender(req)
- if err != nil {
- result.lvsr.Response = autorest.Response{Response: resp}
- err = autorest.NewErrorWithError(err, "network.VpnSitesClient", "List", resp, "Failure sending request")
- return
- }
-
- result.lvsr, err = client.ListResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VpnSitesClient", "List", resp, "Failure responding to request")
- }
- if result.lvsr.hasNextLink() && result.lvsr.IsEmpty() {
- err = result.NextWithContext(ctx)
- }
-
- return
-}
-
-// ListPreparer prepares the List request.
-func (client VpnSitesClient) ListPreparer(ctx context.Context) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- }
-
- const APIVersion = "2018-12-01"
- queryParameters := map[string]interface{}{
- "api-version": APIVersion,
- }
-
- preparer := autorest.CreatePreparer(
- autorest.AsGet(),
- autorest.WithBaseURL(client.BaseURI),
- autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/vpnSites", 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 VpnSitesClient) 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 VpnSitesClient) ListResponder(resp *http.Response) (result ListVpnSitesResult, 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 VpnSitesClient) listNextResults(ctx context.Context, lastResults ListVpnSitesResult) (result ListVpnSitesResult, err error) {
- req, err := lastResults.listVpnSitesResultPreparer(ctx)
- if err != nil {
- return result, autorest.NewErrorWithError(err, "network.VpnSitesClient", "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, "network.VpnSitesClient", "listNextResults", resp, "Failure sending next results request")
- }
- result, err = client.ListResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VpnSitesClient", "listNextResults", resp, "Failure responding to next results request")
- }
- return
-}
-
-// ListComplete enumerates all values, automatically crossing page boundaries as required.
-func (client VpnSitesClient) ListComplete(ctx context.Context) (result ListVpnSitesResultIterator, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/VpnSitesClient.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 vpnSites in a resource group.
-// Parameters:
-// resourceGroupName - the resource group name of the VpnSite.
-func (client VpnSitesClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result ListVpnSitesResultPage, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/VpnSitesClient.ListByResourceGroup")
- defer func() {
- sc := -1
- if result.lvsr.Response.Response != nil {
- sc = result.lvsr.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, "network.VpnSitesClient", "ListByResourceGroup", nil, "Failure preparing request")
- return
- }
-
- resp, err := client.ListByResourceGroupSender(req)
- if err != nil {
- result.lvsr.Response = autorest.Response{Response: resp}
- err = autorest.NewErrorWithError(err, "network.VpnSitesClient", "ListByResourceGroup", resp, "Failure sending request")
- return
- }
-
- result.lvsr, err = client.ListByResourceGroupResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VpnSitesClient", "ListByResourceGroup", resp, "Failure responding to request")
- }
- if result.lvsr.hasNextLink() && result.lvsr.IsEmpty() {
- err = result.NextWithContext(ctx)
- }
-
- return
-}
-
-// ListByResourceGroupPreparer prepares the ListByResourceGroup request.
-func (client VpnSitesClient) 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 = "2018-12-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.Network/vpnSites", 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 VpnSitesClient) 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 VpnSitesClient) ListByResourceGroupResponder(resp *http.Response) (result ListVpnSitesResult, 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 VpnSitesClient) listByResourceGroupNextResults(ctx context.Context, lastResults ListVpnSitesResult) (result ListVpnSitesResult, err error) {
- req, err := lastResults.listVpnSitesResultPreparer(ctx)
- if err != nil {
- return result, autorest.NewErrorWithError(err, "network.VpnSitesClient", "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, "network.VpnSitesClient", "listByResourceGroupNextResults", resp, "Failure sending next results request")
- }
- result, err = client.ListByResourceGroupResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VpnSitesClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request")
- }
- return
-}
-
-// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required.
-func (client VpnSitesClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result ListVpnSitesResultIterator, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/VpnSitesClient.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 updates VpnSite tags.
-// Parameters:
-// resourceGroupName - the resource group name of the VpnSite.
-// vpnSiteName - the name of the VpnSite being updated.
-// vpnSiteParameters - parameters supplied to update VpnSite tags.
-func (client VpnSitesClient) UpdateTags(ctx context.Context, resourceGroupName string, vpnSiteName string, vpnSiteParameters TagsObject) (result VpnSitesUpdateTagsFuture, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/VpnSitesClient.UpdateTags")
- defer func() {
- sc := -1
- if result.Response() != nil {
- sc = result.Response().StatusCode
- }
- tracing.EndSpan(ctx, sc, err)
- }()
- }
- req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, vpnSiteName, vpnSiteParameters)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VpnSitesClient", "UpdateTags", nil, "Failure preparing request")
- return
- }
-
- result, err = client.UpdateTagsSender(req)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VpnSitesClient", "UpdateTags", result.Response(), "Failure sending request")
- return
- }
-
- return
-}
-
-// UpdateTagsPreparer prepares the UpdateTags request.
-func (client VpnSitesClient) UpdateTagsPreparer(ctx context.Context, resourceGroupName string, vpnSiteName string, vpnSiteParameters TagsObject) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "resourceGroupName": autorest.Encode("path", resourceGroupName),
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- "vpnSiteName": autorest.Encode("path", vpnSiteName),
- }
-
- const APIVersion = "2018-12-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.Network/vpnSites/{vpnSiteName}", pathParameters),
- autorest.WithJSON(vpnSiteParameters),
- 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 VpnSitesClient) UpdateTagsSender(req *http.Request) (future VpnSitesUpdateTagsFuture, err error) {
- var resp *http.Response
- resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
- if err != nil {
- return
- }
- future.Future, err = azure.NewFutureFromResponse(resp)
- return
-}
-
-// UpdateTagsResponder handles the response to the UpdateTags request. The method always
-// closes the http.Response Body.
-func (client VpnSitesClient) UpdateTagsResponder(resp *http.Response) (result VpnSite, 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/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/vpnsitesconfiguration.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/vpnsitesconfiguration.go
deleted file mode 100644
index 4b71b320b06..00000000000
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/vpnsitesconfiguration.go
+++ /dev/null
@@ -1,120 +0,0 @@
-package network
-
-// Copyright (c) Microsoft and contributors. All rights reserved.
-//
-// 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 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"
-)
-
-// VpnSitesConfigurationClient is the network Client
-type VpnSitesConfigurationClient struct {
- BaseClient
-}
-
-// NewVpnSitesConfigurationClient creates an instance of the VpnSitesConfigurationClient client.
-func NewVpnSitesConfigurationClient(subscriptionID string) VpnSitesConfigurationClient {
- return NewVpnSitesConfigurationClientWithBaseURI(DefaultBaseURI, subscriptionID)
-}
-
-// NewVpnSitesConfigurationClientWithBaseURI creates an instance of the VpnSitesConfigurationClient 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 NewVpnSitesConfigurationClientWithBaseURI(baseURI string, subscriptionID string) VpnSitesConfigurationClient {
- return VpnSitesConfigurationClient{NewWithBaseURI(baseURI, subscriptionID)}
-}
-
-// Download gives the sas-url to download the configurations for vpn-sites in a resource group.
-// Parameters:
-// resourceGroupName - the resource group name.
-// virtualWANName - the name of the VirtualWAN for which configuration of all vpn-sites is needed.
-// request - parameters supplied to download vpn-sites configuration.
-func (client VpnSitesConfigurationClient) Download(ctx context.Context, resourceGroupName string, virtualWANName string, request GetVpnSitesConfigurationRequest) (result VpnSitesConfigurationDownloadFuture, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/VpnSitesConfigurationClient.Download")
- defer func() {
- sc := -1
- if result.Response() != nil {
- sc = result.Response().StatusCode
- }
- tracing.EndSpan(ctx, sc, err)
- }()
- }
- req, err := client.DownloadPreparer(ctx, resourceGroupName, virtualWANName, request)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VpnSitesConfigurationClient", "Download", nil, "Failure preparing request")
- return
- }
-
- result, err = client.DownloadSender(req)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.VpnSitesConfigurationClient", "Download", result.Response(), "Failure sending request")
- return
- }
-
- return
-}
-
-// DownloadPreparer prepares the Download request.
-func (client VpnSitesConfigurationClient) DownloadPreparer(ctx context.Context, resourceGroupName string, virtualWANName string, request GetVpnSitesConfigurationRequest) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "resourceGroupName": autorest.Encode("path", resourceGroupName),
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- "virtualWANName": autorest.Encode("path", virtualWANName),
- }
-
- const APIVersion = "2018-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.Network/virtualWans/{virtualWANName}/vpnConfiguration", pathParameters),
- autorest.WithJSON(request),
- autorest.WithQueryParameters(queryParameters))
- return preparer.Prepare((&http.Request{}).WithContext(ctx))
-}
-
-// DownloadSender sends the Download request. The method will close the
-// http.Response Body if it receives an error.
-func (client VpnSitesConfigurationClient) DownloadSender(req *http.Request) (future VpnSitesConfigurationDownloadFuture, err error) {
- var resp *http.Response
- resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
- if err != nil {
- return
- }
- future.Future, err = azure.NewFutureFromResponse(resp)
- return
-}
-
-// DownloadResponder handles the response to the Download request. The method always
-// closes the http.Response Body.
-func (client VpnSitesConfigurationClient) DownloadResponder(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/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/webapplicationfirewallpolicies.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/webapplicationfirewallpolicies.go
deleted file mode 100644
index bccdf938e91..00000000000
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network/webapplicationfirewallpolicies.go
+++ /dev/null
@@ -1,514 +0,0 @@
-package network
-
-// Copyright (c) Microsoft and contributors. All rights reserved.
-//
-// 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 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"
-)
-
-// WebApplicationFirewallPoliciesClient is the network Client
-type WebApplicationFirewallPoliciesClient struct {
- BaseClient
-}
-
-// NewWebApplicationFirewallPoliciesClient creates an instance of the WebApplicationFirewallPoliciesClient client.
-func NewWebApplicationFirewallPoliciesClient(subscriptionID string) WebApplicationFirewallPoliciesClient {
- return NewWebApplicationFirewallPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID)
-}
-
-// NewWebApplicationFirewallPoliciesClientWithBaseURI creates an instance of the WebApplicationFirewallPoliciesClient
-// 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 NewWebApplicationFirewallPoliciesClientWithBaseURI(baseURI string, subscriptionID string) WebApplicationFirewallPoliciesClient {
- return WebApplicationFirewallPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)}
-}
-
-// CreateOrUpdate creates or update policy with specified rule set name within a resource group.
-// Parameters:
-// resourceGroupName - the name of the resource group.
-// policyName - the name of the policy.
-// parameters - policy to be created.
-func (client WebApplicationFirewallPoliciesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, policyName string, parameters WebApplicationFirewallPolicy) (result WebApplicationFirewallPolicy, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/WebApplicationFirewallPoliciesClient.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: policyName,
- Constraints: []validation.Constraint{{Target: "policyName", Name: validation.MaxLength, Rule: 128, Chain: nil}}}}); err != nil {
- return result, validation.NewError("network.WebApplicationFirewallPoliciesClient", "CreateOrUpdate", err.Error())
- }
-
- req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, policyName, parameters)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WebApplicationFirewallPoliciesClient", "CreateOrUpdate", nil, "Failure preparing request")
- return
- }
-
- resp, err := client.CreateOrUpdateSender(req)
- if err != nil {
- result.Response = autorest.Response{Response: resp}
- err = autorest.NewErrorWithError(err, "network.WebApplicationFirewallPoliciesClient", "CreateOrUpdate", resp, "Failure sending request")
- return
- }
-
- result, err = client.CreateOrUpdateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WebApplicationFirewallPoliciesClient", "CreateOrUpdate", resp, "Failure responding to request")
- }
-
- return
-}
-
-// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
-func (client WebApplicationFirewallPoliciesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, policyName string, parameters WebApplicationFirewallPolicy) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "policyName": autorest.Encode("path", policyName),
- "resourceGroupName": autorest.Encode("path", resourceGroupName),
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- }
-
- const APIVersion = "2018-12-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.Network/ApplicationGatewayWebApplicationFirewallPolicies/{policyName}", 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 WebApplicationFirewallPoliciesClient) 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 WebApplicationFirewallPoliciesClient) CreateOrUpdateResponder(resp *http.Response) (result WebApplicationFirewallPolicy, 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 Policy
-// Parameters:
-// resourceGroupName - the name of the resource group.
-// policyName - the name of the policy.
-func (client WebApplicationFirewallPoliciesClient) Delete(ctx context.Context, resourceGroupName string, policyName string) (result WebApplicationFirewallPoliciesDeleteFuture, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/WebApplicationFirewallPoliciesClient.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: policyName,
- Constraints: []validation.Constraint{{Target: "policyName", Name: validation.MaxLength, Rule: 128, Chain: nil}}}}); err != nil {
- return result, validation.NewError("network.WebApplicationFirewallPoliciesClient", "Delete", err.Error())
- }
-
- req, err := client.DeletePreparer(ctx, resourceGroupName, policyName)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WebApplicationFirewallPoliciesClient", "Delete", nil, "Failure preparing request")
- return
- }
-
- result, err = client.DeleteSender(req)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WebApplicationFirewallPoliciesClient", "Delete", result.Response(), "Failure sending request")
- return
- }
-
- return
-}
-
-// DeletePreparer prepares the Delete request.
-func (client WebApplicationFirewallPoliciesClient) DeletePreparer(ctx context.Context, resourceGroupName string, policyName string) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "policyName": autorest.Encode("path", policyName),
- "resourceGroupName": autorest.Encode("path", resourceGroupName),
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- }
-
- const APIVersion = "2018-12-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.Network/ApplicationGatewayWebApplicationFirewallPolicies/{policyName}", 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 WebApplicationFirewallPoliciesClient) DeleteSender(req *http.Request) (future WebApplicationFirewallPoliciesDeleteFuture, err error) {
- var resp *http.Response
- resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
- if err != nil {
- return
- }
- future.Future, err = azure.NewFutureFromResponse(resp)
- return
-}
-
-// DeleteResponder handles the response to the Delete request. The method always
-// closes the http.Response Body.
-func (client WebApplicationFirewallPoliciesClient) 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 retrieve protection policy with specified name within a resource group.
-// Parameters:
-// resourceGroupName - the name of the resource group.
-// policyName - the name of the policy
-func (client WebApplicationFirewallPoliciesClient) Get(ctx context.Context, resourceGroupName string, policyName string) (result WebApplicationFirewallPolicy, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/WebApplicationFirewallPoliciesClient.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: policyName,
- Constraints: []validation.Constraint{{Target: "policyName", Name: validation.MaxLength, Rule: 128, Chain: nil}}}}); err != nil {
- return result, validation.NewError("network.WebApplicationFirewallPoliciesClient", "Get", err.Error())
- }
-
- req, err := client.GetPreparer(ctx, resourceGroupName, policyName)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WebApplicationFirewallPoliciesClient", "Get", nil, "Failure preparing request")
- return
- }
-
- resp, err := client.GetSender(req)
- if err != nil {
- result.Response = autorest.Response{Response: resp}
- err = autorest.NewErrorWithError(err, "network.WebApplicationFirewallPoliciesClient", "Get", resp, "Failure sending request")
- return
- }
-
- result, err = client.GetResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WebApplicationFirewallPoliciesClient", "Get", resp, "Failure responding to request")
- }
-
- return
-}
-
-// GetPreparer prepares the Get request.
-func (client WebApplicationFirewallPoliciesClient) GetPreparer(ctx context.Context, resourceGroupName string, policyName string) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "policyName": autorest.Encode("path", policyName),
- "resourceGroupName": autorest.Encode("path", resourceGroupName),
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- }
-
- const APIVersion = "2018-12-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.Network/ApplicationGatewayWebApplicationFirewallPolicies/{policyName}", 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 WebApplicationFirewallPoliciesClient) 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 WebApplicationFirewallPoliciesClient) GetResponder(resp *http.Response) (result WebApplicationFirewallPolicy, 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 protection policies within a resource group.
-// Parameters:
-// resourceGroupName - the name of the resource group.
-func (client WebApplicationFirewallPoliciesClient) List(ctx context.Context, resourceGroupName string) (result WebApplicationFirewallPolicyListResultPage, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/WebApplicationFirewallPoliciesClient.List")
- defer func() {
- sc := -1
- if result.wafplr.Response.Response != nil {
- sc = result.wafplr.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, "network.WebApplicationFirewallPoliciesClient", "List", nil, "Failure preparing request")
- return
- }
-
- resp, err := client.ListSender(req)
- if err != nil {
- result.wafplr.Response = autorest.Response{Response: resp}
- err = autorest.NewErrorWithError(err, "network.WebApplicationFirewallPoliciesClient", "List", resp, "Failure sending request")
- return
- }
-
- result.wafplr, err = client.ListResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WebApplicationFirewallPoliciesClient", "List", resp, "Failure responding to request")
- }
- if result.wafplr.hasNextLink() && result.wafplr.IsEmpty() {
- err = result.NextWithContext(ctx)
- }
-
- return
-}
-
-// ListPreparer prepares the List request.
-func (client WebApplicationFirewallPoliciesClient) 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 = "2018-12-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.Network/ApplicationGatewayWebApplicationFirewallPolicies", 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 WebApplicationFirewallPoliciesClient) 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 WebApplicationFirewallPoliciesClient) ListResponder(resp *http.Response) (result WebApplicationFirewallPolicyListResult, 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 WebApplicationFirewallPoliciesClient) listNextResults(ctx context.Context, lastResults WebApplicationFirewallPolicyListResult) (result WebApplicationFirewallPolicyListResult, err error) {
- req, err := lastResults.webApplicationFirewallPolicyListResultPreparer(ctx)
- if err != nil {
- return result, autorest.NewErrorWithError(err, "network.WebApplicationFirewallPoliciesClient", "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, "network.WebApplicationFirewallPoliciesClient", "listNextResults", resp, "Failure sending next results request")
- }
- result, err = client.ListResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WebApplicationFirewallPoliciesClient", "listNextResults", resp, "Failure responding to next results request")
- }
- return
-}
-
-// ListComplete enumerates all values, automatically crossing page boundaries as required.
-func (client WebApplicationFirewallPoliciesClient) ListComplete(ctx context.Context, resourceGroupName string) (result WebApplicationFirewallPolicyListResultIterator, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/WebApplicationFirewallPoliciesClient.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 all the WAF policies in a subscription.
-func (client WebApplicationFirewallPoliciesClient) ListAll(ctx context.Context) (result WebApplicationFirewallPolicyListResultPage, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/WebApplicationFirewallPoliciesClient.ListAll")
- defer func() {
- sc := -1
- if result.wafplr.Response.Response != nil {
- sc = result.wafplr.Response.Response.StatusCode
- }
- tracing.EndSpan(ctx, sc, err)
- }()
- }
- result.fn = client.listAllNextResults
- req, err := client.ListAllPreparer(ctx)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WebApplicationFirewallPoliciesClient", "ListAll", nil, "Failure preparing request")
- return
- }
-
- resp, err := client.ListAllSender(req)
- if err != nil {
- result.wafplr.Response = autorest.Response{Response: resp}
- err = autorest.NewErrorWithError(err, "network.WebApplicationFirewallPoliciesClient", "ListAll", resp, "Failure sending request")
- return
- }
-
- result.wafplr, err = client.ListAllResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WebApplicationFirewallPoliciesClient", "ListAll", resp, "Failure responding to request")
- }
- if result.wafplr.hasNextLink() && result.wafplr.IsEmpty() {
- err = result.NextWithContext(ctx)
- }
-
- return
-}
-
-// ListAllPreparer prepares the ListAll request.
-func (client WebApplicationFirewallPoliciesClient) ListAllPreparer(ctx context.Context) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- }
-
- const APIVersion = "2018-12-01"
- queryParameters := map[string]interface{}{
- "api-version": APIVersion,
- }
-
- preparer := autorest.CreatePreparer(
- autorest.AsGet(),
- autorest.WithBaseURL(client.BaseURI),
- autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/ApplicationGatewayWebApplicationFirewallPolicies", 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 WebApplicationFirewallPoliciesClient) 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 WebApplicationFirewallPoliciesClient) ListAllResponder(resp *http.Response) (result WebApplicationFirewallPolicyListResult, 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 WebApplicationFirewallPoliciesClient) listAllNextResults(ctx context.Context, lastResults WebApplicationFirewallPolicyListResult) (result WebApplicationFirewallPolicyListResult, err error) {
- req, err := lastResults.webApplicationFirewallPolicyListResultPreparer(ctx)
- if err != nil {
- return result, autorest.NewErrorWithError(err, "network.WebApplicationFirewallPoliciesClient", "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, "network.WebApplicationFirewallPoliciesClient", "listAllNextResults", resp, "Failure sending next results request")
- }
- result, err = client.ListAllResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "network.WebApplicationFirewallPoliciesClient", "listAllNextResults", resp, "Failure responding to next results request")
- }
- return
-}
-
-// ListAllComplete enumerates all values, automatically crossing page boundaries as required.
-func (client WebApplicationFirewallPoliciesClient) ListAllComplete(ctx context.Context) (result WebApplicationFirewallPolicyListResultIterator, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/WebApplicationFirewallPoliciesClient.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
-}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/dns/mgmt/2018-03-01-preview/dns/CHANGELOG.md b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/dns/mgmt/2018-03-01-preview/dns/CHANGELOG.md
new file mode 100644
index 00000000000..8438c69d500
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/dns/mgmt/2018-03-01-preview/dns/CHANGELOG.md
@@ -0,0 +1,5 @@
+Generated from https://github.com/Azure/azure-rest-api-specs/tree/3c764635e7d442b3e74caf593029fcd440b3ef82//specification/dns/resource-manager/readme.md tag: `package-2018-03-preview`
+
+Code generator @microsoft.azure/autorest.go@2.1.171
+
+
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/dns/mgmt/2018-03-01-preview/dns/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/dns/mgmt/2018-03-01-preview/dns/models.go
index cb0504e4d73..e96af0c7931 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/dns/mgmt/2018-03-01-preview/dns/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/dns/mgmt/2018-03-01-preview/dns/models.go
@@ -42,15 +42,15 @@ type ARecord struct {
Ipv4Address *string `json:"ipv4Address,omitempty"`
}
-// AzureEntityResource the resource model definition for a Azure Resource Manager resource with an etag.
+// AzureEntityResource the resource model definition for an Azure Resource Manager resource with an etag.
type AzureEntityResource struct {
// Etag - READ-ONLY; Resource Etag.
Etag *string `json:"etag,omitempty"`
- // ID - READ-ONLY; Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
+ // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
ID *string `json:"id,omitempty"`
// Name - READ-ONLY; The name of the resource
Name *string `json:"name,omitempty"`
- // Type - READ-ONLY; The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.
+ // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
Type *string `json:"type,omitempty"`
}
@@ -64,21 +64,21 @@ type CaaRecord struct {
Value *string `json:"value,omitempty"`
}
-// CloudError an error message
+// CloudError an error response from the service.
type CloudError struct {
- // Error - The error message body
+ // Error - Cloud error body.
Error *CloudErrorBody `json:"error,omitempty"`
}
-// CloudErrorBody the body of an error message
+// CloudErrorBody an error response from the service.
type CloudErrorBody struct {
- // Code - The error code
+ // Code - An identifier for the error. Codes are invariant and are intended to be consumed programmatically.
Code *string `json:"code,omitempty"`
- // Message - A description of what caused the error
+ // Message - A message describing the error, intended to be suitable for display in a user interface.
Message *string `json:"message,omitempty"`
- // Target - The target resource of the error message
+ // Target - The target of the particular error. For example, the name of the property in error.
Target *string `json:"target,omitempty"`
- // Details - Extra error information
+ // Details - A list of additional details about the error.
Details *[]CloudErrorBody `json:"details,omitempty"`
}
@@ -102,14 +102,14 @@ type NsRecord struct {
Nsdname *string `json:"nsdname,omitempty"`
}
-// ProxyResource the resource model definition for a ARM proxy resource. It will have everything other than
-// required location and tags
+// ProxyResource the resource model definition for a Azure Resource Manager proxy resource. It will not
+// have tags and a location
type ProxyResource struct {
- // ID - READ-ONLY; Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
+ // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
ID *string `json:"id,omitempty"`
// Name - READ-ONLY; The name of the resource
Name *string `json:"name,omitempty"`
- // Type - READ-ONLY; The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.
+ // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
Type *string `json:"type,omitempty"`
}
@@ -367,8 +367,11 @@ func (page RecordSetListResultPage) Values() []RecordSet {
}
// Creates a new instance of the RecordSetListResultPage type.
-func NewRecordSetListResultPage(getNextPage func(context.Context, RecordSetListResult) (RecordSetListResult, error)) RecordSetListResultPage {
- return RecordSetListResultPage{fn: getNextPage}
+func NewRecordSetListResultPage(cur RecordSetListResult, getNextPage func(context.Context, RecordSetListResult) (RecordSetListResult, error)) RecordSetListResultPage {
+ return RecordSetListResultPage{
+ fn: getNextPage,
+ rslr: cur,
+ }
}
// RecordSetProperties represents the properties of the records in the record set.
@@ -449,13 +452,13 @@ type RecordSetUpdateParameters struct {
RecordSet *RecordSet `json:"RecordSet,omitempty"`
}
-// Resource ...
+// Resource common fields that are returned in the response for all Azure Resource Manager resources
type Resource struct {
- // ID - READ-ONLY; Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
+ // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
ID *string `json:"id,omitempty"`
// Name - READ-ONLY; The name of the resource
Name *string `json:"name,omitempty"`
- // Type - READ-ONLY; The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.
+ // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
Type *string `json:"type,omitempty"`
}
@@ -495,17 +498,18 @@ type SubResource struct {
ID *string `json:"id,omitempty"`
}
-// TrackedResource the resource model definition for a ARM tracked top level resource
+// TrackedResource the resource model definition for an Azure Resource Manager tracked top level resource
+// which has 'tags' and a 'location'
type TrackedResource struct {
// Tags - Resource tags.
Tags map[string]*string `json:"tags"`
// Location - The geo-location where the resource lives
Location *string `json:"location,omitempty"`
- // ID - READ-ONLY; Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
+ // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
ID *string `json:"id,omitempty"`
// Name - READ-ONLY; The name of the resource
Name *string `json:"name,omitempty"`
- // Type - READ-ONLY; The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.
+ // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
Type *string `json:"type,omitempty"`
}
@@ -538,11 +542,11 @@ type Zone struct {
Tags map[string]*string `json:"tags"`
// Location - The geo-location where the resource lives
Location *string `json:"location,omitempty"`
- // ID - READ-ONLY; Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
+ // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
ID *string `json:"id,omitempty"`
// Name - READ-ONLY; The name of the resource
Name *string `json:"name,omitempty"`
- // Type - READ-ONLY; The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.
+ // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
Type *string `json:"type,omitempty"`
}
@@ -803,14 +807,19 @@ func (page ZoneListResultPage) Values() []Zone {
}
// Creates a new instance of the ZoneListResultPage type.
-func NewZoneListResultPage(getNextPage func(context.Context, ZoneListResult) (ZoneListResult, error)) ZoneListResultPage {
- return ZoneListResultPage{fn: getNextPage}
+func NewZoneListResultPage(cur ZoneListResult, getNextPage func(context.Context, ZoneListResult) (ZoneListResult, error)) ZoneListResultPage {
+ return ZoneListResultPage{
+ fn: getNextPage,
+ zlr: cur,
+ }
}
// ZoneProperties represents the properties of the zone.
type ZoneProperties struct {
// MaxNumberOfRecordSets - READ-ONLY; The maximum number of record sets that can be created in this DNS zone. This is a read-only property and any attempt to set this value will be ignored.
MaxNumberOfRecordSets *int64 `json:"maxNumberOfRecordSets,omitempty"`
+ // MaxNumberOfRecordsPerRecordSet - READ-ONLY; The maximum number of records per record set that can be created in this DNS zone. This is a read-only property and any attempt to set this value will be ignored.
+ MaxNumberOfRecordsPerRecordSet *int64 `json:"maxNumberOfRecordsPerRecordSet,omitempty"`
// NumberOfRecordSets - READ-ONLY; The current number of record sets in this DNS zone. This is a read-only property and any attempt to set this value will be ignored.
NumberOfRecordSets *int64 `json:"numberOfRecordSets,omitempty"`
// NameServers - READ-ONLY; The name servers for this DNS zone. This is a read-only property and any attempt to set this value will be ignored.
@@ -840,24 +849,10 @@ func (zp ZoneProperties) MarshalJSON() ([]byte, error) {
// ZonesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type ZonesDeleteFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *ZonesDeleteFuture) Result(client ZonesClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "dns.ZonesDeleteFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("dns.ZonesDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(ZonesClient) (autorest.Response, error)
}
// ZoneUpdate describes a request to update a DNS zone.
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/dns/mgmt/2018-03-01-preview/dns/recordsets.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/dns/mgmt/2018-03-01-preview/dns/recordsets.go
index d6e25c8f057..e53d8356792 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/dns/mgmt/2018-03-01-preview/dns/recordsets.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/dns/mgmt/2018-03-01-preview/dns/recordsets.go
@@ -91,6 +91,7 @@ func (client RecordSetsClient) CreateOrUpdate(ctx context.Context, resourceGroup
result, err = client.CreateOrUpdateResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "dns.RecordSetsClient", "CreateOrUpdate", resp, "Failure responding to request")
+ return
}
return
@@ -196,6 +197,7 @@ func (client RecordSetsClient) Delete(ctx context.Context, resourceGroupName str
result, err = client.DeleteResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "dns.RecordSetsClient", "Delete", resp, "Failure responding to request")
+ return
}
return
@@ -288,6 +290,7 @@ func (client RecordSetsClient) Get(ctx context.Context, resourceGroupName string
result, err = client.GetResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "dns.RecordSetsClient", "Get", resp, "Failure responding to request")
+ return
}
return
@@ -380,9 +383,11 @@ func (client RecordSetsClient) ListAllByDNSZone(ctx context.Context, resourceGro
result.rslr, err = client.ListAllByDNSZoneResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "dns.RecordSetsClient", "ListAllByDNSZone", resp, "Failure responding to request")
+ return
}
if result.rslr.hasNextLink() && result.rslr.IsEmpty() {
err = result.NextWithContext(ctx)
+ return
}
return
@@ -516,9 +521,11 @@ func (client RecordSetsClient) ListByDNSZone(ctx context.Context, resourceGroupN
result.rslr, err = client.ListByDNSZoneResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "dns.RecordSetsClient", "ListByDNSZone", resp, "Failure responding to request")
+ return
}
if result.rslr.hasNextLink() && result.rslr.IsEmpty() {
err = result.NextWithContext(ctx)
+ return
}
return
@@ -653,9 +660,11 @@ func (client RecordSetsClient) ListByType(ctx context.Context, resourceGroupName
result.rslr, err = client.ListByTypeResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "dns.RecordSetsClient", "ListByType", resp, "Failure responding to request")
+ return
}
if result.rslr.hasNextLink() && result.rslr.IsEmpty() {
err = result.NextWithContext(ctx)
+ return
}
return
@@ -790,6 +799,7 @@ func (client RecordSetsClient) Update(ctx context.Context, resourceGroupName str
result, err = client.UpdateResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "dns.RecordSetsClient", "Update", resp, "Failure responding to request")
+ return
}
return
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/dns/mgmt/2018-03-01-preview/dns/zones.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/dns/mgmt/2018-03-01-preview/dns/zones.go
index 5f89085a2ac..47b039d5100 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/dns/mgmt/2018-03-01-preview/dns/zones.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/dns/mgmt/2018-03-01-preview/dns/zones.go
@@ -88,6 +88,7 @@ func (client ZonesClient) CreateOrUpdate(ctx context.Context, resourceGroupName
result, err = client.CreateOrUpdateResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "dns.ZonesClient", "CreateOrUpdate", resp, "Failure responding to request")
+ return
}
return
@@ -178,7 +179,7 @@ func (client ZonesClient) Delete(ctx context.Context, resourceGroupName string,
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "dns.ZonesClient", "Delete", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "dns.ZonesClient", "Delete", nil, "Failure sending request")
return
}
@@ -218,7 +219,23 @@ func (client ZonesClient) DeleteSender(req *http.Request) (future ZonesDeleteFut
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(client ZonesClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "dns.ZonesDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("dns.ZonesDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
return
}
@@ -274,6 +291,7 @@ func (client ZonesClient) Get(ctx context.Context, resourceGroupName string, zon
result, err = client.GetResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "dns.ZonesClient", "Get", resp, "Failure responding to request")
+ return
}
return
@@ -355,9 +373,11 @@ func (client ZonesClient) List(ctx context.Context, top *int32) (result ZoneList
result.zlr, err = client.ListResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "dns.ZonesClient", "List", resp, "Failure responding to request")
+ return
}
if result.zlr.hasNextLink() && result.zlr.IsEmpty() {
err = result.NextWithContext(ctx)
+ return
}
return
@@ -482,9 +502,11 @@ func (client ZonesClient) ListByResourceGroup(ctx context.Context, resourceGroup
result.zlr, err = client.ListByResourceGroupResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "dns.ZonesClient", "ListByResourceGroup", resp, "Failure responding to request")
+ return
}
if result.zlr.hasNextLink() && result.zlr.IsEmpty() {
err = result.NextWithContext(ctx)
+ return
}
return
@@ -612,6 +634,7 @@ func (client ZonesClient) Update(ctx context.Context, resourceGroupName string,
result, err = client.UpdateResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "dns.ZonesClient", "Update", resp, "Failure responding to request")
+ return
}
return
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/privatedns/mgmt/2018-09-01/privatedns/CHANGELOG.md b/vendor/github.com/Azure/azure-sdk-for-go/services/privatedns/mgmt/2018-09-01/privatedns/CHANGELOG.md
new file mode 100644
index 00000000000..26daa01ac66
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/privatedns/mgmt/2018-09-01/privatedns/CHANGELOG.md
@@ -0,0 +1,5 @@
+Generated from https://github.com/Azure/azure-rest-api-specs/tree/3c764635e7d442b3e74caf593029fcd440b3ef82//specification/privatedns/resource-manager/readme.md tag: `package-2018-09`
+
+Code generator @microsoft.azure/autorest.go@2.1.171
+
+
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/privatedns/mgmt/2018-09-01/privatedns/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/privatedns/mgmt/2018-09-01/privatedns/models.go
index a590f9024c4..1eb3c738150 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/privatedns/mgmt/2018-09-01/privatedns/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/privatedns/mgmt/2018-09-01/privatedns/models.go
@@ -42,21 +42,21 @@ type ARecord struct {
Ipv4Address *string `json:"ipv4Address,omitempty"`
}
-// CloudError an error message
+// CloudError an error response from the service.
type CloudError struct {
- // Error - The error message body
+ // Error - Cloud error body.
Error *CloudErrorBody `json:"error,omitempty"`
}
-// CloudErrorBody the body of an error message
+// CloudErrorBody an error response from the service.
type CloudErrorBody struct {
- // Code - The error code
+ // Code - An identifier for the error. Codes are invariant and are intended to be consumed programmatically.
Code *string `json:"code,omitempty"`
- // Message - A description of what caused the error
+ // Message - A message describing the error, intended to be suitable for display in a user interface.
Message *string `json:"message,omitempty"`
- // Target - The target resource of the error message
+ // Target - The target of the particular error. For example, the name of the property in error.
Target *string `json:"target,omitempty"`
- // Details - Extra error information
+ // Details - A list of additional details about the error.
Details *[]CloudErrorBody `json:"details,omitempty"`
}
@@ -350,8 +350,11 @@ func (page PrivateZoneListResultPage) Values() []PrivateZone {
}
// Creates a new instance of the PrivateZoneListResultPage type.
-func NewPrivateZoneListResultPage(getNextPage func(context.Context, PrivateZoneListResult) (PrivateZoneListResult, error)) PrivateZoneListResultPage {
- return PrivateZoneListResultPage{fn: getNextPage}
+func NewPrivateZoneListResultPage(cur PrivateZoneListResult, getNextPage func(context.Context, PrivateZoneListResult) (PrivateZoneListResult, error)) PrivateZoneListResultPage {
+ return PrivateZoneListResultPage{
+ fn: getNextPage,
+ pzlr: cur,
+ }
}
// PrivateZoneProperties represents the properties of the Private DNS zone.
@@ -372,85 +375,31 @@ type PrivateZoneProperties struct {
ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
}
-// PrivateZonesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
+// PrivateZonesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
type PrivateZonesCreateOrUpdateFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *PrivateZonesCreateOrUpdateFuture) Result(client PrivateZonesClient) (pz PrivateZone, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "privatedns.PrivateZonesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("privatedns.PrivateZonesCreateOrUpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if pz.Response.Response, err = future.GetResult(sender); err == nil && pz.Response.Response.StatusCode != http.StatusNoContent {
- pz, err = client.CreateOrUpdateResponder(pz.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "privatedns.PrivateZonesCreateOrUpdateFuture", "Result", pz.Response.Response, "Failure responding to request")
- }
- }
- return
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(PrivateZonesClient) (PrivateZone, error)
}
// PrivateZonesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
// operation.
type PrivateZonesDeleteFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *PrivateZonesDeleteFuture) Result(client PrivateZonesClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "privatedns.PrivateZonesDeleteFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("privatedns.PrivateZonesDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(PrivateZonesClient) (autorest.Response, error)
}
// PrivateZonesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
// operation.
type PrivateZonesUpdateFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *PrivateZonesUpdateFuture) Result(client PrivateZonesClient) (pz PrivateZone, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "privatedns.PrivateZonesUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("privatedns.PrivateZonesUpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if pz.Response.Response, err = future.GetResult(sender); err == nil && pz.Response.Response.StatusCode != http.StatusNoContent {
- pz, err = client.UpdateResponder(pz.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "privatedns.PrivateZonesUpdateFuture", "Result", pz.Response.Response, "Failure responding to request")
- }
- }
- return
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(PrivateZonesClient) (PrivateZone, error)
}
// ProxyResource the resource model definition for an ARM proxy resource.
@@ -469,8 +418,8 @@ type PtrRecord struct {
Ptrdname *string `json:"ptrdname,omitempty"`
}
-// RecordSet describes a DNS record set (a collection of DNS records with the same name and type) in a Private
-// DNS zone.
+// RecordSet describes a DNS record set (a collection of DNS records with the same name and type) in a
+// Private DNS zone.
type RecordSet struct {
autorest.Response `json:"-"`
// Etag - The ETag of the record set.
@@ -718,8 +667,11 @@ func (page RecordSetListResultPage) Values() []RecordSet {
}
// Creates a new instance of the RecordSetListResultPage type.
-func NewRecordSetListResultPage(getNextPage func(context.Context, RecordSetListResult) (RecordSetListResult, error)) RecordSetListResultPage {
- return RecordSetListResultPage{fn: getNextPage}
+func NewRecordSetListResultPage(cur RecordSetListResult, getNextPage func(context.Context, RecordSetListResult) (RecordSetListResult, error)) RecordSetListResultPage {
+ return RecordSetListResultPage{
+ fn: getNextPage,
+ rslr: cur,
+ }
}
// RecordSetProperties represents the properties of the records in the record set.
@@ -1140,8 +1092,11 @@ func (page VirtualNetworkLinkListResultPage) Values() []VirtualNetworkLink {
}
// Creates a new instance of the VirtualNetworkLinkListResultPage type.
-func NewVirtualNetworkLinkListResultPage(getNextPage func(context.Context, VirtualNetworkLinkListResult) (VirtualNetworkLinkListResult, error)) VirtualNetworkLinkListResultPage {
- return VirtualNetworkLinkListResultPage{fn: getNextPage}
+func NewVirtualNetworkLinkListResultPage(cur VirtualNetworkLinkListResult, getNextPage func(context.Context, VirtualNetworkLinkListResult) (VirtualNetworkLinkListResult, error)) VirtualNetworkLinkListResultPage {
+ return VirtualNetworkLinkListResultPage{
+ fn: getNextPage,
+ vnllr: cur,
+ }
}
// VirtualNetworkLinkProperties represents the properties of the Private DNS zone.
@@ -1171,80 +1126,26 @@ func (vnlp VirtualNetworkLinkProperties) MarshalJSON() ([]byte, error) {
// VirtualNetworkLinksCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type VirtualNetworkLinksCreateOrUpdateFuture struct {
- azure.Future
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(VirtualNetworkLinksClient) (VirtualNetworkLink, error)
}
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *VirtualNetworkLinksCreateOrUpdateFuture) Result(client VirtualNetworkLinksClient) (vnl VirtualNetworkLink, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "privatedns.VirtualNetworkLinksCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("privatedns.VirtualNetworkLinksCreateOrUpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if vnl.Response.Response, err = future.GetResult(sender); err == nil && vnl.Response.Response.StatusCode != http.StatusNoContent {
- vnl, err = client.CreateOrUpdateResponder(vnl.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "privatedns.VirtualNetworkLinksCreateOrUpdateFuture", "Result", vnl.Response.Response, "Failure responding to request")
- }
- }
- return
-}
-
-// VirtualNetworkLinksDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
+// VirtualNetworkLinksDeleteFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
type VirtualNetworkLinksDeleteFuture struct {
- azure.Future
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(VirtualNetworkLinksClient) (autorest.Response, error)
}
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *VirtualNetworkLinksDeleteFuture) Result(client VirtualNetworkLinksClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "privatedns.VirtualNetworkLinksDeleteFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("privatedns.VirtualNetworkLinksDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
-}
-
-// VirtualNetworkLinksUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
+// VirtualNetworkLinksUpdateFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
type VirtualNetworkLinksUpdateFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *VirtualNetworkLinksUpdateFuture) Result(client VirtualNetworkLinksClient) (vnl VirtualNetworkLink, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "privatedns.VirtualNetworkLinksUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("privatedns.VirtualNetworkLinksUpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if vnl.Response.Response, err = future.GetResult(sender); err == nil && vnl.Response.Response.StatusCode != http.StatusNoContent {
- vnl, err = client.UpdateResponder(vnl.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "privatedns.VirtualNetworkLinksUpdateFuture", "Result", vnl.Response.Response, "Failure responding to request")
- }
- }
- return
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(VirtualNetworkLinksClient) (VirtualNetworkLink, error)
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/privatedns/mgmt/2018-09-01/privatedns/privatezones.go b/vendor/github.com/Azure/azure-sdk-for-go/services/privatedns/mgmt/2018-09-01/privatedns/privatezones.go
index b9051430633..9c389334931 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/privatedns/mgmt/2018-09-01/privatedns/privatezones.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/privatedns/mgmt/2018-09-01/privatedns/privatezones.go
@@ -70,7 +70,7 @@ func (client PrivateZonesClient) CreateOrUpdate(ctx context.Context, resourceGro
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "privatedns.PrivateZonesClient", "CreateOrUpdate", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "privatedns.PrivateZonesClient", "CreateOrUpdate", nil, "Failure sending request")
return
}
@@ -116,7 +116,33 @@ func (client PrivateZonesClient) CreateOrUpdateSender(req *http.Request) (future
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(client PrivateZonesClient) (pz PrivateZone, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "privatedns.PrivateZonesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("privatedns.PrivateZonesCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ pz.Response.Response, err = future.GetResult(sender)
+ if pz.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "privatedns.PrivateZonesCreateOrUpdateFuture", "Result", nil, "received nil response and error")
+ }
+ if err == nil && pz.Response.Response.StatusCode != http.StatusNoContent {
+ pz, err = client.CreateOrUpdateResponder(pz.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "privatedns.PrivateZonesCreateOrUpdateFuture", "Result", pz.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+ }
return
}
@@ -158,7 +184,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", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "privatedns.PrivateZonesClient", "Delete", nil, "Failure sending request")
return
}
@@ -198,7 +224,23 @@ func (client PrivateZonesClient) DeleteSender(req *http.Request) (future Private
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(client PrivateZonesClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "privatedns.PrivateZonesDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("privatedns.PrivateZonesDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
return
}
@@ -245,6 +287,7 @@ func (client PrivateZonesClient) Get(ctx context.Context, resourceGroupName stri
result, err = client.GetResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "privatedns.PrivateZonesClient", "Get", resp, "Failure responding to request")
+ return
}
return
@@ -320,9 +363,11 @@ func (client PrivateZonesClient) List(ctx context.Context, top *int32) (result P
result.pzlr, err = client.ListResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "privatedns.PrivateZonesClient", "List", resp, "Failure responding to request")
+ return
}
if result.pzlr.hasNextLink() && result.pzlr.IsEmpty() {
err = result.NextWithContext(ctx)
+ return
}
return
@@ -437,9 +482,11 @@ func (client PrivateZonesClient) ListByResourceGroup(ctx context.Context, resour
result.pzlr, err = client.ListByResourceGroupResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "privatedns.PrivateZonesClient", "ListByResourceGroup", resp, "Failure responding to request")
+ return
}
if result.pzlr.hasNextLink() && result.pzlr.IsEmpty() {
err = result.NextWithContext(ctx)
+ return
}
return
@@ -549,7 +596,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", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "privatedns.PrivateZonesClient", "Update", nil, "Failure sending request")
return
}
@@ -591,7 +638,33 @@ func (client PrivateZonesClient) UpdateSender(req *http.Request) (future Private
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(client PrivateZonesClient) (pz PrivateZone, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "privatedns.PrivateZonesUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("privatedns.PrivateZonesUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ pz.Response.Response, err = future.GetResult(sender)
+ if pz.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "privatedns.PrivateZonesUpdateFuture", "Result", nil, "received nil response and error")
+ }
+ if err == nil && pz.Response.Response.StatusCode != http.StatusNoContent {
+ pz, err = client.UpdateResponder(pz.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "privatedns.PrivateZonesUpdateFuture", "Result", pz.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+ }
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/privatedns/mgmt/2018-09-01/privatedns/recordsets.go b/vendor/github.com/Azure/azure-sdk-for-go/services/privatedns/mgmt/2018-09-01/privatedns/recordsets.go
index 76dc0c3efc5..e9db2397914 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/privatedns/mgmt/2018-09-01/privatedns/recordsets.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/privatedns/mgmt/2018-09-01/privatedns/recordsets.go
@@ -80,6 +80,7 @@ func (client RecordSetsClient) CreateOrUpdate(ctx context.Context, resourceGroup
result, err = client.CreateOrUpdateResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "privatedns.RecordSetsClient", "CreateOrUpdate", resp, "Failure responding to request")
+ return
}
return
@@ -172,6 +173,7 @@ func (client RecordSetsClient) Delete(ctx context.Context, resourceGroupName str
result, err = client.DeleteResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "privatedns.RecordSetsClient", "Delete", resp, "Failure responding to request")
+ return
}
return
@@ -254,6 +256,7 @@ func (client RecordSetsClient) Get(ctx context.Context, resourceGroupName string
result, err = client.GetResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "privatedns.RecordSetsClient", "Get", resp, "Failure responding to request")
+ return
}
return
@@ -336,9 +339,11 @@ func (client RecordSetsClient) List(ctx context.Context, resourceGroupName strin
result.rslr, err = client.ListResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "privatedns.RecordSetsClient", "List", resp, "Failure responding to request")
+ return
}
if result.rslr.hasNextLink() && result.rslr.IsEmpty() {
err = result.NextWithContext(ctx)
+ return
}
return
@@ -463,9 +468,11 @@ func (client RecordSetsClient) ListByType(ctx context.Context, resourceGroupName
result.rslr, err = client.ListByTypeResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "privatedns.RecordSetsClient", "ListByType", resp, "Failure responding to request")
+ return
}
if result.rslr.hasNextLink() && result.rslr.IsEmpty() {
err = result.NextWithContext(ctx)
+ return
}
return
@@ -590,6 +597,7 @@ func (client RecordSetsClient) Update(ctx context.Context, resourceGroupName str
result, err = client.UpdateResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "privatedns.RecordSetsClient", "Update", resp, "Failure responding to request")
+ return
}
return
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/privatedns/mgmt/2018-09-01/privatedns/virtualnetworklinks.go b/vendor/github.com/Azure/azure-sdk-for-go/services/privatedns/mgmt/2018-09-01/privatedns/virtualnetworklinks.go
index 9bfda96e861..bd4e6a0b60d 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/privatedns/mgmt/2018-09-01/privatedns/virtualnetworklinks.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/privatedns/mgmt/2018-09-01/privatedns/virtualnetworklinks.go
@@ -72,7 +72,7 @@ func (client VirtualNetworkLinksClient) CreateOrUpdate(ctx context.Context, reso
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "privatedns.VirtualNetworkLinksClient", "CreateOrUpdate", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "privatedns.VirtualNetworkLinksClient", "CreateOrUpdate", nil, "Failure sending request")
return
}
@@ -119,7 +119,33 @@ func (client VirtualNetworkLinksClient) CreateOrUpdateSender(req *http.Request)
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(client VirtualNetworkLinksClient) (vnl VirtualNetworkLink, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "privatedns.VirtualNetworkLinksCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("privatedns.VirtualNetworkLinksCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ vnl.Response.Response, err = future.GetResult(sender)
+ if vnl.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "privatedns.VirtualNetworkLinksCreateOrUpdateFuture", "Result", nil, "received nil response and error")
+ }
+ if err == nil && vnl.Response.Response.StatusCode != http.StatusNoContent {
+ vnl, err = client.CreateOrUpdateResponder(vnl.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "privatedns.VirtualNetworkLinksCreateOrUpdateFuture", "Result", vnl.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+ }
return
}
@@ -163,7 +189,7 @@ func (client VirtualNetworkLinksClient) Delete(ctx context.Context, resourceGrou
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "privatedns.VirtualNetworkLinksClient", "Delete", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "privatedns.VirtualNetworkLinksClient", "Delete", nil, "Failure sending request")
return
}
@@ -204,7 +230,23 @@ func (client VirtualNetworkLinksClient) DeleteSender(req *http.Request) (future
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(client VirtualNetworkLinksClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "privatedns.VirtualNetworkLinksDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("privatedns.VirtualNetworkLinksDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
return
}
@@ -251,6 +293,7 @@ func (client VirtualNetworkLinksClient) Get(ctx context.Context, resourceGroupNa
result, err = client.GetResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "privatedns.VirtualNetworkLinksClient", "Get", resp, "Failure responding to request")
+ return
}
return
@@ -330,9 +373,11 @@ func (client VirtualNetworkLinksClient) List(ctx context.Context, resourceGroupN
result.vnllr, err = client.ListResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "privatedns.VirtualNetworkLinksClient", "List", resp, "Failure responding to request")
+ return
}
if result.vnllr.hasNextLink() && result.vnllr.IsEmpty() {
err = result.NextWithContext(ctx)
+ return
}
return
@@ -445,7 +490,7 @@ func (client VirtualNetworkLinksClient) Update(ctx context.Context, resourceGrou
result, err = client.UpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "privatedns.VirtualNetworkLinksClient", "Update", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "privatedns.VirtualNetworkLinksClient", "Update", nil, "Failure sending request")
return
}
@@ -488,7 +533,33 @@ func (client VirtualNetworkLinksClient) UpdateSender(req *http.Request) (future
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(client VirtualNetworkLinksClient) (vnl VirtualNetworkLink, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "privatedns.VirtualNetworkLinksUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("privatedns.VirtualNetworkLinksUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ vnl.Response.Response, err = future.GetResult(sender)
+ if vnl.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "privatedns.VirtualNetworkLinksUpdateFuture", "Result", nil, "received nil response and error")
+ }
+ if err == nil && vnl.Response.Response.StatusCode != http.StatusNoContent {
+ vnl, err = client.UpdateResponder(vnl.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "privatedns.VirtualNetworkLinksUpdateFuture", "Result", vnl.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+ }
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2016-06-01/subscriptions/CHANGELOG.md b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2016-06-01/subscriptions/CHANGELOG.md
new file mode 100644
index 00000000000..7c32bb19425
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2016-06-01/subscriptions/CHANGELOG.md
@@ -0,0 +1,5 @@
+Generated from https://github.com/Azure/azure-rest-api-specs/tree/3c764635e7d442b3e74caf593029fcd440b3ef82//specification/resources/resource-manager/readme.md tag: `package-subscriptions-2016-06`
+
+Code generator @microsoft.azure/autorest.go@2.1.171
+
+
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-06-01/subscriptions/client.go b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2016-06-01/subscriptions/client.go
similarity index 98%
rename from vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-06-01/subscriptions/client.go
rename to vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2016-06-01/subscriptions/client.go
index 07236533b49..816ea0c3457 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-06-01/subscriptions/client.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2016-06-01/subscriptions/client.go
@@ -1,4 +1,4 @@
-// Package subscriptions implements the Azure ARM Subscriptions service API version 2019-06-01.
+// Package subscriptions implements the Azure ARM Subscriptions service API version 2016-06-01.
//
// All resource groups and resources exist within subscriptions. These operation enable you get information about your
// subscriptions and tenants. A tenant is a dedicated instance of Azure Active Directory (Azure AD) for your
@@ -96,6 +96,7 @@ func (client BaseClient) CheckResourceName(ctx context.Context, resourceNameDefi
result, err = client.CheckResourceNameResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "subscriptions.BaseClient", "CheckResourceName", resp, "Failure responding to request")
+ return
}
return
@@ -103,7 +104,7 @@ func (client BaseClient) CheckResourceName(ctx context.Context, resourceNameDefi
// CheckResourceNamePreparer prepares the CheckResourceName request.
func (client BaseClient) CheckResourceNamePreparer(ctx context.Context, resourceNameDefinition *ResourceName) (*http.Request, error) {
- const APIVersion = "2019-06-01"
+ const APIVersion = "2016-06-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-06-01/subscriptions/enums.go b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2016-06-01/subscriptions/enums.go
similarity index 81%
rename from vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-06-01/subscriptions/enums.go
rename to vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2016-06-01/subscriptions/enums.go
index 9e69877e248..1a3308bbece 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-06-01/subscriptions/enums.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2016-06-01/subscriptions/enums.go
@@ -69,20 +69,3 @@ const (
func PossibleStateValues() []State {
return []State{Deleted, Disabled, Enabled, PastDue, Warned}
}
-
-// TenantCategory enumerates the values for tenant category.
-type TenantCategory string
-
-const (
- // Home ...
- Home TenantCategory = "Home"
- // ManagedBy ...
- ManagedBy TenantCategory = "ManagedBy"
- // ProjectedBy ...
- ProjectedBy TenantCategory = "ProjectedBy"
-)
-
-// PossibleTenantCategoryValues returns an array of possible values for the TenantCategory const type.
-func PossibleTenantCategoryValues() []TenantCategory {
- return []TenantCategory{Home, ManagedBy, ProjectedBy}
-}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-06-01/subscriptions/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2016-06-01/subscriptions/models.go
similarity index 92%
rename from vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-06-01/subscriptions/models.go
rename to vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2016-06-01/subscriptions/models.go
index 4751266b0c9..5b1333c3c64 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-06-01/subscriptions/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2016-06-01/subscriptions/models.go
@@ -27,7 +27,7 @@ import (
)
// The package's fully qualified name.
-const fqdn = "github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-06-01/subscriptions"
+const fqdn = "github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2016-06-01/subscriptions"
// CheckResourceNameResult resource Name valid if not a reserved word, does not contain a reserved word and
// does not start with a reserved word
@@ -207,8 +207,11 @@ func (page ListResultPage) Values() []Subscription {
}
// Creates a new instance of the ListResultPage type.
-func NewListResultPage(getNextPage func(context.Context, ListResult) (ListResult, error)) ListResultPage {
- return ListResultPage{fn: getNextPage}
+func NewListResultPage(cur ListResult, getNextPage func(context.Context, ListResult) (ListResult, error)) ListResultPage {
+ return ListResultPage{
+ fn: getNextPage,
+ lr: cur,
+ }
}
// Location location information.
@@ -234,12 +237,6 @@ type LocationListResult struct {
Value *[]Location `json:"value,omitempty"`
}
-// ManagedByTenant information about a tenant managing the subscription.
-type ManagedByTenant struct {
- // TenantID - READ-ONLY; The tenant ID of the managing tenant. This is a GUID.
- TenantID *string `json:"tenantId,omitempty"`
-}
-
// Operation microsoft.Resources operation
type Operation struct {
// Name - Operation name: {provider}/{resource}/{operation}
@@ -413,8 +410,11 @@ func (page OperationListResultPage) Values() []Operation {
}
// Creates a new instance of the OperationListResultPage type.
-func NewOperationListResultPage(getNextPage func(context.Context, OperationListResult) (OperationListResult, error)) OperationListResultPage {
- return OperationListResultPage{fn: getNextPage}
+func NewOperationListResultPage(cur OperationListResult, getNextPage func(context.Context, OperationListResult) (OperationListResult, error)) OperationListResultPage {
+ return OperationListResultPage{
+ fn: getNextPage,
+ olr: cur,
+ }
}
// Policies subscription policies.
@@ -444,16 +444,12 @@ type Subscription struct {
SubscriptionID *string `json:"subscriptionId,omitempty"`
// DisplayName - READ-ONLY; The subscription display name.
DisplayName *string `json:"displayName,omitempty"`
- // TenantID - READ-ONLY; The subscription tenant ID.
- TenantID *string `json:"tenantId,omitempty"`
// State - READ-ONLY; The subscription state. Possible values are Enabled, Warned, PastDue, Disabled, and Deleted. Possible values include: 'Enabled', 'Warned', 'PastDue', 'Disabled', 'Deleted'
State State `json:"state,omitempty"`
// SubscriptionPolicies - The subscription policies.
SubscriptionPolicies *Policies `json:"subscriptionPolicies,omitempty"`
// AuthorizationSource - The authorization source of the request. Valid values are one or more combinations of Legacy, RoleBased, Bypassed, Direct and Management. For example, 'Legacy, RoleBased'.
AuthorizationSource *string `json:"authorizationSource,omitempty"`
- // ManagedByTenants - An array containing the tenants managing the subscription.
- ManagedByTenants *[]ManagedByTenant `json:"managedByTenants,omitempty"`
}
// MarshalJSON is the custom marshaler for Subscription.
@@ -465,9 +461,6 @@ func (s Subscription) MarshalJSON() ([]byte, error) {
if s.AuthorizationSource != nil {
objectMap["authorizationSource"] = s.AuthorizationSource
}
- if s.ManagedByTenants != nil {
- objectMap["managedByTenants"] = s.ManagedByTenants
- }
return json.Marshal(objectMap)
}
@@ -477,16 +470,6 @@ type TenantIDDescription struct {
ID *string `json:"id,omitempty"`
// TenantID - READ-ONLY; The tenant ID. For example, 00000000-0000-0000-0000-000000000000.
TenantID *string `json:"tenantId,omitempty"`
- // TenantCategory - READ-ONLY; The tenant category. Possible values include: 'Home', 'ProjectedBy', 'ManagedBy'
- TenantCategory TenantCategory `json:"tenantCategory,omitempty"`
- // Country - READ-ONLY; Country/region name of the address for the tenant.
- Country *string `json:"country,omitempty"`
- // CountryCode - READ-ONLY; Country/region abbreviation for the tenant.
- CountryCode *string `json:"countryCode,omitempty"`
- // DisplayName - READ-ONLY; The display name of the tenant.
- DisplayName *string `json:"displayName,omitempty"`
- // Domains - READ-ONLY; The list of domains for the tenant.
- Domains *[]string `json:"domains,omitempty"`
}
// TenantListResult tenant Ids information.
@@ -641,6 +624,9 @@ func (page TenantListResultPage) Values() []TenantIDDescription {
}
// Creates a new instance of the TenantListResultPage type.
-func NewTenantListResultPage(getNextPage func(context.Context, TenantListResult) (TenantListResult, error)) TenantListResultPage {
- return TenantListResultPage{fn: getNextPage}
+func NewTenantListResultPage(cur TenantListResult, getNextPage func(context.Context, TenantListResult) (TenantListResult, error)) TenantListResultPage {
+ return TenantListResultPage{
+ fn: getNextPage,
+ tlr: cur,
+ }
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-06-01/subscriptions/operations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2016-06-01/subscriptions/operations.go
similarity index 99%
rename from vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-06-01/subscriptions/operations.go
rename to vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2016-06-01/subscriptions/operations.go
index f28d149b1b4..18d409e5736 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-06-01/subscriptions/operations.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2016-06-01/subscriptions/operations.go
@@ -72,9 +72,11 @@ func (client OperationsClient) List(ctx context.Context) (result OperationListRe
result.olr, err = client.ListResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "subscriptions.OperationsClient", "List", resp, "Failure responding to request")
+ return
}
if result.olr.hasNextLink() && result.olr.IsEmpty() {
err = result.NextWithContext(ctx)
+ return
}
return
@@ -82,7 +84,7 @@ func (client OperationsClient) List(ctx context.Context) (result OperationListRe
// ListPreparer prepares the List request.
func (client OperationsClient) ListPreparer(ctx context.Context) (*http.Request, error) {
- const APIVersion = "2019-06-01"
+ const APIVersion = "2016-06-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-06-01/subscriptions/subscriptions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2016-06-01/subscriptions/subscriptions.go
similarity index 98%
rename from vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-06-01/subscriptions/subscriptions.go
rename to vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2016-06-01/subscriptions/subscriptions.go
index 45ab06176e0..b2a2fb8c6ba 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-06-01/subscriptions/subscriptions.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2016-06-01/subscriptions/subscriptions.go
@@ -73,6 +73,7 @@ func (client Client) Get(ctx context.Context, subscriptionID string) (result Sub
result, err = client.GetResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "subscriptions.Client", "Get", resp, "Failure responding to request")
+ return
}
return
@@ -84,7 +85,7 @@ func (client Client) GetPreparer(ctx context.Context, subscriptionID string) (*h
"subscriptionId": autorest.Encode("path", subscriptionID),
}
- const APIVersion = "2019-06-01"
+ const APIVersion = "2016-06-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -144,9 +145,11 @@ func (client Client) List(ctx context.Context) (result ListResultPage, err error
result.lr, err = client.ListResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "subscriptions.Client", "List", resp, "Failure responding to request")
+ return
}
if result.lr.hasNextLink() && result.lr.IsEmpty() {
err = result.NextWithContext(ctx)
+ return
}
return
@@ -154,7 +157,7 @@ func (client Client) List(ctx context.Context) (result ListResultPage, err error
// ListPreparer prepares the List request.
func (client Client) ListPreparer(ctx context.Context) (*http.Request, error) {
- const APIVersion = "2019-06-01"
+ const APIVersion = "2016-06-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -253,6 +256,7 @@ func (client Client) ListLocations(ctx context.Context, subscriptionID string) (
result, err = client.ListLocationsResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "subscriptions.Client", "ListLocations", resp, "Failure responding to request")
+ return
}
return
@@ -264,7 +268,7 @@ func (client Client) ListLocationsPreparer(ctx context.Context, subscriptionID s
"subscriptionId": autorest.Encode("path", subscriptionID),
}
- const APIVersion = "2019-06-01"
+ const APIVersion = "2016-06-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-06-01/subscriptions/tenants.go b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2016-06-01/subscriptions/tenants.go
similarity index 99%
rename from vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-06-01/subscriptions/tenants.go
rename to vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2016-06-01/subscriptions/tenants.go
index 0d753917020..48c291d024c 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-06-01/subscriptions/tenants.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2016-06-01/subscriptions/tenants.go
@@ -72,9 +72,11 @@ func (client TenantsClient) List(ctx context.Context) (result TenantListResultPa
result.tlr, err = client.ListResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "subscriptions.TenantsClient", "List", resp, "Failure responding to request")
+ return
}
if result.tlr.hasNextLink() && result.tlr.IsEmpty() {
err = result.NextWithContext(ctx)
+ return
}
return
@@ -82,7 +84,7 @@ func (client TenantsClient) List(ctx context.Context) (result TenantListResultPa
// ListPreparer prepares the List request.
func (client TenantsClient) ListPreparer(ctx context.Context) (*http.Request, error) {
- const APIVersion = "2019-06-01"
+ const APIVersion = "2016-06-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-06-01/subscriptions/version.go b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2016-06-01/subscriptions/version.go
similarity index 94%
rename from vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-06-01/subscriptions/version.go
rename to vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2016-06-01/subscriptions/version.go
index 45ee814e6da..98ae08ea5ad 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-06-01/subscriptions/version.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2016-06-01/subscriptions/version.go
@@ -21,7 +21,7 @@ import "github.com/Azure/azure-sdk-for-go/version"
// UserAgent returns the UserAgent string to use when sending http.Requests.
func UserAgent() string {
- return "Azure-SDK-For-Go/" + Version() + " subscriptions/2019-06-01"
+ return "Azure-SDK-For-Go/" + Version() + " subscriptions/2016-06-01"
}
// Version returns the semantic version (see http://semver.org) of the client.
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-02-01/resources/CHANGELOG.md b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-02-01/resources/CHANGELOG.md
new file mode 100644
index 00000000000..80d3b284deb
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-02-01/resources/CHANGELOG.md
@@ -0,0 +1,5 @@
+Generated from https://github.com/Azure/azure-rest-api-specs/tree/3c764635e7d442b3e74caf593029fcd440b3ef82//specification/resources/resource-manager/readme.md tag: `package-resources-2018-02`
+
+Code generator @microsoft.azure/autorest.go@2.1.171
+
+
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-05-01/resources/client.go b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-02-01/resources/client.go
similarity index 98%
rename from vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-05-01/resources/client.go
rename to vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-02-01/resources/client.go
index ab582ee0369..eb89abbc2c7 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-05-01/resources/client.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-02-01/resources/client.go
@@ -1,4 +1,4 @@
-// Package resources implements the Azure ARM Resources service API version 2019-05-01.
+// Package resources implements the Azure ARM Resources service API version 2018-02-01.
//
// Provides operations for working with resources and resource groups.
package resources
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-02-01/resources/deploymentoperations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-02-01/resources/deploymentoperations.go
new file mode 100644
index 00000000000..7867f899638
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-02-01/resources/deploymentoperations.go
@@ -0,0 +1,268 @@
+package resources
+
+// Copyright (c) Microsoft and contributors. All rights reserved.
+//
+// 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 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"
+)
+
+// DeploymentOperationsClient is the provides operations for working with resources and resource groups.
+type DeploymentOperationsClient struct {
+ BaseClient
+}
+
+// NewDeploymentOperationsClient creates an instance of the DeploymentOperationsClient client.
+func NewDeploymentOperationsClient(subscriptionID string) DeploymentOperationsClient {
+ return NewDeploymentOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewDeploymentOperationsClientWithBaseURI creates an instance of the DeploymentOperationsClient 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 NewDeploymentOperationsClientWithBaseURI(baseURI string, subscriptionID string) DeploymentOperationsClient {
+ return DeploymentOperationsClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// Get gets a deployments operation.
+// Parameters:
+// resourceGroupName - the name of the resource group. The name is case insensitive.
+// deploymentName - the name of the deployment.
+// operationID - the ID of the operation to get.
+func (client DeploymentOperationsClient) Get(ctx context.Context, resourceGroupName string, deploymentName string, operationID string) (result DeploymentOperation, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DeploymentOperationsClient.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.MaxLength, Rule: 90, Chain: nil},
+ {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
+ {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\p{L}\._\(\)\w]+$`, Chain: nil}}},
+ {TargetValue: deploymentName,
+ Constraints: []validation.Constraint{{Target: "deploymentName", Name: validation.MaxLength, Rule: 64, Chain: nil},
+ {Target: "deploymentName", Name: validation.MinLength, Rule: 1, Chain: nil},
+ {Target: "deploymentName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("resources.DeploymentOperationsClient", "Get", err.Error())
+ }
+
+ req, err := client.GetPreparer(ctx, resourceGroupName, deploymentName, operationID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.DeploymentOperationsClient", "Get", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "resources.DeploymentOperationsClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.DeploymentOperationsClient", "Get", resp, "Failure responding to request")
+ return
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client DeploymentOperationsClient) GetPreparer(ctx context.Context, resourceGroupName string, deploymentName string, operationID string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "deploymentName": autorest.Encode("path", deploymentName),
+ "operationId": autorest.Encode("path", operationID),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-02-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/deployments/{deploymentName}/operations/{operationId}", 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 DeploymentOperationsClient) 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 DeploymentOperationsClient) GetResponder(resp *http.Response) (result DeploymentOperation, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// List gets all deployments operations for a deployment.
+// Parameters:
+// resourceGroupName - the name of the resource group. The name is case insensitive.
+// deploymentName - the name of the deployment with the operation to get.
+// top - the number of results to return.
+func (client DeploymentOperationsClient) List(ctx context.Context, resourceGroupName string, deploymentName string, top *int32) (result DeploymentOperationsListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DeploymentOperationsClient.List")
+ defer func() {
+ sc := -1
+ if result.dolr.Response.Response != nil {
+ sc = result.dolr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: resourceGroupName,
+ Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
+ {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
+ {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\p{L}\._\(\)\w]+$`, Chain: nil}}},
+ {TargetValue: deploymentName,
+ Constraints: []validation.Constraint{{Target: "deploymentName", Name: validation.MaxLength, Rule: 64, Chain: nil},
+ {Target: "deploymentName", Name: validation.MinLength, Rule: 1, Chain: nil},
+ {Target: "deploymentName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("resources.DeploymentOperationsClient", "List", err.Error())
+ }
+
+ result.fn = client.listNextResults
+ req, err := client.ListPreparer(ctx, resourceGroupName, deploymentName, top)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.DeploymentOperationsClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.dolr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "resources.DeploymentOperationsClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result.dolr, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.DeploymentOperationsClient", "List", resp, "Failure responding to request")
+ return
+ }
+ if result.dolr.hasNextLink() && result.dolr.IsEmpty() {
+ err = result.NextWithContext(ctx)
+ return
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client DeploymentOperationsClient) ListPreparer(ctx context.Context, resourceGroupName string, deploymentName string, top *int32) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "deploymentName": autorest.Encode("path", deploymentName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-02-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if top != nil {
+ queryParameters["$top"] = autorest.Encode("query", *top)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/deployments/{deploymentName}/operations", 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 DeploymentOperationsClient) 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 DeploymentOperationsClient) ListResponder(resp *http.Response) (result DeploymentOperationsListResult, 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 DeploymentOperationsClient) listNextResults(ctx context.Context, lastResults DeploymentOperationsListResult) (result DeploymentOperationsListResult, err error) {
+ req, err := lastResults.deploymentOperationsListResultPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "resources.DeploymentOperationsClient", "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, "resources.DeploymentOperationsClient", "listNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.DeploymentOperationsClient", "listNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListComplete enumerates all values, automatically crossing page boundaries as required.
+func (client DeploymentOperationsClient) ListComplete(ctx context.Context, resourceGroupName string, deploymentName string, top *int32) (result DeploymentOperationsListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DeploymentOperationsClient.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, deploymentName, top)
+ return
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-02-01/resources/deployments.go b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-02-01/resources/deployments.go
new file mode 100644
index 00000000000..a94ca91d25b
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-02-01/resources/deployments.go
@@ -0,0 +1,934 @@
+package resources
+
+// Copyright (c) Microsoft and contributors. All rights reserved.
+//
+// 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 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"
+)
+
+// DeploymentsClient is the provides operations for working with resources and resource groups.
+type DeploymentsClient struct {
+ BaseClient
+}
+
+// NewDeploymentsClient creates an instance of the DeploymentsClient client.
+func NewDeploymentsClient(subscriptionID string) DeploymentsClient {
+ return NewDeploymentsClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewDeploymentsClientWithBaseURI creates an instance of the DeploymentsClient 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 NewDeploymentsClientWithBaseURI(baseURI string, subscriptionID string) DeploymentsClient {
+ return DeploymentsClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// CalculateTemplateHash calculate the hash of the given template.
+// Parameters:
+// templateParameter - the template provided to calculate hash.
+func (client DeploymentsClient) CalculateTemplateHash(ctx context.Context, templateParameter interface{}) (result TemplateHashResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DeploymentsClient.CalculateTemplateHash")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.CalculateTemplateHashPreparer(ctx, templateParameter)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "CalculateTemplateHash", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.CalculateTemplateHashSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "CalculateTemplateHash", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.CalculateTemplateHashResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "CalculateTemplateHash", resp, "Failure responding to request")
+ return
+ }
+
+ return
+}
+
+// CalculateTemplateHashPreparer prepares the CalculateTemplateHash request.
+func (client DeploymentsClient) CalculateTemplateHashPreparer(ctx context.Context, templateParameter interface{}) (*http.Request, error) {
+ const APIVersion = "2018-02-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.WithPath("/providers/Microsoft.Resources/calculateTemplateHash"),
+ autorest.WithJSON(templateParameter),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CalculateTemplateHashSender sends the CalculateTemplateHash request. The method will close the
+// http.Response Body if it receives an error.
+func (client DeploymentsClient) CalculateTemplateHashSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// CalculateTemplateHashResponder handles the response to the CalculateTemplateHash request. The method always
+// closes the http.Response Body.
+func (client DeploymentsClient) CalculateTemplateHashResponder(resp *http.Response) (result TemplateHashResult, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// Cancel you can cancel a deployment only if the provisioningState is Accepted or Running. After the deployment is
+// canceled, the provisioningState is set to Canceled. Canceling a template deployment stops the currently running
+// template deployment and leaves the resource group partially deployed.
+// Parameters:
+// resourceGroupName - the name of the resource group. The name is case insensitive.
+// deploymentName - the name of the deployment to cancel.
+func (client DeploymentsClient) Cancel(ctx context.Context, resourceGroupName string, deploymentName string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DeploymentsClient.Cancel")
+ 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.MaxLength, Rule: 90, Chain: nil},
+ {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
+ {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\p{L}\._\(\)\w]+$`, Chain: nil}}},
+ {TargetValue: deploymentName,
+ Constraints: []validation.Constraint{{Target: "deploymentName", Name: validation.MaxLength, Rule: 64, Chain: nil},
+ {Target: "deploymentName", Name: validation.MinLength, Rule: 1, Chain: nil},
+ {Target: "deploymentName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("resources.DeploymentsClient", "Cancel", err.Error())
+ }
+
+ req, err := client.CancelPreparer(ctx, resourceGroupName, deploymentName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "Cancel", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.CancelSender(req)
+ if err != nil {
+ result.Response = resp
+ err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "Cancel", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.CancelResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "Cancel", resp, "Failure responding to request")
+ return
+ }
+
+ return
+}
+
+// CancelPreparer prepares the Cancel request.
+func (client DeploymentsClient) CancelPreparer(ctx context.Context, resourceGroupName string, deploymentName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "deploymentName": autorest.Encode("path", deploymentName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-02-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.Resources/deployments/{deploymentName}/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 DeploymentsClient) CancelSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// CancelResponder handles the response to the Cancel request. The method always
+// closes the http.Response Body.
+func (client DeploymentsClient) CancelResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// CheckExistence checks whether the deployment exists.
+// Parameters:
+// resourceGroupName - the name of the resource group with the deployment to check. The name is case
+// insensitive.
+// deploymentName - the name of the deployment to check.
+func (client DeploymentsClient) CheckExistence(ctx context.Context, resourceGroupName string, deploymentName string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DeploymentsClient.CheckExistence")
+ 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.MaxLength, Rule: 90, Chain: nil},
+ {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
+ {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\p{L}\._\(\)\w]+$`, Chain: nil}}},
+ {TargetValue: deploymentName,
+ Constraints: []validation.Constraint{{Target: "deploymentName", Name: validation.MaxLength, Rule: 64, Chain: nil},
+ {Target: "deploymentName", Name: validation.MinLength, Rule: 1, Chain: nil},
+ {Target: "deploymentName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("resources.DeploymentsClient", "CheckExistence", err.Error())
+ }
+
+ req, err := client.CheckExistencePreparer(ctx, resourceGroupName, deploymentName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "CheckExistence", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.CheckExistenceSender(req)
+ if err != nil {
+ result.Response = resp
+ err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "CheckExistence", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.CheckExistenceResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "CheckExistence", resp, "Failure responding to request")
+ return
+ }
+
+ return
+}
+
+// CheckExistencePreparer prepares the CheckExistence request.
+func (client DeploymentsClient) CheckExistencePreparer(ctx context.Context, resourceGroupName string, deploymentName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "deploymentName": autorest.Encode("path", deploymentName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-02-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsHead(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/{deploymentName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CheckExistenceSender sends the CheckExistence request. The method will close the
+// http.Response Body if it receives an error.
+func (client DeploymentsClient) CheckExistenceSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// CheckExistenceResponder handles the response to the CheckExistence request. The method always
+// closes the http.Response Body.
+func (client DeploymentsClient) CheckExistenceResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent, http.StatusNotFound),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// CreateOrUpdate you can provide the template and parameters directly in the request or link to JSON files.
+// Parameters:
+// resourceGroupName - the name of the resource group to deploy the resources to. The name is case insensitive.
+// The resource group must already exist.
+// deploymentName - the name of the deployment.
+// parameters - additional parameters supplied to the operation.
+func (client DeploymentsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, deploymentName string, parameters Deployment) (result DeploymentsCreateOrUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DeploymentsClient.CreateOrUpdate")
+ 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.MaxLength, Rule: 90, Chain: nil},
+ {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
+ {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\p{L}\._\(\)\w]+$`, Chain: nil}}},
+ {TargetValue: deploymentName,
+ Constraints: []validation.Constraint{{Target: "deploymentName", Name: validation.MaxLength, Rule: 64, Chain: nil},
+ {Target: "deploymentName", Name: validation.MinLength, Rule: 1, Chain: nil},
+ {Target: "deploymentName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}},
+ {TargetValue: parameters,
+ Constraints: []validation.Constraint{{Target: "parameters.Properties", Name: validation.Null, Rule: true,
+ Chain: []validation.Constraint{{Target: "parameters.Properties.TemplateLink", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.Properties.TemplateLink.URI", Name: validation.Null, Rule: true, Chain: nil}}},
+ {Target: "parameters.Properties.ParametersLink", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.Properties.ParametersLink.URI", Name: validation.Null, Rule: true, Chain: nil}}},
+ }}}}}); err != nil {
+ return result, validation.NewError("resources.DeploymentsClient", "CreateOrUpdate", err.Error())
+ }
+
+ req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, deploymentName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "CreateOrUpdate", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.CreateOrUpdateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "CreateOrUpdate", nil, "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
+func (client DeploymentsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, deploymentName string, parameters Deployment) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "deploymentName": autorest.Encode("path", deploymentName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-02-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.Resources/deployments/{deploymentName}", 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 DeploymentsClient) CreateOrUpdateSender(req *http.Request) (future DeploymentsCreateOrUpdateFuture, err error) {
+ var resp *http.Response
+ 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 = func(client DeploymentsClient) (de DeploymentExtended, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.DeploymentsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("resources.DeploymentsCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ de.Response.Response, err = future.GetResult(sender)
+ if de.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "resources.DeploymentsCreateOrUpdateFuture", "Result", nil, "received nil response and error")
+ }
+ if err == nil && de.Response.Response.StatusCode != http.StatusNoContent {
+ de, err = client.CreateOrUpdateResponder(de.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.DeploymentsCreateOrUpdateFuture", "Result", de.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+ }
+ return
+}
+
+// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
+// closes the http.Response Body.
+func (client DeploymentsClient) CreateOrUpdateResponder(resp *http.Response) (result DeploymentExtended, 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 a template deployment that is currently running cannot be deleted. Deleting a template deployment removes the
+// associated deployment operations. Deleting a template deployment does not affect the state of the resource group.
+// This is an asynchronous operation that returns a status of 202 until the template deployment is successfully
+// deleted. The Location response header contains the URI that is used to obtain the status of the process. While the
+// process is running, a call to the URI in the Location header returns a status of 202. When the process finishes, the
+// URI in the Location header returns a status of 204 on success. If the asynchronous request failed, the URI in the
+// Location header returns an error-level status code.
+// Parameters:
+// resourceGroupName - the name of the resource group with the deployment to delete. The name is case
+// insensitive.
+// deploymentName - the name of the deployment to delete.
+func (client DeploymentsClient) Delete(ctx context.Context, resourceGroupName string, deploymentName string) (result DeploymentsDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DeploymentsClient.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.MaxLength, Rule: 90, Chain: nil},
+ {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
+ {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\p{L}\._\(\)\w]+$`, Chain: nil}}},
+ {TargetValue: deploymentName,
+ Constraints: []validation.Constraint{{Target: "deploymentName", Name: validation.MaxLength, Rule: 64, Chain: nil},
+ {Target: "deploymentName", Name: validation.MinLength, Rule: 1, Chain: nil},
+ {Target: "deploymentName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("resources.DeploymentsClient", "Delete", err.Error())
+ }
+
+ req, err := client.DeletePreparer(ctx, resourceGroupName, deploymentName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.DeleteSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "Delete", nil, "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client DeploymentsClient) DeletePreparer(ctx context.Context, resourceGroupName string, deploymentName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "deploymentName": autorest.Encode("path", deploymentName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-02-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.Resources/deployments/{deploymentName}", 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 DeploymentsClient) DeleteSender(req *http.Request) (future DeploymentsDeleteFuture, err error) {
+ var resp *http.Response
+ 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 = func(client DeploymentsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.DeploymentsDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("resources.DeploymentsDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
+ return
+}
+
+// DeleteResponder handles the response to the Delete request. The method always
+// closes the http.Response Body.
+func (client DeploymentsClient) 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
+}
+
+// ExportTemplate exports the template used for specified deployment.
+// Parameters:
+// resourceGroupName - the name of the resource group. The name is case insensitive.
+// deploymentName - the name of the deployment from which to get the template.
+func (client DeploymentsClient) ExportTemplate(ctx context.Context, resourceGroupName string, deploymentName string) (result DeploymentExportResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DeploymentsClient.ExportTemplate")
+ 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.MaxLength, Rule: 90, Chain: nil},
+ {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
+ {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\p{L}\._\(\)\w]+$`, Chain: nil}}},
+ {TargetValue: deploymentName,
+ Constraints: []validation.Constraint{{Target: "deploymentName", Name: validation.MaxLength, Rule: 64, Chain: nil},
+ {Target: "deploymentName", Name: validation.MinLength, Rule: 1, Chain: nil},
+ {Target: "deploymentName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("resources.DeploymentsClient", "ExportTemplate", err.Error())
+ }
+
+ req, err := client.ExportTemplatePreparer(ctx, resourceGroupName, deploymentName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "ExportTemplate", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ExportTemplateSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "ExportTemplate", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ExportTemplateResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "ExportTemplate", resp, "Failure responding to request")
+ return
+ }
+
+ return
+}
+
+// ExportTemplatePreparer prepares the ExportTemplate request.
+func (client DeploymentsClient) ExportTemplatePreparer(ctx context.Context, resourceGroupName string, deploymentName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "deploymentName": autorest.Encode("path", deploymentName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-02-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.Resources/deployments/{deploymentName}/exportTemplate", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ExportTemplateSender sends the ExportTemplate request. The method will close the
+// http.Response Body if it receives an error.
+func (client DeploymentsClient) ExportTemplateSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// ExportTemplateResponder handles the response to the ExportTemplate request. The method always
+// closes the http.Response Body.
+func (client DeploymentsClient) ExportTemplateResponder(resp *http.Response) (result DeploymentExportResult, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// Get gets a deployment.
+// Parameters:
+// resourceGroupName - the name of the resource group. The name is case insensitive.
+// deploymentName - the name of the deployment to get.
+func (client DeploymentsClient) Get(ctx context.Context, resourceGroupName string, deploymentName string) (result DeploymentExtended, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DeploymentsClient.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.MaxLength, Rule: 90, Chain: nil},
+ {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
+ {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\p{L}\._\(\)\w]+$`, Chain: nil}}},
+ {TargetValue: deploymentName,
+ Constraints: []validation.Constraint{{Target: "deploymentName", Name: validation.MaxLength, Rule: 64, Chain: nil},
+ {Target: "deploymentName", Name: validation.MinLength, Rule: 1, Chain: nil},
+ {Target: "deploymentName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("resources.DeploymentsClient", "Get", err.Error())
+ }
+
+ req, err := client.GetPreparer(ctx, resourceGroupName, deploymentName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "Get", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "Get", resp, "Failure responding to request")
+ return
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client DeploymentsClient) GetPreparer(ctx context.Context, resourceGroupName string, deploymentName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "deploymentName": autorest.Encode("path", deploymentName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-02-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.Resources/deployments/{deploymentName}", 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 DeploymentsClient) 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 DeploymentsClient) GetResponder(resp *http.Response) (result DeploymentExtended, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// ListByResourceGroup get all the deployments for a resource group.
+// Parameters:
+// resourceGroupName - the name of the resource group with the deployments to get. The name is case
+// insensitive.
+// filter - the filter to apply on the operation. For example, you can use $filter=provisioningState eq
+// '{state}'.
+// top - the number of results to get. If null is passed, returns all deployments.
+func (client DeploymentsClient) ListByResourceGroup(ctx context.Context, resourceGroupName string, filter string, top *int32) (result DeploymentListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DeploymentsClient.ListByResourceGroup")
+ defer func() {
+ sc := -1
+ if result.dlr.Response.Response != nil {
+ sc = result.dlr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: resourceGroupName,
+ Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
+ {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
+ {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\p{L}\._\(\)\w]+$`, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("resources.DeploymentsClient", "ListByResourceGroup", err.Error())
+ }
+
+ result.fn = client.listByResourceGroupNextResults
+ req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName, filter, top)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "ListByResourceGroup", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListByResourceGroupSender(req)
+ if err != nil {
+ result.dlr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "ListByResourceGroup", resp, "Failure sending request")
+ return
+ }
+
+ result.dlr, err = client.ListByResourceGroupResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "ListByResourceGroup", resp, "Failure responding to request")
+ return
+ }
+ if result.dlr.hasNextLink() && result.dlr.IsEmpty() {
+ err = result.NextWithContext(ctx)
+ return
+ }
+
+ return
+}
+
+// ListByResourceGroupPreparer prepares the ListByResourceGroup request.
+func (client DeploymentsClient) ListByResourceGroupPreparer(ctx context.Context, resourceGroupName string, filter string, top *int32) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-02-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)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/", 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 DeploymentsClient) 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 DeploymentsClient) ListByResourceGroupResponder(resp *http.Response) (result DeploymentListResult, 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 DeploymentsClient) listByResourceGroupNextResults(ctx context.Context, lastResults DeploymentListResult) (result DeploymentListResult, err error) {
+ req, err := lastResults.deploymentListResultPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "resources.DeploymentsClient", "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, "resources.DeploymentsClient", "listByResourceGroupNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListByResourceGroupResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required.
+func (client DeploymentsClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, filter string, top *int32) (result DeploymentListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DeploymentsClient.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, filter, top)
+ return
+}
+
+// Validate validates whether the specified template is syntactically correct and will be accepted by Azure Resource
+// Manager..
+// Parameters:
+// resourceGroupName - the name of the resource group the template will be deployed to. The name is case
+// insensitive.
+// deploymentName - the name of the deployment.
+// parameters - parameters to validate.
+func (client DeploymentsClient) Validate(ctx context.Context, resourceGroupName string, deploymentName string, parameters Deployment) (result DeploymentValidateResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DeploymentsClient.Validate")
+ 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.MaxLength, Rule: 90, Chain: nil},
+ {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
+ {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\p{L}\._\(\)\w]+$`, Chain: nil}}},
+ {TargetValue: deploymentName,
+ Constraints: []validation.Constraint{{Target: "deploymentName", Name: validation.MaxLength, Rule: 64, Chain: nil},
+ {Target: "deploymentName", Name: validation.MinLength, Rule: 1, Chain: nil},
+ {Target: "deploymentName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}},
+ {TargetValue: parameters,
+ Constraints: []validation.Constraint{{Target: "parameters.Properties", Name: validation.Null, Rule: true,
+ Chain: []validation.Constraint{{Target: "parameters.Properties.TemplateLink", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.Properties.TemplateLink.URI", Name: validation.Null, Rule: true, Chain: nil}}},
+ {Target: "parameters.Properties.ParametersLink", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.Properties.ParametersLink.URI", Name: validation.Null, Rule: true, Chain: nil}}},
+ }}}}}); err != nil {
+ return result, validation.NewError("resources.DeploymentsClient", "Validate", err.Error())
+ }
+
+ req, err := client.ValidatePreparer(ctx, resourceGroupName, deploymentName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "Validate", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ValidateSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "Validate", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ValidateResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "Validate", resp, "Failure responding to request")
+ return
+ }
+
+ return
+}
+
+// ValidatePreparer prepares the Validate request.
+func (client DeploymentsClient) ValidatePreparer(ctx context.Context, resourceGroupName string, deploymentName string, parameters Deployment) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "deploymentName": autorest.Encode("path", deploymentName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-02-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.Resources/deployments/{deploymentName}/validate", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ValidateSender sends the Validate request. The method will close the
+// http.Response Body if it receives an error.
+func (client DeploymentsClient) ValidateSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// ValidateResponder handles the response to the Validate request. The method always
+// closes the http.Response Body.
+func (client DeploymentsClient) ValidateResponder(resp *http.Response) (result DeploymentValidateResult, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusBadRequest),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-05-01/resources/enums.go b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-02-01/resources/enums.go
similarity index 100%
rename from vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-05-01/resources/enums.go
rename to vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-02-01/resources/enums.go
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-05-01/resources/groups.go b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-02-01/resources/groups.go
similarity index 96%
rename from vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-05-01/resources/groups.go
rename to vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-02-01/resources/groups.go
index afc6eec85a8..e3db8c34a28 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-05-01/resources/groups.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-02-01/resources/groups.go
@@ -80,6 +80,7 @@ func (client GroupsClient) CheckExistence(ctx context.Context, resourceGroupName
result, err = client.CheckExistenceResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "resources.GroupsClient", "CheckExistence", resp, "Failure responding to request")
+ return
}
return
@@ -92,7 +93,7 @@ func (client GroupsClient) CheckExistencePreparer(ctx context.Context, resourceG
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2019-05-01"
+ const APIVersion = "2018-02-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -124,9 +125,7 @@ func (client GroupsClient) CheckExistenceResponder(resp *http.Response) (result
// CreateOrUpdate creates or updates a resource group.
// Parameters:
-// resourceGroupName - the name of the resource group to create or update. Can include alphanumeric,
-// underscore, parentheses, hyphen, period (except at end), and Unicode characters that match the allowed
-// characters.
+// resourceGroupName - the name of the resource group to create or update.
// parameters - parameters supplied to the create or update a resource group.
func (client GroupsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, parameters Group) (result Group, err error) {
if tracing.IsEnabled() {
@@ -165,6 +164,7 @@ func (client GroupsClient) CreateOrUpdate(ctx context.Context, resourceGroupName
result, err = client.CreateOrUpdateResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "resources.GroupsClient", "CreateOrUpdate", resp, "Failure responding to request")
+ return
}
return
@@ -177,14 +177,12 @@ func (client GroupsClient) CreateOrUpdatePreparer(ctx context.Context, resourceG
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2019-05-01"
+ const APIVersion = "2018-02-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(),
@@ -244,7 +242,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", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "resources.GroupsClient", "Delete", nil, "Failure sending request")
return
}
@@ -258,7 +256,7 @@ func (client GroupsClient) DeletePreparer(ctx context.Context, resourceGroupName
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2019-05-01"
+ const APIVersion = "2018-02-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -279,7 +277,23 @@ func (client GroupsClient) DeleteSender(req *http.Request) (future GroupsDeleteF
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(client GroupsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.GroupsDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("resources.GroupsDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
return
}
@@ -333,6 +347,7 @@ func (client GroupsClient) ExportTemplate(ctx context.Context, resourceGroupName
result, err = client.ExportTemplateResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "resources.GroupsClient", "ExportTemplate", resp, "Failure responding to request")
+ return
}
return
@@ -345,7 +360,7 @@ func (client GroupsClient) ExportTemplatePreparer(ctx context.Context, resourceG
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2019-05-01"
+ const APIVersion = "2018-02-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -416,6 +431,7 @@ func (client GroupsClient) Get(ctx context.Context, resourceGroupName string) (r
result, err = client.GetResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "resources.GroupsClient", "Get", resp, "Failure responding to request")
+ return
}
return
@@ -428,7 +444,7 @@ func (client GroupsClient) GetPreparer(ctx context.Context, resourceGroupName st
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2019-05-01"
+ const APIVersion = "2018-02-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -461,8 +477,7 @@ func (client GroupsClient) GetResponder(resp *http.Response) (result Group, err
// List gets all the resource groups for a subscription.
// Parameters:
-// filter - the filter to apply on the operation.
You can filter by tag names and values. For example,
-// to filter for a tag name and value, use $filter=tagName eq 'tag1' and tagValue eq 'Value1'
+// filter - the filter to apply on the operation.
// top - the number of results to return. If null is passed, returns all resource groups.
func (client GroupsClient) List(ctx context.Context, filter string, top *int32) (result GroupListResultPage, err error) {
if tracing.IsEnabled() {
@@ -492,9 +507,11 @@ func (client GroupsClient) List(ctx context.Context, filter string, top *int32)
result.glr, err = client.ListResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "resources.GroupsClient", "List", resp, "Failure responding to request")
+ return
}
if result.glr.hasNextLink() && result.glr.IsEmpty() {
err = result.NextWithContext(ctx)
+ return
}
return
@@ -506,7 +523,7 @@ func (client GroupsClient) ListPreparer(ctx context.Context, filter string, top
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2019-05-01"
+ const APIVersion = "2018-02-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -620,6 +637,7 @@ func (client GroupsClient) Update(ctx context.Context, resourceGroupName string,
result, err = client.UpdateResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "resources.GroupsClient", "Update", resp, "Failure responding to request")
+ return
}
return
@@ -632,7 +650,7 @@ func (client GroupsClient) UpdatePreparer(ctx context.Context, resourceGroupName
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2019-05-01"
+ const APIVersion = "2018-02-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-05-01/resources/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-02-01/resources/models.go
similarity index 72%
rename from vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-05-01/resources/models.go
rename to vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-02-01/resources/models.go
index 95e93cb5e85..1a873b0d70c 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-05-01/resources/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-02-01/resources/models.go
@@ -29,7 +29,7 @@ import (
)
// The package's fully qualified name.
-const fqdn = "github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-05-01/resources"
+const fqdn = "github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-02-01/resources"
// AliasPathType the type of the paths for alias.
type AliasPathType struct {
@@ -65,61 +65,22 @@ type CloudError struct {
// CreateOrUpdateByIDFuture an abstraction for monitoring and retrieving the results of a long-running
// operation.
type CreateOrUpdateByIDFuture struct {
- azure.Future
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(Client) (GenericResource, error)
}
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *CreateOrUpdateByIDFuture) Result(client Client) (gr GenericResource, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.CreateOrUpdateByIDFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("resources.CreateOrUpdateByIDFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if gr.Response.Response, err = future.GetResult(sender); err == nil && gr.Response.Response.StatusCode != http.StatusNoContent {
- gr, err = client.CreateOrUpdateByIDResponder(gr.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.CreateOrUpdateByIDFuture", "Result", gr.Response.Response, "Failure responding to request")
- }
- }
- return
-}
-
-// CreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+// CreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
type CreateOrUpdateFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *CreateOrUpdateFuture) Result(client Client) (gr GenericResource, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.CreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("resources.CreateOrUpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if gr.Response.Response, err = future.GetResult(sender); err == nil && gr.Response.Response.StatusCode != http.StatusNoContent {
- gr, err = client.CreateOrUpdateResponder(gr.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.CreateOrUpdateFuture", "Result", gr.Response.Response, "Failure responding to request")
- }
- }
- return
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(Client) (GenericResource, error)
}
-// DebugSetting the debug setting.
+// DebugSetting ...
type DebugSetting struct {
// DetailLevel - Specifies the type of information to log for debugging. The permitted values are none, requestContent, responseContent, or both requestContent and responseContent separated by a comma. The default is none. When setting this value, carefully consider the type of information you are passing in during deployment. By logging information about the request or response, you could potentially expose sensitive data that is retrieved through the deployment operations.
DetailLevel *string `json:"detailLevel,omitempty"`
@@ -127,46 +88,18 @@ type DebugSetting struct {
// DeleteByIDFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type DeleteByIDFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *DeleteByIDFuture) Result(client Client) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeleteByIDFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("resources.DeleteByIDFuture")
- return
- }
- ar.Response = future.Response()
- return
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(Client) (autorest.Response, error)
}
// DeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type DeleteFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *DeleteFuture) Result(client Client) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeleteFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("resources.DeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(Client) (autorest.Response, error)
}
// Dependency deployment dependency information.
@@ -183,8 +116,6 @@ type Dependency struct {
// Deployment deployment operation parameters.
type Deployment struct {
- // Location - The location to store the deployment data.
- Location *string `json:"location,omitempty"`
// Properties - The deployment properties.
Properties *DeploymentProperties `json:"properties,omitempty"`
}
@@ -201,12 +132,8 @@ type DeploymentExtended struct {
autorest.Response `json:"-"`
// ID - READ-ONLY; The ID of the deployment.
ID *string `json:"id,omitempty"`
- // Name - READ-ONLY; The name of the deployment.
+ // Name - The name of the deployment.
Name *string `json:"name,omitempty"`
- // Type - READ-ONLY; The type of the deployment.
- Type *string `json:"type,omitempty"`
- // Location - the location of the deployment.
- Location *string `json:"location,omitempty"`
// Properties - Deployment properties.
Properties *DeploymentPropertiesExtended `json:"properties,omitempty"`
}
@@ -214,8 +141,8 @@ type DeploymentExtended struct {
// MarshalJSON is the custom marshaler for DeploymentExtended.
func (de DeploymentExtended) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
- if de.Location != nil {
- objectMap["location"] = de.Location
+ if de.Name != nil {
+ objectMap["name"] = de.Name
}
if de.Properties != nil {
objectMap["properties"] = de.Properties
@@ -390,8 +317,11 @@ func (page DeploymentListResultPage) Values() []DeploymentExtended {
}
// Creates a new instance of the DeploymentListResultPage type.
-func NewDeploymentListResultPage(getNextPage func(context.Context, DeploymentListResult) (DeploymentListResult, error)) DeploymentListResultPage {
- return DeploymentListResultPage{fn: getNextPage}
+func NewDeploymentListResultPage(cur DeploymentListResult, getNextPage func(context.Context, DeploymentListResult) (DeploymentListResult, error)) DeploymentListResultPage {
+ return DeploymentListResultPage{
+ fn: getNextPage,
+ dlr: cur,
+ }
}
// DeploymentOperation deployment operation information.
@@ -420,8 +350,6 @@ type DeploymentOperationProperties struct {
ProvisioningState *string `json:"provisioningState,omitempty"`
// Timestamp - READ-ONLY; The date and time of the operation.
Timestamp *date.Time `json:"timestamp,omitempty"`
- // Duration - READ-ONLY; The duration of the operation.
- Duration *string `json:"duration,omitempty"`
// ServiceRequestID - READ-ONLY; Deployment operation service request id.
ServiceRequestID *string `json:"serviceRequestId,omitempty"`
// StatusCode - READ-ONLY; Operation status code.
@@ -454,7 +382,8 @@ func (dolr DeploymentOperationsListResult) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// DeploymentOperationsListResultIterator provides access to a complete listing of DeploymentOperation values.
+// DeploymentOperationsListResultIterator provides access to a complete listing of DeploymentOperation
+// values.
type DeploymentOperationsListResultIterator struct {
i int
page DeploymentOperationsListResultPage
@@ -597,8 +526,11 @@ func (page DeploymentOperationsListResultPage) Values() []DeploymentOperation {
}
// Creates a new instance of the DeploymentOperationsListResultPage type.
-func NewDeploymentOperationsListResultPage(getNextPage func(context.Context, DeploymentOperationsListResult) (DeploymentOperationsListResult, error)) DeploymentOperationsListResultPage {
- return DeploymentOperationsListResultPage{fn: getNextPage}
+func NewDeploymentOperationsListResultPage(cur DeploymentOperationsListResult, getNextPage func(context.Context, DeploymentOperationsListResult) (DeploymentOperationsListResult, error)) DeploymentOperationsListResultPage {
+ return DeploymentOperationsListResultPage{
+ fn: getNextPage,
+ dolr: cur,
+ }
}
// DeploymentProperties deployment properties.
@@ -627,8 +559,6 @@ type DeploymentPropertiesExtended struct {
CorrelationID *string `json:"correlationId,omitempty"`
// Timestamp - READ-ONLY; The timestamp of the template deployment.
Timestamp *date.Time `json:"timestamp,omitempty"`
- // Duration - READ-ONLY; The duration of the template deployment.
- Duration *string `json:"duration,omitempty"`
// Outputs - Key/value pairs that represent deployment output.
Outputs interface{} `json:"outputs,omitempty"`
// Providers - The list of resource providers needed for the deployment.
@@ -687,160 +617,22 @@ func (dpe DeploymentPropertiesExtended) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// DeploymentsCreateOrUpdateAtManagementGroupScopeFuture an abstraction for monitoring and retrieving the
-// results of a long-running operation.
-type DeploymentsCreateOrUpdateAtManagementGroupScopeFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *DeploymentsCreateOrUpdateAtManagementGroupScopeFuture) Result(client DeploymentsClient) (de DeploymentExtended, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeploymentsCreateOrUpdateAtManagementGroupScopeFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("resources.DeploymentsCreateOrUpdateAtManagementGroupScopeFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if de.Response.Response, err = future.GetResult(sender); err == nil && de.Response.Response.StatusCode != http.StatusNoContent {
- de, err = client.CreateOrUpdateAtManagementGroupScopeResponder(de.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeploymentsCreateOrUpdateAtManagementGroupScopeFuture", "Result", de.Response.Response, "Failure responding to request")
- }
- }
- return
-}
-
-// DeploymentsCreateOrUpdateAtSubscriptionScopeFuture an abstraction for monitoring and retrieving the results
-// of a long-running operation.
-type DeploymentsCreateOrUpdateAtSubscriptionScopeFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *DeploymentsCreateOrUpdateAtSubscriptionScopeFuture) Result(client DeploymentsClient) (de DeploymentExtended, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeploymentsCreateOrUpdateAtSubscriptionScopeFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("resources.DeploymentsCreateOrUpdateAtSubscriptionScopeFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if de.Response.Response, err = future.GetResult(sender); err == nil && de.Response.Response.StatusCode != http.StatusNoContent {
- de, err = client.CreateOrUpdateAtSubscriptionScopeResponder(de.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeploymentsCreateOrUpdateAtSubscriptionScopeFuture", "Result", de.Response.Response, "Failure responding to request")
- }
- }
- return
-}
-
-// DeploymentsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
-type DeploymentsCreateOrUpdateFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *DeploymentsCreateOrUpdateFuture) Result(client DeploymentsClient) (de DeploymentExtended, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeploymentsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("resources.DeploymentsCreateOrUpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if de.Response.Response, err = future.GetResult(sender); err == nil && de.Response.Response.StatusCode != http.StatusNoContent {
- de, err = client.CreateOrUpdateResponder(de.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeploymentsCreateOrUpdateFuture", "Result", de.Response.Response, "Failure responding to request")
- }
- }
- return
-}
-
-// DeploymentsDeleteAtManagementGroupScopeFuture an abstraction for monitoring and retrieving the results of a
-// long-running operation.
-type DeploymentsDeleteAtManagementGroupScopeFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *DeploymentsDeleteAtManagementGroupScopeFuture) Result(client DeploymentsClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeploymentsDeleteAtManagementGroupScopeFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("resources.DeploymentsDeleteAtManagementGroupScopeFuture")
- return
- }
- ar.Response = future.Response()
- return
-}
-
-// DeploymentsDeleteAtSubscriptionScopeFuture an abstraction for monitoring and retrieving the results of a
+// DeploymentsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
-type DeploymentsDeleteAtSubscriptionScopeFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *DeploymentsDeleteAtSubscriptionScopeFuture) Result(client DeploymentsClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeploymentsDeleteAtSubscriptionScopeFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("resources.DeploymentsDeleteAtSubscriptionScopeFuture")
- return
- }
- ar.Response = future.Response()
- return
+type DeploymentsCreateOrUpdateFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(DeploymentsClient) (DeploymentExtended, error)
}
// DeploymentsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
// operation.
type DeploymentsDeleteFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *DeploymentsDeleteFuture) Result(client DeploymentsClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeploymentsDeleteFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("resources.DeploymentsDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(DeploymentsClient) (autorest.Response, error)
}
// DeploymentValidateResult information from validate template deployment response.
@@ -860,7 +652,8 @@ type ErrorAdditionalInfo struct {
Info interface{} `json:"info,omitempty"`
}
-// ErrorResponse the resource management error response.
+// ErrorResponse common error response for all Azure Resource Manager APIs to return error details for
+// failed operations. (This also follows the OData error response format.)
type ErrorResponse struct {
// Code - READ-ONLY; The error code.
Code *string `json:"code,omitempty"`
@@ -1016,11 +809,8 @@ type Group struct {
autorest.Response `json:"-"`
// ID - READ-ONLY; The ID of the resource group.
ID *string `json:"id,omitempty"`
- // Name - READ-ONLY; The name of the resource group.
- Name *string `json:"name,omitempty"`
- // Type - READ-ONLY; The type of the resource group.
- Type *string `json:"type,omitempty"`
- // Properties - The resource group properties.
+ // Name - The name of the resource group.
+ Name *string `json:"name,omitempty"`
Properties *GroupProperties `json:"properties,omitempty"`
// Location - The location of the resource group. It cannot be changed after the resource group has been created. It must be one of the supported Azure locations.
Location *string `json:"location,omitempty"`
@@ -1033,6 +823,9 @@ type Group struct {
// MarshalJSON is the custom marshaler for Group.
func (g Group) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
+ if g.Name != nil {
+ objectMap["name"] = g.Name
+ }
if g.Properties != nil {
objectMap["properties"] = g.Properties
}
@@ -1226,15 +1019,17 @@ func (page GroupListResultPage) Values() []Group {
}
// Creates a new instance of the GroupListResultPage type.
-func NewGroupListResultPage(getNextPage func(context.Context, GroupListResult) (GroupListResult, error)) GroupListResultPage {
- return GroupListResultPage{fn: getNextPage}
+func NewGroupListResultPage(cur GroupListResult, getNextPage func(context.Context, GroupListResult) (GroupListResult, error)) GroupListResultPage {
+ return GroupListResultPage{
+ fn: getNextPage,
+ glr: cur,
+ }
}
// GroupPatchable resource group information.
type GroupPatchable struct {
// Name - The name of the resource group.
- Name *string `json:"name,omitempty"`
- // Properties - The resource group properties.
+ Name *string `json:"name,omitempty"`
Properties *GroupProperties `json:"properties,omitempty"`
// ManagedBy - The ID of the resource that manages this resource group.
ManagedBy *string `json:"managedBy,omitempty"`
@@ -1268,24 +1063,10 @@ type GroupProperties struct {
// GroupsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type GroupsDeleteFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *GroupsDeleteFuture) Result(client GroupsClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.GroupsDeleteFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("resources.GroupsDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(GroupsClient) (autorest.Response, error)
}
// HTTPMessage HTTP message.
@@ -1302,8 +1083,6 @@ type Identity struct {
TenantID *string `json:"tenantId,omitempty"`
// Type - The identity type. Possible values include: 'SystemAssigned', 'UserAssigned', 'SystemAssignedUserAssigned', 'None'
Type ResourceIdentityType `json:"type,omitempty"`
- // UserAssignedIdentities - The list of user identities associated with the resource. 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]*IdentityUserAssignedIdentitiesValue `json:"userAssignedIdentities"`
}
// MarshalJSON is the custom marshaler for Identity.
@@ -1312,20 +1091,9 @@ func (i Identity) MarshalJSON() ([]byte, error) {
if i.Type != "" {
objectMap["type"] = i.Type
}
- if i.UserAssignedIdentities != nil {
- objectMap["userAssignedIdentities"] = i.UserAssignedIdentities
- }
return json.Marshal(objectMap)
}
-// IdentityUserAssignedIdentitiesValue ...
-type IdentityUserAssignedIdentitiesValue 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"`
-}
-
// ListResult list of resource groups.
type ListResult struct {
autorest.Response `json:"-"`
@@ -1487,8 +1255,11 @@ func (page ListResultPage) Values() []GenericResourceExpanded {
}
// Creates a new instance of the ListResultPage type.
-func NewListResultPage(getNextPage func(context.Context, ListResult) (ListResult, error)) ListResultPage {
- return ListResultPage{fn: getNextPage}
+func NewListResultPage(cur ListResult, getNextPage func(context.Context, ListResult) (ListResult, error)) ListResultPage {
+ return ListResultPage{
+ fn: getNextPage,
+ lr: cur,
+ }
}
// ManagementErrorWithDetails the detailed error message of resource management.
@@ -1511,26 +1282,13 @@ type MoveInfo struct {
TargetResourceGroup *string `json:"targetResourceGroup,omitempty"`
}
-// MoveResourcesFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+// MoveResourcesFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
type MoveResourcesFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *MoveResourcesFuture) Result(client Client) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.MoveResourcesFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("resources.MoveResourcesFuture")
- return
- }
- ar.Response = future.Response()
- return
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(Client) (autorest.Response, error)
}
// OnErrorDeployment deployment on error behavior.
@@ -1563,183 +1321,6 @@ func (oede OnErrorDeploymentExtended) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// Operation microsoft.Resources operation
-type Operation struct {
- // Name - Operation name: {provider}/{resource}/{operation}
- Name *string `json:"name,omitempty"`
- // Display - The object that represents the operation.
- Display *OperationDisplay `json:"display,omitempty"`
-}
-
-// OperationDisplay the object that represents the operation.
-type OperationDisplay struct {
- // Provider - Service provider: Microsoft.Resources
- Provider *string `json:"provider,omitempty"`
- // Resource - Resource on which the operation is performed: Profile, endpoint, etc.
- Resource *string `json:"resource,omitempty"`
- // Operation - Operation type: Read, write, delete, etc.
- Operation *string `json:"operation,omitempty"`
- // Description - Description of the operation.
- Description *string `json:"description,omitempty"`
-}
-
-// OperationListResult result of the request to list Microsoft.Resources operations. It contains a list of
-// operations and a URL link to get the next set of results.
-type OperationListResult struct {
- autorest.Response `json:"-"`
- // Value - List of Microsoft.Resources operations.
- Value *[]Operation `json:"value,omitempty"`
- // NextLink - URL to get the next set of operation list results if there are any.
- NextLink *string `json:"nextLink,omitempty"`
-}
-
-// OperationListResultIterator provides access to a complete listing of Operation values.
-type OperationListResultIterator struct {
- i int
- page OperationListResultPage
-}
-
-// 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 *OperationListResultIterator) NextWithContext(ctx context.Context) (err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultIterator.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 *OperationListResultIterator) Next() error {
- return iter.NextWithContext(context.Background())
-}
-
-// NotDone returns true if the enumeration should be started or is not yet complete.
-func (iter OperationListResultIterator) 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 OperationListResultIterator) Response() OperationListResult {
- 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 OperationListResultIterator) Value() Operation {
- if !iter.page.NotDone() {
- return Operation{}
- }
- return iter.page.Values()[iter.i]
-}
-
-// Creates a new instance of the OperationListResultIterator type.
-func NewOperationListResultIterator(page OperationListResultPage) OperationListResultIterator {
- return OperationListResultIterator{page: page}
-}
-
-// IsEmpty returns true if the ListResult contains no values.
-func (olr OperationListResult) IsEmpty() bool {
- return olr.Value == nil || len(*olr.Value) == 0
-}
-
-// hasNextLink returns true if the NextLink is not empty.
-func (olr OperationListResult) hasNextLink() bool {
- return olr.NextLink != nil && len(*olr.NextLink) != 0
-}
-
-// operationListResultPreparer prepares a request to retrieve the next set of results.
-// It returns nil if no more results exist.
-func (olr OperationListResult) operationListResultPreparer(ctx context.Context) (*http.Request, error) {
- if !olr.hasNextLink() {
- return nil, nil
- }
- return autorest.Prepare((&http.Request{}).WithContext(ctx),
- autorest.AsJSON(),
- autorest.AsGet(),
- autorest.WithBaseURL(to.String(olr.NextLink)))
-}
-
-// OperationListResultPage contains a page of Operation values.
-type OperationListResultPage struct {
- fn func(context.Context, OperationListResult) (OperationListResult, error)
- olr OperationListResult
-}
-
-// 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 *OperationListResultPage) NextWithContext(ctx context.Context) (err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultPage.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.olr)
- if err != nil {
- return err
- }
- page.olr = 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 *OperationListResultPage) Next() error {
- return page.NextWithContext(context.Background())
-}
-
-// NotDone returns true if the page enumeration should be started or is not yet complete.
-func (page OperationListResultPage) NotDone() bool {
- return !page.olr.IsEmpty()
-}
-
-// Response returns the raw server response from the last page request.
-func (page OperationListResultPage) Response() OperationListResult {
- return page.olr
-}
-
-// Values returns the slice of values for the current page or nil if there are no values.
-func (page OperationListResultPage) Values() []Operation {
- if page.olr.IsEmpty() {
- return nil
- }
- return *page.olr.Value
-}
-
-// Creates a new instance of the OperationListResultPage type.
-func NewOperationListResultPage(getNextPage func(context.Context, OperationListResult) (OperationListResult, error)) OperationListResultPage {
- return OperationListResultPage{fn: getNextPage}
-}
-
// ParametersLink entity representing the reference to the deployment parameters.
type ParametersLink struct {
// URI - The URI of the parameters file.
@@ -1769,10 +1350,8 @@ type Provider struct {
ID *string `json:"id,omitempty"`
// Namespace - The namespace of the resource provider.
Namespace *string `json:"namespace,omitempty"`
- // RegistrationState - READ-ONLY; The registration state of the resource provider.
+ // RegistrationState - READ-ONLY; The registration state of the provider.
RegistrationState *string `json:"registrationState,omitempty"`
- // RegistrationPolicy - READ-ONLY; The registration policy of the resource provider.
- RegistrationPolicy *string `json:"registrationPolicy,omitempty"`
// ResourceTypes - READ-ONLY; The collection of provider resource types.
ResourceTypes *[]ProviderResourceType `json:"resourceTypes,omitempty"`
}
@@ -1947,8 +1526,11 @@ func (page ProviderListResultPage) Values() []Provider {
}
// Creates a new instance of the ProviderListResultPage type.
-func NewProviderListResultPage(getNextPage func(context.Context, ProviderListResult) (ProviderListResult, error)) ProviderListResultPage {
- return ProviderListResultPage{fn: getNextPage}
+func NewProviderListResultPage(cur ProviderListResult, getNextPage func(context.Context, ProviderListResult) (ProviderListResult, error)) ProviderListResultPage {
+ return ProviderListResultPage{
+ fn: getNextPage,
+ plr: cur,
+ }
}
// ProviderOperationDisplayProperties resource provider operation's display properties.
@@ -1959,7 +1541,7 @@ type ProviderOperationDisplayProperties struct {
Provider *string `json:"provider,omitempty"`
// Resource - Operation resource.
Resource *string `json:"resource,omitempty"`
- // Operation - Resource provider operation.
+ // Operation - Operation.
Operation *string `json:"operation,omitempty"`
// Description - Operation description.
Description *string `json:"description,omitempty"`
@@ -1975,8 +1557,6 @@ type ProviderResourceType struct {
Aliases *[]AliasType `json:"aliases,omitempty"`
// APIVersions - The API version.
APIVersions *[]string `json:"apiVersions,omitempty"`
- // Capabilities - The additional capabilities offered by this resource type.
- Capabilities *string `json:"capabilities,omitempty"`
// Properties - The properties.
Properties map[string]*string `json:"properties"`
}
@@ -1996,16 +1576,13 @@ func (prt ProviderResourceType) MarshalJSON() ([]byte, error) {
if prt.APIVersions != nil {
objectMap["apiVersions"] = prt.APIVersions
}
- if prt.Capabilities != nil {
- objectMap["capabilities"] = prt.Capabilities
- }
if prt.Properties != nil {
objectMap["properties"] = prt.Properties
}
return json.Marshal(objectMap)
}
-// Resource specified resource.
+// Resource resource.
type Resource struct {
// ID - READ-ONLY; Resource ID
ID *string `json:"id,omitempty"`
@@ -2250,8 +1827,11 @@ func (page TagsListResultPage) Values() []TagDetails {
}
// Creates a new instance of the TagsListResultPage type.
-func NewTagsListResultPage(getNextPage func(context.Context, TagsListResult) (TagsListResult, error)) TagsListResultPage {
- return TagsListResultPage{fn: getNextPage}
+func NewTagsListResultPage(cur TagsListResult, getNextPage func(context.Context, TagsListResult) (TagsListResult, error)) TagsListResultPage {
+ return TagsListResultPage{
+ fn: getNextPage,
+ tlr: cur,
+ }
}
// TagValue tag information.
@@ -2307,79 +1887,25 @@ type TemplateLink struct {
// UpdateByIDFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type UpdateByIDFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *UpdateByIDFuture) Result(client Client) (gr GenericResource, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.UpdateByIDFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("resources.UpdateByIDFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if gr.Response.Response, err = future.GetResult(sender); err == nil && gr.Response.Response.StatusCode != http.StatusNoContent {
- gr, err = client.UpdateByIDResponder(gr.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.UpdateByIDFuture", "Result", gr.Response.Response, "Failure responding to request")
- }
- }
- return
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(Client) (GenericResource, error)
}
// UpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type UpdateFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *UpdateFuture) Result(client Client) (gr GenericResource, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.UpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("resources.UpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if gr.Response.Response, err = future.GetResult(sender); err == nil && gr.Response.Response.StatusCode != http.StatusNoContent {
- gr, err = client.UpdateResponder(gr.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.UpdateFuture", "Result", gr.Response.Response, "Failure responding to request")
- }
- }
- return
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(Client) (GenericResource, error)
}
// ValidateMoveResourcesFuture an abstraction for monitoring and retrieving the results of a long-running
// operation.
type ValidateMoveResourcesFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *ValidateMoveResourcesFuture) Result(client Client) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.ValidateMoveResourcesFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("resources.ValidateMoveResourcesFuture")
- return
- }
- ar.Response = future.Response()
- return
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(Client) (autorest.Response, error)
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-05-01/resources/providers.go b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-02-01/resources/providers.go
similarity index 98%
rename from vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-05-01/resources/providers.go
rename to vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-02-01/resources/providers.go
index 29f37f4205c..aef8eb1e787 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-05-01/resources/providers.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-02-01/resources/providers.go
@@ -73,6 +73,7 @@ func (client ProvidersClient) Get(ctx context.Context, resourceProviderNamespace
result, err = client.GetResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "resources.ProvidersClient", "Get", resp, "Failure responding to request")
+ return
}
return
@@ -85,7 +86,7 @@ func (client ProvidersClient) GetPreparer(ctx context.Context, resourceProviderN
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2019-05-01"
+ const APIVersion = "2018-02-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -153,9 +154,11 @@ func (client ProvidersClient) List(ctx context.Context, top *int32, expand strin
result.plr, err = client.ListResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "resources.ProvidersClient", "List", resp, "Failure responding to request")
+ return
}
if result.plr.hasNextLink() && result.plr.IsEmpty() {
err = result.NextWithContext(ctx)
+ return
}
return
@@ -167,7 +170,7 @@ func (client ProvidersClient) ListPreparer(ctx context.Context, top *int32, expa
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2019-05-01"
+ const APIVersion = "2018-02-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -271,6 +274,7 @@ func (client ProvidersClient) Register(ctx context.Context, resourceProviderName
result, err = client.RegisterResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "resources.ProvidersClient", "Register", resp, "Failure responding to request")
+ return
}
return
@@ -283,7 +287,7 @@ func (client ProvidersClient) RegisterPreparer(ctx context.Context, resourceProv
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2019-05-01"
+ const APIVersion = "2018-02-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -344,6 +348,7 @@ func (client ProvidersClient) Unregister(ctx context.Context, resourceProviderNa
result, err = client.UnregisterResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "resources.ProvidersClient", "Unregister", resp, "Failure responding to request")
+ return
}
return
@@ -356,7 +361,7 @@ func (client ProvidersClient) UnregisterPreparer(ctx context.Context, resourcePr
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2019-05-01"
+ const APIVersion = "2018-02-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-05-01/resources/resources.go b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-02-01/resources/resources.go
similarity index 87%
rename from vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-05-01/resources/resources.go
rename to vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-02-01/resources/resources.go
index 63e1d9ab565..7d1b368310d 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-05-01/resources/resources.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-02-01/resources/resources.go
@@ -86,6 +86,7 @@ func (client Client) CheckExistence(ctx context.Context, resourceGroupName strin
result, err = client.CheckExistenceResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "resources.Client", "CheckExistence", resp, "Failure responding to request")
+ return
}
return
@@ -164,6 +165,7 @@ func (client Client) CheckExistenceByID(ctx context.Context, resourceID string,
result, err = client.CheckExistenceByIDResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "resources.Client", "CheckExistenceByID", resp, "Failure responding to request")
+ return
}
return
@@ -243,7 +245,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", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "resources.Client", "CreateOrUpdate", nil, "Failure sending request")
return
}
@@ -283,7 +285,33 @@ func (client Client) CreateOrUpdateSender(req *http.Request) (future CreateOrUpd
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(client Client) (gr GenericResource, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.CreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("resources.CreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ gr.Response.Response, err = future.GetResult(sender)
+ if gr.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "resources.CreateOrUpdateFuture", "Result", nil, "received nil response and error")
+ }
+ if err == nil && gr.Response.Response.StatusCode != http.StatusNoContent {
+ gr, err = client.CreateOrUpdateResponder(gr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.CreateOrUpdateFuture", "Result", gr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+ }
return
}
@@ -332,7 +360,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", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "resources.Client", "CreateOrUpdateByID", nil, "Failure sending request")
return
}
@@ -367,7 +395,33 @@ func (client Client) CreateOrUpdateByIDSender(req *http.Request) (future CreateO
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(client Client) (gr GenericResource, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.CreateOrUpdateByIDFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("resources.CreateOrUpdateByIDFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ gr.Response.Response, err = future.GetResult(sender)
+ if gr.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "resources.CreateOrUpdateByIDFuture", "Result", nil, "received nil response and error")
+ }
+ if err == nil && gr.Response.Response.StatusCode != http.StatusNoContent {
+ gr, err = client.CreateOrUpdateByIDResponder(gr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.CreateOrUpdateByIDFuture", "Result", gr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+ }
return
}
@@ -419,7 +473,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", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "resources.Client", "Delete", nil, "Failure sending request")
return
}
@@ -457,7 +511,23 @@ func (client Client) DeleteSender(req *http.Request) (future DeleteFuture, err e
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(client Client) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.DeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("resources.DeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
return
}
@@ -497,7 +567,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", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "resources.Client", "DeleteByID", nil, "Failure sending request")
return
}
@@ -530,7 +600,23 @@ func (client Client) DeleteByIDSender(req *http.Request) (future DeleteByIDFutur
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(client Client) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.DeleteByIDFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("resources.DeleteByIDFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
return
}
@@ -589,6 +675,7 @@ func (client Client) Get(ctx context.Context, resourceGroupName string, resource
result, err = client.GetResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "resources.Client", "Get", resp, "Failure responding to request")
+ return
}
return
@@ -668,6 +755,7 @@ func (client Client) GetByID(ctx context.Context, resourceID string, APIVersion
result, err = client.GetByIDResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "resources.Client", "GetByID", resp, "Failure responding to request")
+ return
}
return
@@ -711,19 +799,8 @@ func (client Client) GetByIDResponder(resp *http.Response) (result GenericResour
// List get all the resources in a subscription.
// Parameters:
-// filter - the filter to apply on the operation.
The properties you can use for eq (equals) or ne (not
-// equals) are: location, resourceType, name, resourceGroup, identity, identity/principalId, plan,
-// plan/publisher, plan/product, plan/name, plan/version, and plan/promotionCode.
For example, to filter
-// by a resource type, use: $filter=resourceType eq 'Microsoft.Network/virtualNetworks'
You can use
-// substringof(value, property) in the filter. The properties you can use for substring are: name and
-// resourceGroup.
For example, to get all resources with 'demo' anywhere in the name, use:
-// $filter=substringof('demo', name)
You can link more than one substringof together by adding and/or
-// operators.
You can filter by tag names and values. For example, to filter for a tag name and value,
-// use $filter=tagName eq 'tag1' and tagValue eq 'Value1'
You can use some properties together when
-// filtering. The combinations you can use are: substringof and/or resourceType, plan and plan/publisher and
-// plan/name, identity and identity/principalId.
-// expand - comma-separated list of additional properties to be included in the response. Valid values include
-// `createdTime`, `changedTime` and `provisioningState`. For example, `$expand=createdTime,changedTime`.
+// filter - the filter to apply on the operation.
+// expand - the $expand query parameter.
// top - the number of results to return. If null is passed, returns all resource groups.
func (client Client) List(ctx context.Context, filter string, expand string, top *int32) (result ListResultPage, err error) {
if tracing.IsEnabled() {
@@ -753,9 +830,11 @@ func (client Client) List(ctx context.Context, filter string, expand string, top
result.lr, err = client.ListResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "resources.Client", "List", resp, "Failure responding to request")
+ return
}
if result.lr.hasNextLink() && result.lr.IsEmpty() {
err = result.NextWithContext(ctx)
+ return
}
return
@@ -767,7 +846,7 @@ func (client Client) ListPreparer(ctx context.Context, filter string, expand str
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2019-05-01"
+ const APIVersion = "2018-02-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -847,17 +926,7 @@ func (client Client) ListComplete(ctx context.Context, filter string, expand str
// ListByResourceGroup get all the resources for a resource group.
// Parameters:
// resourceGroupName - the resource group with the resources to get.
-// filter - the filter to apply on the operation.
The properties you can use for eq (equals) or ne (not
-// equals) are: location, resourceType, name, resourceGroup, identity, identity/principalId, plan,
-// plan/publisher, plan/product, plan/name, plan/version, and plan/promotionCode.
For example, to filter
-// by a resource type, use: $filter=resourceType eq 'Microsoft.Network/virtualNetworks'
You can use
-// substringof(value, property) in the filter. The properties you can use for substring are: name and
-// resourceGroup.
For example, to get all resources with 'demo' anywhere in the name, use:
-// $filter=substringof('demo', name)
You can link more than one substringof together by adding and/or
-// operators.
You can filter by tag names and values. For example, to filter for a tag name and value,
-// use $filter=tagName eq 'tag1' and tagValue eq 'Value1'
You can use some properties together when
-// filtering. The combinations you can use are: substringof and/or resourceType, plan and plan/publisher and
-// plan/name, identity and identity/principalId.
+// filter - the filter to apply on the operation.
// expand - comma-separated list of additional properties to be included in the response. Valid values include
// `createdTime`, `changedTime` and `provisioningState`. For example, `$expand=createdTime,changedTime`.
// top - the number of results to return. If null is passed, returns all resources.
@@ -897,9 +966,11 @@ func (client Client) ListByResourceGroup(ctx context.Context, resourceGroupName
result.lr, err = client.ListByResourceGroupResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "resources.Client", "ListByResourceGroup", resp, "Failure responding to request")
+ return
}
if result.lr.hasNextLink() && result.lr.IsEmpty() {
err = result.NextWithContext(ctx)
+ return
}
return
@@ -912,7 +983,7 @@ func (client Client) ListByResourceGroupPreparer(ctx context.Context, resourceGr
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2019-05-01"
+ const APIVersion = "2018-02-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -1022,7 +1093,7 @@ func (client Client) MoveResources(ctx context.Context, sourceResourceGroupName
result, err = client.MoveResourcesSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "resources.Client", "MoveResources", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "resources.Client", "MoveResources", nil, "Failure sending request")
return
}
@@ -1036,7 +1107,7 @@ func (client Client) MoveResourcesPreparer(ctx context.Context, sourceResourceGr
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2019-05-01"
+ const APIVersion = "2018-02-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -1059,7 +1130,23 @@ func (client Client) MoveResourcesSender(req *http.Request) (future MoveResource
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(client Client) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.MoveResourcesFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("resources.MoveResourcesFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
return
}
@@ -1110,7 +1197,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", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "resources.Client", "Update", nil, "Failure sending request")
return
}
@@ -1150,7 +1237,33 @@ func (client Client) UpdateSender(req *http.Request) (future UpdateFuture, err e
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(client Client) (gr GenericResource, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.UpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("resources.UpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ gr.Response.Response, err = future.GetResult(sender)
+ if gr.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "resources.UpdateFuture", "Result", nil, "received nil response and error")
+ }
+ if err == nil && gr.Response.Response.StatusCode != http.StatusNoContent {
+ gr, err = client.UpdateResponder(gr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.UpdateFuture", "Result", gr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+ }
return
}
@@ -1192,7 +1305,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", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "resources.Client", "UpdateByID", nil, "Failure sending request")
return
}
@@ -1227,7 +1340,33 @@ func (client Client) UpdateByIDSender(req *http.Request) (future UpdateByIDFutur
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(client Client) (gr GenericResource, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.UpdateByIDFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("resources.UpdateByIDFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ gr.Response.Response, err = future.GetResult(sender)
+ if gr.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "resources.UpdateByIDFuture", "Result", nil, "received nil response and error")
+ }
+ if err == nil && gr.Response.Response.StatusCode != http.StatusNoContent {
+ gr, err = client.UpdateByIDResponder(gr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.UpdateByIDFuture", "Result", gr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+ }
return
}
@@ -1278,7 +1417,7 @@ func (client Client) ValidateMoveResources(ctx context.Context, sourceResourceGr
result, err = client.ValidateMoveResourcesSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "resources.Client", "ValidateMoveResources", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "resources.Client", "ValidateMoveResources", nil, "Failure sending request")
return
}
@@ -1292,7 +1431,7 @@ func (client Client) ValidateMoveResourcesPreparer(ctx context.Context, sourceRe
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2019-05-01"
+ const APIVersion = "2018-02-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -1315,7 +1454,23 @@ func (client Client) ValidateMoveResourcesSender(req *http.Request) (future Vali
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(client Client) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.ValidateMoveResourcesFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("resources.ValidateMoveResourcesFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-05-01/resources/tags.go b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-02-01/resources/tags.go
similarity index 98%
rename from vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-05-01/resources/tags.go
rename to vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-02-01/resources/tags.go
index cfea53cd68a..63984456f96 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-05-01/resources/tags.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-02-01/resources/tags.go
@@ -72,6 +72,7 @@ func (client TagsClient) CreateOrUpdate(ctx context.Context, tagName string) (re
result, err = client.CreateOrUpdateResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "resources.TagsClient", "CreateOrUpdate", resp, "Failure responding to request")
+ return
}
return
@@ -84,7 +85,7 @@ func (client TagsClient) CreateOrUpdatePreparer(ctx context.Context, tagName str
"tagName": autorest.Encode("path", tagName),
}
- const APIVersion = "2019-05-01"
+ const APIVersion = "2018-02-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -146,6 +147,7 @@ func (client TagsClient) CreateOrUpdateValue(ctx context.Context, tagName string
result, err = client.CreateOrUpdateValueResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "resources.TagsClient", "CreateOrUpdateValue", resp, "Failure responding to request")
+ return
}
return
@@ -159,7 +161,7 @@ func (client TagsClient) CreateOrUpdateValuePreparer(ctx context.Context, tagNam
"tagValue": autorest.Encode("path", tagValue),
}
- const APIVersion = "2019-05-01"
+ const APIVersion = "2018-02-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -220,6 +222,7 @@ func (client TagsClient) Delete(ctx context.Context, tagName string) (result aut
result, err = client.DeleteResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "resources.TagsClient", "Delete", resp, "Failure responding to request")
+ return
}
return
@@ -232,7 +235,7 @@ func (client TagsClient) DeletePreparer(ctx context.Context, tagName string) (*h
"tagName": autorest.Encode("path", tagName),
}
- const APIVersion = "2019-05-01"
+ const APIVersion = "2018-02-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -293,6 +296,7 @@ func (client TagsClient) DeleteValue(ctx context.Context, tagName string, tagVal
result, err = client.DeleteValueResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "resources.TagsClient", "DeleteValue", resp, "Failure responding to request")
+ return
}
return
@@ -306,7 +310,7 @@ func (client TagsClient) DeleteValuePreparer(ctx context.Context, tagName string
"tagValue": autorest.Encode("path", tagValue),
}
- const APIVersion = "2019-05-01"
+ const APIVersion = "2018-02-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -365,9 +369,11 @@ func (client TagsClient) List(ctx context.Context) (result TagsListResultPage, e
result.tlr, err = client.ListResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "resources.TagsClient", "List", resp, "Failure responding to request")
+ return
}
if result.tlr.hasNextLink() && result.tlr.IsEmpty() {
err = result.NextWithContext(ctx)
+ return
}
return
@@ -379,7 +385,7 @@ func (client TagsClient) ListPreparer(ctx context.Context) (*http.Request, error
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2019-05-01"
+ const APIVersion = "2018-02-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-05-01/resources/version.go b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-02-01/resources/version.go
similarity index 94%
rename from vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-05-01/resources/version.go
rename to vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-02-01/resources/version.go
index 6c1215c665d..5aa7dbd63f7 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-05-01/resources/version.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-02-01/resources/version.go
@@ -21,7 +21,7 @@ import "github.com/Azure/azure-sdk-for-go/version"
// UserAgent returns the UserAgent string to use when sending http.Requests.
func UserAgent() string {
- return "Azure-SDK-For-Go/" + Version() + " resources/2019-05-01"
+ return "Azure-SDK-For-Go/" + Version() + " resources/2018-02-01"
}
// Version returns the semantic version (see http://semver.org) of the client.
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-05-01/resources/CHANGELOG.md b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-05-01/resources/CHANGELOG.md
new file mode 100644
index 00000000000..590739afa8a
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-05-01/resources/CHANGELOG.md
@@ -0,0 +1,5 @@
+Generated from https://github.com/Azure/azure-rest-api-specs/tree/3c764635e7d442b3e74caf593029fcd440b3ef82//specification/resources/resource-manager/readme.md tag: `package-resources-2018-05`
+
+Code generator @microsoft.azure/autorest.go@2.1.171
+
+
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-05-01/resources/deploymentoperations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-05-01/resources/deploymentoperations.go
index fda4ba61d18..6cec21f1f50 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-05-01/resources/deploymentoperations.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-05-01/resources/deploymentoperations.go
@@ -87,6 +87,7 @@ func (client DeploymentOperationsClient) Get(ctx context.Context, resourceGroupN
result, err = client.GetResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "resources.DeploymentOperationsClient", "Get", resp, "Failure responding to request")
+ return
}
return
@@ -171,6 +172,7 @@ func (client DeploymentOperationsClient) GetAtSubscriptionScope(ctx context.Cont
result, err = client.GetAtSubscriptionScopeResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "resources.DeploymentOperationsClient", "GetAtSubscriptionScope", resp, "Failure responding to request")
+ return
}
return
@@ -260,9 +262,11 @@ func (client DeploymentOperationsClient) List(ctx context.Context, resourceGroup
result.dolr, err = client.ListResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "resources.DeploymentOperationsClient", "List", resp, "Failure responding to request")
+ return
}
if result.dolr.hasNextLink() && result.dolr.IsEmpty() {
err = result.NextWithContext(ctx)
+ return
}
return
@@ -387,9 +391,11 @@ func (client DeploymentOperationsClient) ListAtSubscriptionScope(ctx context.Con
result.dolr, err = client.ListAtSubscriptionScopeResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "resources.DeploymentOperationsClient", "ListAtSubscriptionScope", resp, "Failure responding to request")
+ return
}
if result.dolr.hasNextLink() && result.dolr.IsEmpty() {
err = result.NextWithContext(ctx)
+ return
}
return
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-05-01/resources/deployments.go b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-05-01/resources/deployments.go
index da9b0ceaea0..539f872df4d 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-05-01/resources/deployments.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-05-01/resources/deployments.go
@@ -72,6 +72,7 @@ func (client DeploymentsClient) CalculateTemplateHash(ctx context.Context, templ
result, err = client.CalculateTemplateHashResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "CalculateTemplateHash", resp, "Failure responding to request")
+ return
}
return
@@ -157,6 +158,7 @@ func (client DeploymentsClient) Cancel(ctx context.Context, resourceGroupName st
result, err = client.CancelResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "Cancel", resp, "Failure responding to request")
+ return
}
return
@@ -240,6 +242,7 @@ func (client DeploymentsClient) CancelAtSubscriptionScope(ctx context.Context, d
result, err = client.CancelAtSubscriptionScopeResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "CancelAtSubscriptionScope", resp, "Failure responding to request")
+ return
}
return
@@ -326,6 +329,7 @@ func (client DeploymentsClient) CheckExistence(ctx context.Context, resourceGrou
result, err = client.CheckExistenceResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "CheckExistence", resp, "Failure responding to request")
+ return
}
return
@@ -407,6 +411,7 @@ func (client DeploymentsClient) CheckExistenceAtSubscriptionScope(ctx context.Co
result, err = client.CheckExistenceAtSubscriptionScopeResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "CheckExistenceAtSubscriptionScope", resp, "Failure responding to request")
+ return
}
return
@@ -493,7 +498,7 @@ func (client DeploymentsClient) CreateOrUpdate(ctx context.Context, resourceGrou
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "CreateOrUpdate", nil, "Failure sending request")
return
}
@@ -531,7 +536,33 @@ func (client DeploymentsClient) CreateOrUpdateSender(req *http.Request) (future
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(client DeploymentsClient) (de DeploymentExtended, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.DeploymentsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("resources.DeploymentsCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ de.Response.Response, err = future.GetResult(sender)
+ if de.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "resources.DeploymentsCreateOrUpdateFuture", "Result", nil, "received nil response and error")
+ }
+ if err == nil && de.Response.Response.StatusCode != http.StatusNoContent {
+ de, err = client.CreateOrUpdateResponder(de.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.DeploymentsCreateOrUpdateFuture", "Result", de.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+ }
return
}
@@ -586,7 +617,7 @@ func (client DeploymentsClient) CreateOrUpdateAtSubscriptionScope(ctx context.Co
result, err = client.CreateOrUpdateAtSubscriptionScopeSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "CreateOrUpdateAtSubscriptionScope", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "CreateOrUpdateAtSubscriptionScope", nil, "Failure sending request")
return
}
@@ -623,7 +654,33 @@ func (client DeploymentsClient) CreateOrUpdateAtSubscriptionScopeSender(req *htt
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(client DeploymentsClient) (de DeploymentExtended, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.DeploymentsCreateOrUpdateAtSubscriptionScopeFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("resources.DeploymentsCreateOrUpdateAtSubscriptionScopeFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ de.Response.Response, err = future.GetResult(sender)
+ if de.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "resources.DeploymentsCreateOrUpdateAtSubscriptionScopeFuture", "Result", nil, "received nil response and error")
+ }
+ if err == nil && de.Response.Response.StatusCode != http.StatusNoContent {
+ de, err = client.CreateOrUpdateAtSubscriptionScopeResponder(de.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.DeploymentsCreateOrUpdateAtSubscriptionScopeFuture", "Result", de.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+ }
return
}
@@ -681,7 +738,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", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "Delete", nil, "Failure sending request")
return
}
@@ -717,7 +774,23 @@ func (client DeploymentsClient) DeleteSender(req *http.Request) (future Deployme
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(client DeploymentsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.DeploymentsDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("resources.DeploymentsDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
return
}
@@ -767,7 +840,7 @@ func (client DeploymentsClient) DeleteAtSubscriptionScope(ctx context.Context, d
result, err = client.DeleteAtSubscriptionScopeSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "DeleteAtSubscriptionScope", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "DeleteAtSubscriptionScope", nil, "Failure sending request")
return
}
@@ -802,7 +875,23 @@ func (client DeploymentsClient) DeleteAtSubscriptionScopeSender(req *http.Reques
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(client DeploymentsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.DeploymentsDeleteAtSubscriptionScopeFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("resources.DeploymentsDeleteAtSubscriptionScopeFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
return
}
@@ -860,6 +949,7 @@ func (client DeploymentsClient) ExportTemplate(ctx context.Context, resourceGrou
result, err = client.ExportTemplateResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "ExportTemplate", resp, "Failure responding to request")
+ return
}
return
@@ -942,6 +1032,7 @@ func (client DeploymentsClient) ExportTemplateAtSubscriptionScope(ctx context.Co
result, err = client.ExportTemplateAtSubscriptionScopeResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "ExportTemplateAtSubscriptionScope", resp, "Failure responding to request")
+ return
}
return
@@ -1028,6 +1119,7 @@ func (client DeploymentsClient) Get(ctx context.Context, resourceGroupName strin
result, err = client.GetResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "Get", resp, "Failure responding to request")
+ return
}
return
@@ -1110,6 +1202,7 @@ func (client DeploymentsClient) GetAtSubscriptionScope(ctx context.Context, depl
result, err = client.GetAtSubscriptionScopeResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "GetAtSubscriptionScope", resp, "Failure responding to request")
+ return
}
return
@@ -1186,9 +1279,11 @@ func (client DeploymentsClient) ListAtSubscriptionScope(ctx context.Context, fil
result.dlr, err = client.ListAtSubscriptionScopeResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "ListAtSubscriptionScope", resp, "Failure responding to request")
+ return
}
if result.dlr.hasNextLink() && result.dlr.IsEmpty() {
err = result.NextWithContext(ctx)
+ return
}
return
@@ -1317,9 +1412,11 @@ func (client DeploymentsClient) ListByResourceGroup(ctx context.Context, resourc
result.dlr, err = client.ListByResourceGroupResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "ListByResourceGroup", resp, "Failure responding to request")
+ return
}
if result.dlr.hasNextLink() && result.dlr.IsEmpty() {
err = result.NextWithContext(ctx)
+ return
}
return
@@ -1459,6 +1556,7 @@ func (client DeploymentsClient) Validate(ctx context.Context, resourceGroupName
result, err = client.ValidateResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "Validate", resp, "Failure responding to request")
+ return
}
return
@@ -1552,6 +1650,7 @@ func (client DeploymentsClient) ValidateAtSubscriptionScope(ctx context.Context,
result, err = client.ValidateAtSubscriptionScopeResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "ValidateAtSubscriptionScope", resp, "Failure responding to request")
+ return
}
return
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-05-01/resources/groups.go b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-05-01/resources/groups.go
index cfe1ba2b98b..01da1781c2e 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-05-01/resources/groups.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-05-01/resources/groups.go
@@ -80,6 +80,7 @@ func (client GroupsClient) CheckExistence(ctx context.Context, resourceGroupName
result, err = client.CheckExistenceResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "resources.GroupsClient", "CheckExistence", resp, "Failure responding to request")
+ return
}
return
@@ -165,6 +166,7 @@ func (client GroupsClient) CreateOrUpdate(ctx context.Context, resourceGroupName
result, err = client.CreateOrUpdateResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "resources.GroupsClient", "CreateOrUpdate", resp, "Failure responding to request")
+ return
}
return
@@ -244,7 +246,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", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "resources.GroupsClient", "Delete", nil, "Failure sending request")
return
}
@@ -279,7 +281,23 @@ func (client GroupsClient) DeleteSender(req *http.Request) (future GroupsDeleteF
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(client GroupsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.GroupsDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("resources.GroupsDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
return
}
@@ -333,6 +351,7 @@ func (client GroupsClient) ExportTemplate(ctx context.Context, resourceGroupName
result, err = client.ExportTemplateResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "resources.GroupsClient", "ExportTemplate", resp, "Failure responding to request")
+ return
}
return
@@ -416,6 +435,7 @@ func (client GroupsClient) Get(ctx context.Context, resourceGroupName string) (r
result, err = client.GetResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "resources.GroupsClient", "Get", resp, "Failure responding to request")
+ return
}
return
@@ -492,9 +512,11 @@ func (client GroupsClient) List(ctx context.Context, filter string, top *int32)
result.glr, err = client.ListResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "resources.GroupsClient", "List", resp, "Failure responding to request")
+ return
}
if result.glr.hasNextLink() && result.glr.IsEmpty() {
err = result.NextWithContext(ctx)
+ return
}
return
@@ -620,6 +642,7 @@ func (client GroupsClient) Update(ctx context.Context, resourceGroupName string,
result, err = client.UpdateResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "resources.GroupsClient", "Update", resp, "Failure responding to request")
+ return
}
return
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-05-01/resources/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-05-01/resources/models.go
index ccb80bd2469..4425d95a7df 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-05-01/resources/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-05-01/resources/models.go
@@ -65,58 +65,19 @@ type CloudError struct {
// CreateOrUpdateByIDFuture an abstraction for monitoring and retrieving the results of a long-running
// operation.
type CreateOrUpdateByIDFuture struct {
- azure.Future
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(Client) (GenericResource, error)
}
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *CreateOrUpdateByIDFuture) Result(client Client) (gr GenericResource, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.CreateOrUpdateByIDFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("resources.CreateOrUpdateByIDFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if gr.Response.Response, err = future.GetResult(sender); err == nil && gr.Response.Response.StatusCode != http.StatusNoContent {
- gr, err = client.CreateOrUpdateByIDResponder(gr.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.CreateOrUpdateByIDFuture", "Result", gr.Response.Response, "Failure responding to request")
- }
- }
- return
-}
-
-// CreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+// CreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
type CreateOrUpdateFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *CreateOrUpdateFuture) Result(client Client) (gr GenericResource, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.CreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("resources.CreateOrUpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if gr.Response.Response, err = future.GetResult(sender); err == nil && gr.Response.Response.StatusCode != http.StatusNoContent {
- gr, err = client.CreateOrUpdateResponder(gr.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.CreateOrUpdateFuture", "Result", gr.Response.Response, "Failure responding to request")
- }
- }
- return
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(Client) (GenericResource, error)
}
// DebugSetting ...
@@ -127,46 +88,18 @@ type DebugSetting struct {
// DeleteByIDFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type DeleteByIDFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *DeleteByIDFuture) Result(client Client) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeleteByIDFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("resources.DeleteByIDFuture")
- return
- }
- ar.Response = future.Response()
- return
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(Client) (autorest.Response, error)
}
// DeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type DeleteFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *DeleteFuture) Result(client Client) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeleteFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("resources.DeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(Client) (autorest.Response, error)
}
// Dependency deployment dependency information.
@@ -390,8 +323,11 @@ func (page DeploymentListResultPage) Values() []DeploymentExtended {
}
// Creates a new instance of the DeploymentListResultPage type.
-func NewDeploymentListResultPage(getNextPage func(context.Context, DeploymentListResult) (DeploymentListResult, error)) DeploymentListResultPage {
- return DeploymentListResultPage{fn: getNextPage}
+func NewDeploymentListResultPage(cur DeploymentListResult, getNextPage func(context.Context, DeploymentListResult) (DeploymentListResult, error)) DeploymentListResultPage {
+ return DeploymentListResultPage{
+ fn: getNextPage,
+ dlr: cur,
+ }
}
// DeploymentOperation deployment operation information.
@@ -452,7 +388,8 @@ func (dolr DeploymentOperationsListResult) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// DeploymentOperationsListResultIterator provides access to a complete listing of DeploymentOperation values.
+// DeploymentOperationsListResultIterator provides access to a complete listing of DeploymentOperation
+// values.
type DeploymentOperationsListResultIterator struct {
i int
page DeploymentOperationsListResultPage
@@ -595,8 +532,11 @@ func (page DeploymentOperationsListResultPage) Values() []DeploymentOperation {
}
// Creates a new instance of the DeploymentOperationsListResultPage type.
-func NewDeploymentOperationsListResultPage(getNextPage func(context.Context, DeploymentOperationsListResult) (DeploymentOperationsListResult, error)) DeploymentOperationsListResultPage {
- return DeploymentOperationsListResultPage{fn: getNextPage}
+func NewDeploymentOperationsListResultPage(cur DeploymentOperationsListResult, getNextPage func(context.Context, DeploymentOperationsListResult) (DeploymentOperationsListResult, error)) DeploymentOperationsListResultPage {
+ return DeploymentOperationsListResultPage{
+ fn: getNextPage,
+ dolr: cur,
+ }
}
// DeploymentProperties deployment properties.
@@ -683,108 +623,40 @@ func (dpe DeploymentPropertiesExtended) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// DeploymentsCreateOrUpdateAtSubscriptionScopeFuture an abstraction for monitoring and retrieving the results
-// of a long-running operation.
+// DeploymentsCreateOrUpdateAtSubscriptionScopeFuture an abstraction for monitoring and retrieving the
+// results of a long-running operation.
type DeploymentsCreateOrUpdateAtSubscriptionScopeFuture struct {
- azure.Future
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(DeploymentsClient) (DeploymentExtended, error)
}
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *DeploymentsCreateOrUpdateAtSubscriptionScopeFuture) Result(client DeploymentsClient) (de DeploymentExtended, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeploymentsCreateOrUpdateAtSubscriptionScopeFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("resources.DeploymentsCreateOrUpdateAtSubscriptionScopeFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if de.Response.Response, err = future.GetResult(sender); err == nil && de.Response.Response.StatusCode != http.StatusNoContent {
- de, err = client.CreateOrUpdateAtSubscriptionScopeResponder(de.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeploymentsCreateOrUpdateAtSubscriptionScopeFuture", "Result", de.Response.Response, "Failure responding to request")
- }
- }
- return
-}
-
-// DeploymentsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
+// DeploymentsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
type DeploymentsCreateOrUpdateFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *DeploymentsCreateOrUpdateFuture) Result(client DeploymentsClient) (de DeploymentExtended, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeploymentsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("resources.DeploymentsCreateOrUpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if de.Response.Response, err = future.GetResult(sender); err == nil && de.Response.Response.StatusCode != http.StatusNoContent {
- de, err = client.CreateOrUpdateResponder(de.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeploymentsCreateOrUpdateFuture", "Result", de.Response.Response, "Failure responding to request")
- }
- }
- return
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(DeploymentsClient) (DeploymentExtended, error)
}
// DeploymentsDeleteAtSubscriptionScopeFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type DeploymentsDeleteAtSubscriptionScopeFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *DeploymentsDeleteAtSubscriptionScopeFuture) Result(client DeploymentsClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeploymentsDeleteAtSubscriptionScopeFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("resources.DeploymentsDeleteAtSubscriptionScopeFuture")
- return
- }
- ar.Response = future.Response()
- return
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(DeploymentsClient) (autorest.Response, error)
}
// DeploymentsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
// operation.
type DeploymentsDeleteFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *DeploymentsDeleteFuture) Result(client DeploymentsClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeploymentsDeleteFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("resources.DeploymentsDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(DeploymentsClient) (autorest.Response, error)
}
// DeploymentValidateResult information from validate template deployment response.
@@ -804,7 +676,8 @@ type ErrorAdditionalInfo struct {
Info interface{} `json:"info,omitempty"`
}
-// ErrorResponse the resource management error response.
+// ErrorResponse common error response for all Azure Resource Manager APIs to return error details for
+// failed operations. (This also follows the OData error response format.)
type ErrorResponse struct {
// Code - READ-ONLY; The error code.
Code *string `json:"code,omitempty"`
@@ -1169,8 +1042,11 @@ func (page GroupListResultPage) Values() []Group {
}
// Creates a new instance of the GroupListResultPage type.
-func NewGroupListResultPage(getNextPage func(context.Context, GroupListResult) (GroupListResult, error)) GroupListResultPage {
- return GroupListResultPage{fn: getNextPage}
+func NewGroupListResultPage(cur GroupListResult, getNextPage func(context.Context, GroupListResult) (GroupListResult, error)) GroupListResultPage {
+ return GroupListResultPage{
+ fn: getNextPage,
+ glr: cur,
+ }
}
// GroupPatchable resource group information.
@@ -1210,24 +1086,10 @@ type GroupProperties struct {
// GroupsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type GroupsDeleteFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *GroupsDeleteFuture) Result(client GroupsClient) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.GroupsDeleteFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("resources.GroupsDeleteFuture")
- return
- }
- ar.Response = future.Response()
- return
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(GroupsClient) (autorest.Response, error)
}
// HTTPMessage HTTP message.
@@ -1429,8 +1291,11 @@ func (page ListResultPage) Values() []GenericResourceExpanded {
}
// Creates a new instance of the ListResultPage type.
-func NewListResultPage(getNextPage func(context.Context, ListResult) (ListResult, error)) ListResultPage {
- return ListResultPage{fn: getNextPage}
+func NewListResultPage(cur ListResult, getNextPage func(context.Context, ListResult) (ListResult, error)) ListResultPage {
+ return ListResultPage{
+ fn: getNextPage,
+ lr: cur,
+ }
}
// ManagementErrorWithDetails the detailed error message of resource management.
@@ -1453,26 +1318,13 @@ type MoveInfo struct {
TargetResourceGroup *string `json:"targetResourceGroup,omitempty"`
}
-// MoveResourcesFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+// MoveResourcesFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
type MoveResourcesFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *MoveResourcesFuture) Result(client Client) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.MoveResourcesFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("resources.MoveResourcesFuture")
- return
- }
- ar.Response = future.Response()
- return
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(Client) (autorest.Response, error)
}
// OnErrorDeployment deployment on error behavior.
@@ -1678,8 +1530,11 @@ func (page OperationListResultPage) Values() []Operation {
}
// Creates a new instance of the OperationListResultPage type.
-func NewOperationListResultPage(getNextPage func(context.Context, OperationListResult) (OperationListResult, error)) OperationListResultPage {
- return OperationListResultPage{fn: getNextPage}
+func NewOperationListResultPage(cur OperationListResult, getNextPage func(context.Context, OperationListResult) (OperationListResult, error)) OperationListResultPage {
+ return OperationListResultPage{
+ fn: getNextPage,
+ olr: cur,
+ }
}
// ParametersLink entity representing the reference to the deployment parameters.
@@ -1887,8 +1742,11 @@ func (page ProviderListResultPage) Values() []Provider {
}
// Creates a new instance of the ProviderListResultPage type.
-func NewProviderListResultPage(getNextPage func(context.Context, ProviderListResult) (ProviderListResult, error)) ProviderListResultPage {
- return ProviderListResultPage{fn: getNextPage}
+func NewProviderListResultPage(cur ProviderListResult, getNextPage func(context.Context, ProviderListResult) (ProviderListResult, error)) ProviderListResultPage {
+ return ProviderListResultPage{
+ fn: getNextPage,
+ plr: cur,
+ }
}
// ProviderOperationDisplayProperties resource provider operation's display properties.
@@ -2185,8 +2043,11 @@ func (page TagsListResultPage) Values() []TagDetails {
}
// Creates a new instance of the TagsListResultPage type.
-func NewTagsListResultPage(getNextPage func(context.Context, TagsListResult) (TagsListResult, error)) TagsListResultPage {
- return TagsListResultPage{fn: getNextPage}
+func NewTagsListResultPage(cur TagsListResult, getNextPage func(context.Context, TagsListResult) (TagsListResult, error)) TagsListResultPage {
+ return TagsListResultPage{
+ fn: getNextPage,
+ tlr: cur,
+ }
}
// TagValue tag information.
@@ -2242,79 +2103,25 @@ type TemplateLink struct {
// UpdateByIDFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type UpdateByIDFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *UpdateByIDFuture) Result(client Client) (gr GenericResource, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.UpdateByIDFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("resources.UpdateByIDFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if gr.Response.Response, err = future.GetResult(sender); err == nil && gr.Response.Response.StatusCode != http.StatusNoContent {
- gr, err = client.UpdateByIDResponder(gr.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.UpdateByIDFuture", "Result", gr.Response.Response, "Failure responding to request")
- }
- }
- return
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(Client) (GenericResource, error)
}
// UpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
type UpdateFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *UpdateFuture) Result(client Client) (gr GenericResource, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.UpdateFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("resources.UpdateFuture")
- return
- }
- sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if gr.Response.Response, err = future.GetResult(sender); err == nil && gr.Response.Response.StatusCode != http.StatusNoContent {
- gr, err = client.UpdateResponder(gr.Response.Response)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.UpdateFuture", "Result", gr.Response.Response, "Failure responding to request")
- }
- }
- return
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(Client) (GenericResource, error)
}
// ValidateMoveResourcesFuture an abstraction for monitoring and retrieving the results of a long-running
// operation.
type ValidateMoveResourcesFuture struct {
- azure.Future
-}
-
-// Result returns the result of the asynchronous operation.
-// If the operation has not completed it will return an error.
-func (future *ValidateMoveResourcesFuture) Result(client Client) (ar autorest.Response, err error) {
- var done bool
- done, err = future.DoneWithContext(context.Background(), client)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.ValidateMoveResourcesFuture", "Result", future.Response(), "Polling failure")
- return
- }
- if !done {
- err = azure.NewAsyncOpIncompleteError("resources.ValidateMoveResourcesFuture")
- return
- }
- ar.Response = future.Response()
- return
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(Client) (autorest.Response, error)
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-05-01/resources/operations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-05-01/resources/operations.go
index 4a58f5079d9..e884563bd34 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-05-01/resources/operations.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-05-01/resources/operations.go
@@ -70,9 +70,11 @@ func (client OperationsClient) List(ctx context.Context) (result OperationListRe
result.olr, err = client.ListResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "resources.OperationsClient", "List", resp, "Failure responding to request")
+ return
}
if result.olr.hasNextLink() && result.olr.IsEmpty() {
err = result.NextWithContext(ctx)
+ return
}
return
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-05-01/resources/providers.go b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-05-01/resources/providers.go
index 049b14a6795..26fb1b1f554 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-05-01/resources/providers.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-05-01/resources/providers.go
@@ -73,6 +73,7 @@ func (client ProvidersClient) Get(ctx context.Context, resourceProviderNamespace
result, err = client.GetResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "resources.ProvidersClient", "Get", resp, "Failure responding to request")
+ return
}
return
@@ -153,9 +154,11 @@ func (client ProvidersClient) List(ctx context.Context, top *int32, expand strin
result.plr, err = client.ListResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "resources.ProvidersClient", "List", resp, "Failure responding to request")
+ return
}
if result.plr.hasNextLink() && result.plr.IsEmpty() {
err = result.NextWithContext(ctx)
+ return
}
return
@@ -271,6 +274,7 @@ func (client ProvidersClient) Register(ctx context.Context, resourceProviderName
result, err = client.RegisterResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "resources.ProvidersClient", "Register", resp, "Failure responding to request")
+ return
}
return
@@ -344,6 +348,7 @@ func (client ProvidersClient) Unregister(ctx context.Context, resourceProviderNa
result, err = client.UnregisterResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "resources.ProvidersClient", "Unregister", resp, "Failure responding to request")
+ return
}
return
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-05-01/resources/resources.go b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-05-01/resources/resources.go
index d38870f8427..2d3032bb355 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-05-01/resources/resources.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-05-01/resources/resources.go
@@ -86,6 +86,7 @@ func (client Client) CheckExistence(ctx context.Context, resourceGroupName strin
result, err = client.CheckExistenceResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "resources.Client", "CheckExistence", resp, "Failure responding to request")
+ return
}
return
@@ -164,6 +165,7 @@ func (client Client) CheckExistenceByID(ctx context.Context, resourceID string,
result, err = client.CheckExistenceByIDResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "resources.Client", "CheckExistenceByID", resp, "Failure responding to request")
+ return
}
return
@@ -243,7 +245,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", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "resources.Client", "CreateOrUpdate", nil, "Failure sending request")
return
}
@@ -283,7 +285,33 @@ func (client Client) CreateOrUpdateSender(req *http.Request) (future CreateOrUpd
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(client Client) (gr GenericResource, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.CreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("resources.CreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ gr.Response.Response, err = future.GetResult(sender)
+ if gr.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "resources.CreateOrUpdateFuture", "Result", nil, "received nil response and error")
+ }
+ if err == nil && gr.Response.Response.StatusCode != http.StatusNoContent {
+ gr, err = client.CreateOrUpdateResponder(gr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.CreateOrUpdateFuture", "Result", gr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+ }
return
}
@@ -332,7 +360,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", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "resources.Client", "CreateOrUpdateByID", nil, "Failure sending request")
return
}
@@ -367,7 +395,33 @@ func (client Client) CreateOrUpdateByIDSender(req *http.Request) (future CreateO
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(client Client) (gr GenericResource, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.CreateOrUpdateByIDFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("resources.CreateOrUpdateByIDFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ gr.Response.Response, err = future.GetResult(sender)
+ if gr.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "resources.CreateOrUpdateByIDFuture", "Result", nil, "received nil response and error")
+ }
+ if err == nil && gr.Response.Response.StatusCode != http.StatusNoContent {
+ gr, err = client.CreateOrUpdateByIDResponder(gr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.CreateOrUpdateByIDFuture", "Result", gr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+ }
return
}
@@ -419,7 +473,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", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "resources.Client", "Delete", nil, "Failure sending request")
return
}
@@ -457,7 +511,23 @@ func (client Client) DeleteSender(req *http.Request) (future DeleteFuture, err e
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(client Client) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.DeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("resources.DeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
return
}
@@ -497,7 +567,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", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "resources.Client", "DeleteByID", nil, "Failure sending request")
return
}
@@ -530,7 +600,23 @@ func (client Client) DeleteByIDSender(req *http.Request) (future DeleteByIDFutur
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(client Client) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.DeleteByIDFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("resources.DeleteByIDFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
return
}
@@ -589,6 +675,7 @@ func (client Client) Get(ctx context.Context, resourceGroupName string, resource
result, err = client.GetResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "resources.Client", "Get", resp, "Failure responding to request")
+ return
}
return
@@ -668,6 +755,7 @@ func (client Client) GetByID(ctx context.Context, resourceID string, APIVersion
result, err = client.GetByIDResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "resources.Client", "GetByID", resp, "Failure responding to request")
+ return
}
return
@@ -753,9 +841,11 @@ func (client Client) List(ctx context.Context, filter string, expand string, top
result.lr, err = client.ListResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "resources.Client", "List", resp, "Failure responding to request")
+ return
}
if result.lr.hasNextLink() && result.lr.IsEmpty() {
err = result.NextWithContext(ctx)
+ return
}
return
@@ -897,9 +987,11 @@ func (client Client) ListByResourceGroup(ctx context.Context, resourceGroupName
result.lr, err = client.ListByResourceGroupResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "resources.Client", "ListByResourceGroup", resp, "Failure responding to request")
+ return
}
if result.lr.hasNextLink() && result.lr.IsEmpty() {
err = result.NextWithContext(ctx)
+ return
}
return
@@ -1022,7 +1114,7 @@ func (client Client) MoveResources(ctx context.Context, sourceResourceGroupName
result, err = client.MoveResourcesSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "resources.Client", "MoveResources", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "resources.Client", "MoveResources", nil, "Failure sending request")
return
}
@@ -1059,7 +1151,23 @@ func (client Client) MoveResourcesSender(req *http.Request) (future MoveResource
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(client Client) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.MoveResourcesFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("resources.MoveResourcesFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
return
}
@@ -1110,7 +1218,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", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "resources.Client", "Update", nil, "Failure sending request")
return
}
@@ -1150,7 +1258,33 @@ func (client Client) UpdateSender(req *http.Request) (future UpdateFuture, err e
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(client Client) (gr GenericResource, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.UpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("resources.UpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ gr.Response.Response, err = future.GetResult(sender)
+ if gr.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "resources.UpdateFuture", "Result", nil, "received nil response and error")
+ }
+ if err == nil && gr.Response.Response.StatusCode != http.StatusNoContent {
+ gr, err = client.UpdateResponder(gr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.UpdateFuture", "Result", gr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+ }
return
}
@@ -1192,7 +1326,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", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "resources.Client", "UpdateByID", nil, "Failure sending request")
return
}
@@ -1227,7 +1361,33 @@ func (client Client) UpdateByIDSender(req *http.Request) (future UpdateByIDFutur
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(client Client) (gr GenericResource, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.UpdateByIDFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("resources.UpdateByIDFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ gr.Response.Response, err = future.GetResult(sender)
+ if gr.Response.Response == nil && err == nil {
+ err = autorest.NewErrorWithError(err, "resources.UpdateByIDFuture", "Result", nil, "received nil response and error")
+ }
+ if err == nil && gr.Response.Response.StatusCode != http.StatusNoContent {
+ gr, err = client.UpdateByIDResponder(gr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.UpdateByIDFuture", "Result", gr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+ }
return
}
@@ -1278,7 +1438,7 @@ func (client Client) ValidateMoveResources(ctx context.Context, sourceResourceGr
result, err = client.ValidateMoveResourcesSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "resources.Client", "ValidateMoveResources", result.Response(), "Failure sending request")
+ err = autorest.NewErrorWithError(err, "resources.Client", "ValidateMoveResources", nil, "Failure sending request")
return
}
@@ -1315,7 +1475,23 @@ func (client Client) ValidateMoveResourcesSender(req *http.Request) (future Vali
if err != nil {
return
}
- future.Future, err = azure.NewFutureFromResponse(resp)
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = func(client Client) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "resources.ValidateMoveResourcesFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("resources.ValidateMoveResourcesFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+ }
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-05-01/resources/tags.go b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-05-01/resources/tags.go
index c7986420ef6..fbed204ae2f 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-05-01/resources/tags.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-05-01/resources/tags.go
@@ -72,6 +72,7 @@ func (client TagsClient) CreateOrUpdate(ctx context.Context, tagName string) (re
result, err = client.CreateOrUpdateResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "resources.TagsClient", "CreateOrUpdate", resp, "Failure responding to request")
+ return
}
return
@@ -146,6 +147,7 @@ func (client TagsClient) CreateOrUpdateValue(ctx context.Context, tagName string
result, err = client.CreateOrUpdateValueResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "resources.TagsClient", "CreateOrUpdateValue", resp, "Failure responding to request")
+ return
}
return
@@ -220,6 +222,7 @@ func (client TagsClient) Delete(ctx context.Context, tagName string) (result aut
result, err = client.DeleteResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "resources.TagsClient", "Delete", resp, "Failure responding to request")
+ return
}
return
@@ -293,6 +296,7 @@ func (client TagsClient) DeleteValue(ctx context.Context, tagName string, tagVal
result, err = client.DeleteValueResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "resources.TagsClient", "DeleteValue", resp, "Failure responding to request")
+ return
}
return
@@ -365,9 +369,11 @@ func (client TagsClient) List(ctx context.Context) (result TagsListResultPage, e
result.tlr, err = client.ListResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "resources.TagsClient", "List", resp, "Failure responding to request")
+ return
}
if result.tlr.hasNextLink() && result.tlr.IsEmpty() {
err = result.NextWithContext(ctx)
+ return
}
return
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-05-01/resources/deploymentoperations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-05-01/resources/deploymentoperations.go
deleted file mode 100644
index 0e713d214ad..00000000000
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-05-01/resources/deploymentoperations.go
+++ /dev/null
@@ -1,691 +0,0 @@
-package resources
-
-// Copyright (c) Microsoft and contributors. All rights reserved.
-//
-// 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 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"
-)
-
-// DeploymentOperationsClient is the provides operations for working with resources and resource groups.
-type DeploymentOperationsClient struct {
- BaseClient
-}
-
-// NewDeploymentOperationsClient creates an instance of the DeploymentOperationsClient client.
-func NewDeploymentOperationsClient(subscriptionID string) DeploymentOperationsClient {
- return NewDeploymentOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID)
-}
-
-// NewDeploymentOperationsClientWithBaseURI creates an instance of the DeploymentOperationsClient 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 NewDeploymentOperationsClientWithBaseURI(baseURI string, subscriptionID string) DeploymentOperationsClient {
- return DeploymentOperationsClient{NewWithBaseURI(baseURI, subscriptionID)}
-}
-
-// Get gets a deployments operation.
-// Parameters:
-// resourceGroupName - the name of the resource group. The name is case insensitive.
-// deploymentName - the name of the deployment.
-// operationID - the ID of the operation to get.
-func (client DeploymentOperationsClient) Get(ctx context.Context, resourceGroupName string, deploymentName string, operationID string) (result DeploymentOperation, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/DeploymentOperationsClient.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.MaxLength, Rule: 90, Chain: nil},
- {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
- {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\p{L}\._\(\)\w]+$`, Chain: nil}}},
- {TargetValue: deploymentName,
- Constraints: []validation.Constraint{{Target: "deploymentName", Name: validation.MaxLength, Rule: 64, Chain: nil},
- {Target: "deploymentName", Name: validation.MinLength, Rule: 1, Chain: nil},
- {Target: "deploymentName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil {
- return result, validation.NewError("resources.DeploymentOperationsClient", "Get", err.Error())
- }
-
- req, err := client.GetPreparer(ctx, resourceGroupName, deploymentName, operationID)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeploymentOperationsClient", "Get", nil, "Failure preparing request")
- return
- }
-
- resp, err := client.GetSender(req)
- if err != nil {
- result.Response = autorest.Response{Response: resp}
- err = autorest.NewErrorWithError(err, "resources.DeploymentOperationsClient", "Get", resp, "Failure sending request")
- return
- }
-
- result, err = client.GetResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeploymentOperationsClient", "Get", resp, "Failure responding to request")
- }
-
- return
-}
-
-// GetPreparer prepares the Get request.
-func (client DeploymentOperationsClient) GetPreparer(ctx context.Context, resourceGroupName string, deploymentName string, operationID string) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "deploymentName": autorest.Encode("path", deploymentName),
- "operationId": autorest.Encode("path", operationID),
- "resourceGroupName": autorest.Encode("path", resourceGroupName),
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- }
-
- const APIVersion = "2019-05-01"
- queryParameters := map[string]interface{}{
- "api-version": APIVersion,
- }
-
- preparer := autorest.CreatePreparer(
- autorest.AsGet(),
- autorest.WithBaseURL(client.BaseURI),
- autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/deployments/{deploymentName}/operations/{operationId}", 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 DeploymentOperationsClient) 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 DeploymentOperationsClient) GetResponder(resp *http.Response) (result DeploymentOperation, err error) {
- err = autorest.Respond(
- resp,
- azure.WithErrorUnlessStatusCode(http.StatusOK),
- autorest.ByUnmarshallingJSON(&result),
- autorest.ByClosing())
- result.Response = autorest.Response{Response: resp}
- return
-}
-
-// GetAtManagementGroupScope gets a deployments operation.
-// Parameters:
-// groupID - the management group ID.
-// deploymentName - the name of the deployment.
-// operationID - the ID of the operation to get.
-func (client DeploymentOperationsClient) GetAtManagementGroupScope(ctx context.Context, groupID string, deploymentName string, operationID string) (result DeploymentOperation, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/DeploymentOperationsClient.GetAtManagementGroupScope")
- 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: groupID,
- Constraints: []validation.Constraint{{Target: "groupID", Name: validation.MaxLength, Rule: 90, Chain: nil},
- {Target: "groupID", Name: validation.MinLength, Rule: 1, Chain: nil}}},
- {TargetValue: deploymentName,
- Constraints: []validation.Constraint{{Target: "deploymentName", Name: validation.MaxLength, Rule: 64, Chain: nil},
- {Target: "deploymentName", Name: validation.MinLength, Rule: 1, Chain: nil},
- {Target: "deploymentName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil {
- return result, validation.NewError("resources.DeploymentOperationsClient", "GetAtManagementGroupScope", err.Error())
- }
-
- req, err := client.GetAtManagementGroupScopePreparer(ctx, groupID, deploymentName, operationID)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeploymentOperationsClient", "GetAtManagementGroupScope", nil, "Failure preparing request")
- return
- }
-
- resp, err := client.GetAtManagementGroupScopeSender(req)
- if err != nil {
- result.Response = autorest.Response{Response: resp}
- err = autorest.NewErrorWithError(err, "resources.DeploymentOperationsClient", "GetAtManagementGroupScope", resp, "Failure sending request")
- return
- }
-
- result, err = client.GetAtManagementGroupScopeResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeploymentOperationsClient", "GetAtManagementGroupScope", resp, "Failure responding to request")
- }
-
- return
-}
-
-// GetAtManagementGroupScopePreparer prepares the GetAtManagementGroupScope request.
-func (client DeploymentOperationsClient) GetAtManagementGroupScopePreparer(ctx context.Context, groupID string, deploymentName string, operationID string) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "deploymentName": autorest.Encode("path", deploymentName),
- "groupId": autorest.Encode("path", groupID),
- "operationId": autorest.Encode("path", operationID),
- }
-
- const APIVersion = "2019-05-01"
- queryParameters := map[string]interface{}{
- "api-version": APIVersion,
- }
-
- preparer := autorest.CreatePreparer(
- autorest.AsGet(),
- autorest.WithBaseURL(client.BaseURI),
- autorest.WithPathParameters("/providers/Microsoft.Management/managementGroups/{groupId}/providers/Microsoft.Resources/deployments/{deploymentName}/operations/{operationId}", pathParameters),
- autorest.WithQueryParameters(queryParameters))
- return preparer.Prepare((&http.Request{}).WithContext(ctx))
-}
-
-// GetAtManagementGroupScopeSender sends the GetAtManagementGroupScope request. The method will close the
-// http.Response Body if it receives an error.
-func (client DeploymentOperationsClient) GetAtManagementGroupScopeSender(req *http.Request) (*http.Response, error) {
- return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
-}
-
-// GetAtManagementGroupScopeResponder handles the response to the GetAtManagementGroupScope request. The method always
-// closes the http.Response Body.
-func (client DeploymentOperationsClient) GetAtManagementGroupScopeResponder(resp *http.Response) (result DeploymentOperation, err error) {
- err = autorest.Respond(
- resp,
- azure.WithErrorUnlessStatusCode(http.StatusOK),
- autorest.ByUnmarshallingJSON(&result),
- autorest.ByClosing())
- result.Response = autorest.Response{Response: resp}
- return
-}
-
-// GetAtSubscriptionScope gets a deployments operation.
-// Parameters:
-// deploymentName - the name of the deployment.
-// operationID - the ID of the operation to get.
-func (client DeploymentOperationsClient) GetAtSubscriptionScope(ctx context.Context, deploymentName string, operationID string) (result DeploymentOperation, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/DeploymentOperationsClient.GetAtSubscriptionScope")
- 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: deploymentName,
- Constraints: []validation.Constraint{{Target: "deploymentName", Name: validation.MaxLength, Rule: 64, Chain: nil},
- {Target: "deploymentName", Name: validation.MinLength, Rule: 1, Chain: nil},
- {Target: "deploymentName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil {
- return result, validation.NewError("resources.DeploymentOperationsClient", "GetAtSubscriptionScope", err.Error())
- }
-
- req, err := client.GetAtSubscriptionScopePreparer(ctx, deploymentName, operationID)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeploymentOperationsClient", "GetAtSubscriptionScope", nil, "Failure preparing request")
- return
- }
-
- resp, err := client.GetAtSubscriptionScopeSender(req)
- if err != nil {
- result.Response = autorest.Response{Response: resp}
- err = autorest.NewErrorWithError(err, "resources.DeploymentOperationsClient", "GetAtSubscriptionScope", resp, "Failure sending request")
- return
- }
-
- result, err = client.GetAtSubscriptionScopeResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeploymentOperationsClient", "GetAtSubscriptionScope", resp, "Failure responding to request")
- }
-
- return
-}
-
-// GetAtSubscriptionScopePreparer prepares the GetAtSubscriptionScope request.
-func (client DeploymentOperationsClient) GetAtSubscriptionScopePreparer(ctx context.Context, deploymentName string, operationID string) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "deploymentName": autorest.Encode("path", deploymentName),
- "operationId": autorest.Encode("path", operationID),
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- }
-
- const APIVersion = "2019-05-01"
- queryParameters := map[string]interface{}{
- "api-version": APIVersion,
- }
-
- preparer := autorest.CreatePreparer(
- autorest.AsGet(),
- autorest.WithBaseURL(client.BaseURI),
- autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Resources/deployments/{deploymentName}/operations/{operationId}", pathParameters),
- autorest.WithQueryParameters(queryParameters))
- return preparer.Prepare((&http.Request{}).WithContext(ctx))
-}
-
-// GetAtSubscriptionScopeSender sends the GetAtSubscriptionScope request. The method will close the
-// http.Response Body if it receives an error.
-func (client DeploymentOperationsClient) GetAtSubscriptionScopeSender(req *http.Request) (*http.Response, error) {
- return client.Send(req, azure.DoRetryWithRegistration(client.Client))
-}
-
-// GetAtSubscriptionScopeResponder handles the response to the GetAtSubscriptionScope request. The method always
-// closes the http.Response Body.
-func (client DeploymentOperationsClient) GetAtSubscriptionScopeResponder(resp *http.Response) (result DeploymentOperation, err error) {
- err = autorest.Respond(
- resp,
- azure.WithErrorUnlessStatusCode(http.StatusOK),
- autorest.ByUnmarshallingJSON(&result),
- autorest.ByClosing())
- result.Response = autorest.Response{Response: resp}
- return
-}
-
-// List gets all deployments operations for a deployment.
-// Parameters:
-// resourceGroupName - the name of the resource group. The name is case insensitive.
-// deploymentName - the name of the deployment.
-// top - the number of results to return.
-func (client DeploymentOperationsClient) List(ctx context.Context, resourceGroupName string, deploymentName string, top *int32) (result DeploymentOperationsListResultPage, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/DeploymentOperationsClient.List")
- defer func() {
- sc := -1
- if result.dolr.Response.Response != nil {
- sc = result.dolr.Response.Response.StatusCode
- }
- tracing.EndSpan(ctx, sc, err)
- }()
- }
- if err := validation.Validate([]validation.Validation{
- {TargetValue: resourceGroupName,
- Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
- {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
- {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\p{L}\._\(\)\w]+$`, Chain: nil}}},
- {TargetValue: deploymentName,
- Constraints: []validation.Constraint{{Target: "deploymentName", Name: validation.MaxLength, Rule: 64, Chain: nil},
- {Target: "deploymentName", Name: validation.MinLength, Rule: 1, Chain: nil},
- {Target: "deploymentName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil {
- return result, validation.NewError("resources.DeploymentOperationsClient", "List", err.Error())
- }
-
- result.fn = client.listNextResults
- req, err := client.ListPreparer(ctx, resourceGroupName, deploymentName, top)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeploymentOperationsClient", "List", nil, "Failure preparing request")
- return
- }
-
- resp, err := client.ListSender(req)
- if err != nil {
- result.dolr.Response = autorest.Response{Response: resp}
- err = autorest.NewErrorWithError(err, "resources.DeploymentOperationsClient", "List", resp, "Failure sending request")
- return
- }
-
- result.dolr, err = client.ListResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeploymentOperationsClient", "List", resp, "Failure responding to request")
- }
- if result.dolr.hasNextLink() && result.dolr.IsEmpty() {
- err = result.NextWithContext(ctx)
- }
-
- return
-}
-
-// ListPreparer prepares the List request.
-func (client DeploymentOperationsClient) ListPreparer(ctx context.Context, resourceGroupName string, deploymentName string, top *int32) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "deploymentName": autorest.Encode("path", deploymentName),
- "resourceGroupName": autorest.Encode("path", resourceGroupName),
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- }
-
- const APIVersion = "2019-05-01"
- queryParameters := map[string]interface{}{
- "api-version": APIVersion,
- }
- if top != nil {
- queryParameters["$top"] = autorest.Encode("query", *top)
- }
-
- preparer := autorest.CreatePreparer(
- autorest.AsGet(),
- autorest.WithBaseURL(client.BaseURI),
- autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/deployments/{deploymentName}/operations", 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 DeploymentOperationsClient) 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 DeploymentOperationsClient) ListResponder(resp *http.Response) (result DeploymentOperationsListResult, 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 DeploymentOperationsClient) listNextResults(ctx context.Context, lastResults DeploymentOperationsListResult) (result DeploymentOperationsListResult, err error) {
- req, err := lastResults.deploymentOperationsListResultPreparer(ctx)
- if err != nil {
- return result, autorest.NewErrorWithError(err, "resources.DeploymentOperationsClient", "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, "resources.DeploymentOperationsClient", "listNextResults", resp, "Failure sending next results request")
- }
- result, err = client.ListResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeploymentOperationsClient", "listNextResults", resp, "Failure responding to next results request")
- }
- return
-}
-
-// ListComplete enumerates all values, automatically crossing page boundaries as required.
-func (client DeploymentOperationsClient) ListComplete(ctx context.Context, resourceGroupName string, deploymentName string, top *int32) (result DeploymentOperationsListResultIterator, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/DeploymentOperationsClient.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, deploymentName, top)
- return
-}
-
-// ListAtManagementGroupScope gets all deployments operations for a deployment.
-// Parameters:
-// groupID - the management group ID.
-// deploymentName - the name of the deployment.
-// top - the number of results to return.
-func (client DeploymentOperationsClient) ListAtManagementGroupScope(ctx context.Context, groupID string, deploymentName string, top *int32) (result DeploymentOperationsListResultPage, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/DeploymentOperationsClient.ListAtManagementGroupScope")
- defer func() {
- sc := -1
- if result.dolr.Response.Response != nil {
- sc = result.dolr.Response.Response.StatusCode
- }
- tracing.EndSpan(ctx, sc, err)
- }()
- }
- if err := validation.Validate([]validation.Validation{
- {TargetValue: groupID,
- Constraints: []validation.Constraint{{Target: "groupID", Name: validation.MaxLength, Rule: 90, Chain: nil},
- {Target: "groupID", Name: validation.MinLength, Rule: 1, Chain: nil}}},
- {TargetValue: deploymentName,
- Constraints: []validation.Constraint{{Target: "deploymentName", Name: validation.MaxLength, Rule: 64, Chain: nil},
- {Target: "deploymentName", Name: validation.MinLength, Rule: 1, Chain: nil},
- {Target: "deploymentName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil {
- return result, validation.NewError("resources.DeploymentOperationsClient", "ListAtManagementGroupScope", err.Error())
- }
-
- result.fn = client.listAtManagementGroupScopeNextResults
- req, err := client.ListAtManagementGroupScopePreparer(ctx, groupID, deploymentName, top)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeploymentOperationsClient", "ListAtManagementGroupScope", nil, "Failure preparing request")
- return
- }
-
- resp, err := client.ListAtManagementGroupScopeSender(req)
- if err != nil {
- result.dolr.Response = autorest.Response{Response: resp}
- err = autorest.NewErrorWithError(err, "resources.DeploymentOperationsClient", "ListAtManagementGroupScope", resp, "Failure sending request")
- return
- }
-
- result.dolr, err = client.ListAtManagementGroupScopeResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeploymentOperationsClient", "ListAtManagementGroupScope", resp, "Failure responding to request")
- }
- if result.dolr.hasNextLink() && result.dolr.IsEmpty() {
- err = result.NextWithContext(ctx)
- }
-
- return
-}
-
-// ListAtManagementGroupScopePreparer prepares the ListAtManagementGroupScope request.
-func (client DeploymentOperationsClient) ListAtManagementGroupScopePreparer(ctx context.Context, groupID string, deploymentName string, top *int32) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "deploymentName": autorest.Encode("path", deploymentName),
- "groupId": autorest.Encode("path", groupID),
- }
-
- const APIVersion = "2019-05-01"
- queryParameters := map[string]interface{}{
- "api-version": APIVersion,
- }
- if top != nil {
- queryParameters["$top"] = autorest.Encode("query", *top)
- }
-
- preparer := autorest.CreatePreparer(
- autorest.AsGet(),
- autorest.WithBaseURL(client.BaseURI),
- autorest.WithPathParameters("/providers/Microsoft.Management/managementGroups/{groupId}/providers/Microsoft.Resources/deployments/{deploymentName}/operations", pathParameters),
- autorest.WithQueryParameters(queryParameters))
- return preparer.Prepare((&http.Request{}).WithContext(ctx))
-}
-
-// ListAtManagementGroupScopeSender sends the ListAtManagementGroupScope request. The method will close the
-// http.Response Body if it receives an error.
-func (client DeploymentOperationsClient) ListAtManagementGroupScopeSender(req *http.Request) (*http.Response, error) {
- return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
-}
-
-// ListAtManagementGroupScopeResponder handles the response to the ListAtManagementGroupScope request. The method always
-// closes the http.Response Body.
-func (client DeploymentOperationsClient) ListAtManagementGroupScopeResponder(resp *http.Response) (result DeploymentOperationsListResult, err error) {
- err = autorest.Respond(
- resp,
- azure.WithErrorUnlessStatusCode(http.StatusOK),
- autorest.ByUnmarshallingJSON(&result),
- autorest.ByClosing())
- result.Response = autorest.Response{Response: resp}
- return
-}
-
-// listAtManagementGroupScopeNextResults retrieves the next set of results, if any.
-func (client DeploymentOperationsClient) listAtManagementGroupScopeNextResults(ctx context.Context, lastResults DeploymentOperationsListResult) (result DeploymentOperationsListResult, err error) {
- req, err := lastResults.deploymentOperationsListResultPreparer(ctx)
- if err != nil {
- return result, autorest.NewErrorWithError(err, "resources.DeploymentOperationsClient", "listAtManagementGroupScopeNextResults", nil, "Failure preparing next results request")
- }
- if req == nil {
- return
- }
- resp, err := client.ListAtManagementGroupScopeSender(req)
- if err != nil {
- result.Response = autorest.Response{Response: resp}
- return result, autorest.NewErrorWithError(err, "resources.DeploymentOperationsClient", "listAtManagementGroupScopeNextResults", resp, "Failure sending next results request")
- }
- result, err = client.ListAtManagementGroupScopeResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeploymentOperationsClient", "listAtManagementGroupScopeNextResults", resp, "Failure responding to next results request")
- }
- return
-}
-
-// ListAtManagementGroupScopeComplete enumerates all values, automatically crossing page boundaries as required.
-func (client DeploymentOperationsClient) ListAtManagementGroupScopeComplete(ctx context.Context, groupID string, deploymentName string, top *int32) (result DeploymentOperationsListResultIterator, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/DeploymentOperationsClient.ListAtManagementGroupScope")
- 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.ListAtManagementGroupScope(ctx, groupID, deploymentName, top)
- return
-}
-
-// ListAtSubscriptionScope gets all deployments operations for a deployment.
-// Parameters:
-// deploymentName - the name of the deployment.
-// top - the number of results to return.
-func (client DeploymentOperationsClient) ListAtSubscriptionScope(ctx context.Context, deploymentName string, top *int32) (result DeploymentOperationsListResultPage, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/DeploymentOperationsClient.ListAtSubscriptionScope")
- defer func() {
- sc := -1
- if result.dolr.Response.Response != nil {
- sc = result.dolr.Response.Response.StatusCode
- }
- tracing.EndSpan(ctx, sc, err)
- }()
- }
- if err := validation.Validate([]validation.Validation{
- {TargetValue: deploymentName,
- Constraints: []validation.Constraint{{Target: "deploymentName", Name: validation.MaxLength, Rule: 64, Chain: nil},
- {Target: "deploymentName", Name: validation.MinLength, Rule: 1, Chain: nil},
- {Target: "deploymentName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil {
- return result, validation.NewError("resources.DeploymentOperationsClient", "ListAtSubscriptionScope", err.Error())
- }
-
- result.fn = client.listAtSubscriptionScopeNextResults
- req, err := client.ListAtSubscriptionScopePreparer(ctx, deploymentName, top)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeploymentOperationsClient", "ListAtSubscriptionScope", nil, "Failure preparing request")
- return
- }
-
- resp, err := client.ListAtSubscriptionScopeSender(req)
- if err != nil {
- result.dolr.Response = autorest.Response{Response: resp}
- err = autorest.NewErrorWithError(err, "resources.DeploymentOperationsClient", "ListAtSubscriptionScope", resp, "Failure sending request")
- return
- }
-
- result.dolr, err = client.ListAtSubscriptionScopeResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeploymentOperationsClient", "ListAtSubscriptionScope", resp, "Failure responding to request")
- }
- if result.dolr.hasNextLink() && result.dolr.IsEmpty() {
- err = result.NextWithContext(ctx)
- }
-
- return
-}
-
-// ListAtSubscriptionScopePreparer prepares the ListAtSubscriptionScope request.
-func (client DeploymentOperationsClient) ListAtSubscriptionScopePreparer(ctx context.Context, deploymentName string, top *int32) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "deploymentName": autorest.Encode("path", deploymentName),
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- }
-
- const APIVersion = "2019-05-01"
- queryParameters := map[string]interface{}{
- "api-version": APIVersion,
- }
- if top != nil {
- queryParameters["$top"] = autorest.Encode("query", *top)
- }
-
- preparer := autorest.CreatePreparer(
- autorest.AsGet(),
- autorest.WithBaseURL(client.BaseURI),
- autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Resources/deployments/{deploymentName}/operations", pathParameters),
- autorest.WithQueryParameters(queryParameters))
- return preparer.Prepare((&http.Request{}).WithContext(ctx))
-}
-
-// ListAtSubscriptionScopeSender sends the ListAtSubscriptionScope request. The method will close the
-// http.Response Body if it receives an error.
-func (client DeploymentOperationsClient) ListAtSubscriptionScopeSender(req *http.Request) (*http.Response, error) {
- return client.Send(req, azure.DoRetryWithRegistration(client.Client))
-}
-
-// ListAtSubscriptionScopeResponder handles the response to the ListAtSubscriptionScope request. The method always
-// closes the http.Response Body.
-func (client DeploymentOperationsClient) ListAtSubscriptionScopeResponder(resp *http.Response) (result DeploymentOperationsListResult, err error) {
- err = autorest.Respond(
- resp,
- azure.WithErrorUnlessStatusCode(http.StatusOK),
- autorest.ByUnmarshallingJSON(&result),
- autorest.ByClosing())
- result.Response = autorest.Response{Response: resp}
- return
-}
-
-// listAtSubscriptionScopeNextResults retrieves the next set of results, if any.
-func (client DeploymentOperationsClient) listAtSubscriptionScopeNextResults(ctx context.Context, lastResults DeploymentOperationsListResult) (result DeploymentOperationsListResult, err error) {
- req, err := lastResults.deploymentOperationsListResultPreparer(ctx)
- if err != nil {
- return result, autorest.NewErrorWithError(err, "resources.DeploymentOperationsClient", "listAtSubscriptionScopeNextResults", nil, "Failure preparing next results request")
- }
- if req == nil {
- return
- }
- resp, err := client.ListAtSubscriptionScopeSender(req)
- if err != nil {
- result.Response = autorest.Response{Response: resp}
- return result, autorest.NewErrorWithError(err, "resources.DeploymentOperationsClient", "listAtSubscriptionScopeNextResults", resp, "Failure sending next results request")
- }
- result, err = client.ListAtSubscriptionScopeResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeploymentOperationsClient", "listAtSubscriptionScopeNextResults", resp, "Failure responding to next results request")
- }
- return
-}
-
-// ListAtSubscriptionScopeComplete enumerates all values, automatically crossing page boundaries as required.
-func (client DeploymentOperationsClient) ListAtSubscriptionScopeComplete(ctx context.Context, deploymentName string, top *int32) (result DeploymentOperationsListResultIterator, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/DeploymentOperationsClient.ListAtSubscriptionScope")
- 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.ListAtSubscriptionScope(ctx, deploymentName, top)
- return
-}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-05-01/resources/deployments.go b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-05-01/resources/deployments.go
deleted file mode 100644
index 3ed5f77e6e0..00000000000
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-05-01/resources/deployments.go
+++ /dev/null
@@ -1,2348 +0,0 @@
-package resources
-
-// Copyright (c) Microsoft and contributors. All rights reserved.
-//
-// 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 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"
-)
-
-// DeploymentsClient is the provides operations for working with resources and resource groups.
-type DeploymentsClient struct {
- BaseClient
-}
-
-// NewDeploymentsClient creates an instance of the DeploymentsClient client.
-func NewDeploymentsClient(subscriptionID string) DeploymentsClient {
- return NewDeploymentsClientWithBaseURI(DefaultBaseURI, subscriptionID)
-}
-
-// NewDeploymentsClientWithBaseURI creates an instance of the DeploymentsClient 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 NewDeploymentsClientWithBaseURI(baseURI string, subscriptionID string) DeploymentsClient {
- return DeploymentsClient{NewWithBaseURI(baseURI, subscriptionID)}
-}
-
-// CalculateTemplateHash calculate the hash of the given template.
-// Parameters:
-// templateParameter - the template provided to calculate hash.
-func (client DeploymentsClient) CalculateTemplateHash(ctx context.Context, templateParameter interface{}) (result TemplateHashResult, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/DeploymentsClient.CalculateTemplateHash")
- defer func() {
- sc := -1
- if result.Response.Response != nil {
- sc = result.Response.Response.StatusCode
- }
- tracing.EndSpan(ctx, sc, err)
- }()
- }
- req, err := client.CalculateTemplateHashPreparer(ctx, templateParameter)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "CalculateTemplateHash", nil, "Failure preparing request")
- return
- }
-
- resp, err := client.CalculateTemplateHashSender(req)
- if err != nil {
- result.Response = autorest.Response{Response: resp}
- err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "CalculateTemplateHash", resp, "Failure sending request")
- return
- }
-
- result, err = client.CalculateTemplateHashResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "CalculateTemplateHash", resp, "Failure responding to request")
- }
-
- return
-}
-
-// CalculateTemplateHashPreparer prepares the CalculateTemplateHash request.
-func (client DeploymentsClient) CalculateTemplateHashPreparer(ctx context.Context, templateParameter interface{}) (*http.Request, error) {
- const APIVersion = "2019-05-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.WithPath("/providers/Microsoft.Resources/calculateTemplateHash"),
- autorest.WithJSON(templateParameter),
- autorest.WithQueryParameters(queryParameters))
- return preparer.Prepare((&http.Request{}).WithContext(ctx))
-}
-
-// CalculateTemplateHashSender sends the CalculateTemplateHash request. The method will close the
-// http.Response Body if it receives an error.
-func (client DeploymentsClient) CalculateTemplateHashSender(req *http.Request) (*http.Response, error) {
- return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
-}
-
-// CalculateTemplateHashResponder handles the response to the CalculateTemplateHash request. The method always
-// closes the http.Response Body.
-func (client DeploymentsClient) CalculateTemplateHashResponder(resp *http.Response) (result TemplateHashResult, err error) {
- err = autorest.Respond(
- resp,
- azure.WithErrorUnlessStatusCode(http.StatusOK),
- autorest.ByUnmarshallingJSON(&result),
- autorest.ByClosing())
- result.Response = autorest.Response{Response: resp}
- return
-}
-
-// Cancel you can cancel a deployment only if the provisioningState is Accepted or Running. After the deployment is
-// canceled, the provisioningState is set to Canceled. Canceling a template deployment stops the currently running
-// template deployment and leaves the resource group partially deployed.
-// Parameters:
-// resourceGroupName - the name of the resource group. The name is case insensitive.
-// deploymentName - the name of the deployment.
-func (client DeploymentsClient) Cancel(ctx context.Context, resourceGroupName string, deploymentName string) (result autorest.Response, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/DeploymentsClient.Cancel")
- 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.MaxLength, Rule: 90, Chain: nil},
- {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
- {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\p{L}\._\(\)\w]+$`, Chain: nil}}},
- {TargetValue: deploymentName,
- Constraints: []validation.Constraint{{Target: "deploymentName", Name: validation.MaxLength, Rule: 64, Chain: nil},
- {Target: "deploymentName", Name: validation.MinLength, Rule: 1, Chain: nil},
- {Target: "deploymentName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil {
- return result, validation.NewError("resources.DeploymentsClient", "Cancel", err.Error())
- }
-
- req, err := client.CancelPreparer(ctx, resourceGroupName, deploymentName)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "Cancel", nil, "Failure preparing request")
- return
- }
-
- resp, err := client.CancelSender(req)
- if err != nil {
- result.Response = resp
- err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "Cancel", resp, "Failure sending request")
- return
- }
-
- result, err = client.CancelResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "Cancel", resp, "Failure responding to request")
- }
-
- return
-}
-
-// CancelPreparer prepares the Cancel request.
-func (client DeploymentsClient) CancelPreparer(ctx context.Context, resourceGroupName string, deploymentName string) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "deploymentName": autorest.Encode("path", deploymentName),
- "resourceGroupName": autorest.Encode("path", resourceGroupName),
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- }
-
- const APIVersion = "2019-05-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.Resources/deployments/{deploymentName}/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 DeploymentsClient) CancelSender(req *http.Request) (*http.Response, error) {
- return client.Send(req, azure.DoRetryWithRegistration(client.Client))
-}
-
-// CancelResponder handles the response to the Cancel request. The method always
-// closes the http.Response Body.
-func (client DeploymentsClient) CancelResponder(resp *http.Response) (result autorest.Response, err error) {
- err = autorest.Respond(
- resp,
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
- autorest.ByClosing())
- result.Response = resp
- return
-}
-
-// CancelAtManagementGroupScope you can cancel a deployment only if the provisioningState is Accepted or Running. After
-// the deployment is canceled, the provisioningState is set to Canceled. Canceling a template deployment stops the
-// currently running template deployment and leaves the resources partially deployed.
-// Parameters:
-// groupID - the management group ID.
-// deploymentName - the name of the deployment.
-func (client DeploymentsClient) CancelAtManagementGroupScope(ctx context.Context, groupID string, deploymentName string) (result autorest.Response, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/DeploymentsClient.CancelAtManagementGroupScope")
- defer func() {
- sc := -1
- if result.Response != nil {
- sc = result.Response.StatusCode
- }
- tracing.EndSpan(ctx, sc, err)
- }()
- }
- if err := validation.Validate([]validation.Validation{
- {TargetValue: groupID,
- Constraints: []validation.Constraint{{Target: "groupID", Name: validation.MaxLength, Rule: 90, Chain: nil},
- {Target: "groupID", Name: validation.MinLength, Rule: 1, Chain: nil}}},
- {TargetValue: deploymentName,
- Constraints: []validation.Constraint{{Target: "deploymentName", Name: validation.MaxLength, Rule: 64, Chain: nil},
- {Target: "deploymentName", Name: validation.MinLength, Rule: 1, Chain: nil},
- {Target: "deploymentName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil {
- return result, validation.NewError("resources.DeploymentsClient", "CancelAtManagementGroupScope", err.Error())
- }
-
- req, err := client.CancelAtManagementGroupScopePreparer(ctx, groupID, deploymentName)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "CancelAtManagementGroupScope", nil, "Failure preparing request")
- return
- }
-
- resp, err := client.CancelAtManagementGroupScopeSender(req)
- if err != nil {
- result.Response = resp
- err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "CancelAtManagementGroupScope", resp, "Failure sending request")
- return
- }
-
- result, err = client.CancelAtManagementGroupScopeResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "CancelAtManagementGroupScope", resp, "Failure responding to request")
- }
-
- return
-}
-
-// CancelAtManagementGroupScopePreparer prepares the CancelAtManagementGroupScope request.
-func (client DeploymentsClient) CancelAtManagementGroupScopePreparer(ctx context.Context, groupID string, deploymentName string) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "deploymentName": autorest.Encode("path", deploymentName),
- "groupId": autorest.Encode("path", groupID),
- }
-
- const APIVersion = "2019-05-01"
- queryParameters := map[string]interface{}{
- "api-version": APIVersion,
- }
-
- preparer := autorest.CreatePreparer(
- autorest.AsPost(),
- autorest.WithBaseURL(client.BaseURI),
- autorest.WithPathParameters("/providers/Microsoft.Management/managementGroups/{groupId}/providers/Microsoft.Resources/deployments/{deploymentName}/cancel", pathParameters),
- autorest.WithQueryParameters(queryParameters))
- return preparer.Prepare((&http.Request{}).WithContext(ctx))
-}
-
-// CancelAtManagementGroupScopeSender sends the CancelAtManagementGroupScope request. The method will close the
-// http.Response Body if it receives an error.
-func (client DeploymentsClient) CancelAtManagementGroupScopeSender(req *http.Request) (*http.Response, error) {
- return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
-}
-
-// CancelAtManagementGroupScopeResponder handles the response to the CancelAtManagementGroupScope request. The method always
-// closes the http.Response Body.
-func (client DeploymentsClient) CancelAtManagementGroupScopeResponder(resp *http.Response) (result autorest.Response, err error) {
- err = autorest.Respond(
- resp,
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
- autorest.ByClosing())
- result.Response = resp
- return
-}
-
-// CancelAtSubscriptionScope you can cancel a deployment only if the provisioningState is Accepted or Running. After
-// the deployment is canceled, the provisioningState is set to Canceled. Canceling a template deployment stops the
-// currently running template deployment and leaves the resources partially deployed.
-// Parameters:
-// deploymentName - the name of the deployment.
-func (client DeploymentsClient) CancelAtSubscriptionScope(ctx context.Context, deploymentName string) (result autorest.Response, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/DeploymentsClient.CancelAtSubscriptionScope")
- defer func() {
- sc := -1
- if result.Response != nil {
- sc = result.Response.StatusCode
- }
- tracing.EndSpan(ctx, sc, err)
- }()
- }
- if err := validation.Validate([]validation.Validation{
- {TargetValue: deploymentName,
- Constraints: []validation.Constraint{{Target: "deploymentName", Name: validation.MaxLength, Rule: 64, Chain: nil},
- {Target: "deploymentName", Name: validation.MinLength, Rule: 1, Chain: nil},
- {Target: "deploymentName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil {
- return result, validation.NewError("resources.DeploymentsClient", "CancelAtSubscriptionScope", err.Error())
- }
-
- req, err := client.CancelAtSubscriptionScopePreparer(ctx, deploymentName)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "CancelAtSubscriptionScope", nil, "Failure preparing request")
- return
- }
-
- resp, err := client.CancelAtSubscriptionScopeSender(req)
- if err != nil {
- result.Response = resp
- err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "CancelAtSubscriptionScope", resp, "Failure sending request")
- return
- }
-
- result, err = client.CancelAtSubscriptionScopeResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "CancelAtSubscriptionScope", resp, "Failure responding to request")
- }
-
- return
-}
-
-// CancelAtSubscriptionScopePreparer prepares the CancelAtSubscriptionScope request.
-func (client DeploymentsClient) CancelAtSubscriptionScopePreparer(ctx context.Context, deploymentName string) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "deploymentName": autorest.Encode("path", deploymentName),
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- }
-
- const APIVersion = "2019-05-01"
- queryParameters := map[string]interface{}{
- "api-version": APIVersion,
- }
-
- preparer := autorest.CreatePreparer(
- autorest.AsPost(),
- autorest.WithBaseURL(client.BaseURI),
- autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Resources/deployments/{deploymentName}/cancel", pathParameters),
- autorest.WithQueryParameters(queryParameters))
- return preparer.Prepare((&http.Request{}).WithContext(ctx))
-}
-
-// CancelAtSubscriptionScopeSender sends the CancelAtSubscriptionScope request. The method will close the
-// http.Response Body if it receives an error.
-func (client DeploymentsClient) CancelAtSubscriptionScopeSender(req *http.Request) (*http.Response, error) {
- return client.Send(req, azure.DoRetryWithRegistration(client.Client))
-}
-
-// CancelAtSubscriptionScopeResponder handles the response to the CancelAtSubscriptionScope request. The method always
-// closes the http.Response Body.
-func (client DeploymentsClient) CancelAtSubscriptionScopeResponder(resp *http.Response) (result autorest.Response, err error) {
- err = autorest.Respond(
- resp,
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
- autorest.ByClosing())
- result.Response = resp
- return
-}
-
-// CheckExistence checks whether the deployment exists.
-// Parameters:
-// resourceGroupName - the name of the resource group with the deployment to check. The name is case
-// insensitive.
-// deploymentName - the name of the deployment.
-func (client DeploymentsClient) CheckExistence(ctx context.Context, resourceGroupName string, deploymentName string) (result autorest.Response, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/DeploymentsClient.CheckExistence")
- 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.MaxLength, Rule: 90, Chain: nil},
- {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
- {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\p{L}\._\(\)\w]+$`, Chain: nil}}},
- {TargetValue: deploymentName,
- Constraints: []validation.Constraint{{Target: "deploymentName", Name: validation.MaxLength, Rule: 64, Chain: nil},
- {Target: "deploymentName", Name: validation.MinLength, Rule: 1, Chain: nil},
- {Target: "deploymentName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil {
- return result, validation.NewError("resources.DeploymentsClient", "CheckExistence", err.Error())
- }
-
- req, err := client.CheckExistencePreparer(ctx, resourceGroupName, deploymentName)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "CheckExistence", nil, "Failure preparing request")
- return
- }
-
- resp, err := client.CheckExistenceSender(req)
- if err != nil {
- result.Response = resp
- err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "CheckExistence", resp, "Failure sending request")
- return
- }
-
- result, err = client.CheckExistenceResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "CheckExistence", resp, "Failure responding to request")
- }
-
- return
-}
-
-// CheckExistencePreparer prepares the CheckExistence request.
-func (client DeploymentsClient) CheckExistencePreparer(ctx context.Context, resourceGroupName string, deploymentName string) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "deploymentName": autorest.Encode("path", deploymentName),
- "resourceGroupName": autorest.Encode("path", resourceGroupName),
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- }
-
- const APIVersion = "2019-05-01"
- queryParameters := map[string]interface{}{
- "api-version": APIVersion,
- }
-
- preparer := autorest.CreatePreparer(
- autorest.AsHead(),
- autorest.WithBaseURL(client.BaseURI),
- autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/{deploymentName}", pathParameters),
- autorest.WithQueryParameters(queryParameters))
- return preparer.Prepare((&http.Request{}).WithContext(ctx))
-}
-
-// CheckExistenceSender sends the CheckExistence request. The method will close the
-// http.Response Body if it receives an error.
-func (client DeploymentsClient) CheckExistenceSender(req *http.Request) (*http.Response, error) {
- return client.Send(req, azure.DoRetryWithRegistration(client.Client))
-}
-
-// CheckExistenceResponder handles the response to the CheckExistence request. The method always
-// closes the http.Response Body.
-func (client DeploymentsClient) CheckExistenceResponder(resp *http.Response) (result autorest.Response, err error) {
- err = autorest.Respond(
- resp,
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent, http.StatusNotFound),
- autorest.ByClosing())
- result.Response = resp
- return
-}
-
-// CheckExistenceAtManagementGroupScope checks whether the deployment exists.
-// Parameters:
-// groupID - the management group ID.
-// deploymentName - the name of the deployment.
-func (client DeploymentsClient) CheckExistenceAtManagementGroupScope(ctx context.Context, groupID string, deploymentName string) (result autorest.Response, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/DeploymentsClient.CheckExistenceAtManagementGroupScope")
- defer func() {
- sc := -1
- if result.Response != nil {
- sc = result.Response.StatusCode
- }
- tracing.EndSpan(ctx, sc, err)
- }()
- }
- if err := validation.Validate([]validation.Validation{
- {TargetValue: groupID,
- Constraints: []validation.Constraint{{Target: "groupID", Name: validation.MaxLength, Rule: 90, Chain: nil},
- {Target: "groupID", Name: validation.MinLength, Rule: 1, Chain: nil}}},
- {TargetValue: deploymentName,
- Constraints: []validation.Constraint{{Target: "deploymentName", Name: validation.MaxLength, Rule: 64, Chain: nil},
- {Target: "deploymentName", Name: validation.MinLength, Rule: 1, Chain: nil},
- {Target: "deploymentName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil {
- return result, validation.NewError("resources.DeploymentsClient", "CheckExistenceAtManagementGroupScope", err.Error())
- }
-
- req, err := client.CheckExistenceAtManagementGroupScopePreparer(ctx, groupID, deploymentName)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "CheckExistenceAtManagementGroupScope", nil, "Failure preparing request")
- return
- }
-
- resp, err := client.CheckExistenceAtManagementGroupScopeSender(req)
- if err != nil {
- result.Response = resp
- err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "CheckExistenceAtManagementGroupScope", resp, "Failure sending request")
- return
- }
-
- result, err = client.CheckExistenceAtManagementGroupScopeResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "CheckExistenceAtManagementGroupScope", resp, "Failure responding to request")
- }
-
- return
-}
-
-// CheckExistenceAtManagementGroupScopePreparer prepares the CheckExistenceAtManagementGroupScope request.
-func (client DeploymentsClient) CheckExistenceAtManagementGroupScopePreparer(ctx context.Context, groupID string, deploymentName string) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "deploymentName": autorest.Encode("path", deploymentName),
- "groupId": autorest.Encode("path", groupID),
- }
-
- const APIVersion = "2019-05-01"
- queryParameters := map[string]interface{}{
- "api-version": APIVersion,
- }
-
- preparer := autorest.CreatePreparer(
- autorest.AsHead(),
- autorest.WithBaseURL(client.BaseURI),
- autorest.WithPathParameters("/providers/Microsoft.Management/managementGroups/{groupId}/providers/Microsoft.Resources/deployments/{deploymentName}", pathParameters),
- autorest.WithQueryParameters(queryParameters))
- return preparer.Prepare((&http.Request{}).WithContext(ctx))
-}
-
-// CheckExistenceAtManagementGroupScopeSender sends the CheckExistenceAtManagementGroupScope request. The method will close the
-// http.Response Body if it receives an error.
-func (client DeploymentsClient) CheckExistenceAtManagementGroupScopeSender(req *http.Request) (*http.Response, error) {
- return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
-}
-
-// CheckExistenceAtManagementGroupScopeResponder handles the response to the CheckExistenceAtManagementGroupScope request. The method always
-// closes the http.Response Body.
-func (client DeploymentsClient) CheckExistenceAtManagementGroupScopeResponder(resp *http.Response) (result autorest.Response, err error) {
- err = autorest.Respond(
- resp,
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent, http.StatusNotFound),
- autorest.ByClosing())
- result.Response = resp
- return
-}
-
-// CheckExistenceAtSubscriptionScope checks whether the deployment exists.
-// Parameters:
-// deploymentName - the name of the deployment.
-func (client DeploymentsClient) CheckExistenceAtSubscriptionScope(ctx context.Context, deploymentName string) (result autorest.Response, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/DeploymentsClient.CheckExistenceAtSubscriptionScope")
- defer func() {
- sc := -1
- if result.Response != nil {
- sc = result.Response.StatusCode
- }
- tracing.EndSpan(ctx, sc, err)
- }()
- }
- if err := validation.Validate([]validation.Validation{
- {TargetValue: deploymentName,
- Constraints: []validation.Constraint{{Target: "deploymentName", Name: validation.MaxLength, Rule: 64, Chain: nil},
- {Target: "deploymentName", Name: validation.MinLength, Rule: 1, Chain: nil},
- {Target: "deploymentName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil {
- return result, validation.NewError("resources.DeploymentsClient", "CheckExistenceAtSubscriptionScope", err.Error())
- }
-
- req, err := client.CheckExistenceAtSubscriptionScopePreparer(ctx, deploymentName)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "CheckExistenceAtSubscriptionScope", nil, "Failure preparing request")
- return
- }
-
- resp, err := client.CheckExistenceAtSubscriptionScopeSender(req)
- if err != nil {
- result.Response = resp
- err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "CheckExistenceAtSubscriptionScope", resp, "Failure sending request")
- return
- }
-
- result, err = client.CheckExistenceAtSubscriptionScopeResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "CheckExistenceAtSubscriptionScope", resp, "Failure responding to request")
- }
-
- return
-}
-
-// CheckExistenceAtSubscriptionScopePreparer prepares the CheckExistenceAtSubscriptionScope request.
-func (client DeploymentsClient) CheckExistenceAtSubscriptionScopePreparer(ctx context.Context, deploymentName string) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "deploymentName": autorest.Encode("path", deploymentName),
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- }
-
- const APIVersion = "2019-05-01"
- queryParameters := map[string]interface{}{
- "api-version": APIVersion,
- }
-
- preparer := autorest.CreatePreparer(
- autorest.AsHead(),
- autorest.WithBaseURL(client.BaseURI),
- autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Resources/deployments/{deploymentName}", pathParameters),
- autorest.WithQueryParameters(queryParameters))
- return preparer.Prepare((&http.Request{}).WithContext(ctx))
-}
-
-// CheckExistenceAtSubscriptionScopeSender sends the CheckExistenceAtSubscriptionScope request. The method will close the
-// http.Response Body if it receives an error.
-func (client DeploymentsClient) CheckExistenceAtSubscriptionScopeSender(req *http.Request) (*http.Response, error) {
- return client.Send(req, azure.DoRetryWithRegistration(client.Client))
-}
-
-// CheckExistenceAtSubscriptionScopeResponder handles the response to the CheckExistenceAtSubscriptionScope request. The method always
-// closes the http.Response Body.
-func (client DeploymentsClient) CheckExistenceAtSubscriptionScopeResponder(resp *http.Response) (result autorest.Response, err error) {
- err = autorest.Respond(
- resp,
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent, http.StatusNotFound),
- autorest.ByClosing())
- result.Response = resp
- return
-}
-
-// CreateOrUpdate you can provide the template and parameters directly in the request or link to JSON files.
-// Parameters:
-// resourceGroupName - the name of the resource group to deploy the resources to. The name is case insensitive.
-// The resource group must already exist.
-// deploymentName - the name of the deployment.
-// parameters - additional parameters supplied to the operation.
-func (client DeploymentsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, deploymentName string, parameters Deployment) (result DeploymentsCreateOrUpdateFuture, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/DeploymentsClient.CreateOrUpdate")
- 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.MaxLength, Rule: 90, Chain: nil},
- {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
- {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\p{L}\._\(\)\w]+$`, Chain: nil}}},
- {TargetValue: deploymentName,
- Constraints: []validation.Constraint{{Target: "deploymentName", Name: validation.MaxLength, Rule: 64, Chain: nil},
- {Target: "deploymentName", Name: validation.MinLength, Rule: 1, Chain: nil},
- {Target: "deploymentName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}},
- {TargetValue: parameters,
- Constraints: []validation.Constraint{{Target: "parameters.Properties", Name: validation.Null, Rule: true,
- Chain: []validation.Constraint{{Target: "parameters.Properties.TemplateLink", Name: validation.Null, Rule: false,
- Chain: []validation.Constraint{{Target: "parameters.Properties.TemplateLink.URI", Name: validation.Null, Rule: true, Chain: nil}}},
- {Target: "parameters.Properties.ParametersLink", Name: validation.Null, Rule: false,
- Chain: []validation.Constraint{{Target: "parameters.Properties.ParametersLink.URI", Name: validation.Null, Rule: true, Chain: nil}}},
- }}}}}); err != nil {
- return result, validation.NewError("resources.DeploymentsClient", "CreateOrUpdate", err.Error())
- }
-
- req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, deploymentName, parameters)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "CreateOrUpdate", nil, "Failure preparing request")
- return
- }
-
- result, err = client.CreateOrUpdateSender(req)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
- return
- }
-
- return
-}
-
-// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
-func (client DeploymentsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, deploymentName string, parameters Deployment) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "deploymentName": autorest.Encode("path", deploymentName),
- "resourceGroupName": autorest.Encode("path", resourceGroupName),
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- }
-
- const APIVersion = "2019-05-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.Resources/deployments/{deploymentName}", 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 DeploymentsClient) CreateOrUpdateSender(req *http.Request) (future DeploymentsCreateOrUpdateFuture, err error) {
- var resp *http.Response
- resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
- if err != nil {
- return
- }
- future.Future, err = azure.NewFutureFromResponse(resp)
- return
-}
-
-// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
-// closes the http.Response Body.
-func (client DeploymentsClient) CreateOrUpdateResponder(resp *http.Response) (result DeploymentExtended, err error) {
- err = autorest.Respond(
- resp,
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
- autorest.ByUnmarshallingJSON(&result),
- autorest.ByClosing())
- result.Response = autorest.Response{Response: resp}
- return
-}
-
-// CreateOrUpdateAtManagementGroupScope you can provide the template and parameters directly in the request or link to
-// JSON files.
-// Parameters:
-// groupID - the management group ID.
-// deploymentName - the name of the deployment.
-// parameters - additional parameters supplied to the operation.
-func (client DeploymentsClient) CreateOrUpdateAtManagementGroupScope(ctx context.Context, groupID string, deploymentName string, parameters Deployment) (result DeploymentsCreateOrUpdateAtManagementGroupScopeFuture, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/DeploymentsClient.CreateOrUpdateAtManagementGroupScope")
- defer func() {
- sc := -1
- if result.Response() != nil {
- sc = result.Response().StatusCode
- }
- tracing.EndSpan(ctx, sc, err)
- }()
- }
- if err := validation.Validate([]validation.Validation{
- {TargetValue: groupID,
- Constraints: []validation.Constraint{{Target: "groupID", Name: validation.MaxLength, Rule: 90, Chain: nil},
- {Target: "groupID", Name: validation.MinLength, Rule: 1, Chain: nil}}},
- {TargetValue: deploymentName,
- Constraints: []validation.Constraint{{Target: "deploymentName", Name: validation.MaxLength, Rule: 64, Chain: nil},
- {Target: "deploymentName", Name: validation.MinLength, Rule: 1, Chain: nil},
- {Target: "deploymentName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}},
- {TargetValue: parameters,
- Constraints: []validation.Constraint{{Target: "parameters.Properties", Name: validation.Null, Rule: true,
- Chain: []validation.Constraint{{Target: "parameters.Properties.TemplateLink", Name: validation.Null, Rule: false,
- Chain: []validation.Constraint{{Target: "parameters.Properties.TemplateLink.URI", Name: validation.Null, Rule: true, Chain: nil}}},
- {Target: "parameters.Properties.ParametersLink", Name: validation.Null, Rule: false,
- Chain: []validation.Constraint{{Target: "parameters.Properties.ParametersLink.URI", Name: validation.Null, Rule: true, Chain: nil}}},
- }}}}}); err != nil {
- return result, validation.NewError("resources.DeploymentsClient", "CreateOrUpdateAtManagementGroupScope", err.Error())
- }
-
- req, err := client.CreateOrUpdateAtManagementGroupScopePreparer(ctx, groupID, deploymentName, parameters)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "CreateOrUpdateAtManagementGroupScope", nil, "Failure preparing request")
- return
- }
-
- result, err = client.CreateOrUpdateAtManagementGroupScopeSender(req)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "CreateOrUpdateAtManagementGroupScope", result.Response(), "Failure sending request")
- return
- }
-
- return
-}
-
-// CreateOrUpdateAtManagementGroupScopePreparer prepares the CreateOrUpdateAtManagementGroupScope request.
-func (client DeploymentsClient) CreateOrUpdateAtManagementGroupScopePreparer(ctx context.Context, groupID string, deploymentName string, parameters Deployment) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "deploymentName": autorest.Encode("path", deploymentName),
- "groupId": autorest.Encode("path", groupID),
- }
-
- const APIVersion = "2019-05-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("/providers/Microsoft.Management/managementGroups/{groupId}/providers/Microsoft.Resources/deployments/{deploymentName}", pathParameters),
- autorest.WithJSON(parameters),
- autorest.WithQueryParameters(queryParameters))
- return preparer.Prepare((&http.Request{}).WithContext(ctx))
-}
-
-// CreateOrUpdateAtManagementGroupScopeSender sends the CreateOrUpdateAtManagementGroupScope request. The method will close the
-// http.Response Body if it receives an error.
-func (client DeploymentsClient) CreateOrUpdateAtManagementGroupScopeSender(req *http.Request) (future DeploymentsCreateOrUpdateAtManagementGroupScopeFuture, err error) {
- var resp *http.Response
- resp, err = client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- return
- }
- future.Future, err = azure.NewFutureFromResponse(resp)
- return
-}
-
-// CreateOrUpdateAtManagementGroupScopeResponder handles the response to the CreateOrUpdateAtManagementGroupScope request. The method always
-// closes the http.Response Body.
-func (client DeploymentsClient) CreateOrUpdateAtManagementGroupScopeResponder(resp *http.Response) (result DeploymentExtended, err error) {
- err = autorest.Respond(
- resp,
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
- autorest.ByUnmarshallingJSON(&result),
- autorest.ByClosing())
- result.Response = autorest.Response{Response: resp}
- return
-}
-
-// CreateOrUpdateAtSubscriptionScope you can provide the template and parameters directly in the request or link to
-// JSON files.
-// Parameters:
-// deploymentName - the name of the deployment.
-// parameters - additional parameters supplied to the operation.
-func (client DeploymentsClient) CreateOrUpdateAtSubscriptionScope(ctx context.Context, deploymentName string, parameters Deployment) (result DeploymentsCreateOrUpdateAtSubscriptionScopeFuture, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/DeploymentsClient.CreateOrUpdateAtSubscriptionScope")
- defer func() {
- sc := -1
- if result.Response() != nil {
- sc = result.Response().StatusCode
- }
- tracing.EndSpan(ctx, sc, err)
- }()
- }
- if err := validation.Validate([]validation.Validation{
- {TargetValue: deploymentName,
- Constraints: []validation.Constraint{{Target: "deploymentName", Name: validation.MaxLength, Rule: 64, Chain: nil},
- {Target: "deploymentName", Name: validation.MinLength, Rule: 1, Chain: nil},
- {Target: "deploymentName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}},
- {TargetValue: parameters,
- Constraints: []validation.Constraint{{Target: "parameters.Properties", Name: validation.Null, Rule: true,
- Chain: []validation.Constraint{{Target: "parameters.Properties.TemplateLink", Name: validation.Null, Rule: false,
- Chain: []validation.Constraint{{Target: "parameters.Properties.TemplateLink.URI", Name: validation.Null, Rule: true, Chain: nil}}},
- {Target: "parameters.Properties.ParametersLink", Name: validation.Null, Rule: false,
- Chain: []validation.Constraint{{Target: "parameters.Properties.ParametersLink.URI", Name: validation.Null, Rule: true, Chain: nil}}},
- }}}}}); err != nil {
- return result, validation.NewError("resources.DeploymentsClient", "CreateOrUpdateAtSubscriptionScope", err.Error())
- }
-
- req, err := client.CreateOrUpdateAtSubscriptionScopePreparer(ctx, deploymentName, parameters)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "CreateOrUpdateAtSubscriptionScope", nil, "Failure preparing request")
- return
- }
-
- result, err = client.CreateOrUpdateAtSubscriptionScopeSender(req)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "CreateOrUpdateAtSubscriptionScope", result.Response(), "Failure sending request")
- return
- }
-
- return
-}
-
-// CreateOrUpdateAtSubscriptionScopePreparer prepares the CreateOrUpdateAtSubscriptionScope request.
-func (client DeploymentsClient) CreateOrUpdateAtSubscriptionScopePreparer(ctx context.Context, deploymentName string, parameters Deployment) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "deploymentName": autorest.Encode("path", deploymentName),
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- }
-
- const APIVersion = "2019-05-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}/providers/Microsoft.Resources/deployments/{deploymentName}", pathParameters),
- autorest.WithJSON(parameters),
- autorest.WithQueryParameters(queryParameters))
- return preparer.Prepare((&http.Request{}).WithContext(ctx))
-}
-
-// CreateOrUpdateAtSubscriptionScopeSender sends the CreateOrUpdateAtSubscriptionScope request. The method will close the
-// http.Response Body if it receives an error.
-func (client DeploymentsClient) CreateOrUpdateAtSubscriptionScopeSender(req *http.Request) (future DeploymentsCreateOrUpdateAtSubscriptionScopeFuture, err error) {
- var resp *http.Response
- resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
- if err != nil {
- return
- }
- future.Future, err = azure.NewFutureFromResponse(resp)
- return
-}
-
-// CreateOrUpdateAtSubscriptionScopeResponder handles the response to the CreateOrUpdateAtSubscriptionScope request. The method always
-// closes the http.Response Body.
-func (client DeploymentsClient) CreateOrUpdateAtSubscriptionScopeResponder(resp *http.Response) (result DeploymentExtended, 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 a template deployment that is currently running cannot be deleted. Deleting a template deployment removes the
-// associated deployment operations. Deleting a template deployment does not affect the state of the resource group.
-// This is an asynchronous operation that returns a status of 202 until the template deployment is successfully
-// deleted. The Location response header contains the URI that is used to obtain the status of the process. While the
-// process is running, a call to the URI in the Location header returns a status of 202. When the process finishes, the
-// URI in the Location header returns a status of 204 on success. If the asynchronous request failed, the URI in the
-// Location header returns an error-level status code.
-// Parameters:
-// resourceGroupName - the name of the resource group with the deployment to delete. The name is case
-// insensitive.
-// deploymentName - the name of the deployment.
-func (client DeploymentsClient) Delete(ctx context.Context, resourceGroupName string, deploymentName string) (result DeploymentsDeleteFuture, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/DeploymentsClient.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.MaxLength, Rule: 90, Chain: nil},
- {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
- {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\p{L}\._\(\)\w]+$`, Chain: nil}}},
- {TargetValue: deploymentName,
- Constraints: []validation.Constraint{{Target: "deploymentName", Name: validation.MaxLength, Rule: 64, Chain: nil},
- {Target: "deploymentName", Name: validation.MinLength, Rule: 1, Chain: nil},
- {Target: "deploymentName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil {
- return result, validation.NewError("resources.DeploymentsClient", "Delete", err.Error())
- }
-
- req, err := client.DeletePreparer(ctx, resourceGroupName, deploymentName)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "Delete", nil, "Failure preparing request")
- return
- }
-
- result, err = client.DeleteSender(req)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "Delete", result.Response(), "Failure sending request")
- return
- }
-
- return
-}
-
-// DeletePreparer prepares the Delete request.
-func (client DeploymentsClient) DeletePreparer(ctx context.Context, resourceGroupName string, deploymentName string) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "deploymentName": autorest.Encode("path", deploymentName),
- "resourceGroupName": autorest.Encode("path", resourceGroupName),
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- }
-
- const APIVersion = "2019-05-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.Resources/deployments/{deploymentName}", 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 DeploymentsClient) DeleteSender(req *http.Request) (future DeploymentsDeleteFuture, err error) {
- var resp *http.Response
- resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
- if err != nil {
- return
- }
- future.Future, err = azure.NewFutureFromResponse(resp)
- return
-}
-
-// DeleteResponder handles the response to the Delete request. The method always
-// closes the http.Response Body.
-func (client DeploymentsClient) 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
-}
-
-// DeleteAtManagementGroupScope a template deployment that is currently running cannot be deleted. Deleting a template
-// deployment removes the associated deployment operations. This is an asynchronous operation that returns a status of
-// 202 until the template deployment is successfully deleted. The Location response header contains the URI that is
-// used to obtain the status of the process. While the process is running, a call to the URI in the Location header
-// returns a status of 202. When the process finishes, the URI in the Location header returns a status of 204 on
-// success. If the asynchronous request failed, the URI in the Location header returns an error-level status code.
-// Parameters:
-// groupID - the management group ID.
-// deploymentName - the name of the deployment.
-func (client DeploymentsClient) DeleteAtManagementGroupScope(ctx context.Context, groupID string, deploymentName string) (result DeploymentsDeleteAtManagementGroupScopeFuture, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/DeploymentsClient.DeleteAtManagementGroupScope")
- defer func() {
- sc := -1
- if result.Response() != nil {
- sc = result.Response().StatusCode
- }
- tracing.EndSpan(ctx, sc, err)
- }()
- }
- if err := validation.Validate([]validation.Validation{
- {TargetValue: groupID,
- Constraints: []validation.Constraint{{Target: "groupID", Name: validation.MaxLength, Rule: 90, Chain: nil},
- {Target: "groupID", Name: validation.MinLength, Rule: 1, Chain: nil}}},
- {TargetValue: deploymentName,
- Constraints: []validation.Constraint{{Target: "deploymentName", Name: validation.MaxLength, Rule: 64, Chain: nil},
- {Target: "deploymentName", Name: validation.MinLength, Rule: 1, Chain: nil},
- {Target: "deploymentName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil {
- return result, validation.NewError("resources.DeploymentsClient", "DeleteAtManagementGroupScope", err.Error())
- }
-
- req, err := client.DeleteAtManagementGroupScopePreparer(ctx, groupID, deploymentName)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "DeleteAtManagementGroupScope", nil, "Failure preparing request")
- return
- }
-
- result, err = client.DeleteAtManagementGroupScopeSender(req)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "DeleteAtManagementGroupScope", result.Response(), "Failure sending request")
- return
- }
-
- return
-}
-
-// DeleteAtManagementGroupScopePreparer prepares the DeleteAtManagementGroupScope request.
-func (client DeploymentsClient) DeleteAtManagementGroupScopePreparer(ctx context.Context, groupID string, deploymentName string) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "deploymentName": autorest.Encode("path", deploymentName),
- "groupId": autorest.Encode("path", groupID),
- }
-
- const APIVersion = "2019-05-01"
- queryParameters := map[string]interface{}{
- "api-version": APIVersion,
- }
-
- preparer := autorest.CreatePreparer(
- autorest.AsDelete(),
- autorest.WithBaseURL(client.BaseURI),
- autorest.WithPathParameters("/providers/Microsoft.Management/managementGroups/{groupId}/providers/Microsoft.Resources/deployments/{deploymentName}", pathParameters),
- autorest.WithQueryParameters(queryParameters))
- return preparer.Prepare((&http.Request{}).WithContext(ctx))
-}
-
-// DeleteAtManagementGroupScopeSender sends the DeleteAtManagementGroupScope request. The method will close the
-// http.Response Body if it receives an error.
-func (client DeploymentsClient) DeleteAtManagementGroupScopeSender(req *http.Request) (future DeploymentsDeleteAtManagementGroupScopeFuture, err error) {
- var resp *http.Response
- resp, err = client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
- if err != nil {
- return
- }
- future.Future, err = azure.NewFutureFromResponse(resp)
- return
-}
-
-// DeleteAtManagementGroupScopeResponder handles the response to the DeleteAtManagementGroupScope request. The method always
-// closes the http.Response Body.
-func (client DeploymentsClient) DeleteAtManagementGroupScopeResponder(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
-}
-
-// DeleteAtSubscriptionScope a template deployment that is currently running cannot be deleted. Deleting a template
-// deployment removes the associated deployment operations. This is an asynchronous operation that returns a status of
-// 202 until the template deployment is successfully deleted. The Location response header contains the URI that is
-// used to obtain the status of the process. While the process is running, a call to the URI in the Location header
-// returns a status of 202. When the process finishes, the URI in the Location header returns a status of 204 on
-// success. If the asynchronous request failed, the URI in the Location header returns an error-level status code.
-// Parameters:
-// deploymentName - the name of the deployment.
-func (client DeploymentsClient) DeleteAtSubscriptionScope(ctx context.Context, deploymentName string) (result DeploymentsDeleteAtSubscriptionScopeFuture, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/DeploymentsClient.DeleteAtSubscriptionScope")
- defer func() {
- sc := -1
- if result.Response() != nil {
- sc = result.Response().StatusCode
- }
- tracing.EndSpan(ctx, sc, err)
- }()
- }
- if err := validation.Validate([]validation.Validation{
- {TargetValue: deploymentName,
- Constraints: []validation.Constraint{{Target: "deploymentName", Name: validation.MaxLength, Rule: 64, Chain: nil},
- {Target: "deploymentName", Name: validation.MinLength, Rule: 1, Chain: nil},
- {Target: "deploymentName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil {
- return result, validation.NewError("resources.DeploymentsClient", "DeleteAtSubscriptionScope", err.Error())
- }
-
- req, err := client.DeleteAtSubscriptionScopePreparer(ctx, deploymentName)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "DeleteAtSubscriptionScope", nil, "Failure preparing request")
- return
- }
-
- result, err = client.DeleteAtSubscriptionScopeSender(req)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "DeleteAtSubscriptionScope", result.Response(), "Failure sending request")
- return
- }
-
- return
-}
-
-// DeleteAtSubscriptionScopePreparer prepares the DeleteAtSubscriptionScope request.
-func (client DeploymentsClient) DeleteAtSubscriptionScopePreparer(ctx context.Context, deploymentName string) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "deploymentName": autorest.Encode("path", deploymentName),
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- }
-
- const APIVersion = "2019-05-01"
- queryParameters := map[string]interface{}{
- "api-version": APIVersion,
- }
-
- preparer := autorest.CreatePreparer(
- autorest.AsDelete(),
- autorest.WithBaseURL(client.BaseURI),
- autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Resources/deployments/{deploymentName}", pathParameters),
- autorest.WithQueryParameters(queryParameters))
- return preparer.Prepare((&http.Request{}).WithContext(ctx))
-}
-
-// DeleteAtSubscriptionScopeSender sends the DeleteAtSubscriptionScope request. The method will close the
-// http.Response Body if it receives an error.
-func (client DeploymentsClient) DeleteAtSubscriptionScopeSender(req *http.Request) (future DeploymentsDeleteAtSubscriptionScopeFuture, err error) {
- var resp *http.Response
- resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
- if err != nil {
- return
- }
- future.Future, err = azure.NewFutureFromResponse(resp)
- return
-}
-
-// DeleteAtSubscriptionScopeResponder handles the response to the DeleteAtSubscriptionScope request. The method always
-// closes the http.Response Body.
-func (client DeploymentsClient) DeleteAtSubscriptionScopeResponder(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
-}
-
-// ExportTemplate exports the template used for specified deployment.
-// Parameters:
-// resourceGroupName - the name of the resource group. The name is case insensitive.
-// deploymentName - the name of the deployment.
-func (client DeploymentsClient) ExportTemplate(ctx context.Context, resourceGroupName string, deploymentName string) (result DeploymentExportResult, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/DeploymentsClient.ExportTemplate")
- 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.MaxLength, Rule: 90, Chain: nil},
- {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
- {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\p{L}\._\(\)\w]+$`, Chain: nil}}},
- {TargetValue: deploymentName,
- Constraints: []validation.Constraint{{Target: "deploymentName", Name: validation.MaxLength, Rule: 64, Chain: nil},
- {Target: "deploymentName", Name: validation.MinLength, Rule: 1, Chain: nil},
- {Target: "deploymentName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil {
- return result, validation.NewError("resources.DeploymentsClient", "ExportTemplate", err.Error())
- }
-
- req, err := client.ExportTemplatePreparer(ctx, resourceGroupName, deploymentName)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "ExportTemplate", nil, "Failure preparing request")
- return
- }
-
- resp, err := client.ExportTemplateSender(req)
- if err != nil {
- result.Response = autorest.Response{Response: resp}
- err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "ExportTemplate", resp, "Failure sending request")
- return
- }
-
- result, err = client.ExportTemplateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "ExportTemplate", resp, "Failure responding to request")
- }
-
- return
-}
-
-// ExportTemplatePreparer prepares the ExportTemplate request.
-func (client DeploymentsClient) ExportTemplatePreparer(ctx context.Context, resourceGroupName string, deploymentName string) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "deploymentName": autorest.Encode("path", deploymentName),
- "resourceGroupName": autorest.Encode("path", resourceGroupName),
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- }
-
- const APIVersion = "2019-05-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.Resources/deployments/{deploymentName}/exportTemplate", pathParameters),
- autorest.WithQueryParameters(queryParameters))
- return preparer.Prepare((&http.Request{}).WithContext(ctx))
-}
-
-// ExportTemplateSender sends the ExportTemplate request. The method will close the
-// http.Response Body if it receives an error.
-func (client DeploymentsClient) ExportTemplateSender(req *http.Request) (*http.Response, error) {
- return client.Send(req, azure.DoRetryWithRegistration(client.Client))
-}
-
-// ExportTemplateResponder handles the response to the ExportTemplate request. The method always
-// closes the http.Response Body.
-func (client DeploymentsClient) ExportTemplateResponder(resp *http.Response) (result DeploymentExportResult, err error) {
- err = autorest.Respond(
- resp,
- azure.WithErrorUnlessStatusCode(http.StatusOK),
- autorest.ByUnmarshallingJSON(&result),
- autorest.ByClosing())
- result.Response = autorest.Response{Response: resp}
- return
-}
-
-// ExportTemplateAtManagementGroupScope exports the template used for specified deployment.
-// Parameters:
-// groupID - the management group ID.
-// deploymentName - the name of the deployment.
-func (client DeploymentsClient) ExportTemplateAtManagementGroupScope(ctx context.Context, groupID string, deploymentName string) (result DeploymentExportResult, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/DeploymentsClient.ExportTemplateAtManagementGroupScope")
- 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: groupID,
- Constraints: []validation.Constraint{{Target: "groupID", Name: validation.MaxLength, Rule: 90, Chain: nil},
- {Target: "groupID", Name: validation.MinLength, Rule: 1, Chain: nil}}},
- {TargetValue: deploymentName,
- Constraints: []validation.Constraint{{Target: "deploymentName", Name: validation.MaxLength, Rule: 64, Chain: nil},
- {Target: "deploymentName", Name: validation.MinLength, Rule: 1, Chain: nil},
- {Target: "deploymentName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil {
- return result, validation.NewError("resources.DeploymentsClient", "ExportTemplateAtManagementGroupScope", err.Error())
- }
-
- req, err := client.ExportTemplateAtManagementGroupScopePreparer(ctx, groupID, deploymentName)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "ExportTemplateAtManagementGroupScope", nil, "Failure preparing request")
- return
- }
-
- resp, err := client.ExportTemplateAtManagementGroupScopeSender(req)
- if err != nil {
- result.Response = autorest.Response{Response: resp}
- err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "ExportTemplateAtManagementGroupScope", resp, "Failure sending request")
- return
- }
-
- result, err = client.ExportTemplateAtManagementGroupScopeResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "ExportTemplateAtManagementGroupScope", resp, "Failure responding to request")
- }
-
- return
-}
-
-// ExportTemplateAtManagementGroupScopePreparer prepares the ExportTemplateAtManagementGroupScope request.
-func (client DeploymentsClient) ExportTemplateAtManagementGroupScopePreparer(ctx context.Context, groupID string, deploymentName string) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "deploymentName": autorest.Encode("path", deploymentName),
- "groupId": autorest.Encode("path", groupID),
- }
-
- const APIVersion = "2019-05-01"
- queryParameters := map[string]interface{}{
- "api-version": APIVersion,
- }
-
- preparer := autorest.CreatePreparer(
- autorest.AsPost(),
- autorest.WithBaseURL(client.BaseURI),
- autorest.WithPathParameters("/providers/Microsoft.Management/managementGroups/{groupId}/providers/Microsoft.Resources/deployments/{deploymentName}/exportTemplate", pathParameters),
- autorest.WithQueryParameters(queryParameters))
- return preparer.Prepare((&http.Request{}).WithContext(ctx))
-}
-
-// ExportTemplateAtManagementGroupScopeSender sends the ExportTemplateAtManagementGroupScope request. The method will close the
-// http.Response Body if it receives an error.
-func (client DeploymentsClient) ExportTemplateAtManagementGroupScopeSender(req *http.Request) (*http.Response, error) {
- return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
-}
-
-// ExportTemplateAtManagementGroupScopeResponder handles the response to the ExportTemplateAtManagementGroupScope request. The method always
-// closes the http.Response Body.
-func (client DeploymentsClient) ExportTemplateAtManagementGroupScopeResponder(resp *http.Response) (result DeploymentExportResult, err error) {
- err = autorest.Respond(
- resp,
- azure.WithErrorUnlessStatusCode(http.StatusOK),
- autorest.ByUnmarshallingJSON(&result),
- autorest.ByClosing())
- result.Response = autorest.Response{Response: resp}
- return
-}
-
-// ExportTemplateAtSubscriptionScope exports the template used for specified deployment.
-// Parameters:
-// deploymentName - the name of the deployment.
-func (client DeploymentsClient) ExportTemplateAtSubscriptionScope(ctx context.Context, deploymentName string) (result DeploymentExportResult, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/DeploymentsClient.ExportTemplateAtSubscriptionScope")
- 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: deploymentName,
- Constraints: []validation.Constraint{{Target: "deploymentName", Name: validation.MaxLength, Rule: 64, Chain: nil},
- {Target: "deploymentName", Name: validation.MinLength, Rule: 1, Chain: nil},
- {Target: "deploymentName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil {
- return result, validation.NewError("resources.DeploymentsClient", "ExportTemplateAtSubscriptionScope", err.Error())
- }
-
- req, err := client.ExportTemplateAtSubscriptionScopePreparer(ctx, deploymentName)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "ExportTemplateAtSubscriptionScope", nil, "Failure preparing request")
- return
- }
-
- resp, err := client.ExportTemplateAtSubscriptionScopeSender(req)
- if err != nil {
- result.Response = autorest.Response{Response: resp}
- err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "ExportTemplateAtSubscriptionScope", resp, "Failure sending request")
- return
- }
-
- result, err = client.ExportTemplateAtSubscriptionScopeResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "ExportTemplateAtSubscriptionScope", resp, "Failure responding to request")
- }
-
- return
-}
-
-// ExportTemplateAtSubscriptionScopePreparer prepares the ExportTemplateAtSubscriptionScope request.
-func (client DeploymentsClient) ExportTemplateAtSubscriptionScopePreparer(ctx context.Context, deploymentName string) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "deploymentName": autorest.Encode("path", deploymentName),
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- }
-
- const APIVersion = "2019-05-01"
- queryParameters := map[string]interface{}{
- "api-version": APIVersion,
- }
-
- preparer := autorest.CreatePreparer(
- autorest.AsPost(),
- autorest.WithBaseURL(client.BaseURI),
- autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Resources/deployments/{deploymentName}/exportTemplate", pathParameters),
- autorest.WithQueryParameters(queryParameters))
- return preparer.Prepare((&http.Request{}).WithContext(ctx))
-}
-
-// ExportTemplateAtSubscriptionScopeSender sends the ExportTemplateAtSubscriptionScope request. The method will close the
-// http.Response Body if it receives an error.
-func (client DeploymentsClient) ExportTemplateAtSubscriptionScopeSender(req *http.Request) (*http.Response, error) {
- return client.Send(req, azure.DoRetryWithRegistration(client.Client))
-}
-
-// ExportTemplateAtSubscriptionScopeResponder handles the response to the ExportTemplateAtSubscriptionScope request. The method always
-// closes the http.Response Body.
-func (client DeploymentsClient) ExportTemplateAtSubscriptionScopeResponder(resp *http.Response) (result DeploymentExportResult, err error) {
- err = autorest.Respond(
- resp,
- azure.WithErrorUnlessStatusCode(http.StatusOK),
- autorest.ByUnmarshallingJSON(&result),
- autorest.ByClosing())
- result.Response = autorest.Response{Response: resp}
- return
-}
-
-// Get gets a deployment.
-// Parameters:
-// resourceGroupName - the name of the resource group. The name is case insensitive.
-// deploymentName - the name of the deployment.
-func (client DeploymentsClient) Get(ctx context.Context, resourceGroupName string, deploymentName string) (result DeploymentExtended, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/DeploymentsClient.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.MaxLength, Rule: 90, Chain: nil},
- {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
- {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\p{L}\._\(\)\w]+$`, Chain: nil}}},
- {TargetValue: deploymentName,
- Constraints: []validation.Constraint{{Target: "deploymentName", Name: validation.MaxLength, Rule: 64, Chain: nil},
- {Target: "deploymentName", Name: validation.MinLength, Rule: 1, Chain: nil},
- {Target: "deploymentName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil {
- return result, validation.NewError("resources.DeploymentsClient", "Get", err.Error())
- }
-
- req, err := client.GetPreparer(ctx, resourceGroupName, deploymentName)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "Get", nil, "Failure preparing request")
- return
- }
-
- resp, err := client.GetSender(req)
- if err != nil {
- result.Response = autorest.Response{Response: resp}
- err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "Get", resp, "Failure sending request")
- return
- }
-
- result, err = client.GetResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "Get", resp, "Failure responding to request")
- }
-
- return
-}
-
-// GetPreparer prepares the Get request.
-func (client DeploymentsClient) GetPreparer(ctx context.Context, resourceGroupName string, deploymentName string) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "deploymentName": autorest.Encode("path", deploymentName),
- "resourceGroupName": autorest.Encode("path", resourceGroupName),
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- }
-
- const APIVersion = "2019-05-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.Resources/deployments/{deploymentName}", 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 DeploymentsClient) 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 DeploymentsClient) GetResponder(resp *http.Response) (result DeploymentExtended, err error) {
- err = autorest.Respond(
- resp,
- azure.WithErrorUnlessStatusCode(http.StatusOK),
- autorest.ByUnmarshallingJSON(&result),
- autorest.ByClosing())
- result.Response = autorest.Response{Response: resp}
- return
-}
-
-// GetAtManagementGroupScope gets a deployment.
-// Parameters:
-// groupID - the management group ID.
-// deploymentName - the name of the deployment.
-func (client DeploymentsClient) GetAtManagementGroupScope(ctx context.Context, groupID string, deploymentName string) (result DeploymentExtended, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/DeploymentsClient.GetAtManagementGroupScope")
- 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: groupID,
- Constraints: []validation.Constraint{{Target: "groupID", Name: validation.MaxLength, Rule: 90, Chain: nil},
- {Target: "groupID", Name: validation.MinLength, Rule: 1, Chain: nil}}},
- {TargetValue: deploymentName,
- Constraints: []validation.Constraint{{Target: "deploymentName", Name: validation.MaxLength, Rule: 64, Chain: nil},
- {Target: "deploymentName", Name: validation.MinLength, Rule: 1, Chain: nil},
- {Target: "deploymentName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil {
- return result, validation.NewError("resources.DeploymentsClient", "GetAtManagementGroupScope", err.Error())
- }
-
- req, err := client.GetAtManagementGroupScopePreparer(ctx, groupID, deploymentName)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "GetAtManagementGroupScope", nil, "Failure preparing request")
- return
- }
-
- resp, err := client.GetAtManagementGroupScopeSender(req)
- if err != nil {
- result.Response = autorest.Response{Response: resp}
- err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "GetAtManagementGroupScope", resp, "Failure sending request")
- return
- }
-
- result, err = client.GetAtManagementGroupScopeResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "GetAtManagementGroupScope", resp, "Failure responding to request")
- }
-
- return
-}
-
-// GetAtManagementGroupScopePreparer prepares the GetAtManagementGroupScope request.
-func (client DeploymentsClient) GetAtManagementGroupScopePreparer(ctx context.Context, groupID string, deploymentName string) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "deploymentName": autorest.Encode("path", deploymentName),
- "groupId": autorest.Encode("path", groupID),
- }
-
- const APIVersion = "2019-05-01"
- queryParameters := map[string]interface{}{
- "api-version": APIVersion,
- }
-
- preparer := autorest.CreatePreparer(
- autorest.AsGet(),
- autorest.WithBaseURL(client.BaseURI),
- autorest.WithPathParameters("/providers/Microsoft.Management/managementGroups/{groupId}/providers/Microsoft.Resources/deployments/{deploymentName}", pathParameters),
- autorest.WithQueryParameters(queryParameters))
- return preparer.Prepare((&http.Request{}).WithContext(ctx))
-}
-
-// GetAtManagementGroupScopeSender sends the GetAtManagementGroupScope request. The method will close the
-// http.Response Body if it receives an error.
-func (client DeploymentsClient) GetAtManagementGroupScopeSender(req *http.Request) (*http.Response, error) {
- return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
-}
-
-// GetAtManagementGroupScopeResponder handles the response to the GetAtManagementGroupScope request. The method always
-// closes the http.Response Body.
-func (client DeploymentsClient) GetAtManagementGroupScopeResponder(resp *http.Response) (result DeploymentExtended, err error) {
- err = autorest.Respond(
- resp,
- azure.WithErrorUnlessStatusCode(http.StatusOK),
- autorest.ByUnmarshallingJSON(&result),
- autorest.ByClosing())
- result.Response = autorest.Response{Response: resp}
- return
-}
-
-// GetAtSubscriptionScope gets a deployment.
-// Parameters:
-// deploymentName - the name of the deployment.
-func (client DeploymentsClient) GetAtSubscriptionScope(ctx context.Context, deploymentName string) (result DeploymentExtended, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/DeploymentsClient.GetAtSubscriptionScope")
- 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: deploymentName,
- Constraints: []validation.Constraint{{Target: "deploymentName", Name: validation.MaxLength, Rule: 64, Chain: nil},
- {Target: "deploymentName", Name: validation.MinLength, Rule: 1, Chain: nil},
- {Target: "deploymentName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil {
- return result, validation.NewError("resources.DeploymentsClient", "GetAtSubscriptionScope", err.Error())
- }
-
- req, err := client.GetAtSubscriptionScopePreparer(ctx, deploymentName)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "GetAtSubscriptionScope", nil, "Failure preparing request")
- return
- }
-
- resp, err := client.GetAtSubscriptionScopeSender(req)
- if err != nil {
- result.Response = autorest.Response{Response: resp}
- err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "GetAtSubscriptionScope", resp, "Failure sending request")
- return
- }
-
- result, err = client.GetAtSubscriptionScopeResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "GetAtSubscriptionScope", resp, "Failure responding to request")
- }
-
- return
-}
-
-// GetAtSubscriptionScopePreparer prepares the GetAtSubscriptionScope request.
-func (client DeploymentsClient) GetAtSubscriptionScopePreparer(ctx context.Context, deploymentName string) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "deploymentName": autorest.Encode("path", deploymentName),
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- }
-
- const APIVersion = "2019-05-01"
- queryParameters := map[string]interface{}{
- "api-version": APIVersion,
- }
-
- preparer := autorest.CreatePreparer(
- autorest.AsGet(),
- autorest.WithBaseURL(client.BaseURI),
- autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Resources/deployments/{deploymentName}", pathParameters),
- autorest.WithQueryParameters(queryParameters))
- return preparer.Prepare((&http.Request{}).WithContext(ctx))
-}
-
-// GetAtSubscriptionScopeSender sends the GetAtSubscriptionScope request. The method will close the
-// http.Response Body if it receives an error.
-func (client DeploymentsClient) GetAtSubscriptionScopeSender(req *http.Request) (*http.Response, error) {
- return client.Send(req, azure.DoRetryWithRegistration(client.Client))
-}
-
-// GetAtSubscriptionScopeResponder handles the response to the GetAtSubscriptionScope request. The method always
-// closes the http.Response Body.
-func (client DeploymentsClient) GetAtSubscriptionScopeResponder(resp *http.Response) (result DeploymentExtended, err error) {
- err = autorest.Respond(
- resp,
- azure.WithErrorUnlessStatusCode(http.StatusOK),
- autorest.ByUnmarshallingJSON(&result),
- autorest.ByClosing())
- result.Response = autorest.Response{Response: resp}
- return
-}
-
-// ListAtManagementGroupScope get all the deployments for a management group.
-// Parameters:
-// groupID - the management group ID.
-// filter - the filter to apply on the operation. For example, you can use $filter=provisioningState eq
-// '{state}'.
-// top - the number of results to get. If null is passed, returns all deployments.
-func (client DeploymentsClient) ListAtManagementGroupScope(ctx context.Context, groupID string, filter string, top *int32) (result DeploymentListResultPage, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/DeploymentsClient.ListAtManagementGroupScope")
- defer func() {
- sc := -1
- if result.dlr.Response.Response != nil {
- sc = result.dlr.Response.Response.StatusCode
- }
- tracing.EndSpan(ctx, sc, err)
- }()
- }
- if err := validation.Validate([]validation.Validation{
- {TargetValue: groupID,
- Constraints: []validation.Constraint{{Target: "groupID", Name: validation.MaxLength, Rule: 90, Chain: nil},
- {Target: "groupID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
- return result, validation.NewError("resources.DeploymentsClient", "ListAtManagementGroupScope", err.Error())
- }
-
- result.fn = client.listAtManagementGroupScopeNextResults
- req, err := client.ListAtManagementGroupScopePreparer(ctx, groupID, filter, top)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "ListAtManagementGroupScope", nil, "Failure preparing request")
- return
- }
-
- resp, err := client.ListAtManagementGroupScopeSender(req)
- if err != nil {
- result.dlr.Response = autorest.Response{Response: resp}
- err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "ListAtManagementGroupScope", resp, "Failure sending request")
- return
- }
-
- result.dlr, err = client.ListAtManagementGroupScopeResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "ListAtManagementGroupScope", resp, "Failure responding to request")
- }
- if result.dlr.hasNextLink() && result.dlr.IsEmpty() {
- err = result.NextWithContext(ctx)
- }
-
- return
-}
-
-// ListAtManagementGroupScopePreparer prepares the ListAtManagementGroupScope request.
-func (client DeploymentsClient) ListAtManagementGroupScopePreparer(ctx context.Context, groupID string, filter string, top *int32) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "groupId": autorest.Encode("path", groupID),
- }
-
- const APIVersion = "2019-05-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)
- }
-
- preparer := autorest.CreatePreparer(
- autorest.AsGet(),
- autorest.WithBaseURL(client.BaseURI),
- autorest.WithPathParameters("/providers/Microsoft.Management/managementGroups/{groupId}/providers/Microsoft.Resources/deployments/", pathParameters),
- autorest.WithQueryParameters(queryParameters))
- return preparer.Prepare((&http.Request{}).WithContext(ctx))
-}
-
-// ListAtManagementGroupScopeSender sends the ListAtManagementGroupScope request. The method will close the
-// http.Response Body if it receives an error.
-func (client DeploymentsClient) ListAtManagementGroupScopeSender(req *http.Request) (*http.Response, error) {
- return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
-}
-
-// ListAtManagementGroupScopeResponder handles the response to the ListAtManagementGroupScope request. The method always
-// closes the http.Response Body.
-func (client DeploymentsClient) ListAtManagementGroupScopeResponder(resp *http.Response) (result DeploymentListResult, err error) {
- err = autorest.Respond(
- resp,
- azure.WithErrorUnlessStatusCode(http.StatusOK),
- autorest.ByUnmarshallingJSON(&result),
- autorest.ByClosing())
- result.Response = autorest.Response{Response: resp}
- return
-}
-
-// listAtManagementGroupScopeNextResults retrieves the next set of results, if any.
-func (client DeploymentsClient) listAtManagementGroupScopeNextResults(ctx context.Context, lastResults DeploymentListResult) (result DeploymentListResult, err error) {
- req, err := lastResults.deploymentListResultPreparer(ctx)
- if err != nil {
- return result, autorest.NewErrorWithError(err, "resources.DeploymentsClient", "listAtManagementGroupScopeNextResults", nil, "Failure preparing next results request")
- }
- if req == nil {
- return
- }
- resp, err := client.ListAtManagementGroupScopeSender(req)
- if err != nil {
- result.Response = autorest.Response{Response: resp}
- return result, autorest.NewErrorWithError(err, "resources.DeploymentsClient", "listAtManagementGroupScopeNextResults", resp, "Failure sending next results request")
- }
- result, err = client.ListAtManagementGroupScopeResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "listAtManagementGroupScopeNextResults", resp, "Failure responding to next results request")
- }
- return
-}
-
-// ListAtManagementGroupScopeComplete enumerates all values, automatically crossing page boundaries as required.
-func (client DeploymentsClient) ListAtManagementGroupScopeComplete(ctx context.Context, groupID string, filter string, top *int32) (result DeploymentListResultIterator, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/DeploymentsClient.ListAtManagementGroupScope")
- 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.ListAtManagementGroupScope(ctx, groupID, filter, top)
- return
-}
-
-// ListAtSubscriptionScope get all the deployments for a subscription.
-// Parameters:
-// filter - the filter to apply on the operation. For example, you can use $filter=provisioningState eq
-// '{state}'.
-// top - the number of results to get. If null is passed, returns all deployments.
-func (client DeploymentsClient) ListAtSubscriptionScope(ctx context.Context, filter string, top *int32) (result DeploymentListResultPage, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/DeploymentsClient.ListAtSubscriptionScope")
- defer func() {
- sc := -1
- if result.dlr.Response.Response != nil {
- sc = result.dlr.Response.Response.StatusCode
- }
- tracing.EndSpan(ctx, sc, err)
- }()
- }
- result.fn = client.listAtSubscriptionScopeNextResults
- req, err := client.ListAtSubscriptionScopePreparer(ctx, filter, top)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "ListAtSubscriptionScope", nil, "Failure preparing request")
- return
- }
-
- resp, err := client.ListAtSubscriptionScopeSender(req)
- if err != nil {
- result.dlr.Response = autorest.Response{Response: resp}
- err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "ListAtSubscriptionScope", resp, "Failure sending request")
- return
- }
-
- result.dlr, err = client.ListAtSubscriptionScopeResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "ListAtSubscriptionScope", resp, "Failure responding to request")
- }
- if result.dlr.hasNextLink() && result.dlr.IsEmpty() {
- err = result.NextWithContext(ctx)
- }
-
- return
-}
-
-// ListAtSubscriptionScopePreparer prepares the ListAtSubscriptionScope request.
-func (client DeploymentsClient) ListAtSubscriptionScopePreparer(ctx context.Context, filter string, top *int32) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- }
-
- const APIVersion = "2019-05-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)
- }
-
- preparer := autorest.CreatePreparer(
- autorest.AsGet(),
- autorest.WithBaseURL(client.BaseURI),
- autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Resources/deployments/", pathParameters),
- autorest.WithQueryParameters(queryParameters))
- return preparer.Prepare((&http.Request{}).WithContext(ctx))
-}
-
-// ListAtSubscriptionScopeSender sends the ListAtSubscriptionScope request. The method will close the
-// http.Response Body if it receives an error.
-func (client DeploymentsClient) ListAtSubscriptionScopeSender(req *http.Request) (*http.Response, error) {
- return client.Send(req, azure.DoRetryWithRegistration(client.Client))
-}
-
-// ListAtSubscriptionScopeResponder handles the response to the ListAtSubscriptionScope request. The method always
-// closes the http.Response Body.
-func (client DeploymentsClient) ListAtSubscriptionScopeResponder(resp *http.Response) (result DeploymentListResult, err error) {
- err = autorest.Respond(
- resp,
- azure.WithErrorUnlessStatusCode(http.StatusOK),
- autorest.ByUnmarshallingJSON(&result),
- autorest.ByClosing())
- result.Response = autorest.Response{Response: resp}
- return
-}
-
-// listAtSubscriptionScopeNextResults retrieves the next set of results, if any.
-func (client DeploymentsClient) listAtSubscriptionScopeNextResults(ctx context.Context, lastResults DeploymentListResult) (result DeploymentListResult, err error) {
- req, err := lastResults.deploymentListResultPreparer(ctx)
- if err != nil {
- return result, autorest.NewErrorWithError(err, "resources.DeploymentsClient", "listAtSubscriptionScopeNextResults", nil, "Failure preparing next results request")
- }
- if req == nil {
- return
- }
- resp, err := client.ListAtSubscriptionScopeSender(req)
- if err != nil {
- result.Response = autorest.Response{Response: resp}
- return result, autorest.NewErrorWithError(err, "resources.DeploymentsClient", "listAtSubscriptionScopeNextResults", resp, "Failure sending next results request")
- }
- result, err = client.ListAtSubscriptionScopeResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "listAtSubscriptionScopeNextResults", resp, "Failure responding to next results request")
- }
- return
-}
-
-// ListAtSubscriptionScopeComplete enumerates all values, automatically crossing page boundaries as required.
-func (client DeploymentsClient) ListAtSubscriptionScopeComplete(ctx context.Context, filter string, top *int32) (result DeploymentListResultIterator, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/DeploymentsClient.ListAtSubscriptionScope")
- 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.ListAtSubscriptionScope(ctx, filter, top)
- return
-}
-
-// ListByResourceGroup get all the deployments for a resource group.
-// Parameters:
-// resourceGroupName - the name of the resource group with the deployments to get. The name is case
-// insensitive.
-// filter - the filter to apply on the operation. For example, you can use $filter=provisioningState eq
-// '{state}'.
-// top - the number of results to get. If null is passed, returns all deployments.
-func (client DeploymentsClient) ListByResourceGroup(ctx context.Context, resourceGroupName string, filter string, top *int32) (result DeploymentListResultPage, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/DeploymentsClient.ListByResourceGroup")
- defer func() {
- sc := -1
- if result.dlr.Response.Response != nil {
- sc = result.dlr.Response.Response.StatusCode
- }
- tracing.EndSpan(ctx, sc, err)
- }()
- }
- if err := validation.Validate([]validation.Validation{
- {TargetValue: resourceGroupName,
- Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
- {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
- {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\p{L}\._\(\)\w]+$`, Chain: nil}}}}); err != nil {
- return result, validation.NewError("resources.DeploymentsClient", "ListByResourceGroup", err.Error())
- }
-
- result.fn = client.listByResourceGroupNextResults
- req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName, filter, top)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "ListByResourceGroup", nil, "Failure preparing request")
- return
- }
-
- resp, err := client.ListByResourceGroupSender(req)
- if err != nil {
- result.dlr.Response = autorest.Response{Response: resp}
- err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "ListByResourceGroup", resp, "Failure sending request")
- return
- }
-
- result.dlr, err = client.ListByResourceGroupResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "ListByResourceGroup", resp, "Failure responding to request")
- }
- if result.dlr.hasNextLink() && result.dlr.IsEmpty() {
- err = result.NextWithContext(ctx)
- }
-
- return
-}
-
-// ListByResourceGroupPreparer prepares the ListByResourceGroup request.
-func (client DeploymentsClient) ListByResourceGroupPreparer(ctx context.Context, resourceGroupName string, filter string, top *int32) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "resourceGroupName": autorest.Encode("path", resourceGroupName),
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- }
-
- const APIVersion = "2019-05-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)
- }
-
- preparer := autorest.CreatePreparer(
- autorest.AsGet(),
- autorest.WithBaseURL(client.BaseURI),
- autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/", 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 DeploymentsClient) 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 DeploymentsClient) ListByResourceGroupResponder(resp *http.Response) (result DeploymentListResult, 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 DeploymentsClient) listByResourceGroupNextResults(ctx context.Context, lastResults DeploymentListResult) (result DeploymentListResult, err error) {
- req, err := lastResults.deploymentListResultPreparer(ctx)
- if err != nil {
- return result, autorest.NewErrorWithError(err, "resources.DeploymentsClient", "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, "resources.DeploymentsClient", "listByResourceGroupNextResults", resp, "Failure sending next results request")
- }
- result, err = client.ListByResourceGroupResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request")
- }
- return
-}
-
-// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required.
-func (client DeploymentsClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, filter string, top *int32) (result DeploymentListResultIterator, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/DeploymentsClient.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, filter, top)
- return
-}
-
-// Validate validates whether the specified template is syntactically correct and will be accepted by Azure Resource
-// Manager..
-// Parameters:
-// resourceGroupName - the name of the resource group the template will be deployed to. The name is case
-// insensitive.
-// deploymentName - the name of the deployment.
-// parameters - parameters to validate.
-func (client DeploymentsClient) Validate(ctx context.Context, resourceGroupName string, deploymentName string, parameters Deployment) (result DeploymentValidateResult, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/DeploymentsClient.Validate")
- 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.MaxLength, Rule: 90, Chain: nil},
- {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
- {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\p{L}\._\(\)\w]+$`, Chain: nil}}},
- {TargetValue: deploymentName,
- Constraints: []validation.Constraint{{Target: "deploymentName", Name: validation.MaxLength, Rule: 64, Chain: nil},
- {Target: "deploymentName", Name: validation.MinLength, Rule: 1, Chain: nil},
- {Target: "deploymentName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}},
- {TargetValue: parameters,
- Constraints: []validation.Constraint{{Target: "parameters.Properties", Name: validation.Null, Rule: true,
- Chain: []validation.Constraint{{Target: "parameters.Properties.TemplateLink", Name: validation.Null, Rule: false,
- Chain: []validation.Constraint{{Target: "parameters.Properties.TemplateLink.URI", Name: validation.Null, Rule: true, Chain: nil}}},
- {Target: "parameters.Properties.ParametersLink", Name: validation.Null, Rule: false,
- Chain: []validation.Constraint{{Target: "parameters.Properties.ParametersLink.URI", Name: validation.Null, Rule: true, Chain: nil}}},
- }}}}}); err != nil {
- return result, validation.NewError("resources.DeploymentsClient", "Validate", err.Error())
- }
-
- req, err := client.ValidatePreparer(ctx, resourceGroupName, deploymentName, parameters)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "Validate", nil, "Failure preparing request")
- return
- }
-
- resp, err := client.ValidateSender(req)
- if err != nil {
- result.Response = autorest.Response{Response: resp}
- err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "Validate", resp, "Failure sending request")
- return
- }
-
- result, err = client.ValidateResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "Validate", resp, "Failure responding to request")
- }
-
- return
-}
-
-// ValidatePreparer prepares the Validate request.
-func (client DeploymentsClient) ValidatePreparer(ctx context.Context, resourceGroupName string, deploymentName string, parameters Deployment) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "deploymentName": autorest.Encode("path", deploymentName),
- "resourceGroupName": autorest.Encode("path", resourceGroupName),
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- }
-
- const APIVersion = "2019-05-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.Resources/deployments/{deploymentName}/validate", pathParameters),
- autorest.WithJSON(parameters),
- autorest.WithQueryParameters(queryParameters))
- return preparer.Prepare((&http.Request{}).WithContext(ctx))
-}
-
-// ValidateSender sends the Validate request. The method will close the
-// http.Response Body if it receives an error.
-func (client DeploymentsClient) ValidateSender(req *http.Request) (*http.Response, error) {
- return client.Send(req, azure.DoRetryWithRegistration(client.Client))
-}
-
-// ValidateResponder handles the response to the Validate request. The method always
-// closes the http.Response Body.
-func (client DeploymentsClient) ValidateResponder(resp *http.Response) (result DeploymentValidateResult, err error) {
- err = autorest.Respond(
- resp,
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusBadRequest),
- autorest.ByUnmarshallingJSON(&result),
- autorest.ByClosing())
- result.Response = autorest.Response{Response: resp}
- return
-}
-
-// ValidateAtManagementGroupScope validates whether the specified template is syntactically correct and will be
-// accepted by Azure Resource Manager..
-// Parameters:
-// groupID - the management group ID.
-// deploymentName - the name of the deployment.
-// parameters - parameters to validate.
-func (client DeploymentsClient) ValidateAtManagementGroupScope(ctx context.Context, groupID string, deploymentName string, parameters Deployment) (result DeploymentValidateResult, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/DeploymentsClient.ValidateAtManagementGroupScope")
- 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: groupID,
- Constraints: []validation.Constraint{{Target: "groupID", Name: validation.MaxLength, Rule: 90, Chain: nil},
- {Target: "groupID", Name: validation.MinLength, Rule: 1, Chain: nil}}},
- {TargetValue: deploymentName,
- Constraints: []validation.Constraint{{Target: "deploymentName", Name: validation.MaxLength, Rule: 64, Chain: nil},
- {Target: "deploymentName", Name: validation.MinLength, Rule: 1, Chain: nil},
- {Target: "deploymentName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}},
- {TargetValue: parameters,
- Constraints: []validation.Constraint{{Target: "parameters.Properties", Name: validation.Null, Rule: true,
- Chain: []validation.Constraint{{Target: "parameters.Properties.TemplateLink", Name: validation.Null, Rule: false,
- Chain: []validation.Constraint{{Target: "parameters.Properties.TemplateLink.URI", Name: validation.Null, Rule: true, Chain: nil}}},
- {Target: "parameters.Properties.ParametersLink", Name: validation.Null, Rule: false,
- Chain: []validation.Constraint{{Target: "parameters.Properties.ParametersLink.URI", Name: validation.Null, Rule: true, Chain: nil}}},
- }}}}}); err != nil {
- return result, validation.NewError("resources.DeploymentsClient", "ValidateAtManagementGroupScope", err.Error())
- }
-
- req, err := client.ValidateAtManagementGroupScopePreparer(ctx, groupID, deploymentName, parameters)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "ValidateAtManagementGroupScope", nil, "Failure preparing request")
- return
- }
-
- resp, err := client.ValidateAtManagementGroupScopeSender(req)
- if err != nil {
- result.Response = autorest.Response{Response: resp}
- err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "ValidateAtManagementGroupScope", resp, "Failure sending request")
- return
- }
-
- result, err = client.ValidateAtManagementGroupScopeResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "ValidateAtManagementGroupScope", resp, "Failure responding to request")
- }
-
- return
-}
-
-// ValidateAtManagementGroupScopePreparer prepares the ValidateAtManagementGroupScope request.
-func (client DeploymentsClient) ValidateAtManagementGroupScopePreparer(ctx context.Context, groupID string, deploymentName string, parameters Deployment) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "deploymentName": autorest.Encode("path", deploymentName),
- "groupId": autorest.Encode("path", groupID),
- }
-
- const APIVersion = "2019-05-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("/providers/Microsoft.Management/managementGroups/{groupId}/providers/Microsoft.Resources/deployments/{deploymentName}/validate", pathParameters),
- autorest.WithJSON(parameters),
- autorest.WithQueryParameters(queryParameters))
- return preparer.Prepare((&http.Request{}).WithContext(ctx))
-}
-
-// ValidateAtManagementGroupScopeSender sends the ValidateAtManagementGroupScope request. The method will close the
-// http.Response Body if it receives an error.
-func (client DeploymentsClient) ValidateAtManagementGroupScopeSender(req *http.Request) (*http.Response, error) {
- return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
-}
-
-// ValidateAtManagementGroupScopeResponder handles the response to the ValidateAtManagementGroupScope request. The method always
-// closes the http.Response Body.
-func (client DeploymentsClient) ValidateAtManagementGroupScopeResponder(resp *http.Response) (result DeploymentValidateResult, err error) {
- err = autorest.Respond(
- resp,
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusBadRequest),
- autorest.ByUnmarshallingJSON(&result),
- autorest.ByClosing())
- result.Response = autorest.Response{Response: resp}
- return
-}
-
-// ValidateAtSubscriptionScope validates whether the specified template is syntactically correct and will be accepted
-// by Azure Resource Manager..
-// Parameters:
-// deploymentName - the name of the deployment.
-// parameters - parameters to validate.
-func (client DeploymentsClient) ValidateAtSubscriptionScope(ctx context.Context, deploymentName string, parameters Deployment) (result DeploymentValidateResult, err error) {
- if tracing.IsEnabled() {
- ctx = tracing.StartSpan(ctx, fqdn+"/DeploymentsClient.ValidateAtSubscriptionScope")
- 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: deploymentName,
- Constraints: []validation.Constraint{{Target: "deploymentName", Name: validation.MaxLength, Rule: 64, Chain: nil},
- {Target: "deploymentName", Name: validation.MinLength, Rule: 1, Chain: nil},
- {Target: "deploymentName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}},
- {TargetValue: parameters,
- Constraints: []validation.Constraint{{Target: "parameters.Properties", Name: validation.Null, Rule: true,
- Chain: []validation.Constraint{{Target: "parameters.Properties.TemplateLink", Name: validation.Null, Rule: false,
- Chain: []validation.Constraint{{Target: "parameters.Properties.TemplateLink.URI", Name: validation.Null, Rule: true, Chain: nil}}},
- {Target: "parameters.Properties.ParametersLink", Name: validation.Null, Rule: false,
- Chain: []validation.Constraint{{Target: "parameters.Properties.ParametersLink.URI", Name: validation.Null, Rule: true, Chain: nil}}},
- }}}}}); err != nil {
- return result, validation.NewError("resources.DeploymentsClient", "ValidateAtSubscriptionScope", err.Error())
- }
-
- req, err := client.ValidateAtSubscriptionScopePreparer(ctx, deploymentName, parameters)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "ValidateAtSubscriptionScope", nil, "Failure preparing request")
- return
- }
-
- resp, err := client.ValidateAtSubscriptionScopeSender(req)
- if err != nil {
- result.Response = autorest.Response{Response: resp}
- err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "ValidateAtSubscriptionScope", resp, "Failure sending request")
- return
- }
-
- result, err = client.ValidateAtSubscriptionScopeResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "ValidateAtSubscriptionScope", resp, "Failure responding to request")
- }
-
- return
-}
-
-// ValidateAtSubscriptionScopePreparer prepares the ValidateAtSubscriptionScope request.
-func (client DeploymentsClient) ValidateAtSubscriptionScopePreparer(ctx context.Context, deploymentName string, parameters Deployment) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "deploymentName": autorest.Encode("path", deploymentName),
- "subscriptionId": autorest.Encode("path", client.SubscriptionID),
- }
-
- const APIVersion = "2019-05-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.Resources/deployments/{deploymentName}/validate", pathParameters),
- autorest.WithJSON(parameters),
- autorest.WithQueryParameters(queryParameters))
- return preparer.Prepare((&http.Request{}).WithContext(ctx))
-}
-
-// ValidateAtSubscriptionScopeSender sends the ValidateAtSubscriptionScope request. The method will close the
-// http.Response Body if it receives an error.
-func (client DeploymentsClient) ValidateAtSubscriptionScopeSender(req *http.Request) (*http.Response, error) {
- return client.Send(req, azure.DoRetryWithRegistration(client.Client))
-}
-
-// ValidateAtSubscriptionScopeResponder handles the response to the ValidateAtSubscriptionScope request. The method always
-// closes the http.Response Body.
-func (client DeploymentsClient) ValidateAtSubscriptionScopeResponder(resp *http.Response) (result DeploymentValidateResult, err error) {
- err = autorest.Respond(
- resp,
- azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusBadRequest),
- autorest.ByUnmarshallingJSON(&result),
- autorest.ByClosing())
- result.Response = autorest.Response{Response: resp}
- return
-}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/version/version.go b/vendor/github.com/Azure/azure-sdk-for-go/version/version.go
index 058279423aa..db97664ce9a 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/version/version.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/version/version.go
@@ -18,4 +18,4 @@ package version
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
// Number contains the semantic version of this SDK.
-const Number = "v45.0.0"
+const Number = "v51.2.0"
diff --git a/vendor/github.com/Azure/go-autorest/autorest/adal/devicetoken.go b/vendor/github.com/Azure/go-autorest/autorest/adal/devicetoken.go
index 914f8af5e4e..9daa4b58b88 100644
--- a/vendor/github.com/Azure/go-autorest/autorest/adal/devicetoken.go
+++ b/vendor/github.com/Azure/go-autorest/autorest/adal/devicetoken.go
@@ -222,6 +222,10 @@ func CheckForUserCompletionWithContext(ctx context.Context, sender Sender, code
case "code_expired":
return nil, ErrDeviceCodeExpired
default:
+ // return a more meaningful error message if available
+ if token.ErrorDescription != nil {
+ return nil, fmt.Errorf("%s %s: %s", logPrefix, *token.Error, *token.ErrorDescription)
+ }
return nil, ErrDeviceGeneric
}
}
diff --git a/vendor/github.com/Azure/go-autorest/autorest/adal/go.mod b/vendor/github.com/Azure/go-autorest/autorest/adal/go.mod
index a030eb42da8..8c5d36ca61d 100644
--- a/vendor/github.com/Azure/go-autorest/autorest/adal/go.mod
+++ b/vendor/github.com/Azure/go-autorest/autorest/adal/go.mod
@@ -3,10 +3,11 @@ module github.com/Azure/go-autorest/autorest/adal
go 1.12
require (
- github.com/Azure/go-autorest/autorest v0.9.0
- github.com/Azure/go-autorest/autorest/date v0.2.0
- github.com/Azure/go-autorest/autorest/mocks v0.3.0
- github.com/Azure/go-autorest/tracing v0.5.0
- github.com/dgrijalva/jwt-go v3.2.0+incompatible
- golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413
+ github.com/Azure/go-autorest v14.2.0+incompatible
+ github.com/Azure/go-autorest/autorest/date v0.3.0
+ github.com/Azure/go-autorest/autorest/mocks v0.4.1
+ github.com/Azure/go-autorest/logger v0.2.1
+ github.com/Azure/go-autorest/tracing v0.6.0
+ github.com/form3tech-oss/jwt-go v3.2.2+incompatible
+ golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0
)
diff --git a/vendor/github.com/Azure/go-autorest/autorest/adal/go.sum b/vendor/github.com/Azure/go-autorest/autorest/adal/go.sum
index e43cf6498d0..5ee68e70010 100644
--- a/vendor/github.com/Azure/go-autorest/autorest/adal/go.sum
+++ b/vendor/github.com/Azure/go-autorest/autorest/adal/go.sum
@@ -1,26 +1,19 @@
-github.com/Azure/go-autorest/autorest v0.9.0 h1:MRvx8gncNaXJqOoLmhNjUAKh33JJF8LyxPhomEtOsjs=
-github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI=
-github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0=
-github.com/Azure/go-autorest/autorest/date v0.1.0 h1:YGrhWfrgtFs84+h0o46rJrlmsZtyZRg470CqAXTZaGM=
-github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA=
-github.com/Azure/go-autorest/autorest/date v0.2.0 h1:yW+Zlqf26583pE43KhfnhFcdmSWlm5Ew6bxipnr/tbM=
-github.com/Azure/go-autorest/autorest/date v0.2.0/go.mod h1:vcORJHLJEh643/Ioh9+vPmf1Ij9AEBM5FuBIXLmIy0g=
-github.com/Azure/go-autorest/autorest/mocks v0.1.0 h1:Kx+AUU2Te+A3JIyYn6Dfs+cFgx5XorQKuIXrZGoq/SI=
-github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0=
-github.com/Azure/go-autorest/autorest/mocks v0.2.0 h1:Ww5g4zThfD/6cLb4z6xxgeyDa7QDkizMkJKe0ysZXp0=
-github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0=
-github.com/Azure/go-autorest/autorest/mocks v0.3.0 h1:qJumjCaCudz+OcqE9/XtEPfvtOjOmKaui4EOpFI6zZc=
-github.com/Azure/go-autorest/autorest/mocks v0.3.0/go.mod h1:a8FDP3DYzQ4RYfVAxAN3SVSiiO77gL2j2ronKKP0syM=
-github.com/Azure/go-autorest/logger v0.1.0 h1:ruG4BSDXONFRrZZJ2GUXDiUyVpayPmb1GnWeHDdaNKY=
-github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc=
-github.com/Azure/go-autorest/tracing v0.5.0 h1:TRn4WjSnkcSy5AEG3pnbtFSwNtwzjr4VYyQflFE619k=
-github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk=
-github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM=
-github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
+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/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/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 h1:VklqNMn3ovrHsnt90PveolxSbWFaJdECFbxSq0Mqo2M=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
-golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413 h1:ULYEB3JvPRE/IfO+9uO7vKV/xzVTO7XPAwm8xbf4w2g=
-golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
+golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0 h1:hb9wdF1z5waM+dSIICn1l0DkLVDT3hqhhQsDNUmHPRE=
+golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a h1:1BGLXjeY4akVXGgbC9HugT3Jv3hCI0z56oJR5vAMgBU=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
diff --git a/vendor/github.com/Azure/go-autorest/autorest/adal/go_mod_tidy_hack.go b/vendor/github.com/Azure/go-autorest/autorest/adal/go_mod_tidy_hack.go
index 28a4bfc4c43..7551b79235d 100644
--- a/vendor/github.com/Azure/go-autorest/autorest/adal/go_mod_tidy_hack.go
+++ b/vendor/github.com/Azure/go-autorest/autorest/adal/go_mod_tidy_hack.go
@@ -16,9 +16,9 @@ package adal
// See the License for the specific language governing permissions and
// limitations under the License.
-// This file, and the github.com/Azure/go-autorest/autorest import, won't actually become part of
+// This file, and the github.com/Azure/go-autorest import, won't actually become part of
// the resultant binary.
// Necessary for safely adding multi-module repo.
// See: https://github.com/golang/go/wiki/Modules#is-it-possible-to-add-a-module-to-a-multi-module-repository
-import _ "github.com/Azure/go-autorest/autorest"
+import _ "github.com/Azure/go-autorest"
diff --git a/vendor/github.com/Azure/go-autorest/autorest/adal/persist.go b/vendor/github.com/Azure/go-autorest/autorest/adal/persist.go
index 9e15f2751f2..2a974a39b3c 100644
--- a/vendor/github.com/Azure/go-autorest/autorest/adal/persist.go
+++ b/vendor/github.com/Azure/go-autorest/autorest/adal/persist.go
@@ -15,11 +15,24 @@ package adal
// limitations under the License.
import (
+ "crypto/rsa"
+ "crypto/x509"
"encoding/json"
+ "errors"
"fmt"
"io/ioutil"
"os"
"path/filepath"
+
+ "golang.org/x/crypto/pkcs12"
+)
+
+var (
+ // ErrMissingCertificate is returned when no local certificate is found in the provided PFX data.
+ ErrMissingCertificate = errors.New("adal: certificate missing")
+
+ // ErrMissingPrivateKey is returned when no private key is found in the provided PFX data.
+ ErrMissingPrivateKey = errors.New("adal: private key missing")
)
// LoadToken restores a Token object from a file located at 'path'.
@@ -71,3 +84,52 @@ func SaveToken(path string, mode os.FileMode, token Token) error {
}
return nil
}
+
+// DecodePfxCertificateData extracts the x509 certificate and RSA private key from the provided PFX data.
+// The PFX data must contain a private key along with a certificate whose public key matches that of the
+// private key or an error is returned.
+// If the private key is not password protected pass the empty string for password.
+func DecodePfxCertificateData(pfxData []byte, password string) (*x509.Certificate, *rsa.PrivateKey, error) {
+ blocks, err := pkcs12.ToPEM(pfxData, password)
+ if err != nil {
+ return nil, nil, err
+ }
+ // first extract the private key
+ var priv *rsa.PrivateKey
+ for _, block := range blocks {
+ if block.Type == "PRIVATE KEY" {
+ priv, err = x509.ParsePKCS1PrivateKey(block.Bytes)
+ if err != nil {
+ return nil, nil, err
+ }
+ break
+ }
+ }
+ if priv == nil {
+ return nil, nil, ErrMissingPrivateKey
+ }
+ // now find the certificate with the matching public key of our private key
+ var cert *x509.Certificate
+ for _, block := range blocks {
+ if block.Type == "CERTIFICATE" {
+ pcert, err := x509.ParseCertificate(block.Bytes)
+ if err != nil {
+ return nil, nil, err
+ }
+ certKey, ok := pcert.PublicKey.(*rsa.PublicKey)
+ if !ok {
+ // keep looking
+ continue
+ }
+ if priv.E == certKey.E && priv.N.Cmp(certKey.N) == 0 {
+ // found a match
+ cert = pcert
+ break
+ }
+ }
+ }
+ if cert == nil {
+ return nil, nil, ErrMissingCertificate
+ }
+ return cert, priv, nil
+}
diff --git a/vendor/github.com/Azure/go-autorest/autorest/adal/sender.go b/vendor/github.com/Azure/go-autorest/autorest/adal/sender.go
index d7e4372bbc5..1826a68dc82 100644
--- a/vendor/github.com/Azure/go-autorest/autorest/adal/sender.go
+++ b/vendor/github.com/Azure/go-autorest/autorest/adal/sender.go
@@ -28,6 +28,7 @@ const (
mimeTypeFormPost = "application/x-www-form-urlencoded"
)
+// DO NOT ACCESS THIS DIRECTLY. go through sender()
var defaultSender Sender
var defaultSenderInit = &sync.Once{}
diff --git a/vendor/github.com/Azure/go-autorest/autorest/adal/token.go b/vendor/github.com/Azure/go-autorest/autorest/adal/token.go
index b65b2c8b206..c870ef4ec03 100644
--- a/vendor/github.com/Azure/go-autorest/autorest/adal/token.go
+++ b/vendor/github.com/Azure/go-autorest/autorest/adal/token.go
@@ -30,12 +30,14 @@ import (
"net/http"
"net/url"
"os"
+ "strconv"
"strings"
"sync"
"time"
"github.com/Azure/go-autorest/autorest/date"
- "github.com/dgrijalva/jwt-go"
+ "github.com/Azure/go-autorest/logger"
+ "github.com/form3tech-oss/jwt-go"
)
const (
@@ -62,14 +64,29 @@ const (
// msiEndpoint is the well known endpoint for getting MSI authentications tokens
msiEndpoint = "http://169.254.169.254/metadata/identity/oauth2/token"
+ // the API version to use for the MSI endpoint
+ msiAPIVersion = "2018-02-01"
+
// the default number of attempts to refresh an MSI authentication token
defaultMaxMSIRefreshAttempts = 5
// asMSIEndpointEnv is the environment variable used to store the endpoint on App Service and Functions
- asMSIEndpointEnv = "MSI_ENDPOINT"
+ msiEndpointEnv = "MSI_ENDPOINT"
// asMSISecretEnv is the environment variable used to store the request secret on App Service and Functions
- asMSISecretEnv = "MSI_SECRET"
+ msiSecretEnv = "MSI_SECRET"
+
+ // the API version to use for the legacy App Service MSI endpoint
+ appServiceAPIVersion2017 = "2017-09-01"
+
+ // secret header used when authenticating against app service MSI endpoint
+ secretHeader = "Secret"
+
+ // the format for expires_on in UTC with AM/PM
+ expiresOnDateFormatPM = "1/2/2006 15:04:05 PM +00:00"
+
+ // the format for expires_on in UTC without AM/PM
+ expiresOnDateFormat = "1/2/2006 15:04:05 +00:00"
)
// OAuthTokenProvider is an interface which should be implemented by an access token retriever
@@ -276,6 +293,8 @@ func (secret ServicePrincipalCertificateSecret) MarshalJSON() ([]byte, error) {
// ServicePrincipalMSISecret implements ServicePrincipalSecret for machines running the MSI Extension.
type ServicePrincipalMSISecret struct {
+ msiType msiType
+ clientResourceID string
}
// SetAuthenticationValues is a method of the interface ServicePrincipalSecret.
@@ -354,6 +373,7 @@ type ServicePrincipalToken struct {
customRefreshFunc TokenRefresh
refreshCallbacks []TokenRefreshCallback
// MaxMSIRefreshAttempts is the maximum number of attempts to refresh an MSI token.
+ // Settings this to a value less than 1 will use the default value.
MaxMSIRefreshAttempts int
}
@@ -645,78 +665,173 @@ func NewServicePrincipalTokenFromAuthorizationCode(oauthConfig OAuthConfig, clie
)
}
-// GetMSIVMEndpoint gets the MSI endpoint on Virtual Machines.
-func GetMSIVMEndpoint() (string, error) {
- return msiEndpoint, nil
+type msiType int
+
+const (
+ msiTypeUnavailable msiType = iota
+ msiTypeAppServiceV20170901
+ msiTypeCloudShell
+ msiTypeIMDS
+)
+
+func (m msiType) String() string {
+ switch m {
+ case msiTypeUnavailable:
+ return "unavailable"
+ case msiTypeAppServiceV20170901:
+ return "AppServiceV20170901"
+ case msiTypeCloudShell:
+ return "CloudShell"
+ case msiTypeIMDS:
+ return "IMDS"
+ default:
+ return fmt.Sprintf("unhandled MSI type %d", m)
+ }
}
-func isAppService() bool {
- _, asMSIEndpointEnvExists := os.LookupEnv(asMSIEndpointEnv)
- _, asMSISecretEnvExists := os.LookupEnv(asMSISecretEnv)
+// returns the MSI type and endpoint, or an error
+func getMSIType() (msiType, string, error) {
+ if endpointEnvVar := os.Getenv(msiEndpointEnv); endpointEnvVar != "" {
+ // if the env var MSI_ENDPOINT is set
+ if secretEnvVar := os.Getenv(msiSecretEnv); secretEnvVar != "" {
+ // if BOTH the env vars MSI_ENDPOINT and MSI_SECRET are set the msiType is AppService
+ return msiTypeAppServiceV20170901, endpointEnvVar, nil
+ }
+ // 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")
+ }
+}
- return asMSIEndpointEnvExists && asMSISecretEnvExists
+// GetMSIVMEndpoint gets the MSI endpoint on Virtual Machines.
+// NOTE: this always returns the IMDS endpoint, it does not work for app services or cloud shell.
+// Deprecated: NewServicePrincipalTokenFromMSI() and variants will automatically detect the endpoint.
+func GetMSIVMEndpoint() (string, error) {
+ return msiEndpoint, nil
}
-// GetMSIAppServiceEndpoint get the MSI endpoint for App Service and Functions
+// GetMSIAppServiceEndpoint get the MSI endpoint for App Service and Functions.
+// It will return an error when not running in an app service/functions environment.
+// Deprecated: NewServicePrincipalTokenFromMSI() and variants will automatically detect the endpoint.
func GetMSIAppServiceEndpoint() (string, error) {
- asMSIEndpoint, asMSIEndpointEnvExists := os.LookupEnv(asMSIEndpointEnv)
-
- if asMSIEndpointEnvExists {
- return asMSIEndpoint, nil
+ msiType, endpoint, err := getMSIType()
+ if err != nil {
+ return "", err
+ }
+ switch msiType {
+ case msiTypeAppServiceV20170901:
+ return endpoint, nil
+ default:
+ return "", fmt.Errorf("%s is not app service environment", msiType)
}
- return "", errors.New("MSI endpoint not found")
}
// GetMSIEndpoint get the appropriate MSI endpoint depending on the runtime environment
+// Deprecated: NewServicePrincipalTokenFromMSI() and variants will automatically detect the endpoint.
func GetMSIEndpoint() (string, error) {
- if isAppService() {
- return GetMSIAppServiceEndpoint()
- }
- return GetMSIVMEndpoint()
+ _, endpoint, err := getMSIType()
+ return endpoint, err
}
// NewServicePrincipalTokenFromMSI creates a ServicePrincipalToken via the MSI VM Extension.
// It will use the system assigned identity when creating the token.
+// msiEndpoint - empty string, or pass a non-empty string to override the default value.
+// Deprecated: use NewServicePrincipalTokenFromManagedIdentity() instead.
func NewServicePrincipalTokenFromMSI(msiEndpoint, resource string, callbacks ...TokenRefreshCallback) (*ServicePrincipalToken, error) {
- return newServicePrincipalTokenFromMSI(msiEndpoint, resource, nil, callbacks...)
+ return newServicePrincipalTokenFromMSI(msiEndpoint, resource, "", "", callbacks...)
}
// NewServicePrincipalTokenFromMSIWithUserAssignedID creates a ServicePrincipalToken via the MSI VM Extension.
-// It will use the specified user assigned identity when creating the token.
+// It will use the clientID of specified user assigned identity when creating the token.
+// msiEndpoint - empty string, or pass a non-empty string to override the default value.
+// Deprecated: use NewServicePrincipalTokenFromManagedIdentity() instead.
func NewServicePrincipalTokenFromMSIWithUserAssignedID(msiEndpoint, resource string, userAssignedID string, callbacks ...TokenRefreshCallback) (*ServicePrincipalToken, error) {
- return newServicePrincipalTokenFromMSI(msiEndpoint, resource, &userAssignedID, callbacks...)
+ if err := validateStringParam(userAssignedID, "userAssignedID"); err != nil {
+ return nil, err
+ }
+ return newServicePrincipalTokenFromMSI(msiEndpoint, resource, userAssignedID, "", callbacks...)
}
-func newServicePrincipalTokenFromMSI(msiEndpoint, resource string, userAssignedID *string, callbacks ...TokenRefreshCallback) (*ServicePrincipalToken, error) {
- if err := validateStringParam(msiEndpoint, "msiEndpoint"); err != nil {
+// NewServicePrincipalTokenFromMSIWithIdentityResourceID creates a ServicePrincipalToken via the MSI VM Extension.
+// It will use the azure resource id of user assigned identity when creating the token.
+// msiEndpoint - empty string, or pass a non-empty string to override the default value.
+// Deprecated: use NewServicePrincipalTokenFromManagedIdentity() instead.
+func NewServicePrincipalTokenFromMSIWithIdentityResourceID(msiEndpoint, resource string, identityResourceID string, callbacks ...TokenRefreshCallback) (*ServicePrincipalToken, error) {
+ if err := validateStringParam(identityResourceID, "identityResourceID"); err != nil {
return nil, err
}
+ return newServicePrincipalTokenFromMSI(msiEndpoint, resource, "", identityResourceID, callbacks...)
+}
+
+// ManagedIdentityOptions contains optional values for configuring managed identity authentication.
+type ManagedIdentityOptions struct {
+ // ClientID is the user-assigned identity to use during authentication.
+ // It is mutually exclusive with IdentityResourceID.
+ ClientID string
+
+ // IdentityResourceID is the resource ID of the user-assigned identity to use during authentication.
+ // It is mutually exclusive with ClientID.
+ IdentityResourceID string
+}
+
+// NewServicePrincipalTokenFromManagedIdentity creates a ServicePrincipalToken using a managed identity.
+// It supports the following managed identity environments.
+// - App Service Environment (API version 2017-09-01 only)
+// - Cloud shell
+// - IMDS with a system or user assigned identity
+func NewServicePrincipalTokenFromManagedIdentity(resource string, options *ManagedIdentityOptions, callbacks ...TokenRefreshCallback) (*ServicePrincipalToken, error) {
+ if options == nil {
+ options = &ManagedIdentityOptions{}
+ }
+ return newServicePrincipalTokenFromMSI("", resource, options.ClientID, options.IdentityResourceID, callbacks...)
+}
+
+func newServicePrincipalTokenFromMSI(msiEndpoint, resource, userAssignedID, identityResourceID string, callbacks ...TokenRefreshCallback) (*ServicePrincipalToken, error) {
if err := validateStringParam(resource, "resource"); err != nil {
return nil, err
}
- if userAssignedID != nil {
- if err := validateStringParam(*userAssignedID, "userAssignedID"); err != nil {
- return nil, err
- }
+ if userAssignedID != "" && identityResourceID != "" {
+ return nil, errors.New("cannot specify userAssignedID and identityResourceID")
}
- // We set the oauth config token endpoint to be MSI's endpoint
- msiEndpointURL, err := url.Parse(msiEndpoint)
+ msiType, endpoint, err := getMSIType()
if err != nil {
+ logger.Instance.Writef(logger.LogError, "Error determining managed identity environment: %v", err)
return nil, err
}
-
- v := url.Values{}
- v.Set("resource", resource)
- // App Service MSI currently only supports token API version 2017-09-01
- if isAppService() {
- v.Set("api-version", "2017-09-01")
- } else {
- v.Set("api-version", "2018-02-01")
+ logger.Instance.Writef(logger.LogInfo, "Managed identity environment is %s, endpoint is %s", msiType, endpoint)
+ if msiEndpoint != "" {
+ endpoint = msiEndpoint
+ logger.Instance.Writef(logger.LogInfo, "Managed identity custom endpoint is %s", endpoint)
}
- if userAssignedID != nil {
- v.Set("client_id", *userAssignedID)
+ msiEndpointURL, err := url.Parse(endpoint)
+ if err != nil {
+ return nil, err
+ }
+ // cloud shell sends its data in the request body
+ if msiType != msiTypeCloudShell {
+ v := url.Values{}
+ v.Set("resource", resource)
+ clientIDParam := "client_id"
+ switch msiType {
+ case msiTypeAppServiceV20170901:
+ clientIDParam = "clientid"
+ v.Set("api-version", appServiceAPIVersion2017)
+ break
+ case msiTypeIMDS:
+ v.Set("api-version", msiAPIVersion)
+ }
+ if userAssignedID != "" {
+ v.Set(clientIDParam, userAssignedID)
+ } else if identityResourceID != "" {
+ v.Set("mi_res_id", identityResourceID)
+ }
+ msiEndpointURL.RawQuery = v.Encode()
}
- msiEndpointURL.RawQuery = v.Encode()
spt := &ServicePrincipalToken{
inner: servicePrincipalToken{
@@ -724,10 +839,14 @@ func newServicePrincipalTokenFromMSI(msiEndpoint, resource string, userAssignedI
OauthConfig: OAuthConfig{
TokenEndpoint: *msiEndpointURL,
},
- Secret: &ServicePrincipalMSISecret{},
+ Secret: &ServicePrincipalMSISecret{
+ msiType: msiType,
+ clientResourceID: identityResourceID,
+ },
Resource: resource,
AutoRefresh: true,
RefreshWithin: defaultRefresh,
+ ClientID: userAssignedID,
},
refreshLock: &sync.RWMutex{},
sender: sender(),
@@ -735,10 +854,6 @@ func newServicePrincipalTokenFromMSI(msiEndpoint, resource string, userAssignedI
MaxMSIRefreshAttempts: defaultMaxMSIRefreshAttempts,
}
- if userAssignedID != nil {
- spt.inner.ClientID = *userAssignedID
- }
-
return spt, nil
}
@@ -771,8 +886,9 @@ func (spt *ServicePrincipalToken) EnsureFresh() error {
// EnsureFreshWithContext will refresh the token if it will expire within the refresh window (as set by
// RefreshWithin) and autoRefresh flag is on. This method is safe for concurrent use.
func (spt *ServicePrincipalToken) EnsureFreshWithContext(ctx context.Context) error {
- if spt.inner.AutoRefresh && spt.inner.Token.WillExpireIn(spt.inner.RefreshWithin) {
- // take the write lock then check to see if the token was already refreshed
+ // must take the read lock when initially checking the token's expiration
+ if spt.inner.AutoRefresh && spt.Token().WillExpireIn(spt.inner.RefreshWithin) {
+ // take the write lock then check again to see if the token was already refreshed
spt.refreshLock.Lock()
defer spt.refreshLock.Unlock()
if spt.inner.Token.WillExpireIn(spt.inner.RefreshWithin) {
@@ -834,14 +950,6 @@ func (spt *ServicePrincipalToken) getGrantType() string {
}
}
-func isIMDS(u url.URL) bool {
- imds, err := url.Parse(msiEndpoint)
- if err != nil {
- return false
- }
- return (u.Host == imds.Host && u.Path == imds.Path) || isAppService()
-}
-
func (spt *ServicePrincipalToken) refreshInternal(ctx context.Context, resource string) error {
if spt.customRefreshFunc != nil {
token, err := spt.customRefreshFunc(ctx, resource)
@@ -851,19 +959,45 @@ func (spt *ServicePrincipalToken) refreshInternal(ctx context.Context, resource
spt.inner.Token = *token
return spt.InvokeRefreshCallbacks(spt.inner.Token)
}
-
req, err := http.NewRequest(http.MethodPost, spt.inner.OauthConfig.TokenEndpoint.String(), nil)
if err != nil {
return fmt.Errorf("adal: Failed to build the refresh request. Error = '%v'", err)
}
req.Header.Add("User-Agent", UserAgent())
- // Add header when runtime is on App Service or Functions
- if isAppService() {
- asMSISecret, _ := os.LookupEnv(asMSISecretEnv)
- req.Header.Add("Secret", asMSISecret)
- }
req = req.WithContext(ctx)
- if !isIMDS(spt.inner.OauthConfig.TokenEndpoint) {
+ var resp *http.Response
+ authBodyFilter := func(b []byte) []byte {
+ if logger.Level() != logger.LogAuth {
+ return []byte("**REDACTED** authentication body")
+ }
+ return b
+ }
+ if msiSecret, ok := spt.inner.Secret.(*ServicePrincipalMSISecret); ok {
+ switch msiSecret.msiType {
+ case msiTypeAppServiceV20170901:
+ req.Method = http.MethodGet
+ req.Header.Set("secret", os.Getenv(msiSecretEnv))
+ break
+ case msiTypeCloudShell:
+ req.Header.Set("Metadata", "true")
+ data := url.Values{}
+ data.Set("resource", spt.inner.Resource)
+ if spt.inner.ClientID != "" {
+ data.Set("client_id", spt.inner.ClientID)
+ } else if msiSecret.clientResourceID != "" {
+ data.Set("msi_res_id", msiSecret.clientResourceID)
+ }
+ req.Body = ioutil.NopCloser(strings.NewReader(data.Encode()))
+ req.Header.Set("Content-Type", "application/x-www-form-urlencoded")
+ break
+ case msiTypeIMDS:
+ req.Method = http.MethodGet
+ req.Header.Set("Metadata", "true")
+ break
+ }
+ logger.Instance.WriteRequest(req, logger.Filter{Body: authBodyFilter})
+ resp, err = retryForIMDS(spt.sender, req, spt.MaxMSIRefreshAttempts)
+ } else {
v := url.Values{}
v.Set("client_id", spt.inner.ClientID)
v.Set("resource", resource)
@@ -892,32 +1026,26 @@ func (spt *ServicePrincipalToken) refreshInternal(ctx context.Context, resource
req.ContentLength = int64(len(s))
req.Header.Set(contentType, mimeTypeFormPost)
req.Body = body
- }
-
- if _, ok := spt.inner.Secret.(*ServicePrincipalMSISecret); ok {
- req.Method = http.MethodGet
- req.Header.Set(metadataHeader, "true")
- }
-
- var resp *http.Response
- if isIMDS(spt.inner.OauthConfig.TokenEndpoint) {
- resp, err = retryForIMDS(spt.sender, req, spt.MaxMSIRefreshAttempts)
- } else {
+ logger.Instance.WriteRequest(req, logger.Filter{Body: authBodyFilter})
resp, err = spt.sender.Do(req)
}
+
+ // don't return a TokenRefreshError here; this will allow retry logic to apply
if err != nil {
- // don't return a TokenRefreshError here; this will allow retry logic to apply
return fmt.Errorf("adal: Failed to execute the refresh request. Error = '%v'", err)
+ } else if resp == nil {
+ return fmt.Errorf("adal: received nil response and error")
}
+ logger.Instance.WriteResponse(resp, logger.Filter{Body: authBodyFilter})
defer resp.Body.Close()
rb, err := ioutil.ReadAll(resp.Body)
if resp.StatusCode != http.StatusOK {
if err != nil {
- return newTokenRefreshError(fmt.Sprintf("adal: Refresh request failed. Status Code = '%d'. Failed reading response body: %v", resp.StatusCode, err), resp)
+ return newTokenRefreshError(fmt.Sprintf("adal: Refresh request failed. Status Code = '%d'. Failed reading response body: %v Endpoint %s", resp.StatusCode, err, req.URL.String()), resp)
}
- return newTokenRefreshError(fmt.Sprintf("adal: Refresh request failed. Status Code = '%d'. Response body: %s", resp.StatusCode, string(rb)), resp)
+ return newTokenRefreshError(fmt.Sprintf("adal: Refresh request failed. Status Code = '%d'. Response body: %s Endpoint %s", resp.StatusCode, string(rb), req.URL.String()), resp)
}
// for the following error cases don't return a TokenRefreshError. the operation succeeded
@@ -930,15 +1058,60 @@ func (spt *ServicePrincipalToken) refreshInternal(ctx context.Context, resource
if len(strings.Trim(string(rb), " ")) == 0 {
return fmt.Errorf("adal: Empty service principal token received during refresh")
}
- var token Token
+ token := struct {
+ AccessToken string `json:"access_token"`
+ RefreshToken string `json:"refresh_token"`
+
+ // AAD returns expires_in as a string, ADFS returns it as an int
+ ExpiresIn json.Number `json:"expires_in"`
+ // expires_on can be in two formats, a UTC time stamp or the number of seconds.
+ ExpiresOn string `json:"expires_on"`
+ NotBefore json.Number `json:"not_before"`
+
+ Resource string `json:"resource"`
+ Type string `json:"token_type"`
+ }{}
+ // return a TokenRefreshError in the follow error cases as the token is in an unexpected format
err = json.Unmarshal(rb, &token)
if err != nil {
- return fmt.Errorf("adal: Failed to unmarshal the service principal token during refresh. Error = '%v' JSON = '%s'", err, string(rb))
+ return newTokenRefreshError(fmt.Sprintf("adal: Failed to unmarshal the service principal token during refresh. Error = '%v' JSON = '%s'", err, string(rb)), resp)
+ }
+ expiresOn := json.Number("")
+ // ADFS doesn't include the expires_on field
+ if token.ExpiresOn != "" {
+ if expiresOn, err = parseExpiresOn(token.ExpiresOn); err != nil {
+ return newTokenRefreshError(fmt.Sprintf("adal: failed to parse expires_on: %v value '%s'", err, token.ExpiresOn), resp)
+ }
+ }
+ spt.inner.Token.AccessToken = token.AccessToken
+ spt.inner.Token.RefreshToken = token.RefreshToken
+ spt.inner.Token.ExpiresIn = token.ExpiresIn
+ spt.inner.Token.ExpiresOn = expiresOn
+ spt.inner.Token.NotBefore = token.NotBefore
+ spt.inner.Token.Resource = token.Resource
+ spt.inner.Token.Type = token.Type
+
+ return spt.InvokeRefreshCallbacks(spt.inner.Token)
+}
+
+// converts expires_on to the number of seconds
+func parseExpiresOn(s string) (json.Number, error) {
+ // convert the expiration date to the number of seconds from now
+ timeToDuration := func(t time.Time) json.Number {
+ dur := t.Sub(time.Now().UTC())
+ return json.Number(strconv.FormatInt(int64(dur.Round(time.Second).Seconds()), 10))
+ }
+ if _, err := strconv.ParseInt(s, 10, 64); err == nil {
+ // this is the number of seconds case, no conversion required
+ return json.Number(s), nil
+ } else if eo, err := time.Parse(expiresOnDateFormatPM, s); err == nil {
+ return timeToDuration(eo), nil
+ } else if eo, err := time.Parse(expiresOnDateFormat, s); err == nil {
+ return timeToDuration(eo), nil
+ } else {
+ // unknown format
+ return json.Number(""), err
}
-
- spt.inner.Token = token
-
- return spt.InvokeRefreshCallbacks(token)
}
// retry logic specific to retrieving a token from the IMDS endpoint
@@ -972,6 +1145,11 @@ func retryForIMDS(sender Sender, req *http.Request, maxAttempts int) (resp *http
attempt := 0
delay := time.Duration(0)
+ // maxAttempts is user-specified, ensure that its value is greater than zero else no request will be made
+ if maxAttempts < 1 {
+ maxAttempts = defaultMaxMSIRefreshAttempts
+ }
+
for attempt < maxAttempts {
if resp != nil && resp.Body != nil {
io.Copy(ioutil.Discard, resp.Body)
@@ -1064,68 +1242,77 @@ func (mt *MultiTenantServicePrincipalToken) AuxiliaryOAuthTokens() []string {
return tokens
}
-// EnsureFreshWithContext will refresh the token if it will expire within the refresh window (as set by
-// RefreshWithin) and autoRefresh flag is on. This method is safe for concurrent use.
-func (mt *MultiTenantServicePrincipalToken) EnsureFreshWithContext(ctx context.Context) error {
- if err := mt.PrimaryToken.EnsureFreshWithContext(ctx); err != nil {
- return fmt.Errorf("failed to refresh primary token: %v", err)
+// NewMultiTenantServicePrincipalToken creates a new MultiTenantServicePrincipalToken with the specified credentials and resource.
+func NewMultiTenantServicePrincipalToken(multiTenantCfg MultiTenantOAuthConfig, clientID string, secret string, resource string) (*MultiTenantServicePrincipalToken, error) {
+ if err := validateStringParam(clientID, "clientID"); err != nil {
+ return nil, err
}
- for _, aux := range mt.AuxiliaryTokens {
- if err := aux.EnsureFreshWithContext(ctx); err != nil {
- return fmt.Errorf("failed to refresh auxiliary token: %v", err)
- }
+ if err := validateStringParam(secret, "secret"); err != nil {
+ return nil, err
}
- return nil
-}
-
-// RefreshWithContext obtains a fresh token for the Service Principal.
-func (mt *MultiTenantServicePrincipalToken) RefreshWithContext(ctx context.Context) error {
- if err := mt.PrimaryToken.RefreshWithContext(ctx); err != nil {
- return fmt.Errorf("failed to refresh primary token: %v", err)
+ if err := validateStringParam(resource, "resource"); err != nil {
+ return nil, err
}
- for _, aux := range mt.AuxiliaryTokens {
- if err := aux.RefreshWithContext(ctx); err != nil {
- return fmt.Errorf("failed to refresh auxiliary token: %v", err)
- }
+ auxTenants := multiTenantCfg.AuxiliaryTenants()
+ m := MultiTenantServicePrincipalToken{
+ AuxiliaryTokens: make([]*ServicePrincipalToken, len(auxTenants)),
}
- return nil
-}
-
-// RefreshExchangeWithContext refreshes the token, but for a different resource.
-func (mt *MultiTenantServicePrincipalToken) RefreshExchangeWithContext(ctx context.Context, resource string) error {
- if err := mt.PrimaryToken.RefreshExchangeWithContext(ctx, resource); err != nil {
- return fmt.Errorf("failed to refresh primary token: %v", err)
+ primary, err := NewServicePrincipalToken(*multiTenantCfg.PrimaryTenant(), clientID, secret, resource)
+ if err != nil {
+ return nil, fmt.Errorf("failed to create SPT for primary tenant: %v", err)
}
- for _, aux := range mt.AuxiliaryTokens {
- if err := aux.RefreshExchangeWithContext(ctx, resource); err != nil {
- return fmt.Errorf("failed to refresh auxiliary token: %v", err)
+ m.PrimaryToken = primary
+ for i := range auxTenants {
+ aux, err := NewServicePrincipalToken(*auxTenants[i], clientID, secret, resource)
+ if err != nil {
+ return nil, fmt.Errorf("failed to create SPT for auxiliary tenant: %v", err)
}
+ m.AuxiliaryTokens[i] = aux
}
- return nil
+ return &m, nil
}
-// NewMultiTenantServicePrincipalToken creates a new MultiTenantServicePrincipalToken with the specified credentials and resource.
-func NewMultiTenantServicePrincipalToken(multiTenantCfg MultiTenantOAuthConfig, clientID string, secret string, resource string) (*MultiTenantServicePrincipalToken, error) {
+// NewMultiTenantServicePrincipalTokenFromCertificate creates a new MultiTenantServicePrincipalToken with the specified certificate credentials and resource.
+func NewMultiTenantServicePrincipalTokenFromCertificate(multiTenantCfg MultiTenantOAuthConfig, clientID string, certificate *x509.Certificate, privateKey *rsa.PrivateKey, resource string) (*MultiTenantServicePrincipalToken, error) {
if err := validateStringParam(clientID, "clientID"); err != nil {
return nil, err
}
- if err := validateStringParam(secret, "secret"); err != nil {
- return nil, err
- }
if err := validateStringParam(resource, "resource"); err != nil {
return nil, err
}
+ if certificate == nil {
+ return nil, fmt.Errorf("parameter 'certificate' cannot be nil")
+ }
+ if privateKey == nil {
+ return nil, fmt.Errorf("parameter 'privateKey' cannot be nil")
+ }
auxTenants := multiTenantCfg.AuxiliaryTenants()
m := MultiTenantServicePrincipalToken{
AuxiliaryTokens: make([]*ServicePrincipalToken, len(auxTenants)),
}
- primary, err := NewServicePrincipalToken(*multiTenantCfg.PrimaryTenant(), clientID, secret, resource)
+ primary, err := NewServicePrincipalTokenWithSecret(
+ *multiTenantCfg.PrimaryTenant(),
+ clientID,
+ resource,
+ &ServicePrincipalCertificateSecret{
+ PrivateKey: privateKey,
+ Certificate: certificate,
+ },
+ )
if err != nil {
return nil, fmt.Errorf("failed to create SPT for primary tenant: %v", err)
}
m.PrimaryToken = primary
for i := range auxTenants {
- aux, err := NewServicePrincipalToken(*auxTenants[i], clientID, secret, resource)
+ aux, err := NewServicePrincipalTokenWithSecret(
+ *auxTenants[i],
+ clientID,
+ resource,
+ &ServicePrincipalCertificateSecret{
+ PrivateKey: privateKey,
+ Certificate: certificate,
+ },
+ )
if err != nil {
return nil, fmt.Errorf("failed to create SPT for auxiliary tenant: %v", err)
}
@@ -1133,3 +1320,17 @@ func NewMultiTenantServicePrincipalToken(multiTenantCfg MultiTenantOAuthConfig,
}
return &m, nil
}
+
+// MSIAvailable returns true if the MSI endpoint is available for authentication.
+func MSIAvailable(ctx context.Context, sender Sender) bool {
+ resp, err := getMSIEndpoint(ctx, sender)
+ 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/vendor/github.com/Azure/go-autorest/autorest/adal/token_1.13.go b/vendor/github.com/Azure/go-autorest/autorest/adal/token_1.13.go
new file mode 100644
index 00000000000..953f7550282
--- /dev/null
+++ b/vendor/github.com/Azure/go-autorest/autorest/adal/token_1.13.go
@@ -0,0 +1,75 @@
+// +build go1.13
+
+// Copyright 2017 Microsoft Corporation
+//
+// 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 adal
+
+import (
+ "context"
+ "fmt"
+ "net/http"
+ "time"
+)
+
+func getMSIEndpoint(ctx context.Context, sender Sender) (*http.Response, error) {
+ tempCtx, cancel := context.WithTimeout(ctx, 500*time.Millisecond)
+ defer cancel()
+ // http.NewRequestWithContext() was added in Go 1.13
+ req, _ := http.NewRequestWithContext(tempCtx, http.MethodGet, msiEndpoint, nil)
+ q := req.URL.Query()
+ q.Add("api-version", msiAPIVersion)
+ req.URL.RawQuery = q.Encode()
+ return sender.Do(req)
+}
+
+// EnsureFreshWithContext will refresh the token if it will expire within the refresh window (as set by
+// RefreshWithin) and autoRefresh flag is on. This method is safe for concurrent use.
+func (mt *MultiTenantServicePrincipalToken) EnsureFreshWithContext(ctx context.Context) error {
+ if err := mt.PrimaryToken.EnsureFreshWithContext(ctx); err != nil {
+ return fmt.Errorf("failed to refresh primary token: %w", err)
+ }
+ for _, aux := range mt.AuxiliaryTokens {
+ if err := aux.EnsureFreshWithContext(ctx); err != nil {
+ return fmt.Errorf("failed to refresh auxiliary token: %w", err)
+ }
+ }
+ return nil
+}
+
+// RefreshWithContext obtains a fresh token for the Service Principal.
+func (mt *MultiTenantServicePrincipalToken) RefreshWithContext(ctx context.Context) error {
+ if err := mt.PrimaryToken.RefreshWithContext(ctx); err != nil {
+ return fmt.Errorf("failed to refresh primary token: %w", err)
+ }
+ for _, aux := range mt.AuxiliaryTokens {
+ if err := aux.RefreshWithContext(ctx); err != nil {
+ return fmt.Errorf("failed to refresh auxiliary token: %w", err)
+ }
+ }
+ return nil
+}
+
+// RefreshExchangeWithContext refreshes the token, but for a different resource.
+func (mt *MultiTenantServicePrincipalToken) RefreshExchangeWithContext(ctx context.Context, resource string) error {
+ if err := mt.PrimaryToken.RefreshExchangeWithContext(ctx, resource); err != nil {
+ return fmt.Errorf("failed to refresh primary token: %w", err)
+ }
+ for _, aux := range mt.AuxiliaryTokens {
+ if err := aux.RefreshExchangeWithContext(ctx, resource); err != nil {
+ return fmt.Errorf("failed to refresh auxiliary token: %w", err)
+ }
+ }
+ return nil
+}
diff --git a/vendor/github.com/Azure/go-autorest/autorest/adal/token_legacy.go b/vendor/github.com/Azure/go-autorest/autorest/adal/token_legacy.go
new file mode 100644
index 00000000000..729bfbd0abf
--- /dev/null
+++ b/vendor/github.com/Azure/go-autorest/autorest/adal/token_legacy.go
@@ -0,0 +1,74 @@
+// +build !go1.13
+
+// Copyright 2017 Microsoft Corporation
+//
+// 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 adal
+
+import (
+ "context"
+ "net/http"
+ "time"
+)
+
+func getMSIEndpoint(ctx context.Context, sender Sender) (*http.Response, error) {
+ tempCtx, cancel := context.WithTimeout(ctx, 500*time.Millisecond)
+ defer cancel()
+ req, _ := http.NewRequest(http.MethodGet, msiEndpoint, nil)
+ req = req.WithContext(tempCtx)
+ q := req.URL.Query()
+ q.Add("api-version", msiAPIVersion)
+ req.URL.RawQuery = q.Encode()
+ return sender.Do(req)
+}
+
+// EnsureFreshWithContext will refresh the token if it will expire within the refresh window (as set by
+// RefreshWithin) and autoRefresh flag is on. This method is safe for concurrent use.
+func (mt *MultiTenantServicePrincipalToken) EnsureFreshWithContext(ctx context.Context) error {
+ if err := mt.PrimaryToken.EnsureFreshWithContext(ctx); err != nil {
+ return err
+ }
+ for _, aux := range mt.AuxiliaryTokens {
+ if err := aux.EnsureFreshWithContext(ctx); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+// RefreshWithContext obtains a fresh token for the Service Principal.
+func (mt *MultiTenantServicePrincipalToken) RefreshWithContext(ctx context.Context) error {
+ if err := mt.PrimaryToken.RefreshWithContext(ctx); err != nil {
+ return err
+ }
+ for _, aux := range mt.AuxiliaryTokens {
+ if err := aux.RefreshWithContext(ctx); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+// RefreshExchangeWithContext refreshes the token, but for a different resource.
+func (mt *MultiTenantServicePrincipalToken) RefreshExchangeWithContext(ctx context.Context, resource string) error {
+ if err := mt.PrimaryToken.RefreshExchangeWithContext(ctx, resource); err != nil {
+ return err
+ }
+ for _, aux := range mt.AuxiliaryTokens {
+ if err := aux.RefreshExchangeWithContext(ctx, resource); err != nil {
+ return err
+ }
+ }
+ return nil
+}
diff --git a/vendor/github.com/Azure/go-autorest/autorest/azure/async.go b/vendor/github.com/Azure/go-autorest/autorest/azure/async.go
index 17fb4d8c525..42e28cf2e4d 100644
--- a/vendor/github.com/Azure/go-autorest/autorest/azure/async.go
+++ b/vendor/github.com/Azure/go-autorest/autorest/azure/async.go
@@ -42,6 +42,52 @@ const (
var pollingCodes = [...]int{http.StatusNoContent, http.StatusAccepted, http.StatusCreated, http.StatusOK}
+// FutureAPI contains the set of methods on the Future type.
+type FutureAPI interface {
+ // Response returns the last HTTP response.
+ Response() *http.Response
+
+ // Status returns the last status message of the operation.
+ Status() string
+
+ // PollingMethod returns the method used to monitor the status of the asynchronous operation.
+ PollingMethod() PollingMethodType
+
+ // DoneWithContext queries the service to see if the operation has completed.
+ DoneWithContext(context.Context, autorest.Sender) (bool, error)
+
+ // GetPollingDelay returns a duration the application should wait before checking
+ // the status of the asynchronous request and true; this value is returned from
+ // the service via the Retry-After response header. If the header wasn't returned
+ // then the function returns the zero-value time.Duration and false.
+ GetPollingDelay() (time.Duration, bool)
+
+ // WaitForCompletionRef will return when one of the following conditions is met: the long
+ // running operation has completed, the provided context is cancelled, or the client's
+ // polling duration has been exceeded. It will retry failed polling attempts based on
+ // the retry value defined in the client up to the maximum retry attempts.
+ // If no deadline is specified in the context then the client.PollingDuration will be
+ // used to determine if a default deadline should be used.
+ // If PollingDuration is greater than zero the value will be used as the context's timeout.
+ // If PollingDuration is zero then no default deadline will be used.
+ WaitForCompletionRef(context.Context, autorest.Client) error
+
+ // MarshalJSON implements the json.Marshaler interface.
+ MarshalJSON() ([]byte, error)
+
+ // MarshalJSON implements the json.Unmarshaler interface.
+ UnmarshalJSON([]byte) error
+
+ // PollingURL returns the URL used for retrieving the status of the long-running operation.
+ PollingURL() string
+
+ // GetResult should be called once polling has completed successfully.
+ // It makes the final GET call to retrieve the resultant payload.
+ GetResult(autorest.Sender) (*http.Response, error)
+}
+
+var _ FutureAPI = (*Future)(nil)
+
// Future provides a mechanism to access the status and results of an asynchronous request.
// Since futures are stateful they should be passed by value to avoid race conditions.
type Future struct {
diff --git a/vendor/github.com/Azure/go-autorest/autorest/azure/azure.go b/vendor/github.com/Azure/go-autorest/autorest/azure/azure.go
index a0b969dffa4..0ded76bc6f1 100644
--- a/vendor/github.com/Azure/go-autorest/autorest/azure/azure.go
+++ b/vendor/github.com/Azure/go-autorest/autorest/azure/azure.go
@@ -37,6 +37,9 @@ const (
// should be included in the response.
HeaderReturnClientID = "x-ms-return-client-request-id"
+ // HeaderContentType is the type of the content in the HTTP response.
+ HeaderContentType = "Content-Type"
+
// HeaderRequestID is the Azure extension header of the service generated request ID returned
// in the response.
HeaderRequestID = "x-ms-request-id"
@@ -89,54 +92,85 @@ func (se ServiceError) Error() string {
// UnmarshalJSON implements the json.Unmarshaler interface for the ServiceError type.
func (se *ServiceError) UnmarshalJSON(b []byte) error {
- // per the OData v4 spec the details field must be an array of JSON objects.
- // unfortunately not all services adhear to the spec and just return a single
- // object instead of an array with one object. so we have to perform some
- // shenanigans to accommodate both cases.
// http://docs.oasis-open.org/odata/odata-json-format/v4.0/os/odata-json-format-v4.0-os.html#_Toc372793091
- type serviceError1 struct {
+ type serviceErrorInternal struct {
Code string `json:"code"`
Message string `json:"message"`
- Target *string `json:"target"`
- Details []map[string]interface{} `json:"details"`
- InnerError map[string]interface{} `json:"innererror"`
- AdditionalInfo []map[string]interface{} `json:"additionalInfo"`
+ Target *string `json:"target,omitempty"`
+ AdditionalInfo []map[string]interface{} `json:"additionalInfo,omitempty"`
+ // not all services conform to the OData v4 spec.
+ // the following fields are where we've seen discrepancies
+
+ // spec calls for []map[string]interface{} but have seen map[string]interface{}
+ Details interface{} `json:"details,omitempty"`
+
+ // spec calls for map[string]interface{} but have seen []map[string]interface{} and string
+ InnerError interface{} `json:"innererror,omitempty"`
}
- type serviceError2 struct {
- Code string `json:"code"`
- Message string `json:"message"`
- Target *string `json:"target"`
- Details map[string]interface{} `json:"details"`
- InnerError map[string]interface{} `json:"innererror"`
- AdditionalInfo []map[string]interface{} `json:"additionalInfo"`
+ sei := serviceErrorInternal{}
+ if err := json.Unmarshal(b, &sei); err != nil {
+ return err
}
- se1 := serviceError1{}
- err := json.Unmarshal(b, &se1)
- if err == nil {
- se.populate(se1.Code, se1.Message, se1.Target, se1.Details, se1.InnerError, se1.AdditionalInfo)
- return nil
+ // copy the fields we know to be correct
+ se.AdditionalInfo = sei.AdditionalInfo
+ se.Code = sei.Code
+ se.Message = sei.Message
+ se.Target = sei.Target
+
+ // converts an []interface{} to []map[string]interface{}
+ arrayOfObjs := func(v interface{}) ([]map[string]interface{}, bool) {
+ arrayOf, ok := v.([]interface{})
+ if !ok {
+ return nil, false
+ }
+ final := []map[string]interface{}{}
+ for _, item := range arrayOf {
+ as, ok := item.(map[string]interface{})
+ if !ok {
+ return nil, false
+ }
+ final = append(final, as)
+ }
+ return final, true
}
- se2 := serviceError2{}
- err = json.Unmarshal(b, &se2)
- if err == nil {
- se.populate(se2.Code, se2.Message, se2.Target, nil, se2.InnerError, se2.AdditionalInfo)
- se.Details = append(se.Details, se2.Details)
- return nil
+ // convert the remaining fields, falling back to raw JSON if necessary
+
+ if c, ok := arrayOfObjs(sei.Details); ok {
+ se.Details = c
+ } else if c, ok := sei.Details.(map[string]interface{}); ok {
+ se.Details = []map[string]interface{}{c}
+ } else if sei.Details != nil {
+ // stuff into Details
+ se.Details = []map[string]interface{}{
+ {"raw": sei.Details},
+ }
}
- return err
-}
-func (se *ServiceError) populate(code, message string, target *string, details []map[string]interface{}, inner map[string]interface{}, additional []map[string]interface{}) {
- se.Code = code
- se.Message = message
- se.Target = target
- se.Details = details
- se.InnerError = inner
- se.AdditionalInfo = additional
+ if c, ok := sei.InnerError.(map[string]interface{}); ok {
+ se.InnerError = c
+ } else if c, ok := arrayOfObjs(sei.InnerError); ok {
+ // if there's only one error extract it
+ if len(c) == 1 {
+ se.InnerError = c[0]
+ } else {
+ // multiple errors, stuff them into the value
+ se.InnerError = map[string]interface{}{
+ "multi": c,
+ }
+ }
+ } else if c, ok := sei.InnerError.(string); ok {
+ se.InnerError = map[string]interface{}{"error": c}
+ } else if sei.InnerError != nil {
+ // stuff into InnerError
+ se.InnerError = map[string]interface{}{
+ "raw": sei.InnerError,
+ }
+ }
+ return nil
}
// RequestError describes an error response returned by Azure service.
@@ -307,16 +341,30 @@ func WithErrorUnlessStatusCode(codes ...int) autorest.RespondDecorator {
// Check if error is unwrapped ServiceError
decoder := autorest.NewDecoder(encodedAs, bytes.NewReader(b.Bytes()))
if err := decoder.Decode(&e.ServiceError); err != nil {
- return err
+ return fmt.Errorf("autorest/azure: error response cannot be parsed: %q error: %v", b.String(), err)
+ }
+
+ // for example, should the API return the literal value `null` as the response
+ if e.ServiceError == nil {
+ e.ServiceError = &ServiceError{
+ Code: "Unknown",
+ Message: "Unknown service error",
+ Details: []map[string]interface{}{
+ {
+ "HttpResponse.Body": b.String(),
+ },
+ },
+ }
}
}
- if e.ServiceError.Message == "" {
+
+ if e.ServiceError != nil && e.ServiceError.Message == "" {
// if we're here it means the returned error wasn't OData v4 compliant.
// try to unmarshal the body in hopes of getting something.
rawBody := map[string]interface{}{}
decoder := autorest.NewDecoder(encodedAs, bytes.NewReader(b.Bytes()))
if err := decoder.Decode(&rawBody); err != nil {
- return err
+ return fmt.Errorf("autorest/azure: error response cannot be parsed: %q error: %v", b.String(), err)
}
e.ServiceError = &ServiceError{
diff --git a/vendor/github.com/Azure/go-autorest/autorest/azure/cli/go.mod b/vendor/github.com/Azure/go-autorest/autorest/azure/cli/go.mod
index a58302914dc..7e06a8bb724 100644
--- a/vendor/github.com/Azure/go-autorest/autorest/azure/cli/go.mod
+++ b/vendor/github.com/Azure/go-autorest/autorest/azure/cli/go.mod
@@ -3,9 +3,9 @@ module github.com/Azure/go-autorest/autorest/azure/cli
go 1.12
require (
- github.com/Azure/go-autorest/autorest v0.9.0
- github.com/Azure/go-autorest/autorest/adal v0.8.0
- github.com/Azure/go-autorest/autorest/date v0.2.0
+ github.com/Azure/go-autorest v14.2.0+incompatible
+ github.com/Azure/go-autorest/autorest/adal v0.9.5
+ github.com/Azure/go-autorest/autorest/date v0.3.0
github.com/dimchansky/utfbom v1.1.0
github.com/mitchellh/go-homedir v1.1.0
)
diff --git a/vendor/github.com/Azure/go-autorest/autorest/azure/cli/go.sum b/vendor/github.com/Azure/go-autorest/autorest/azure/cli/go.sum
index 542806b9471..f2f970684df 100644
--- a/vendor/github.com/Azure/go-autorest/autorest/azure/cli/go.sum
+++ b/vendor/github.com/Azure/go-autorest/autorest/azure/cli/go.sum
@@ -1,29 +1,24 @@
-github.com/Azure/go-autorest/autorest v0.9.0 h1:MRvx8gncNaXJqOoLmhNjUAKh33JJF8LyxPhomEtOsjs=
-github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI=
-github.com/Azure/go-autorest/autorest/adal v0.5.0 h1:q2gDruN08/guU9vAjuPWff0+QIrpH6ediguzdAzXAUU=
-github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0=
-github.com/Azure/go-autorest/autorest/adal v0.8.0 h1:CxTzQrySOxDnKpLjFJeZAS5Qrv/qFPkgLjx5bOAi//I=
-github.com/Azure/go-autorest/autorest/adal v0.8.0/go.mod h1:Z6vX6WXXuyieHAXwMj0S6HY6e6wcHn37qQMBQlvY3lc=
-github.com/Azure/go-autorest/autorest/date v0.1.0 h1:YGrhWfrgtFs84+h0o46rJrlmsZtyZRg470CqAXTZaGM=
-github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA=
-github.com/Azure/go-autorest/autorest/date v0.2.0 h1:yW+Zlqf26583pE43KhfnhFcdmSWlm5Ew6bxipnr/tbM=
-github.com/Azure/go-autorest/autorest/date v0.2.0/go.mod h1:vcORJHLJEh643/Ioh9+vPmf1Ij9AEBM5FuBIXLmIy0g=
-github.com/Azure/go-autorest/autorest/mocks v0.1.0 h1:Kx+AUU2Te+A3JIyYn6Dfs+cFgx5XorQKuIXrZGoq/SI=
-github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0=
-github.com/Azure/go-autorest/autorest/mocks v0.2.0 h1:Ww5g4zThfD/6cLb4z6xxgeyDa7QDkizMkJKe0ysZXp0=
-github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0=
-github.com/Azure/go-autorest/autorest/mocks v0.3.0 h1:qJumjCaCudz+OcqE9/XtEPfvtOjOmKaui4EOpFI6zZc=
-github.com/Azure/go-autorest/autorest/mocks v0.3.0/go.mod h1:a8FDP3DYzQ4RYfVAxAN3SVSiiO77gL2j2ronKKP0syM=
-github.com/Azure/go-autorest/logger v0.1.0 h1:ruG4BSDXONFRrZZJ2GUXDiUyVpayPmb1GnWeHDdaNKY=
-github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc=
-github.com/Azure/go-autorest/tracing v0.5.0 h1:TRn4WjSnkcSy5AEG3pnbtFSwNtwzjr4VYyQflFE619k=
-github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk=
-github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM=
-github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
+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.5 h1:Y3bBUV4rTuxenJJs41HU3qmqsb+auo+a3Lz+PlJPpL0=
+github.com/Azure/go-autorest/autorest/adal v0.9.5/go.mod h1:B7KF7jKIeC9Mct5spmyCB/A8CG/sEz1vwIRGv/bbw7A=
+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/tracing v0.6.0 h1:TYi4+3m5t6K48TGI9AUdb+IzbnSxvnvUMfuitfgcfuo=
+github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU=
github.com/dimchansky/utfbom v1.1.0 h1:FcM3g+nofKgUteL8dm/UpdRXNC9KmADgTpLKsu0TRo4=
github.com/dimchansky/utfbom v1.1.0/go.mod h1:rO41eb7gLfo8SF1jd9F8HplJm1Fewwi4mQvIirEdv+8=
+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=
github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y=
github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
+golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0 h1:hb9wdF1z5waM+dSIICn1l0DkLVDT3hqhhQsDNUmHPRE=
+golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
+golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a h1:1BGLXjeY4akVXGgbC9HugT3Jv3hCI0z56oJR5vAMgBU=
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/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
diff --git a/vendor/github.com/Azure/go-autorest/autorest/azure/cli/go_mod_tidy_hack.go b/vendor/github.com/Azure/go-autorest/autorest/azure/cli/go_mod_tidy_hack.go
index 618bed392fc..861ce2984e6 100644
--- a/vendor/github.com/Azure/go-autorest/autorest/azure/cli/go_mod_tidy_hack.go
+++ b/vendor/github.com/Azure/go-autorest/autorest/azure/cli/go_mod_tidy_hack.go
@@ -16,9 +16,9 @@ package cli
// See the License for the specific language governing permissions and
// limitations under the License.
-// This file, and the github.com/Azure/go-autorest/autorest import, won't actually become part of
+// This file, and the github.com/Azure/go-autorest import, won't actually become part of
// the resultant binary.
// Necessary for safely adding multi-module repo.
// See: https://github.com/golang/go/wiki/Modules#is-it-possible-to-add-a-module-to-a-multi-module-repository
-import _ "github.com/Azure/go-autorest/autorest"
+import _ "github.com/Azure/go-autorest"
diff --git a/vendor/github.com/Azure/go-autorest/autorest/client.go b/vendor/github.com/Azure/go-autorest/autorest/client.go
index e04f9fd4ecd..0b7525f0f4c 100644
--- a/vendor/github.com/Azure/go-autorest/autorest/client.go
+++ b/vendor/github.com/Azure/go-autorest/autorest/client.go
@@ -17,6 +17,7 @@ package autorest
import (
"bytes"
"crypto/tls"
+ "errors"
"fmt"
"io"
"io/ioutil"
@@ -165,7 +166,8 @@ type Client struct {
// Setting this to zero will use the provided context to control the duration.
PollingDuration time.Duration
- // RetryAttempts sets the default number of retry attempts for client.
+ // RetryAttempts sets the total number of times the client will attempt to make an HTTP request.
+ // Set the value to 1 to disable retries. DO NOT set the value to less than 1.
RetryAttempts int
// RetryDuration sets the delay duration for retries.
@@ -259,6 +261,9 @@ func (c Client) Do(r *http.Request) (*http.Response, error) {
},
})
resp, err := SendWithSender(c.sender(tls.RenegotiateNever), r)
+ if resp == nil && err == nil {
+ err = errors.New("autorest: received nil response and error")
+ }
logger.Instance.WriteResponse(resp, logger.Filter{})
Respond(resp, c.ByInspecting())
return resp, err
diff --git a/vendor/github.com/Azure/go-autorest/autorest/date/go.mod b/vendor/github.com/Azure/go-autorest/autorest/date/go.mod
index 3adc4804c3d..f88ecc4022d 100644
--- a/vendor/github.com/Azure/go-autorest/autorest/date/go.mod
+++ b/vendor/github.com/Azure/go-autorest/autorest/date/go.mod
@@ -2,4 +2,4 @@ module github.com/Azure/go-autorest/autorest/date
go 1.12
-require github.com/Azure/go-autorest/autorest v0.9.0
+require github.com/Azure/go-autorest v14.2.0+incompatible
diff --git a/vendor/github.com/Azure/go-autorest/autorest/date/go.sum b/vendor/github.com/Azure/go-autorest/autorest/date/go.sum
index 9e2ee7a9484..1fc56a962ee 100644
--- a/vendor/github.com/Azure/go-autorest/autorest/date/go.sum
+++ b/vendor/github.com/Azure/go-autorest/autorest/date/go.sum
@@ -1,16 +1,2 @@
-github.com/Azure/go-autorest/autorest v0.9.0 h1:MRvx8gncNaXJqOoLmhNjUAKh33JJF8LyxPhomEtOsjs=
-github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI=
-github.com/Azure/go-autorest/autorest/adal v0.5.0 h1:q2gDruN08/guU9vAjuPWff0+QIrpH6ediguzdAzXAUU=
-github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0=
-github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA=
-github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0=
-github.com/Azure/go-autorest/autorest/mocks v0.2.0 h1:Ww5g4zThfD/6cLb4z6xxgeyDa7QDkizMkJKe0ysZXp0=
-github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0=
-github.com/Azure/go-autorest/logger v0.1.0 h1:ruG4BSDXONFRrZZJ2GUXDiUyVpayPmb1GnWeHDdaNKY=
-github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc=
-github.com/Azure/go-autorest/tracing v0.5.0 h1:TRn4WjSnkcSy5AEG3pnbtFSwNtwzjr4VYyQflFE619k=
-github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk=
-github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM=
-github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
-golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
-golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
+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=
diff --git a/vendor/github.com/Azure/go-autorest/autorest/date/go_mod_tidy_hack.go b/vendor/github.com/Azure/go-autorest/autorest/date/go_mod_tidy_hack.go
index 55adf930f4a..4e054320717 100644
--- a/vendor/github.com/Azure/go-autorest/autorest/date/go_mod_tidy_hack.go
+++ b/vendor/github.com/Azure/go-autorest/autorest/date/go_mod_tidy_hack.go
@@ -16,9 +16,9 @@ package date
// See the License for the specific language governing permissions and
// limitations under the License.
-// This file, and the github.com/Azure/go-autorest/autorest import, won't actually become part of
+// This file, and the github.com/Azure/go-autorest import, won't actually become part of
// the resultant binary.
// Necessary for safely adding multi-module repo.
// See: https://github.com/golang/go/wiki/Modules#is-it-possible-to-add-a-module-to-a-multi-module-repository
-import _ "github.com/Azure/go-autorest/autorest"
+import _ "github.com/Azure/go-autorest"
diff --git a/vendor/github.com/Azure/go-autorest/autorest/error.go b/vendor/github.com/Azure/go-autorest/autorest/error.go
index f724f33327e..35098eda8e7 100644
--- a/vendor/github.com/Azure/go-autorest/autorest/error.go
+++ b/vendor/github.com/Azure/go-autorest/autorest/error.go
@@ -96,3 +96,8 @@ func (e DetailedError) Error() string {
}
return fmt.Sprintf("%s#%s: %s: StatusCode=%d -- Original Error: %v", e.PackageType, e.Method, e.Message, e.StatusCode, e.Original)
}
+
+// Unwrap returns the original error.
+func (e DetailedError) Unwrap() error {
+ return e.Original
+}
diff --git a/vendor/github.com/Azure/go-autorest/autorest/go.mod b/vendor/github.com/Azure/go-autorest/autorest/go.mod
index 75a534f1089..fd0b2c0c327 100644
--- a/vendor/github.com/Azure/go-autorest/autorest/go.mod
+++ b/vendor/github.com/Azure/go-autorest/autorest/go.mod
@@ -4,9 +4,9 @@ go 1.12
require (
github.com/Azure/go-autorest v14.2.0+incompatible
- github.com/Azure/go-autorest/autorest/adal v0.9.5
+ github.com/Azure/go-autorest/autorest/adal v0.9.13
github.com/Azure/go-autorest/autorest/mocks v0.4.1
- github.com/Azure/go-autorest/logger v0.2.0
+ 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-20201002170205-7f63de1d35b0
)
diff --git a/vendor/github.com/Azure/go-autorest/autorest/go.sum b/vendor/github.com/Azure/go-autorest/autorest/go.sum
index fa27c68d105..373d9c4e255 100644
--- a/vendor/github.com/Azure/go-autorest/autorest/go.sum
+++ b/vendor/github.com/Azure/go-autorest/autorest/go.sum
@@ -1,13 +1,13 @@
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.5 h1:Y3bBUV4rTuxenJJs41HU3qmqsb+auo+a3Lz+PlJPpL0=
-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.13 h1:Mp5hbtOePIzM8pJVRa3YLrWWmZtoxRXqUEzCfJt3+/Q=
+github.com/Azure/go-autorest/autorest/adal v0.9.13/go.mod h1:W/MM4U6nLxnIskrw4UwWzlHfGjwUS50aOsc/I3yuU8M=
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/logger v0.2.0 h1:e4RVHVZKC5p6UANLJHkM4OfR1UKZPj8Wt8Pcx+3oqrE=
-github.com/Azure/go-autorest/logger v0.2.0/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8=
+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=
diff --git a/vendor/github.com/Azure/go-autorest/autorest/utility.go b/vendor/github.com/Azure/go-autorest/autorest/utility.go
index 416041c3f33..3467b8fa604 100644
--- a/vendor/github.com/Azure/go-autorest/autorest/utility.go
+++ b/vendor/github.com/Azure/go-autorest/autorest/utility.go
@@ -26,8 +26,6 @@ import (
"net/url"
"reflect"
"strings"
-
- "github.com/Azure/go-autorest/autorest/adal"
)
// EncodedAs is a series of constants specifying various data encodings
@@ -207,18 +205,6 @@ func ChangeToGet(req *http.Request) *http.Request {
return req
}
-// IsTokenRefreshError returns true if the specified error implements the TokenRefreshError
-// interface. If err is a DetailedError it will walk the chain of Original errors.
-func IsTokenRefreshError(err error) bool {
- if _, ok := err.(adal.TokenRefreshError); ok {
- return true
- }
- if de, ok := err.(DetailedError); ok {
- return IsTokenRefreshError(de.Original)
- }
- return false
-}
-
// IsTemporaryNetworkError returns true if the specified error is a temporary network error or false
// if it's not. If the error doesn't implement the net.Error interface the return value is true.
func IsTemporaryNetworkError(err error) bool {
diff --git a/vendor/github.com/Azure/go-autorest/autorest/utility_1.13.go b/vendor/github.com/Azure/go-autorest/autorest/utility_1.13.go
new file mode 100644
index 00000000000..4cb5e6849f6
--- /dev/null
+++ b/vendor/github.com/Azure/go-autorest/autorest/utility_1.13.go
@@ -0,0 +1,29 @@
+// +build go1.13
+
+// Copyright 2017 Microsoft Corporation
+//
+// 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 autorest
+
+import (
+ "errors"
+
+ "github.com/Azure/go-autorest/autorest/adal"
+)
+
+// IsTokenRefreshError returns true if the specified error implements the TokenRefreshError interface.
+func IsTokenRefreshError(err error) bool {
+ var tre adal.TokenRefreshError
+ return errors.As(err, &tre)
+}
diff --git a/vendor/github.com/Azure/go-autorest/autorest/utility_legacy.go b/vendor/github.com/Azure/go-autorest/autorest/utility_legacy.go
new file mode 100644
index 00000000000..ebb51b4f531
--- /dev/null
+++ b/vendor/github.com/Azure/go-autorest/autorest/utility_legacy.go
@@ -0,0 +1,31 @@
+// +build !go1.13
+
+// Copyright 2017 Microsoft Corporation
+//
+// 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 autorest
+
+import "github.com/Azure/go-autorest/autorest/adal"
+
+// IsTokenRefreshError returns true if the specified error implements the TokenRefreshError
+// interface. If err is a DetailedError it will walk the chain of Original errors.
+func IsTokenRefreshError(err error) bool {
+ if _, ok := err.(adal.TokenRefreshError); ok {
+ return true
+ }
+ if de, ok := err.(DetailedError); ok {
+ return IsTokenRefreshError(de.Original)
+ }
+ return false
+}
diff --git a/vendor/github.com/Azure/go-autorest/autorest/validation/go.mod b/vendor/github.com/Azure/go-autorest/autorest/validation/go.mod
index b3f9b6a0960..a0a69e9aed5 100644
--- a/vendor/github.com/Azure/go-autorest/autorest/validation/go.mod
+++ b/vendor/github.com/Azure/go-autorest/autorest/validation/go.mod
@@ -3,6 +3,6 @@ module github.com/Azure/go-autorest/autorest/validation
go 1.12
require (
- github.com/Azure/go-autorest/autorest v0.9.0
+ github.com/Azure/go-autorest v14.2.0+incompatible
github.com/stretchr/testify v1.3.0
)
diff --git a/vendor/github.com/Azure/go-autorest/autorest/validation/go.sum b/vendor/github.com/Azure/go-autorest/autorest/validation/go.sum
index 6b9010a736d..6c1119aab96 100644
--- a/vendor/github.com/Azure/go-autorest/autorest/validation/go.sum
+++ b/vendor/github.com/Azure/go-autorest/autorest/validation/go.sum
@@ -1,24 +1,9 @@
-github.com/Azure/go-autorest/autorest v0.9.0 h1:MRvx8gncNaXJqOoLmhNjUAKh33JJF8LyxPhomEtOsjs=
-github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI=
-github.com/Azure/go-autorest/autorest/adal v0.5.0 h1:q2gDruN08/guU9vAjuPWff0+QIrpH6ediguzdAzXAUU=
-github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0=
-github.com/Azure/go-autorest/autorest/date v0.1.0 h1:YGrhWfrgtFs84+h0o46rJrlmsZtyZRg470CqAXTZaGM=
-github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA=
-github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0=
-github.com/Azure/go-autorest/autorest/mocks v0.2.0 h1:Ww5g4zThfD/6cLb4z6xxgeyDa7QDkizMkJKe0ysZXp0=
-github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0=
-github.com/Azure/go-autorest/logger v0.1.0 h1:ruG4BSDXONFRrZZJ2GUXDiUyVpayPmb1GnWeHDdaNKY=
-github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc=
-github.com/Azure/go-autorest/tracing v0.5.0 h1:TRn4WjSnkcSy5AEG3pnbtFSwNtwzjr4VYyQflFE619k=
-github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk=
+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/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/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM=
-github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
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/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q=
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
-golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
-golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
diff --git a/vendor/github.com/Azure/go-autorest/autorest/validation/go_mod_tidy_hack.go b/vendor/github.com/Azure/go-autorest/autorest/validation/go_mod_tidy_hack.go
index 2b2668581e8..cf1436291a7 100644
--- a/vendor/github.com/Azure/go-autorest/autorest/validation/go_mod_tidy_hack.go
+++ b/vendor/github.com/Azure/go-autorest/autorest/validation/go_mod_tidy_hack.go
@@ -16,9 +16,9 @@ package validation
// See the License for the specific language governing permissions and
// limitations under the License.
-// This file, and the github.com/Azure/go-autorest/autorest import, won't actually become part of
+// This file, and the github.com/Azure/go-autorest import, won't actually become part of
// the resultant binary.
// Necessary for safely adding multi-module repo.
// See: https://github.com/golang/go/wiki/Modules#is-it-possible-to-add-a-module-to-a-multi-module-repository
-import _ "github.com/Azure/go-autorest/autorest"
+import _ "github.com/Azure/go-autorest"
diff --git a/vendor/github.com/Azure/go-autorest/autorest/validation/validation.go b/vendor/github.com/Azure/go-autorest/autorest/validation/validation.go
index 65899b69b8c..ff41cfe0796 100644
--- a/vendor/github.com/Azure/go-autorest/autorest/validation/validation.go
+++ b/vendor/github.com/Azure/go-autorest/autorest/validation/validation.go
@@ -24,6 +24,9 @@ import (
"strings"
)
+// Disabled controls if parameter validation should be globally disabled. The default is false.
+var Disabled bool
+
// Constraint stores constraint name, target field name
// Rule and chain validations.
type Constraint struct {
@@ -68,6 +71,9 @@ const (
// Validate method validates constraints on parameter
// passed in validation array.
func Validate(m []Validation) error {
+ if Disabled {
+ return nil
+ }
for _, item := range m {
v := reflect.ValueOf(item.TargetValue)
for _, constraint := range item.Constraints {
diff --git a/vendor/github.com/Azure/go-autorest/logger/logger.go b/vendor/github.com/Azure/go-autorest/logger/logger.go
index da09f394c5d..2f5d8cc1a19 100644
--- a/vendor/github.com/Azure/go-autorest/logger/logger.go
+++ b/vendor/github.com/Azure/go-autorest/logger/logger.go
@@ -55,6 +55,10 @@ const (
// LogDebug tells a logger to log all LogDebug, LogInfo, LogWarning, LogError, LogPanic and LogFatal entries passed to it.
LogDebug
+
+ // LogAuth is a special case of LogDebug, it tells a logger to also log the body of an authentication request and response.
+ // NOTE: this can disclose sensitive information, use with care.
+ LogAuth
)
const (
@@ -65,6 +69,7 @@ const (
logWarning = "WARNING"
logInfo = "INFO"
logDebug = "DEBUG"
+ logAuth = "AUTH"
logUnknown = "UNKNOWN"
)
@@ -83,6 +88,8 @@ func ParseLevel(s string) (lt LevelType, err error) {
lt = LogInfo
case logDebug:
lt = LogDebug
+ case logAuth:
+ lt = LogAuth
default:
err = fmt.Errorf("bad log level '%s'", s)
}
@@ -106,6 +113,8 @@ func (lt LevelType) String() string {
return logInfo
case LogDebug:
return logDebug
+ case LogAuth:
+ return logAuth
default:
return logUnknown
}
diff --git a/vendor/github.com/aws/aws-sdk-go/service/efs/api.go b/vendor/github.com/aws/aws-sdk-go/service/efs/api.go
new file mode 100644
index 00000000000..4df7c02ac6f
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go/service/efs/api.go
@@ -0,0 +1,8088 @@
+// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
+
+package efs
+
+import (
+ "fmt"
+ "time"
+
+ "github.com/aws/aws-sdk-go/aws"
+ "github.com/aws/aws-sdk-go/aws/awsutil"
+ "github.com/aws/aws-sdk-go/aws/request"
+ "github.com/aws/aws-sdk-go/private/protocol"
+ "github.com/aws/aws-sdk-go/private/protocol/restjson"
+)
+
+const opCreateAccessPoint = "CreateAccessPoint"
+
+// CreateAccessPointRequest generates a "aws/request.Request" representing the
+// client's request for the CreateAccessPoint operation. The "output" return
+// value will be populated with the request's response once the request completes
+// successfully.
+//
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
+//
+// See CreateAccessPoint for more information on using the CreateAccessPoint
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
+//
+//
+// // Example sending a request using the CreateAccessPointRequest method.
+// req, resp := client.CreateAccessPointRequest(params)
+//
+// err := req.Send()
+// if err == nil { // resp is now filled
+// fmt.Println(resp)
+// }
+//
+// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/CreateAccessPoint
+func (c *EFS) CreateAccessPointRequest(input *CreateAccessPointInput) (req *request.Request, output *CreateAccessPointOutput) {
+ op := &request.Operation{
+ Name: opCreateAccessPoint,
+ HTTPMethod: "POST",
+ HTTPPath: "/2015-02-01/access-points",
+ }
+
+ if input == nil {
+ input = &CreateAccessPointInput{}
+ }
+
+ output = &CreateAccessPointOutput{}
+ req = c.newRequest(op, input, output)
+ return
+}
+
+// CreateAccessPoint API operation for Amazon Elastic File System.
+//
+// Creates an EFS access point. An access point is an application-specific view
+// into an EFS file system that applies an operating system user and group,
+// and a file system path, to any file system request made through the access
+// point. The operating system user and group override any identity information
+// provided by the NFS client. The file system path is exposed as the access
+// point's root directory. Applications using the access point can only access
+// data in its own directory and below. To learn more, see Mounting a file system
+// using EFS access points (https://docs.aws.amazon.com/efs/latest/ug/efs-access-points.html).
+//
+// This operation requires permissions for the elasticfilesystem:CreateAccessPoint
+// action.
+//
+// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
+// with awserr.Error's Code and Message methods to get detailed information about
+// the error.
+//
+// See the AWS API reference guide for Amazon Elastic File System's
+// API operation CreateAccessPoint for usage and error information.
+//
+// Returned Error Types:
+// * BadRequest
+// Returned if the request is malformed or contains an error such as an invalid
+// parameter value or a missing required parameter.
+//
+// * AccessPointAlreadyExists
+// Returned if the access point you are trying to create already exists, with
+// the creation token you provided in the request.
+//
+// * IncorrectFileSystemLifeCycleState
+// Returned if the file system's lifecycle state is not "available".
+//
+// * InternalServerError
+// Returned if an error occurred on the server side.
+//
+// * FileSystemNotFound
+// Returned if the specified FileSystemId value doesn't exist in the requester's
+// AWS account.
+//
+// * AccessPointLimitExceeded
+// Returned if the AWS account has already created the maximum number of access
+// points allowed per file system.
+//
+// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/CreateAccessPoint
+func (c *EFS) CreateAccessPoint(input *CreateAccessPointInput) (*CreateAccessPointOutput, error) {
+ req, out := c.CreateAccessPointRequest(input)
+ return out, req.Send()
+}
+
+// CreateAccessPointWithContext is the same as CreateAccessPoint with the addition of
+// the ability to pass a context and additional request options.
+//
+// See CreateAccessPoint for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EFS) CreateAccessPointWithContext(ctx aws.Context, input *CreateAccessPointInput, opts ...request.Option) (*CreateAccessPointOutput, error) {
+ req, out := c.CreateAccessPointRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
+}
+
+const opCreateFileSystem = "CreateFileSystem"
+
+// CreateFileSystemRequest generates a "aws/request.Request" representing the
+// client's request for the CreateFileSystem operation. The "output" return
+// value will be populated with the request's response once the request completes
+// successfully.
+//
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
+//
+// See CreateFileSystem for more information on using the CreateFileSystem
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
+//
+//
+// // Example sending a request using the CreateFileSystemRequest method.
+// req, resp := client.CreateFileSystemRequest(params)
+//
+// err := req.Send()
+// if err == nil { // resp is now filled
+// fmt.Println(resp)
+// }
+//
+// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/CreateFileSystem
+func (c *EFS) CreateFileSystemRequest(input *CreateFileSystemInput) (req *request.Request, output *FileSystemDescription) {
+ op := &request.Operation{
+ Name: opCreateFileSystem,
+ HTTPMethod: "POST",
+ HTTPPath: "/2015-02-01/file-systems",
+ }
+
+ if input == nil {
+ input = &CreateFileSystemInput{}
+ }
+
+ output = &FileSystemDescription{}
+ req = c.newRequest(op, input, output)
+ return
+}
+
+// CreateFileSystem API operation for Amazon Elastic File System.
+//
+// Creates a new, empty file system. The operation requires a creation token
+// in the request that Amazon EFS uses to ensure idempotent creation (calling
+// the operation with same creation token has no effect). If a file system does
+// not currently exist that is owned by the caller's AWS account with the specified
+// creation token, this operation does the following:
+//
+// * Creates a new, empty file system. The file system will have an Amazon
+// EFS assigned ID, and an initial lifecycle state creating.
+//
+// * Returns with the description of the created file system.
+//
+// Otherwise, this operation returns a FileSystemAlreadyExists error with the
+// ID of the existing file system.
+//
+// For basic use cases, you can use a randomly generated UUID for the creation
+// token.
+//
+// The idempotent operation allows you to retry a CreateFileSystem call without
+// risk of creating an extra file system. This can happen when an initial call
+// fails in a way that leaves it uncertain whether or not a file system was
+// actually created. An example might be that a transport level timeout occurred
+// or your connection was reset. As long as you use the same creation token,
+// if the initial call had succeeded in creating a file system, the client can
+// learn of its existence from the FileSystemAlreadyExists error.
+//
+// For more information, see Creating a file system (https://docs.aws.amazon.com/efs/latest/ug/creating-using-create-fs.html#creating-using-create-fs-part1)
+// in the Amazon EFS User Guide.
+//
+// The CreateFileSystem call returns while the file system's lifecycle state
+// is still creating. You can check the file system creation status by calling
+// the DescribeFileSystems operation, which among other things returns the file
+// system state.
+//
+// This operation accepts an optional PerformanceMode parameter that you choose
+// for your file system. We recommend generalPurpose performance mode for most
+// file systems. File systems using the maxIO performance mode can scale to
+// higher levels of aggregate throughput and operations per second with a tradeoff
+// of slightly higher latencies for most file operations. The performance mode
+// can't be changed after the file system has been created. For more information,
+// see Amazon EFS performance modes (https://docs.aws.amazon.com/efs/latest/ug/performance.html#performancemodes.html).
+//
+// You can set the throughput mode for the file system using the ThroughputMode
+// parameter.
+//
+// After the file system is fully created, Amazon EFS sets its lifecycle state
+// to available, at which point you can create one or more mount targets for
+// the file system in your VPC. For more information, see CreateMountTarget.
+// You mount your Amazon EFS file system on an EC2 instances in your VPC by
+// using the mount target. For more information, see Amazon EFS: How it Works
+// (https://docs.aws.amazon.com/efs/latest/ug/how-it-works.html).
+//
+// This operation requires permissions for the elasticfilesystem:CreateFileSystem
+// action.
+//
+// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
+// with awserr.Error's Code and Message methods to get detailed information about
+// the error.
+//
+// See the AWS API reference guide for Amazon Elastic File System's
+// API operation CreateFileSystem for usage and error information.
+//
+// Returned Error Types:
+// * BadRequest
+// Returned if the request is malformed or contains an error such as an invalid
+// parameter value or a missing required parameter.
+//
+// * InternalServerError
+// Returned if an error occurred on the server side.
+//
+// * FileSystemAlreadyExists
+// Returned if the file system you are trying to create already exists, with
+// the creation token you provided.
+//
+// * FileSystemLimitExceeded
+// Returned if the AWS account has already created the maximum number of file
+// systems allowed per account.
+//
+// * InsufficientThroughputCapacity
+// Returned if there's not enough capacity to provision additional throughput.
+// This value might be returned when you try to create a file system in provisioned
+// throughput mode, when you attempt to increase the provisioned throughput
+// of an existing file system, or when you attempt to change an existing file
+// system from bursting to provisioned throughput mode. Try again later.
+//
+// * ThroughputLimitExceeded
+// Returned if the throughput mode or amount of provisioned throughput can't
+// be changed because the throughput limit of 1024 MiB/s has been reached.
+//
+// * UnsupportedAvailabilityZone
+// Returned if the requested Amazon EFS functionality is not available in the
+// specified Availability Zone.
+//
+// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/CreateFileSystem
+func (c *EFS) CreateFileSystem(input *CreateFileSystemInput) (*FileSystemDescription, error) {
+ req, out := c.CreateFileSystemRequest(input)
+ return out, req.Send()
+}
+
+// CreateFileSystemWithContext is the same as CreateFileSystem with the addition of
+// the ability to pass a context and additional request options.
+//
+// See CreateFileSystem for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EFS) CreateFileSystemWithContext(ctx aws.Context, input *CreateFileSystemInput, opts ...request.Option) (*FileSystemDescription, error) {
+ req, out := c.CreateFileSystemRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
+}
+
+const opCreateMountTarget = "CreateMountTarget"
+
+// CreateMountTargetRequest generates a "aws/request.Request" representing the
+// client's request for the CreateMountTarget operation. The "output" return
+// value will be populated with the request's response once the request completes
+// successfully.
+//
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
+//
+// See CreateMountTarget for more information on using the CreateMountTarget
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
+//
+//
+// // Example sending a request using the CreateMountTargetRequest method.
+// req, resp := client.CreateMountTargetRequest(params)
+//
+// err := req.Send()
+// if err == nil { // resp is now filled
+// fmt.Println(resp)
+// }
+//
+// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/CreateMountTarget
+func (c *EFS) CreateMountTargetRequest(input *CreateMountTargetInput) (req *request.Request, output *MountTargetDescription) {
+ op := &request.Operation{
+ Name: opCreateMountTarget,
+ HTTPMethod: "POST",
+ HTTPPath: "/2015-02-01/mount-targets",
+ }
+
+ if input == nil {
+ input = &CreateMountTargetInput{}
+ }
+
+ output = &MountTargetDescription{}
+ req = c.newRequest(op, input, output)
+ return
+}
+
+// CreateMountTarget API operation for Amazon Elastic File System.
+//
+// Creates a mount target for a file system. You can then mount the file system
+// on EC2 instances by using the mount target.
+//
+// You can create one mount target in each Availability Zone in your VPC. All
+// EC2 instances in a VPC within a given Availability Zone share a single mount
+// target for a given file system. If you have multiple subnets in an Availability
+// Zone, you create a mount target in one of the subnets. EC2 instances do not
+// need to be in the same subnet as the mount target in order to access their
+// file system.
+//
+// You can create only one mount target for an EFS file system using One Zone
+// storage classes. You must create that mount target in the same Availability
+// Zone in which the file system is located. Use the AvailabilityZoneName and
+// AvailabiltyZoneId properties in the DescribeFileSystems response object to
+// get this information. Use the subnetId associated with the file system's
+// Availability Zone when creating the mount target.
+//
+// For more information, see Amazon EFS: How it Works (https://docs.aws.amazon.com/efs/latest/ug/how-it-works.html).
+//
+// To create a mount target for a file system, the file system's lifecycle state
+// must be available. For more information, see DescribeFileSystems.
+//
+// In the request, provide the following:
+//
+// * The file system ID for which you are creating the mount target.
+//
+// * A subnet ID, which determines the following: The VPC in which Amazon
+// EFS creates the mount target The Availability Zone in which Amazon EFS
+// creates the mount target The IP address range from which Amazon EFS selects
+// the IP address of the mount target (if you don't specify an IP address
+// in the request)
+//
+// After creating the mount target, Amazon EFS returns a response that includes,
+// a MountTargetId and an IpAddress. You use this IP address when mounting the
+// file system in an EC2 instance. You can also use the mount target's DNS name
+// when mounting the file system. The EC2 instance on which you mount the file
+// system by using the mount target can resolve the mount target's DNS name
+// to its IP address. For more information, see How it Works: Implementation
+// Overview (https://docs.aws.amazon.com/efs/latest/ug/how-it-works.html#how-it-works-implementation).
+//
+// Note that you can create mount targets for a file system in only one VPC,
+// and there can be only one mount target per Availability Zone. That is, if
+// the file system already has one or more mount targets created for it, the
+// subnet specified in the request to add another mount target must meet the
+// following requirements:
+//
+// * Must belong to the same VPC as the subnets of the existing mount targets
+//
+// * Must not be in the same Availability Zone as any of the subnets of the
+// existing mount targets
+//
+// If the request satisfies the requirements, Amazon EFS does the following:
+//
+// * Creates a new mount target in the specified subnet.
+//
+// * Also creates a new network interface in the subnet as follows: If the
+// request provides an IpAddress, Amazon EFS assigns that IP address to the
+// network interface. Otherwise, Amazon EFS assigns a free address in the
+// subnet (in the same way that the Amazon EC2 CreateNetworkInterface call
+// does when a request does not specify a primary private IP address). If
+// the request provides SecurityGroups, this network interface is associated
+// with those security groups. Otherwise, it belongs to the default security
+// group for the subnet's VPC. Assigns the description Mount target fsmt-id
+// for file system fs-id where fsmt-id is the mount target ID, and fs-id
+// is the FileSystemId. Sets the requesterManaged property of the network
+// interface to true, and the requesterId value to EFS. Each Amazon EFS mount
+// target has one corresponding requester-managed EC2 network interface.
+// After the network interface is created, Amazon EFS sets the NetworkInterfaceId
+// field in the mount target's description to the network interface ID, and
+// the IpAddress field to its address. If network interface creation fails,
+// the entire CreateMountTarget operation fails.
+//
+// The CreateMountTarget call returns only after creating the network interface,
+// but while the mount target state is still creating, you can check the mount
+// target creation status by calling the DescribeMountTargets operation, which
+// among other things returns the mount target state.
+//
+// We recommend that you create a mount target in each of the Availability Zones.
+// There are cost considerations for using a file system in an Availability
+// Zone through a mount target created in another Availability Zone. For more
+// information, see Amazon EFS (http://aws.amazon.com/efs/). In addition, by
+// always using a mount target local to the instance's Availability Zone, you
+// eliminate a partial failure scenario. If the Availability Zone in which your
+// mount target is created goes down, then you can't access your file system
+// through that mount target.
+//
+// This operation requires permissions for the following action on the file
+// system:
+//
+// * elasticfilesystem:CreateMountTarget
+//
+// This operation also requires permissions for the following Amazon EC2 actions:
+//
+// * ec2:DescribeSubnets
+//
+// * ec2:DescribeNetworkInterfaces
+//
+// * ec2:CreateNetworkInterface
+//
+// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
+// with awserr.Error's Code and Message methods to get detailed information about
+// the error.
+//
+// See the AWS API reference guide for Amazon Elastic File System's
+// API operation CreateMountTarget for usage and error information.
+//
+// Returned Error Types:
+// * BadRequest
+// Returned if the request is malformed or contains an error such as an invalid
+// parameter value or a missing required parameter.
+//
+// * InternalServerError
+// Returned if an error occurred on the server side.
+//
+// * FileSystemNotFound
+// Returned if the specified FileSystemId value doesn't exist in the requester's
+// AWS account.
+//
+// * IncorrectFileSystemLifeCycleState
+// Returned if the file system's lifecycle state is not "available".
+//
+// * MountTargetConflict
+// Returned if the mount target would violate one of the specified restrictions
+// based on the file system's existing mount targets.
+//
+// * SubnetNotFound
+// Returned if there is no subnet with ID SubnetId provided in the request.
+//
+// * NoFreeAddressesInSubnet
+// Returned if IpAddress was not specified in the request and there are no free
+// IP addresses in the subnet.
+//
+// * IpAddressInUse
+// Returned if the request specified an IpAddress that is already in use in
+// the subnet.
+//
+// * NetworkInterfaceLimitExceeded
+// The calling account has reached the limit for elastic network interfaces
+// for the specific AWS Region. The client should try to delete some elastic
+// network interfaces or get the account limit raised. For more information,
+// see Amazon VPC Limits (https://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Appendix_Limits.html)
+// in the Amazon VPC User Guide (see the Network interfaces per VPC entry in
+// the table).
+//
+// * SecurityGroupLimitExceeded
+// Returned if the size of SecurityGroups specified in the request is greater
+// than five.
+//
+// * SecurityGroupNotFound
+// Returned if one of the specified security groups doesn't exist in the subnet's
+// VPC.
+//
+// * UnsupportedAvailabilityZone
+// Returned if the requested Amazon EFS functionality is not available in the
+// specified Availability Zone.
+//
+// * AvailabilityZonesMismatch
+// Returned if the Availability Zone that was specified for a mount target is
+// different from the Availability Zone that was specified for One Zone storage
+// classes. For more information, see Regional and One Zone storage redundancy
+// (https://docs.aws.amazon.com/efs/latest/ug/availability-durability.html).
+//
+// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/CreateMountTarget
+func (c *EFS) CreateMountTarget(input *CreateMountTargetInput) (*MountTargetDescription, error) {
+ req, out := c.CreateMountTargetRequest(input)
+ return out, req.Send()
+}
+
+// CreateMountTargetWithContext is the same as CreateMountTarget with the addition of
+// the ability to pass a context and additional request options.
+//
+// See CreateMountTarget for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EFS) CreateMountTargetWithContext(ctx aws.Context, input *CreateMountTargetInput, opts ...request.Option) (*MountTargetDescription, error) {
+ req, out := c.CreateMountTargetRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
+}
+
+const opCreateTags = "CreateTags"
+
+// CreateTagsRequest generates a "aws/request.Request" representing the
+// client's request for the CreateTags operation. The "output" return
+// value will be populated with the request's response once the request completes
+// successfully.
+//
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
+//
+// See CreateTags for more information on using the CreateTags
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
+//
+//
+// // Example sending a request using the CreateTagsRequest method.
+// req, resp := client.CreateTagsRequest(params)
+//
+// err := req.Send()
+// if err == nil { // resp is now filled
+// fmt.Println(resp)
+// }
+//
+// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/CreateTags
+//
+// Deprecated: Use TagResource.
+func (c *EFS) CreateTagsRequest(input *CreateTagsInput) (req *request.Request, output *CreateTagsOutput) {
+ if c.Client.Config.Logger != nil {
+ c.Client.Config.Logger.Log("This operation, CreateTags, has been deprecated")
+ }
+ op := &request.Operation{
+ Name: opCreateTags,
+ HTTPMethod: "POST",
+ HTTPPath: "/2015-02-01/create-tags/{FileSystemId}",
+ }
+
+ if input == nil {
+ input = &CreateTagsInput{}
+ }
+
+ output = &CreateTagsOutput{}
+ req = c.newRequest(op, input, output)
+ req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
+ return
+}
+
+// CreateTags API operation for Amazon Elastic File System.
+//
+// Creates or overwrites tags associated with a file system. Each tag is a key-value
+// pair. If a tag key specified in the request already exists on the file system,
+// this operation overwrites its value with the value provided in the request.
+// If you add the Name tag to your file system, Amazon EFS returns it in the
+// response to the DescribeFileSystems operation.
+//
+// This operation requires permission for the elasticfilesystem:CreateTags action.
+//
+// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
+// with awserr.Error's Code and Message methods to get detailed information about
+// the error.
+//
+// See the AWS API reference guide for Amazon Elastic File System's
+// API operation CreateTags for usage and error information.
+//
+// Returned Error Types:
+// * BadRequest
+// Returned if the request is malformed or contains an error such as an invalid
+// parameter value or a missing required parameter.
+//
+// * InternalServerError
+// Returned if an error occurred on the server side.
+//
+// * FileSystemNotFound
+// Returned if the specified FileSystemId value doesn't exist in the requester's
+// AWS account.
+//
+// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/CreateTags
+//
+// Deprecated: Use TagResource.
+func (c *EFS) CreateTags(input *CreateTagsInput) (*CreateTagsOutput, error) {
+ req, out := c.CreateTagsRequest(input)
+ return out, req.Send()
+}
+
+// CreateTagsWithContext is the same as CreateTags with the addition of
+// the ability to pass a context and additional request options.
+//
+// See CreateTags for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+//
+// Deprecated: Use TagResource.
+func (c *EFS) CreateTagsWithContext(ctx aws.Context, input *CreateTagsInput, opts ...request.Option) (*CreateTagsOutput, error) {
+ req, out := c.CreateTagsRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
+}
+
+const opDeleteAccessPoint = "DeleteAccessPoint"
+
+// DeleteAccessPointRequest generates a "aws/request.Request" representing the
+// client's request for the DeleteAccessPoint operation. The "output" return
+// value will be populated with the request's response once the request completes
+// successfully.
+//
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
+//
+// See DeleteAccessPoint for more information on using the DeleteAccessPoint
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
+//
+//
+// // Example sending a request using the DeleteAccessPointRequest method.
+// req, resp := client.DeleteAccessPointRequest(params)
+//
+// err := req.Send()
+// if err == nil { // resp is now filled
+// fmt.Println(resp)
+// }
+//
+// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/DeleteAccessPoint
+func (c *EFS) DeleteAccessPointRequest(input *DeleteAccessPointInput) (req *request.Request, output *DeleteAccessPointOutput) {
+ op := &request.Operation{
+ Name: opDeleteAccessPoint,
+ HTTPMethod: "DELETE",
+ HTTPPath: "/2015-02-01/access-points/{AccessPointId}",
+ }
+
+ if input == nil {
+ input = &DeleteAccessPointInput{}
+ }
+
+ output = &DeleteAccessPointOutput{}
+ req = c.newRequest(op, input, output)
+ req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
+ return
+}
+
+// DeleteAccessPoint API operation for Amazon Elastic File System.
+//
+// Deletes the specified access point. After deletion is complete, new clients
+// can no longer connect to the access points. Clients connected to the access
+// point at the time of deletion will continue to function until they terminate
+// their connection.
+//
+// This operation requires permissions for the elasticfilesystem:DeleteAccessPoint
+// action.
+//
+// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
+// with awserr.Error's Code and Message methods to get detailed information about
+// the error.
+//
+// See the AWS API reference guide for Amazon Elastic File System's
+// API operation DeleteAccessPoint for usage and error information.
+//
+// Returned Error Types:
+// * BadRequest
+// Returned if the request is malformed or contains an error such as an invalid
+// parameter value or a missing required parameter.
+//
+// * InternalServerError
+// Returned if an error occurred on the server side.
+//
+// * AccessPointNotFound
+// Returned if the specified AccessPointId value doesn't exist in the requester's
+// AWS account.
+//
+// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/DeleteAccessPoint
+func (c *EFS) DeleteAccessPoint(input *DeleteAccessPointInput) (*DeleteAccessPointOutput, error) {
+ req, out := c.DeleteAccessPointRequest(input)
+ return out, req.Send()
+}
+
+// DeleteAccessPointWithContext is the same as DeleteAccessPoint with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DeleteAccessPoint for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EFS) DeleteAccessPointWithContext(ctx aws.Context, input *DeleteAccessPointInput, opts ...request.Option) (*DeleteAccessPointOutput, error) {
+ req, out := c.DeleteAccessPointRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
+}
+
+const opDeleteFileSystem = "DeleteFileSystem"
+
+// DeleteFileSystemRequest generates a "aws/request.Request" representing the
+// client's request for the DeleteFileSystem operation. The "output" return
+// value will be populated with the request's response once the request completes
+// successfully.
+//
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
+//
+// See DeleteFileSystem for more information on using the DeleteFileSystem
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
+//
+//
+// // Example sending a request using the DeleteFileSystemRequest method.
+// req, resp := client.DeleteFileSystemRequest(params)
+//
+// err := req.Send()
+// if err == nil { // resp is now filled
+// fmt.Println(resp)
+// }
+//
+// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/DeleteFileSystem
+func (c *EFS) DeleteFileSystemRequest(input *DeleteFileSystemInput) (req *request.Request, output *DeleteFileSystemOutput) {
+ op := &request.Operation{
+ Name: opDeleteFileSystem,
+ HTTPMethod: "DELETE",
+ HTTPPath: "/2015-02-01/file-systems/{FileSystemId}",
+ }
+
+ if input == nil {
+ input = &DeleteFileSystemInput{}
+ }
+
+ output = &DeleteFileSystemOutput{}
+ req = c.newRequest(op, input, output)
+ req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
+ return
+}
+
+// DeleteFileSystem API operation for Amazon Elastic File System.
+//
+// Deletes a file system, permanently severing access to its contents. Upon
+// return, the file system no longer exists and you can't access any contents
+// of the deleted file system.
+//
+// You can't delete a file system that is in use. That is, if the file system
+// has any mount targets, you must first delete them. For more information,
+// see DescribeMountTargets and DeleteMountTarget.
+//
+// The DeleteFileSystem call returns while the file system state is still deleting.
+// You can check the file system deletion status by calling the DescribeFileSystems
+// operation, which returns a list of file systems in your account. If you pass
+// file system ID or creation token for the deleted file system, the DescribeFileSystems
+// returns a 404 FileSystemNotFound error.
+//
+// This operation requires permissions for the elasticfilesystem:DeleteFileSystem
+// action.
+//
+// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
+// with awserr.Error's Code and Message methods to get detailed information about
+// the error.
+//
+// See the AWS API reference guide for Amazon Elastic File System's
+// API operation DeleteFileSystem for usage and error information.
+//
+// Returned Error Types:
+// * BadRequest
+// Returned if the request is malformed or contains an error such as an invalid
+// parameter value or a missing required parameter.
+//
+// * InternalServerError
+// Returned if an error occurred on the server side.
+//
+// * FileSystemNotFound
+// Returned if the specified FileSystemId value doesn't exist in the requester's
+// AWS account.
+//
+// * FileSystemInUse
+// Returned if a file system has mount targets.
+//
+// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/DeleteFileSystem
+func (c *EFS) DeleteFileSystem(input *DeleteFileSystemInput) (*DeleteFileSystemOutput, error) {
+ req, out := c.DeleteFileSystemRequest(input)
+ return out, req.Send()
+}
+
+// DeleteFileSystemWithContext is the same as DeleteFileSystem with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DeleteFileSystem for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EFS) DeleteFileSystemWithContext(ctx aws.Context, input *DeleteFileSystemInput, opts ...request.Option) (*DeleteFileSystemOutput, error) {
+ req, out := c.DeleteFileSystemRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
+}
+
+const opDeleteFileSystemPolicy = "DeleteFileSystemPolicy"
+
+// DeleteFileSystemPolicyRequest generates a "aws/request.Request" representing the
+// client's request for the DeleteFileSystemPolicy operation. The "output" return
+// value will be populated with the request's response once the request completes
+// successfully.
+//
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
+//
+// See DeleteFileSystemPolicy for more information on using the DeleteFileSystemPolicy
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
+//
+//
+// // Example sending a request using the DeleteFileSystemPolicyRequest method.
+// req, resp := client.DeleteFileSystemPolicyRequest(params)
+//
+// err := req.Send()
+// if err == nil { // resp is now filled
+// fmt.Println(resp)
+// }
+//
+// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/DeleteFileSystemPolicy
+func (c *EFS) DeleteFileSystemPolicyRequest(input *DeleteFileSystemPolicyInput) (req *request.Request, output *DeleteFileSystemPolicyOutput) {
+ op := &request.Operation{
+ Name: opDeleteFileSystemPolicy,
+ HTTPMethod: "DELETE",
+ HTTPPath: "/2015-02-01/file-systems/{FileSystemId}/policy",
+ }
+
+ if input == nil {
+ input = &DeleteFileSystemPolicyInput{}
+ }
+
+ output = &DeleteFileSystemPolicyOutput{}
+ req = c.newRequest(op, input, output)
+ req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
+ return
+}
+
+// DeleteFileSystemPolicy API operation for Amazon Elastic File System.
+//
+// Deletes the FileSystemPolicy for the specified file system. The default FileSystemPolicy
+// goes into effect once the existing policy is deleted. For more information
+// about the default file system policy, see Using Resource-based Policies with
+// EFS (https://docs.aws.amazon.com/efs/latest/ug/res-based-policies-efs.html).
+//
+// This operation requires permissions for the elasticfilesystem:DeleteFileSystemPolicy
+// action.
+//
+// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
+// with awserr.Error's Code and Message methods to get detailed information about
+// the error.
+//
+// See the AWS API reference guide for Amazon Elastic File System's
+// API operation DeleteFileSystemPolicy for usage and error information.
+//
+// Returned Error Types:
+// * InternalServerError
+// Returned if an error occurred on the server side.
+//
+// * FileSystemNotFound
+// Returned if the specified FileSystemId value doesn't exist in the requester's
+// AWS account.
+//
+// * IncorrectFileSystemLifeCycleState
+// Returned if the file system's lifecycle state is not "available".
+//
+// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/DeleteFileSystemPolicy
+func (c *EFS) DeleteFileSystemPolicy(input *DeleteFileSystemPolicyInput) (*DeleteFileSystemPolicyOutput, error) {
+ req, out := c.DeleteFileSystemPolicyRequest(input)
+ return out, req.Send()
+}
+
+// DeleteFileSystemPolicyWithContext is the same as DeleteFileSystemPolicy with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DeleteFileSystemPolicy for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EFS) DeleteFileSystemPolicyWithContext(ctx aws.Context, input *DeleteFileSystemPolicyInput, opts ...request.Option) (*DeleteFileSystemPolicyOutput, error) {
+ req, out := c.DeleteFileSystemPolicyRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
+}
+
+const opDeleteMountTarget = "DeleteMountTarget"
+
+// DeleteMountTargetRequest generates a "aws/request.Request" representing the
+// client's request for the DeleteMountTarget operation. The "output" return
+// value will be populated with the request's response once the request completes
+// successfully.
+//
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
+//
+// See DeleteMountTarget for more information on using the DeleteMountTarget
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
+//
+//
+// // Example sending a request using the DeleteMountTargetRequest method.
+// req, resp := client.DeleteMountTargetRequest(params)
+//
+// err := req.Send()
+// if err == nil { // resp is now filled
+// fmt.Println(resp)
+// }
+//
+// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/DeleteMountTarget
+func (c *EFS) DeleteMountTargetRequest(input *DeleteMountTargetInput) (req *request.Request, output *DeleteMountTargetOutput) {
+ op := &request.Operation{
+ Name: opDeleteMountTarget,
+ HTTPMethod: "DELETE",
+ HTTPPath: "/2015-02-01/mount-targets/{MountTargetId}",
+ }
+
+ if input == nil {
+ input = &DeleteMountTargetInput{}
+ }
+
+ output = &DeleteMountTargetOutput{}
+ req = c.newRequest(op, input, output)
+ req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
+ return
+}
+
+// DeleteMountTarget API operation for Amazon Elastic File System.
+//
+// Deletes the specified mount target.
+//
+// This operation forcibly breaks any mounts of the file system by using the
+// mount target that is being deleted, which might disrupt instances or applications
+// using those mounts. To avoid applications getting cut off abruptly, you might
+// consider unmounting any mounts of the mount target, if feasible. The operation
+// also deletes the associated network interface. Uncommitted writes might be
+// lost, but breaking a mount target using this operation does not corrupt the
+// file system itself. The file system you created remains. You can mount an
+// EC2 instance in your VPC by using another mount target.
+//
+// This operation requires permissions for the following action on the file
+// system:
+//
+// * elasticfilesystem:DeleteMountTarget
+//
+// The DeleteMountTarget call returns while the mount target state is still
+// deleting. You can check the mount target deletion by calling the DescribeMountTargets
+// operation, which returns a list of mount target descriptions for the given
+// file system.
+//
+// The operation also requires permissions for the following Amazon EC2 action
+// on the mount target's network interface:
+//
+// * ec2:DeleteNetworkInterface
+//
+// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
+// with awserr.Error's Code and Message methods to get detailed information about
+// the error.
+//
+// See the AWS API reference guide for Amazon Elastic File System's
+// API operation DeleteMountTarget for usage and error information.
+//
+// Returned Error Types:
+// * BadRequest
+// Returned if the request is malformed or contains an error such as an invalid
+// parameter value or a missing required parameter.
+//
+// * InternalServerError
+// Returned if an error occurred on the server side.
+//
+// * DependencyTimeout
+// The service timed out trying to fulfill the request, and the client should
+// try the call again.
+//
+// * MountTargetNotFound
+// Returned if there is no mount target with the specified ID found in the caller's
+// account.
+//
+// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/DeleteMountTarget
+func (c *EFS) DeleteMountTarget(input *DeleteMountTargetInput) (*DeleteMountTargetOutput, error) {
+ req, out := c.DeleteMountTargetRequest(input)
+ return out, req.Send()
+}
+
+// DeleteMountTargetWithContext is the same as DeleteMountTarget with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DeleteMountTarget for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EFS) DeleteMountTargetWithContext(ctx aws.Context, input *DeleteMountTargetInput, opts ...request.Option) (*DeleteMountTargetOutput, error) {
+ req, out := c.DeleteMountTargetRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
+}
+
+const opDeleteTags = "DeleteTags"
+
+// DeleteTagsRequest generates a "aws/request.Request" representing the
+// client's request for the DeleteTags operation. The "output" return
+// value will be populated with the request's response once the request completes
+// successfully.
+//
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
+//
+// See DeleteTags for more information on using the DeleteTags
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
+//
+//
+// // Example sending a request using the DeleteTagsRequest method.
+// req, resp := client.DeleteTagsRequest(params)
+//
+// err := req.Send()
+// if err == nil { // resp is now filled
+// fmt.Println(resp)
+// }
+//
+// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/DeleteTags
+//
+// Deprecated: Use UntagResource.
+func (c *EFS) DeleteTagsRequest(input *DeleteTagsInput) (req *request.Request, output *DeleteTagsOutput) {
+ if c.Client.Config.Logger != nil {
+ c.Client.Config.Logger.Log("This operation, DeleteTags, has been deprecated")
+ }
+ op := &request.Operation{
+ Name: opDeleteTags,
+ HTTPMethod: "POST",
+ HTTPPath: "/2015-02-01/delete-tags/{FileSystemId}",
+ }
+
+ if input == nil {
+ input = &DeleteTagsInput{}
+ }
+
+ output = &DeleteTagsOutput{}
+ req = c.newRequest(op, input, output)
+ req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
+ return
+}
+
+// DeleteTags API operation for Amazon Elastic File System.
+//
+// Deletes the specified tags from a file system. If the DeleteTags request
+// includes a tag key that doesn't exist, Amazon EFS ignores it and doesn't
+// cause an error. For more information about tags and related restrictions,
+// see Tag Restrictions (https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/cost-alloc-tags.html)
+// in the AWS Billing and Cost Management User Guide.
+//
+// This operation requires permissions for the elasticfilesystem:DeleteTags
+// action.
+//
+// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
+// with awserr.Error's Code and Message methods to get detailed information about
+// the error.
+//
+// See the AWS API reference guide for Amazon Elastic File System's
+// API operation DeleteTags for usage and error information.
+//
+// Returned Error Types:
+// * BadRequest
+// Returned if the request is malformed or contains an error such as an invalid
+// parameter value or a missing required parameter.
+//
+// * InternalServerError
+// Returned if an error occurred on the server side.
+//
+// * FileSystemNotFound
+// Returned if the specified FileSystemId value doesn't exist in the requester's
+// AWS account.
+//
+// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/DeleteTags
+//
+// Deprecated: Use UntagResource.
+func (c *EFS) DeleteTags(input *DeleteTagsInput) (*DeleteTagsOutput, error) {
+ req, out := c.DeleteTagsRequest(input)
+ return out, req.Send()
+}
+
+// DeleteTagsWithContext is the same as DeleteTags with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DeleteTags for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+//
+// Deprecated: Use UntagResource.
+func (c *EFS) DeleteTagsWithContext(ctx aws.Context, input *DeleteTagsInput, opts ...request.Option) (*DeleteTagsOutput, error) {
+ req, out := c.DeleteTagsRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
+}
+
+const opDescribeAccessPoints = "DescribeAccessPoints"
+
+// DescribeAccessPointsRequest generates a "aws/request.Request" representing the
+// client's request for the DescribeAccessPoints operation. The "output" return
+// value will be populated with the request's response once the request completes
+// successfully.
+//
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
+//
+// See DescribeAccessPoints for more information on using the DescribeAccessPoints
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
+//
+//
+// // Example sending a request using the DescribeAccessPointsRequest method.
+// req, resp := client.DescribeAccessPointsRequest(params)
+//
+// err := req.Send()
+// if err == nil { // resp is now filled
+// fmt.Println(resp)
+// }
+//
+// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/DescribeAccessPoints
+func (c *EFS) DescribeAccessPointsRequest(input *DescribeAccessPointsInput) (req *request.Request, output *DescribeAccessPointsOutput) {
+ op := &request.Operation{
+ Name: opDescribeAccessPoints,
+ HTTPMethod: "GET",
+ HTTPPath: "/2015-02-01/access-points",
+ Paginator: &request.Paginator{
+ InputTokens: []string{"NextToken"},
+ OutputTokens: []string{"NextToken"},
+ LimitToken: "MaxResults",
+ TruncationToken: "",
+ },
+ }
+
+ if input == nil {
+ input = &DescribeAccessPointsInput{}
+ }
+
+ output = &DescribeAccessPointsOutput{}
+ req = c.newRequest(op, input, output)
+ return
+}
+
+// DescribeAccessPoints API operation for Amazon Elastic File System.
+//
+// Returns the description of a specific Amazon EFS access point if the AccessPointId
+// is provided. If you provide an EFS FileSystemId, it returns descriptions
+// of all access points for that file system. You can provide either an AccessPointId
+// or a FileSystemId in the request, but not both.
+//
+// This operation requires permissions for the elasticfilesystem:DescribeAccessPoints
+// action.
+//
+// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
+// with awserr.Error's Code and Message methods to get detailed information about
+// the error.
+//
+// See the AWS API reference guide for Amazon Elastic File System's
+// API operation DescribeAccessPoints for usage and error information.
+//
+// Returned Error Types:
+// * BadRequest
+// Returned if the request is malformed or contains an error such as an invalid
+// parameter value or a missing required parameter.
+//
+// * InternalServerError
+// Returned if an error occurred on the server side.
+//
+// * FileSystemNotFound
+// Returned if the specified FileSystemId value doesn't exist in the requester's
+// AWS account.
+//
+// * AccessPointNotFound
+// Returned if the specified AccessPointId value doesn't exist in the requester's
+// AWS account.
+//
+// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/DescribeAccessPoints
+func (c *EFS) DescribeAccessPoints(input *DescribeAccessPointsInput) (*DescribeAccessPointsOutput, error) {
+ req, out := c.DescribeAccessPointsRequest(input)
+ return out, req.Send()
+}
+
+// DescribeAccessPointsWithContext is the same as DescribeAccessPoints with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeAccessPoints for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EFS) DescribeAccessPointsWithContext(ctx aws.Context, input *DescribeAccessPointsInput, opts ...request.Option) (*DescribeAccessPointsOutput, error) {
+ req, out := c.DescribeAccessPointsRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
+}
+
+// DescribeAccessPointsPages iterates over the pages of a DescribeAccessPoints operation,
+// calling the "fn" function with the response data for each page. To stop
+// iterating, return false from the fn function.
+//
+// See DescribeAccessPoints method for more information on how to use this operation.
+//
+// Note: This operation can generate multiple requests to a service.
+//
+// // Example iterating over at most 3 pages of a DescribeAccessPoints operation.
+// pageNum := 0
+// err := client.DescribeAccessPointsPages(params,
+// func(page *efs.DescribeAccessPointsOutput, lastPage bool) bool {
+// pageNum++
+// fmt.Println(page)
+// return pageNum <= 3
+// })
+//
+func (c *EFS) DescribeAccessPointsPages(input *DescribeAccessPointsInput, fn func(*DescribeAccessPointsOutput, bool) bool) error {
+ return c.DescribeAccessPointsPagesWithContext(aws.BackgroundContext(), input, fn)
+}
+
+// DescribeAccessPointsPagesWithContext same as DescribeAccessPointsPages except
+// it takes a Context and allows setting request options on the pages.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EFS) DescribeAccessPointsPagesWithContext(ctx aws.Context, input *DescribeAccessPointsInput, fn func(*DescribeAccessPointsOutput, bool) bool, opts ...request.Option) error {
+ p := request.Pagination{
+ NewRequest: func() (*request.Request, error) {
+ var inCpy *DescribeAccessPointsInput
+ if input != nil {
+ tmp := *input
+ inCpy = &tmp
+ }
+ req, _ := c.DescribeAccessPointsRequest(inCpy)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return req, nil
+ },
+ }
+
+ for p.Next() {
+ if !fn(p.Page().(*DescribeAccessPointsOutput), !p.HasNextPage()) {
+ break
+ }
+ }
+
+ return p.Err()
+}
+
+const opDescribeBackupPolicy = "DescribeBackupPolicy"
+
+// DescribeBackupPolicyRequest generates a "aws/request.Request" representing the
+// client's request for the DescribeBackupPolicy operation. The "output" return
+// value will be populated with the request's response once the request completes
+// successfully.
+//
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
+//
+// See DescribeBackupPolicy for more information on using the DescribeBackupPolicy
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
+//
+//
+// // Example sending a request using the DescribeBackupPolicyRequest method.
+// req, resp := client.DescribeBackupPolicyRequest(params)
+//
+// err := req.Send()
+// if err == nil { // resp is now filled
+// fmt.Println(resp)
+// }
+//
+// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/DescribeBackupPolicy
+func (c *EFS) DescribeBackupPolicyRequest(input *DescribeBackupPolicyInput) (req *request.Request, output *DescribeBackupPolicyOutput) {
+ op := &request.Operation{
+ Name: opDescribeBackupPolicy,
+ HTTPMethod: "GET",
+ HTTPPath: "/2015-02-01/file-systems/{FileSystemId}/backup-policy",
+ }
+
+ if input == nil {
+ input = &DescribeBackupPolicyInput{}
+ }
+
+ output = &DescribeBackupPolicyOutput{}
+ req = c.newRequest(op, input, output)
+ return
+}
+
+// DescribeBackupPolicy API operation for Amazon Elastic File System.
+//
+// Returns the backup policy for the specified EFS file system.
+//
+// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
+// with awserr.Error's Code and Message methods to get detailed information about
+// the error.
+//
+// See the AWS API reference guide for Amazon Elastic File System's
+// API operation DescribeBackupPolicy for usage and error information.
+//
+// Returned Error Types:
+// * BadRequest
+// Returned if the request is malformed or contains an error such as an invalid
+// parameter value or a missing required parameter.
+//
+// * FileSystemNotFound
+// Returned if the specified FileSystemId value doesn't exist in the requester's
+// AWS account.
+//
+// * InternalServerError
+// Returned if an error occurred on the server side.
+//
+// * PolicyNotFound
+// Returned if the default file system policy is in effect for the EFS file
+// system specified.
+//
+// * ValidationException
+// Returned if the AWS Backup service is not available in the Region in which
+// the request was made.
+//
+// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/DescribeBackupPolicy
+func (c *EFS) DescribeBackupPolicy(input *DescribeBackupPolicyInput) (*DescribeBackupPolicyOutput, error) {
+ req, out := c.DescribeBackupPolicyRequest(input)
+ return out, req.Send()
+}
+
+// DescribeBackupPolicyWithContext is the same as DescribeBackupPolicy with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeBackupPolicy for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EFS) DescribeBackupPolicyWithContext(ctx aws.Context, input *DescribeBackupPolicyInput, opts ...request.Option) (*DescribeBackupPolicyOutput, error) {
+ req, out := c.DescribeBackupPolicyRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
+}
+
+const opDescribeFileSystemPolicy = "DescribeFileSystemPolicy"
+
+// DescribeFileSystemPolicyRequest generates a "aws/request.Request" representing the
+// client's request for the DescribeFileSystemPolicy operation. The "output" return
+// value will be populated with the request's response once the request completes
+// successfully.
+//
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
+//
+// See DescribeFileSystemPolicy for more information on using the DescribeFileSystemPolicy
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
+//
+//
+// // Example sending a request using the DescribeFileSystemPolicyRequest method.
+// req, resp := client.DescribeFileSystemPolicyRequest(params)
+//
+// err := req.Send()
+// if err == nil { // resp is now filled
+// fmt.Println(resp)
+// }
+//
+// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/DescribeFileSystemPolicy
+func (c *EFS) DescribeFileSystemPolicyRequest(input *DescribeFileSystemPolicyInput) (req *request.Request, output *DescribeFileSystemPolicyOutput) {
+ op := &request.Operation{
+ Name: opDescribeFileSystemPolicy,
+ HTTPMethod: "GET",
+ HTTPPath: "/2015-02-01/file-systems/{FileSystemId}/policy",
+ }
+
+ if input == nil {
+ input = &DescribeFileSystemPolicyInput{}
+ }
+
+ output = &DescribeFileSystemPolicyOutput{}
+ req = c.newRequest(op, input, output)
+ return
+}
+
+// DescribeFileSystemPolicy API operation for Amazon Elastic File System.
+//
+// Returns the FileSystemPolicy for the specified EFS file system.
+//
+// This operation requires permissions for the elasticfilesystem:DescribeFileSystemPolicy
+// action.
+//
+// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
+// with awserr.Error's Code and Message methods to get detailed information about
+// the error.
+//
+// See the AWS API reference guide for Amazon Elastic File System's
+// API operation DescribeFileSystemPolicy for usage and error information.
+//
+// Returned Error Types:
+// * InternalServerError
+// Returned if an error occurred on the server side.
+//
+// * FileSystemNotFound
+// Returned if the specified FileSystemId value doesn't exist in the requester's
+// AWS account.
+//
+// * PolicyNotFound
+// Returned if the default file system policy is in effect for the EFS file
+// system specified.
+//
+// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/DescribeFileSystemPolicy
+func (c *EFS) DescribeFileSystemPolicy(input *DescribeFileSystemPolicyInput) (*DescribeFileSystemPolicyOutput, error) {
+ req, out := c.DescribeFileSystemPolicyRequest(input)
+ return out, req.Send()
+}
+
+// DescribeFileSystemPolicyWithContext is the same as DescribeFileSystemPolicy with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeFileSystemPolicy for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EFS) DescribeFileSystemPolicyWithContext(ctx aws.Context, input *DescribeFileSystemPolicyInput, opts ...request.Option) (*DescribeFileSystemPolicyOutput, error) {
+ req, out := c.DescribeFileSystemPolicyRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
+}
+
+const opDescribeFileSystems = "DescribeFileSystems"
+
+// DescribeFileSystemsRequest generates a "aws/request.Request" representing the
+// client's request for the DescribeFileSystems operation. The "output" return
+// value will be populated with the request's response once the request completes
+// successfully.
+//
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
+//
+// See DescribeFileSystems for more information on using the DescribeFileSystems
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
+//
+//
+// // Example sending a request using the DescribeFileSystemsRequest method.
+// req, resp := client.DescribeFileSystemsRequest(params)
+//
+// err := req.Send()
+// if err == nil { // resp is now filled
+// fmt.Println(resp)
+// }
+//
+// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/DescribeFileSystems
+func (c *EFS) DescribeFileSystemsRequest(input *DescribeFileSystemsInput) (req *request.Request, output *DescribeFileSystemsOutput) {
+ op := &request.Operation{
+ Name: opDescribeFileSystems,
+ HTTPMethod: "GET",
+ HTTPPath: "/2015-02-01/file-systems",
+ Paginator: &request.Paginator{
+ InputTokens: []string{"Marker"},
+ OutputTokens: []string{"NextMarker"},
+ LimitToken: "MaxItems",
+ TruncationToken: "",
+ },
+ }
+
+ if input == nil {
+ input = &DescribeFileSystemsInput{}
+ }
+
+ output = &DescribeFileSystemsOutput{}
+ req = c.newRequest(op, input, output)
+ return
+}
+
+// DescribeFileSystems API operation for Amazon Elastic File System.
+//
+// Returns the description of a specific Amazon EFS file system if either the
+// file system CreationToken or the FileSystemId is provided. Otherwise, it
+// returns descriptions of all file systems owned by the caller's AWS account
+// in the AWS Region of the endpoint that you're calling.
+//
+// When retrieving all file system descriptions, you can optionally specify
+// the MaxItems parameter to limit the number of descriptions in a response.
+// Currently, this number is automatically set to 10. If more file system descriptions
+// remain, Amazon EFS returns a NextMarker, an opaque token, in the response.
+// In this case, you should send a subsequent request with the Marker request
+// parameter set to the value of NextMarker.
+//
+// To retrieve a list of your file system descriptions, this operation is used
+// in an iterative process, where DescribeFileSystems is called first without
+// the Marker and then the operation continues to call it with the Marker parameter
+// set to the value of the NextMarker from the previous response until the response
+// has no NextMarker.
+//
+// The order of file systems returned in the response of one DescribeFileSystems
+// call and the order of file systems returned across the responses of a multi-call
+// iteration is unspecified.
+//
+// This operation requires permissions for the elasticfilesystem:DescribeFileSystems
+// action.
+//
+// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
+// with awserr.Error's Code and Message methods to get detailed information about
+// the error.
+//
+// See the AWS API reference guide for Amazon Elastic File System's
+// API operation DescribeFileSystems for usage and error information.
+//
+// Returned Error Types:
+// * BadRequest
+// Returned if the request is malformed or contains an error such as an invalid
+// parameter value or a missing required parameter.
+//
+// * InternalServerError
+// Returned if an error occurred on the server side.
+//
+// * FileSystemNotFound
+// Returned if the specified FileSystemId value doesn't exist in the requester's
+// AWS account.
+//
+// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/DescribeFileSystems
+func (c *EFS) DescribeFileSystems(input *DescribeFileSystemsInput) (*DescribeFileSystemsOutput, error) {
+ req, out := c.DescribeFileSystemsRequest(input)
+ return out, req.Send()
+}
+
+// DescribeFileSystemsWithContext is the same as DescribeFileSystems with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeFileSystems for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EFS) DescribeFileSystemsWithContext(ctx aws.Context, input *DescribeFileSystemsInput, opts ...request.Option) (*DescribeFileSystemsOutput, error) {
+ req, out := c.DescribeFileSystemsRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
+}
+
+// DescribeFileSystemsPages iterates over the pages of a DescribeFileSystems operation,
+// calling the "fn" function with the response data for each page. To stop
+// iterating, return false from the fn function.
+//
+// See DescribeFileSystems method for more information on how to use this operation.
+//
+// Note: This operation can generate multiple requests to a service.
+//
+// // Example iterating over at most 3 pages of a DescribeFileSystems operation.
+// pageNum := 0
+// err := client.DescribeFileSystemsPages(params,
+// func(page *efs.DescribeFileSystemsOutput, lastPage bool) bool {
+// pageNum++
+// fmt.Println(page)
+// return pageNum <= 3
+// })
+//
+func (c *EFS) DescribeFileSystemsPages(input *DescribeFileSystemsInput, fn func(*DescribeFileSystemsOutput, bool) bool) error {
+ return c.DescribeFileSystemsPagesWithContext(aws.BackgroundContext(), input, fn)
+}
+
+// DescribeFileSystemsPagesWithContext same as DescribeFileSystemsPages except
+// it takes a Context and allows setting request options on the pages.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EFS) DescribeFileSystemsPagesWithContext(ctx aws.Context, input *DescribeFileSystemsInput, fn func(*DescribeFileSystemsOutput, bool) bool, opts ...request.Option) error {
+ p := request.Pagination{
+ NewRequest: func() (*request.Request, error) {
+ var inCpy *DescribeFileSystemsInput
+ if input != nil {
+ tmp := *input
+ inCpy = &tmp
+ }
+ req, _ := c.DescribeFileSystemsRequest(inCpy)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return req, nil
+ },
+ }
+
+ for p.Next() {
+ if !fn(p.Page().(*DescribeFileSystemsOutput), !p.HasNextPage()) {
+ break
+ }
+ }
+
+ return p.Err()
+}
+
+const opDescribeLifecycleConfiguration = "DescribeLifecycleConfiguration"
+
+// DescribeLifecycleConfigurationRequest generates a "aws/request.Request" representing the
+// client's request for the DescribeLifecycleConfiguration operation. The "output" return
+// value will be populated with the request's response once the request completes
+// successfully.
+//
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
+//
+// See DescribeLifecycleConfiguration for more information on using the DescribeLifecycleConfiguration
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
+//
+//
+// // Example sending a request using the DescribeLifecycleConfigurationRequest method.
+// req, resp := client.DescribeLifecycleConfigurationRequest(params)
+//
+// err := req.Send()
+// if err == nil { // resp is now filled
+// fmt.Println(resp)
+// }
+//
+// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/DescribeLifecycleConfiguration
+func (c *EFS) DescribeLifecycleConfigurationRequest(input *DescribeLifecycleConfigurationInput) (req *request.Request, output *DescribeLifecycleConfigurationOutput) {
+ op := &request.Operation{
+ Name: opDescribeLifecycleConfiguration,
+ HTTPMethod: "GET",
+ HTTPPath: "/2015-02-01/file-systems/{FileSystemId}/lifecycle-configuration",
+ }
+
+ if input == nil {
+ input = &DescribeLifecycleConfigurationInput{}
+ }
+
+ output = &DescribeLifecycleConfigurationOutput{}
+ req = c.newRequest(op, input, output)
+ return
+}
+
+// DescribeLifecycleConfiguration API operation for Amazon Elastic File System.
+//
+// Returns the current LifecycleConfiguration object for the specified Amazon
+// EFS file system. EFS lifecycle management uses the LifecycleConfiguration
+// object to identify which files to move to the EFS Infrequent Access (IA)
+// storage class. For a file system without a LifecycleConfiguration object,
+// the call returns an empty array in the response.
+//
+// This operation requires permissions for the elasticfilesystem:DescribeLifecycleConfiguration
+// operation.
+//
+// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
+// with awserr.Error's Code and Message methods to get detailed information about
+// the error.
+//
+// See the AWS API reference guide for Amazon Elastic File System's
+// API operation DescribeLifecycleConfiguration for usage and error information.
+//
+// Returned Error Types:
+// * InternalServerError
+// Returned if an error occurred on the server side.
+//
+// * BadRequest
+// Returned if the request is malformed or contains an error such as an invalid
+// parameter value or a missing required parameter.
+//
+// * FileSystemNotFound
+// Returned if the specified FileSystemId value doesn't exist in the requester's
+// AWS account.
+//
+// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/DescribeLifecycleConfiguration
+func (c *EFS) DescribeLifecycleConfiguration(input *DescribeLifecycleConfigurationInput) (*DescribeLifecycleConfigurationOutput, error) {
+ req, out := c.DescribeLifecycleConfigurationRequest(input)
+ return out, req.Send()
+}
+
+// DescribeLifecycleConfigurationWithContext is the same as DescribeLifecycleConfiguration with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeLifecycleConfiguration for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EFS) DescribeLifecycleConfigurationWithContext(ctx aws.Context, input *DescribeLifecycleConfigurationInput, opts ...request.Option) (*DescribeLifecycleConfigurationOutput, error) {
+ req, out := c.DescribeLifecycleConfigurationRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
+}
+
+const opDescribeMountTargetSecurityGroups = "DescribeMountTargetSecurityGroups"
+
+// DescribeMountTargetSecurityGroupsRequest generates a "aws/request.Request" representing the
+// client's request for the DescribeMountTargetSecurityGroups operation. The "output" return
+// value will be populated with the request's response once the request completes
+// successfully.
+//
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
+//
+// See DescribeMountTargetSecurityGroups for more information on using the DescribeMountTargetSecurityGroups
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
+//
+//
+// // Example sending a request using the DescribeMountTargetSecurityGroupsRequest method.
+// req, resp := client.DescribeMountTargetSecurityGroupsRequest(params)
+//
+// err := req.Send()
+// if err == nil { // resp is now filled
+// fmt.Println(resp)
+// }
+//
+// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/DescribeMountTargetSecurityGroups
+func (c *EFS) DescribeMountTargetSecurityGroupsRequest(input *DescribeMountTargetSecurityGroupsInput) (req *request.Request, output *DescribeMountTargetSecurityGroupsOutput) {
+ op := &request.Operation{
+ Name: opDescribeMountTargetSecurityGroups,
+ HTTPMethod: "GET",
+ HTTPPath: "/2015-02-01/mount-targets/{MountTargetId}/security-groups",
+ }
+
+ if input == nil {
+ input = &DescribeMountTargetSecurityGroupsInput{}
+ }
+
+ output = &DescribeMountTargetSecurityGroupsOutput{}
+ req = c.newRequest(op, input, output)
+ return
+}
+
+// DescribeMountTargetSecurityGroups API operation for Amazon Elastic File System.
+//
+// Returns the security groups currently in effect for a mount target. This
+// operation requires that the network interface of the mount target has been
+// created and the lifecycle state of the mount target is not deleted.
+//
+// This operation requires permissions for the following actions:
+//
+// * elasticfilesystem:DescribeMountTargetSecurityGroups action on the mount
+// target's file system.
+//
+// * ec2:DescribeNetworkInterfaceAttribute action on the mount target's network
+// interface.
+//
+// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
+// with awserr.Error's Code and Message methods to get detailed information about
+// the error.
+//
+// See the AWS API reference guide for Amazon Elastic File System's
+// API operation DescribeMountTargetSecurityGroups for usage and error information.
+//
+// Returned Error Types:
+// * BadRequest
+// Returned if the request is malformed or contains an error such as an invalid
+// parameter value or a missing required parameter.
+//
+// * InternalServerError
+// Returned if an error occurred on the server side.
+//
+// * MountTargetNotFound
+// Returned if there is no mount target with the specified ID found in the caller's
+// account.
+//
+// * IncorrectMountTargetState
+// Returned if the mount target is not in the correct state for the operation.
+//
+// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/DescribeMountTargetSecurityGroups
+func (c *EFS) DescribeMountTargetSecurityGroups(input *DescribeMountTargetSecurityGroupsInput) (*DescribeMountTargetSecurityGroupsOutput, error) {
+ req, out := c.DescribeMountTargetSecurityGroupsRequest(input)
+ return out, req.Send()
+}
+
+// DescribeMountTargetSecurityGroupsWithContext is the same as DescribeMountTargetSecurityGroups with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeMountTargetSecurityGroups for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EFS) DescribeMountTargetSecurityGroupsWithContext(ctx aws.Context, input *DescribeMountTargetSecurityGroupsInput, opts ...request.Option) (*DescribeMountTargetSecurityGroupsOutput, error) {
+ req, out := c.DescribeMountTargetSecurityGroupsRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
+}
+
+const opDescribeMountTargets = "DescribeMountTargets"
+
+// DescribeMountTargetsRequest generates a "aws/request.Request" representing the
+// client's request for the DescribeMountTargets operation. The "output" return
+// value will be populated with the request's response once the request completes
+// successfully.
+//
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
+//
+// See DescribeMountTargets for more information on using the DescribeMountTargets
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
+//
+//
+// // Example sending a request using the DescribeMountTargetsRequest method.
+// req, resp := client.DescribeMountTargetsRequest(params)
+//
+// err := req.Send()
+// if err == nil { // resp is now filled
+// fmt.Println(resp)
+// }
+//
+// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/DescribeMountTargets
+func (c *EFS) DescribeMountTargetsRequest(input *DescribeMountTargetsInput) (req *request.Request, output *DescribeMountTargetsOutput) {
+ op := &request.Operation{
+ Name: opDescribeMountTargets,
+ HTTPMethod: "GET",
+ HTTPPath: "/2015-02-01/mount-targets",
+ }
+
+ if input == nil {
+ input = &DescribeMountTargetsInput{}
+ }
+
+ output = &DescribeMountTargetsOutput{}
+ req = c.newRequest(op, input, output)
+ return
+}
+
+// DescribeMountTargets API operation for Amazon Elastic File System.
+//
+// Returns the descriptions of all the current mount targets, or a specific
+// mount target, for a file system. When requesting all of the current mount
+// targets, the order of mount targets returned in the response is unspecified.
+//
+// This operation requires permissions for the elasticfilesystem:DescribeMountTargets
+// action, on either the file system ID that you specify in FileSystemId, or
+// on the file system of the mount target that you specify in MountTargetId.
+//
+// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
+// with awserr.Error's Code and Message methods to get detailed information about
+// the error.
+//
+// See the AWS API reference guide for Amazon Elastic File System's
+// API operation DescribeMountTargets for usage and error information.
+//
+// Returned Error Types:
+// * BadRequest
+// Returned if the request is malformed or contains an error such as an invalid
+// parameter value or a missing required parameter.
+//
+// * InternalServerError
+// Returned if an error occurred on the server side.
+//
+// * FileSystemNotFound
+// Returned if the specified FileSystemId value doesn't exist in the requester's
+// AWS account.
+//
+// * MountTargetNotFound
+// Returned if there is no mount target with the specified ID found in the caller's
+// account.
+//
+// * AccessPointNotFound
+// Returned if the specified AccessPointId value doesn't exist in the requester's
+// AWS account.
+//
+// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/DescribeMountTargets
+func (c *EFS) DescribeMountTargets(input *DescribeMountTargetsInput) (*DescribeMountTargetsOutput, error) {
+ req, out := c.DescribeMountTargetsRequest(input)
+ return out, req.Send()
+}
+
+// DescribeMountTargetsWithContext is the same as DescribeMountTargets with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeMountTargets for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EFS) DescribeMountTargetsWithContext(ctx aws.Context, input *DescribeMountTargetsInput, opts ...request.Option) (*DescribeMountTargetsOutput, error) {
+ req, out := c.DescribeMountTargetsRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
+}
+
+const opDescribeTags = "DescribeTags"
+
+// DescribeTagsRequest generates a "aws/request.Request" representing the
+// client's request for the DescribeTags operation. The "output" return
+// value will be populated with the request's response once the request completes
+// successfully.
+//
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
+//
+// See DescribeTags for more information on using the DescribeTags
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
+//
+//
+// // Example sending a request using the DescribeTagsRequest method.
+// req, resp := client.DescribeTagsRequest(params)
+//
+// err := req.Send()
+// if err == nil { // resp is now filled
+// fmt.Println(resp)
+// }
+//
+// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/DescribeTags
+//
+// Deprecated: Use ListTagsForResource.
+func (c *EFS) DescribeTagsRequest(input *DescribeTagsInput) (req *request.Request, output *DescribeTagsOutput) {
+ if c.Client.Config.Logger != nil {
+ c.Client.Config.Logger.Log("This operation, DescribeTags, has been deprecated")
+ }
+ op := &request.Operation{
+ Name: opDescribeTags,
+ HTTPMethod: "GET",
+ HTTPPath: "/2015-02-01/tags/{FileSystemId}/",
+ Paginator: &request.Paginator{
+ InputTokens: []string{"Marker"},
+ OutputTokens: []string{"NextMarker"},
+ LimitToken: "MaxItems",
+ TruncationToken: "",
+ },
+ }
+
+ if input == nil {
+ input = &DescribeTagsInput{}
+ }
+
+ output = &DescribeTagsOutput{}
+ req = c.newRequest(op, input, output)
+ return
+}
+
+// DescribeTags API operation for Amazon Elastic File System.
+//
+// Returns the tags associated with a file system. The order of tags returned
+// in the response of one DescribeTags call and the order of tags returned across
+// the responses of a multiple-call iteration (when using pagination) is unspecified.
+//
+// This operation requires permissions for the elasticfilesystem:DescribeTags
+// action.
+//
+// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
+// with awserr.Error's Code and Message methods to get detailed information about
+// the error.
+//
+// See the AWS API reference guide for Amazon Elastic File System's
+// API operation DescribeTags for usage and error information.
+//
+// Returned Error Types:
+// * BadRequest
+// Returned if the request is malformed or contains an error such as an invalid
+// parameter value or a missing required parameter.
+//
+// * InternalServerError
+// Returned if an error occurred on the server side.
+//
+// * FileSystemNotFound
+// Returned if the specified FileSystemId value doesn't exist in the requester's
+// AWS account.
+//
+// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/DescribeTags
+//
+// Deprecated: Use ListTagsForResource.
+func (c *EFS) DescribeTags(input *DescribeTagsInput) (*DescribeTagsOutput, error) {
+ req, out := c.DescribeTagsRequest(input)
+ return out, req.Send()
+}
+
+// DescribeTagsWithContext is the same as DescribeTags with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeTags for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+//
+// Deprecated: Use ListTagsForResource.
+func (c *EFS) DescribeTagsWithContext(ctx aws.Context, input *DescribeTagsInput, opts ...request.Option) (*DescribeTagsOutput, error) {
+ req, out := c.DescribeTagsRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
+}
+
+// DescribeTagsPages iterates over the pages of a DescribeTags operation,
+// calling the "fn" function with the response data for each page. To stop
+// iterating, return false from the fn function.
+//
+// See DescribeTags method for more information on how to use this operation.
+//
+// Note: This operation can generate multiple requests to a service.
+//
+// // Example iterating over at most 3 pages of a DescribeTags operation.
+// pageNum := 0
+// err := client.DescribeTagsPages(params,
+// func(page *efs.DescribeTagsOutput, lastPage bool) bool {
+// pageNum++
+// fmt.Println(page)
+// return pageNum <= 3
+// })
+//
+//
+// Deprecated: Use ListTagsForResource.
+func (c *EFS) DescribeTagsPages(input *DescribeTagsInput, fn func(*DescribeTagsOutput, bool) bool) error {
+ return c.DescribeTagsPagesWithContext(aws.BackgroundContext(), input, fn)
+}
+
+// DescribeTagsPagesWithContext same as DescribeTagsPages except
+// it takes a Context and allows setting request options on the pages.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+//
+// Deprecated: Use ListTagsForResource.
+func (c *EFS) DescribeTagsPagesWithContext(ctx aws.Context, input *DescribeTagsInput, fn func(*DescribeTagsOutput, bool) bool, opts ...request.Option) error {
+ p := request.Pagination{
+ NewRequest: func() (*request.Request, error) {
+ var inCpy *DescribeTagsInput
+ if input != nil {
+ tmp := *input
+ inCpy = &tmp
+ }
+ req, _ := c.DescribeTagsRequest(inCpy)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return req, nil
+ },
+ }
+
+ for p.Next() {
+ if !fn(p.Page().(*DescribeTagsOutput), !p.HasNextPage()) {
+ break
+ }
+ }
+
+ return p.Err()
+}
+
+const opListTagsForResource = "ListTagsForResource"
+
+// ListTagsForResourceRequest generates a "aws/request.Request" representing the
+// client's request for the ListTagsForResource operation. The "output" return
+// value will be populated with the request's response once the request completes
+// successfully.
+//
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
+//
+// See ListTagsForResource for more information on using the ListTagsForResource
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
+//
+//
+// // Example sending a request using the ListTagsForResourceRequest method.
+// req, resp := client.ListTagsForResourceRequest(params)
+//
+// err := req.Send()
+// if err == nil { // resp is now filled
+// fmt.Println(resp)
+// }
+//
+// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/ListTagsForResource
+func (c *EFS) ListTagsForResourceRequest(input *ListTagsForResourceInput) (req *request.Request, output *ListTagsForResourceOutput) {
+ op := &request.Operation{
+ Name: opListTagsForResource,
+ HTTPMethod: "GET",
+ HTTPPath: "/2015-02-01/resource-tags/{ResourceId}",
+ Paginator: &request.Paginator{
+ InputTokens: []string{"NextToken"},
+ OutputTokens: []string{"NextToken"},
+ LimitToken: "MaxResults",
+ TruncationToken: "",
+ },
+ }
+
+ if input == nil {
+ input = &ListTagsForResourceInput{}
+ }
+
+ output = &ListTagsForResourceOutput{}
+ req = c.newRequest(op, input, output)
+ return
+}
+
+// ListTagsForResource API operation for Amazon Elastic File System.
+//
+// Lists all tags for a top-level EFS resource. You must provide the ID of the
+// resource that you want to retrieve the tags for.
+//
+// This operation requires permissions for the elasticfilesystem:DescribeAccessPoints
+// action.
+//
+// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
+// with awserr.Error's Code and Message methods to get detailed information about
+// the error.
+//
+// See the AWS API reference guide for Amazon Elastic File System's
+// API operation ListTagsForResource for usage and error information.
+//
+// Returned Error Types:
+// * BadRequest
+// Returned if the request is malformed or contains an error such as an invalid
+// parameter value or a missing required parameter.
+//
+// * InternalServerError
+// Returned if an error occurred on the server side.
+//
+// * FileSystemNotFound
+// Returned if the specified FileSystemId value doesn't exist in the requester's
+// AWS account.
+//
+// * AccessPointNotFound
+// Returned if the specified AccessPointId value doesn't exist in the requester's
+// AWS account.
+//
+// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/ListTagsForResource
+func (c *EFS) ListTagsForResource(input *ListTagsForResourceInput) (*ListTagsForResourceOutput, error) {
+ req, out := c.ListTagsForResourceRequest(input)
+ return out, req.Send()
+}
+
+// ListTagsForResourceWithContext is the same as ListTagsForResource with the addition of
+// the ability to pass a context and additional request options.
+//
+// See ListTagsForResource for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EFS) ListTagsForResourceWithContext(ctx aws.Context, input *ListTagsForResourceInput, opts ...request.Option) (*ListTagsForResourceOutput, error) {
+ req, out := c.ListTagsForResourceRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
+}
+
+// ListTagsForResourcePages iterates over the pages of a ListTagsForResource operation,
+// calling the "fn" function with the response data for each page. To stop
+// iterating, return false from the fn function.
+//
+// See ListTagsForResource method for more information on how to use this operation.
+//
+// Note: This operation can generate multiple requests to a service.
+//
+// // Example iterating over at most 3 pages of a ListTagsForResource operation.
+// pageNum := 0
+// err := client.ListTagsForResourcePages(params,
+// func(page *efs.ListTagsForResourceOutput, lastPage bool) bool {
+// pageNum++
+// fmt.Println(page)
+// return pageNum <= 3
+// })
+//
+func (c *EFS) ListTagsForResourcePages(input *ListTagsForResourceInput, fn func(*ListTagsForResourceOutput, bool) bool) error {
+ return c.ListTagsForResourcePagesWithContext(aws.BackgroundContext(), input, fn)
+}
+
+// ListTagsForResourcePagesWithContext same as ListTagsForResourcePages except
+// it takes a Context and allows setting request options on the pages.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EFS) ListTagsForResourcePagesWithContext(ctx aws.Context, input *ListTagsForResourceInput, fn func(*ListTagsForResourceOutput, bool) bool, opts ...request.Option) error {
+ p := request.Pagination{
+ NewRequest: func() (*request.Request, error) {
+ var inCpy *ListTagsForResourceInput
+ if input != nil {
+ tmp := *input
+ inCpy = &tmp
+ }
+ req, _ := c.ListTagsForResourceRequest(inCpy)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return req, nil
+ },
+ }
+
+ for p.Next() {
+ if !fn(p.Page().(*ListTagsForResourceOutput), !p.HasNextPage()) {
+ break
+ }
+ }
+
+ return p.Err()
+}
+
+const opModifyMountTargetSecurityGroups = "ModifyMountTargetSecurityGroups"
+
+// ModifyMountTargetSecurityGroupsRequest generates a "aws/request.Request" representing the
+// client's request for the ModifyMountTargetSecurityGroups operation. The "output" return
+// value will be populated with the request's response once the request completes
+// successfully.
+//
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
+//
+// See ModifyMountTargetSecurityGroups for more information on using the ModifyMountTargetSecurityGroups
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
+//
+//
+// // Example sending a request using the ModifyMountTargetSecurityGroupsRequest method.
+// req, resp := client.ModifyMountTargetSecurityGroupsRequest(params)
+//
+// err := req.Send()
+// if err == nil { // resp is now filled
+// fmt.Println(resp)
+// }
+//
+// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/ModifyMountTargetSecurityGroups
+func (c *EFS) ModifyMountTargetSecurityGroupsRequest(input *ModifyMountTargetSecurityGroupsInput) (req *request.Request, output *ModifyMountTargetSecurityGroupsOutput) {
+ op := &request.Operation{
+ Name: opModifyMountTargetSecurityGroups,
+ HTTPMethod: "PUT",
+ HTTPPath: "/2015-02-01/mount-targets/{MountTargetId}/security-groups",
+ }
+
+ if input == nil {
+ input = &ModifyMountTargetSecurityGroupsInput{}
+ }
+
+ output = &ModifyMountTargetSecurityGroupsOutput{}
+ req = c.newRequest(op, input, output)
+ req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
+ return
+}
+
+// ModifyMountTargetSecurityGroups API operation for Amazon Elastic File System.
+//
+// Modifies the set of security groups in effect for a mount target.
+//
+// When you create a mount target, Amazon EFS also creates a new network interface.
+// For more information, see CreateMountTarget. This operation replaces the
+// security groups in effect for the network interface associated with a mount
+// target, with the SecurityGroups provided in the request. This operation requires
+// that the network interface of the mount target has been created and the lifecycle
+// state of the mount target is not deleted.
+//
+// The operation requires permissions for the following actions:
+//
+// * elasticfilesystem:ModifyMountTargetSecurityGroups action on the mount
+// target's file system.
+//
+// * ec2:ModifyNetworkInterfaceAttribute action on the mount target's network
+// interface.
+//
+// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
+// with awserr.Error's Code and Message methods to get detailed information about
+// the error.
+//
+// See the AWS API reference guide for Amazon Elastic File System's
+// API operation ModifyMountTargetSecurityGroups for usage and error information.
+//
+// Returned Error Types:
+// * BadRequest
+// Returned if the request is malformed or contains an error such as an invalid
+// parameter value or a missing required parameter.
+//
+// * InternalServerError
+// Returned if an error occurred on the server side.
+//
+// * MountTargetNotFound
+// Returned if there is no mount target with the specified ID found in the caller's
+// account.
+//
+// * IncorrectMountTargetState
+// Returned if the mount target is not in the correct state for the operation.
+//
+// * SecurityGroupLimitExceeded
+// Returned if the size of SecurityGroups specified in the request is greater
+// than five.
+//
+// * SecurityGroupNotFound
+// Returned if one of the specified security groups doesn't exist in the subnet's
+// VPC.
+//
+// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/ModifyMountTargetSecurityGroups
+func (c *EFS) ModifyMountTargetSecurityGroups(input *ModifyMountTargetSecurityGroupsInput) (*ModifyMountTargetSecurityGroupsOutput, error) {
+ req, out := c.ModifyMountTargetSecurityGroupsRequest(input)
+ return out, req.Send()
+}
+
+// ModifyMountTargetSecurityGroupsWithContext is the same as ModifyMountTargetSecurityGroups with the addition of
+// the ability to pass a context and additional request options.
+//
+// See ModifyMountTargetSecurityGroups for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EFS) ModifyMountTargetSecurityGroupsWithContext(ctx aws.Context, input *ModifyMountTargetSecurityGroupsInput, opts ...request.Option) (*ModifyMountTargetSecurityGroupsOutput, error) {
+ req, out := c.ModifyMountTargetSecurityGroupsRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
+}
+
+const opPutBackupPolicy = "PutBackupPolicy"
+
+// PutBackupPolicyRequest generates a "aws/request.Request" representing the
+// client's request for the PutBackupPolicy operation. The "output" return
+// value will be populated with the request's response once the request completes
+// successfully.
+//
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
+//
+// See PutBackupPolicy for more information on using the PutBackupPolicy
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
+//
+//
+// // Example sending a request using the PutBackupPolicyRequest method.
+// req, resp := client.PutBackupPolicyRequest(params)
+//
+// err := req.Send()
+// if err == nil { // resp is now filled
+// fmt.Println(resp)
+// }
+//
+// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/PutBackupPolicy
+func (c *EFS) PutBackupPolicyRequest(input *PutBackupPolicyInput) (req *request.Request, output *PutBackupPolicyOutput) {
+ op := &request.Operation{
+ Name: opPutBackupPolicy,
+ HTTPMethod: "PUT",
+ HTTPPath: "/2015-02-01/file-systems/{FileSystemId}/backup-policy",
+ }
+
+ if input == nil {
+ input = &PutBackupPolicyInput{}
+ }
+
+ output = &PutBackupPolicyOutput{}
+ req = c.newRequest(op, input, output)
+ return
+}
+
+// PutBackupPolicy API operation for Amazon Elastic File System.
+//
+// Updates the file system's backup policy. Use this action to start or stop
+// automatic backups of the file system.
+//
+// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
+// with awserr.Error's Code and Message methods to get detailed information about
+// the error.
+//
+// See the AWS API reference guide for Amazon Elastic File System's
+// API operation PutBackupPolicy for usage and error information.
+//
+// Returned Error Types:
+// * BadRequest
+// Returned if the request is malformed or contains an error such as an invalid
+// parameter value or a missing required parameter.
+//
+// * FileSystemNotFound
+// Returned if the specified FileSystemId value doesn't exist in the requester's
+// AWS account.
+//
+// * IncorrectFileSystemLifeCycleState
+// Returned if the file system's lifecycle state is not "available".
+//
+// * InternalServerError
+// Returned if an error occurred on the server side.
+//
+// * ValidationException
+// Returned if the AWS Backup service is not available in the Region in which
+// the request was made.
+//
+// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/PutBackupPolicy
+func (c *EFS) PutBackupPolicy(input *PutBackupPolicyInput) (*PutBackupPolicyOutput, error) {
+ req, out := c.PutBackupPolicyRequest(input)
+ return out, req.Send()
+}
+
+// PutBackupPolicyWithContext is the same as PutBackupPolicy with the addition of
+// the ability to pass a context and additional request options.
+//
+// See PutBackupPolicy for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EFS) PutBackupPolicyWithContext(ctx aws.Context, input *PutBackupPolicyInput, opts ...request.Option) (*PutBackupPolicyOutput, error) {
+ req, out := c.PutBackupPolicyRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
+}
+
+const opPutFileSystemPolicy = "PutFileSystemPolicy"
+
+// PutFileSystemPolicyRequest generates a "aws/request.Request" representing the
+// client's request for the PutFileSystemPolicy operation. The "output" return
+// value will be populated with the request's response once the request completes
+// successfully.
+//
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
+//
+// See PutFileSystemPolicy for more information on using the PutFileSystemPolicy
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
+//
+//
+// // Example sending a request using the PutFileSystemPolicyRequest method.
+// req, resp := client.PutFileSystemPolicyRequest(params)
+//
+// err := req.Send()
+// if err == nil { // resp is now filled
+// fmt.Println(resp)
+// }
+//
+// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/PutFileSystemPolicy
+func (c *EFS) PutFileSystemPolicyRequest(input *PutFileSystemPolicyInput) (req *request.Request, output *PutFileSystemPolicyOutput) {
+ op := &request.Operation{
+ Name: opPutFileSystemPolicy,
+ HTTPMethod: "PUT",
+ HTTPPath: "/2015-02-01/file-systems/{FileSystemId}/policy",
+ }
+
+ if input == nil {
+ input = &PutFileSystemPolicyInput{}
+ }
+
+ output = &PutFileSystemPolicyOutput{}
+ req = c.newRequest(op, input, output)
+ return
+}
+
+// PutFileSystemPolicy API operation for Amazon Elastic File System.
+//
+// Applies an Amazon EFS FileSystemPolicy to an Amazon EFS file system. A file
+// system policy is an IAM resource-based policy and can contain multiple policy
+// statements. A file system always has exactly one file system policy, which
+// can be the default policy or an explicit policy set or updated using this
+// API operation. EFS file system policies have a 20,000 character limit. When
+// an explicit policy is set, it overrides the default policy. For more information
+// about the default file system policy, see Default EFS File System Policy
+// (https://docs.aws.amazon.com/efs/latest/ug/iam-access-control-nfs-efs.html#default-filesystempolicy).
+//
+// EFS file system policies have a 20,000 character limit.
+//
+// This operation requires permissions for the elasticfilesystem:PutFileSystemPolicy
+// action.
+//
+// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
+// with awserr.Error's Code and Message methods to get detailed information about
+// the error.
+//
+// See the AWS API reference guide for Amazon Elastic File System's
+// API operation PutFileSystemPolicy for usage and error information.
+//
+// Returned Error Types:
+// * InternalServerError
+// Returned if an error occurred on the server side.
+//
+// * FileSystemNotFound
+// Returned if the specified FileSystemId value doesn't exist in the requester's
+// AWS account.
+//
+// * InvalidPolicyException
+// Returned if the FileSystemPolicy is is malformed or contains an error such
+// as an invalid parameter value or a missing required parameter. Returned in
+// the case of a policy lockout safety check error.
+//
+// * IncorrectFileSystemLifeCycleState
+// Returned if the file system's lifecycle state is not "available".
+//
+// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/PutFileSystemPolicy
+func (c *EFS) PutFileSystemPolicy(input *PutFileSystemPolicyInput) (*PutFileSystemPolicyOutput, error) {
+ req, out := c.PutFileSystemPolicyRequest(input)
+ return out, req.Send()
+}
+
+// PutFileSystemPolicyWithContext is the same as PutFileSystemPolicy with the addition of
+// the ability to pass a context and additional request options.
+//
+// See PutFileSystemPolicy for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EFS) PutFileSystemPolicyWithContext(ctx aws.Context, input *PutFileSystemPolicyInput, opts ...request.Option) (*PutFileSystemPolicyOutput, error) {
+ req, out := c.PutFileSystemPolicyRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
+}
+
+const opPutLifecycleConfiguration = "PutLifecycleConfiguration"
+
+// PutLifecycleConfigurationRequest generates a "aws/request.Request" representing the
+// client's request for the PutLifecycleConfiguration operation. The "output" return
+// value will be populated with the request's response once the request completes
+// successfully.
+//
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
+//
+// See PutLifecycleConfiguration for more information on using the PutLifecycleConfiguration
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
+//
+//
+// // Example sending a request using the PutLifecycleConfigurationRequest method.
+// req, resp := client.PutLifecycleConfigurationRequest(params)
+//
+// err := req.Send()
+// if err == nil { // resp is now filled
+// fmt.Println(resp)
+// }
+//
+// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/PutLifecycleConfiguration
+func (c *EFS) PutLifecycleConfigurationRequest(input *PutLifecycleConfigurationInput) (req *request.Request, output *PutLifecycleConfigurationOutput) {
+ op := &request.Operation{
+ Name: opPutLifecycleConfiguration,
+ HTTPMethod: "PUT",
+ HTTPPath: "/2015-02-01/file-systems/{FileSystemId}/lifecycle-configuration",
+ }
+
+ if input == nil {
+ input = &PutLifecycleConfigurationInput{}
+ }
+
+ output = &PutLifecycleConfigurationOutput{}
+ req = c.newRequest(op, input, output)
+ return
+}
+
+// PutLifecycleConfiguration API operation for Amazon Elastic File System.
+//
+// Enables lifecycle management by creating a new LifecycleConfiguration object.
+// A LifecycleConfiguration object defines when files in an Amazon EFS file
+// system are automatically transitioned to the lower-cost EFS Infrequent Access
+// (IA) storage class. A LifecycleConfiguration applies to all files in a file
+// system.
+//
+// Each Amazon EFS file system supports one lifecycle configuration, which applies
+// to all files in the file system. If a LifecycleConfiguration object already
+// exists for the specified file system, a PutLifecycleConfiguration call modifies
+// the existing configuration. A PutLifecycleConfiguration call with an empty
+// LifecyclePolicies array in the request body deletes any existing LifecycleConfiguration
+// and disables lifecycle management.
+//
+// In the request, specify the following:
+//
+// * The ID for the file system for which you are enabling, disabling, or
+// modifying lifecycle management.
+//
+// * A LifecyclePolicies array of LifecyclePolicy objects that define when
+// files are moved to the IA storage class. The array can contain only one
+// LifecyclePolicy item.
+//
+// This operation requires permissions for the elasticfilesystem:PutLifecycleConfiguration
+// operation.
+//
+// To apply a LifecycleConfiguration object to an encrypted file system, you
+// need the same AWS Key Management Service (AWS KMS) permissions as when you
+// created the encrypted file system.
+//
+// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
+// with awserr.Error's Code and Message methods to get detailed information about
+// the error.
+//
+// See the AWS API reference guide for Amazon Elastic File System's
+// API operation PutLifecycleConfiguration for usage and error information.
+//
+// Returned Error Types:
+// * BadRequest
+// Returned if the request is malformed or contains an error such as an invalid
+// parameter value or a missing required parameter.
+//
+// * InternalServerError
+// Returned if an error occurred on the server side.
+//
+// * FileSystemNotFound
+// Returned if the specified FileSystemId value doesn't exist in the requester's
+// AWS account.
+//
+// * IncorrectFileSystemLifeCycleState
+// Returned if the file system's lifecycle state is not "available".
+//
+// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/PutLifecycleConfiguration
+func (c *EFS) PutLifecycleConfiguration(input *PutLifecycleConfigurationInput) (*PutLifecycleConfigurationOutput, error) {
+ req, out := c.PutLifecycleConfigurationRequest(input)
+ return out, req.Send()
+}
+
+// PutLifecycleConfigurationWithContext is the same as PutLifecycleConfiguration with the addition of
+// the ability to pass a context and additional request options.
+//
+// See PutLifecycleConfiguration for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EFS) PutLifecycleConfigurationWithContext(ctx aws.Context, input *PutLifecycleConfigurationInput, opts ...request.Option) (*PutLifecycleConfigurationOutput, error) {
+ req, out := c.PutLifecycleConfigurationRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
+}
+
+const opTagResource = "TagResource"
+
+// TagResourceRequest generates a "aws/request.Request" representing the
+// client's request for the TagResource operation. The "output" return
+// value will be populated with the request's response once the request completes
+// successfully.
+//
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
+//
+// See TagResource for more information on using the TagResource
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
+//
+//
+// // Example sending a request using the TagResourceRequest method.
+// req, resp := client.TagResourceRequest(params)
+//
+// err := req.Send()
+// if err == nil { // resp is now filled
+// fmt.Println(resp)
+// }
+//
+// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/TagResource
+func (c *EFS) TagResourceRequest(input *TagResourceInput) (req *request.Request, output *TagResourceOutput) {
+ op := &request.Operation{
+ Name: opTagResource,
+ HTTPMethod: "POST",
+ HTTPPath: "/2015-02-01/resource-tags/{ResourceId}",
+ }
+
+ if input == nil {
+ input = &TagResourceInput{}
+ }
+
+ output = &TagResourceOutput{}
+ req = c.newRequest(op, input, output)
+ req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
+ return
+}
+
+// TagResource API operation for Amazon Elastic File System.
+//
+// Creates a tag for an EFS resource. You can create tags for EFS file systems
+// and access points using this API operation.
+//
+// This operation requires permissions for the elasticfilesystem:TagResource
+// action.
+//
+// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
+// with awserr.Error's Code and Message methods to get detailed information about
+// the error.
+//
+// See the AWS API reference guide for Amazon Elastic File System's
+// API operation TagResource for usage and error information.
+//
+// Returned Error Types:
+// * BadRequest
+// Returned if the request is malformed or contains an error such as an invalid
+// parameter value or a missing required parameter.
+//
+// * InternalServerError
+// Returned if an error occurred on the server side.
+//
+// * FileSystemNotFound
+// Returned if the specified FileSystemId value doesn't exist in the requester's
+// AWS account.
+//
+// * AccessPointNotFound
+// Returned if the specified AccessPointId value doesn't exist in the requester's
+// AWS account.
+//
+// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/TagResource
+func (c *EFS) TagResource(input *TagResourceInput) (*TagResourceOutput, error) {
+ req, out := c.TagResourceRequest(input)
+ return out, req.Send()
+}
+
+// TagResourceWithContext is the same as TagResource with the addition of
+// the ability to pass a context and additional request options.
+//
+// See TagResource for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EFS) TagResourceWithContext(ctx aws.Context, input *TagResourceInput, opts ...request.Option) (*TagResourceOutput, error) {
+ req, out := c.TagResourceRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
+}
+
+const opUntagResource = "UntagResource"
+
+// UntagResourceRequest generates a "aws/request.Request" representing the
+// client's request for the UntagResource operation. The "output" return
+// value will be populated with the request's response once the request completes
+// successfully.
+//
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
+//
+// See UntagResource for more information on using the UntagResource
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
+//
+//
+// // Example sending a request using the UntagResourceRequest method.
+// req, resp := client.UntagResourceRequest(params)
+//
+// err := req.Send()
+// if err == nil { // resp is now filled
+// fmt.Println(resp)
+// }
+//
+// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/UntagResource
+func (c *EFS) UntagResourceRequest(input *UntagResourceInput) (req *request.Request, output *UntagResourceOutput) {
+ op := &request.Operation{
+ Name: opUntagResource,
+ HTTPMethod: "DELETE",
+ HTTPPath: "/2015-02-01/resource-tags/{ResourceId}",
+ }
+
+ if input == nil {
+ input = &UntagResourceInput{}
+ }
+
+ output = &UntagResourceOutput{}
+ req = c.newRequest(op, input, output)
+ req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
+ return
+}
+
+// UntagResource API operation for Amazon Elastic File System.
+//
+// Removes tags from an EFS resource. You can remove tags from EFS file systems
+// and access points using this API operation.
+//
+// This operation requires permissions for the elasticfilesystem:UntagResource
+// action.
+//
+// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
+// with awserr.Error's Code and Message methods to get detailed information about
+// the error.
+//
+// See the AWS API reference guide for Amazon Elastic File System's
+// API operation UntagResource for usage and error information.
+//
+// Returned Error Types:
+// * BadRequest
+// Returned if the request is malformed or contains an error such as an invalid
+// parameter value or a missing required parameter.
+//
+// * InternalServerError
+// Returned if an error occurred on the server side.
+//
+// * FileSystemNotFound
+// Returned if the specified FileSystemId value doesn't exist in the requester's
+// AWS account.
+//
+// * AccessPointNotFound
+// Returned if the specified AccessPointId value doesn't exist in the requester's
+// AWS account.
+//
+// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/UntagResource
+func (c *EFS) UntagResource(input *UntagResourceInput) (*UntagResourceOutput, error) {
+ req, out := c.UntagResourceRequest(input)
+ return out, req.Send()
+}
+
+// UntagResourceWithContext is the same as UntagResource with the addition of
+// the ability to pass a context and additional request options.
+//
+// See UntagResource for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EFS) UntagResourceWithContext(ctx aws.Context, input *UntagResourceInput, opts ...request.Option) (*UntagResourceOutput, error) {
+ req, out := c.UntagResourceRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
+}
+
+const opUpdateFileSystem = "UpdateFileSystem"
+
+// UpdateFileSystemRequest generates a "aws/request.Request" representing the
+// client's request for the UpdateFileSystem operation. The "output" return
+// value will be populated with the request's response once the request completes
+// successfully.
+//
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
+//
+// See UpdateFileSystem for more information on using the UpdateFileSystem
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
+//
+//
+// // Example sending a request using the UpdateFileSystemRequest method.
+// req, resp := client.UpdateFileSystemRequest(params)
+//
+// err := req.Send()
+// if err == nil { // resp is now filled
+// fmt.Println(resp)
+// }
+//
+// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/UpdateFileSystem
+func (c *EFS) UpdateFileSystemRequest(input *UpdateFileSystemInput) (req *request.Request, output *UpdateFileSystemOutput) {
+ op := &request.Operation{
+ Name: opUpdateFileSystem,
+ HTTPMethod: "PUT",
+ HTTPPath: "/2015-02-01/file-systems/{FileSystemId}",
+ }
+
+ if input == nil {
+ input = &UpdateFileSystemInput{}
+ }
+
+ output = &UpdateFileSystemOutput{}
+ req = c.newRequest(op, input, output)
+ return
+}
+
+// UpdateFileSystem API operation for Amazon Elastic File System.
+//
+// Updates the throughput mode or the amount of provisioned throughput of an
+// existing file system.
+//
+// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
+// with awserr.Error's Code and Message methods to get detailed information about
+// the error.
+//
+// See the AWS API reference guide for Amazon Elastic File System's
+// API operation UpdateFileSystem for usage and error information.
+//
+// Returned Error Types:
+// * BadRequest
+// Returned if the request is malformed or contains an error such as an invalid
+// parameter value or a missing required parameter.
+//
+// * FileSystemNotFound
+// Returned if the specified FileSystemId value doesn't exist in the requester's
+// AWS account.
+//
+// * IncorrectFileSystemLifeCycleState
+// Returned if the file system's lifecycle state is not "available".
+//
+// * InsufficientThroughputCapacity
+// Returned if there's not enough capacity to provision additional throughput.
+// This value might be returned when you try to create a file system in provisioned
+// throughput mode, when you attempt to increase the provisioned throughput
+// of an existing file system, or when you attempt to change an existing file
+// system from bursting to provisioned throughput mode. Try again later.
+//
+// * InternalServerError
+// Returned if an error occurred on the server side.
+//
+// * ThroughputLimitExceeded
+// Returned if the throughput mode or amount of provisioned throughput can't
+// be changed because the throughput limit of 1024 MiB/s has been reached.
+//
+// * TooManyRequests
+// Returned if you don’t wait at least 24 hours before changing the throughput
+// mode, or decreasing the Provisioned Throughput value.
+//
+// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/UpdateFileSystem
+func (c *EFS) UpdateFileSystem(input *UpdateFileSystemInput) (*UpdateFileSystemOutput, error) {
+ req, out := c.UpdateFileSystemRequest(input)
+ return out, req.Send()
+}
+
+// UpdateFileSystemWithContext is the same as UpdateFileSystem with the addition of
+// the ability to pass a context and additional request options.
+//
+// See UpdateFileSystem for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EFS) UpdateFileSystemWithContext(ctx aws.Context, input *UpdateFileSystemInput, opts ...request.Option) (*UpdateFileSystemOutput, error) {
+ req, out := c.UpdateFileSystemRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
+}
+
+// Returned if the access point you are trying to create already exists, with
+// the creation token you provided in the request.
+type AccessPointAlreadyExists struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ // AccessPointId is a required field
+ AccessPointId *string `type:"string" required:"true"`
+
+ // ErrorCode is a required field
+ ErrorCode *string `min:"1" type:"string" required:"true"`
+
+ Message_ *string `locationName:"Message" type:"string"`
+}
+
+// String returns the string representation
+func (s AccessPointAlreadyExists) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s AccessPointAlreadyExists) GoString() string {
+ return s.String()
+}
+
+func newErrorAccessPointAlreadyExists(v protocol.ResponseMetadata) error {
+ return &AccessPointAlreadyExists{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *AccessPointAlreadyExists) Code() string {
+ return "AccessPointAlreadyExists"
+}
+
+// Message returns the exception's message.
+func (s *AccessPointAlreadyExists) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *AccessPointAlreadyExists) OrigErr() error {
+ return nil
+}
+
+func (s *AccessPointAlreadyExists) Error() string {
+ return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *AccessPointAlreadyExists) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *AccessPointAlreadyExists) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
+// Provides a description of an EFS file system access point.
+type AccessPointDescription struct {
+ _ struct{} `type:"structure"`
+
+ // The unique Amazon Resource Name (ARN) associated with the access point.
+ AccessPointArn *string `type:"string"`
+
+ // The ID of the access point, assigned by Amazon EFS.
+ AccessPointId *string `type:"string"`
+
+ // The opaque string specified in the request to ensure idempotent creation.
+ ClientToken *string `min:"1" type:"string"`
+
+ // The ID of the EFS file system that the access point applies to.
+ FileSystemId *string `type:"string"`
+
+ // Identifies the lifecycle phase of the access point.
+ LifeCycleState *string `type:"string" enum:"LifeCycleState"`
+
+ // The name of the access point. This is the value of the Name tag.
+ Name *string `type:"string"`
+
+ // Identified the AWS account that owns the access point resource.
+ OwnerId *string `type:"string"`
+
+ // The full POSIX identity, including the user ID, group ID, and secondary group
+ // IDs on the access point that is used for all file operations by NFS clients
+ // using the access point.
+ PosixUser *PosixUser `type:"structure"`
+
+ // The directory on the Amazon EFS file system that the access point exposes
+ // as the root directory to NFS clients using the access point.
+ RootDirectory *RootDirectory `type:"structure"`
+
+ // The tags associated with the access point, presented as an array of Tag objects.
+ Tags []*Tag `type:"list"`
+}
+
+// String returns the string representation
+func (s AccessPointDescription) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s AccessPointDescription) GoString() string {
+ return s.String()
+}
+
+// SetAccessPointArn sets the AccessPointArn field's value.
+func (s *AccessPointDescription) SetAccessPointArn(v string) *AccessPointDescription {
+ s.AccessPointArn = &v
+ return s
+}
+
+// SetAccessPointId sets the AccessPointId field's value.
+func (s *AccessPointDescription) SetAccessPointId(v string) *AccessPointDescription {
+ s.AccessPointId = &v
+ return s
+}
+
+// SetClientToken sets the ClientToken field's value.
+func (s *AccessPointDescription) SetClientToken(v string) *AccessPointDescription {
+ s.ClientToken = &v
+ return s
+}
+
+// SetFileSystemId sets the FileSystemId field's value.
+func (s *AccessPointDescription) SetFileSystemId(v string) *AccessPointDescription {
+ s.FileSystemId = &v
+ return s
+}
+
+// SetLifeCycleState sets the LifeCycleState field's value.
+func (s *AccessPointDescription) SetLifeCycleState(v string) *AccessPointDescription {
+ s.LifeCycleState = &v
+ return s
+}
+
+// SetName sets the Name field's value.
+func (s *AccessPointDescription) SetName(v string) *AccessPointDescription {
+ s.Name = &v
+ return s
+}
+
+// SetOwnerId sets the OwnerId field's value.
+func (s *AccessPointDescription) SetOwnerId(v string) *AccessPointDescription {
+ s.OwnerId = &v
+ return s
+}
+
+// SetPosixUser sets the PosixUser field's value.
+func (s *AccessPointDescription) SetPosixUser(v *PosixUser) *AccessPointDescription {
+ s.PosixUser = v
+ return s
+}
+
+// SetRootDirectory sets the RootDirectory field's value.
+func (s *AccessPointDescription) SetRootDirectory(v *RootDirectory) *AccessPointDescription {
+ s.RootDirectory = v
+ return s
+}
+
+// SetTags sets the Tags field's value.
+func (s *AccessPointDescription) SetTags(v []*Tag) *AccessPointDescription {
+ s.Tags = v
+ return s
+}
+
+// Returned if the AWS account has already created the maximum number of access
+// points allowed per file system.
+type AccessPointLimitExceeded struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ // ErrorCode is a required field
+ ErrorCode *string `min:"1" type:"string" required:"true"`
+
+ Message_ *string `locationName:"Message" type:"string"`
+}
+
+// String returns the string representation
+func (s AccessPointLimitExceeded) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s AccessPointLimitExceeded) GoString() string {
+ return s.String()
+}
+
+func newErrorAccessPointLimitExceeded(v protocol.ResponseMetadata) error {
+ return &AccessPointLimitExceeded{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *AccessPointLimitExceeded) Code() string {
+ return "AccessPointLimitExceeded"
+}
+
+// Message returns the exception's message.
+func (s *AccessPointLimitExceeded) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *AccessPointLimitExceeded) OrigErr() error {
+ return nil
+}
+
+func (s *AccessPointLimitExceeded) Error() string {
+ return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *AccessPointLimitExceeded) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *AccessPointLimitExceeded) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
+// Returned if the specified AccessPointId value doesn't exist in the requester's
+// AWS account.
+type AccessPointNotFound struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ // ErrorCode is a required field
+ ErrorCode *string `min:"1" type:"string" required:"true"`
+
+ Message_ *string `locationName:"Message" type:"string"`
+}
+
+// String returns the string representation
+func (s AccessPointNotFound) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s AccessPointNotFound) GoString() string {
+ return s.String()
+}
+
+func newErrorAccessPointNotFound(v protocol.ResponseMetadata) error {
+ return &AccessPointNotFound{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *AccessPointNotFound) Code() string {
+ return "AccessPointNotFound"
+}
+
+// Message returns the exception's message.
+func (s *AccessPointNotFound) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *AccessPointNotFound) OrigErr() error {
+ return nil
+}
+
+func (s *AccessPointNotFound) Error() string {
+ return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *AccessPointNotFound) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *AccessPointNotFound) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
+// Returned if the Availability Zone that was specified for a mount target is
+// different from the Availability Zone that was specified for One Zone storage
+// classes. For more information, see Regional and One Zone storage redundancy
+// (https://docs.aws.amazon.com/efs/latest/ug/availability-durability.html).
+type AvailabilityZonesMismatch struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ ErrorCode *string `min:"1" type:"string"`
+
+ Message_ *string `locationName:"Message" type:"string"`
+}
+
+// String returns the string representation
+func (s AvailabilityZonesMismatch) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s AvailabilityZonesMismatch) GoString() string {
+ return s.String()
+}
+
+func newErrorAvailabilityZonesMismatch(v protocol.ResponseMetadata) error {
+ return &AvailabilityZonesMismatch{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *AvailabilityZonesMismatch) Code() string {
+ return "AvailabilityZonesMismatch"
+}
+
+// Message returns the exception's message.
+func (s *AvailabilityZonesMismatch) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *AvailabilityZonesMismatch) OrigErr() error {
+ return nil
+}
+
+func (s *AvailabilityZonesMismatch) Error() string {
+ return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *AvailabilityZonesMismatch) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *AvailabilityZonesMismatch) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
+// The backup policy for the file system used to create automatic daily backups.
+// If status has a value of ENABLED, the file system is being automatically
+// backed up. For more information, see Automatic backups (https://docs.aws.amazon.com/efs/latest/ug/awsbackup.html#automatic-backups).
+type BackupPolicy struct {
+ _ struct{} `type:"structure"`
+
+ // Describes the status of the file system's backup policy.
+ //
+ // * ENABLED - EFS is automatically backing up the file system.>
+ //
+ // * ENABLING - EFS is turning on automatic backups for the file system.
+ //
+ // * DISABLED - automatic back ups are turned off for the file system.
+ //
+ // * DISABLING - EFS is turning off automatic backups for the file system.
+ //
+ // Status is a required field
+ Status *string `type:"string" required:"true" enum:"Status"`
+}
+
+// String returns the string representation
+func (s BackupPolicy) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s BackupPolicy) GoString() string {
+ return s.String()
+}
+
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *BackupPolicy) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "BackupPolicy"}
+ if s.Status == nil {
+ invalidParams.Add(request.NewErrParamRequired("Status"))
+ }
+
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ }
+ return nil
+}
+
+// SetStatus sets the Status field's value.
+func (s *BackupPolicy) SetStatus(v string) *BackupPolicy {
+ s.Status = &v
+ return s
+}
+
+// Returned if the request is malformed or contains an error such as an invalid
+// parameter value or a missing required parameter.
+type BadRequest struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ // ErrorCode is a required field
+ ErrorCode *string `min:"1" type:"string" required:"true"`
+
+ Message_ *string `locationName:"Message" type:"string"`
+}
+
+// String returns the string representation
+func (s BadRequest) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s BadRequest) GoString() string {
+ return s.String()
+}
+
+func newErrorBadRequest(v protocol.ResponseMetadata) error {
+ return &BadRequest{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *BadRequest) Code() string {
+ return "BadRequest"
+}
+
+// Message returns the exception's message.
+func (s *BadRequest) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *BadRequest) OrigErr() error {
+ return nil
+}
+
+func (s *BadRequest) Error() string {
+ return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *BadRequest) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *BadRequest) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
+type CreateAccessPointInput struct {
+ _ struct{} `type:"structure"`
+
+ // A string of up to 64 ASCII characters that Amazon EFS uses to ensure idempotent
+ // creation.
+ ClientToken *string `min:"1" type:"string" idempotencyToken:"true"`
+
+ // The ID of the EFS file system that the access point provides access to.
+ //
+ // FileSystemId is a required field
+ FileSystemId *string `type:"string" required:"true"`
+
+ // The operating system user and group applied to all file system requests made
+ // using the access point.
+ PosixUser *PosixUser `type:"structure"`
+
+ // Specifies the directory on the Amazon EFS file system that the access point
+ // exposes as the root directory of your file system to NFS clients using the
+ // access point. The clients using the access point can only access the root
+ // directory and below. If the RootDirectory > Path specified does not exist,
+ // EFS creates it and applies the CreationInfo settings when a client connects
+ // to an access point. When specifying a RootDirectory, you need to provide
+ // the Path, and the CreationInfo.
+ //
+ // Amazon EFS creates a root directory only if you have provided the CreationInfo:
+ // OwnUid, OwnGID, and permissions for the directory. If you do not provide
+ // this information, Amazon EFS does not create the root directory. If the root
+ // directory does not exist, attempts to mount using the access point will fail.
+ RootDirectory *RootDirectory `type:"structure"`
+
+ // Creates tags associated with the access point. Each tag is a key-value pair.
+ Tags []*Tag `type:"list"`
+}
+
+// String returns the string representation
+func (s CreateAccessPointInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s CreateAccessPointInput) GoString() string {
+ return s.String()
+}
+
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *CreateAccessPointInput) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "CreateAccessPointInput"}
+ if s.ClientToken != nil && len(*s.ClientToken) < 1 {
+ invalidParams.Add(request.NewErrParamMinLen("ClientToken", 1))
+ }
+ if s.FileSystemId == nil {
+ invalidParams.Add(request.NewErrParamRequired("FileSystemId"))
+ }
+ if s.PosixUser != nil {
+ if err := s.PosixUser.Validate(); err != nil {
+ invalidParams.AddNested("PosixUser", err.(request.ErrInvalidParams))
+ }
+ }
+ if s.RootDirectory != nil {
+ if err := s.RootDirectory.Validate(); err != nil {
+ invalidParams.AddNested("RootDirectory", err.(request.ErrInvalidParams))
+ }
+ }
+ if s.Tags != nil {
+ for i, v := range s.Tags {
+ if v == nil {
+ continue
+ }
+ if err := v.Validate(); err != nil {
+ invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams))
+ }
+ }
+ }
+
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ }
+ return nil
+}
+
+// SetClientToken sets the ClientToken field's value.
+func (s *CreateAccessPointInput) SetClientToken(v string) *CreateAccessPointInput {
+ s.ClientToken = &v
+ return s
+}
+
+// SetFileSystemId sets the FileSystemId field's value.
+func (s *CreateAccessPointInput) SetFileSystemId(v string) *CreateAccessPointInput {
+ s.FileSystemId = &v
+ return s
+}
+
+// SetPosixUser sets the PosixUser field's value.
+func (s *CreateAccessPointInput) SetPosixUser(v *PosixUser) *CreateAccessPointInput {
+ s.PosixUser = v
+ return s
+}
+
+// SetRootDirectory sets the RootDirectory field's value.
+func (s *CreateAccessPointInput) SetRootDirectory(v *RootDirectory) *CreateAccessPointInput {
+ s.RootDirectory = v
+ return s
+}
+
+// SetTags sets the Tags field's value.
+func (s *CreateAccessPointInput) SetTags(v []*Tag) *CreateAccessPointInput {
+ s.Tags = v
+ return s
+}
+
+// Provides a description of an EFS file system access point.
+type CreateAccessPointOutput struct {
+ _ struct{} `type:"structure"`
+
+ // The unique Amazon Resource Name (ARN) associated with the access point.
+ AccessPointArn *string `type:"string"`
+
+ // The ID of the access point, assigned by Amazon EFS.
+ AccessPointId *string `type:"string"`
+
+ // The opaque string specified in the request to ensure idempotent creation.
+ ClientToken *string `min:"1" type:"string"`
+
+ // The ID of the EFS file system that the access point applies to.
+ FileSystemId *string `type:"string"`
+
+ // Identifies the lifecycle phase of the access point.
+ LifeCycleState *string `type:"string" enum:"LifeCycleState"`
+
+ // The name of the access point. This is the value of the Name tag.
+ Name *string `type:"string"`
+
+ // Identified the AWS account that owns the access point resource.
+ OwnerId *string `type:"string"`
+
+ // The full POSIX identity, including the user ID, group ID, and secondary group
+ // IDs on the access point that is used for all file operations by NFS clients
+ // using the access point.
+ PosixUser *PosixUser `type:"structure"`
+
+ // The directory on the Amazon EFS file system that the access point exposes
+ // as the root directory to NFS clients using the access point.
+ RootDirectory *RootDirectory `type:"structure"`
+
+ // The tags associated with the access point, presented as an array of Tag objects.
+ Tags []*Tag `type:"list"`
+}
+
+// String returns the string representation
+func (s CreateAccessPointOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s CreateAccessPointOutput) GoString() string {
+ return s.String()
+}
+
+// SetAccessPointArn sets the AccessPointArn field's value.
+func (s *CreateAccessPointOutput) SetAccessPointArn(v string) *CreateAccessPointOutput {
+ s.AccessPointArn = &v
+ return s
+}
+
+// SetAccessPointId sets the AccessPointId field's value.
+func (s *CreateAccessPointOutput) SetAccessPointId(v string) *CreateAccessPointOutput {
+ s.AccessPointId = &v
+ return s
+}
+
+// SetClientToken sets the ClientToken field's value.
+func (s *CreateAccessPointOutput) SetClientToken(v string) *CreateAccessPointOutput {
+ s.ClientToken = &v
+ return s
+}
+
+// SetFileSystemId sets the FileSystemId field's value.
+func (s *CreateAccessPointOutput) SetFileSystemId(v string) *CreateAccessPointOutput {
+ s.FileSystemId = &v
+ return s
+}
+
+// SetLifeCycleState sets the LifeCycleState field's value.
+func (s *CreateAccessPointOutput) SetLifeCycleState(v string) *CreateAccessPointOutput {
+ s.LifeCycleState = &v
+ return s
+}
+
+// SetName sets the Name field's value.
+func (s *CreateAccessPointOutput) SetName(v string) *CreateAccessPointOutput {
+ s.Name = &v
+ return s
+}
+
+// SetOwnerId sets the OwnerId field's value.
+func (s *CreateAccessPointOutput) SetOwnerId(v string) *CreateAccessPointOutput {
+ s.OwnerId = &v
+ return s
+}
+
+// SetPosixUser sets the PosixUser field's value.
+func (s *CreateAccessPointOutput) SetPosixUser(v *PosixUser) *CreateAccessPointOutput {
+ s.PosixUser = v
+ return s
+}
+
+// SetRootDirectory sets the RootDirectory field's value.
+func (s *CreateAccessPointOutput) SetRootDirectory(v *RootDirectory) *CreateAccessPointOutput {
+ s.RootDirectory = v
+ return s
+}
+
+// SetTags sets the Tags field's value.
+func (s *CreateAccessPointOutput) SetTags(v []*Tag) *CreateAccessPointOutput {
+ s.Tags = v
+ return s
+}
+
+type CreateFileSystemInput struct {
+ _ struct{} `type:"structure"`
+
+ // Used to create a file system that uses One Zone storage classes. It specifies
+ // the AWS Availability Zone in which to create the file system. Use the format
+ // us-east-1a to specify the Availability Zone. For more information about One
+ // Zone storage classes, see Using EFS storage classes (https://docs.aws.amazon.com/efs/latest/ug/storage-classes.html)
+ // in the Amazon EFS User Guide.
+ //
+ // One Zone storage classes are not available in all Availability Zones in AWS
+ // Regions where Amazon EFS is available.
+ AvailabilityZoneName *string `min:"1" type:"string"`
+
+ // Specifies whether automatic backups are enabled on the file system that you
+ // are creating. Set the value to true to enable automatic backups. If you are
+ // creating a file system that uses One Zone storage classes, automatic backups
+ // are enabled by default. For more information, see Automatic backups (https://docs.aws.amazon.com/efs/latest/ug/awsbackup.html#automatic-backups)
+ // in the Amazon EFS User Guide.
+ //
+ // Default is false. However, if you specify an AvailabilityZoneName, the default
+ // is true.
+ //
+ // AWS Backup is not available in all AWS Regions where Amazon EFS is available.
+ Backup *bool `type:"boolean"`
+
+ // A string of up to 64 ASCII characters. Amazon EFS uses this to ensure idempotent
+ // creation.
+ CreationToken *string `min:"1" type:"string" idempotencyToken:"true"`
+
+ // A Boolean value that, if true, creates an encrypted file system. When creating
+ // an encrypted file system, you have the option of specifying CreateFileSystemRequest$KmsKeyId
+ // for an existing AWS Key Management Service (AWS KMS) customer master key
+ // (CMK). If you don't specify a CMK, then the default CMK for Amazon EFS, /aws/elasticfilesystem,
+ // is used to protect the encrypted file system.
+ Encrypted *bool `type:"boolean"`
+
+ // The ID of the AWS KMS CMK to be used to protect the encrypted file system.
+ // This parameter is only required if you want to use a non-default CMK. If
+ // this parameter is not specified, the default CMK for Amazon EFS is used.
+ // This ID can be in one of the following formats:
+ //
+ // * Key ID - A unique identifier of the key, for example 1234abcd-12ab-34cd-56ef-1234567890ab.
+ //
+ // * ARN - An Amazon Resource Name (ARN) for the key, for example arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab.
+ //
+ // * Key alias - A previously created display name for a key, for example
+ // alias/projectKey1.
+ //
+ // * Key alias ARN - An ARN for a key alias, for example arn:aws:kms:us-west-2:444455556666:alias/projectKey1.
+ //
+ // If KmsKeyId is specified, the CreateFileSystemRequest$Encrypted parameter
+ // must be set to true.
+ //
+ // EFS accepts only symmetric CMKs. You cannot use asymmetric CMKs with EFS
+ // file systems.
+ KmsKeyId *string `type:"string"`
+
+ // The performance mode of the file system. We recommend generalPurpose performance
+ // mode for most file systems. File systems using the maxIO performance mode
+ // can scale to higher levels of aggregate throughput and operations per second
+ // with a tradeoff of slightly higher latencies for most file operations. The
+ // performance mode can't be changed after the file system has been created.
+ //
+ // The maxIO mode is not supported on file systems using One Zone storage classes.
+ PerformanceMode *string `type:"string" enum:"PerformanceMode"`
+
+ // The throughput, measured in MiB/s, that you want to provision for a file
+ // system that you're creating. Valid values are 1-1024. Required if ThroughputMode
+ // is set to provisioned. The upper limit for throughput is 1024 MiB/s. To increase
+ // this limit, contact AWS Support. For more information, see Amazon EFS quotas
+ // that you can increase (https://docs.aws.amazon.com/efs/latest/ug/limits.html#soft-limits)
+ // in the Amazon EFS User Guide.
+ ProvisionedThroughputInMibps *float64 `min:"1" type:"double"`
+
+ // A value that specifies to create one or more tags associated with the file
+ // system. Each tag is a user-defined key-value pair. Name your file system
+ // on creation by including a "Key":"Name","Value":"{value}" key-value pair.
+ Tags []*Tag `type:"list"`
+
+ // Specifies the throughput mode for the file system, either bursting or provisioned.
+ // If you set ThroughputMode to provisioned, you must also set a value for ProvisionedThroughputInMibps.
+ // After you create the file system, you can decrease your file system's throughput
+ // in Provisioned Throughput mode or change between the throughput modes, as
+ // long as it’s been more than 24 hours since the last decrease or throughput
+ // mode change. For more information, see Specifying throughput with provisioned
+ // mode (https://docs.aws.amazon.com/efs/latest/ug/performance.html#provisioned-throughput)
+ // in the Amazon EFS User Guide.
+ //
+ // Default is bursting.
+ ThroughputMode *string `type:"string" enum:"ThroughputMode"`
+}
+
+// String returns the string representation
+func (s CreateFileSystemInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s CreateFileSystemInput) GoString() string {
+ return s.String()
+}
+
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *CreateFileSystemInput) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "CreateFileSystemInput"}
+ if s.AvailabilityZoneName != nil && len(*s.AvailabilityZoneName) < 1 {
+ invalidParams.Add(request.NewErrParamMinLen("AvailabilityZoneName", 1))
+ }
+ if s.CreationToken != nil && len(*s.CreationToken) < 1 {
+ invalidParams.Add(request.NewErrParamMinLen("CreationToken", 1))
+ }
+ if s.ProvisionedThroughputInMibps != nil && *s.ProvisionedThroughputInMibps < 1 {
+ invalidParams.Add(request.NewErrParamMinValue("ProvisionedThroughputInMibps", 1))
+ }
+ if s.Tags != nil {
+ for i, v := range s.Tags {
+ if v == nil {
+ continue
+ }
+ if err := v.Validate(); err != nil {
+ invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams))
+ }
+ }
+ }
+
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ }
+ return nil
+}
+
+// SetAvailabilityZoneName sets the AvailabilityZoneName field's value.
+func (s *CreateFileSystemInput) SetAvailabilityZoneName(v string) *CreateFileSystemInput {
+ s.AvailabilityZoneName = &v
+ return s
+}
+
+// SetBackup sets the Backup field's value.
+func (s *CreateFileSystemInput) SetBackup(v bool) *CreateFileSystemInput {
+ s.Backup = &v
+ return s
+}
+
+// SetCreationToken sets the CreationToken field's value.
+func (s *CreateFileSystemInput) SetCreationToken(v string) *CreateFileSystemInput {
+ s.CreationToken = &v
+ return s
+}
+
+// SetEncrypted sets the Encrypted field's value.
+func (s *CreateFileSystemInput) SetEncrypted(v bool) *CreateFileSystemInput {
+ s.Encrypted = &v
+ return s
+}
+
+// SetKmsKeyId sets the KmsKeyId field's value.
+func (s *CreateFileSystemInput) SetKmsKeyId(v string) *CreateFileSystemInput {
+ s.KmsKeyId = &v
+ return s
+}
+
+// SetPerformanceMode sets the PerformanceMode field's value.
+func (s *CreateFileSystemInput) SetPerformanceMode(v string) *CreateFileSystemInput {
+ s.PerformanceMode = &v
+ return s
+}
+
+// SetProvisionedThroughputInMibps sets the ProvisionedThroughputInMibps field's value.
+func (s *CreateFileSystemInput) SetProvisionedThroughputInMibps(v float64) *CreateFileSystemInput {
+ s.ProvisionedThroughputInMibps = &v
+ return s
+}
+
+// SetTags sets the Tags field's value.
+func (s *CreateFileSystemInput) SetTags(v []*Tag) *CreateFileSystemInput {
+ s.Tags = v
+ return s
+}
+
+// SetThroughputMode sets the ThroughputMode field's value.
+func (s *CreateFileSystemInput) SetThroughputMode(v string) *CreateFileSystemInput {
+ s.ThroughputMode = &v
+ return s
+}
+
+type CreateMountTargetInput struct {
+ _ struct{} `type:"structure"`
+
+ // The ID of the file system for which to create the mount target.
+ //
+ // FileSystemId is a required field
+ FileSystemId *string `type:"string" required:"true"`
+
+ // Valid IPv4 address within the address range of the specified subnet.
+ IpAddress *string `min:"7" type:"string"`
+
+ // Up to five VPC security group IDs, of the form sg-xxxxxxxx. These must be
+ // for the same VPC as subnet specified.
+ SecurityGroups []*string `type:"list"`
+
+ // The ID of the subnet to add the mount target in. For file systems that use
+ // One Zone storage classes, use the subnet that is associated with the file
+ // system's Availability Zone.
+ //
+ // SubnetId is a required field
+ SubnetId *string `min:"15" type:"string" required:"true"`
+}
+
+// String returns the string representation
+func (s CreateMountTargetInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s CreateMountTargetInput) GoString() string {
+ return s.String()
+}
+
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *CreateMountTargetInput) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "CreateMountTargetInput"}
+ if s.FileSystemId == nil {
+ invalidParams.Add(request.NewErrParamRequired("FileSystemId"))
+ }
+ if s.IpAddress != nil && len(*s.IpAddress) < 7 {
+ invalidParams.Add(request.NewErrParamMinLen("IpAddress", 7))
+ }
+ if s.SubnetId == nil {
+ invalidParams.Add(request.NewErrParamRequired("SubnetId"))
+ }
+ if s.SubnetId != nil && len(*s.SubnetId) < 15 {
+ invalidParams.Add(request.NewErrParamMinLen("SubnetId", 15))
+ }
+
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ }
+ return nil
+}
+
+// SetFileSystemId sets the FileSystemId field's value.
+func (s *CreateMountTargetInput) SetFileSystemId(v string) *CreateMountTargetInput {
+ s.FileSystemId = &v
+ return s
+}
+
+// SetIpAddress sets the IpAddress field's value.
+func (s *CreateMountTargetInput) SetIpAddress(v string) *CreateMountTargetInput {
+ s.IpAddress = &v
+ return s
+}
+
+// SetSecurityGroups sets the SecurityGroups field's value.
+func (s *CreateMountTargetInput) SetSecurityGroups(v []*string) *CreateMountTargetInput {
+ s.SecurityGroups = v
+ return s
+}
+
+// SetSubnetId sets the SubnetId field's value.
+func (s *CreateMountTargetInput) SetSubnetId(v string) *CreateMountTargetInput {
+ s.SubnetId = &v
+ return s
+}
+
+type CreateTagsInput struct {
+ _ struct{} `type:"structure"`
+
+ // The ID of the file system whose tags you want to modify (String). This operation
+ // modifies the tags only, not the file system.
+ //
+ // FileSystemId is a required field
+ FileSystemId *string `location:"uri" locationName:"FileSystemId" type:"string" required:"true"`
+
+ // An array of Tag objects to add. Each Tag object is a key-value pair.
+ //
+ // Tags is a required field
+ Tags []*Tag `type:"list" required:"true"`
+}
+
+// String returns the string representation
+func (s CreateTagsInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s CreateTagsInput) GoString() string {
+ return s.String()
+}
+
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *CreateTagsInput) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "CreateTagsInput"}
+ if s.FileSystemId == nil {
+ invalidParams.Add(request.NewErrParamRequired("FileSystemId"))
+ }
+ if s.FileSystemId != nil && len(*s.FileSystemId) < 1 {
+ invalidParams.Add(request.NewErrParamMinLen("FileSystemId", 1))
+ }
+ if s.Tags == nil {
+ invalidParams.Add(request.NewErrParamRequired("Tags"))
+ }
+ if s.Tags != nil {
+ for i, v := range s.Tags {
+ if v == nil {
+ continue
+ }
+ if err := v.Validate(); err != nil {
+ invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams))
+ }
+ }
+ }
+
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ }
+ return nil
+}
+
+// SetFileSystemId sets the FileSystemId field's value.
+func (s *CreateTagsInput) SetFileSystemId(v string) *CreateTagsInput {
+ s.FileSystemId = &v
+ return s
+}
+
+// SetTags sets the Tags field's value.
+func (s *CreateTagsInput) SetTags(v []*Tag) *CreateTagsInput {
+ s.Tags = v
+ return s
+}
+
+type CreateTagsOutput struct {
+ _ struct{} `type:"structure"`
+}
+
+// String returns the string representation
+func (s CreateTagsOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s CreateTagsOutput) GoString() string {
+ return s.String()
+}
+
+// Required if the RootDirectory > Path specified does not exist. Specifies
+// the POSIX IDs and permissions to apply to the access point's RootDirectory
+// > Path. If the access point root directory does not exist, EFS creates it
+// with these settings when a client connects to the access point. When specifying
+// CreationInfo, you must include values for all properties.
+//
+// Amazon EFS creates a root directory only if you have provided the CreationInfo:
+// OwnUid, OwnGID, and permissions for the directory. If you do not provide
+// this information, Amazon EFS does not create the root directory. If the root
+// directory does not exist, attempts to mount using the access point will fail.
+//
+// If you do not provide CreationInfo and the specified RootDirectory does not
+// exist, attempts to mount the file system using the access point will fail.
+type CreationInfo struct {
+ _ struct{} `type:"structure"`
+
+ // Specifies the POSIX group ID to apply to the RootDirectory. Accepts values
+ // from 0 to 2^32 (4294967295).
+ //
+ // OwnerGid is a required field
+ OwnerGid *int64 `type:"long" required:"true"`
+
+ // Specifies the POSIX user ID to apply to the RootDirectory. Accepts values
+ // from 0 to 2^32 (4294967295).
+ //
+ // OwnerUid is a required field
+ OwnerUid *int64 `type:"long" required:"true"`
+
+ // Specifies the POSIX permissions to apply to the RootDirectory, in the format
+ // of an octal number representing the file's mode bits.
+ //
+ // Permissions is a required field
+ Permissions *string `min:"3" type:"string" required:"true"`
+}
+
+// String returns the string representation
+func (s CreationInfo) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s CreationInfo) GoString() string {
+ return s.String()
+}
+
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *CreationInfo) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "CreationInfo"}
+ if s.OwnerGid == nil {
+ invalidParams.Add(request.NewErrParamRequired("OwnerGid"))
+ }
+ if s.OwnerUid == nil {
+ invalidParams.Add(request.NewErrParamRequired("OwnerUid"))
+ }
+ if s.Permissions == nil {
+ invalidParams.Add(request.NewErrParamRequired("Permissions"))
+ }
+ if s.Permissions != nil && len(*s.Permissions) < 3 {
+ invalidParams.Add(request.NewErrParamMinLen("Permissions", 3))
+ }
+
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ }
+ return nil
+}
+
+// SetOwnerGid sets the OwnerGid field's value.
+func (s *CreationInfo) SetOwnerGid(v int64) *CreationInfo {
+ s.OwnerGid = &v
+ return s
+}
+
+// SetOwnerUid sets the OwnerUid field's value.
+func (s *CreationInfo) SetOwnerUid(v int64) *CreationInfo {
+ s.OwnerUid = &v
+ return s
+}
+
+// SetPermissions sets the Permissions field's value.
+func (s *CreationInfo) SetPermissions(v string) *CreationInfo {
+ s.Permissions = &v
+ return s
+}
+
+type DeleteAccessPointInput struct {
+ _ struct{} `type:"structure"`
+
+ // The ID of the access point that you want to delete.
+ //
+ // AccessPointId is a required field
+ AccessPointId *string `location:"uri" locationName:"AccessPointId" type:"string" required:"true"`
+}
+
+// String returns the string representation
+func (s DeleteAccessPointInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DeleteAccessPointInput) GoString() string {
+ return s.String()
+}
+
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *DeleteAccessPointInput) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "DeleteAccessPointInput"}
+ if s.AccessPointId == nil {
+ invalidParams.Add(request.NewErrParamRequired("AccessPointId"))
+ }
+ if s.AccessPointId != nil && len(*s.AccessPointId) < 1 {
+ invalidParams.Add(request.NewErrParamMinLen("AccessPointId", 1))
+ }
+
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ }
+ return nil
+}
+
+// SetAccessPointId sets the AccessPointId field's value.
+func (s *DeleteAccessPointInput) SetAccessPointId(v string) *DeleteAccessPointInput {
+ s.AccessPointId = &v
+ return s
+}
+
+type DeleteAccessPointOutput struct {
+ _ struct{} `type:"structure"`
+}
+
+// String returns the string representation
+func (s DeleteAccessPointOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DeleteAccessPointOutput) GoString() string {
+ return s.String()
+}
+
+type DeleteFileSystemInput struct {
+ _ struct{} `type:"structure"`
+
+ // The ID of the file system you want to delete.
+ //
+ // FileSystemId is a required field
+ FileSystemId *string `location:"uri" locationName:"FileSystemId" type:"string" required:"true"`
+}
+
+// String returns the string representation
+func (s DeleteFileSystemInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DeleteFileSystemInput) GoString() string {
+ return s.String()
+}
+
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *DeleteFileSystemInput) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "DeleteFileSystemInput"}
+ if s.FileSystemId == nil {
+ invalidParams.Add(request.NewErrParamRequired("FileSystemId"))
+ }
+ if s.FileSystemId != nil && len(*s.FileSystemId) < 1 {
+ invalidParams.Add(request.NewErrParamMinLen("FileSystemId", 1))
+ }
+
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ }
+ return nil
+}
+
+// SetFileSystemId sets the FileSystemId field's value.
+func (s *DeleteFileSystemInput) SetFileSystemId(v string) *DeleteFileSystemInput {
+ s.FileSystemId = &v
+ return s
+}
+
+type DeleteFileSystemOutput struct {
+ _ struct{} `type:"structure"`
+}
+
+// String returns the string representation
+func (s DeleteFileSystemOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DeleteFileSystemOutput) GoString() string {
+ return s.String()
+}
+
+type DeleteFileSystemPolicyInput struct {
+ _ struct{} `type:"structure"`
+
+ // Specifies the EFS file system for which to delete the FileSystemPolicy.
+ //
+ // FileSystemId is a required field
+ FileSystemId *string `location:"uri" locationName:"FileSystemId" type:"string" required:"true"`
+}
+
+// String returns the string representation
+func (s DeleteFileSystemPolicyInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DeleteFileSystemPolicyInput) GoString() string {
+ return s.String()
+}
+
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *DeleteFileSystemPolicyInput) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "DeleteFileSystemPolicyInput"}
+ if s.FileSystemId == nil {
+ invalidParams.Add(request.NewErrParamRequired("FileSystemId"))
+ }
+ if s.FileSystemId != nil && len(*s.FileSystemId) < 1 {
+ invalidParams.Add(request.NewErrParamMinLen("FileSystemId", 1))
+ }
+
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ }
+ return nil
+}
+
+// SetFileSystemId sets the FileSystemId field's value.
+func (s *DeleteFileSystemPolicyInput) SetFileSystemId(v string) *DeleteFileSystemPolicyInput {
+ s.FileSystemId = &v
+ return s
+}
+
+type DeleteFileSystemPolicyOutput struct {
+ _ struct{} `type:"structure"`
+}
+
+// String returns the string representation
+func (s DeleteFileSystemPolicyOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DeleteFileSystemPolicyOutput) GoString() string {
+ return s.String()
+}
+
+type DeleteMountTargetInput struct {
+ _ struct{} `type:"structure"`
+
+ // The ID of the mount target to delete (String).
+ //
+ // MountTargetId is a required field
+ MountTargetId *string `location:"uri" locationName:"MountTargetId" min:"13" type:"string" required:"true"`
+}
+
+// String returns the string representation
+func (s DeleteMountTargetInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DeleteMountTargetInput) GoString() string {
+ return s.String()
+}
+
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *DeleteMountTargetInput) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "DeleteMountTargetInput"}
+ if s.MountTargetId == nil {
+ invalidParams.Add(request.NewErrParamRequired("MountTargetId"))
+ }
+ if s.MountTargetId != nil && len(*s.MountTargetId) < 13 {
+ invalidParams.Add(request.NewErrParamMinLen("MountTargetId", 13))
+ }
+
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ }
+ return nil
+}
+
+// SetMountTargetId sets the MountTargetId field's value.
+func (s *DeleteMountTargetInput) SetMountTargetId(v string) *DeleteMountTargetInput {
+ s.MountTargetId = &v
+ return s
+}
+
+type DeleteMountTargetOutput struct {
+ _ struct{} `type:"structure"`
+}
+
+// String returns the string representation
+func (s DeleteMountTargetOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DeleteMountTargetOutput) GoString() string {
+ return s.String()
+}
+
+type DeleteTagsInput struct {
+ _ struct{} `type:"structure"`
+
+ // The ID of the file system whose tags you want to delete (String).
+ //
+ // FileSystemId is a required field
+ FileSystemId *string `location:"uri" locationName:"FileSystemId" type:"string" required:"true"`
+
+ // A list of tag keys to delete.
+ //
+ // TagKeys is a required field
+ TagKeys []*string `min:"1" type:"list" required:"true"`
+}
+
+// String returns the string representation
+func (s DeleteTagsInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DeleteTagsInput) GoString() string {
+ return s.String()
+}
+
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *DeleteTagsInput) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "DeleteTagsInput"}
+ if s.FileSystemId == nil {
+ invalidParams.Add(request.NewErrParamRequired("FileSystemId"))
+ }
+ if s.FileSystemId != nil && len(*s.FileSystemId) < 1 {
+ invalidParams.Add(request.NewErrParamMinLen("FileSystemId", 1))
+ }
+ if s.TagKeys == nil {
+ invalidParams.Add(request.NewErrParamRequired("TagKeys"))
+ }
+ if s.TagKeys != nil && len(s.TagKeys) < 1 {
+ invalidParams.Add(request.NewErrParamMinLen("TagKeys", 1))
+ }
+
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ }
+ return nil
+}
+
+// SetFileSystemId sets the FileSystemId field's value.
+func (s *DeleteTagsInput) SetFileSystemId(v string) *DeleteTagsInput {
+ s.FileSystemId = &v
+ return s
+}
+
+// SetTagKeys sets the TagKeys field's value.
+func (s *DeleteTagsInput) SetTagKeys(v []*string) *DeleteTagsInput {
+ s.TagKeys = v
+ return s
+}
+
+type DeleteTagsOutput struct {
+ _ struct{} `type:"structure"`
+}
+
+// String returns the string representation
+func (s DeleteTagsOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DeleteTagsOutput) GoString() string {
+ return s.String()
+}
+
+// The service timed out trying to fulfill the request, and the client should
+// try the call again.
+type DependencyTimeout struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ // ErrorCode is a required field
+ ErrorCode *string `min:"1" type:"string" required:"true"`
+
+ Message_ *string `locationName:"Message" type:"string"`
+}
+
+// String returns the string representation
+func (s DependencyTimeout) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DependencyTimeout) GoString() string {
+ return s.String()
+}
+
+func newErrorDependencyTimeout(v protocol.ResponseMetadata) error {
+ return &DependencyTimeout{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *DependencyTimeout) Code() string {
+ return "DependencyTimeout"
+}
+
+// Message returns the exception's message.
+func (s *DependencyTimeout) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *DependencyTimeout) OrigErr() error {
+ return nil
+}
+
+func (s *DependencyTimeout) Error() string {
+ return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *DependencyTimeout) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *DependencyTimeout) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
+type DescribeAccessPointsInput struct {
+ _ struct{} `type:"structure"`
+
+ // (Optional) Specifies an EFS access point to describe in the response; mutually
+ // exclusive with FileSystemId.
+ AccessPointId *string `location:"querystring" locationName:"AccessPointId" type:"string"`
+
+ // (Optional) If you provide a FileSystemId, EFS returns all access points for
+ // that file system; mutually exclusive with AccessPointId.
+ FileSystemId *string `location:"querystring" locationName:"FileSystemId" type:"string"`
+
+ // (Optional) When retrieving all access points for a file system, you can optionally
+ // specify the MaxItems parameter to limit the number of objects returned in
+ // a response. The default value is 100.
+ MaxResults *int64 `location:"querystring" locationName:"MaxResults" min:"1" type:"integer"`
+
+ // NextToken is present if the response is paginated. You can use NextMarker
+ // in the subsequent request to fetch the next page of access point descriptions.
+ NextToken *string `location:"querystring" locationName:"NextToken" min:"1" type:"string"`
+}
+
+// String returns the string representation
+func (s DescribeAccessPointsInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeAccessPointsInput) GoString() string {
+ return s.String()
+}
+
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *DescribeAccessPointsInput) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "DescribeAccessPointsInput"}
+ if s.MaxResults != nil && *s.MaxResults < 1 {
+ invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
+ }
+ if s.NextToken != nil && len(*s.NextToken) < 1 {
+ invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
+ }
+
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ }
+ return nil
+}
+
+// SetAccessPointId sets the AccessPointId field's value.
+func (s *DescribeAccessPointsInput) SetAccessPointId(v string) *DescribeAccessPointsInput {
+ s.AccessPointId = &v
+ return s
+}
+
+// SetFileSystemId sets the FileSystemId field's value.
+func (s *DescribeAccessPointsInput) SetFileSystemId(v string) *DescribeAccessPointsInput {
+ s.FileSystemId = &v
+ return s
+}
+
+// SetMaxResults sets the MaxResults field's value.
+func (s *DescribeAccessPointsInput) SetMaxResults(v int64) *DescribeAccessPointsInput {
+ s.MaxResults = &v
+ return s
+}
+
+// SetNextToken sets the NextToken field's value.
+func (s *DescribeAccessPointsInput) SetNextToken(v string) *DescribeAccessPointsInput {
+ s.NextToken = &v
+ return s
+}
+
+type DescribeAccessPointsOutput struct {
+ _ struct{} `type:"structure"`
+
+ // An array of access point descriptions.
+ AccessPoints []*AccessPointDescription `type:"list"`
+
+ // Present if there are more access points than returned in the response. You
+ // can use the NextMarker in the subsequent request to fetch the additional
+ // descriptions.
+ NextToken *string `min:"1" type:"string"`
+}
+
+// String returns the string representation
+func (s DescribeAccessPointsOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeAccessPointsOutput) GoString() string {
+ return s.String()
+}
+
+// SetAccessPoints sets the AccessPoints field's value.
+func (s *DescribeAccessPointsOutput) SetAccessPoints(v []*AccessPointDescription) *DescribeAccessPointsOutput {
+ s.AccessPoints = v
+ return s
+}
+
+// SetNextToken sets the NextToken field's value.
+func (s *DescribeAccessPointsOutput) SetNextToken(v string) *DescribeAccessPointsOutput {
+ s.NextToken = &v
+ return s
+}
+
+type DescribeBackupPolicyInput struct {
+ _ struct{} `type:"structure"`
+
+ // Specifies which EFS file system to retrieve the BackupPolicy for.
+ //
+ // FileSystemId is a required field
+ FileSystemId *string `location:"uri" locationName:"FileSystemId" type:"string" required:"true"`
+}
+
+// String returns the string representation
+func (s DescribeBackupPolicyInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeBackupPolicyInput) GoString() string {
+ return s.String()
+}
+
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *DescribeBackupPolicyInput) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "DescribeBackupPolicyInput"}
+ if s.FileSystemId == nil {
+ invalidParams.Add(request.NewErrParamRequired("FileSystemId"))
+ }
+ if s.FileSystemId != nil && len(*s.FileSystemId) < 1 {
+ invalidParams.Add(request.NewErrParamMinLen("FileSystemId", 1))
+ }
+
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ }
+ return nil
+}
+
+// SetFileSystemId sets the FileSystemId field's value.
+func (s *DescribeBackupPolicyInput) SetFileSystemId(v string) *DescribeBackupPolicyInput {
+ s.FileSystemId = &v
+ return s
+}
+
+type DescribeBackupPolicyOutput struct {
+ _ struct{} `type:"structure"`
+
+ // Describes the file system's backup policy, indicating whether automatic backups
+ // are turned on or off..
+ BackupPolicy *BackupPolicy `type:"structure"`
+}
+
+// String returns the string representation
+func (s DescribeBackupPolicyOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeBackupPolicyOutput) GoString() string {
+ return s.String()
+}
+
+// SetBackupPolicy sets the BackupPolicy field's value.
+func (s *DescribeBackupPolicyOutput) SetBackupPolicy(v *BackupPolicy) *DescribeBackupPolicyOutput {
+ s.BackupPolicy = v
+ return s
+}
+
+type DescribeFileSystemPolicyInput struct {
+ _ struct{} `type:"structure"`
+
+ // Specifies which EFS file system to retrieve the FileSystemPolicy for.
+ //
+ // FileSystemId is a required field
+ FileSystemId *string `location:"uri" locationName:"FileSystemId" type:"string" required:"true"`
+}
+
+// String returns the string representation
+func (s DescribeFileSystemPolicyInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeFileSystemPolicyInput) GoString() string {
+ return s.String()
+}
+
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *DescribeFileSystemPolicyInput) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "DescribeFileSystemPolicyInput"}
+ if s.FileSystemId == nil {
+ invalidParams.Add(request.NewErrParamRequired("FileSystemId"))
+ }
+ if s.FileSystemId != nil && len(*s.FileSystemId) < 1 {
+ invalidParams.Add(request.NewErrParamMinLen("FileSystemId", 1))
+ }
+
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ }
+ return nil
+}
+
+// SetFileSystemId sets the FileSystemId field's value.
+func (s *DescribeFileSystemPolicyInput) SetFileSystemId(v string) *DescribeFileSystemPolicyInput {
+ s.FileSystemId = &v
+ return s
+}
+
+type DescribeFileSystemPolicyOutput struct {
+ _ struct{} `type:"structure"`
+
+ // Specifies the EFS file system to which the FileSystemPolicy applies.
+ FileSystemId *string `type:"string"`
+
+ // The JSON formatted FileSystemPolicy for the EFS file system.
+ Policy *string `min:"1" type:"string"`
+}
+
+// String returns the string representation
+func (s DescribeFileSystemPolicyOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeFileSystemPolicyOutput) GoString() string {
+ return s.String()
+}
+
+// SetFileSystemId sets the FileSystemId field's value.
+func (s *DescribeFileSystemPolicyOutput) SetFileSystemId(v string) *DescribeFileSystemPolicyOutput {
+ s.FileSystemId = &v
+ return s
+}
+
+// SetPolicy sets the Policy field's value.
+func (s *DescribeFileSystemPolicyOutput) SetPolicy(v string) *DescribeFileSystemPolicyOutput {
+ s.Policy = &v
+ return s
+}
+
+type DescribeFileSystemsInput struct {
+ _ struct{} `type:"structure"`
+
+ // (Optional) Restricts the list to the file system with this creation token
+ // (String). You specify a creation token when you create an Amazon EFS file
+ // system.
+ CreationToken *string `location:"querystring" locationName:"CreationToken" min:"1" type:"string"`
+
+ // (Optional) ID of the file system whose description you want to retrieve (String).
+ FileSystemId *string `location:"querystring" locationName:"FileSystemId" type:"string"`
+
+ // (Optional) Opaque pagination token returned from a previous DescribeFileSystems
+ // operation (String). If present, specifies to continue the list from where
+ // the returning call had left off.
+ Marker *string `location:"querystring" locationName:"Marker" min:"1" type:"string"`
+
+ // (Optional) Specifies the maximum number of file systems to return in the
+ // response (integer). This number is automatically set to 100. The response
+ // is paginated at 100 per page if you have more than 100 file systems.
+ MaxItems *int64 `location:"querystring" locationName:"MaxItems" min:"1" type:"integer"`
+}
+
+// String returns the string representation
+func (s DescribeFileSystemsInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeFileSystemsInput) GoString() string {
+ return s.String()
+}
+
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *DescribeFileSystemsInput) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "DescribeFileSystemsInput"}
+ if s.CreationToken != nil && len(*s.CreationToken) < 1 {
+ invalidParams.Add(request.NewErrParamMinLen("CreationToken", 1))
+ }
+ if s.Marker != nil && len(*s.Marker) < 1 {
+ invalidParams.Add(request.NewErrParamMinLen("Marker", 1))
+ }
+ if s.MaxItems != nil && *s.MaxItems < 1 {
+ invalidParams.Add(request.NewErrParamMinValue("MaxItems", 1))
+ }
+
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ }
+ return nil
+}
+
+// SetCreationToken sets the CreationToken field's value.
+func (s *DescribeFileSystemsInput) SetCreationToken(v string) *DescribeFileSystemsInput {
+ s.CreationToken = &v
+ return s
+}
+
+// SetFileSystemId sets the FileSystemId field's value.
+func (s *DescribeFileSystemsInput) SetFileSystemId(v string) *DescribeFileSystemsInput {
+ s.FileSystemId = &v
+ return s
+}
+
+// SetMarker sets the Marker field's value.
+func (s *DescribeFileSystemsInput) SetMarker(v string) *DescribeFileSystemsInput {
+ s.Marker = &v
+ return s
+}
+
+// SetMaxItems sets the MaxItems field's value.
+func (s *DescribeFileSystemsInput) SetMaxItems(v int64) *DescribeFileSystemsInput {
+ s.MaxItems = &v
+ return s
+}
+
+type DescribeFileSystemsOutput struct {
+ _ struct{} `type:"structure"`
+
+ // An array of file system descriptions.
+ FileSystems []*FileSystemDescription `type:"list"`
+
+ // Present if provided by caller in the request (String).
+ Marker *string `min:"1" type:"string"`
+
+ // Present if there are more file systems than returned in the response (String).
+ // You can use the NextMarker in the subsequent request to fetch the descriptions.
+ NextMarker *string `min:"1" type:"string"`
+}
+
+// String returns the string representation
+func (s DescribeFileSystemsOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeFileSystemsOutput) GoString() string {
+ return s.String()
+}
+
+// SetFileSystems sets the FileSystems field's value.
+func (s *DescribeFileSystemsOutput) SetFileSystems(v []*FileSystemDescription) *DescribeFileSystemsOutput {
+ s.FileSystems = v
+ return s
+}
+
+// SetMarker sets the Marker field's value.
+func (s *DescribeFileSystemsOutput) SetMarker(v string) *DescribeFileSystemsOutput {
+ s.Marker = &v
+ return s
+}
+
+// SetNextMarker sets the NextMarker field's value.
+func (s *DescribeFileSystemsOutput) SetNextMarker(v string) *DescribeFileSystemsOutput {
+ s.NextMarker = &v
+ return s
+}
+
+type DescribeLifecycleConfigurationInput struct {
+ _ struct{} `type:"structure"`
+
+ // The ID of the file system whose LifecycleConfiguration object you want to
+ // retrieve (String).
+ //
+ // FileSystemId is a required field
+ FileSystemId *string `location:"uri" locationName:"FileSystemId" type:"string" required:"true"`
+}
+
+// String returns the string representation
+func (s DescribeLifecycleConfigurationInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeLifecycleConfigurationInput) GoString() string {
+ return s.String()
+}
+
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *DescribeLifecycleConfigurationInput) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "DescribeLifecycleConfigurationInput"}
+ if s.FileSystemId == nil {
+ invalidParams.Add(request.NewErrParamRequired("FileSystemId"))
+ }
+ if s.FileSystemId != nil && len(*s.FileSystemId) < 1 {
+ invalidParams.Add(request.NewErrParamMinLen("FileSystemId", 1))
+ }
+
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ }
+ return nil
+}
+
+// SetFileSystemId sets the FileSystemId field's value.
+func (s *DescribeLifecycleConfigurationInput) SetFileSystemId(v string) *DescribeLifecycleConfigurationInput {
+ s.FileSystemId = &v
+ return s
+}
+
+type DescribeLifecycleConfigurationOutput struct {
+ _ struct{} `type:"structure"`
+
+ // An array of lifecycle management policies. Currently, EFS supports a maximum
+ // of one policy per file system.
+ LifecyclePolicies []*LifecyclePolicy `type:"list"`
+}
+
+// String returns the string representation
+func (s DescribeLifecycleConfigurationOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeLifecycleConfigurationOutput) GoString() string {
+ return s.String()
+}
+
+// SetLifecyclePolicies sets the LifecyclePolicies field's value.
+func (s *DescribeLifecycleConfigurationOutput) SetLifecyclePolicies(v []*LifecyclePolicy) *DescribeLifecycleConfigurationOutput {
+ s.LifecyclePolicies = v
+ return s
+}
+
+type DescribeMountTargetSecurityGroupsInput struct {
+ _ struct{} `type:"structure"`
+
+ // The ID of the mount target whose security groups you want to retrieve.
+ //
+ // MountTargetId is a required field
+ MountTargetId *string `location:"uri" locationName:"MountTargetId" min:"13" type:"string" required:"true"`
+}
+
+// String returns the string representation
+func (s DescribeMountTargetSecurityGroupsInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeMountTargetSecurityGroupsInput) GoString() string {
+ return s.String()
+}
+
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *DescribeMountTargetSecurityGroupsInput) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "DescribeMountTargetSecurityGroupsInput"}
+ if s.MountTargetId == nil {
+ invalidParams.Add(request.NewErrParamRequired("MountTargetId"))
+ }
+ if s.MountTargetId != nil && len(*s.MountTargetId) < 13 {
+ invalidParams.Add(request.NewErrParamMinLen("MountTargetId", 13))
+ }
+
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ }
+ return nil
+}
+
+// SetMountTargetId sets the MountTargetId field's value.
+func (s *DescribeMountTargetSecurityGroupsInput) SetMountTargetId(v string) *DescribeMountTargetSecurityGroupsInput {
+ s.MountTargetId = &v
+ return s
+}
+
+type DescribeMountTargetSecurityGroupsOutput struct {
+ _ struct{} `type:"structure"`
+
+ // An array of security groups.
+ //
+ // SecurityGroups is a required field
+ SecurityGroups []*string `type:"list" required:"true"`
+}
+
+// String returns the string representation
+func (s DescribeMountTargetSecurityGroupsOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeMountTargetSecurityGroupsOutput) GoString() string {
+ return s.String()
+}
+
+// SetSecurityGroups sets the SecurityGroups field's value.
+func (s *DescribeMountTargetSecurityGroupsOutput) SetSecurityGroups(v []*string) *DescribeMountTargetSecurityGroupsOutput {
+ s.SecurityGroups = v
+ return s
+}
+
+type DescribeMountTargetsInput struct {
+ _ struct{} `type:"structure"`
+
+ // (Optional) The ID of the access point whose mount targets that you want to
+ // list. It must be included in your request if a FileSystemId or MountTargetId
+ // is not included in your request. Accepts either an access point ID or ARN
+ // as input.
+ AccessPointId *string `location:"querystring" locationName:"AccessPointId" type:"string"`
+
+ // (Optional) ID of the file system whose mount targets you want to list (String).
+ // It must be included in your request if an AccessPointId or MountTargetId
+ // is not included. Accepts either a file system ID or ARN as input.
+ FileSystemId *string `location:"querystring" locationName:"FileSystemId" type:"string"`
+
+ // (Optional) Opaque pagination token returned from a previous DescribeMountTargets
+ // operation (String). If present, it specifies to continue the list from where
+ // the previous returning call left off.
+ Marker *string `location:"querystring" locationName:"Marker" min:"1" type:"string"`
+
+ // (Optional) Maximum number of mount targets to return in the response. Currently,
+ // this number is automatically set to 10, and other values are ignored. The
+ // response is paginated at 100 per page if you have more than 100 mount targets.
+ MaxItems *int64 `location:"querystring" locationName:"MaxItems" min:"1" type:"integer"`
+
+ // (Optional) ID of the mount target that you want to have described (String).
+ // It must be included in your request if FileSystemId is not included. Accepts
+ // either a mount target ID or ARN as input.
+ MountTargetId *string `location:"querystring" locationName:"MountTargetId" min:"13" type:"string"`
+}
+
+// String returns the string representation
+func (s DescribeMountTargetsInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeMountTargetsInput) GoString() string {
+ return s.String()
+}
+
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *DescribeMountTargetsInput) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "DescribeMountTargetsInput"}
+ if s.Marker != nil && len(*s.Marker) < 1 {
+ invalidParams.Add(request.NewErrParamMinLen("Marker", 1))
+ }
+ if s.MaxItems != nil && *s.MaxItems < 1 {
+ invalidParams.Add(request.NewErrParamMinValue("MaxItems", 1))
+ }
+ if s.MountTargetId != nil && len(*s.MountTargetId) < 13 {
+ invalidParams.Add(request.NewErrParamMinLen("MountTargetId", 13))
+ }
+
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ }
+ return nil
+}
+
+// SetAccessPointId sets the AccessPointId field's value.
+func (s *DescribeMountTargetsInput) SetAccessPointId(v string) *DescribeMountTargetsInput {
+ s.AccessPointId = &v
+ return s
+}
+
+// SetFileSystemId sets the FileSystemId field's value.
+func (s *DescribeMountTargetsInput) SetFileSystemId(v string) *DescribeMountTargetsInput {
+ s.FileSystemId = &v
+ return s
+}
+
+// SetMarker sets the Marker field's value.
+func (s *DescribeMountTargetsInput) SetMarker(v string) *DescribeMountTargetsInput {
+ s.Marker = &v
+ return s
+}
+
+// SetMaxItems sets the MaxItems field's value.
+func (s *DescribeMountTargetsInput) SetMaxItems(v int64) *DescribeMountTargetsInput {
+ s.MaxItems = &v
+ return s
+}
+
+// SetMountTargetId sets the MountTargetId field's value.
+func (s *DescribeMountTargetsInput) SetMountTargetId(v string) *DescribeMountTargetsInput {
+ s.MountTargetId = &v
+ return s
+}
+
+type DescribeMountTargetsOutput struct {
+ _ struct{} `type:"structure"`
+
+ // If the request included the Marker, the response returns that value in this
+ // field.
+ Marker *string `min:"1" type:"string"`
+
+ // Returns the file system's mount targets as an array of MountTargetDescription
+ // objects.
+ MountTargets []*MountTargetDescription `type:"list"`
+
+ // If a value is present, there are more mount targets to return. In a subsequent
+ // request, you can provide Marker in your request with this value to retrieve
+ // the next set of mount targets.
+ NextMarker *string `min:"1" type:"string"`
+}
+
+// String returns the string representation
+func (s DescribeMountTargetsOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeMountTargetsOutput) GoString() string {
+ return s.String()
+}
+
+// SetMarker sets the Marker field's value.
+func (s *DescribeMountTargetsOutput) SetMarker(v string) *DescribeMountTargetsOutput {
+ s.Marker = &v
+ return s
+}
+
+// SetMountTargets sets the MountTargets field's value.
+func (s *DescribeMountTargetsOutput) SetMountTargets(v []*MountTargetDescription) *DescribeMountTargetsOutput {
+ s.MountTargets = v
+ return s
+}
+
+// SetNextMarker sets the NextMarker field's value.
+func (s *DescribeMountTargetsOutput) SetNextMarker(v string) *DescribeMountTargetsOutput {
+ s.NextMarker = &v
+ return s
+}
+
+type DescribeTagsInput struct {
+ _ struct{} `type:"structure"`
+
+ // The ID of the file system whose tag set you want to retrieve.
+ //
+ // FileSystemId is a required field
+ FileSystemId *string `location:"uri" locationName:"FileSystemId" type:"string" required:"true"`
+
+ // (Optional) An opaque pagination token returned from a previous DescribeTags
+ // operation (String). If present, it specifies to continue the list from where
+ // the previous call left off.
+ Marker *string `location:"querystring" locationName:"Marker" min:"1" type:"string"`
+
+ // (Optional) The maximum number of file system tags to return in the response.
+ // Currently, this number is automatically set to 100, and other values are
+ // ignored. The response is paginated at 100 per page if you have more than
+ // 100 tags.
+ MaxItems *int64 `location:"querystring" locationName:"MaxItems" min:"1" type:"integer"`
+}
+
+// String returns the string representation
+func (s DescribeTagsInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeTagsInput) GoString() string {
+ return s.String()
+}
+
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *DescribeTagsInput) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "DescribeTagsInput"}
+ if s.FileSystemId == nil {
+ invalidParams.Add(request.NewErrParamRequired("FileSystemId"))
+ }
+ if s.FileSystemId != nil && len(*s.FileSystemId) < 1 {
+ invalidParams.Add(request.NewErrParamMinLen("FileSystemId", 1))
+ }
+ if s.Marker != nil && len(*s.Marker) < 1 {
+ invalidParams.Add(request.NewErrParamMinLen("Marker", 1))
+ }
+ if s.MaxItems != nil && *s.MaxItems < 1 {
+ invalidParams.Add(request.NewErrParamMinValue("MaxItems", 1))
+ }
+
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ }
+ return nil
+}
+
+// SetFileSystemId sets the FileSystemId field's value.
+func (s *DescribeTagsInput) SetFileSystemId(v string) *DescribeTagsInput {
+ s.FileSystemId = &v
+ return s
+}
+
+// SetMarker sets the Marker field's value.
+func (s *DescribeTagsInput) SetMarker(v string) *DescribeTagsInput {
+ s.Marker = &v
+ return s
+}
+
+// SetMaxItems sets the MaxItems field's value.
+func (s *DescribeTagsInput) SetMaxItems(v int64) *DescribeTagsInput {
+ s.MaxItems = &v
+ return s
+}
+
+type DescribeTagsOutput struct {
+ _ struct{} `type:"structure"`
+
+ // If the request included a Marker, the response returns that value in this
+ // field.
+ Marker *string `min:"1" type:"string"`
+
+ // If a value is present, there are more tags to return. In a subsequent request,
+ // you can provide the value of NextMarker as the value of the Marker parameter
+ // in your next request to retrieve the next set of tags.
+ NextMarker *string `min:"1" type:"string"`
+
+ // Returns tags associated with the file system as an array of Tag objects.
+ //
+ // Tags is a required field
+ Tags []*Tag `type:"list" required:"true"`
+}
+
+// String returns the string representation
+func (s DescribeTagsOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeTagsOutput) GoString() string {
+ return s.String()
+}
+
+// SetMarker sets the Marker field's value.
+func (s *DescribeTagsOutput) SetMarker(v string) *DescribeTagsOutput {
+ s.Marker = &v
+ return s
+}
+
+// SetNextMarker sets the NextMarker field's value.
+func (s *DescribeTagsOutput) SetNextMarker(v string) *DescribeTagsOutput {
+ s.NextMarker = &v
+ return s
+}
+
+// SetTags sets the Tags field's value.
+func (s *DescribeTagsOutput) SetTags(v []*Tag) *DescribeTagsOutput {
+ s.Tags = v
+ return s
+}
+
+// Returned if the file system you are trying to create already exists, with
+// the creation token you provided.
+type FileSystemAlreadyExists struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ // ErrorCode is a required field
+ ErrorCode *string `min:"1" type:"string" required:"true"`
+
+ // FileSystemId is a required field
+ FileSystemId *string `type:"string" required:"true"`
+
+ Message_ *string `locationName:"Message" type:"string"`
+}
+
+// String returns the string representation
+func (s FileSystemAlreadyExists) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s FileSystemAlreadyExists) GoString() string {
+ return s.String()
+}
+
+func newErrorFileSystemAlreadyExists(v protocol.ResponseMetadata) error {
+ return &FileSystemAlreadyExists{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *FileSystemAlreadyExists) Code() string {
+ return "FileSystemAlreadyExists"
+}
+
+// Message returns the exception's message.
+func (s *FileSystemAlreadyExists) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *FileSystemAlreadyExists) OrigErr() error {
+ return nil
+}
+
+func (s *FileSystemAlreadyExists) Error() string {
+ return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *FileSystemAlreadyExists) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *FileSystemAlreadyExists) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
+// A description of the file system.
+type FileSystemDescription struct {
+ _ struct{} `type:"structure"`
+
+ // The unique and consistent identifier of the Availability Zone in which the
+ // file system's One Zone storage classes exist. For example, use1-az1 is an
+ // Availability Zone ID for the us-east-1 AWS Region, and it has the same location
+ // in every AWS account.
+ AvailabilityZoneId *string `type:"string"`
+
+ // Describes the AWS Availability Zone in which the file system is located,
+ // and is valid only for file systems using One Zone storage classes. For more
+ // information, see Using EFS storage classes (https://docs.aws.amazon.com/efs/latest/ug/storage-classes.html)
+ // in the Amazon EFS User Guide.
+ AvailabilityZoneName *string `min:"1" type:"string"`
+
+ // The time that the file system was created, in seconds (since 1970-01-01T00:00:00Z).
+ //
+ // CreationTime is a required field
+ CreationTime *time.Time `type:"timestamp" required:"true"`
+
+ // The opaque string specified in the request.
+ //
+ // CreationToken is a required field
+ CreationToken *string `min:"1" type:"string" required:"true"`
+
+ // A Boolean value that, if true, indicates that the file system is encrypted.
+ Encrypted *bool `type:"boolean"`
+
+ // The Amazon Resource Name (ARN) for the EFS file system, in the format arn:aws:elasticfilesystem:region:account-id:file-system/file-system-id
+ // . Example with sample data: arn:aws:elasticfilesystem:us-west-2:1111333322228888:file-system/fs-01234567
+ FileSystemArn *string `type:"string"`
+
+ // The ID of the file system, assigned by Amazon EFS.
+ //
+ // FileSystemId is a required field
+ FileSystemId *string `type:"string" required:"true"`
+
+ // The ID of an AWS Key Management Service (AWS KMS) customer master key (CMK)
+ // that was used to protect the encrypted file system.
+ KmsKeyId *string `type:"string"`
+
+ // The lifecycle phase of the file system.
+ //
+ // LifeCycleState is a required field
+ LifeCycleState *string `type:"string" required:"true" enum:"LifeCycleState"`
+
+ // You can add tags to a file system, including a Name tag. For more information,
+ // see CreateFileSystem. If the file system has a Name tag, Amazon EFS returns
+ // the value in this field.
+ Name *string `type:"string"`
+
+ // The current number of mount targets that the file system has. For more information,
+ // see CreateMountTarget.
+ //
+ // NumberOfMountTargets is a required field
+ NumberOfMountTargets *int64 `type:"integer" required:"true"`
+
+ // The AWS account that created the file system. If the file system was created
+ // by an IAM user, the parent account to which the user belongs is the owner.
+ //
+ // OwnerId is a required field
+ OwnerId *string `type:"string" required:"true"`
+
+ // The performance mode of the file system.
+ //
+ // PerformanceMode is a required field
+ PerformanceMode *string `type:"string" required:"true" enum:"PerformanceMode"`
+
+ // The amount of provisioned throughput, measured in MiB/s, for the file system.
+ // Valid for file systems using ThroughputMode set to provisioned.
+ ProvisionedThroughputInMibps *float64 `min:"1" type:"double"`
+
+ // The latest known metered size (in bytes) of data stored in the file system,
+ // in its Value field, and the time at which that size was determined in its
+ // Timestamp field. The Timestamp value is the integer number of seconds since
+ // 1970-01-01T00:00:00Z. The SizeInBytes value doesn't represent the size of
+ // a consistent snapshot of the file system, but it is eventually consistent
+ // when there are no writes to the file system. That is, SizeInBytes represents
+ // actual size only if the file system is not modified for a period longer than
+ // a couple of hours. Otherwise, the value is not the exact size that the file
+ // system was at any point in time.
+ //
+ // SizeInBytes is a required field
+ SizeInBytes *FileSystemSize `type:"structure" required:"true"`
+
+ // The tags associated with the file system, presented as an array of Tag objects.
+ //
+ // Tags is a required field
+ Tags []*Tag `type:"list" required:"true"`
+
+ // Displays the file system's throughput mode. For more information, see Throughput
+ // modes (https://docs.aws.amazon.com/efs/latest/ug/performance.html#throughput-modes)
+ // in the Amazon EFS User Guide.
+ ThroughputMode *string `type:"string" enum:"ThroughputMode"`
+}
+
+// String returns the string representation
+func (s FileSystemDescription) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s FileSystemDescription) GoString() string {
+ return s.String()
+}
+
+// SetAvailabilityZoneId sets the AvailabilityZoneId field's value.
+func (s *FileSystemDescription) SetAvailabilityZoneId(v string) *FileSystemDescription {
+ s.AvailabilityZoneId = &v
+ return s
+}
+
+// SetAvailabilityZoneName sets the AvailabilityZoneName field's value.
+func (s *FileSystemDescription) SetAvailabilityZoneName(v string) *FileSystemDescription {
+ s.AvailabilityZoneName = &v
+ return s
+}
+
+// SetCreationTime sets the CreationTime field's value.
+func (s *FileSystemDescription) SetCreationTime(v time.Time) *FileSystemDescription {
+ s.CreationTime = &v
+ return s
+}
+
+// SetCreationToken sets the CreationToken field's value.
+func (s *FileSystemDescription) SetCreationToken(v string) *FileSystemDescription {
+ s.CreationToken = &v
+ return s
+}
+
+// SetEncrypted sets the Encrypted field's value.
+func (s *FileSystemDescription) SetEncrypted(v bool) *FileSystemDescription {
+ s.Encrypted = &v
+ return s
+}
+
+// SetFileSystemArn sets the FileSystemArn field's value.
+func (s *FileSystemDescription) SetFileSystemArn(v string) *FileSystemDescription {
+ s.FileSystemArn = &v
+ return s
+}
+
+// SetFileSystemId sets the FileSystemId field's value.
+func (s *FileSystemDescription) SetFileSystemId(v string) *FileSystemDescription {
+ s.FileSystemId = &v
+ return s
+}
+
+// SetKmsKeyId sets the KmsKeyId field's value.
+func (s *FileSystemDescription) SetKmsKeyId(v string) *FileSystemDescription {
+ s.KmsKeyId = &v
+ return s
+}
+
+// SetLifeCycleState sets the LifeCycleState field's value.
+func (s *FileSystemDescription) SetLifeCycleState(v string) *FileSystemDescription {
+ s.LifeCycleState = &v
+ return s
+}
+
+// SetName sets the Name field's value.
+func (s *FileSystemDescription) SetName(v string) *FileSystemDescription {
+ s.Name = &v
+ return s
+}
+
+// SetNumberOfMountTargets sets the NumberOfMountTargets field's value.
+func (s *FileSystemDescription) SetNumberOfMountTargets(v int64) *FileSystemDescription {
+ s.NumberOfMountTargets = &v
+ return s
+}
+
+// SetOwnerId sets the OwnerId field's value.
+func (s *FileSystemDescription) SetOwnerId(v string) *FileSystemDescription {
+ s.OwnerId = &v
+ return s
+}
+
+// SetPerformanceMode sets the PerformanceMode field's value.
+func (s *FileSystemDescription) SetPerformanceMode(v string) *FileSystemDescription {
+ s.PerformanceMode = &v
+ return s
+}
+
+// SetProvisionedThroughputInMibps sets the ProvisionedThroughputInMibps field's value.
+func (s *FileSystemDescription) SetProvisionedThroughputInMibps(v float64) *FileSystemDescription {
+ s.ProvisionedThroughputInMibps = &v
+ return s
+}
+
+// SetSizeInBytes sets the SizeInBytes field's value.
+func (s *FileSystemDescription) SetSizeInBytes(v *FileSystemSize) *FileSystemDescription {
+ s.SizeInBytes = v
+ return s
+}
+
+// SetTags sets the Tags field's value.
+func (s *FileSystemDescription) SetTags(v []*Tag) *FileSystemDescription {
+ s.Tags = v
+ return s
+}
+
+// SetThroughputMode sets the ThroughputMode field's value.
+func (s *FileSystemDescription) SetThroughputMode(v string) *FileSystemDescription {
+ s.ThroughputMode = &v
+ return s
+}
+
+// Returned if a file system has mount targets.
+type FileSystemInUse struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ // ErrorCode is a required field
+ ErrorCode *string `min:"1" type:"string" required:"true"`
+
+ Message_ *string `locationName:"Message" type:"string"`
+}
+
+// String returns the string representation
+func (s FileSystemInUse) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s FileSystemInUse) GoString() string {
+ return s.String()
+}
+
+func newErrorFileSystemInUse(v protocol.ResponseMetadata) error {
+ return &FileSystemInUse{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *FileSystemInUse) Code() string {
+ return "FileSystemInUse"
+}
+
+// Message returns the exception's message.
+func (s *FileSystemInUse) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *FileSystemInUse) OrigErr() error {
+ return nil
+}
+
+func (s *FileSystemInUse) Error() string {
+ return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *FileSystemInUse) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *FileSystemInUse) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
+// Returned if the AWS account has already created the maximum number of file
+// systems allowed per account.
+type FileSystemLimitExceeded struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ // ErrorCode is a required field
+ ErrorCode *string `min:"1" type:"string" required:"true"`
+
+ Message_ *string `locationName:"Message" type:"string"`
+}
+
+// String returns the string representation
+func (s FileSystemLimitExceeded) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s FileSystemLimitExceeded) GoString() string {
+ return s.String()
+}
+
+func newErrorFileSystemLimitExceeded(v protocol.ResponseMetadata) error {
+ return &FileSystemLimitExceeded{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *FileSystemLimitExceeded) Code() string {
+ return "FileSystemLimitExceeded"
+}
+
+// Message returns the exception's message.
+func (s *FileSystemLimitExceeded) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *FileSystemLimitExceeded) OrigErr() error {
+ return nil
+}
+
+func (s *FileSystemLimitExceeded) Error() string {
+ return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *FileSystemLimitExceeded) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *FileSystemLimitExceeded) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
+// Returned if the specified FileSystemId value doesn't exist in the requester's
+// AWS account.
+type FileSystemNotFound struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ // ErrorCode is a required field
+ ErrorCode *string `min:"1" type:"string" required:"true"`
+
+ Message_ *string `locationName:"Message" type:"string"`
+}
+
+// String returns the string representation
+func (s FileSystemNotFound) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s FileSystemNotFound) GoString() string {
+ return s.String()
+}
+
+func newErrorFileSystemNotFound(v protocol.ResponseMetadata) error {
+ return &FileSystemNotFound{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *FileSystemNotFound) Code() string {
+ return "FileSystemNotFound"
+}
+
+// Message returns the exception's message.
+func (s *FileSystemNotFound) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *FileSystemNotFound) OrigErr() error {
+ return nil
+}
+
+func (s *FileSystemNotFound) Error() string {
+ return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *FileSystemNotFound) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *FileSystemNotFound) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
+// The latest known metered size (in bytes) of data stored in the file system,
+// in its Value field, and the time at which that size was determined in its
+// Timestamp field. The value doesn't represent the size of a consistent snapshot
+// of the file system, but it is eventually consistent when there are no writes
+// to the file system. That is, the value represents the actual size only if
+// the file system is not modified for a period longer than a couple of hours.
+// Otherwise, the value is not necessarily the exact size the file system was
+// at any instant in time.
+type FileSystemSize struct {
+ _ struct{} `type:"structure"`
+
+ // The time at which the size of data, returned in the Value field, was determined.
+ // The value is the integer number of seconds since 1970-01-01T00:00:00Z.
+ Timestamp *time.Time `type:"timestamp"`
+
+ // The latest known metered size (in bytes) of data stored in the file system.
+ //
+ // Value is a required field
+ Value *int64 `type:"long" required:"true"`
+
+ // The latest known metered size (in bytes) of data stored in the Infrequent
+ // Access storage class.
+ ValueInIA *int64 `type:"long"`
+
+ // The latest known metered size (in bytes) of data stored in the Standard storage
+ // class.
+ ValueInStandard *int64 `type:"long"`
+}
+
+// String returns the string representation
+func (s FileSystemSize) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s FileSystemSize) GoString() string {
+ return s.String()
+}
+
+// SetTimestamp sets the Timestamp field's value.
+func (s *FileSystemSize) SetTimestamp(v time.Time) *FileSystemSize {
+ s.Timestamp = &v
+ return s
+}
+
+// SetValue sets the Value field's value.
+func (s *FileSystemSize) SetValue(v int64) *FileSystemSize {
+ s.Value = &v
+ return s
+}
+
+// SetValueInIA sets the ValueInIA field's value.
+func (s *FileSystemSize) SetValueInIA(v int64) *FileSystemSize {
+ s.ValueInIA = &v
+ return s
+}
+
+// SetValueInStandard sets the ValueInStandard field's value.
+func (s *FileSystemSize) SetValueInStandard(v int64) *FileSystemSize {
+ s.ValueInStandard = &v
+ return s
+}
+
+// Returned if the file system's lifecycle state is not "available".
+type IncorrectFileSystemLifeCycleState struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ // ErrorCode is a required field
+ ErrorCode *string `min:"1" type:"string" required:"true"`
+
+ Message_ *string `locationName:"Message" type:"string"`
+}
+
+// String returns the string representation
+func (s IncorrectFileSystemLifeCycleState) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s IncorrectFileSystemLifeCycleState) GoString() string {
+ return s.String()
+}
+
+func newErrorIncorrectFileSystemLifeCycleState(v protocol.ResponseMetadata) error {
+ return &IncorrectFileSystemLifeCycleState{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *IncorrectFileSystemLifeCycleState) Code() string {
+ return "IncorrectFileSystemLifeCycleState"
+}
+
+// Message returns the exception's message.
+func (s *IncorrectFileSystemLifeCycleState) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *IncorrectFileSystemLifeCycleState) OrigErr() error {
+ return nil
+}
+
+func (s *IncorrectFileSystemLifeCycleState) Error() string {
+ return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *IncorrectFileSystemLifeCycleState) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *IncorrectFileSystemLifeCycleState) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
+// Returned if the mount target is not in the correct state for the operation.
+type IncorrectMountTargetState struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ // ErrorCode is a required field
+ ErrorCode *string `min:"1" type:"string" required:"true"`
+
+ Message_ *string `locationName:"Message" type:"string"`
+}
+
+// String returns the string representation
+func (s IncorrectMountTargetState) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s IncorrectMountTargetState) GoString() string {
+ return s.String()
+}
+
+func newErrorIncorrectMountTargetState(v protocol.ResponseMetadata) error {
+ return &IncorrectMountTargetState{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *IncorrectMountTargetState) Code() string {
+ return "IncorrectMountTargetState"
+}
+
+// Message returns the exception's message.
+func (s *IncorrectMountTargetState) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *IncorrectMountTargetState) OrigErr() error {
+ return nil
+}
+
+func (s *IncorrectMountTargetState) Error() string {
+ return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *IncorrectMountTargetState) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *IncorrectMountTargetState) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
+// Returned if there's not enough capacity to provision additional throughput.
+// This value might be returned when you try to create a file system in provisioned
+// throughput mode, when you attempt to increase the provisioned throughput
+// of an existing file system, or when you attempt to change an existing file
+// system from bursting to provisioned throughput mode. Try again later.
+type InsufficientThroughputCapacity struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ // ErrorCode is a required field
+ ErrorCode *string `min:"1" type:"string" required:"true"`
+
+ Message_ *string `locationName:"Message" type:"string"`
+}
+
+// String returns the string representation
+func (s InsufficientThroughputCapacity) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s InsufficientThroughputCapacity) GoString() string {
+ return s.String()
+}
+
+func newErrorInsufficientThroughputCapacity(v protocol.ResponseMetadata) error {
+ return &InsufficientThroughputCapacity{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *InsufficientThroughputCapacity) Code() string {
+ return "InsufficientThroughputCapacity"
+}
+
+// Message returns the exception's message.
+func (s *InsufficientThroughputCapacity) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *InsufficientThroughputCapacity) OrigErr() error {
+ return nil
+}
+
+func (s *InsufficientThroughputCapacity) Error() string {
+ return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *InsufficientThroughputCapacity) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *InsufficientThroughputCapacity) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
+// Returned if an error occurred on the server side.
+type InternalServerError struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ // ErrorCode is a required field
+ ErrorCode *string `min:"1" type:"string" required:"true"`
+
+ Message_ *string `locationName:"Message" type:"string"`
+}
+
+// String returns the string representation
+func (s InternalServerError) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s InternalServerError) GoString() string {
+ return s.String()
+}
+
+func newErrorInternalServerError(v protocol.ResponseMetadata) error {
+ return &InternalServerError{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *InternalServerError) Code() string {
+ return "InternalServerError"
+}
+
+// Message returns the exception's message.
+func (s *InternalServerError) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *InternalServerError) OrigErr() error {
+ return nil
+}
+
+func (s *InternalServerError) Error() string {
+ return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *InternalServerError) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *InternalServerError) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
+// Returned if the FileSystemPolicy is is malformed or contains an error such
+// as an invalid parameter value or a missing required parameter. Returned in
+// the case of a policy lockout safety check error.
+type InvalidPolicyException struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ ErrorCode *string `min:"1" type:"string"`
+
+ Message_ *string `locationName:"Message" type:"string"`
+}
+
+// String returns the string representation
+func (s InvalidPolicyException) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s InvalidPolicyException) GoString() string {
+ return s.String()
+}
+
+func newErrorInvalidPolicyException(v protocol.ResponseMetadata) error {
+ return &InvalidPolicyException{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *InvalidPolicyException) Code() string {
+ return "InvalidPolicyException"
+}
+
+// Message returns the exception's message.
+func (s *InvalidPolicyException) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *InvalidPolicyException) OrigErr() error {
+ return nil
+}
+
+func (s *InvalidPolicyException) Error() string {
+ return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *InvalidPolicyException) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *InvalidPolicyException) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
+// Returned if the request specified an IpAddress that is already in use in
+// the subnet.
+type IpAddressInUse struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ // ErrorCode is a required field
+ ErrorCode *string `min:"1" type:"string" required:"true"`
+
+ Message_ *string `locationName:"Message" type:"string"`
+}
+
+// String returns the string representation
+func (s IpAddressInUse) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s IpAddressInUse) GoString() string {
+ return s.String()
+}
+
+func newErrorIpAddressInUse(v protocol.ResponseMetadata) error {
+ return &IpAddressInUse{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *IpAddressInUse) Code() string {
+ return "IpAddressInUse"
+}
+
+// Message returns the exception's message.
+func (s *IpAddressInUse) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *IpAddressInUse) OrigErr() error {
+ return nil
+}
+
+func (s *IpAddressInUse) Error() string {
+ return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *IpAddressInUse) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *IpAddressInUse) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
+// Describes a policy used by EFS lifecycle management to transition files to
+// the Infrequent Access (IA) storage class.
+type LifecyclePolicy struct {
+ _ struct{} `type:"structure"`
+
+ // A value that describes the period of time that a file is not accessed, after
+ // which it transitions to the IA storage class. Metadata operations such as
+ // listing the contents of a directory don't count as file access events.
+ TransitionToIA *string `type:"string" enum:"TransitionToIARules"`
+}
+
+// String returns the string representation
+func (s LifecyclePolicy) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s LifecyclePolicy) GoString() string {
+ return s.String()
+}
+
+// SetTransitionToIA sets the TransitionToIA field's value.
+func (s *LifecyclePolicy) SetTransitionToIA(v string) *LifecyclePolicy {
+ s.TransitionToIA = &v
+ return s
+}
+
+type ListTagsForResourceInput struct {
+ _ struct{} `type:"structure"`
+
+ // (Optional) Specifies the maximum number of tag objects to return in the response.
+ // The default value is 100.
+ MaxResults *int64 `location:"querystring" locationName:"MaxResults" min:"1" type:"integer"`
+
+ // You can use NextToken in a subsequent request to fetch the next page of access
+ // point descriptions if the response payload was paginated.
+ NextToken *string `location:"querystring" locationName:"NextToken" min:"1" type:"string"`
+
+ // Specifies the EFS resource you want to retrieve tags for. You can retrieve
+ // tags for EFS file systems and access points using this API endpoint.
+ //
+ // ResourceId is a required field
+ ResourceId *string `location:"uri" locationName:"ResourceId" type:"string" required:"true"`
+}
+
+// String returns the string representation
+func (s ListTagsForResourceInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ListTagsForResourceInput) GoString() string {
+ return s.String()
+}
+
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *ListTagsForResourceInput) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "ListTagsForResourceInput"}
+ if s.MaxResults != nil && *s.MaxResults < 1 {
+ invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
+ }
+ if s.NextToken != nil && len(*s.NextToken) < 1 {
+ invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
+ }
+ if s.ResourceId == nil {
+ invalidParams.Add(request.NewErrParamRequired("ResourceId"))
+ }
+ if s.ResourceId != nil && len(*s.ResourceId) < 1 {
+ invalidParams.Add(request.NewErrParamMinLen("ResourceId", 1))
+ }
+
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ }
+ return nil
+}
+
+// SetMaxResults sets the MaxResults field's value.
+func (s *ListTagsForResourceInput) SetMaxResults(v int64) *ListTagsForResourceInput {
+ s.MaxResults = &v
+ return s
+}
+
+// SetNextToken sets the NextToken field's value.
+func (s *ListTagsForResourceInput) SetNextToken(v string) *ListTagsForResourceInput {
+ s.NextToken = &v
+ return s
+}
+
+// SetResourceId sets the ResourceId field's value.
+func (s *ListTagsForResourceInput) SetResourceId(v string) *ListTagsForResourceInput {
+ s.ResourceId = &v
+ return s
+}
+
+type ListTagsForResourceOutput struct {
+ _ struct{} `type:"structure"`
+
+ // NextToken is present if the response payload is paginated. You can use NextToken
+ // in a subsequent request to fetch the next page of access point descriptions.
+ NextToken *string `min:"1" type:"string"`
+
+ // An array of the tags for the specified EFS resource.
+ Tags []*Tag `type:"list"`
+}
+
+// String returns the string representation
+func (s ListTagsForResourceOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ListTagsForResourceOutput) GoString() string {
+ return s.String()
+}
+
+// SetNextToken sets the NextToken field's value.
+func (s *ListTagsForResourceOutput) SetNextToken(v string) *ListTagsForResourceOutput {
+ s.NextToken = &v
+ return s
+}
+
+// SetTags sets the Tags field's value.
+func (s *ListTagsForResourceOutput) SetTags(v []*Tag) *ListTagsForResourceOutput {
+ s.Tags = v
+ return s
+}
+
+type ModifyMountTargetSecurityGroupsInput struct {
+ _ struct{} `type:"structure"`
+
+ // The ID of the mount target whose security groups you want to modify.
+ //
+ // MountTargetId is a required field
+ MountTargetId *string `location:"uri" locationName:"MountTargetId" min:"13" type:"string" required:"true"`
+
+ // An array of up to five VPC security group IDs.
+ SecurityGroups []*string `type:"list"`
+}
+
+// String returns the string representation
+func (s ModifyMountTargetSecurityGroupsInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ModifyMountTargetSecurityGroupsInput) GoString() string {
+ return s.String()
+}
+
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *ModifyMountTargetSecurityGroupsInput) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "ModifyMountTargetSecurityGroupsInput"}
+ if s.MountTargetId == nil {
+ invalidParams.Add(request.NewErrParamRequired("MountTargetId"))
+ }
+ if s.MountTargetId != nil && len(*s.MountTargetId) < 13 {
+ invalidParams.Add(request.NewErrParamMinLen("MountTargetId", 13))
+ }
+
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ }
+ return nil
+}
+
+// SetMountTargetId sets the MountTargetId field's value.
+func (s *ModifyMountTargetSecurityGroupsInput) SetMountTargetId(v string) *ModifyMountTargetSecurityGroupsInput {
+ s.MountTargetId = &v
+ return s
+}
+
+// SetSecurityGroups sets the SecurityGroups field's value.
+func (s *ModifyMountTargetSecurityGroupsInput) SetSecurityGroups(v []*string) *ModifyMountTargetSecurityGroupsInput {
+ s.SecurityGroups = v
+ return s
+}
+
+type ModifyMountTargetSecurityGroupsOutput struct {
+ _ struct{} `type:"structure"`
+}
+
+// String returns the string representation
+func (s ModifyMountTargetSecurityGroupsOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ModifyMountTargetSecurityGroupsOutput) GoString() string {
+ return s.String()
+}
+
+// Returned if the mount target would violate one of the specified restrictions
+// based on the file system's existing mount targets.
+type MountTargetConflict struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ // ErrorCode is a required field
+ ErrorCode *string `min:"1" type:"string" required:"true"`
+
+ Message_ *string `locationName:"Message" type:"string"`
+}
+
+// String returns the string representation
+func (s MountTargetConflict) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s MountTargetConflict) GoString() string {
+ return s.String()
+}
+
+func newErrorMountTargetConflict(v protocol.ResponseMetadata) error {
+ return &MountTargetConflict{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *MountTargetConflict) Code() string {
+ return "MountTargetConflict"
+}
+
+// Message returns the exception's message.
+func (s *MountTargetConflict) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *MountTargetConflict) OrigErr() error {
+ return nil
+}
+
+func (s *MountTargetConflict) Error() string {
+ return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *MountTargetConflict) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *MountTargetConflict) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
+// Provides a description of a mount target.
+type MountTargetDescription struct {
+ _ struct{} `type:"structure"`
+
+ // The unique and consistent identifier of the Availability Zone that the mount
+ // target resides in. For example, use1-az1 is an AZ ID for the us-east-1 Region
+ // and it has the same location in every AWS account.
+ AvailabilityZoneId *string `type:"string"`
+
+ // The name of the Availability Zone in which the mount target is located. Availability
+ // Zones are independently mapped to names for each AWS account. For example,
+ // the Availability Zone us-east-1a for your AWS account might not be the same
+ // location as us-east-1a for another AWS account.
+ AvailabilityZoneName *string `min:"1" type:"string"`
+
+ // The ID of the file system for which the mount target is intended.
+ //
+ // FileSystemId is a required field
+ FileSystemId *string `type:"string" required:"true"`
+
+ // Address at which the file system can be mounted by using the mount target.
+ IpAddress *string `min:"7" type:"string"`
+
+ // Lifecycle state of the mount target.
+ //
+ // LifeCycleState is a required field
+ LifeCycleState *string `type:"string" required:"true" enum:"LifeCycleState"`
+
+ // System-assigned mount target ID.
+ //
+ // MountTargetId is a required field
+ MountTargetId *string `min:"13" type:"string" required:"true"`
+
+ // The ID of the network interface that Amazon EFS created when it created the
+ // mount target.
+ NetworkInterfaceId *string `type:"string"`
+
+ // AWS account ID that owns the resource.
+ OwnerId *string `type:"string"`
+
+ // The ID of the mount target's subnet.
+ //
+ // SubnetId is a required field
+ SubnetId *string `min:"15" type:"string" required:"true"`
+
+ // The virtual private cloud (VPC) ID that the mount target is configured in.
+ VpcId *string `type:"string"`
+}
+
+// String returns the string representation
+func (s MountTargetDescription) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s MountTargetDescription) GoString() string {
+ return s.String()
+}
+
+// SetAvailabilityZoneId sets the AvailabilityZoneId field's value.
+func (s *MountTargetDescription) SetAvailabilityZoneId(v string) *MountTargetDescription {
+ s.AvailabilityZoneId = &v
+ return s
+}
+
+// SetAvailabilityZoneName sets the AvailabilityZoneName field's value.
+func (s *MountTargetDescription) SetAvailabilityZoneName(v string) *MountTargetDescription {
+ s.AvailabilityZoneName = &v
+ return s
+}
+
+// SetFileSystemId sets the FileSystemId field's value.
+func (s *MountTargetDescription) SetFileSystemId(v string) *MountTargetDescription {
+ s.FileSystemId = &v
+ return s
+}
+
+// SetIpAddress sets the IpAddress field's value.
+func (s *MountTargetDescription) SetIpAddress(v string) *MountTargetDescription {
+ s.IpAddress = &v
+ return s
+}
+
+// SetLifeCycleState sets the LifeCycleState field's value.
+func (s *MountTargetDescription) SetLifeCycleState(v string) *MountTargetDescription {
+ s.LifeCycleState = &v
+ return s
+}
+
+// SetMountTargetId sets the MountTargetId field's value.
+func (s *MountTargetDescription) SetMountTargetId(v string) *MountTargetDescription {
+ s.MountTargetId = &v
+ return s
+}
+
+// SetNetworkInterfaceId sets the NetworkInterfaceId field's value.
+func (s *MountTargetDescription) SetNetworkInterfaceId(v string) *MountTargetDescription {
+ s.NetworkInterfaceId = &v
+ return s
+}
+
+// SetOwnerId sets the OwnerId field's value.
+func (s *MountTargetDescription) SetOwnerId(v string) *MountTargetDescription {
+ s.OwnerId = &v
+ return s
+}
+
+// SetSubnetId sets the SubnetId field's value.
+func (s *MountTargetDescription) SetSubnetId(v string) *MountTargetDescription {
+ s.SubnetId = &v
+ return s
+}
+
+// SetVpcId sets the VpcId field's value.
+func (s *MountTargetDescription) SetVpcId(v string) *MountTargetDescription {
+ s.VpcId = &v
+ return s
+}
+
+// Returned if there is no mount target with the specified ID found in the caller's
+// account.
+type MountTargetNotFound struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ // ErrorCode is a required field
+ ErrorCode *string `min:"1" type:"string" required:"true"`
+
+ Message_ *string `locationName:"Message" type:"string"`
+}
+
+// String returns the string representation
+func (s MountTargetNotFound) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s MountTargetNotFound) GoString() string {
+ return s.String()
+}
+
+func newErrorMountTargetNotFound(v protocol.ResponseMetadata) error {
+ return &MountTargetNotFound{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *MountTargetNotFound) Code() string {
+ return "MountTargetNotFound"
+}
+
+// Message returns the exception's message.
+func (s *MountTargetNotFound) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *MountTargetNotFound) OrigErr() error {
+ return nil
+}
+
+func (s *MountTargetNotFound) Error() string {
+ return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *MountTargetNotFound) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *MountTargetNotFound) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
+// The calling account has reached the limit for elastic network interfaces
+// for the specific AWS Region. The client should try to delete some elastic
+// network interfaces or get the account limit raised. For more information,
+// see Amazon VPC Limits (https://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Appendix_Limits.html)
+// in the Amazon VPC User Guide (see the Network interfaces per VPC entry in
+// the table).
+type NetworkInterfaceLimitExceeded struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ // ErrorCode is a required field
+ ErrorCode *string `min:"1" type:"string" required:"true"`
+
+ Message_ *string `locationName:"Message" type:"string"`
+}
+
+// String returns the string representation
+func (s NetworkInterfaceLimitExceeded) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s NetworkInterfaceLimitExceeded) GoString() string {
+ return s.String()
+}
+
+func newErrorNetworkInterfaceLimitExceeded(v protocol.ResponseMetadata) error {
+ return &NetworkInterfaceLimitExceeded{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *NetworkInterfaceLimitExceeded) Code() string {
+ return "NetworkInterfaceLimitExceeded"
+}
+
+// Message returns the exception's message.
+func (s *NetworkInterfaceLimitExceeded) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *NetworkInterfaceLimitExceeded) OrigErr() error {
+ return nil
+}
+
+func (s *NetworkInterfaceLimitExceeded) Error() string {
+ return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *NetworkInterfaceLimitExceeded) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *NetworkInterfaceLimitExceeded) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
+// Returned if IpAddress was not specified in the request and there are no free
+// IP addresses in the subnet.
+type NoFreeAddressesInSubnet struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ // ErrorCode is a required field
+ ErrorCode *string `min:"1" type:"string" required:"true"`
+
+ Message_ *string `locationName:"Message" type:"string"`
+}
+
+// String returns the string representation
+func (s NoFreeAddressesInSubnet) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s NoFreeAddressesInSubnet) GoString() string {
+ return s.String()
+}
+
+func newErrorNoFreeAddressesInSubnet(v protocol.ResponseMetadata) error {
+ return &NoFreeAddressesInSubnet{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *NoFreeAddressesInSubnet) Code() string {
+ return "NoFreeAddressesInSubnet"
+}
+
+// Message returns the exception's message.
+func (s *NoFreeAddressesInSubnet) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *NoFreeAddressesInSubnet) OrigErr() error {
+ return nil
+}
+
+func (s *NoFreeAddressesInSubnet) Error() string {
+ return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *NoFreeAddressesInSubnet) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *NoFreeAddressesInSubnet) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
+// Returned if the default file system policy is in effect for the EFS file
+// system specified.
+type PolicyNotFound struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ ErrorCode *string `min:"1" type:"string"`
+
+ Message_ *string `locationName:"Message" type:"string"`
+}
+
+// String returns the string representation
+func (s PolicyNotFound) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s PolicyNotFound) GoString() string {
+ return s.String()
+}
+
+func newErrorPolicyNotFound(v protocol.ResponseMetadata) error {
+ return &PolicyNotFound{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *PolicyNotFound) Code() string {
+ return "PolicyNotFound"
+}
+
+// Message returns the exception's message.
+func (s *PolicyNotFound) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *PolicyNotFound) OrigErr() error {
+ return nil
+}
+
+func (s *PolicyNotFound) Error() string {
+ return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *PolicyNotFound) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *PolicyNotFound) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
+// The full POSIX identity, including the user ID, group ID, and any secondary
+// group IDs, on the access point that is used for all file system operations
+// performed by NFS clients using the access point.
+type PosixUser struct {
+ _ struct{} `type:"structure"`
+
+ // The POSIX group ID used for all file system operations using this access
+ // point.
+ //
+ // Gid is a required field
+ Gid *int64 `type:"long" required:"true"`
+
+ // Secondary POSIX group IDs used for all file system operations using this
+ // access point.
+ SecondaryGids []*int64 `type:"list"`
+
+ // The POSIX user ID used for all file system operations using this access point.
+ //
+ // Uid is a required field
+ Uid *int64 `type:"long" required:"true"`
+}
+
+// String returns the string representation
+func (s PosixUser) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s PosixUser) GoString() string {
+ return s.String()
+}
+
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *PosixUser) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "PosixUser"}
+ if s.Gid == nil {
+ invalidParams.Add(request.NewErrParamRequired("Gid"))
+ }
+ if s.Uid == nil {
+ invalidParams.Add(request.NewErrParamRequired("Uid"))
+ }
+
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ }
+ return nil
+}
+
+// SetGid sets the Gid field's value.
+func (s *PosixUser) SetGid(v int64) *PosixUser {
+ s.Gid = &v
+ return s
+}
+
+// SetSecondaryGids sets the SecondaryGids field's value.
+func (s *PosixUser) SetSecondaryGids(v []*int64) *PosixUser {
+ s.SecondaryGids = v
+ return s
+}
+
+// SetUid sets the Uid field's value.
+func (s *PosixUser) SetUid(v int64) *PosixUser {
+ s.Uid = &v
+ return s
+}
+
+type PutBackupPolicyInput struct {
+ _ struct{} `type:"structure"`
+
+ // The backup policy included in the PutBackupPolicy request.
+ //
+ // BackupPolicy is a required field
+ BackupPolicy *BackupPolicy `type:"structure" required:"true"`
+
+ // Specifies which EFS file system to update the backup policy for.
+ //
+ // FileSystemId is a required field
+ FileSystemId *string `location:"uri" locationName:"FileSystemId" type:"string" required:"true"`
+}
+
+// String returns the string representation
+func (s PutBackupPolicyInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s PutBackupPolicyInput) GoString() string {
+ return s.String()
+}
+
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *PutBackupPolicyInput) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "PutBackupPolicyInput"}
+ if s.BackupPolicy == nil {
+ invalidParams.Add(request.NewErrParamRequired("BackupPolicy"))
+ }
+ if s.FileSystemId == nil {
+ invalidParams.Add(request.NewErrParamRequired("FileSystemId"))
+ }
+ if s.FileSystemId != nil && len(*s.FileSystemId) < 1 {
+ invalidParams.Add(request.NewErrParamMinLen("FileSystemId", 1))
+ }
+ if s.BackupPolicy != nil {
+ if err := s.BackupPolicy.Validate(); err != nil {
+ invalidParams.AddNested("BackupPolicy", err.(request.ErrInvalidParams))
+ }
+ }
+
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ }
+ return nil
+}
+
+// SetBackupPolicy sets the BackupPolicy field's value.
+func (s *PutBackupPolicyInput) SetBackupPolicy(v *BackupPolicy) *PutBackupPolicyInput {
+ s.BackupPolicy = v
+ return s
+}
+
+// SetFileSystemId sets the FileSystemId field's value.
+func (s *PutBackupPolicyInput) SetFileSystemId(v string) *PutBackupPolicyInput {
+ s.FileSystemId = &v
+ return s
+}
+
+type PutBackupPolicyOutput struct {
+ _ struct{} `type:"structure"`
+
+ // Describes the file system's backup policy, indicating whether automatic backups
+ // are turned on or off..
+ BackupPolicy *BackupPolicy `type:"structure"`
+}
+
+// String returns the string representation
+func (s PutBackupPolicyOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s PutBackupPolicyOutput) GoString() string {
+ return s.String()
+}
+
+// SetBackupPolicy sets the BackupPolicy field's value.
+func (s *PutBackupPolicyOutput) SetBackupPolicy(v *BackupPolicy) *PutBackupPolicyOutput {
+ s.BackupPolicy = v
+ return s
+}
+
+type PutFileSystemPolicyInput struct {
+ _ struct{} `type:"structure"`
+
+ // (Optional) A flag to indicate whether to bypass the FileSystemPolicy lockout
+ // safety check. The policy lockout safety check determines whether the policy
+ // in the request will prevent the principal making the request will be locked
+ // out from making future PutFileSystemPolicy requests on the file system. Set
+ // BypassPolicyLockoutSafetyCheck to True only when you intend to prevent the
+ // principal that is making the request from making a subsequent PutFileSystemPolicy
+ // request on the file system. The default value is False.
+ BypassPolicyLockoutSafetyCheck *bool `type:"boolean"`
+
+ // The ID of the EFS file system that you want to create or update the FileSystemPolicy
+ // for.
+ //
+ // FileSystemId is a required field
+ FileSystemId *string `location:"uri" locationName:"FileSystemId" type:"string" required:"true"`
+
+ // The FileSystemPolicy that you're creating. Accepts a JSON formatted policy
+ // definition. EFS file system policies have a 20,000 character limit. To find
+ // out more about the elements that make up a file system policy, see EFS Resource-based
+ // Policies (https://docs.aws.amazon.com/efs/latest/ug/access-control-overview.html#access-control-manage-access-intro-resource-policies).
+ //
+ // Policy is a required field
+ Policy *string `min:"1" type:"string" required:"true"`
+}
+
+// String returns the string representation
+func (s PutFileSystemPolicyInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s PutFileSystemPolicyInput) GoString() string {
+ return s.String()
+}
+
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *PutFileSystemPolicyInput) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "PutFileSystemPolicyInput"}
+ if s.FileSystemId == nil {
+ invalidParams.Add(request.NewErrParamRequired("FileSystemId"))
+ }
+ if s.FileSystemId != nil && len(*s.FileSystemId) < 1 {
+ invalidParams.Add(request.NewErrParamMinLen("FileSystemId", 1))
+ }
+ if s.Policy == nil {
+ invalidParams.Add(request.NewErrParamRequired("Policy"))
+ }
+ if s.Policy != nil && len(*s.Policy) < 1 {
+ invalidParams.Add(request.NewErrParamMinLen("Policy", 1))
+ }
+
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ }
+ return nil
+}
+
+// SetBypassPolicyLockoutSafetyCheck sets the BypassPolicyLockoutSafetyCheck field's value.
+func (s *PutFileSystemPolicyInput) SetBypassPolicyLockoutSafetyCheck(v bool) *PutFileSystemPolicyInput {
+ s.BypassPolicyLockoutSafetyCheck = &v
+ return s
+}
+
+// SetFileSystemId sets the FileSystemId field's value.
+func (s *PutFileSystemPolicyInput) SetFileSystemId(v string) *PutFileSystemPolicyInput {
+ s.FileSystemId = &v
+ return s
+}
+
+// SetPolicy sets the Policy field's value.
+func (s *PutFileSystemPolicyInput) SetPolicy(v string) *PutFileSystemPolicyInput {
+ s.Policy = &v
+ return s
+}
+
+type PutFileSystemPolicyOutput struct {
+ _ struct{} `type:"structure"`
+
+ // Specifies the EFS file system to which the FileSystemPolicy applies.
+ FileSystemId *string `type:"string"`
+
+ // The JSON formatted FileSystemPolicy for the EFS file system.
+ Policy *string `min:"1" type:"string"`
+}
+
+// String returns the string representation
+func (s PutFileSystemPolicyOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s PutFileSystemPolicyOutput) GoString() string {
+ return s.String()
+}
+
+// SetFileSystemId sets the FileSystemId field's value.
+func (s *PutFileSystemPolicyOutput) SetFileSystemId(v string) *PutFileSystemPolicyOutput {
+ s.FileSystemId = &v
+ return s
+}
+
+// SetPolicy sets the Policy field's value.
+func (s *PutFileSystemPolicyOutput) SetPolicy(v string) *PutFileSystemPolicyOutput {
+ s.Policy = &v
+ return s
+}
+
+type PutLifecycleConfigurationInput struct {
+ _ struct{} `type:"structure"`
+
+ // The ID of the file system for which you are creating the LifecycleConfiguration
+ // object (String).
+ //
+ // FileSystemId is a required field
+ FileSystemId *string `location:"uri" locationName:"FileSystemId" type:"string" required:"true"`
+
+ // An array of LifecyclePolicy objects that define the file system's LifecycleConfiguration
+ // object. A LifecycleConfiguration object tells lifecycle management when to
+ // transition files from the Standard storage class to the Infrequent Access
+ // storage class.
+ //
+ // LifecyclePolicies is a required field
+ LifecyclePolicies []*LifecyclePolicy `type:"list" required:"true"`
+}
+
+// String returns the string representation
+func (s PutLifecycleConfigurationInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s PutLifecycleConfigurationInput) GoString() string {
+ return s.String()
+}
+
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *PutLifecycleConfigurationInput) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "PutLifecycleConfigurationInput"}
+ if s.FileSystemId == nil {
+ invalidParams.Add(request.NewErrParamRequired("FileSystemId"))
+ }
+ if s.FileSystemId != nil && len(*s.FileSystemId) < 1 {
+ invalidParams.Add(request.NewErrParamMinLen("FileSystemId", 1))
+ }
+ if s.LifecyclePolicies == nil {
+ invalidParams.Add(request.NewErrParamRequired("LifecyclePolicies"))
+ }
+
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ }
+ return nil
+}
+
+// SetFileSystemId sets the FileSystemId field's value.
+func (s *PutLifecycleConfigurationInput) SetFileSystemId(v string) *PutLifecycleConfigurationInput {
+ s.FileSystemId = &v
+ return s
+}
+
+// SetLifecyclePolicies sets the LifecyclePolicies field's value.
+func (s *PutLifecycleConfigurationInput) SetLifecyclePolicies(v []*LifecyclePolicy) *PutLifecycleConfigurationInput {
+ s.LifecyclePolicies = v
+ return s
+}
+
+type PutLifecycleConfigurationOutput struct {
+ _ struct{} `type:"structure"`
+
+ // An array of lifecycle management policies. Currently, EFS supports a maximum
+ // of one policy per file system.
+ LifecyclePolicies []*LifecyclePolicy `type:"list"`
+}
+
+// String returns the string representation
+func (s PutLifecycleConfigurationOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s PutLifecycleConfigurationOutput) GoString() string {
+ return s.String()
+}
+
+// SetLifecyclePolicies sets the LifecyclePolicies field's value.
+func (s *PutLifecycleConfigurationOutput) SetLifecyclePolicies(v []*LifecyclePolicy) *PutLifecycleConfigurationOutput {
+ s.LifecyclePolicies = v
+ return s
+}
+
+// Specifies the directory on the Amazon EFS file system that the access point
+// provides access to. The access point exposes the specified file system path
+// as the root directory of your file system to applications using the access
+// point. NFS clients using the access point can only access data in the access
+// point's RootDirectory and it's subdirectories.
+type RootDirectory struct {
+ _ struct{} `type:"structure"`
+
+ // (Optional) Specifies the POSIX IDs and permissions to apply to the access
+ // point's RootDirectory. If the RootDirectory > Path specified does not exist,
+ // EFS creates the root directory using the CreationInfo settings when a client
+ // connects to an access point. When specifying the CreationInfo, you must provide
+ // values for all properties.
+ //
+ // If you do not provide CreationInfo and the specified RootDirectory > Path
+ // does not exist, attempts to mount the file system using the access point
+ // will fail.
+ CreationInfo *CreationInfo `type:"structure"`
+
+ // Specifies the path on the EFS file system to expose as the root directory
+ // to NFS clients using the access point to access the EFS file system. A path
+ // can have up to four subdirectories. If the specified path does not exist,
+ // you are required to provide the CreationInfo.
+ Path *string `min:"1" type:"string"`
+}
+
+// String returns the string representation
+func (s RootDirectory) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s RootDirectory) GoString() string {
+ return s.String()
+}
+
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *RootDirectory) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "RootDirectory"}
+ if s.Path != nil && len(*s.Path) < 1 {
+ invalidParams.Add(request.NewErrParamMinLen("Path", 1))
+ }
+ if s.CreationInfo != nil {
+ if err := s.CreationInfo.Validate(); err != nil {
+ invalidParams.AddNested("CreationInfo", err.(request.ErrInvalidParams))
+ }
+ }
+
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ }
+ return nil
+}
+
+// SetCreationInfo sets the CreationInfo field's value.
+func (s *RootDirectory) SetCreationInfo(v *CreationInfo) *RootDirectory {
+ s.CreationInfo = v
+ return s
+}
+
+// SetPath sets the Path field's value.
+func (s *RootDirectory) SetPath(v string) *RootDirectory {
+ s.Path = &v
+ return s
+}
+
+// Returned if the size of SecurityGroups specified in the request is greater
+// than five.
+type SecurityGroupLimitExceeded struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ // ErrorCode is a required field
+ ErrorCode *string `min:"1" type:"string" required:"true"`
+
+ Message_ *string `locationName:"Message" type:"string"`
+}
+
+// String returns the string representation
+func (s SecurityGroupLimitExceeded) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s SecurityGroupLimitExceeded) GoString() string {
+ return s.String()
+}
+
+func newErrorSecurityGroupLimitExceeded(v protocol.ResponseMetadata) error {
+ return &SecurityGroupLimitExceeded{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *SecurityGroupLimitExceeded) Code() string {
+ return "SecurityGroupLimitExceeded"
+}
+
+// Message returns the exception's message.
+func (s *SecurityGroupLimitExceeded) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *SecurityGroupLimitExceeded) OrigErr() error {
+ return nil
+}
+
+func (s *SecurityGroupLimitExceeded) Error() string {
+ return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *SecurityGroupLimitExceeded) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *SecurityGroupLimitExceeded) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
+// Returned if one of the specified security groups doesn't exist in the subnet's
+// VPC.
+type SecurityGroupNotFound struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ // ErrorCode is a required field
+ ErrorCode *string `min:"1" type:"string" required:"true"`
+
+ Message_ *string `locationName:"Message" type:"string"`
+}
+
+// String returns the string representation
+func (s SecurityGroupNotFound) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s SecurityGroupNotFound) GoString() string {
+ return s.String()
+}
+
+func newErrorSecurityGroupNotFound(v protocol.ResponseMetadata) error {
+ return &SecurityGroupNotFound{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *SecurityGroupNotFound) Code() string {
+ return "SecurityGroupNotFound"
+}
+
+// Message returns the exception's message.
+func (s *SecurityGroupNotFound) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *SecurityGroupNotFound) OrigErr() error {
+ return nil
+}
+
+func (s *SecurityGroupNotFound) Error() string {
+ return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *SecurityGroupNotFound) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *SecurityGroupNotFound) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
+// Returned if there is no subnet with ID SubnetId provided in the request.
+type SubnetNotFound struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ // ErrorCode is a required field
+ ErrorCode *string `min:"1" type:"string" required:"true"`
+
+ Message_ *string `locationName:"Message" type:"string"`
+}
+
+// String returns the string representation
+func (s SubnetNotFound) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s SubnetNotFound) GoString() string {
+ return s.String()
+}
+
+func newErrorSubnetNotFound(v protocol.ResponseMetadata) error {
+ return &SubnetNotFound{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *SubnetNotFound) Code() string {
+ return "SubnetNotFound"
+}
+
+// Message returns the exception's message.
+func (s *SubnetNotFound) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *SubnetNotFound) OrigErr() error {
+ return nil
+}
+
+func (s *SubnetNotFound) Error() string {
+ return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *SubnetNotFound) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *SubnetNotFound) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
+// A tag is a key-value pair. Allowed characters are letters, white space, and
+// numbers that can be represented in UTF-8, and the following characters:+
+// - = . _ : /
+type Tag struct {
+ _ struct{} `type:"structure"`
+
+ // The tag key (String). The key can't start with aws:.
+ //
+ // Key is a required field
+ Key *string `min:"1" type:"string" required:"true"`
+
+ // The value of the tag key.
+ //
+ // Value is a required field
+ Value *string `type:"string" required:"true"`
+}
+
+// String returns the string representation
+func (s Tag) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s Tag) GoString() string {
+ return s.String()
+}
+
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *Tag) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "Tag"}
+ if s.Key == nil {
+ invalidParams.Add(request.NewErrParamRequired("Key"))
+ }
+ if s.Key != nil && len(*s.Key) < 1 {
+ invalidParams.Add(request.NewErrParamMinLen("Key", 1))
+ }
+ if s.Value == nil {
+ invalidParams.Add(request.NewErrParamRequired("Value"))
+ }
+
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ }
+ return nil
+}
+
+// SetKey sets the Key field's value.
+func (s *Tag) SetKey(v string) *Tag {
+ s.Key = &v
+ return s
+}
+
+// SetValue sets the Value field's value.
+func (s *Tag) SetValue(v string) *Tag {
+ s.Value = &v
+ return s
+}
+
+type TagResourceInput struct {
+ _ struct{} `type:"structure"`
+
+ // The ID specifying the EFS resource that you want to create a tag for.
+ //
+ // ResourceId is a required field
+ ResourceId *string `location:"uri" locationName:"ResourceId" type:"string" required:"true"`
+
+ // Tags is a required field
+ Tags []*Tag `type:"list" required:"true"`
+}
+
+// String returns the string representation
+func (s TagResourceInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s TagResourceInput) GoString() string {
+ return s.String()
+}
+
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *TagResourceInput) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "TagResourceInput"}
+ if s.ResourceId == nil {
+ invalidParams.Add(request.NewErrParamRequired("ResourceId"))
+ }
+ if s.ResourceId != nil && len(*s.ResourceId) < 1 {
+ invalidParams.Add(request.NewErrParamMinLen("ResourceId", 1))
+ }
+ if s.Tags == nil {
+ invalidParams.Add(request.NewErrParamRequired("Tags"))
+ }
+ if s.Tags != nil {
+ for i, v := range s.Tags {
+ if v == nil {
+ continue
+ }
+ if err := v.Validate(); err != nil {
+ invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams))
+ }
+ }
+ }
+
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ }
+ return nil
+}
+
+// SetResourceId sets the ResourceId field's value.
+func (s *TagResourceInput) SetResourceId(v string) *TagResourceInput {
+ s.ResourceId = &v
+ return s
+}
+
+// SetTags sets the Tags field's value.
+func (s *TagResourceInput) SetTags(v []*Tag) *TagResourceInput {
+ s.Tags = v
+ return s
+}
+
+type TagResourceOutput struct {
+ _ struct{} `type:"structure"`
+}
+
+// String returns the string representation
+func (s TagResourceOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s TagResourceOutput) GoString() string {
+ return s.String()
+}
+
+// Returned if the throughput mode or amount of provisioned throughput can't
+// be changed because the throughput limit of 1024 MiB/s has been reached.
+type ThroughputLimitExceeded struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ // ErrorCode is a required field
+ ErrorCode *string `min:"1" type:"string" required:"true"`
+
+ Message_ *string `locationName:"Message" type:"string"`
+}
+
+// String returns the string representation
+func (s ThroughputLimitExceeded) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ThroughputLimitExceeded) GoString() string {
+ return s.String()
+}
+
+func newErrorThroughputLimitExceeded(v protocol.ResponseMetadata) error {
+ return &ThroughputLimitExceeded{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *ThroughputLimitExceeded) Code() string {
+ return "ThroughputLimitExceeded"
+}
+
+// Message returns the exception's message.
+func (s *ThroughputLimitExceeded) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *ThroughputLimitExceeded) OrigErr() error {
+ return nil
+}
+
+func (s *ThroughputLimitExceeded) Error() string {
+ return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *ThroughputLimitExceeded) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *ThroughputLimitExceeded) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
+// Returned if you don’t wait at least 24 hours before changing the throughput
+// mode, or decreasing the Provisioned Throughput value.
+type TooManyRequests struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ // ErrorCode is a required field
+ ErrorCode *string `min:"1" type:"string" required:"true"`
+
+ Message_ *string `locationName:"Message" type:"string"`
+}
+
+// String returns the string representation
+func (s TooManyRequests) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s TooManyRequests) GoString() string {
+ return s.String()
+}
+
+func newErrorTooManyRequests(v protocol.ResponseMetadata) error {
+ return &TooManyRequests{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *TooManyRequests) Code() string {
+ return "TooManyRequests"
+}
+
+// Message returns the exception's message.
+func (s *TooManyRequests) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *TooManyRequests) OrigErr() error {
+ return nil
+}
+
+func (s *TooManyRequests) Error() string {
+ return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *TooManyRequests) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *TooManyRequests) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
+// Returned if the requested Amazon EFS functionality is not available in the
+// specified Availability Zone.
+type UnsupportedAvailabilityZone struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ // ErrorCode is a required field
+ ErrorCode *string `min:"1" type:"string" required:"true"`
+
+ Message_ *string `locationName:"Message" type:"string"`
+}
+
+// String returns the string representation
+func (s UnsupportedAvailabilityZone) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s UnsupportedAvailabilityZone) GoString() string {
+ return s.String()
+}
+
+func newErrorUnsupportedAvailabilityZone(v protocol.ResponseMetadata) error {
+ return &UnsupportedAvailabilityZone{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *UnsupportedAvailabilityZone) Code() string {
+ return "UnsupportedAvailabilityZone"
+}
+
+// Message returns the exception's message.
+func (s *UnsupportedAvailabilityZone) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *UnsupportedAvailabilityZone) OrigErr() error {
+ return nil
+}
+
+func (s *UnsupportedAvailabilityZone) Error() string {
+ return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *UnsupportedAvailabilityZone) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *UnsupportedAvailabilityZone) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
+type UntagResourceInput struct {
+ _ struct{} `type:"structure"`
+
+ // Specifies the EFS resource that you want to remove tags from.
+ //
+ // ResourceId is a required field
+ ResourceId *string `location:"uri" locationName:"ResourceId" type:"string" required:"true"`
+
+ // The keys of the key-value tag pairs that you want to remove from the specified
+ // EFS resource.
+ //
+ // TagKeys is a required field
+ TagKeys []*string `location:"querystring" locationName:"tagKeys" min:"1" type:"list" required:"true"`
+}
+
+// String returns the string representation
+func (s UntagResourceInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s UntagResourceInput) GoString() string {
+ return s.String()
+}
+
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *UntagResourceInput) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "UntagResourceInput"}
+ if s.ResourceId == nil {
+ invalidParams.Add(request.NewErrParamRequired("ResourceId"))
+ }
+ if s.ResourceId != nil && len(*s.ResourceId) < 1 {
+ invalidParams.Add(request.NewErrParamMinLen("ResourceId", 1))
+ }
+ if s.TagKeys == nil {
+ invalidParams.Add(request.NewErrParamRequired("TagKeys"))
+ }
+ if s.TagKeys != nil && len(s.TagKeys) < 1 {
+ invalidParams.Add(request.NewErrParamMinLen("TagKeys", 1))
+ }
+
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ }
+ return nil
+}
+
+// SetResourceId sets the ResourceId field's value.
+func (s *UntagResourceInput) SetResourceId(v string) *UntagResourceInput {
+ s.ResourceId = &v
+ return s
+}
+
+// SetTagKeys sets the TagKeys field's value.
+func (s *UntagResourceInput) SetTagKeys(v []*string) *UntagResourceInput {
+ s.TagKeys = v
+ return s
+}
+
+type UntagResourceOutput struct {
+ _ struct{} `type:"structure"`
+}
+
+// String returns the string representation
+func (s UntagResourceOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s UntagResourceOutput) GoString() string {
+ return s.String()
+}
+
+type UpdateFileSystemInput struct {
+ _ struct{} `type:"structure"`
+
+ // The ID of the file system that you want to update.
+ //
+ // FileSystemId is a required field
+ FileSystemId *string `location:"uri" locationName:"FileSystemId" type:"string" required:"true"`
+
+ // (Optional) Sets the amount of provisioned throughput, in MiB/s, for the file
+ // system. Valid values are 1-1024. If you are changing the throughput mode
+ // to provisioned, you must also provide the amount of provisioned throughput.
+ // Required if ThroughputMode is changed to provisioned on update.
+ ProvisionedThroughputInMibps *float64 `min:"1" type:"double"`
+
+ // (Optional) Updates the file system's throughput mode. If you're not updating
+ // your throughput mode, you don't need to provide this value in your request.
+ // If you are changing the ThroughputMode to provisioned, you must also set
+ // a value for ProvisionedThroughputInMibps.
+ ThroughputMode *string `type:"string" enum:"ThroughputMode"`
+}
+
+// String returns the string representation
+func (s UpdateFileSystemInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s UpdateFileSystemInput) GoString() string {
+ return s.String()
+}
+
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *UpdateFileSystemInput) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "UpdateFileSystemInput"}
+ if s.FileSystemId == nil {
+ invalidParams.Add(request.NewErrParamRequired("FileSystemId"))
+ }
+ if s.FileSystemId != nil && len(*s.FileSystemId) < 1 {
+ invalidParams.Add(request.NewErrParamMinLen("FileSystemId", 1))
+ }
+ if s.ProvisionedThroughputInMibps != nil && *s.ProvisionedThroughputInMibps < 1 {
+ invalidParams.Add(request.NewErrParamMinValue("ProvisionedThroughputInMibps", 1))
+ }
+
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ }
+ return nil
+}
+
+// SetFileSystemId sets the FileSystemId field's value.
+func (s *UpdateFileSystemInput) SetFileSystemId(v string) *UpdateFileSystemInput {
+ s.FileSystemId = &v
+ return s
+}
+
+// SetProvisionedThroughputInMibps sets the ProvisionedThroughputInMibps field's value.
+func (s *UpdateFileSystemInput) SetProvisionedThroughputInMibps(v float64) *UpdateFileSystemInput {
+ s.ProvisionedThroughputInMibps = &v
+ return s
+}
+
+// SetThroughputMode sets the ThroughputMode field's value.
+func (s *UpdateFileSystemInput) SetThroughputMode(v string) *UpdateFileSystemInput {
+ s.ThroughputMode = &v
+ return s
+}
+
+// A description of the file system.
+type UpdateFileSystemOutput struct {
+ _ struct{} `type:"structure"`
+
+ // The unique and consistent identifier of the Availability Zone in which the
+ // file system's One Zone storage classes exist. For example, use1-az1 is an
+ // Availability Zone ID for the us-east-1 AWS Region, and it has the same location
+ // in every AWS account.
+ AvailabilityZoneId *string `type:"string"`
+
+ // Describes the AWS Availability Zone in which the file system is located,
+ // and is valid only for file systems using One Zone storage classes. For more
+ // information, see Using EFS storage classes (https://docs.aws.amazon.com/efs/latest/ug/storage-classes.html)
+ // in the Amazon EFS User Guide.
+ AvailabilityZoneName *string `min:"1" type:"string"`
+
+ // The time that the file system was created, in seconds (since 1970-01-01T00:00:00Z).
+ //
+ // CreationTime is a required field
+ CreationTime *time.Time `type:"timestamp" required:"true"`
+
+ // The opaque string specified in the request.
+ //
+ // CreationToken is a required field
+ CreationToken *string `min:"1" type:"string" required:"true"`
+
+ // A Boolean value that, if true, indicates that the file system is encrypted.
+ Encrypted *bool `type:"boolean"`
+
+ // The Amazon Resource Name (ARN) for the EFS file system, in the format arn:aws:elasticfilesystem:region:account-id:file-system/file-system-id
+ // . Example with sample data: arn:aws:elasticfilesystem:us-west-2:1111333322228888:file-system/fs-01234567
+ FileSystemArn *string `type:"string"`
+
+ // The ID of the file system, assigned by Amazon EFS.
+ //
+ // FileSystemId is a required field
+ FileSystemId *string `type:"string" required:"true"`
+
+ // The ID of an AWS Key Management Service (AWS KMS) customer master key (CMK)
+ // that was used to protect the encrypted file system.
+ KmsKeyId *string `type:"string"`
+
+ // The lifecycle phase of the file system.
+ //
+ // LifeCycleState is a required field
+ LifeCycleState *string `type:"string" required:"true" enum:"LifeCycleState"`
+
+ // You can add tags to a file system, including a Name tag. For more information,
+ // see CreateFileSystem. If the file system has a Name tag, Amazon EFS returns
+ // the value in this field.
+ Name *string `type:"string"`
+
+ // The current number of mount targets that the file system has. For more information,
+ // see CreateMountTarget.
+ //
+ // NumberOfMountTargets is a required field
+ NumberOfMountTargets *int64 `type:"integer" required:"true"`
+
+ // The AWS account that created the file system. If the file system was created
+ // by an IAM user, the parent account to which the user belongs is the owner.
+ //
+ // OwnerId is a required field
+ OwnerId *string `type:"string" required:"true"`
+
+ // The performance mode of the file system.
+ //
+ // PerformanceMode is a required field
+ PerformanceMode *string `type:"string" required:"true" enum:"PerformanceMode"`
+
+ // The amount of provisioned throughput, measured in MiB/s, for the file system.
+ // Valid for file systems using ThroughputMode set to provisioned.
+ ProvisionedThroughputInMibps *float64 `min:"1" type:"double"`
+
+ // The latest known metered size (in bytes) of data stored in the file system,
+ // in its Value field, and the time at which that size was determined in its
+ // Timestamp field. The Timestamp value is the integer number of seconds since
+ // 1970-01-01T00:00:00Z. The SizeInBytes value doesn't represent the size of
+ // a consistent snapshot of the file system, but it is eventually consistent
+ // when there are no writes to the file system. That is, SizeInBytes represents
+ // actual size only if the file system is not modified for a period longer than
+ // a couple of hours. Otherwise, the value is not the exact size that the file
+ // system was at any point in time.
+ //
+ // SizeInBytes is a required field
+ SizeInBytes *FileSystemSize `type:"structure" required:"true"`
+
+ // The tags associated with the file system, presented as an array of Tag objects.
+ //
+ // Tags is a required field
+ Tags []*Tag `type:"list" required:"true"`
+
+ // Displays the file system's throughput mode. For more information, see Throughput
+ // modes (https://docs.aws.amazon.com/efs/latest/ug/performance.html#throughput-modes)
+ // in the Amazon EFS User Guide.
+ ThroughputMode *string `type:"string" enum:"ThroughputMode"`
+}
+
+// String returns the string representation
+func (s UpdateFileSystemOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s UpdateFileSystemOutput) GoString() string {
+ return s.String()
+}
+
+// SetAvailabilityZoneId sets the AvailabilityZoneId field's value.
+func (s *UpdateFileSystemOutput) SetAvailabilityZoneId(v string) *UpdateFileSystemOutput {
+ s.AvailabilityZoneId = &v
+ return s
+}
+
+// SetAvailabilityZoneName sets the AvailabilityZoneName field's value.
+func (s *UpdateFileSystemOutput) SetAvailabilityZoneName(v string) *UpdateFileSystemOutput {
+ s.AvailabilityZoneName = &v
+ return s
+}
+
+// SetCreationTime sets the CreationTime field's value.
+func (s *UpdateFileSystemOutput) SetCreationTime(v time.Time) *UpdateFileSystemOutput {
+ s.CreationTime = &v
+ return s
+}
+
+// SetCreationToken sets the CreationToken field's value.
+func (s *UpdateFileSystemOutput) SetCreationToken(v string) *UpdateFileSystemOutput {
+ s.CreationToken = &v
+ return s
+}
+
+// SetEncrypted sets the Encrypted field's value.
+func (s *UpdateFileSystemOutput) SetEncrypted(v bool) *UpdateFileSystemOutput {
+ s.Encrypted = &v
+ return s
+}
+
+// SetFileSystemArn sets the FileSystemArn field's value.
+func (s *UpdateFileSystemOutput) SetFileSystemArn(v string) *UpdateFileSystemOutput {
+ s.FileSystemArn = &v
+ return s
+}
+
+// SetFileSystemId sets the FileSystemId field's value.
+func (s *UpdateFileSystemOutput) SetFileSystemId(v string) *UpdateFileSystemOutput {
+ s.FileSystemId = &v
+ return s
+}
+
+// SetKmsKeyId sets the KmsKeyId field's value.
+func (s *UpdateFileSystemOutput) SetKmsKeyId(v string) *UpdateFileSystemOutput {
+ s.KmsKeyId = &v
+ return s
+}
+
+// SetLifeCycleState sets the LifeCycleState field's value.
+func (s *UpdateFileSystemOutput) SetLifeCycleState(v string) *UpdateFileSystemOutput {
+ s.LifeCycleState = &v
+ return s
+}
+
+// SetName sets the Name field's value.
+func (s *UpdateFileSystemOutput) SetName(v string) *UpdateFileSystemOutput {
+ s.Name = &v
+ return s
+}
+
+// SetNumberOfMountTargets sets the NumberOfMountTargets field's value.
+func (s *UpdateFileSystemOutput) SetNumberOfMountTargets(v int64) *UpdateFileSystemOutput {
+ s.NumberOfMountTargets = &v
+ return s
+}
+
+// SetOwnerId sets the OwnerId field's value.
+func (s *UpdateFileSystemOutput) SetOwnerId(v string) *UpdateFileSystemOutput {
+ s.OwnerId = &v
+ return s
+}
+
+// SetPerformanceMode sets the PerformanceMode field's value.
+func (s *UpdateFileSystemOutput) SetPerformanceMode(v string) *UpdateFileSystemOutput {
+ s.PerformanceMode = &v
+ return s
+}
+
+// SetProvisionedThroughputInMibps sets the ProvisionedThroughputInMibps field's value.
+func (s *UpdateFileSystemOutput) SetProvisionedThroughputInMibps(v float64) *UpdateFileSystemOutput {
+ s.ProvisionedThroughputInMibps = &v
+ return s
+}
+
+// SetSizeInBytes sets the SizeInBytes field's value.
+func (s *UpdateFileSystemOutput) SetSizeInBytes(v *FileSystemSize) *UpdateFileSystemOutput {
+ s.SizeInBytes = v
+ return s
+}
+
+// SetTags sets the Tags field's value.
+func (s *UpdateFileSystemOutput) SetTags(v []*Tag) *UpdateFileSystemOutput {
+ s.Tags = v
+ return s
+}
+
+// SetThroughputMode sets the ThroughputMode field's value.
+func (s *UpdateFileSystemOutput) SetThroughputMode(v string) *UpdateFileSystemOutput {
+ s.ThroughputMode = &v
+ return s
+}
+
+// Returned if the AWS Backup service is not available in the Region in which
+// the request was made.
+type ValidationException struct {
+ _ struct{} `type:"structure"`
+ RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
+
+ // ErrorCode is a required field
+ ErrorCode *string `min:"1" type:"string" required:"true"`
+
+ Message_ *string `locationName:"Message" type:"string"`
+}
+
+// String returns the string representation
+func (s ValidationException) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ValidationException) GoString() string {
+ return s.String()
+}
+
+func newErrorValidationException(v protocol.ResponseMetadata) error {
+ return &ValidationException{
+ RespMetadata: v,
+ }
+}
+
+// Code returns the exception type name.
+func (s *ValidationException) Code() string {
+ return "ValidationException"
+}
+
+// Message returns the exception's message.
+func (s *ValidationException) Message() string {
+ if s.Message_ != nil {
+ return *s.Message_
+ }
+ return ""
+}
+
+// OrigErr always returns nil, satisfies awserr.Error interface.
+func (s *ValidationException) OrigErr() error {
+ return nil
+}
+
+func (s *ValidationException) Error() string {
+ return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String())
+}
+
+// Status code returns the HTTP status code for the request's response error.
+func (s *ValidationException) StatusCode() int {
+ return s.RespMetadata.StatusCode
+}
+
+// RequestID returns the service's response RequestID for request.
+func (s *ValidationException) RequestID() string {
+ return s.RespMetadata.RequestID
+}
+
+const (
+ // LifeCycleStateCreating is a LifeCycleState enum value
+ LifeCycleStateCreating = "creating"
+
+ // LifeCycleStateAvailable is a LifeCycleState enum value
+ LifeCycleStateAvailable = "available"
+
+ // LifeCycleStateUpdating is a LifeCycleState enum value
+ LifeCycleStateUpdating = "updating"
+
+ // LifeCycleStateDeleting is a LifeCycleState enum value
+ LifeCycleStateDeleting = "deleting"
+
+ // LifeCycleStateDeleted is a LifeCycleState enum value
+ LifeCycleStateDeleted = "deleted"
+
+ // LifeCycleStateError is a LifeCycleState enum value
+ LifeCycleStateError = "error"
+)
+
+// LifeCycleState_Values returns all elements of the LifeCycleState enum
+func LifeCycleState_Values() []string {
+ return []string{
+ LifeCycleStateCreating,
+ LifeCycleStateAvailable,
+ LifeCycleStateUpdating,
+ LifeCycleStateDeleting,
+ LifeCycleStateDeleted,
+ LifeCycleStateError,
+ }
+}
+
+const (
+ // PerformanceModeGeneralPurpose is a PerformanceMode enum value
+ PerformanceModeGeneralPurpose = "generalPurpose"
+
+ // PerformanceModeMaxIo is a PerformanceMode enum value
+ PerformanceModeMaxIo = "maxIO"
+)
+
+// PerformanceMode_Values returns all elements of the PerformanceMode enum
+func PerformanceMode_Values() []string {
+ return []string{
+ PerformanceModeGeneralPurpose,
+ PerformanceModeMaxIo,
+ }
+}
+
+const (
+ // StatusEnabled is a Status enum value
+ StatusEnabled = "ENABLED"
+
+ // StatusEnabling is a Status enum value
+ StatusEnabling = "ENABLING"
+
+ // StatusDisabled is a Status enum value
+ StatusDisabled = "DISABLED"
+
+ // StatusDisabling is a Status enum value
+ StatusDisabling = "DISABLING"
+)
+
+// Status_Values returns all elements of the Status enum
+func Status_Values() []string {
+ return []string{
+ StatusEnabled,
+ StatusEnabling,
+ StatusDisabled,
+ StatusDisabling,
+ }
+}
+
+const (
+ // ThroughputModeBursting is a ThroughputMode enum value
+ ThroughputModeBursting = "bursting"
+
+ // ThroughputModeProvisioned is a ThroughputMode enum value
+ ThroughputModeProvisioned = "provisioned"
+)
+
+// ThroughputMode_Values returns all elements of the ThroughputMode enum
+func ThroughputMode_Values() []string {
+ return []string{
+ ThroughputModeBursting,
+ ThroughputModeProvisioned,
+ }
+}
+
+const (
+ // TransitionToIARulesAfter7Days is a TransitionToIARules enum value
+ TransitionToIARulesAfter7Days = "AFTER_7_DAYS"
+
+ // TransitionToIARulesAfter14Days is a TransitionToIARules enum value
+ TransitionToIARulesAfter14Days = "AFTER_14_DAYS"
+
+ // TransitionToIARulesAfter30Days is a TransitionToIARules enum value
+ TransitionToIARulesAfter30Days = "AFTER_30_DAYS"
+
+ // TransitionToIARulesAfter60Days is a TransitionToIARules enum value
+ TransitionToIARulesAfter60Days = "AFTER_60_DAYS"
+
+ // TransitionToIARulesAfter90Days is a TransitionToIARules enum value
+ TransitionToIARulesAfter90Days = "AFTER_90_DAYS"
+)
+
+// TransitionToIARules_Values returns all elements of the TransitionToIARules enum
+func TransitionToIARules_Values() []string {
+ return []string{
+ TransitionToIARulesAfter7Days,
+ TransitionToIARulesAfter14Days,
+ TransitionToIARulesAfter30Days,
+ TransitionToIARulesAfter60Days,
+ TransitionToIARulesAfter90Days,
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go/service/efs/doc.go b/vendor/github.com/aws/aws-sdk-go/service/efs/doc.go
new file mode 100644
index 00000000000..ce6c5159449
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go/service/efs/doc.go
@@ -0,0 +1,32 @@
+// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
+
+// Package efs provides the client and types for making API
+// requests to Amazon Elastic File System.
+//
+// Amazon Elastic File System (Amazon EFS) provides simple, scalable file storage
+// for use with Amazon EC2 instances in the AWS Cloud. With Amazon EFS, storage
+// capacity is elastic, growing and shrinking automatically as you add and remove
+// files, so your applications have the storage they need, when they need it.
+// For more information, see the User Guide (https://docs.aws.amazon.com/efs/latest/ug/api-reference.html).
+//
+// See https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01 for more information on this service.
+//
+// See efs package documentation for more information.
+// https://docs.aws.amazon.com/sdk-for-go/api/service/efs/
+//
+// Using the Client
+//
+// To contact Amazon Elastic File System with the SDK use the New function to create
+// a new service client. With that client you can make API requests to the service.
+// These clients are safe to use concurrently.
+//
+// See the SDK's documentation for more information on how to use the SDK.
+// https://docs.aws.amazon.com/sdk-for-go/api/
+//
+// See aws.Config documentation for more information on configuring SDK clients.
+// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config
+//
+// See the Amazon Elastic File System client EFS for more
+// information on creating client for this service.
+// https://docs.aws.amazon.com/sdk-for-go/api/service/efs/#New
+package efs
diff --git a/vendor/github.com/aws/aws-sdk-go/service/efs/errors.go b/vendor/github.com/aws/aws-sdk-go/service/efs/errors.go
new file mode 100644
index 00000000000..f832be62cfc
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go/service/efs/errors.go
@@ -0,0 +1,242 @@
+// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
+
+package efs
+
+import (
+ "github.com/aws/aws-sdk-go/private/protocol"
+)
+
+const (
+
+ // ErrCodeAccessPointAlreadyExists for service response error code
+ // "AccessPointAlreadyExists".
+ //
+ // Returned if the access point you are trying to create already exists, with
+ // the creation token you provided in the request.
+ ErrCodeAccessPointAlreadyExists = "AccessPointAlreadyExists"
+
+ // ErrCodeAccessPointLimitExceeded for service response error code
+ // "AccessPointLimitExceeded".
+ //
+ // Returned if the AWS account has already created the maximum number of access
+ // points allowed per file system.
+ ErrCodeAccessPointLimitExceeded = "AccessPointLimitExceeded"
+
+ // ErrCodeAccessPointNotFound for service response error code
+ // "AccessPointNotFound".
+ //
+ // Returned if the specified AccessPointId value doesn't exist in the requester's
+ // AWS account.
+ ErrCodeAccessPointNotFound = "AccessPointNotFound"
+
+ // ErrCodeAvailabilityZonesMismatch for service response error code
+ // "AvailabilityZonesMismatch".
+ //
+ // Returned if the Availability Zone that was specified for a mount target is
+ // different from the Availability Zone that was specified for One Zone storage
+ // classes. For more information, see Regional and One Zone storage redundancy
+ // (https://docs.aws.amazon.com/efs/latest/ug/availability-durability.html).
+ ErrCodeAvailabilityZonesMismatch = "AvailabilityZonesMismatch"
+
+ // ErrCodeBadRequest for service response error code
+ // "BadRequest".
+ //
+ // Returned if the request is malformed or contains an error such as an invalid
+ // parameter value or a missing required parameter.
+ ErrCodeBadRequest = "BadRequest"
+
+ // ErrCodeDependencyTimeout for service response error code
+ // "DependencyTimeout".
+ //
+ // The service timed out trying to fulfill the request, and the client should
+ // try the call again.
+ ErrCodeDependencyTimeout = "DependencyTimeout"
+
+ // ErrCodeFileSystemAlreadyExists for service response error code
+ // "FileSystemAlreadyExists".
+ //
+ // Returned if the file system you are trying to create already exists, with
+ // the creation token you provided.
+ ErrCodeFileSystemAlreadyExists = "FileSystemAlreadyExists"
+
+ // ErrCodeFileSystemInUse for service response error code
+ // "FileSystemInUse".
+ //
+ // Returned if a file system has mount targets.
+ ErrCodeFileSystemInUse = "FileSystemInUse"
+
+ // ErrCodeFileSystemLimitExceeded for service response error code
+ // "FileSystemLimitExceeded".
+ //
+ // Returned if the AWS account has already created the maximum number of file
+ // systems allowed per account.
+ ErrCodeFileSystemLimitExceeded = "FileSystemLimitExceeded"
+
+ // ErrCodeFileSystemNotFound for service response error code
+ // "FileSystemNotFound".
+ //
+ // Returned if the specified FileSystemId value doesn't exist in the requester's
+ // AWS account.
+ ErrCodeFileSystemNotFound = "FileSystemNotFound"
+
+ // ErrCodeIncorrectFileSystemLifeCycleState for service response error code
+ // "IncorrectFileSystemLifeCycleState".
+ //
+ // Returned if the file system's lifecycle state is not "available".
+ ErrCodeIncorrectFileSystemLifeCycleState = "IncorrectFileSystemLifeCycleState"
+
+ // ErrCodeIncorrectMountTargetState for service response error code
+ // "IncorrectMountTargetState".
+ //
+ // Returned if the mount target is not in the correct state for the operation.
+ ErrCodeIncorrectMountTargetState = "IncorrectMountTargetState"
+
+ // ErrCodeInsufficientThroughputCapacity for service response error code
+ // "InsufficientThroughputCapacity".
+ //
+ // Returned if there's not enough capacity to provision additional throughput.
+ // This value might be returned when you try to create a file system in provisioned
+ // throughput mode, when you attempt to increase the provisioned throughput
+ // of an existing file system, or when you attempt to change an existing file
+ // system from bursting to provisioned throughput mode. Try again later.
+ ErrCodeInsufficientThroughputCapacity = "InsufficientThroughputCapacity"
+
+ // ErrCodeInternalServerError for service response error code
+ // "InternalServerError".
+ //
+ // Returned if an error occurred on the server side.
+ ErrCodeInternalServerError = "InternalServerError"
+
+ // ErrCodeInvalidPolicyException for service response error code
+ // "InvalidPolicyException".
+ //
+ // Returned if the FileSystemPolicy is is malformed or contains an error such
+ // as an invalid parameter value or a missing required parameter. Returned in
+ // the case of a policy lockout safety check error.
+ ErrCodeInvalidPolicyException = "InvalidPolicyException"
+
+ // ErrCodeIpAddressInUse for service response error code
+ // "IpAddressInUse".
+ //
+ // Returned if the request specified an IpAddress that is already in use in
+ // the subnet.
+ ErrCodeIpAddressInUse = "IpAddressInUse"
+
+ // ErrCodeMountTargetConflict for service response error code
+ // "MountTargetConflict".
+ //
+ // Returned if the mount target would violate one of the specified restrictions
+ // based on the file system's existing mount targets.
+ ErrCodeMountTargetConflict = "MountTargetConflict"
+
+ // ErrCodeMountTargetNotFound for service response error code
+ // "MountTargetNotFound".
+ //
+ // Returned if there is no mount target with the specified ID found in the caller's
+ // account.
+ ErrCodeMountTargetNotFound = "MountTargetNotFound"
+
+ // ErrCodeNetworkInterfaceLimitExceeded for service response error code
+ // "NetworkInterfaceLimitExceeded".
+ //
+ // The calling account has reached the limit for elastic network interfaces
+ // for the specific AWS Region. The client should try to delete some elastic
+ // network interfaces or get the account limit raised. For more information,
+ // see Amazon VPC Limits (https://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Appendix_Limits.html)
+ // in the Amazon VPC User Guide (see the Network interfaces per VPC entry in
+ // the table).
+ ErrCodeNetworkInterfaceLimitExceeded = "NetworkInterfaceLimitExceeded"
+
+ // ErrCodeNoFreeAddressesInSubnet for service response error code
+ // "NoFreeAddressesInSubnet".
+ //
+ // Returned if IpAddress was not specified in the request and there are no free
+ // IP addresses in the subnet.
+ ErrCodeNoFreeAddressesInSubnet = "NoFreeAddressesInSubnet"
+
+ // ErrCodePolicyNotFound for service response error code
+ // "PolicyNotFound".
+ //
+ // Returned if the default file system policy is in effect for the EFS file
+ // system specified.
+ ErrCodePolicyNotFound = "PolicyNotFound"
+
+ // ErrCodeSecurityGroupLimitExceeded for service response error code
+ // "SecurityGroupLimitExceeded".
+ //
+ // Returned if the size of SecurityGroups specified in the request is greater
+ // than five.
+ ErrCodeSecurityGroupLimitExceeded = "SecurityGroupLimitExceeded"
+
+ // ErrCodeSecurityGroupNotFound for service response error code
+ // "SecurityGroupNotFound".
+ //
+ // Returned if one of the specified security groups doesn't exist in the subnet's
+ // VPC.
+ ErrCodeSecurityGroupNotFound = "SecurityGroupNotFound"
+
+ // ErrCodeSubnetNotFound for service response error code
+ // "SubnetNotFound".
+ //
+ // Returned if there is no subnet with ID SubnetId provided in the request.
+ ErrCodeSubnetNotFound = "SubnetNotFound"
+
+ // ErrCodeThroughputLimitExceeded for service response error code
+ // "ThroughputLimitExceeded".
+ //
+ // Returned if the throughput mode or amount of provisioned throughput can't
+ // be changed because the throughput limit of 1024 MiB/s has been reached.
+ ErrCodeThroughputLimitExceeded = "ThroughputLimitExceeded"
+
+ // ErrCodeTooManyRequests for service response error code
+ // "TooManyRequests".
+ //
+ // Returned if you don’t wait at least 24 hours before changing the throughput
+ // mode, or decreasing the Provisioned Throughput value.
+ ErrCodeTooManyRequests = "TooManyRequests"
+
+ // ErrCodeUnsupportedAvailabilityZone for service response error code
+ // "UnsupportedAvailabilityZone".
+ //
+ // Returned if the requested Amazon EFS functionality is not available in the
+ // specified Availability Zone.
+ ErrCodeUnsupportedAvailabilityZone = "UnsupportedAvailabilityZone"
+
+ // ErrCodeValidationException for service response error code
+ // "ValidationException".
+ //
+ // Returned if the AWS Backup service is not available in the Region in which
+ // the request was made.
+ ErrCodeValidationException = "ValidationException"
+)
+
+var exceptionFromCode = map[string]func(protocol.ResponseMetadata) error{
+ "AccessPointAlreadyExists": newErrorAccessPointAlreadyExists,
+ "AccessPointLimitExceeded": newErrorAccessPointLimitExceeded,
+ "AccessPointNotFound": newErrorAccessPointNotFound,
+ "AvailabilityZonesMismatch": newErrorAvailabilityZonesMismatch,
+ "BadRequest": newErrorBadRequest,
+ "DependencyTimeout": newErrorDependencyTimeout,
+ "FileSystemAlreadyExists": newErrorFileSystemAlreadyExists,
+ "FileSystemInUse": newErrorFileSystemInUse,
+ "FileSystemLimitExceeded": newErrorFileSystemLimitExceeded,
+ "FileSystemNotFound": newErrorFileSystemNotFound,
+ "IncorrectFileSystemLifeCycleState": newErrorIncorrectFileSystemLifeCycleState,
+ "IncorrectMountTargetState": newErrorIncorrectMountTargetState,
+ "InsufficientThroughputCapacity": newErrorInsufficientThroughputCapacity,
+ "InternalServerError": newErrorInternalServerError,
+ "InvalidPolicyException": newErrorInvalidPolicyException,
+ "IpAddressInUse": newErrorIpAddressInUse,
+ "MountTargetConflict": newErrorMountTargetConflict,
+ "MountTargetNotFound": newErrorMountTargetNotFound,
+ "NetworkInterfaceLimitExceeded": newErrorNetworkInterfaceLimitExceeded,
+ "NoFreeAddressesInSubnet": newErrorNoFreeAddressesInSubnet,
+ "PolicyNotFound": newErrorPolicyNotFound,
+ "SecurityGroupLimitExceeded": newErrorSecurityGroupLimitExceeded,
+ "SecurityGroupNotFound": newErrorSecurityGroupNotFound,
+ "SubnetNotFound": newErrorSubnetNotFound,
+ "ThroughputLimitExceeded": newErrorThroughputLimitExceeded,
+ "TooManyRequests": newErrorTooManyRequests,
+ "UnsupportedAvailabilityZone": newErrorUnsupportedAvailabilityZone,
+ "ValidationException": newErrorValidationException,
+}
diff --git a/vendor/github.com/aws/aws-sdk-go/service/efs/service.go b/vendor/github.com/aws/aws-sdk-go/service/efs/service.go
new file mode 100644
index 00000000000..ac105c46ec6
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go/service/efs/service.go
@@ -0,0 +1,101 @@
+// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
+
+package efs
+
+import (
+ "github.com/aws/aws-sdk-go/aws"
+ "github.com/aws/aws-sdk-go/aws/client"
+ "github.com/aws/aws-sdk-go/aws/client/metadata"
+ "github.com/aws/aws-sdk-go/aws/request"
+ "github.com/aws/aws-sdk-go/aws/signer/v4"
+ "github.com/aws/aws-sdk-go/private/protocol"
+ "github.com/aws/aws-sdk-go/private/protocol/restjson"
+)
+
+// EFS provides the API operation methods for making requests to
+// Amazon Elastic File System. See this package's package overview docs
+// for details on the service.
+//
+// EFS methods are safe to use concurrently. It is not safe to
+// modify mutate any of the struct's properties though.
+type EFS struct {
+ *client.Client
+}
+
+// Used for custom client initialization logic
+var initClient func(*client.Client)
+
+// Used for custom request initialization logic
+var initRequest func(*request.Request)
+
+// Service information constants
+const (
+ ServiceName = "elasticfilesystem" // Name of service.
+ EndpointsID = ServiceName // ID to lookup a service endpoint with.
+ ServiceID = "EFS" // ServiceID is a unique identifier of a specific service.
+)
+
+// New creates a new instance of the EFS client with a session.
+// If additional configuration is needed for the client instance use the optional
+// aws.Config parameter to add your extra config.
+//
+// Example:
+// mySession := session.Must(session.NewSession())
+//
+// // Create a EFS client from just a session.
+// svc := efs.New(mySession)
+//
+// // Create a EFS client with additional configuration
+// svc := efs.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
+func New(p client.ConfigProvider, cfgs ...*aws.Config) *EFS {
+ c := p.ClientConfig(EndpointsID, cfgs...)
+ return newClient(*c.Config, c.Handlers, c.PartitionID, c.Endpoint, c.SigningRegion, c.SigningName)
+}
+
+// newClient creates, initializes and returns a new service client instance.
+func newClient(cfg aws.Config, handlers request.Handlers, partitionID, endpoint, signingRegion, signingName string) *EFS {
+ svc := &EFS{
+ Client: client.New(
+ cfg,
+ metadata.ClientInfo{
+ ServiceName: ServiceName,
+ ServiceID: ServiceID,
+ SigningName: signingName,
+ SigningRegion: signingRegion,
+ PartitionID: partitionID,
+ Endpoint: endpoint,
+ APIVersion: "2015-02-01",
+ },
+ handlers,
+ ),
+ }
+
+ // Handlers
+ svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler)
+ svc.Handlers.Build.PushBackNamed(restjson.BuildHandler)
+ svc.Handlers.Unmarshal.PushBackNamed(restjson.UnmarshalHandler)
+ svc.Handlers.UnmarshalMeta.PushBackNamed(restjson.UnmarshalMetaHandler)
+ svc.Handlers.UnmarshalError.PushBackNamed(
+ protocol.NewUnmarshalErrorHandler(restjson.NewUnmarshalTypedError(exceptionFromCode)).NamedHandler(),
+ )
+
+ // Run custom client initialization if present
+ if initClient != nil {
+ initClient(svc.Client)
+ }
+
+ return svc
+}
+
+// newRequest creates a new request for a EFS operation and runs any
+// custom request initialization.
+func (c *EFS) newRequest(op *request.Operation, params, data interface{}) *request.Request {
+ req := c.NewRequest(op, params, data)
+
+ // Run custom request initialization if present
+ if initRequest != nil {
+ initRequest(req)
+ }
+
+ return req
+}
diff --git a/vendor/github.com/metal3-io/baremetal-operator/LICENSE b/vendor/github.com/coreos/stream-metadata-go/LICENSE
similarity index 100%
rename from vendor/github.com/metal3-io/baremetal-operator/LICENSE
rename to vendor/github.com/coreos/stream-metadata-go/LICENSE
diff --git a/vendor/github.com/coreos/stream-metadata-go/stream/rhcos/rhcos.go b/vendor/github.com/coreos/stream-metadata-go/stream/rhcos/rhcos.go
new file mode 100644
index 00000000000..320d84b41d4
--- /dev/null
+++ b/vendor/github.com/coreos/stream-metadata-go/stream/rhcos/rhcos.go
@@ -0,0 +1,18 @@
+package rhcos
+
+// Extensions is data specific to Red Hat Enterprise Linux CoreOS
+type Extensions struct {
+ AzureDisk *AzureDisk `json:"azure-disk,omitempty"`
+}
+
+// AzureDisk represents an Azure disk image that can be imported
+// into an image gallery or otherwise replicated, and then used
+// as a boot source for virtual machines.
+type AzureDisk struct {
+ // Release is the source release version
+ Release string `json:"release"`
+ // URL to an image already stored in Azure infrastructure
+ // that can be copied into an image gallery. Avoid creating VMs directly
+ // from this URL as that may lead to performance limitations.
+ URL string `json:"url,omitempty"`
+}
diff --git a/vendor/github.com/coreos/stream-metadata-go/stream/stream.go b/vendor/github.com/coreos/stream-metadata-go/stream/stream.go
new file mode 100644
index 00000000000..e3f100cea59
--- /dev/null
+++ b/vendor/github.com/coreos/stream-metadata-go/stream/stream.go
@@ -0,0 +1,74 @@
+// Package stream models a CoreOS "stream", which is
+// a description of the recommended set of binary images for CoreOS. Use
+// this API to find cloud images, bare metal disk images, etc.
+package stream
+
+import (
+ "github.com/coreos/stream-metadata-go/stream/rhcos"
+)
+
+// Stream contains artifacts available in a stream
+type Stream struct {
+ Stream string `json:"stream"`
+ Metadata Metadata `json:"metadata"`
+ Architectures map[string]Arch `json:"architectures"`
+}
+
+// Metadata for a release or stream
+type Metadata struct {
+ LastModified string `json:"last-modified"`
+}
+
+// Arch contains release details for a particular hardware architecture
+type Arch struct {
+ Artifacts map[string]PlatformArtifacts `json:"artifacts"`
+ Images Images `json:"images,omitempty"`
+ // RHELCoreOSExtensions is data specific to Red Hat Enterprise Linux CoreOS
+ RHELCoreOSExtensions *rhcos.Extensions `json:"rhel-coreos-extensions,omitempty"`
+}
+
+// PlatformArtifacts contains images for a platform
+type PlatformArtifacts struct {
+ Release string `json:"release"`
+ Formats map[string]ImageFormat `json:"formats"`
+}
+
+// ImageFormat contains all artifacts for a single OS image
+type ImageFormat struct {
+ Disk *Artifact `json:"disk,omitempty"`
+ Kernel *Artifact `json:"kernel,omitempty"`
+ Initramfs *Artifact `json:"initramfs,omitempty"`
+ Rootfs *Artifact `json:"rootfs,omitempty"`
+}
+
+// Artifact represents one image file, plus its metadata
+type Artifact struct {
+ Location string `json:"location"`
+ Signature string `json:"signature"`
+ Sha256 string `json:"sha256"`
+ UncompressedSha256 string `json:"uncompressed-sha256,omitempty"`
+}
+
+// Images contains images available in cloud providers
+type Images struct {
+ Aws *AwsImage `json:"aws,omitempty"`
+ Gcp *GcpImage `json:"gcp,omitempty"`
+}
+
+// AwsImage represents an image across all AWS regions
+type AwsImage struct {
+ Regions map[string]AwsRegionImage `json:"regions,omitempty"`
+}
+
+// AwsRegionImage represents an image in one AWS region
+type AwsRegionImage struct {
+ Release string `json:"release"`
+ Image string `json:"image"`
+}
+
+// GcpImage represents a GCP cloud image
+type GcpImage struct {
+ Project string `json:"project,omitempty"`
+ Family string `json:"family,omitempty"`
+ Name string `json:"name,omitempty"`
+}
diff --git a/vendor/github.com/coreos/stream-metadata-go/stream/stream_utils.go b/vendor/github.com/coreos/stream-metadata-go/stream/stream_utils.go
new file mode 100644
index 00000000000..ffd779c58a6
--- /dev/null
+++ b/vendor/github.com/coreos/stream-metadata-go/stream/stream_utils.go
@@ -0,0 +1,47 @@
+package stream
+
+import "fmt"
+
+// FormatPrefix describes a stream+architecture combination, intended for prepending to error messages
+func (st *Stream) FormatPrefix(archname string) string {
+ return fmt.Sprintf("%s/%s", st.Stream, archname)
+}
+
+// GetArchitecture loads the architecture-specific builds from a stream,
+// with a useful descriptive error message if the architecture is not found.
+func (st *Stream) GetArchitecture(archname string) (*Arch, error) {
+ archdata, ok := st.Architectures[archname]
+ if !ok {
+ return nil, fmt.Errorf("stream:%s does not have architecture '%s'", st.Stream, archname)
+ }
+ return &archdata, nil
+}
+
+// GetAwsRegionImage returns the release data (AMI and release ID) for a particular
+// architecture and region.
+func (st *Stream) GetAwsRegionImage(archname, region string) (*AwsRegionImage, error) {
+ starch, err := st.GetArchitecture(archname)
+ if err != nil {
+ return nil, err
+ }
+ awsimages := starch.Images.Aws
+ if awsimages == nil {
+ return nil, fmt.Errorf("%s: No AWS images", st.FormatPrefix(archname))
+ }
+ var regionVal AwsRegionImage
+ var ok bool
+ if regionVal, ok = awsimages.Regions[region]; !ok {
+ return nil, fmt.Errorf("%s: No AWS images in region %s", st.FormatPrefix(archname), region)
+ }
+
+ return ®ionVal, nil
+}
+
+// GetAMI returns the AWS machine image for a particular architecture and region.
+func (st *Stream) GetAMI(archname, region string) (string, error) {
+ regionVal, err := st.GetAwsRegionImage(archname, region)
+ if err != nil {
+ return "", err
+ }
+ return regionVal.Image, nil
+}
diff --git a/vendor/github.com/dimchansky/utfbom/.travis.yml b/vendor/github.com/dimchansky/utfbom/.travis.yml
index 3512c85190d..19312ee35fc 100644
--- a/vendor/github.com/dimchansky/utfbom/.travis.yml
+++ b/vendor/github.com/dimchansky/utfbom/.travis.yml
@@ -1,17 +1,28 @@
language: go
+sudo: false
go:
- - '1.10'
- - '1.11'
+ - 1.10.x
+ - 1.11.x
+ - 1.12.x
+ - 1.13.x
+ - 1.14.x
+ - 1.15.x
-# sudo=false makes the build run using a container
-sudo: false
+cache:
+ directories:
+ - $HOME/.cache/go-build
+ - $HOME/gopath/pkg/mod
+
+env:
+ global:
+ - GO111MODULE=on
before_install:
- go get github.com/mattn/goveralls
- go get golang.org/x/tools/cmd/cover
- go get golang.org/x/tools/cmd/goimports
- - go get github.com/golang/lint/golint
+ - go get golang.org/x/lint/golint
script:
- gofiles=$(find ./ -name '*.go') && [ -z "$gofiles" ] || unformatted=$(goimports -l $gofiles) && [ -z "$unformatted" ] || (echo >&2 "Go files must be formatted with gofmt. Following files has problem:\n $unformatted" && false)
- golint ./... # This won't break the build, just show warnings
diff --git a/vendor/github.com/dimchansky/utfbom/LICENSE b/vendor/github.com/dimchansky/utfbom/LICENSE
index 8dada3edaf5..6279cb87f43 100644
--- a/vendor/github.com/dimchansky/utfbom/LICENSE
+++ b/vendor/github.com/dimchansky/utfbom/LICENSE
@@ -186,7 +186,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.
- Copyright {yyyy} {name of copyright owner}
+ Copyright (c) 2018-2020, Dmitrij Koniajev (dimchansky@gmail.com)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
diff --git a/vendor/github.com/dimchansky/utfbom/go.mod b/vendor/github.com/dimchansky/utfbom/go.mod
index 4b9ecc6f545..8f8620af3b5 100644
--- a/vendor/github.com/dimchansky/utfbom/go.mod
+++ b/vendor/github.com/dimchansky/utfbom/go.mod
@@ -1 +1 @@
-module github.com/dimchansky/utfbom
\ No newline at end of file
+module github.com/dimchansky/utfbom
diff --git a/vendor/github.com/dgrijalva/jwt-go/.gitignore b/vendor/github.com/form3tech-oss/jwt-go/.gitignore
similarity index 69%
rename from vendor/github.com/dgrijalva/jwt-go/.gitignore
rename to vendor/github.com/form3tech-oss/jwt-go/.gitignore
index 80bed650ec0..c0e81a8d926 100644
--- a/vendor/github.com/dgrijalva/jwt-go/.gitignore
+++ b/vendor/github.com/form3tech-oss/jwt-go/.gitignore
@@ -1,4 +1,5 @@
.DS_Store
bin
+.idea/
diff --git a/vendor/github.com/dgrijalva/jwt-go/.travis.yml b/vendor/github.com/form3tech-oss/jwt-go/.travis.yml
similarity index 65%
rename from vendor/github.com/dgrijalva/jwt-go/.travis.yml
rename to vendor/github.com/form3tech-oss/jwt-go/.travis.yml
index 1027f56cd94..3c7fb7e1ae6 100644
--- a/vendor/github.com/dgrijalva/jwt-go/.travis.yml
+++ b/vendor/github.com/form3tech-oss/jwt-go/.travis.yml
@@ -5,9 +5,8 @@ script:
- go test -v ./...
go:
- - 1.3
- - 1.4
- - 1.5
- - 1.6
- - 1.7
+ - 1.12
+ - 1.13
+ - 1.14
+ - 1.15
- tip
diff --git a/vendor/github.com/dgrijalva/jwt-go/LICENSE b/vendor/github.com/form3tech-oss/jwt-go/LICENSE
similarity index 100%
rename from vendor/github.com/dgrijalva/jwt-go/LICENSE
rename to vendor/github.com/form3tech-oss/jwt-go/LICENSE
diff --git a/vendor/github.com/dgrijalva/jwt-go/MIGRATION_GUIDE.md b/vendor/github.com/form3tech-oss/jwt-go/MIGRATION_GUIDE.md
similarity index 100%
rename from vendor/github.com/dgrijalva/jwt-go/MIGRATION_GUIDE.md
rename to vendor/github.com/form3tech-oss/jwt-go/MIGRATION_GUIDE.md
diff --git a/vendor/github.com/dgrijalva/jwt-go/README.md b/vendor/github.com/form3tech-oss/jwt-go/README.md
similarity index 89%
rename from vendor/github.com/dgrijalva/jwt-go/README.md
rename to vendor/github.com/form3tech-oss/jwt-go/README.md
index d358d881b8d..d7749077fde 100644
--- a/vendor/github.com/dgrijalva/jwt-go/README.md
+++ b/vendor/github.com/form3tech-oss/jwt-go/README.md
@@ -9,7 +9,7 @@ A [go](http://www.golang.org) (or 'golang' for search engine friendliness) imple
**SECURITY NOTICE:** Some older versions of Go have a security issue in the cryotp/elliptic. Recommendation is to upgrade to at least 1.8.3. See issue #216 for more detail.
-**SECURITY NOTICE:** It's important that you [validate the `alg` presented is what you expect](https://auth0.com/blog/2015/03/31/critical-vulnerabilities-in-json-web-token-libraries/). This library attempts to make it easy to do the right thing by requiring key types match the expected alg, but you should take the extra step to verify it in your usage. See the examples provided.
+**SECURITY NOTICE:** It's important that you [validate the `alg` presented is what you expect](https://auth0.com/blog/critical-vulnerabilities-in-json-web-token-libraries/). This library attempts to make it easy to do the right thing by requiring key types match the expected alg, but you should take the extra step to verify it in your usage. See the examples provided.
## What the heck is a JWT?
@@ -19,7 +19,7 @@ In short, it's a signed JSON object that does something useful (for example, aut
The first part is called the header. It contains the necessary information for verifying the last part, the signature. For example, which encryption method was used for signing and what key was used.
-The part in the middle is the interesting bit. It's called the Claims and contains the actual stuff you care about. Refer to [the RFC](http://self-issued.info/docs/draft-jones-json-web-token.html) for information about reserved keys and the proper way to add your own.
+The part in the middle is the interesting bit. It's called the Claims and contains the actual stuff you care about. Refer to [the RFC](http://self-issued.info/docs/draft-ietf-oauth-json-web-token.html) for information about reserved keys and the proper way to add your own.
## What's in the box?
@@ -37,7 +37,7 @@ See [the project documentation](https://godoc.org/github.com/dgrijalva/jwt-go) f
This library publishes all the necessary components for adding your own signing methods. Simply implement the `SigningMethod` interface and register a factory method using `RegisterSigningMethod`.
-Here's an example of an extension that integrates with the Google App Engine signing tools: https://github.com/someone1/gcp-jwt-go
+Here's an example of an extension that integrates with multiple Google Cloud Platform signing tools (AppEngine, IAM API, Cloud KMS): https://github.com/someone1/gcp-jwt-go
## Compliance
@@ -93,6 +93,10 @@ Without going too far down the rabbit hole, here's a description of the interact
* OAuth defines several options for passing around authentication data. One popular method is called a "bearer token". A bearer token is simply a string that _should_ only be held by an authenticated user. Thus, simply presenting this token proves your identity. You can probably derive from here why a JWT might make a good bearer token.
* Because bearer tokens are used for authentication, it's important they're kept secret. This is why transactions that use bearer tokens typically happen over SSL.
+### Troubleshooting
+
+This library uses descriptive error messages whenever possible. If you are not getting the expected result, have a look at the errors. The most common place people get stuck is providing the correct type of key to the parser. See the above section on signing methods and key types.
+
## More
Documentation can be found [on godoc.org](http://godoc.org/github.com/dgrijalva/jwt-go).
diff --git a/vendor/github.com/dgrijalva/jwt-go/VERSION_HISTORY.md b/vendor/github.com/form3tech-oss/jwt-go/VERSION_HISTORY.md
similarity index 100%
rename from vendor/github.com/dgrijalva/jwt-go/VERSION_HISTORY.md
rename to vendor/github.com/form3tech-oss/jwt-go/VERSION_HISTORY.md
diff --git a/vendor/github.com/dgrijalva/jwt-go/claims.go b/vendor/github.com/form3tech-oss/jwt-go/claims.go
similarity index 93%
rename from vendor/github.com/dgrijalva/jwt-go/claims.go
rename to vendor/github.com/form3tech-oss/jwt-go/claims.go
index f0228f02e03..624890666c6 100644
--- a/vendor/github.com/dgrijalva/jwt-go/claims.go
+++ b/vendor/github.com/form3tech-oss/jwt-go/claims.go
@@ -16,7 +16,7 @@ type Claims interface {
// https://tools.ietf.org/html/rfc7519#section-4.1
// See examples for how to use this with your own claim types
type StandardClaims struct {
- Audience string `json:"aud,omitempty"`
+ Audience []string `json:"aud,omitempty"`
ExpiresAt int64 `json:"exp,omitempty"`
Id string `json:"jti,omitempty"`
IssuedAt int64 `json:"iat,omitempty"`
@@ -90,15 +90,17 @@ func (c *StandardClaims) VerifyNotBefore(cmp int64, req bool) bool {
// ----- helpers
-func verifyAud(aud string, cmp string, required bool) bool {
- if aud == "" {
+func verifyAud(aud []string, cmp string, required bool) bool {
+ if len(aud) == 0 {
return !required
}
- if subtle.ConstantTimeCompare([]byte(aud), []byte(cmp)) != 0 {
- return true
- } else {
- return false
+
+ for _, a := range aud {
+ if subtle.ConstantTimeCompare([]byte(a), []byte(cmp)) != 0 {
+ return true
+ }
}
+ return false
}
func verifyExp(exp int64, now int64, required bool) bool {
diff --git a/vendor/github.com/dgrijalva/jwt-go/doc.go b/vendor/github.com/form3tech-oss/jwt-go/doc.go
similarity index 100%
rename from vendor/github.com/dgrijalva/jwt-go/doc.go
rename to vendor/github.com/form3tech-oss/jwt-go/doc.go
diff --git a/vendor/github.com/dgrijalva/jwt-go/ecdsa.go b/vendor/github.com/form3tech-oss/jwt-go/ecdsa.go
similarity index 100%
rename from vendor/github.com/dgrijalva/jwt-go/ecdsa.go
rename to vendor/github.com/form3tech-oss/jwt-go/ecdsa.go
diff --git a/vendor/github.com/dgrijalva/jwt-go/ecdsa_utils.go b/vendor/github.com/form3tech-oss/jwt-go/ecdsa_utils.go
similarity index 93%
rename from vendor/github.com/dgrijalva/jwt-go/ecdsa_utils.go
rename to vendor/github.com/form3tech-oss/jwt-go/ecdsa_utils.go
index d19624b7264..db9f4be7d8e 100644
--- a/vendor/github.com/dgrijalva/jwt-go/ecdsa_utils.go
+++ b/vendor/github.com/form3tech-oss/jwt-go/ecdsa_utils.go
@@ -25,7 +25,9 @@ func ParseECPrivateKeyFromPEM(key []byte) (*ecdsa.PrivateKey, error) {
// Parse the key
var parsedKey interface{}
if parsedKey, err = x509.ParseECPrivateKey(block.Bytes); err != nil {
- return nil, err
+ if parsedKey, err = x509.ParsePKCS8PrivateKey(block.Bytes); err != nil {
+ return nil, err
+ }
}
var pkey *ecdsa.PrivateKey
diff --git a/vendor/github.com/dgrijalva/jwt-go/errors.go b/vendor/github.com/form3tech-oss/jwt-go/errors.go
similarity index 100%
rename from vendor/github.com/dgrijalva/jwt-go/errors.go
rename to vendor/github.com/form3tech-oss/jwt-go/errors.go
diff --git a/vendor/github.com/dgrijalva/jwt-go/hmac.go b/vendor/github.com/form3tech-oss/jwt-go/hmac.go
similarity index 100%
rename from vendor/github.com/dgrijalva/jwt-go/hmac.go
rename to vendor/github.com/form3tech-oss/jwt-go/hmac.go
diff --git a/vendor/github.com/dgrijalva/jwt-go/map_claims.go b/vendor/github.com/form3tech-oss/jwt-go/map_claims.go
similarity index 94%
rename from vendor/github.com/dgrijalva/jwt-go/map_claims.go
rename to vendor/github.com/form3tech-oss/jwt-go/map_claims.go
index 291213c460d..90ab6bea350 100644
--- a/vendor/github.com/dgrijalva/jwt-go/map_claims.go
+++ b/vendor/github.com/form3tech-oss/jwt-go/map_claims.go
@@ -13,7 +13,15 @@ type MapClaims map[string]interface{}
// Compares the aud claim against cmp.
// If required is false, this method will return true if the value matches or is unset
func (m MapClaims) VerifyAudience(cmp string, req bool) bool {
- aud, _ := m["aud"].(string)
+ aud, ok := m["aud"].([]string)
+ if !ok {
+ strAud, ok := m["aud"].(string)
+ if !ok {
+ return false
+ }
+ aud = append(aud, strAud)
+ }
+
return verifyAud(aud, cmp, req)
}
diff --git a/vendor/github.com/dgrijalva/jwt-go/none.go b/vendor/github.com/form3tech-oss/jwt-go/none.go
similarity index 100%
rename from vendor/github.com/dgrijalva/jwt-go/none.go
rename to vendor/github.com/form3tech-oss/jwt-go/none.go
diff --git a/vendor/github.com/dgrijalva/jwt-go/parser.go b/vendor/github.com/form3tech-oss/jwt-go/parser.go
similarity index 100%
rename from vendor/github.com/dgrijalva/jwt-go/parser.go
rename to vendor/github.com/form3tech-oss/jwt-go/parser.go
diff --git a/vendor/github.com/dgrijalva/jwt-go/rsa.go b/vendor/github.com/form3tech-oss/jwt-go/rsa.go
similarity index 100%
rename from vendor/github.com/dgrijalva/jwt-go/rsa.go
rename to vendor/github.com/form3tech-oss/jwt-go/rsa.go
diff --git a/vendor/github.com/dgrijalva/jwt-go/rsa_pss.go b/vendor/github.com/form3tech-oss/jwt-go/rsa_pss.go
similarity index 71%
rename from vendor/github.com/dgrijalva/jwt-go/rsa_pss.go
rename to vendor/github.com/form3tech-oss/jwt-go/rsa_pss.go
index 10ee9db8a4e..c0147086480 100644
--- a/vendor/github.com/dgrijalva/jwt-go/rsa_pss.go
+++ b/vendor/github.com/form3tech-oss/jwt-go/rsa_pss.go
@@ -12,9 +12,14 @@ import (
type SigningMethodRSAPSS struct {
*SigningMethodRSA
Options *rsa.PSSOptions
+ // VerifyOptions is optional. If set overrides Options for rsa.VerifyPPS.
+ // Used to accept tokens signed with rsa.PSSSaltLengthAuto, what doesn't follow
+ // https://tools.ietf.org/html/rfc7518#section-3.5 but was used previously.
+ // See https://github.com/dgrijalva/jwt-go/issues/285#issuecomment-437451244 for details.
+ VerifyOptions *rsa.PSSOptions
}
-// Specific instances for RS/PS and company
+// Specific instances for RS/PS and company.
var (
SigningMethodPS256 *SigningMethodRSAPSS
SigningMethodPS384 *SigningMethodRSAPSS
@@ -24,13 +29,15 @@ var (
func init() {
// PS256
SigningMethodPS256 = &SigningMethodRSAPSS{
- &SigningMethodRSA{
+ SigningMethodRSA: &SigningMethodRSA{
Name: "PS256",
Hash: crypto.SHA256,
},
- &rsa.PSSOptions{
+ Options: &rsa.PSSOptions{
+ SaltLength: rsa.PSSSaltLengthEqualsHash,
+ },
+ VerifyOptions: &rsa.PSSOptions{
SaltLength: rsa.PSSSaltLengthAuto,
- Hash: crypto.SHA256,
},
}
RegisterSigningMethod(SigningMethodPS256.Alg(), func() SigningMethod {
@@ -39,13 +46,15 @@ func init() {
// PS384
SigningMethodPS384 = &SigningMethodRSAPSS{
- &SigningMethodRSA{
+ SigningMethodRSA: &SigningMethodRSA{
Name: "PS384",
Hash: crypto.SHA384,
},
- &rsa.PSSOptions{
+ Options: &rsa.PSSOptions{
+ SaltLength: rsa.PSSSaltLengthEqualsHash,
+ },
+ VerifyOptions: &rsa.PSSOptions{
SaltLength: rsa.PSSSaltLengthAuto,
- Hash: crypto.SHA384,
},
}
RegisterSigningMethod(SigningMethodPS384.Alg(), func() SigningMethod {
@@ -54,13 +63,15 @@ func init() {
// PS512
SigningMethodPS512 = &SigningMethodRSAPSS{
- &SigningMethodRSA{
+ SigningMethodRSA: &SigningMethodRSA{
Name: "PS512",
Hash: crypto.SHA512,
},
- &rsa.PSSOptions{
+ Options: &rsa.PSSOptions{
+ SaltLength: rsa.PSSSaltLengthEqualsHash,
+ },
+ VerifyOptions: &rsa.PSSOptions{
SaltLength: rsa.PSSSaltLengthAuto,
- Hash: crypto.SHA512,
},
}
RegisterSigningMethod(SigningMethodPS512.Alg(), func() SigningMethod {
@@ -94,7 +105,12 @@ func (m *SigningMethodRSAPSS) Verify(signingString, signature string, key interf
hasher := m.Hash.New()
hasher.Write([]byte(signingString))
- return rsa.VerifyPSS(rsaKey, m.Hash, hasher.Sum(nil), sig, m.Options)
+ opts := m.Options
+ if m.VerifyOptions != nil {
+ opts = m.VerifyOptions
+ }
+
+ return rsa.VerifyPSS(rsaKey, m.Hash, hasher.Sum(nil), sig, opts)
}
// Implements the Sign method from SigningMethod
diff --git a/vendor/github.com/dgrijalva/jwt-go/rsa_utils.go b/vendor/github.com/form3tech-oss/jwt-go/rsa_utils.go
similarity index 95%
rename from vendor/github.com/dgrijalva/jwt-go/rsa_utils.go
rename to vendor/github.com/form3tech-oss/jwt-go/rsa_utils.go
index a5ababf956c..14c78c292a9 100644
--- a/vendor/github.com/dgrijalva/jwt-go/rsa_utils.go
+++ b/vendor/github.com/form3tech-oss/jwt-go/rsa_utils.go
@@ -8,7 +8,7 @@ import (
)
var (
- ErrKeyMustBePEMEncoded = errors.New("Invalid Key: Key must be PEM encoded PKCS1 or PKCS8 private key")
+ ErrKeyMustBePEMEncoded = errors.New("Invalid Key: Key must be a PEM encoded PKCS1 or PKCS8 key")
ErrNotRSAPrivateKey = errors.New("Key is not a valid RSA private key")
ErrNotRSAPublicKey = errors.New("Key is not a valid RSA public key")
)
diff --git a/vendor/github.com/dgrijalva/jwt-go/signing_method.go b/vendor/github.com/form3tech-oss/jwt-go/signing_method.go
similarity index 100%
rename from vendor/github.com/dgrijalva/jwt-go/signing_method.go
rename to vendor/github.com/form3tech-oss/jwt-go/signing_method.go
diff --git a/vendor/github.com/dgrijalva/jwt-go/token.go b/vendor/github.com/form3tech-oss/jwt-go/token.go
similarity index 100%
rename from vendor/github.com/dgrijalva/jwt-go/token.go
rename to vendor/github.com/form3tech-oss/jwt-go/token.go
diff --git a/vendor/github.com/go-openapi/jsonpointer/.travis.yml b/vendor/github.com/go-openapi/jsonpointer/.travis.yml
index 9aef9184e86..03a22fe06fd 100644
--- a/vendor/github.com/go-openapi/jsonpointer/.travis.yml
+++ b/vendor/github.com/go-openapi/jsonpointer/.travis.yml
@@ -1,8 +1,8 @@
after_success:
- bash <(curl -s https://codecov.io/bash)
go:
-- 1.11.x
-- 1.12.x
+- 1.14.x
+- 1.15.x
install:
- GO111MODULE=off go get -u gotest.tools/gotestsum
env:
diff --git a/vendor/github.com/go-openapi/jsonpointer/pointer.go b/vendor/github.com/go-openapi/jsonpointer/pointer.go
index b284eb77a62..7df9853def6 100644
--- a/vendor/github.com/go-openapi/jsonpointer/pointer.go
+++ b/vendor/github.com/go-openapi/jsonpointer/pointer.go
@@ -114,16 +114,16 @@ func getSingleImpl(node interface{}, decodedToken string, nameProvider *swag.Nam
rValue := reflect.Indirect(reflect.ValueOf(node))
kind := rValue.Kind()
- switch kind {
+ if rValue.Type().Implements(jsonPointableType) {
+ r, err := node.(JSONPointable).JSONLookup(decodedToken)
+ if err != nil {
+ return nil, kind, err
+ }
+ return r, kind, nil
+ }
+ switch kind {
case reflect.Struct:
- if rValue.Type().Implements(jsonPointableType) {
- r, err := node.(JSONPointable).JSONLookup(decodedToken)
- if err != nil {
- return nil, kind, err
- }
- return r, kind, nil
- }
nm, ok := nameProvider.GetGoNameForType(rValue.Type(), decodedToken)
if !ok {
return nil, kind, fmt.Errorf("object has no field %q", decodedToken)
@@ -161,17 +161,17 @@ func getSingleImpl(node interface{}, decodedToken string, nameProvider *swag.Nam
func setSingleImpl(node, data interface{}, decodedToken string, nameProvider *swag.NameProvider) error {
rValue := reflect.Indirect(reflect.ValueOf(node))
- switch rValue.Kind() {
- case reflect.Struct:
- if ns, ok := node.(JSONSetable); ok { // pointer impl
- return ns.JSONSet(decodedToken, data)
- }
+ if ns, ok := node.(JSONSetable); ok { // pointer impl
+ return ns.JSONSet(decodedToken, data)
+ }
- if rValue.Type().Implements(jsonSetableType) {
- return node.(JSONSetable).JSONSet(decodedToken, data)
- }
+ if rValue.Type().Implements(jsonSetableType) {
+ return node.(JSONSetable).JSONSet(decodedToken, data)
+ }
+ switch rValue.Kind() {
+ case reflect.Struct:
nm, ok := nameProvider.GetGoNameForType(rValue.Type(), decodedToken)
if !ok {
return fmt.Errorf("object has no field %q", decodedToken)
@@ -270,22 +270,22 @@ func (p *Pointer) set(node, data interface{}, nameProvider *swag.NameProvider) e
rValue := reflect.Indirect(reflect.ValueOf(node))
kind := rValue.Kind()
- switch kind {
-
- case reflect.Struct:
- if rValue.Type().Implements(jsonPointableType) {
- r, err := node.(JSONPointable).JSONLookup(decodedToken)
- if err != nil {
- return err
- }
- fld := reflect.ValueOf(r)
- if fld.CanAddr() && fld.Kind() != reflect.Interface && fld.Kind() != reflect.Map && fld.Kind() != reflect.Slice && fld.Kind() != reflect.Ptr {
- node = fld.Addr().Interface()
- continue
- }
- node = r
+ if rValue.Type().Implements(jsonPointableType) {
+ r, err := node.(JSONPointable).JSONLookup(decodedToken)
+ if err != nil {
+ return err
+ }
+ fld := reflect.ValueOf(r)
+ if fld.CanAddr() && fld.Kind() != reflect.Interface && fld.Kind() != reflect.Map && fld.Kind() != reflect.Slice && fld.Kind() != reflect.Ptr {
+ node = fld.Addr().Interface()
continue
}
+ node = r
+ continue
+ }
+
+ switch kind {
+ case reflect.Struct:
nm, ok := nameProvider.GetGoNameForType(rValue.Type(), decodedToken)
if !ok {
return fmt.Errorf("object has no field %q", decodedToken)
diff --git a/vendor/github.com/go-openapi/swag/.golangci.yml b/vendor/github.com/go-openapi/swag/.golangci.yml
index 625c3d6affe..7fae938e645 100644
--- a/vendor/github.com/go-openapi/swag/.golangci.yml
+++ b/vendor/github.com/go-openapi/swag/.golangci.yml
@@ -20,3 +20,19 @@ linters:
- lll
- gochecknoinits
- gochecknoglobals
+ - nlreturn
+ - testpackage
+ - wrapcheck
+ - gomnd
+ - exhaustive
+ - exhaustivestruct
+ - goerr113
+ - wsl
+ - whitespace
+ - gofumpt
+ - godot
+ - nestif
+ - godox
+ - funlen
+ - gci
+ - gocognit
diff --git a/vendor/github.com/go-openapi/swag/.travis.yml b/vendor/github.com/go-openapi/swag/.travis.yml
index f1a3f80b350..153c7d345d2 100644
--- a/vendor/github.com/go-openapi/swag/.travis.yml
+++ b/vendor/github.com/go-openapi/swag/.travis.yml
@@ -1,8 +1,42 @@
after_success:
- bash <(curl -s https://codecov.io/bash)
go:
-- 1.13.x
- 1.14.x
+- 1.x
+arch:
+- amd64
+jobs:
+ include:
+ # remove install dependencies on go 1.11.x - skip testing for race
+ - go: 1.11.x
+ arch: amd64
+ env: GO111MODULE=on
+ install: ~
+ script:
+ - go test -v
+
+ # remove install dependencies on go 1.11.5
+ - go: 1.11.5
+ arch: amd64
+ env: GO111MODULE=on
+ install: ~
+ script:
+ - go test -v -race
+
+ # include arch ppc, but only for latest go version - skip testing for race
+ - go: 1.x
+ arch: ppc64le
+ install: ~
+ script:
+ - go test -v
+
+ # include linting job, but only for latest go version and amd64 arch
+ - go: 1.x
+ arch: amd64
+ install:
+ go get github.com/golangci/golangci-lint/cmd/golangci-lint
+ script:
+ - golangci-lint run --new-from-rev master
install:
- GO111MODULE=off go get -u gotest.tools/gotestsum
language: go
diff --git a/vendor/github.com/go-openapi/swag/go.mod b/vendor/github.com/go-openapi/swag/go.mod
index 4aef463e425..6eb81956f8d 100644
--- a/vendor/github.com/go-openapi/swag/go.mod
+++ b/vendor/github.com/go-openapi/swag/go.mod
@@ -2,15 +2,17 @@ module github.com/go-openapi/swag
require (
github.com/davecgh/go-spew v1.1.1 // indirect
- github.com/kr/pretty v0.1.0 // indirect
- github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63
- github.com/stretchr/testify v1.3.0
- gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 // indirect
- gopkg.in/yaml.v2 v2.2.4
+ github.com/kr/text v0.2.0 // indirect
+ github.com/mailru/easyjson v0.7.6
+ github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect
+ github.com/stretchr/testify v1.6.1
+ gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f // indirect
+ gopkg.in/yaml.v2 v2.3.0
+ gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776 // indirect
)
replace github.com/golang/lint => golang.org/x/lint v0.0.0-20190409202823-959b441ac422
replace sourcegraph.com/sourcegraph/go-diff => github.com/sourcegraph/go-diff v0.5.1
-go 1.13
+go 1.11
diff --git a/vendor/github.com/go-openapi/swag/go.sum b/vendor/github.com/go-openapi/swag/go.sum
index e8a80bacf0a..16f90fe2e07 100644
--- a/vendor/github.com/go-openapi/swag/go.sum
+++ b/vendor/github.com/go-openapi/swag/go.sum
@@ -1,20 +1,29 @@
+github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
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/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI=
-github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
+github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY=
+github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y=
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/mailru/easyjson v0.0.0-20190614124828-94de47d64c63 h1:nTT4s92Dgz2HlrB2NaMgvlfqHH39OgMhA7z3PK7PGD4=
-github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
+github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
+github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
+github.com/mailru/easyjson v0.7.6 h1:8yTIVnZgCoiM1TgqoeTl+LfU5Jg6/xL3QhGQnimLYnA=
+github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc=
+github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs=
+github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno=
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/stretchr/objx v0.1.0 h1:4G4v2dO3VZwixGIRoQ5Lfboy6nUhCyYzaqnIAPPhYs4=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
-github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q=
-github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
+github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0=
+github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
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/yaml.v2 v2.2.4 h1:/eiJrUcujPVeJ3xlSWaiNi3uSVmDGBK1pDHUHAnao1I=
-gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
+gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU=
+gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
+gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU=
+gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
+gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
+gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776 h1:tQIYjPdBoyREyB9XMu+nnTclpTYkz2zFM+lzLJFO4gQ=
+gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
diff --git a/vendor/github.com/go-openapi/swag/loading.go b/vendor/github.com/go-openapi/swag/loading.go
index 04160b89ba9..0bb22df1402 100644
--- a/vendor/github.com/go-openapi/swag/loading.go
+++ b/vendor/github.com/go-openapi/swag/loading.go
@@ -53,7 +53,7 @@ func LoadStrategy(path string, local, remote func(string) ([]byte, error)) func(
return remote
}
return func(pth string) ([]byte, error) {
- upth, err := pathUnescape(pth)
+ upth, err := pathUnescape(strings.TrimPrefix(pth, `file://`))
if err != nil {
return nil, err
}
@@ -64,7 +64,7 @@ func LoadStrategy(path string, local, remote func(string) ([]byte, error)) func(
func loadHTTPBytes(timeout time.Duration) func(path string) ([]byte, error) {
return func(path string) ([]byte, error) {
client := &http.Client{Timeout: timeout}
- req, err := http.NewRequest("GET", path, nil)
+ req, err := http.NewRequest("GET", path, nil) // nolint: noctx
if err != nil {
return nil, err
}
diff --git a/vendor/github.com/go-openapi/swag/util.go b/vendor/github.com/go-openapi/swag/util.go
index 9eac16afb2e..c5bc570f677 100644
--- a/vendor/github.com/go-openapi/swag/util.go
+++ b/vendor/github.com/go-openapi/swag/util.go
@@ -91,7 +91,7 @@ func init() {
}
const (
- //collectionFormatComma = "csv"
+ // collectionFormatComma = "csv"
collectionFormatSpace = "ssv"
collectionFormatTab = "tsv"
collectionFormatPipe = "pipes"
@@ -370,7 +370,7 @@ func IsZero(data interface{}) bool {
// AddInitialisms add additional initialisms
func AddInitialisms(words ...string) {
for _, word := range words {
- //commonInitialisms[upper(word)] = true
+ // commonInitialisms[upper(word)] = true
commonInitialisms.add(upper(word))
}
// sort again
diff --git a/vendor/github.com/golangci/golangci-lint/pkg/commands/completion.go b/vendor/github.com/golangci/golangci-lint/pkg/commands/completion.go
index 7d919d19766..e2be6f29292 100644
--- a/vendor/github.com/golangci/golangci-lint/pkg/commands/completion.go
+++ b/vendor/github.com/golangci/golangci-lint/pkg/commands/completion.go
@@ -28,6 +28,20 @@ func (e *Executor) initCompletion() {
RunE: e.executeZshCompletion,
}
completionCmd.AddCommand(zshCmd)
+
+ fishCmd := &cobra.Command{
+ Use: "fish",
+ Short: "Output fish completion script",
+ RunE: e.executeFishCompletion,
+ }
+ completionCmd.AddCommand(fishCmd)
+
+ powerShell := &cobra.Command{
+ Use: "powershell",
+ Short: "Output powershell completion script",
+ RunE: e.executePowerShellCompletion,
+ }
+ completionCmd.AddCommand(powerShell)
}
func (e *Executor) executeBashCompletion(cmd *cobra.Command, args []string) error {
@@ -51,3 +65,21 @@ func (e *Executor) executeZshCompletion(cmd *cobra.Command, args []string) error
return nil
}
+
+func (e *Executor) executeFishCompletion(cmd *cobra.Command, args []string) error {
+ err := cmd.Root().GenFishCompletion(os.Stdout, true)
+ if err != nil {
+ return errors.Wrap(err, "generate fish completion")
+ }
+
+ return nil
+}
+
+func (e *Executor) executePowerShellCompletion(cmd *cobra.Command, args []string) error {
+ err := cmd.Root().GenPowerShellCompletion(os.Stdout)
+ if err != nil {
+ return errors.Wrap(err, "generate powershell completion")
+ }
+
+ return nil
+}
diff --git a/vendor/github.com/golangci/golangci-lint/pkg/config/config.go b/vendor/github.com/golangci/golangci-lint/pkg/config/config.go
index 9689ea0922b..5b73a36de34 100644
--- a/vendor/github.com/golangci/golangci-lint/pkg/config/config.go
+++ b/vendor/github.com/golangci/golangci-lint/pkg/config/config.go
@@ -249,6 +249,7 @@ type LintersSettings struct {
NoLintLint NoLintLintSettings
Exhaustive ExhaustiveSettings
Gofumpt GofumptSettings
+ ErrorLint ErrorLintSettings
Custom map[string]CustomLinterSettings
}
@@ -353,6 +354,7 @@ type NestifSettings struct {
}
type ExhaustiveSettings struct {
+ CheckGenerated bool `mapstructure:"check-generated"`
DefaultSignifiesExhaustive bool `mapstructure:"default-signifies-exhaustive"`
}
@@ -360,6 +362,10 @@ type GofumptSettings struct {
ExtraRules bool `mapstructure:"extra-rules"`
}
+type ErrorLintSettings struct {
+ Errorf bool `mapstructure:"errorf"`
+}
+
var defaultLintersSettings = LintersSettings{
Lll: LllSettings{
LineLength: 120,
@@ -411,11 +417,15 @@ var defaultLintersSettings = LintersSettings{
MinComplexity: 5,
},
Exhaustive: ExhaustiveSettings{
+ CheckGenerated: false,
DefaultSignifiesExhaustive: false,
},
Gofumpt: GofumptSettings{
ExtraRules: false,
},
+ ErrorLint: ErrorLintSettings{
+ Errorf: true,
+ },
}
type CustomLinterSettings struct {
diff --git a/vendor/github.com/golangci/golangci-lint/pkg/golinters/errorlint.go b/vendor/github.com/golangci/golangci-lint/pkg/golinters/errorlint.go
new file mode 100644
index 00000000000..5b656d140a7
--- /dev/null
+++ b/vendor/github.com/golangci/golangci-lint/pkg/golinters/errorlint.go
@@ -0,0 +1,27 @@
+package golinters
+
+import (
+ "github.com/polyfloyd/go-errorlint/errorlint"
+ "golang.org/x/tools/go/analysis"
+
+ "github.com/golangci/golangci-lint/pkg/config"
+ "github.com/golangci/golangci-lint/pkg/golinters/goanalysis"
+)
+
+func NewErrorLint(cfg *config.ErrorLintSettings) *goanalysis.Linter {
+ a := errorlint.NewAnalyzer()
+ cfgMap := map[string]map[string]interface{}{}
+ if cfg != nil {
+ cfgMap[a.Name] = map[string]interface{}{
+ "errorf": cfg.Errorf,
+ }
+ }
+ return goanalysis.NewLinter(
+ "errorlint",
+ "go-errorlint is a source code linter for Go software "+
+ "that can be used to find code that will cause problems"+
+ "with the error wrapping scheme introduced in Go 1.13.",
+ []*analysis.Analyzer{a},
+ cfgMap,
+ ).WithLoadMode(goanalysis.LoadModeTypesInfo)
+}
diff --git a/vendor/github.com/golangci/golangci-lint/pkg/golinters/exhaustive.go b/vendor/github.com/golangci/golangci-lint/pkg/golinters/exhaustive.go
index cae37ecc61d..85534d42cda 100644
--- a/vendor/github.com/golangci/golangci-lint/pkg/golinters/exhaustive.go
+++ b/vendor/github.com/golangci/golangci-lint/pkg/golinters/exhaustive.go
@@ -15,6 +15,7 @@ func NewExhaustive(settings *config.ExhaustiveSettings) *goanalysis.Linter {
if settings != nil {
cfg = map[string]map[string]interface{}{
a.Name: {
+ exhaustive.CheckGeneratedFlag: settings.CheckGenerated,
exhaustive.DefaultSignifiesExhaustiveFlag: settings.DefaultSignifiesExhaustive,
},
}
diff --git a/vendor/github.com/golangci/golangci-lint/pkg/golinters/exhaustivestruct.go b/vendor/github.com/golangci/golangci-lint/pkg/golinters/exhaustivestruct.go
new file mode 100644
index 00000000000..d84746141de
--- /dev/null
+++ b/vendor/github.com/golangci/golangci-lint/pkg/golinters/exhaustivestruct.go
@@ -0,0 +1,17 @@
+package golinters
+
+import (
+ "github.com/mbilski/exhaustivestruct/pkg/analyzer"
+ "golang.org/x/tools/go/analysis"
+
+ "github.com/golangci/golangci-lint/pkg/golinters/goanalysis"
+)
+
+func NewExhaustiveStruct() *goanalysis.Linter {
+ return goanalysis.NewLinter(
+ "exhaustivestruct",
+ "Checks if all struct's fields are initialized",
+ []*analysis.Analyzer{analyzer.Analyzer},
+ nil,
+ ).WithLoadMode(goanalysis.LoadModeTypesInfo)
+}
diff --git a/vendor/github.com/golangci/golangci-lint/pkg/golinters/gochecknoglobals.go b/vendor/github.com/golangci/golangci-lint/pkg/golinters/gochecknoglobals.go
index f2166416be3..37fed44849a 100644
--- a/vendor/github.com/golangci/golangci-lint/pkg/golinters/gochecknoglobals.go
+++ b/vendor/github.com/golangci/golangci-lint/pkg/golinters/gochecknoglobals.go
@@ -1,100 +1,30 @@
package golinters
import (
- "fmt"
- "go/ast"
- "go/token"
- "strings"
- "sync"
-
"golang.org/x/tools/go/analysis"
+ "4d63.com/gochecknoglobals/checknoglobals"
+
"github.com/golangci/golangci-lint/pkg/golinters/goanalysis"
- "github.com/golangci/golangci-lint/pkg/lint/linter"
- "github.com/golangci/golangci-lint/pkg/result"
)
-const gochecknoglobalsName = "gochecknoglobals"
-
-//nolint:dupl
func NewGochecknoglobals() *goanalysis.Linter {
- var mu sync.Mutex
- var resIssues []goanalysis.Issue
-
- analyzer := &analysis.Analyzer{
- Name: gochecknoglobalsName,
- Doc: goanalysis.TheOnlyanalyzerDoc,
- Run: func(pass *analysis.Pass) (interface{}, error) {
- var res []goanalysis.Issue
- for _, file := range pass.Files {
- fileIssues := checkFileForGlobals(file, pass.Fset)
- for i := range fileIssues {
- res = append(res, goanalysis.NewIssue(&fileIssues[i], pass))
- }
- }
- if len(res) == 0 {
- return nil, nil
- }
-
- mu.Lock()
- resIssues = append(resIssues, res...)
- mu.Unlock()
-
- return nil, nil
+ gochecknoglobals := checknoglobals.Analyzer()
+
+ // gochecknoglobals only lints test files if the `-t` flag is passed so we
+ // pass the `t` flag as true to the analyzer before running it. This can be
+ // turned of by using the regular golangci-lint flags such as `--tests` or
+ // `--skip-files`.
+ linterConfig := map[string]map[string]interface{}{
+ gochecknoglobals.Name: {
+ "t": true,
},
}
- return goanalysis.NewLinter(
- gochecknoglobalsName,
- "Checks that no globals are present in Go code",
- []*analysis.Analyzer{analyzer},
- nil,
- ).WithIssuesReporter(func(*linter.Context) []goanalysis.Issue {
- return resIssues
- }).WithLoadMode(goanalysis.LoadModeSyntax)
-}
-
-func checkFileForGlobals(f *ast.File, fset *token.FileSet) []result.Issue {
- var res []result.Issue
- for _, decl := range f.Decls {
- genDecl, ok := decl.(*ast.GenDecl)
- if !ok {
- continue
- }
- if genDecl.Tok != token.VAR {
- continue
- }
-
- for _, spec := range genDecl.Specs {
- valueSpec := spec.(*ast.ValueSpec)
- for _, vn := range valueSpec.Names {
- if isWhitelisted(vn) {
- continue
- }
-
- res = append(res, result.Issue{
- Pos: fset.Position(vn.Pos()),
- Text: fmt.Sprintf("%s is a global variable", formatCode(vn.Name, nil)),
- FromLinter: gochecknoglobalsName,
- })
- }
- }
- }
-
- return res
-}
-func isWhitelisted(i *ast.Ident) bool {
- return i.Name == "_" || i.Name == "version" || looksLikeError(i)
-}
-
-// looksLikeError returns true if the AST identifier starts
-// with 'err' or 'Err', or false otherwise.
-//
-// TODO: https://github.com/leighmcculloch/gochecknoglobals/issues/5
-func looksLikeError(i *ast.Ident) bool {
- prefix := "err"
- if i.IsExported() {
- prefix = "Err"
- }
- return strings.HasPrefix(i.Name, prefix)
+ return goanalysis.NewLinter(
+ gochecknoglobals.Name,
+ gochecknoglobals.Doc,
+ []*analysis.Analyzer{gochecknoglobals},
+ linterConfig,
+ ).WithLoadMode(goanalysis.LoadModeSyntax)
}
diff --git a/vendor/github.com/golangci/golangci-lint/pkg/golinters/gochecknoinits.go b/vendor/github.com/golangci/golangci-lint/pkg/golinters/gochecknoinits.go
index 18465b13068..f9715bda868 100644
--- a/vendor/github.com/golangci/golangci-lint/pkg/golinters/gochecknoinits.go
+++ b/vendor/github.com/golangci/golangci-lint/pkg/golinters/gochecknoinits.go
@@ -15,7 +15,6 @@ import (
const gochecknoinitsName = "gochecknoinits"
-//nolint:dupl
func NewGochecknoinits() *goanalysis.Linter {
var mu sync.Mutex
var resIssues []goanalysis.Issue
diff --git a/vendor/github.com/golangci/golangci-lint/pkg/golinters/tparallel.go b/vendor/github.com/golangci/golangci-lint/pkg/golinters/tparallel.go
new file mode 100644
index 00000000000..a4b96eb7353
--- /dev/null
+++ b/vendor/github.com/golangci/golangci-lint/pkg/golinters/tparallel.go
@@ -0,0 +1,21 @@
+package golinters
+
+import (
+ "github.com/moricho/tparallel"
+ "golang.org/x/tools/go/analysis"
+
+ "github.com/golangci/golangci-lint/pkg/golinters/goanalysis"
+)
+
+func NewTparallel() *goanalysis.Linter {
+ analyzers := []*analysis.Analyzer{
+ tparallel.Analyzer,
+ }
+
+ return goanalysis.NewLinter(
+ "tparallel",
+ "tparallel detects inappropriate usage of t.Parallel() method in your Go test codes",
+ analyzers,
+ nil,
+ ).WithLoadMode(goanalysis.LoadModeTypesInfo)
+}
diff --git a/vendor/github.com/golangci/golangci-lint/pkg/golinters/wrapcheck.go b/vendor/github.com/golangci/golangci-lint/pkg/golinters/wrapcheck.go
new file mode 100644
index 00000000000..e1592e50b5b
--- /dev/null
+++ b/vendor/github.com/golangci/golangci-lint/pkg/golinters/wrapcheck.go
@@ -0,0 +1,19 @@
+package golinters
+
+import (
+ "github.com/tomarrell/wrapcheck/wrapcheck"
+ "golang.org/x/tools/go/analysis"
+
+ "github.com/golangci/golangci-lint/pkg/golinters/goanalysis"
+)
+
+const wrapcheckName = "wrapcheck"
+
+func NewWrapcheck() *goanalysis.Linter {
+ return goanalysis.NewLinter(
+ wrapcheckName,
+ wrapcheck.Analyzer.Doc,
+ []*analysis.Analyzer{wrapcheck.Analyzer},
+ nil,
+ ).WithLoadMode(goanalysis.LoadModeTypesInfo)
+}
diff --git a/vendor/github.com/golangci/golangci-lint/pkg/lint/lintersdb/manager.go b/vendor/github.com/golangci/golangci-lint/pkg/lint/lintersdb/manager.go
index 7ffaf9c2e22..52a230bd805 100644
--- a/vendor/github.com/golangci/golangci-lint/pkg/lint/lintersdb/manager.go
+++ b/vendor/github.com/golangci/golangci-lint/pkg/lint/lintersdb/manager.go
@@ -56,8 +56,10 @@ func (m *Manager) WithCustomLinters() *Manager {
}
func (Manager) AllPresets() []string {
- return []string{linter.PresetBugs, linter.PresetComplexity, linter.PresetFormatting,
- linter.PresetPerformance, linter.PresetStyle, linter.PresetUnused}
+ return []string{
+ linter.PresetBugs, linter.PresetComplexity, linter.PresetFormatting,
+ linter.PresetPerformance, linter.PresetStyle, linter.PresetUnused,
+ }
}
func (m Manager) allPresetsSet() map[string]bool {
@@ -88,10 +90,12 @@ func (m Manager) GetAllSupportedLinterConfigs() []*linter.Config {
var govetCfg *config.GovetSettings
var testpackageCfg *config.TestpackageSettings
var exhaustiveCfg *config.ExhaustiveSettings
+ var errorlintCfg *config.ErrorLintSettings
if m.cfg != nil {
govetCfg = &m.cfg.LintersSettings.Govet
testpackageCfg = &m.cfg.LintersSettings.Testpackage
exhaustiveCfg = &m.cfg.LintersSettings.Exhaustive
+ errorlintCfg = &m.cfg.LintersSettings.ErrorLint
}
const megacheckName = "megacheck"
lcs := []*linter.Config{
@@ -305,6 +309,22 @@ func (m Manager) GetAllSupportedLinterConfigs() []*linter.Config {
WithPresets(linter.PresetStyle).
WithLoadForGoAnalysis().
WithURL("https://github.com/ssgreg/nlreturn"),
+ linter.NewConfig(golinters.NewWrapcheck()).
+ WithPresets(linter.PresetStyle).
+ WithLoadForGoAnalysis().
+ WithURL("https://github.com/tomarrell/wrapcheck"),
+ linter.NewConfig(golinters.NewTparallel()).
+ WithPresets(linter.PresetStyle).
+ WithLoadForGoAnalysis().
+ WithURL("https://github.com/moricho/tparallel"),
+ linter.NewConfig(golinters.NewExhaustiveStruct()).
+ WithPresets(linter.PresetStyle).
+ WithURL("https://github.com/mbilski/exhaustivestruct"),
+ linter.NewConfig(golinters.NewErrorLint(errorlintCfg)).
+ WithPresets(linter.PresetBugs).
+ WithLoadForGoAnalysis().
+ WithURL("https://github.com/polyfloyd/go-errorlint"),
+
// nolintlint must be last because it looks at the results of all the previous linters for unused nolint directives
linter.NewConfig(golinters.NewNoLintLint()).
WithPresets(linter.PresetStyle).
diff --git a/vendor/github.com/golangci/golangci-lint/pkg/result/processors/severity_rules.go b/vendor/github.com/golangci/golangci-lint/pkg/result/processors/severity_rules.go
index 5f11b54101c..7c9a4c1d63a 100644
--- a/vendor/github.com/golangci/golangci-lint/pkg/result/processors/severity_rules.go
+++ b/vendor/github.com/golangci/golangci-lint/pkg/result/processors/severity_rules.go
@@ -57,7 +57,7 @@ func createSeverityRules(rules []SeverityRule, prefix string) []severityRule {
}
func (p SeverityRules) Process(issues []result.Issue) ([]result.Issue, error) {
- if len(p.rules) == 0 {
+ if len(p.rules) == 0 && p.defaultSeverity == "" {
return issues, nil
}
return transformIssues(issues, func(i *result.Issue) *result.Issue {
diff --git a/vendor/github.com/google/uuid/hash.go b/vendor/github.com/google/uuid/hash.go
index b1746163151..b404f4bec27 100644
--- a/vendor/github.com/google/uuid/hash.go
+++ b/vendor/github.com/google/uuid/hash.go
@@ -26,8 +26,8 @@ var (
// NewMD5 and NewSHA1.
func NewHash(h hash.Hash, space UUID, data []byte, version int) UUID {
h.Reset()
- h.Write(space[:])
- h.Write(data)
+ h.Write(space[:]) //nolint:errcheck
+ h.Write(data) //nolint:errcheck
s := h.Sum(nil)
var uuid UUID
copy(uuid[:], s)
diff --git a/vendor/github.com/google/uuid/sql.go b/vendor/github.com/google/uuid/sql.go
index f326b54db37..2e02ec06c01 100644
--- a/vendor/github.com/google/uuid/sql.go
+++ b/vendor/github.com/google/uuid/sql.go
@@ -9,7 +9,7 @@ import (
"fmt"
)
-// Scan implements sql.Scanner so UUIDs can be read from databases transparently
+// Scan implements sql.Scanner so UUIDs can be read from databases transparently.
// Currently, database types that map to string and []byte are supported. Please
// consult database-specific driver documentation for matching types.
func (uuid *UUID) Scan(src interface{}) error {
diff --git a/vendor/github.com/google/uuid/uuid.go b/vendor/github.com/google/uuid/uuid.go
index 524404cc522..60d26bb50c6 100644
--- a/vendor/github.com/google/uuid/uuid.go
+++ b/vendor/github.com/google/uuid/uuid.go
@@ -35,6 +35,12 @@ const (
var rander = rand.Reader // random function
+type invalidLengthError struct{ len int }
+
+func (err invalidLengthError) Error() string {
+ return fmt.Sprintf("invalid UUID length: %d", err.len)
+}
+
// Parse decodes s into a UUID or returns an error. Both the standard UUID
// forms of xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx and
// urn:uuid:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx are decoded as well as the
@@ -68,7 +74,7 @@ func Parse(s string) (UUID, error) {
}
return uuid, nil
default:
- return uuid, fmt.Errorf("invalid UUID length: %d", len(s))
+ return uuid, invalidLengthError{len(s)}
}
// s is now at least 36 bytes long
// it must be of the form xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
@@ -112,7 +118,7 @@ func ParseBytes(b []byte) (UUID, error) {
}
return uuid, nil
default:
- return uuid, fmt.Errorf("invalid UUID length: %d", len(b))
+ return uuid, invalidLengthError{len(b)}
}
// s is now at least 36 bytes long
// it must be of the form xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
diff --git a/vendor/github.com/google/uuid/version4.go b/vendor/github.com/google/uuid/version4.go
index c110465db59..86160fbd072 100644
--- a/vendor/github.com/google/uuid/version4.go
+++ b/vendor/github.com/google/uuid/version4.go
@@ -14,6 +14,14 @@ func New() UUID {
return Must(NewRandom())
}
+// NewString creates a new random UUID and returns it as a string or panics.
+// NewString is equivalent to the expression
+//
+// uuid.New().String()
+func NewString() string {
+ return Must(NewRandom()).String()
+}
+
// NewRandom returns a Random (Version 4) UUID.
//
// The strength of the UUIDs is based on the strength of the crypto/rand
diff --git a/vendor/github.com/gophercloud/gophercloud/.travis.yml b/vendor/github.com/gophercloud/gophercloud/.travis.yml
deleted file mode 100644
index a6eb99c4a9d..00000000000
--- a/vendor/github.com/gophercloud/gophercloud/.travis.yml
+++ /dev/null
@@ -1,25 +0,0 @@
-language: go
-sudo: false
-install:
-- GO111MODULE=off go get golang.org/x/crypto/ssh
-- GO111MODULE=off go get -v -tags 'fixtures acceptance' ./...
-- GO111MODULE=off go get github.com/wadey/gocovmerge
-- GO111MODULE=off go get github.com/mattn/goveralls
-- GO111MODULE=off go get golang.org/x/tools/cmd/goimports
-go:
-- "1.13"
-- "1.14"
-- "1.15"
-- "tip"
-env:
- global:
- - secure: "xSQsAG5wlL9emjbCdxzz/hYQsSpJ/bABO1kkbwMSISVcJ3Nk0u4ywF+LS4bgeOnwPfmFvNTOqVDu3RwEvMeWXSI76t1piCPcObutb2faKLVD/hLoAS76gYX+Z8yGWGHrSB7Do5vTPj1ERe2UljdrnsSeOXzoDwFxYRaZLX4bBOB4AyoGvRniil5QXPATiA1tsWX1VMicj8a4F8X+xeESzjt1Q5Iy31e7vkptu71bhvXCaoo5QhYwT+pLR9dN0S1b7Ro0KVvkRefmr1lUOSYd2e74h6Lc34tC1h3uYZCS4h47t7v5cOXvMNxinEj2C51RvbjvZI1RLVdkuAEJD1Iz4+Ote46nXbZ//6XRZMZz/YxQ13l7ux1PFjgEB6HAapmF5Xd8PRsgeTU9LRJxpiTJ3P5QJ3leS1va8qnziM5kYipj/Rn+V8g2ad/rgkRox9LSiR9VYZD2Pe45YCb1mTKSl2aIJnV7nkOqsShY5LNB4JZSg7xIffA+9YVDktw8dJlATjZqt7WvJJ49g6A61mIUV4C15q2JPGKTkZzDiG81NtmS7hFa7k0yaE2ELgYocbcuyUcAahhxntYTC0i23nJmEHVNiZmBO3u7EgpWe4KGVfumU+lt12tIn5b3dZRBBUk3QakKKozSK1QPHGpk/AZGrhu7H6l8to6IICKWtDcyMPQ="
- - GO111MODULE=on
-before_script:
-- go vet ./...
-script:
-- ./script/coverage
-- ./script/unittest
-- ./script/format
-after_success:
-- $HOME/gopath/bin/goveralls -service=travis-ci -coverprofile=cover.out
diff --git a/vendor/github.com/gophercloud/gophercloud/CHANGELOG.md b/vendor/github.com/gophercloud/gophercloud/CHANGELOG.md
index b435fd3aa7e..ea4ca7539e5 100644
--- a/vendor/github.com/gophercloud/gophercloud/CHANGELOG.md
+++ b/vendor/github.com/gophercloud/gophercloud/CHANGELOG.md
@@ -1,14 +1,157 @@
-## 0.13.0 (Unreleased)
+## 0.18.0 (Unreleased)
+
+## 0.17.0 (April 9, 2021)
+
+IMPROVEMENTS
+
+* `networking/v2/extensions/quotas.QuotaDetail.Reserved` can handle both `int` and `string` values [GH-2126](https://github.com/gophercloud/gophercloud/pull/2126)
+* Added `blockstorage/v3/volumetypes.ListExtraSpecs` [GH-2123](https://github.com/gophercloud/gophercloud/pull/2123)
+* Added `blockstorage/v3/volumetypes.GetExtraSpec` [GH-2123](https://github.com/gophercloud/gophercloud/pull/2123)
+* Added `blockstorage/v3/volumetypes.CreateExtraSpecs` [GH-2123](https://github.com/gophercloud/gophercloud/pull/2123)
+* Added `blockstorage/v3/volumetypes.UpdateExtraSpec` [GH-2123](https://github.com/gophercloud/gophercloud/pull/2123)
+* Added `blockstorage/v3/volumetypes.DeleteExtraSpec` [GH-2123](https://github.com/gophercloud/gophercloud/pull/2123)
+* Added `identity/v3/roles.ListAssignmentOpts.IncludeNames` [GH-2133](https://github.com/gophercloud/gophercloud/pull/2133)
+* Added `identity/v3/roles.AssignedRoles.Name` [GH-2133](https://github.com/gophercloud/gophercloud/pull/2133)
+* Added `identity/v3/roles.Domain.Name` [GH-2133](https://github.com/gophercloud/gophercloud/pull/2133)
+* Added `identity/v3/roles.Project.Name` [GH-2133](https://github.com/gophercloud/gophercloud/pull/2133)
+* Added `identity/v3/roles.User.Name` [GH-2133](https://github.com/gophercloud/gophercloud/pull/2133)
+* Added `identity/v3/roles.Group.Name` [GH-2133](https://github.com/gophercloud/gophercloud/pull/2133)
+* Added `blockstorage/extensions/availabilityzones.List` [GH-2135](https://github.com/gophercloud/gophercloud/pull/2135)
+* Added `blockstorage/v3/volumetypes.ListAccesses` [GH-2138](https://github.com/gophercloud/gophercloud/pull/2138)
+* Added `blockstorage/v3/volumetypes.AddAccess` [GH-2138](https://github.com/gophercloud/gophercloud/pull/2138)
+* Added `blockstorage/v3/volumetypes.RemoveAccess` [GH-2138](https://github.com/gophercloud/gophercloud/pull/2138)
+* Added `blockstorage/v3/qos.Create` [GH-2140](https://github.com/gophercloud/gophercloud/pull/2140)
+* Added `blockstorage/v3/qos.Delete` [GH-2140](https://github.com/gophercloud/gophercloud/pull/2140)
+
+## 0.16.0 (February 23, 2021)
+
+UPGRADE NOTES
+
+* `baremetal/v1/nodes.CleanStep.Interface` has changed from `string` to `StepInterface` [GH-2120](https://github.com/gophercloud/gophercloud/pull/2120)
+
+BUG FIXES
+
+* Fixed `xor` logic issues in `loadbalancers/v2/l7policies.CreateOpts` [GH-2087](https://github.com/gophercloud/gophercloud/pull/2087)
+* Fixed `xor` logic issues in `loadbalancers/v2/listeners.CreateOpts` [GH-2087](https://github.com/gophercloud/gophercloud/pull/2087)
+* Fixed `If-Modified-Since` so it's correctly sent in a `objectstorage/v1/objects.Download` request [GH-2108](https://github.com/gophercloud/gophercloud/pull/2108)
+* Fixed `If-Unmodified-Since` so it's correctly sent in a `objectstorage/v1/objects.Download` request [GH-2108](https://github.com/gophercloud/gophercloud/pull/2108)
+
+IMPROVEMENTS
+
+* Added `blockstorage/extensions/limits.Get` [GH-2084](https://github.com/gophercloud/gophercloud/pull/2084)
+* `clustering/v1/clusters.RemoveNodes` now returns an `ActionResult` [GH-2089](https://github.com/gophercloud/gophercloud/pull/2089)
+* Added `identity/v3/projects.ListAvailable` [GH-2090](https://github.com/gophercloud/gophercloud/pull/2090)
+* Added `blockstorage/extensions/backups.ListDetail` [GH-2085](https://github.com/gophercloud/gophercloud/pull/2085)
+* Allow all ports to be removed in `networking/v2/extensions/fwaas_v2/groups.UpdateOpts` [GH-2073]
+* Added `imageservice/v2/images.ListOpts.Hidden` [GH-2094](https://github.com/gophercloud/gophercloud/pull/2094)
+* Added `imageservice/v2/images.CreateOpts.Hidden` [GH-2094](https://github.com/gophercloud/gophercloud/pull/2094)
+* Added `imageservice/v2/images.ReplaceImageHidden` [GH-2094](https://github.com/gophercloud/gophercloud/pull/2094)
+* Added `imageservice/v2/images.Image.Hidden` [GH-2094](https://github.com/gophercloud/gophercloud/pull/2094)
+* Added `containerinfra/v1/clusters.CreateOpts.MasterLBEnabled` [GH-2102](https://github.com/gophercloud/gophercloud/pull/2102)
+* Added the ability to define a custom function to handle "Retry-After" (429) responses [GH-2097](https://github.com/gophercloud/gophercloud/pull/2097)
+* Added `baremetal/v1/nodes.JBOD` constant for the `RAIDLevel` type [GH-2103](https://github.com/gophercloud/gophercloud/pull/2103)
+* Added support for Block Storage quotas of volume typed resources [GH-2109](https://github.com/gophercloud/gophercloud/pull/2109)
+* Added `blockstorage/extensions/volumeactions.ChangeType` [GH-2113](https://github.com/gophercloud/gophercloud/pull/2113)
+* Added `baremetal/v1/nodes.DeployStep` [GH-2120](https://github.com/gophercloud/gophercloud/pull/2120)
+* Added `baremetal/v1/nodes.ProvisionStateOpts.DeploySteps` [GH-2120](https://github.com/gophercloud/gophercloud/pull/2120)
+* Added `baremetal/v1/nodes.CreateOpts.AutomatedClean` [GH-2122](https://github.com/gophercloud/gophercloud/pull/2122)
+
+## 0.15.0 (December 27, 2020)
+
+BREAKING CHANGES
+
+* `compute/v2/extensions/servergroups.List` now takes a `ListOpts` parameter. You can pass `nil` if you don't need to use this.
+
+IMPROVEMENTS
+
+* Added `loadbalancer/v2/pools.CreateMemberOpts.Tags` [GH-2056](https://github.com/gophercloud/gophercloud/pull/2056)
+* Added `loadbalancer/v2/pools.UpdateMemberOpts.Backup` [GH-2056](https://github.com/gophercloud/gophercloud/pull/2056)
+* Added `loadbalancer/v2/pools.UpdateMemberOpts.MonitorAddress` [GH-2056](https://github.com/gophercloud/gophercloud/pull/2056)
+* Added `loadbalancer/v2/pools.UpdateMemberOpts.MonitorPort` [GH-2056](https://github.com/gophercloud/gophercloud/pull/2056)
+* Added `loadbalancer/v2/pools.UpdateMemberOpts.Tags` [GH-2056](https://github.com/gophercloud/gophercloud/pull/2056)
+* Added `loadbalancer/v2/pools.BatchUpdateMemberOpts.Backup` [GH-2056](https://github.com/gophercloud/gophercloud/pull/2056)
+* Added `loadbalancer/v2/pools.BatchUpdateMemberOpts.MonitorAddress` [GH-2056](https://github.com/gophercloud/gophercloud/pull/2056)
+* Added `loadbalancer/v2/pools.BatchUpdateMemberOpts.MonitorPort` [GH-2056](https://github.com/gophercloud/gophercloud/pull/2056)
+* Added `loadbalancer/v2/pools.BatchUpdateMemberOpts.Tags` [GH-2056](https://github.com/gophercloud/gophercloud/pull/2056)
+* Added `networking/v2/extensions/quotas.GetDetail` [GH-2061](https://github.com/gophercloud/gophercloud/pull/2061)
+* Added `networking/v2/extensions/quotas.UpdateOpts.Trunk` [GH-2061](https://github.com/gophercloud/gophercloud/pull/2061)
+* Added `objectstorage/v1/accounts.UpdateOpts.RemoveMetadata` [GH-2063](https://github.com/gophercloud/gophercloud/pull/2063)
+* Added `objectstorage/v1/objects.UpdateOpts.RemoveMetadata` [GH-2063](https://github.com/gophercloud/gophercloud/pull/2063)
+* Added `identity/v3/catalog.List` [GH-2067](https://github.com/gophercloud/gophercloud/pull/2067)
+* Added `networking/v2/extensions/fwaas_v2/policies.List` [GH-2057](https://github.com/gophercloud/gophercloud/pull/2057)
+* Added `networking/v2/extensions/fwaas_v2/policies.Create` [GH-2057](https://github.com/gophercloud/gophercloud/pull/2057)
+* Added `networking/v2/extensions/fwaas_v2/policies.Get` [GH-2057](https://github.com/gophercloud/gophercloud/pull/2057)
+* Added `networking/v2/extensions/fwaas_v2/policies.Update` [GH-2057](https://github.com/gophercloud/gophercloud/pull/2057)
+* Added `networking/v2/extensions/fwaas_v2/policies.Delete` [GH-2057](https://github.com/gophercloud/gophercloud/pull/2057)
+* Added `compute/v2/extensions/servergroups.ListOpts.AllProjects` [GH-2070](https://github.com/gophercloud/gophercloud/pull/2070)
+* Added `objectstorage/v1/containers.CreateOpts.StoragePolicy` [GH-2075](https://github.com/gophercloud/gophercloud/pull/2075)
+* Added `blockstorage/v3/snapshots.Update` [GH-2081](https://github.com/gophercloud/gophercloud/pull/2081)
+* Added `loadbalancer/v2/l7policies.CreateOpts.Rules` [GH-2077](https://github.com/gophercloud/gophercloud/pull/2077)
+* Added `loadbalancer/v2/listeners.CreateOpts.DefaultPool` [GH-2077](https://github.com/gophercloud/gophercloud/pull/2077)
+* Added `loadbalancer/v2/listeners.CreateOpts.L7Policies` [GH-2077](https://github.com/gophercloud/gophercloud/pull/2077)
+* Added `loadbalancer/v2/listeners.Listener.DefaultPool` [GH-2077](https://github.com/gophercloud/gophercloud/pull/2077)
+* Added `loadbalancer/v2/loadbalancers.CreateOpts.Listeners` [GH-2077](https://github.com/gophercloud/gophercloud/pull/2077)
+* Added `loadbalancer/v2/loadbalancers.CreateOpts.Pools` [GH-2077](https://github.com/gophercloud/gophercloud/pull/2077)
+* Added `loadbalancer/v2/pools.CreateOpts.Members` [GH-2077](https://github.com/gophercloud/gophercloud/pull/2077)
+* Added `loadbalancer/v2/pools.CreateOpts.Monitor` [GH-2077](https://github.com/gophercloud/gophercloud/pull/2077)
+
+
+## 0.14.0 (November 11, 2020)
+
+IMPROVEMENTS
+
+* Added `identity/v3/endpoints.Endpoint.Enabled` [GH-2030](https://github.com/gophercloud/gophercloud/pull/2030)
+* Added `containerinfra/v1/clusters.Upgrade` [GH-2032](https://github.com/gophercloud/gophercloud/pull/2032)
+* Added `compute/apiversions.List` [GH-2037](https://github.com/gophercloud/gophercloud/pull/2037)
+* Added `compute/apiversions.Get` [GH-2037](https://github.com/gophercloud/gophercloud/pull/2037)
+* Added `compute/v2/servers.ListOpts.IP` [GH-2038](https://github.com/gophercloud/gophercloud/pull/2038)
+* Added `compute/v2/servers.ListOpts.IP6` [GH-2038](https://github.com/gophercloud/gophercloud/pull/2038)
+* Added `compute/v2/servers.ListOpts.UserID` [GH-2038](https://github.com/gophercloud/gophercloud/pull/2038)
+* Added `dns/v2/transfer/accept.List` [GH-2041](https://github.com/gophercloud/gophercloud/pull/2041)
+* Added `dns/v2/transfer/accept.Get` [GH-2041](https://github.com/gophercloud/gophercloud/pull/2041)
+* Added `dns/v2/transfer/accept.Create` [GH-2041](https://github.com/gophercloud/gophercloud/pull/2041)
+* Added `dns/v2/transfer/requests.List` [GH-2041](https://github.com/gophercloud/gophercloud/pull/2041)
+* Added `dns/v2/transfer/requests.Get` [GH-2041](https://github.com/gophercloud/gophercloud/pull/2041)
+* Added `dns/v2/transfer/requests.Update` [GH-2041](https://github.com/gophercloud/gophercloud/pull/2041)
+* Added `dns/v2/transfer/requests.Delete` [GH-2041](https://github.com/gophercloud/gophercloud/pull/2041)
+* Added `baremetal/v1/nodes.RescueWait` [GH-2052](https://github.com/gophercloud/gophercloud/pull/2052)
+* Added `baremetal/v1/nodes.Unrescuing` [GH-2052](https://github.com/gophercloud/gophercloud/pull/2052)
+* Added `networking/v2/extensions/fwaas_v2/groups.List` [GH-2050](https://github.com/gophercloud/gophercloud/pull/2050)
+* Added `networking/v2/extensions/fwaas_v2/groups.Get` [GH-2050](https://github.com/gophercloud/gophercloud/pull/2050)
+* Added `networking/v2/extensions/fwaas_v2/groups.Create` [GH-2050](https://github.com/gophercloud/gophercloud/pull/2050)
+* Added `networking/v2/extensions/fwaas_v2/groups.Update` [GH-2050](https://github.com/gophercloud/gophercloud/pull/2050)
+* Added `networking/v2/extensions/fwaas_v2/groups.Delete` [GH-2050](https://github.com/gophercloud/gophercloud/pull/2050)
+
+BUG FIXES
+
+* Changed `networking/v2/extensions/layer3/routers.Routes` from `[]Route` to `*[]Route` [GH-2043](https://github.com/gophercloud/gophercloud/pull/2043)
+
+## 0.13.0 (September 27, 2020)
IMPROVEMENTS
* Added `ProtocolTerminatedHTTPS` as a valid listener protocol to `loadbalancer/v2/listeners` [GH-1992](https://github.com/gophercloud/gophercloud/pull/1992)
* Added `objectstorage/v1/objects.CreateTempURLOpts.Timestamp` [GH-1994](https://github.com/gophercloud/gophercloud/pull/1994)
+* Added `compute/v2/extensions/schedulerhints.SchedulerHints.DifferentCell` [GH-2012](https://github.com/gophercloud/gophercloud/pull/2012)
+* Added `loadbalancer/v2/quotas.Get` [GH-2010](https://github.com/gophercloud/gophercloud/pull/2010)
+* Added `messaging/v2/queues.CreateOpts.EnableEncryptMessages` [GH-2016](https://github.com/gophercloud/gophercloud/pull/2016)
+* Added `messaging/v2/queues.ListOpts.Name` [GH-2018](https://github.com/gophercloud/gophercloud/pull/2018)
+* Added `messaging/v2/queues.ListOpts.WithCount` [GH-2018](https://github.com/gophercloud/gophercloud/pull/2018)
+* Added `loadbalancer/v2/quotas.Update` [GH-2023](https://github.com/gophercloud/gophercloud/pull/2023)
+* Added `loadbalancer/v2/loadbalancers.ListOpts.AvailabilityZone` [GH-2026](https://github.com/gophercloud/gophercloud/pull/2026)
+* Added `loadbalancer/v2/loadbalancers.CreateOpts.AvailabilityZone` [GH-2026](https://github.com/gophercloud/gophercloud/pull/2026)
+* Added `loadbalancer/v2/loadbalancers.LoadBalancer.AvailabilityZone` [GH-2026](https://github.com/gophercloud/gophercloud/pull/2026)
+* Added `networking/v2/extensions/layer3/routers.ListL3Agents` [GH-2025](https://github.com/gophercloud/gophercloud/pull/2025)
BUG FIXES
* Fixed URL escaping in `objectstorage/v1/objects.CreateTempURL` [GH-1994](https://github.com/gophercloud/gophercloud/pull/1994)
* Remove unused `ServiceClient` from `compute/v2/servers.CreateOpts` [GH-2004](https://github.com/gophercloud/gophercloud/pull/2004)
+* Changed `objectstorage/v1/objects.CreateOpts.DeleteAfter` from `int` to `int64` [GH-2014](https://github.com/gophercloud/gophercloud/pull/2014)
+* Changed `objectstorage/v1/objects.CreateOpts.DeleteAt` from `int` to `int64` [GH-2014](https://github.com/gophercloud/gophercloud/pull/2014)
+* Changed `objectstorage/v1/objects.UpdateOpts.DeleteAfter` from `int` to `int64` [GH-2014](https://github.com/gophercloud/gophercloud/pull/2014)
+* Changed `objectstorage/v1/objects.UpdateOpts.DeleteAt` from `int` to `int64` [GH-2014](https://github.com/gophercloud/gophercloud/pull/2014)
+
## 0.12.0 (June 25, 2020)
diff --git a/vendor/github.com/gophercloud/gophercloud/README.md b/vendor/github.com/gophercloud/gophercloud/README.md
index ad29041d9bf..95539563ace 100644
--- a/vendor/github.com/gophercloud/gophercloud/README.md
+++ b/vendor/github.com/gophercloud/gophercloud/README.md
@@ -60,6 +60,13 @@ prompted for your password.
### Authentication
+> NOTE: It is now recommended to use the `clientconfig` package found at
+> https://github.com/gophercloud/utils/tree/master/openstack/clientconfig
+> for all authentication purposes.
+>
+> The below documentation is still relevant. clientconfig simply implements
+> the below and presents it in an easier and more flexible way.
+
Once you have access to your credentials, you can begin plugging them into
Gophercloud. The next step is authentication, and this is handled by a base
"Provider" struct. To get one, you can either pass in your credentials
diff --git a/vendor/github.com/gophercloud/gophercloud/doc.go b/vendor/github.com/gophercloud/gophercloud/doc.go
index 953ca822a97..e2623b44e22 100644
--- a/vendor/github.com/gophercloud/gophercloud/doc.go
+++ b/vendor/github.com/gophercloud/gophercloud/doc.go
@@ -106,5 +106,44 @@ intermediary processing on each page, you can use the AllPages method:
This top-level package contains utility functions and data types that are used
throughout the provider and service packages. Of particular note for end users
are the AuthOptions and EndpointOpts structs.
+
+An example retry backoff function, which respects the 429 HTTP response code and a "Retry-After" header:
+
+ endpoint := "http://localhost:5000"
+ provider, err := openstack.NewClient(endpoint)
+ if err != nil {
+ panic(err)
+ }
+ provider.MaxBackoffRetries = 3 // max three retries
+ provider.RetryBackoffFunc = func(ctx context.Context, respErr *ErrUnexpectedResponseCode, e error, retries uint) error {
+ retryAfter := respErr.ResponseHeader.Get("Retry-After")
+ if retryAfter == "" {
+ return e
+ }
+
+ var sleep time.Duration
+
+ // Parse delay seconds or HTTP date
+ if v, err := strconv.ParseUint(retryAfter, 10, 32); err == nil {
+ sleep = time.Duration(v) * time.Second
+ } else if v, err := time.Parse(http.TimeFormat, retryAfter); err == nil {
+ sleep = time.Until(v)
+ } else {
+ return e
+ }
+
+ if ctx != nil {
+ select {
+ case <-time.After(sleep):
+ case <-ctx.Done():
+ return e
+ }
+ } else {
+ time.Sleep(sleep)
+ }
+
+ return nil
+ }
+
*/
package gophercloud
diff --git a/vendor/github.com/gophercloud/gophercloud/go.mod b/vendor/github.com/gophercloud/gophercloud/go.mod
index cf6aabe31ce..8c83df2349a 100644
--- a/vendor/github.com/gophercloud/gophercloud/go.mod
+++ b/vendor/github.com/gophercloud/gophercloud/go.mod
@@ -3,13 +3,7 @@ module github.com/gophercloud/gophercloud
go 1.13
require (
- golang.org/x/crypto v0.0.0-20191202143827-86a70503ff7e
- golang.org/x/net v0.0.0-20191126235420-ef20fe5d7933 // indirect
- golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e // indirect
- golang.org/x/sys v0.0.0-20191128015809-6d18c012aee9 // indirect
- golang.org/x/text v0.3.2 // indirect
- golang.org/x/tools v0.0.0-20191203134012-c197fd4bf371 // indirect
- golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898 // indirect
- gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 // indirect
+ golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad
+ golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1 // indirect
gopkg.in/yaml.v2 v2.3.0
)
diff --git a/vendor/github.com/gophercloud/gophercloud/go.sum b/vendor/github.com/gophercloud/gophercloud/go.sum
index a98dc550de6..c91f7ee2243 100644
--- a/vendor/github.com/gophercloud/gophercloud/go.sum
+++ b/vendor/github.com/gophercloud/gophercloud/go.sum
@@ -1,19 +1,18 @@
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
-golang.org/x/crypto v0.0.0-20191202143827-86a70503ff7e/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
+golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad h1:DN0cp81fZ3njFcrLCytUHRSUkqBjfTo4Tx9RJTWs0EY=
+golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I=
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
-golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
-golang.org/x/net v0.0.0-20191126235420-ef20fe5d7933/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
-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/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/sys v0.0.0-20191128015809-6d18c012aee9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20191026070338-33540a1f6037 h1:YyJpGZS1sBuBCzLAR1VEpK193GlqGZbnPFnPV/5Rsb4=
+golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20201119102817-f84b799fce68 h1:nxC68pudNYkKU6jWhgrqdreuFiOQWj1Fs7T3VrH4Pjw=
+golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/term v0.0.0-20201117132131-f5c789dd3221 h1:/ZHdbVpdR/jk3g30/d4yUL0JU9kksj8+F/bnQUVLGDM=
+golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
+golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1 h1:v+OssWQX+hTHEmOBgwxdZxK4zHq3yOs8F9J7mk0PY8E=
+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.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
-golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
-golang.org/x/tools v0.0.0-20191203134012-c197fd4bf371/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
-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=
+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/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
+gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU=
gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
diff --git a/vendor/github.com/gophercloud/gophercloud/internal/pkg.go b/vendor/github.com/gophercloud/gophercloud/internal/pkg.go
deleted file mode 100644
index 5bf0569ce8c..00000000000
--- a/vendor/github.com/gophercloud/gophercloud/internal/pkg.go
+++ /dev/null
@@ -1 +0,0 @@
-package internal
diff --git a/vendor/github.com/gophercloud/gophercloud/internal/util.go b/vendor/github.com/gophercloud/gophercloud/internal/util.go
deleted file mode 100644
index 8efb283e729..00000000000
--- a/vendor/github.com/gophercloud/gophercloud/internal/util.go
+++ /dev/null
@@ -1,34 +0,0 @@
-package internal
-
-import (
- "reflect"
- "strings"
-)
-
-// RemainingKeys will inspect a struct and compare it to a map. Any struct
-// field that does not have a JSON tag that matches a key in the map or
-// a matching lower-case field in the map will be returned as an extra.
-//
-// This is useful for determining the extra fields returned in response bodies
-// for resources that can contain an arbitrary or dynamic number of fields.
-func RemainingKeys(s interface{}, m map[string]interface{}) (extras map[string]interface{}) {
- extras = make(map[string]interface{})
- for k, v := range m {
- extras[k] = v
- }
-
- valueOf := reflect.ValueOf(s)
- typeOf := reflect.TypeOf(s)
- for i := 0; i < valueOf.NumField(); i++ {
- field := typeOf.Field(i)
-
- lowerField := strings.ToLower(field.Name)
- delete(extras, lowerField)
-
- if tagValue := field.Tag.Get("json"); tagValue != "" && tagValue != "-" {
- delete(extras, tagValue)
- }
- }
-
- return
-}
diff --git a/vendor/github.com/gophercloud/gophercloud/openstack/blockstorage/v3/snapshots/doc.go b/vendor/github.com/gophercloud/gophercloud/openstack/blockstorage/v3/snapshots/doc.go
new file mode 100644
index 00000000000..76960f42180
--- /dev/null
+++ b/vendor/github.com/gophercloud/gophercloud/openstack/blockstorage/v3/snapshots/doc.go
@@ -0,0 +1,62 @@
+/*
+Package snapshots provides information and interaction with snapshots in the
+OpenStack Block Storage service. A snapshot is a point in time copy of the
+data contained in an external storage volume, and can be controlled
+programmatically.
+
+
+Example to list Snapshots
+
+ allPages, err := snapshots.List(client, snapshots.ListOpts{}).AllPages()
+ if err != nil{
+ panic(err)
+ }
+ snapshots, err := snapshots.ExtractSnapshots(allPages)
+ if err != nil{
+ panic(err)
+ }
+ for _,s := range snapshots{
+ fmt.Println(s)
+ }
+
+Example to get a Snapshot
+
+ snapshotID := "4a584cae-e4ce-429b-9154-d4c9eb8fda4c"
+ snapshot, err := snapshots.Get(client, snapshotID).Extract()
+ if err != nil{
+ panic(err)
+ }
+ fmt.Println(snapshot)
+
+Example to create a Snapshot
+
+ snapshot, err := snapshots.Create(client, snapshots.CreateOpts{
+ Name:"snapshot_001",
+ VolumeID:"5aa119a8-d25b-45a7-8d1b-88e127885635",
+ }).Extract()
+ if err != nil{
+ panic(err)
+ }
+ fmt.Println(snapshot)
+
+Example to delete a Snapshot
+
+ snapshotID := "4a584cae-e4ce-429b-9154-d4c9eb8fda4c"
+ err := snapshots.Delete(client, snapshotID).ExtractErr()
+ if err != nil{
+ panic(err)
+ }
+
+Example to update a Snapshot
+
+ snapshotID := "4a584cae-e4ce-429b-9154-d4c9eb8fda4c"
+ snapshot, err = snapshots.Update(client, snapshotID, snapshots.UpdateOpts{
+ Name: "snapshot_002",
+ Description:"description_002",
+ }).Extract()
+ if err != nil{
+ panic(err)
+ }
+ fmt.Println(snapshot)
+*/
+package snapshots
diff --git a/vendor/github.com/gophercloud/gophercloud/openstack/blockstorage/v3/snapshots/requests.go b/vendor/github.com/gophercloud/gophercloud/openstack/blockstorage/v3/snapshots/requests.go
new file mode 100644
index 00000000000..7dcfed79468
--- /dev/null
+++ b/vendor/github.com/gophercloud/gophercloud/openstack/blockstorage/v3/snapshots/requests.go
@@ -0,0 +1,191 @@
+package snapshots
+
+import (
+ "github.com/gophercloud/gophercloud"
+ "github.com/gophercloud/gophercloud/pagination"
+)
+
+// CreateOptsBuilder allows extensions to add additional parameters to the
+// Create request.
+type CreateOptsBuilder interface {
+ ToSnapshotCreateMap() (map[string]interface{}, error)
+}
+
+// CreateOpts contains options for creating a Snapshot. This object is passed to
+// the snapshots.Create function. For more information about these parameters,
+// see the Snapshot object.
+type CreateOpts struct {
+ VolumeID string `json:"volume_id" required:"true"`
+ Force bool `json:"force,omitempty"`
+ Name string `json:"name,omitempty"`
+ Description string `json:"description,omitempty"`
+ Metadata map[string]string `json:"metadata,omitempty"`
+}
+
+// ToSnapshotCreateMap assembles a request body based on the contents of a
+// CreateOpts.
+func (opts CreateOpts) ToSnapshotCreateMap() (map[string]interface{}, error) {
+ return gophercloud.BuildRequestBody(opts, "snapshot")
+}
+
+// Create will create a new Snapshot based on the values in CreateOpts. To
+// extract the Snapshot object from the response, call the Extract method on the
+// CreateResult.
+func Create(client *gophercloud.ServiceClient, opts CreateOptsBuilder) (r CreateResult) {
+ b, err := opts.ToSnapshotCreateMap()
+ if err != nil {
+ r.Err = err
+ return
+ }
+ resp, err := client.Post(createURL(client), b, &r.Body, &gophercloud.RequestOpts{
+ OkCodes: []int{202},
+ })
+ _, r.Header, r.Err = gophercloud.ParseResponse(resp, err)
+ return
+}
+
+// Delete will delete the existing Snapshot with the provided ID.
+func Delete(client *gophercloud.ServiceClient, id string) (r DeleteResult) {
+ resp, err := client.Delete(deleteURL(client, id), nil)
+ _, r.Header, r.Err = gophercloud.ParseResponse(resp, err)
+ return
+}
+
+// Get retrieves the Snapshot with the provided ID. To extract the Snapshot
+// object from the response, call the Extract method on the GetResult.
+func Get(client *gophercloud.ServiceClient, id string) (r GetResult) {
+ resp, err := client.Get(getURL(client, id), &r.Body, nil)
+ _, r.Header, r.Err = gophercloud.ParseResponse(resp, err)
+ return
+}
+
+// ListOptsBuilder allows extensions to add additional parameters to the List
+// request.
+type ListOptsBuilder interface {
+ ToSnapshotListQuery() (string, error)
+}
+
+// ListOpts holds options for listing Snapshots. It is passed to the snapshots.List
+// function.
+type ListOpts struct {
+ // AllTenants will retrieve snapshots of all tenants/projects.
+ AllTenants bool `q:"all_tenants"`
+
+ // Name will filter by the specified snapshot name.
+ Name string `q:"name"`
+
+ // Status will filter by the specified status.
+ Status string `q:"status"`
+
+ // TenantID will filter by a specific tenant/project ID.
+ // Setting AllTenants is required to use this.
+ TenantID string `q:"project_id"`
+
+ // VolumeID will filter by a specified volume ID.
+ VolumeID string `q:"volume_id"`
+
+ // Comma-separated list of sort keys and optional sort directions in the
+ // form of [:].
+ Sort string `q:"sort"`
+
+ // Requests a page size of items.
+ Limit int `q:"limit"`
+
+ // Used in conjunction with limit to return a slice of items.
+ Offset int `q:"offset"`
+
+ // The ID of the last-seen item.
+ Marker string `q:"marker"`
+}
+
+// ToSnapshotListQuery formats a ListOpts into a query string.
+func (opts ListOpts) ToSnapshotListQuery() (string, error) {
+ q, err := gophercloud.BuildQueryString(opts)
+ return q.String(), err
+}
+
+// List returns Snapshots optionally limited by the conditions provided in
+// ListOpts.
+func List(client *gophercloud.ServiceClient, opts ListOptsBuilder) pagination.Pager {
+ url := listURL(client)
+ if opts != nil {
+ query, err := opts.ToSnapshotListQuery()
+ if err != nil {
+ return pagination.Pager{Err: err}
+ }
+ url += query
+ }
+ return pagination.NewPager(client, url, func(r pagination.PageResult) pagination.Page {
+ return SnapshotPage{pagination.LinkedPageBase{PageResult: r}}
+ })
+}
+
+// UpdateOptsBuilder allows extensions to add additional parameters to the
+// Update request.
+type UpdateOptsBuilder interface {
+ ToSnapshotUpdateMap() (map[string]interface{}, error)
+}
+
+// UpdateOpts contain options for updating an existing Snapshot. This object is passed
+// to the snapshots.Update function. For more information about the parameters, see
+// the Snapshot object.
+type UpdateOpts struct {
+ Name *string `json:"name,omitempty"`
+ Description *string `json:"description,omitempty"`
+}
+
+// ToSnapshotUpdateMap assembles a request body based on the contents of an
+// UpdateOpts.
+func (opts UpdateOpts) ToSnapshotUpdateMap() (map[string]interface{}, error) {
+ return gophercloud.BuildRequestBody(opts, "snapshot")
+}
+
+// Update will update the Snapshot with provided information. To extract the updated
+// Snapshot from the response, call the Extract method on the UpdateResult.
+func Update(client *gophercloud.ServiceClient, id string, opts UpdateOptsBuilder) (r UpdateResult) {
+ b, err := opts.ToSnapshotUpdateMap()
+ if err != nil {
+ r.Err = err
+ return
+ }
+ resp, err := client.Put(updateURL(client, id), b, &r.Body, &gophercloud.RequestOpts{
+ OkCodes: []int{200},
+ })
+ _, r.Header, r.Err = gophercloud.ParseResponse(resp, err)
+ return
+}
+
+// UpdateMetadataOptsBuilder allows extensions to add additional parameters to
+// the Update request.
+type UpdateMetadataOptsBuilder interface {
+ ToSnapshotUpdateMetadataMap() (map[string]interface{}, error)
+}
+
+// UpdateMetadataOpts contain options for updating an existing Snapshot. This
+// object is passed to the snapshots.Update function. For more information
+// about the parameters, see the Snapshot object.
+type UpdateMetadataOpts struct {
+ Metadata map[string]interface{} `json:"metadata,omitempty"`
+}
+
+// ToSnapshotUpdateMetadataMap assembles a request body based on the contents of
+// an UpdateMetadataOpts.
+func (opts UpdateMetadataOpts) ToSnapshotUpdateMetadataMap() (map[string]interface{}, error) {
+ return gophercloud.BuildRequestBody(opts, "")
+}
+
+// UpdateMetadata will update the Snapshot with provided information. To
+// extract the updated Snapshot from the response, call the ExtractMetadata
+// method on the UpdateMetadataResult.
+func UpdateMetadata(client *gophercloud.ServiceClient, id string, opts UpdateMetadataOptsBuilder) (r UpdateMetadataResult) {
+ b, err := opts.ToSnapshotUpdateMetadataMap()
+ if err != nil {
+ r.Err = err
+ return
+ }
+ resp, err := client.Put(updateMetadataURL(client, id), b, &r.Body, &gophercloud.RequestOpts{
+ OkCodes: []int{200},
+ })
+ _, r.Header, r.Err = gophercloud.ParseResponse(resp, err)
+ return
+}
diff --git a/vendor/github.com/gophercloud/gophercloud/openstack/blockstorage/v3/snapshots/results.go b/vendor/github.com/gophercloud/gophercloud/openstack/blockstorage/v3/snapshots/results.go
new file mode 100644
index 00000000000..3c81a447a62
--- /dev/null
+++ b/vendor/github.com/gophercloud/gophercloud/openstack/blockstorage/v3/snapshots/results.go
@@ -0,0 +1,139 @@
+package snapshots
+
+import (
+ "encoding/json"
+ "time"
+
+ "github.com/gophercloud/gophercloud"
+ "github.com/gophercloud/gophercloud/pagination"
+)
+
+// Snapshot contains all the information associated with a Cinder Snapshot.
+type Snapshot struct {
+ // Unique identifier.
+ ID string `json:"id"`
+
+ // Date created.
+ CreatedAt time.Time `json:"-"`
+
+ // Date updated.
+ UpdatedAt time.Time `json:"-"`
+
+ // Display name.
+ Name string `json:"name"`
+
+ // Display description.
+ Description string `json:"description"`
+
+ // ID of the Volume from which this Snapshot was created.
+ VolumeID string `json:"volume_id"`
+
+ // Currect status of the Snapshot.
+ Status string `json:"status"`
+
+ // Size of the Snapshot, in GB.
+ Size int `json:"size"`
+
+ // User-defined key-value pairs.
+ Metadata map[string]string `json:"metadata"`
+}
+
+// CreateResult contains the response body and error from a Create request.
+type CreateResult struct {
+ commonResult
+}
+
+// GetResult contains the response body and error from a Get request.
+type GetResult struct {
+ commonResult
+}
+
+// DeleteResult contains the response body and error from a Delete request.
+type DeleteResult struct {
+ gophercloud.ErrResult
+}
+
+// UpdateResult contains the response body and error from an Update request.
+type UpdateResult struct {
+ commonResult
+}
+
+// SnapshotPage is a pagination.Pager that is returned from a call to the List function.
+type SnapshotPage struct {
+ pagination.LinkedPageBase
+}
+
+// UnmarshalJSON converts our JSON API response into our snapshot struct
+func (r *Snapshot) UnmarshalJSON(b []byte) error {
+ type tmp Snapshot
+ var s struct {
+ tmp
+ CreatedAt gophercloud.JSONRFC3339MilliNoZ `json:"created_at"`
+ UpdatedAt gophercloud.JSONRFC3339MilliNoZ `json:"updated_at"`
+ }
+ err := json.Unmarshal(b, &s)
+ if err != nil {
+ return err
+ }
+ *r = Snapshot(s.tmp)
+
+ r.CreatedAt = time.Time(s.CreatedAt)
+ r.UpdatedAt = time.Time(s.UpdatedAt)
+
+ return err
+}
+
+// IsEmpty returns true if a SnapshotPage contains no Snapshots.
+func (r SnapshotPage) IsEmpty() (bool, error) {
+ volumes, err := ExtractSnapshots(r)
+ return len(volumes) == 0, err
+}
+
+// NextPageURL uses the response's embedded link reference to navigate to the
+// next page of results.
+func (r SnapshotPage) NextPageURL() (string, error) {
+ var s struct {
+ Links []gophercloud.Link `json:"snapshots_links"`
+ }
+ err := r.ExtractInto(&s)
+ if err != nil {
+ return "", err
+ }
+ return gophercloud.ExtractNextURL(s.Links)
+}
+
+// ExtractSnapshots extracts and returns Snapshots. It is used while iterating over a snapshots.List call.
+func ExtractSnapshots(r pagination.Page) ([]Snapshot, error) {
+ var s struct {
+ Snapshots []Snapshot `json:"snapshots"`
+ }
+ err := (r.(SnapshotPage)).ExtractInto(&s)
+ return s.Snapshots, err
+}
+
+// UpdateMetadataResult contains the response body and error from an UpdateMetadata request.
+type UpdateMetadataResult struct {
+ commonResult
+}
+
+// ExtractMetadata returns the metadata from a response from snapshots.UpdateMetadata.
+func (r UpdateMetadataResult) ExtractMetadata() (map[string]interface{}, error) {
+ if r.Err != nil {
+ return nil, r.Err
+ }
+ m := r.Body.(map[string]interface{})["metadata"]
+ return m.(map[string]interface{}), nil
+}
+
+type commonResult struct {
+ gophercloud.Result
+}
+
+// Extract will get the Snapshot object out of the commonResult object.
+func (r commonResult) Extract() (*Snapshot, error) {
+ var s struct {
+ Snapshot *Snapshot `json:"snapshot"`
+ }
+ err := r.ExtractInto(&s)
+ return s.Snapshot, err
+}
diff --git a/vendor/github.com/gophercloud/gophercloud/openstack/blockstorage/v3/snapshots/urls.go b/vendor/github.com/gophercloud/gophercloud/openstack/blockstorage/v3/snapshots/urls.go
new file mode 100644
index 00000000000..d0bcbfb98cf
--- /dev/null
+++ b/vendor/github.com/gophercloud/gophercloud/openstack/blockstorage/v3/snapshots/urls.go
@@ -0,0 +1,31 @@
+package snapshots
+
+import "github.com/gophercloud/gophercloud"
+
+func createURL(c *gophercloud.ServiceClient) string {
+ return c.ServiceURL("snapshots")
+}
+
+func deleteURL(c *gophercloud.ServiceClient, id string) string {
+ return c.ServiceURL("snapshots", id)
+}
+
+func getURL(c *gophercloud.ServiceClient, id string) string {
+ return deleteURL(c, id)
+}
+
+func listURL(c *gophercloud.ServiceClient) string {
+ return createURL(c)
+}
+
+func updateURL(c *gophercloud.ServiceClient, id string) string {
+ return deleteURL(c, id)
+}
+
+func metadataURL(c *gophercloud.ServiceClient, id string) string {
+ return c.ServiceURL("snapshots", id, "metadata")
+}
+
+func updateMetadataURL(c *gophercloud.ServiceClient, id string) string {
+ return metadataURL(c, id)
+}
diff --git a/vendor/github.com/gophercloud/gophercloud/openstack/blockstorage/v3/snapshots/util.go b/vendor/github.com/gophercloud/gophercloud/openstack/blockstorage/v3/snapshots/util.go
new file mode 100644
index 00000000000..40fbb827b8a
--- /dev/null
+++ b/vendor/github.com/gophercloud/gophercloud/openstack/blockstorage/v3/snapshots/util.go
@@ -0,0 +1,22 @@
+package snapshots
+
+import (
+ "github.com/gophercloud/gophercloud"
+)
+
+// WaitForStatus will continually poll the resource, checking for a particular
+// status. It will do this for the amount of seconds defined.
+func WaitForStatus(c *gophercloud.ServiceClient, id, status string, secs int) error {
+ return gophercloud.WaitFor(secs, func() (bool, error) {
+ current, err := Get(c, id).Extract()
+ if err != nil {
+ return false, err
+ }
+
+ if current.Status == status {
+ return true, nil
+ }
+
+ return false, nil
+ })
+}
diff --git a/vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/extensions/servergroups/requests.go b/vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/extensions/servergroups/requests.go
index 7a877718d9e..8e7966d567d 100644
--- a/vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/extensions/servergroups/requests.go
+++ b/vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/extensions/servergroups/requests.go
@@ -5,10 +5,34 @@ import (
"github.com/gophercloud/gophercloud/pagination"
)
+type ListOptsBuilder interface {
+ ToServerListQuery() (string, error)
+}
+
+type ListOpts struct {
+ // AllProjects is a bool to show all projects.
+ AllProjects bool `q:"all_projects"`
+}
+
+// ToServerListQuery formats a ListOpts into a query string.
+func (opts ListOpts) ToServerListQuery() (string, error) {
+ q, err := gophercloud.BuildQueryString(opts)
+ return q.String(), err
+}
+
// List returns a Pager that allows you to iterate over a collection of
// ServerGroups.
-func List(client *gophercloud.ServiceClient) pagination.Pager {
- return pagination.NewPager(client, listURL(client), func(r pagination.PageResult) pagination.Page {
+func List(client *gophercloud.ServiceClient, opts ListOptsBuilder) pagination.Pager {
+ url := listURL(client)
+ if opts != nil {
+ query, err := opts.ToServerListQuery()
+ if err != nil {
+ return pagination.Pager{Err: err}
+ }
+ url += query
+ }
+
+ return pagination.NewPager(client, url, func(r pagination.PageResult) pagination.Page {
return ServerGroupPage{pagination.SinglePageBase(r)}
})
}
diff --git a/vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/servers/requests.go b/vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/servers/requests.go
index 4c594e2ef2e..4e6042409e9 100644
--- a/vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/servers/requests.go
+++ b/vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/servers/requests.go
@@ -29,6 +29,14 @@ type ListOpts struct {
// Flavor is the name of the flavor in URL format.
Flavor string `q:"flavor"`
+ // IP is a regular expression to match the IPv4 address of the server.
+ IP string `q:"ip"`
+
+ // This requires the client to be set to microversion 2.5 or later, unless
+ // the user is an admin.
+ // IP is a regular expression to match the IPv6 address of the server.
+ IP6 string `q:"ip6"`
+
// Name of the server as a string; can be queried with regular expressions.
// Realize that ?name=bob returns both bob and bobb. If you need to match bob
// only, you can use a regular expression matching the syntax of the
@@ -55,6 +63,11 @@ type ListOpts struct {
// Setting "AllTenants = true" is required.
TenantID string `q:"tenant_id"`
+ // This requires the client to be set to microversion 2.83 or later, unless
+ // the user is an admin.
+ // UserID lists servers for a particular user.
+ UserID string `q:"user_id"`
+
// This requires the client to be set to microversion 2.26 or later.
// Tags filters on specific server tags. All tags must be present for the server.
Tags string `q:"tags"`
diff --git a/vendor/github.com/gophercloud/gophercloud/openstack/imageservice/v2/images/requests.go b/vendor/github.com/gophercloud/gophercloud/openstack/imageservice/v2/images/requests.go
index f0cd5cbde87..7947645eb46 100644
--- a/vendor/github.com/gophercloud/gophercloud/openstack/imageservice/v2/images/requests.go
+++ b/vendor/github.com/gophercloud/gophercloud/openstack/imageservice/v2/images/requests.go
@@ -41,6 +41,9 @@ type ListOpts struct {
// Visibility filters on the visibility of the image.
Visibility ImageVisibility `q:"visibility"`
+ // Hidden filters on the hidden status of the image.
+ Hidden bool `q:"os_hidden"`
+
// MemberStatus filters on the member status of the image.
MemberStatus ImageMemberStatus `q:"member_status"`
@@ -155,6 +158,9 @@ type CreateOpts struct {
// Visibility defines who can see/use the image.
Visibility *ImageVisibility `json:"visibility,omitempty"`
+ // Hidden is whether the image is listed in default image list or not.
+ Hidden *bool `json:"os_hidden,omitempty"`
+
// Tags is a set of image tags.
Tags []string `json:"tags,omitempty"`
@@ -283,6 +289,20 @@ func (r UpdateVisibility) ToImagePatchMap() map[string]interface{} {
}
}
+// ReplaceImageHidden represents an updated os_hidden property request.
+type ReplaceImageHidden struct {
+ NewHidden bool
+}
+
+// ToImagePatchMap assembles a request body based on ReplaceImageHidden.
+func (r ReplaceImageHidden) ToImagePatchMap() map[string]interface{} {
+ return map[string]interface{}{
+ "op": "replace",
+ "path": "/os_hidden",
+ "value": r.NewHidden,
+ }
+}
+
// ReplaceImageName represents an updated image_name property request.
type ReplaceImageName struct {
NewName string
diff --git a/vendor/github.com/gophercloud/gophercloud/openstack/imageservice/v2/images/results.go b/vendor/github.com/gophercloud/gophercloud/openstack/imageservice/v2/images/results.go
index f445cc38fcb..d723a466a67 100644
--- a/vendor/github.com/gophercloud/gophercloud/openstack/imageservice/v2/images/results.go
+++ b/vendor/github.com/gophercloud/gophercloud/openstack/imageservice/v2/images/results.go
@@ -8,7 +8,6 @@ import (
"time"
"github.com/gophercloud/gophercloud"
- "github.com/gophercloud/gophercloud/internal"
"github.com/gophercloud/gophercloud/pagination"
)
@@ -54,6 +53,9 @@ type Image struct {
// Visibility defines who can see/use the image.
Visibility ImageVisibility `json:"visibility"`
+ // Hidden is whether the image is listed in default image list or not.
+ Hidden bool `json:"os_hidden"`
+
// Checksum is the checksum of the data that's associated with the image.
Checksum string `json:"checksum"`
@@ -132,7 +134,7 @@ func (r *Image) UnmarshalJSON(b []byte) error {
delete(resultMap, "size")
delete(resultMap, "openstack-image-import-methods")
delete(resultMap, "openstack-image-store-ids")
- r.Properties = internal.RemainingKeys(Image{}, resultMap)
+ r.Properties = gophercloud.RemainingKeys(Image{}, resultMap)
}
if v := strings.FieldsFunc(strings.TrimSpace(s.OpenStackImageImportMethods), splitFunc); len(v) > 0 {
diff --git a/vendor/github.com/gophercloud/gophercloud/openstack/loadbalancer/v2/l7policies/requests.go b/vendor/github.com/gophercloud/gophercloud/openstack/loadbalancer/v2/l7policies/requests.go
index 19f487450f6..1969ba0367e 100644
--- a/vendor/github.com/gophercloud/gophercloud/openstack/loadbalancer/v2/l7policies/requests.go
+++ b/vendor/github.com/gophercloud/gophercloud/openstack/loadbalancer/v2/l7policies/requests.go
@@ -40,7 +40,7 @@ type CreateOpts struct {
Name string `json:"name,omitempty"`
// The ID of the listener.
- ListenerID string `json:"listener_id" required:"true"`
+ ListenerID string `json:"listener_id,omitempty"`
// The L7 policy action. One of REDIRECT_TO_POOL, REDIRECT_TO_URL, or REJECT.
Action Action `json:"action" required:"true"`
@@ -66,6 +66,13 @@ type CreateOpts struct {
// The administrative state of the Loadbalancer. A valid value is true (UP)
// or false (DOWN).
AdminStateUp *bool `json:"admin_state_up,omitempty"`
+
+ // Rules is a slice of CreateRuleOpts which allows a set of rules
+ // to be created at the same time the policy is created.
+ //
+ // This is only possible to use when creating a fully populated
+ // Loadbalancer.
+ Rules []CreateRuleOpts `json:"rules,omitempty"`
}
// ToL7PolicyCreateMap builds a request body from CreateOpts.
diff --git a/vendor/github.com/gophercloud/gophercloud/openstack/loadbalancer/v2/listeners/requests.go b/vendor/github.com/gophercloud/gophercloud/openstack/loadbalancer/v2/listeners/requests.go
index f839fa95068..07fa26848d8 100644
--- a/vendor/github.com/gophercloud/gophercloud/openstack/loadbalancer/v2/listeners/requests.go
+++ b/vendor/github.com/gophercloud/gophercloud/openstack/loadbalancer/v2/listeners/requests.go
@@ -2,6 +2,8 @@ package listeners
import (
"github.com/gophercloud/gophercloud"
+ "github.com/gophercloud/gophercloud/openstack/loadbalancer/v2/l7policies"
+ "github.com/gophercloud/gophercloud/openstack/loadbalancer/v2/pools"
"github.com/gophercloud/gophercloud/pagination"
)
@@ -84,7 +86,7 @@ type CreateOptsBuilder interface {
// CreateOpts represents options for creating a listener.
type CreateOpts struct {
// The load balancer on which to provision this listener.
- LoadbalancerID string `json:"loadbalancer_id" required:"true"`
+ LoadbalancerID string `json:"loadbalancer_id,omitempty"`
// The protocol - can either be TCP, HTTP, HTTPS or TERMINATED_HTTPS.
Protocol Protocol `json:"protocol" required:"true"`
@@ -102,6 +104,13 @@ type CreateOpts struct {
// The ID of the default pool with which the Listener is associated.
DefaultPoolID string `json:"default_pool_id,omitempty"`
+ // DefaultPool an instance of pools.CreateOpts which allows a
+ // (default) pool to be created at the same time the listener is created.
+ //
+ // This is only possible to use when creating a fully populated
+ // load balancer.
+ DefaultPool *pools.CreateOpts `json:"default_pool,omitempty"`
+
// Human-readable description for the Listener.
Description string `json:"description,omitempty"`
@@ -118,6 +127,13 @@ type CreateOpts struct {
// or false (DOWN).
AdminStateUp *bool `json:"admin_state_up,omitempty"`
+ // L7Policies is a slice of l7policies.CreateOpts which allows a set
+ // of policies to be created at the same time the listener is created.
+ //
+ // This is only possible to use when creating a fully populated
+ // Loadbalancer.
+ L7Policies []l7policies.CreateOpts `json:"l7policies,omitempty"`
+
// Frontend client inactivity timeout in milliseconds
TimeoutClientData *int `json:"timeout_client_data,omitempty"`
diff --git a/vendor/github.com/gophercloud/gophercloud/openstack/loadbalancer/v2/listeners/results.go b/vendor/github.com/gophercloud/gophercloud/openstack/loadbalancer/v2/listeners/results.go
index 7bf6734ef7f..3271c6ae055 100644
--- a/vendor/github.com/gophercloud/gophercloud/openstack/loadbalancer/v2/listeners/results.go
+++ b/vendor/github.com/gophercloud/gophercloud/openstack/loadbalancer/v2/listeners/results.go
@@ -37,6 +37,9 @@ type Listener struct {
// The UUID of default pool. Must have compatible protocol with listener.
DefaultPoolID string `json:"default_pool_id"`
+ // The default pool with which the Listener is associated.
+ DefaultPool *pools.Pool `json:"default_pool"`
+
// A list of load balancer IDs.
Loadbalancers []LoadBalancerID `json:"loadbalancers"`
diff --git a/vendor/github.com/gophercloud/gophercloud/openstack/loadbalancer/v2/loadbalancers/doc.go b/vendor/github.com/gophercloud/gophercloud/openstack/loadbalancer/v2/loadbalancers/doc.go
index 5c2b42d60ad..8587a0d99e4 100644
--- a/vendor/github.com/gophercloud/gophercloud/openstack/loadbalancer/v2/loadbalancers/doc.go
+++ b/vendor/github.com/gophercloud/gophercloud/openstack/loadbalancer/v2/loadbalancers/doc.go
@@ -39,6 +39,54 @@ Example to Create a Load Balancer
panic(err)
}
+Example to Create a fully populated Load Balancer
+
+ createOpts := loadbalancers.CreateOpts{
+ Name: "db_lb",
+ AdminStateUp: gophercloud.Enabled,
+ VipSubnetID: "9cedb85d-0759-4898-8a4b-fa5a5ea10086",
+ VipAddress: "10.30.176.48",
+ FlavorID: "60df399a-ee85-11e9-81b4-2a2ae2dbcce4",
+ Provider: "haproxy",
+ Tags: []string{"test", "stage"},
+ Listeners: []listeners.CreateOpts{{
+ Protocol: "HTTP",
+ ProtocolPort: 8080,
+ Name: "redirect_listener",
+ L7Policies: []l7policies.CreateOpts{{
+ Name: "redirect-example.com",
+ Action: l7policies.ActionRedirectToURL,
+ RedirectURL: "http://www.example.com",
+ Rules: []l7policies.CreateRuleOpts{{
+ RuleType: l7policies.TypePath,
+ CompareType: l7policies.CompareTypeRegex,
+ Value: "/images*",
+ }},
+ }},
+ DefaultPool: &pools.CreateOpts{
+ LBMethod: pools.LBMethodRoundRobin,
+ Protocol: "HTTP",
+ Name: "example pool",
+ Members: []pools.BatchUpdateMemberOpts{{
+ Address: "192.0.2.51",
+ ProtocolPort: 80,
+ },},
+ Monitor: &monitors.CreateOpts{
+ Name: "db",
+ Type: "HTTP",
+ Delay: 3,
+ MaxRetries: 2,
+ Timeout: 1,
+ },
+ },
+ }},
+ }
+
+ lb, err := loadbalancers.Create(networkClient, createOpts).Extract()
+ if err != nil {
+ panic(err)
+ }
+
Example to Update a Load Balancer
lbID := "d67d56a6-4a86-4688-a282-f46444705c64"
diff --git a/vendor/github.com/gophercloud/gophercloud/openstack/loadbalancer/v2/loadbalancers/requests.go b/vendor/github.com/gophercloud/gophercloud/openstack/loadbalancer/v2/loadbalancers/requests.go
index 4c7c2889420..42179ce7e33 100644
--- a/vendor/github.com/gophercloud/gophercloud/openstack/loadbalancer/v2/loadbalancers/requests.go
+++ b/vendor/github.com/gophercloud/gophercloud/openstack/loadbalancer/v2/loadbalancers/requests.go
@@ -2,6 +2,8 @@ package loadbalancers
import (
"github.com/gophercloud/gophercloud"
+ "github.com/gophercloud/gophercloud/openstack/loadbalancer/v2/listeners"
+ "github.com/gophercloud/gophercloud/openstack/loadbalancer/v2/pools"
"github.com/gophercloud/gophercloud/pagination"
)
@@ -29,6 +31,7 @@ type ListOpts struct {
OperatingStatus string `q:"operating_status"`
Name string `q:"name"`
FlavorID string `q:"flavor_id"`
+ AvailabilityZone string `q:"availability_zone"`
Provider string `q:"provider"`
Limit int `q:"limit"`
Marker string `q:"marker"`
@@ -111,9 +114,27 @@ type CreateOpts struct {
// The UUID of a flavor.
FlavorID string `json:"flavor_id,omitempty"`
+ // The name of an Octavia availability zone.
+ // Requires Octavia API version 2.14 or later.
+ AvailabilityZone string `json:"availability_zone,omitempty"`
+
// The name of the provider.
Provider string `json:"provider,omitempty"`
+ // Listeners is a slice of listeners.CreateOpts which allows a set
+ // of listeners to be created at the same time the Loadbalancer is created.
+ //
+ // This is only possible to use when creating a fully populated
+ // load balancer.
+ Listeners []listeners.CreateOpts `json:"listeners,omitempty"`
+
+ // Pools is a slice of pools.CreateOpts which allows a set of pools
+ // to be created at the same time the Loadbalancer is created.
+ //
+ // This is only possible to use when creating a fully populated
+ // load balancer.
+ Pools []pools.CreateOpts `json:"pools,omitempty"`
+
// Tags is a set of resource tags.
Tags []string `json:"tags,omitempty"`
}
diff --git a/vendor/github.com/gophercloud/gophercloud/openstack/loadbalancer/v2/loadbalancers/results.go b/vendor/github.com/gophercloud/gophercloud/openstack/loadbalancer/v2/loadbalancers/results.go
index 14d64a3586c..9a385363f27 100644
--- a/vendor/github.com/gophercloud/gophercloud/openstack/loadbalancer/v2/loadbalancers/results.go
+++ b/vendor/github.com/gophercloud/gophercloud/openstack/loadbalancer/v2/loadbalancers/results.go
@@ -59,6 +59,9 @@ type LoadBalancer struct {
// The UUID of a flavor if set.
FlavorID string `json:"flavor_id"`
+ // The name of an Octavia availability zone if set.
+ AvailabilityZone string `json:"availability_zone"`
+
// The name of the provider.
Provider string `json:"provider"`
diff --git a/vendor/github.com/gophercloud/gophercloud/openstack/loadbalancer/v2/monitors/requests.go b/vendor/github.com/gophercloud/gophercloud/openstack/loadbalancer/v2/monitors/requests.go
index aedf672fc13..cdfc810c9bf 100644
--- a/vendor/github.com/gophercloud/gophercloud/openstack/loadbalancer/v2/monitors/requests.go
+++ b/vendor/github.com/gophercloud/gophercloud/openstack/loadbalancer/v2/monitors/requests.go
@@ -91,7 +91,7 @@ type CreateOptsBuilder interface {
// operation.
type CreateOpts struct {
// The Pool to Monitor.
- PoolID string `json:"pool_id" required:"true"`
+ PoolID string `json:"pool_id,omitempty"`
// The type of probe, which is PING, TCP, HTTP, or HTTPS, that is
// sent by the load balancer to verify the member state.
diff --git a/vendor/github.com/gophercloud/gophercloud/openstack/loadbalancer/v2/pools/requests.go b/vendor/github.com/gophercloud/gophercloud/openstack/loadbalancer/v2/pools/requests.go
index 5a4c7750a3f..bf93656b021 100644
--- a/vendor/github.com/gophercloud/gophercloud/openstack/loadbalancer/v2/pools/requests.go
+++ b/vendor/github.com/gophercloud/gophercloud/openstack/loadbalancer/v2/pools/requests.go
@@ -2,6 +2,7 @@ package pools
import (
"github.com/gophercloud/gophercloud"
+ "github.com/gophercloud/gophercloud/openstack/loadbalancer/v2/monitors"
"github.com/gophercloud/gophercloud/pagination"
)
@@ -92,11 +93,11 @@ type CreateOpts struct {
// The Loadbalancer on which the members of the pool will be associated with.
// Note: one of LoadbalancerID or ListenerID must be provided.
- LoadbalancerID string `json:"loadbalancer_id,omitempty" xor:"ListenerID"`
+ LoadbalancerID string `json:"loadbalancer_id,omitempty"`
// The Listener on which the members of the pool will be associated with.
// Note: one of LoadbalancerID or ListenerID must be provided.
- ListenerID string `json:"listener_id,omitempty" xor:"LoadbalancerID"`
+ ListenerID string `json:"listener_id,omitempty"`
// ProjectID is the UUID of the project who owns the Pool.
// Only administrative users can specify a project UUID other than their own.
@@ -115,6 +116,20 @@ type CreateOpts struct {
// The administrative state of the Pool. A valid value is true (UP)
// or false (DOWN).
AdminStateUp *bool `json:"admin_state_up,omitempty"`
+
+ // Members is a slice of BatchUpdateMemberOpts which allows a set of
+ // members to be created at the same time the pool is created.
+ //
+ // This is only possible to use when creating a fully populated
+ // Loadbalancer.
+ Members []BatchUpdateMemberOpts `json:"members,omitempty"`
+
+ // Monitor is an instance of monitors.CreateOpts which allows a monitor
+ // to be created at the same time the pool is created.
+ //
+ // This is only possible to use when creating a fully populated
+ // Loadbalancer.
+ Monitor *monitors.CreateOpts `json:"healthmonitor,omitempty"`
}
// ToPoolCreateMap builds a request body from CreateOpts.
@@ -280,7 +295,9 @@ type CreateMemberOpts struct {
// or false (DOWN).
AdminStateUp *bool `json:"admin_state_up,omitempty"`
- // Is the member a backup? Backup members only receive traffic when all non-backup members are down.
+ // Is the member a backup? Backup members only receive traffic when all
+ // non-backup members are down.
+ // Requires microversion 2.1 or later.
Backup *bool `json:"backup,omitempty"`
// An alternate IP address used for health monitoring a backend member.
@@ -288,6 +305,10 @@ type CreateMemberOpts struct {
// An alternate protocol port used for health monitoring a backend member.
MonitorPort *int `json:"monitor_port,omitempty"`
+
+ // A list of simple strings assigned to the resource.
+ // Requires microversion 2.5 or later.
+ Tags []string `json:"tags,omitempty"`
}
// ToMemberCreateMap builds a request body from CreateMemberOpts.
@@ -335,6 +356,21 @@ type UpdateMemberOpts struct {
// The administrative state of the Pool. A valid value is true (UP)
// or false (DOWN).
AdminStateUp *bool `json:"admin_state_up,omitempty"`
+
+ // Is the member a backup? Backup members only receive traffic when all
+ // non-backup members are down.
+ // Requires microversion 2.1 or later.
+ Backup *bool `json:"backup,omitempty"`
+
+ // An alternate IP address used for health monitoring a backend member.
+ MonitorAddress *string `json:"monitor_address,omitempty"`
+
+ // An alternate protocol port used for health monitoring a backend member.
+ MonitorPort *int `json:"monitor_port,omitempty"`
+
+ // A list of simple strings assigned to the resource.
+ // Requires microversion 2.5 or later.
+ Tags []string `json:"tags,omitempty"`
}
// ToMemberUpdateMap builds a request body from UpdateMemberOpts.
@@ -390,6 +426,21 @@ type BatchUpdateMemberOpts struct {
// The administrative state of the Pool. A valid value is true (UP)
// or false (DOWN).
AdminStateUp *bool `json:"admin_state_up,omitempty"`
+
+ // Is the member a backup? Backup members only receive traffic when all
+ // non-backup members are down.
+ // Requires microversion 2.1 or later.
+ Backup *bool `json:"backup,omitempty"`
+
+ // An alternate IP address used for health monitoring a backend member.
+ MonitorAddress *string `json:"monitor_address,omitempty"`
+
+ // An alternate protocol port used for health monitoring a backend member.
+ MonitorPort *int `json:"monitor_port,omitempty"`
+
+ // A list of simple strings assigned to the resource.
+ // Requires microversion 2.5 or later.
+ Tags []string `json:"tags,omitempty"`
}
// ToBatchMemberUpdateMap builds a request body from BatchUpdateMemberOpts.
diff --git a/vendor/github.com/gophercloud/gophercloud/openstack/loadbalancer/v2/pools/results.go b/vendor/github.com/gophercloud/gophercloud/openstack/loadbalancer/v2/pools/results.go
index 1dc0ed90ac2..b4883e99864 100644
--- a/vendor/github.com/gophercloud/gophercloud/openstack/loadbalancer/v2/pools/results.go
+++ b/vendor/github.com/gophercloud/gophercloud/openstack/loadbalancer/v2/pools/results.go
@@ -228,6 +228,10 @@ type Member struct {
// An alternate protocol port used for health monitoring a backend member.
MonitorPort int `json:"monitor_port"`
+
+ // A list of simple strings assigned to the resource.
+ // Requires microversion 2.5 or later.
+ Tags []string `json:"tags"`
}
// MemberPage is the page returned by a pager when traversing over a
diff --git a/vendor/github.com/gophercloud/gophercloud/openstack/networking/v2/extensions/layer3/routers/doc.go b/vendor/github.com/gophercloud/gophercloud/openstack/networking/v2/extensions/layer3/routers/doc.go
index 6ede7f5e171..fb20e2ef548 100644
--- a/vendor/github.com/gophercloud/gophercloud/openstack/networking/v2/extensions/layer3/routers/doc.go
+++ b/vendor/github.com/gophercloud/gophercloud/openstack/networking/v2/extensions/layer3/routers/doc.go
@@ -48,7 +48,20 @@ Example to Update a Router
updateOpts := routers.UpdateOpts{
Name: "new_name",
- Routes: routes,
+ Routes: &routes,
+ }
+
+ router, err := routers.Update(networkClient, routerID, updateOpts).Extract()
+ if err != nil {
+ panic(err)
+ }
+
+Example to Update just the Router name, keeping everything else as-is
+
+ routerID := "4e8e5957-649f-477b-9e5b-f1f75b21c03c"
+
+ updateOpts := routers.UpdateOpts{
+ Name: "new_name",
}
router, err := routers.Update(networkClient, routerID, updateOpts).Extract()
@@ -63,7 +76,7 @@ Example to Remove all Routes from a Router
routes := []routers.Route{}
updateOpts := routers.UpdateOpts{
- Routes: routes,
+ Routes: &routes,
}
router, err := routers.Update(networkClient, routerID, updateOpts).Extract()
@@ -104,5 +117,23 @@ Example to Remove an Interface from a Router
if err != nil {
panic(err)
}
+
+Example to List an L3 agents for a Router
+
+ routerID := "4e8e5957-649f-477b-9e5b-f1f75b21c03c"
+
+ allPages, err := routers.ListL3Agents(networkClient, routerID).AllPages()
+ if err != nil {
+ panic(err)
+ }
+
+ allL3Agents, err := routers.ExtractL3Agents(allPages)
+ if err != nil {
+ panic(err)
+ }
+
+ for _, agent := range allL3Agents {
+ fmt.Printf("%+v\n", agent)
+ }
*/
package routers
diff --git a/vendor/github.com/gophercloud/gophercloud/openstack/networking/v2/extensions/layer3/routers/requests.go b/vendor/github.com/gophercloud/gophercloud/openstack/networking/v2/extensions/layer3/routers/requests.go
index e0b1effa175..81665acef4a 100644
--- a/vendor/github.com/gophercloud/gophercloud/openstack/networking/v2/extensions/layer3/routers/requests.go
+++ b/vendor/github.com/gophercloud/gophercloud/openstack/networking/v2/extensions/layer3/routers/requests.go
@@ -109,7 +109,7 @@ type UpdateOpts struct {
AdminStateUp *bool `json:"admin_state_up,omitempty"`
Distributed *bool `json:"distributed,omitempty"`
GatewayInfo *GatewayInfo `json:"external_gateway_info,omitempty"`
- Routes []Route `json:"routes"`
+ Routes *[]Route `json:"routes,omitempty"`
}
// ToRouterUpdateMap builds an update body based on UpdateOpts.
@@ -237,3 +237,10 @@ func RemoveInterface(c *gophercloud.ServiceClient, id string, opts RemoveInterfa
_, r.Header, r.Err = gophercloud.ParseResponse(resp, err)
return
}
+
+// ListL3Agents returns a list of l3-agents scheduled for a specific router.
+func ListL3Agents(c *gophercloud.ServiceClient, id string) (result pagination.Pager) {
+ return pagination.NewPager(c, listl3AgentsURL(c, id), func(r pagination.PageResult) pagination.Page {
+ return ListL3AgentsPage{pagination.SinglePageBase(r)}
+ })
+}
diff --git a/vendor/github.com/gophercloud/gophercloud/openstack/networking/v2/extensions/layer3/routers/results.go b/vendor/github.com/gophercloud/gophercloud/openstack/networking/v2/extensions/layer3/routers/results.go
index 857e1947e1f..a6c93cfd0a3 100644
--- a/vendor/github.com/gophercloud/gophercloud/openstack/networking/v2/extensions/layer3/routers/results.go
+++ b/vendor/github.com/gophercloud/gophercloud/openstack/networking/v2/extensions/layer3/routers/results.go
@@ -1,6 +1,9 @@
package routers
import (
+ "encoding/json"
+ "time"
+
"github.com/gophercloud/gophercloud"
"github.com/gophercloud/gophercloud/pagination"
)
@@ -179,3 +182,96 @@ func (r InterfaceResult) Extract() (*InterfaceInfo, error) {
err := r.ExtractInto(&s)
return &s, err
}
+
+// L3Agent represents a Neutron agent for routers.
+type L3Agent struct {
+ // ID is the id of the agent.
+ ID string `json:"id"`
+
+ // AdminStateUp is an administrative state of the agent.
+ AdminStateUp bool `json:"admin_state_up"`
+
+ // AgentType is a type of the agent.
+ AgentType string `json:"agent_type"`
+
+ // Alive indicates whether agent is alive or not.
+ Alive bool `json:"alive"`
+
+ // ResourcesSynced indicates whether agent is synced or not.
+ // Not all agent types track resources via Placement.
+ ResourcesSynced bool `json:"resources_synced"`
+
+ // AvailabilityZone is a zone of the agent.
+ AvailabilityZone string `json:"availability_zone"`
+
+ // Binary is an executable binary of the agent.
+ Binary string `json:"binary"`
+
+ // Configurations is a configuration specific key/value pairs that are
+ // determined by the agent binary and type.
+ Configurations map[string]interface{} `json:"configurations"`
+
+ // CreatedAt is a creation timestamp.
+ CreatedAt time.Time `json:"-"`
+
+ // StartedAt is a starting timestamp.
+ StartedAt time.Time `json:"-"`
+
+ // HeartbeatTimestamp is a last heartbeat timestamp.
+ HeartbeatTimestamp time.Time `json:"-"`
+
+ // Description contains agent description.
+ Description string `json:"description"`
+
+ // Host is a hostname of the agent system.
+ Host string `json:"host"`
+
+ // Topic contains name of AMQP topic.
+ Topic string `json:"topic"`
+
+ // HAState is a ha state of agent(active/standby) for router
+ HAState string `json:"ha_state"`
+
+ // ResourceVersions is a list agent known objects and version numbers
+ ResourceVersions map[string]interface{} `json:"resource_versions"`
+}
+
+// UnmarshalJSON helps to convert the timestamps into the time.Time type.
+func (r *L3Agent) UnmarshalJSON(b []byte) error {
+ type tmp L3Agent
+ var s struct {
+ tmp
+ CreatedAt gophercloud.JSONRFC3339ZNoTNoZ `json:"created_at"`
+ StartedAt gophercloud.JSONRFC3339ZNoTNoZ `json:"started_at"`
+ HeartbeatTimestamp gophercloud.JSONRFC3339ZNoTNoZ `json:"heartbeat_timestamp"`
+ }
+ err := json.Unmarshal(b, &s)
+ if err != nil {
+ return err
+ }
+ *r = L3Agent(s.tmp)
+
+ r.CreatedAt = time.Time(s.CreatedAt)
+ r.StartedAt = time.Time(s.StartedAt)
+ r.HeartbeatTimestamp = time.Time(s.HeartbeatTimestamp)
+
+ return nil
+}
+
+type ListL3AgentsPage struct {
+ pagination.SinglePageBase
+}
+
+func (r ListL3AgentsPage) IsEmpty() (bool, error) {
+ v, err := ExtractL3Agents(r)
+ return len(v) == 0, err
+}
+
+func ExtractL3Agents(r pagination.Page) ([]L3Agent, error) {
+ var s struct {
+ L3Agents []L3Agent `json:"agents"`
+ }
+
+ err := (r.(ListL3AgentsPage)).ExtractInto(&s)
+ return s.L3Agents, err
+}
diff --git a/vendor/github.com/gophercloud/gophercloud/openstack/networking/v2/extensions/layer3/routers/urls.go b/vendor/github.com/gophercloud/gophercloud/openstack/networking/v2/extensions/layer3/routers/urls.go
index f9e9da32117..7b30f9033c2 100644
--- a/vendor/github.com/gophercloud/gophercloud/openstack/networking/v2/extensions/layer3/routers/urls.go
+++ b/vendor/github.com/gophercloud/gophercloud/openstack/networking/v2/extensions/layer3/routers/urls.go
@@ -19,3 +19,7 @@ func addInterfaceURL(c *gophercloud.ServiceClient, id string) string {
func removeInterfaceURL(c *gophercloud.ServiceClient, id string) string {
return c.ServiceURL(resourcePath, id, "remove_router_interface")
}
+
+func listl3AgentsURL(c *gophercloud.ServiceClient, id string) string {
+ return c.ServiceURL(resourcePath, id, "l3-agents")
+}
diff --git a/vendor/github.com/gophercloud/gophercloud/openstack/objectstorage/v1/accounts/requests.go b/vendor/github.com/gophercloud/gophercloud/openstack/objectstorage/v1/accounts/requests.go
index 7c9acf85ff2..8c0bfaffb77 100644
--- a/vendor/github.com/gophercloud/gophercloud/openstack/objectstorage/v1/accounts/requests.go
+++ b/vendor/github.com/gophercloud/gophercloud/openstack/objectstorage/v1/accounts/requests.go
@@ -53,6 +53,7 @@ type UpdateOptsBuilder interface {
// deleting an account's metadata.
type UpdateOpts struct {
Metadata map[string]string
+ RemoveMetadata []string
ContentType string `h:"Content-Type"`
DetectContentType bool `h:"X-Detect-Content-Type"`
TempURLKey string `h:"X-Account-Meta-Temp-URL-Key"`
@@ -65,9 +66,15 @@ func (opts UpdateOpts) ToAccountUpdateMap() (map[string]string, error) {
if err != nil {
return nil, err
}
+
for k, v := range opts.Metadata {
headers["X-Account-Meta-"+k] = v
}
+
+ for _, k := range opts.RemoveMetadata {
+ headers["X-Remove-Account-Meta-"+k] = "remove"
+ }
+
return headers, err
}
diff --git a/vendor/github.com/gophercloud/gophercloud/openstack/objectstorage/v1/containers/requests.go b/vendor/github.com/gophercloud/gophercloud/openstack/objectstorage/v1/containers/requests.go
index b8f169345d6..119e06997fb 100644
--- a/vendor/github.com/gophercloud/gophercloud/openstack/objectstorage/v1/containers/requests.go
+++ b/vendor/github.com/gophercloud/gophercloud/openstack/objectstorage/v1/containers/requests.go
@@ -80,6 +80,7 @@ type CreateOpts struct {
HistoryLocation string `h:"X-History-Location"`
TempURLKey string `h:"X-Container-Meta-Temp-URL-Key"`
TempURLKey2 string `h:"X-Container-Meta-Temp-URL-Key-2"`
+ StoragePolicy string `h:"X-Storage-Policy"`
}
// ToContainerCreateMap formats a CreateOpts into a map of headers.
diff --git a/vendor/github.com/gophercloud/gophercloud/openstack/objectstorage/v1/objects/requests.go b/vendor/github.com/gophercloud/gophercloud/openstack/objectstorage/v1/objects/requests.go
index e5aeecbf571..7d6eb4123a0 100644
--- a/vendor/github.com/gophercloud/gophercloud/openstack/objectstorage/v1/objects/requests.go
+++ b/vendor/github.com/gophercloud/gophercloud/openstack/objectstorage/v1/objects/requests.go
@@ -106,6 +106,12 @@ func (opts DownloadOpts) ToObjectDownloadParams() (map[string]string, string, er
if err != nil {
return nil, q.String(), err
}
+ if !opts.IfModifiedSince.IsZero() {
+ h["If-Modified-Since"] = opts.IfModifiedSince.Format(time.RFC1123)
+ }
+ if !opts.IfUnmodifiedSince.IsZero() {
+ h["If-Unmodified-Since"] = opts.IfUnmodifiedSince.Format(time.RFC1123)
+ }
return h, q.String(), nil
}
@@ -153,8 +159,8 @@ type CreateOpts struct {
ContentLength int64 `h:"Content-Length"`
ContentType string `h:"Content-Type"`
CopyFrom string `h:"X-Copy-From"`
- DeleteAfter int `h:"X-Delete-After"`
- DeleteAt int `h:"X-Delete-At"`
+ DeleteAfter int64 `h:"X-Delete-After"`
+ DeleteAt int64 `h:"X-Delete-At"`
DetectContentType string `h:"X-Detect-Content-Type"`
ETag string `h:"ETag"`
IfNoneMatch string `h:"If-None-Match"`
@@ -388,11 +394,12 @@ type UpdateOptsBuilder interface {
// deleting an object's metadata.
type UpdateOpts struct {
Metadata map[string]string
+ RemoveMetadata []string
ContentDisposition string `h:"Content-Disposition"`
ContentEncoding string `h:"Content-Encoding"`
ContentType string `h:"Content-Type"`
- DeleteAfter int `h:"X-Delete-After"`
- DeleteAt int `h:"X-Delete-At"`
+ DeleteAfter int64 `h:"X-Delete-After"`
+ DeleteAt int64 `h:"X-Delete-At"`
DetectContentType bool `h:"X-Detect-Content-Type"`
}
@@ -402,9 +409,14 @@ func (opts UpdateOpts) ToObjectUpdateMap() (map[string]string, error) {
if err != nil {
return nil, err
}
+
for k, v := range opts.Metadata {
h["X-Object-Meta-"+k] = v
}
+
+ for _, k := range opts.RemoveMetadata {
+ h["X-Remove-Object-Meta-"+k] = "remove"
+ }
return h, nil
}
diff --git a/vendor/github.com/gophercloud/gophercloud/openstack/sharedfilesystems/v2/shares/doc.go b/vendor/github.com/gophercloud/gophercloud/openstack/sharedfilesystems/v2/shares/doc.go
new file mode 100644
index 00000000000..731dd85e2d2
--- /dev/null
+++ b/vendor/github.com/gophercloud/gophercloud/openstack/sharedfilesystems/v2/shares/doc.go
@@ -0,0 +1,45 @@
+/*
+Package shares provides information and interaction with the different
+API versions for the Shared File System service, code-named Manila.
+
+For more information, see:
+https://docs.openstack.org/api-ref/shared-file-system/
+
+Example to Revert a Share to a Snapshot ID
+ opts := &shares.RevertOpts{
+ // snapshot ID to revert to
+ SnapshotID: "ddeac769-9742-497f-b985-5bcfa94a3fd6",
+ }
+ manilaClient.Microversion = "2.27"
+ err := shares.Revert(manilaClient, shareID, opts).ExtractErr()
+ if err != nil {
+ panic(err)
+ }
+
+Example to Reset a Share Status
+ opts := &shares.ResetStatusOpts{
+ // a new Share Status
+ Status: "available",
+ }
+ manilaClient.Microversion = "2.7"
+ err := shares.ResetStatus(manilaClient, shareID, opts).ExtractErr()
+ if err != nil {
+ panic(err)
+ }
+
+Example to Force Delete a Share
+ manilaClient.Microversion = "2.7"
+ err := shares.ForceDelete(manilaClient, shareID).ExtractErr()
+ if err != nil {
+ panic(err)
+ }
+
+Example to Unmanage a Share
+ manilaClient.Microversion = "2.7"
+ err := shares.Unmanage(manilaClient, shareID).ExtractErr()
+ if err != nil {
+ panic(err)
+ }
+
+*/
+package shares
diff --git a/vendor/github.com/gophercloud/gophercloud/openstack/sharedfilesystems/v2/shares/requests.go b/vendor/github.com/gophercloud/gophercloud/openstack/sharedfilesystems/v2/shares/requests.go
new file mode 100644
index 00000000000..68ef32e17d0
--- /dev/null
+++ b/vendor/github.com/gophercloud/gophercloud/openstack/sharedfilesystems/v2/shares/requests.go
@@ -0,0 +1,599 @@
+package shares
+
+import (
+ "github.com/gophercloud/gophercloud"
+ "github.com/gophercloud/gophercloud/pagination"
+)
+
+// CreateOptsBuilder allows extensions to add additional parameters to the
+// Create request.
+type CreateOptsBuilder interface {
+ ToShareCreateMap() (map[string]interface{}, error)
+}
+
+// CreateOpts contains the options for create a Share. This object is
+// passed to shares.Create(). For more information about these parameters,
+// please refer to the Share object, or the shared file systems API v2
+// documentation
+type CreateOpts struct {
+ // Defines the share protocol to use
+ ShareProto string `json:"share_proto" required:"true"`
+ // Size in GB
+ Size int `json:"size" required:"true"`
+ // Defines the share name
+ Name string `json:"name,omitempty"`
+ // Share description
+ Description string `json:"description,omitempty"`
+ // DisplayName is equivalent to Name. The API supports using both
+ // This is an inherited attribute from the block storage API
+ DisplayName string `json:"display_name,omitempty"`
+ // DisplayDescription is equivalent to Description. The API supports using both
+ // This is an inherited attribute from the block storage API
+ DisplayDescription string `json:"display_description,omitempty"`
+ // ShareType defines the sharetype. If omitted, a default share type is used
+ ShareType string `json:"share_type,omitempty"`
+ // VolumeType is deprecated but supported. Either ShareType or VolumeType can be used
+ VolumeType string `json:"volume_type,omitempty"`
+ // The UUID from which to create a share
+ SnapshotID string `json:"snapshot_id,omitempty"`
+ // Determines whether or not the share is public
+ IsPublic *bool `json:"is_public,omitempty"`
+ // Key value pairs of user defined metadata
+ Metadata map[string]string `json:"metadata,omitempty"`
+ // The UUID of the share network to which the share belongs to
+ ShareNetworkID string `json:"share_network_id,omitempty"`
+ // The UUID of the consistency group to which the share belongs to
+ ConsistencyGroupID string `json:"consistency_group_id,omitempty"`
+ // The availability zone of the share
+ AvailabilityZone string `json:"availability_zone,omitempty"`
+}
+
+// ToShareCreateMap assembles a request body based on the contents of a
+// CreateOpts.
+func (opts CreateOpts) ToShareCreateMap() (map[string]interface{}, error) {
+ return gophercloud.BuildRequestBody(opts, "share")
+}
+
+// Create will create a new Share based on the values in CreateOpts. To extract
+// the Share object from the response, call the Extract method on the
+// CreateResult.
+func Create(client *gophercloud.ServiceClient, opts CreateOptsBuilder) (r CreateResult) {
+ b, err := opts.ToShareCreateMap()
+ if err != nil {
+ r.Err = err
+ return
+ }
+ resp, err := client.Post(createURL(client), b, &r.Body, &gophercloud.RequestOpts{
+ OkCodes: []int{200, 201},
+ })
+ _, r.Header, r.Err = gophercloud.ParseResponse(resp, err)
+ return
+}
+
+// ListOpts holds options for listing Shares. It is passed to the
+// shares.List function.
+type ListOpts struct {
+ // (Admin only). Defines whether to list the requested resources for all projects.
+ AllTenants bool `q:"all_tenants"`
+ // The share name.
+ Name string `q:"name"`
+ // Filters by a share status.
+ Status string `q:"status"`
+ // The UUID of the share server.
+ ShareServerID string `q:"share_server_id"`
+ // One or more metadata key and value pairs as a dictionary of strings.
+ Metadata map[string]string `q:"metadata"`
+ // The extra specifications for the share type.
+ ExtraSpecs map[string]string `q:"extra_specs"`
+ // The UUID of the share type.
+ ShareTypeID string `q:"share_type_id"`
+ // The maximum number of shares to return.
+ Limit int `q:"limit"`
+ // The offset to define start point of share or share group listing.
+ Offset int `q:"offset"`
+ // The key to sort a list of shares.
+ SortKey string `q:"sort_key"`
+ // The direction to sort a list of shares.
+ SortDir string `q:"sort_dir"`
+ // The UUID of the share’s base snapshot to filter the request based on.
+ SnapshotID string `q:"snapshot_id"`
+ // The share host name.
+ Host string `q:"host"`
+ // The share network ID.
+ ShareNetworkID string `q:"share_network_id"`
+ // The UUID of the project in which the share was created. Useful with all_tenants parameter.
+ ProjectID string `q:"project_id"`
+ // The level of visibility for the share.
+ IsPublic *bool `q:"is_public"`
+ // The UUID of a share group to filter resource.
+ ShareGroupID string `q:"share_group_id"`
+ // The export location UUID that can be used to filter shares or share instances.
+ ExportLocationID string `q:"export_location_id"`
+ // The export location path that can be used to filter shares or share instances.
+ ExportLocationPath string `q:"export_location_path"`
+ // The name pattern that can be used to filter shares, share snapshots, share networks or share groups.
+ NamePattern string `q:"name~"`
+ // The description pattern that can be used to filter shares, share snapshots, share networks or share groups.
+ DescriptionPattern string `q:"description~"`
+ // Whether to show count in API response or not, default is False.
+ WithCount bool `q:"with_count"`
+ // DisplayName is equivalent to Name. The API supports using both
+ // This is an inherited attribute from the block storage API
+ DisplayName string `q:"display_name"`
+ // Equivalent to NamePattern.
+ DisplayNamePattern string `q:"display_name~"`
+ // VolumeTypeID is deprecated but supported. Either ShareTypeID or VolumeTypeID can be used
+ VolumeTypeID string `q:"volume_type_id"`
+ // The UUID of the share group snapshot.
+ ShareGroupSnapshotID string `q:"share_group_snapshot_id"`
+ // DisplayDescription is equivalent to Description. The API supports using both
+ // This is an inherited attribute from the block storage API
+ DisplayDescription string `q:"display_description"`
+ // Equivalent to DescriptionPattern
+ DisplayDescriptionPattern string `q:"display_description~"`
+}
+
+// ListOptsBuilder allows extensions to add additional parameters to the List
+// request.
+type ListOptsBuilder interface {
+ ToShareListQuery() (string, error)
+}
+
+// ToShareListQuery formats a ListOpts into a query string.
+func (opts ListOpts) ToShareListQuery() (string, error) {
+ q, err := gophercloud.BuildQueryString(opts)
+ return q.String(), err
+}
+
+// ListDetail returns []Share optionally limited by the conditions provided in ListOpts.
+func ListDetail(client *gophercloud.ServiceClient, opts ListOptsBuilder) pagination.Pager {
+ url := listDetailURL(client)
+ if opts != nil {
+ query, err := opts.ToShareListQuery()
+ if err != nil {
+ return pagination.Pager{Err: err}
+ }
+ url += query
+ }
+
+ return pagination.NewPager(client, url, func(r pagination.PageResult) pagination.Page {
+ p := SharePage{pagination.MarkerPageBase{PageResult: r}}
+ p.MarkerPageBase.Owner = p
+ return p
+ })
+}
+
+// Delete will delete an existing Share with the given UUID.
+func Delete(client *gophercloud.ServiceClient, id string) (r DeleteResult) {
+ resp, err := client.Delete(deleteURL(client, id), nil)
+ _, r.Header, r.Err = gophercloud.ParseResponse(resp, err)
+ return
+}
+
+// Get will get a single share with given UUID
+func Get(client *gophercloud.ServiceClient, id string) (r GetResult) {
+ resp, err := client.Get(getURL(client, id), &r.Body, nil)
+ _, r.Header, r.Err = gophercloud.ParseResponse(resp, err)
+ return
+}
+
+// ListExportLocations will list shareID's export locations.
+// Client must have Microversion set; minimum supported microversion for ListExportLocations is 2.9.
+func ListExportLocations(client *gophercloud.ServiceClient, id string) (r ListExportLocationsResult) {
+ resp, err := client.Get(listExportLocationsURL(client, id), &r.Body, nil)
+ _, r.Header, r.Err = gophercloud.ParseResponse(resp, err)
+ return
+}
+
+// GetExportLocation will get shareID's export location by an ID.
+// Client must have Microversion set; minimum supported microversion for GetExportLocation is 2.9.
+func GetExportLocation(client *gophercloud.ServiceClient, shareID string, id string) (r GetExportLocationResult) {
+ resp, err := client.Get(getExportLocationURL(client, shareID, id), &r.Body, nil)
+ _, r.Header, r.Err = gophercloud.ParseResponse(resp, err)
+ return
+}
+
+// GrantAccessOptsBuilder allows extensions to add additional parameters to the
+// GrantAccess request.
+type GrantAccessOptsBuilder interface {
+ ToGrantAccessMap() (map[string]interface{}, error)
+}
+
+// GrantAccessOpts contains the options for creation of an GrantAccess request.
+// For more information about these parameters, please, refer to the shared file systems API v2,
+// Share Actions, Grant Access documentation
+type GrantAccessOpts struct {
+ // The access rule type that can be "ip", "cert" or "user".
+ AccessType string `json:"access_type"`
+ // The value that defines the access that can be a valid format of IP, cert or user.
+ AccessTo string `json:"access_to"`
+ // The access level to the share is either "rw" or "ro".
+ AccessLevel string `json:"access_level"`
+}
+
+// ToGrantAccessMap assembles a request body based on the contents of a
+// GrantAccessOpts.
+func (opts GrantAccessOpts) ToGrantAccessMap() (map[string]interface{}, error) {
+ return gophercloud.BuildRequestBody(opts, "allow_access")
+}
+
+// GrantAccess will grant access to a Share based on the values in GrantAccessOpts. To extract
+// the GrantAccess object from the response, call the Extract method on the GrantAccessResult.
+// Client must have Microversion set; minimum supported microversion for GrantAccess is 2.7.
+func GrantAccess(client *gophercloud.ServiceClient, id string, opts GrantAccessOptsBuilder) (r GrantAccessResult) {
+ b, err := opts.ToGrantAccessMap()
+ if err != nil {
+ r.Err = err
+ return
+ }
+ resp, err := client.Post(grantAccessURL(client, id), b, &r.Body, &gophercloud.RequestOpts{
+ OkCodes: []int{200},
+ })
+ _, r.Header, r.Err = gophercloud.ParseResponse(resp, err)
+ return
+}
+
+// RevokeAccessOptsBuilder allows extensions to add additional parameters to the
+// RevokeAccess request.
+type RevokeAccessOptsBuilder interface {
+ ToRevokeAccessMap() (map[string]interface{}, error)
+}
+
+// RevokeAccessOpts contains the options for creation of a RevokeAccess request.
+// For more information about these parameters, please, refer to the shared file systems API v2,
+// Share Actions, Revoke Access documentation
+type RevokeAccessOpts struct {
+ AccessID string `json:"access_id"`
+}
+
+// ToRevokeAccessMap assembles a request body based on the contents of a
+// RevokeAccessOpts.
+func (opts RevokeAccessOpts) ToRevokeAccessMap() (map[string]interface{}, error) {
+ return gophercloud.BuildRequestBody(opts, "deny_access")
+}
+
+// RevokeAccess will revoke an existing access to a Share based on the values in RevokeAccessOpts.
+// RevokeAccessResult contains only the error. To extract it, call the ExtractErr method on
+// the RevokeAccessResult. Client must have Microversion set; minimum supported microversion
+// for RevokeAccess is 2.7.
+func RevokeAccess(client *gophercloud.ServiceClient, id string, opts RevokeAccessOptsBuilder) (r RevokeAccessResult) {
+ b, err := opts.ToRevokeAccessMap()
+ if err != nil {
+ r.Err = err
+ return
+ }
+
+ resp, err := client.Post(revokeAccessURL(client, id), b, nil, &gophercloud.RequestOpts{
+ OkCodes: []int{200, 202},
+ })
+ _, r.Header, r.Err = gophercloud.ParseResponse(resp, err)
+ return
+}
+
+// ListAccessRights lists all access rules assigned to a Share based on its id. To extract
+// the AccessRight slice from the response, call the Extract method on the ListAccessRightsResult.
+// Client must have Microversion set; minimum supported microversion for ListAccessRights is 2.7.
+func ListAccessRights(client *gophercloud.ServiceClient, id string) (r ListAccessRightsResult) {
+ requestBody := map[string]interface{}{"access_list": nil}
+ resp, err := client.Post(listAccessRightsURL(client, id), requestBody, &r.Body, &gophercloud.RequestOpts{
+ OkCodes: []int{200},
+ })
+ _, r.Header, r.Err = gophercloud.ParseResponse(resp, err)
+ return
+}
+
+// ExtendOptsBuilder allows extensions to add additional parameters to the
+// Extend request.
+type ExtendOptsBuilder interface {
+ ToShareExtendMap() (map[string]interface{}, error)
+}
+
+// ExtendOpts contains options for extending a Share.
+// For more information about these parameters, please, refer to the shared file systems API v2,
+// Share Actions, Extend share documentation
+type ExtendOpts struct {
+ // New size in GBs.
+ NewSize int `json:"new_size"`
+}
+
+// ToShareExtendMap assembles a request body based on the contents of a
+// ExtendOpts.
+func (opts ExtendOpts) ToShareExtendMap() (map[string]interface{}, error) {
+ return gophercloud.BuildRequestBody(opts, "extend")
+}
+
+// Extend will extend the capacity of an existing share. ExtendResult contains only the error.
+// To extract it, call the ExtractErr method on the ExtendResult.
+// Client must have Microversion set; minimum supported microversion for Extend is 2.7.
+func Extend(client *gophercloud.ServiceClient, id string, opts ExtendOptsBuilder) (r ExtendResult) {
+ b, err := opts.ToShareExtendMap()
+ if err != nil {
+ r.Err = err
+ return
+ }
+
+ resp, err := client.Post(extendURL(client, id), b, nil, &gophercloud.RequestOpts{
+ OkCodes: []int{202},
+ })
+ _, r.Header, r.Err = gophercloud.ParseResponse(resp, err)
+ return
+}
+
+// ShrinkOptsBuilder allows extensions to add additional parameters to the
+// Shrink request.
+type ShrinkOptsBuilder interface {
+ ToShareShrinkMap() (map[string]interface{}, error)
+}
+
+// ShrinkOpts contains options for shrinking a Share.
+// For more information about these parameters, please, refer to the shared file systems API v2,
+// Share Actions, Shrink share documentation
+type ShrinkOpts struct {
+ // New size in GBs.
+ NewSize int `json:"new_size"`
+}
+
+// ToShareShrinkMap assembles a request body based on the contents of a
+// ShrinkOpts.
+func (opts ShrinkOpts) ToShareShrinkMap() (map[string]interface{}, error) {
+ return gophercloud.BuildRequestBody(opts, "shrink")
+}
+
+// Shrink will shrink the capacity of an existing share. ShrinkResult contains only the error.
+// To extract it, call the ExtractErr method on the ShrinkResult.
+// Client must have Microversion set; minimum supported microversion for Shrink is 2.7.
+func Shrink(client *gophercloud.ServiceClient, id string, opts ShrinkOptsBuilder) (r ShrinkResult) {
+ b, err := opts.ToShareShrinkMap()
+ if err != nil {
+ r.Err = err
+ return
+ }
+
+ resp, err := client.Post(shrinkURL(client, id), b, nil, &gophercloud.RequestOpts{
+ OkCodes: []int{202},
+ })
+ _, r.Header, r.Err = gophercloud.ParseResponse(resp, err)
+ return
+}
+
+// UpdateOptsBuilder allows extensions to add additional parameters to the
+// Update request.
+type UpdateOptsBuilder interface {
+ ToShareUpdateMap() (map[string]interface{}, error)
+}
+
+// UpdateOpts contain options for updating an existing Share. This object is passed
+// to the share.Update function. For more information about the parameters, see
+// the Share object.
+type UpdateOpts struct {
+ // Share name. Manila share update logic doesn't have a "name" alias.
+ DisplayName *string `json:"display_name,omitempty"`
+ // Share description. Manila share update logic doesn't have a "description" alias.
+ DisplayDescription *string `json:"display_description,omitempty"`
+ // Determines whether or not the share is public
+ IsPublic *bool `json:"is_public,omitempty"`
+}
+
+// ToShareUpdateMap assembles a request body based on the contents of an
+// UpdateOpts.
+func (opts UpdateOpts) ToShareUpdateMap() (map[string]interface{}, error) {
+ return gophercloud.BuildRequestBody(opts, "share")
+}
+
+// Update will update the Share with provided information. To extract the updated
+// Share from the response, call the Extract method on the UpdateResult.
+func Update(client *gophercloud.ServiceClient, id string, opts UpdateOptsBuilder) (r UpdateResult) {
+ b, err := opts.ToShareUpdateMap()
+ if err != nil {
+ r.Err = err
+ return
+ }
+ resp, err := client.Put(updateURL(client, id), b, &r.Body, &gophercloud.RequestOpts{
+ OkCodes: []int{200},
+ })
+ _, r.Header, r.Err = gophercloud.ParseResponse(resp, err)
+ return
+}
+
+// GetMetadata retrieves metadata of the specified share. To extract the retrieved
+// metadata from the response, call the Extract method on the MetadataResult.
+func GetMetadata(client *gophercloud.ServiceClient, id string) (r MetadataResult) {
+ resp, err := client.Get(getMetadataURL(client, id), &r.Body, nil)
+ _, r.Header, r.Err = gophercloud.ParseResponse(resp, err)
+ return
+}
+
+// GetMetadatum retrieves a single metadata item of the specified share. To extract the retrieved
+// metadata from the response, call the Extract method on the GetMetadatumResult.
+func GetMetadatum(client *gophercloud.ServiceClient, id, key string) (r GetMetadatumResult) {
+ resp, err := client.Get(getMetadatumURL(client, id, key), &r.Body, nil)
+ _, r.Header, r.Err = gophercloud.ParseResponse(resp, err)
+ return
+}
+
+// SetMetadataOpts contains options for setting share metadata.
+// For more information about these parameters, please, refer to the shared file systems API v2,
+// Share Metadata, Show share metadata documentation.
+type SetMetadataOpts struct {
+ Metadata map[string]string `json:"metadata"`
+}
+
+// ToSetMetadataMap assembles a request body based on the contents of an
+// SetMetadataOpts.
+func (opts SetMetadataOpts) ToSetMetadataMap() (map[string]interface{}, error) {
+ return gophercloud.BuildRequestBody(opts, "")
+}
+
+// SetMetadataOptsBuilder allows extensions to add additional parameters to the
+// SetMetadata request.
+type SetMetadataOptsBuilder interface {
+ ToSetMetadataMap() (map[string]interface{}, error)
+}
+
+// SetMetadata sets metadata of the specified share.
+// Existing metadata items are either kept or overwritten by the metadata from the request.
+// To extract the updated metadata from the response, call the Extract
+// method on the MetadataResult.
+func SetMetadata(client *gophercloud.ServiceClient, id string, opts SetMetadataOptsBuilder) (r MetadataResult) {
+ b, err := opts.ToSetMetadataMap()
+ if err != nil {
+ r.Err = err
+ return
+ }
+
+ resp, err := client.Post(setMetadataURL(client, id), b, &r.Body, &gophercloud.RequestOpts{
+ OkCodes: []int{200},
+ })
+ _, r.Header, r.Err = gophercloud.ParseResponse(resp, err)
+ return
+}
+
+// UpdateMetadataOpts contains options for updating share metadata.
+// For more information about these parameters, please, refer to the shared file systems API v2,
+// Share Metadata, Update share metadata documentation.
+type UpdateMetadataOpts struct {
+ Metadata map[string]string `json:"metadata"`
+}
+
+// ToUpdateMetadataMap assembles a request body based on the contents of an
+// UpdateMetadataOpts.
+func (opts UpdateMetadataOpts) ToUpdateMetadataMap() (map[string]interface{}, error) {
+ return gophercloud.BuildRequestBody(opts, "")
+}
+
+// UpdateMetadataOptsBuilder allows extensions to add additional parameters to the
+// UpdateMetadata request.
+type UpdateMetadataOptsBuilder interface {
+ ToUpdateMetadataMap() (map[string]interface{}, error)
+}
+
+// UpdateMetadata updates metadata of the specified share.
+// All existing metadata items are discarded and replaced by the metadata from the request.
+// To extract the updated metadata from the response, call the Extract
+// method on the MetadataResult.
+func UpdateMetadata(client *gophercloud.ServiceClient, id string, opts UpdateMetadataOptsBuilder) (r MetadataResult) {
+ b, err := opts.ToUpdateMetadataMap()
+ if err != nil {
+ r.Err = err
+ return
+ }
+
+ resp, err := client.Post(updateMetadataURL(client, id), b, &r.Body, &gophercloud.RequestOpts{
+ OkCodes: []int{200},
+ })
+ _, r.Header, r.Err = gophercloud.ParseResponse(resp, err)
+ return
+}
+
+// DeleteMetadatum deletes a single key-value pair from the metadata of the specified share.
+func DeleteMetadatum(client *gophercloud.ServiceClient, id, key string) (r DeleteMetadatumResult) {
+ resp, err := client.Delete(deleteMetadatumURL(client, id, key), &gophercloud.RequestOpts{
+ OkCodes: []int{200},
+ })
+ _, r.Header, r.Err = gophercloud.ParseResponse(resp, err)
+ return
+}
+
+// RevertOptsBuilder allows extensions to add additional parameters to the
+// Revert request.
+type RevertOptsBuilder interface {
+ ToShareRevertMap() (map[string]interface{}, error)
+}
+
+// RevertOpts contains options for reverting a Share to a snapshot.
+// For more information about these parameters, please, refer to the shared file systems API v2,
+// Share Actions, Revert share documentation.
+// Available only since Manila Microversion 2.27
+type RevertOpts struct {
+ // SnapshotID is a Snapshot ID to revert a Share to
+ SnapshotID string `json:"snapshot_id"`
+}
+
+// ToShareRevertMap assembles a request body based on the contents of a
+// RevertOpts.
+func (opts RevertOpts) ToShareRevertMap() (map[string]interface{}, error) {
+ return gophercloud.BuildRequestBody(opts, "revert")
+}
+
+// Revert will revert the existing share to a Snapshot. RevertResult contains only the error.
+// To extract it, call the ExtractErr method on the RevertResult.
+// Client must have Microversion set; minimum supported microversion for Revert is 2.27.
+func Revert(client *gophercloud.ServiceClient, id string, opts RevertOptsBuilder) (r RevertResult) {
+ b, err := opts.ToShareRevertMap()
+ if err != nil {
+ r.Err = err
+ return
+ }
+
+ resp, err := client.Post(revertURL(client, id), b, nil, &gophercloud.RequestOpts{
+ OkCodes: []int{202},
+ })
+ _, r.Header, r.Err = gophercloud.ParseResponse(resp, err)
+ return
+}
+
+// ResetStatusOptsBuilder allows extensions to add additional parameters to the
+// ResetStatus request.
+type ResetStatusOptsBuilder interface {
+ ToShareResetStatusMap() (map[string]interface{}, error)
+}
+
+// ResetStatusOpts contains options for resetting a Share status.
+// For more information about these parameters, please, refer to the shared file systems API v2,
+// Share Actions, ResetStatus share documentation.
+type ResetStatusOpts struct {
+ // Status is a share status to reset to. Must be "new", "error" or "active".
+ Status string `json:"status"`
+}
+
+// ToShareResetStatusMap assembles a request body based on the contents of a
+// ResetStatusOpts.
+func (opts ResetStatusOpts) ToShareResetStatusMap() (map[string]interface{}, error) {
+ return gophercloud.BuildRequestBody(opts, "reset_status")
+}
+
+// ResetStatus will reset the existing share status. ResetStatusResult contains only the error.
+// To extract it, call the ExtractErr method on the ResetStatusResult.
+// Client must have Microversion set; minimum supported microversion for ResetStatus is 2.7.
+func ResetStatus(client *gophercloud.ServiceClient, id string, opts ResetStatusOptsBuilder) (r ResetStatusResult) {
+ b, err := opts.ToShareResetStatusMap()
+ if err != nil {
+ r.Err = err
+ return
+ }
+
+ resp, err := client.Post(resetStatusURL(client, id), b, nil, &gophercloud.RequestOpts{
+ OkCodes: []int{202},
+ })
+ _, r.Header, r.Err = gophercloud.ParseResponse(resp, err)
+ return
+}
+
+// ForceDelete will delete the existing share in any state. ForceDeleteResult contains only the error.
+// To extract it, call the ExtractErr method on the ForceDeleteResult.
+// Client must have Microversion set; minimum supported microversion for ForceDelete is 2.7.
+func ForceDelete(client *gophercloud.ServiceClient, id string) (r ForceDeleteResult) {
+ b := map[string]interface{}{
+ "force_delete": nil,
+ }
+ resp, err := client.Post(forceDeleteURL(client, id), b, nil, &gophercloud.RequestOpts{
+ OkCodes: []int{202},
+ })
+ _, r.Header, r.Err = gophercloud.ParseResponse(resp, err)
+ return
+}
+
+// Unmanage will remove a share from the management of the Shared File System
+// service without deleting the share. UnmanageResult contains only the error.
+// To extract it, call the ExtractErr method on the UnmanageResult.
+// Client must have Microversion set; minimum supported microversion for Unmanage is 2.7.
+func Unmanage(client *gophercloud.ServiceClient, id string) (r UnmanageResult) {
+ b := map[string]interface{}{
+ "unmanage": nil,
+ }
+ resp, err := client.Post(unmanageURL(client, id), b, nil, &gophercloud.RequestOpts{
+ OkCodes: []int{202},
+ })
+ _, r.Header, r.Err = gophercloud.ParseResponse(resp, err)
+ return
+}
diff --git a/vendor/github.com/gophercloud/gophercloud/openstack/sharedfilesystems/v2/shares/results.go b/vendor/github.com/gophercloud/gophercloud/openstack/sharedfilesystems/v2/shares/results.go
new file mode 100644
index 00000000000..741f4a0d64d
--- /dev/null
+++ b/vendor/github.com/gophercloud/gophercloud/openstack/sharedfilesystems/v2/shares/results.go
@@ -0,0 +1,372 @@
+package shares
+
+import (
+ "encoding/json"
+ "net/url"
+ "strconv"
+ "time"
+
+ "github.com/gophercloud/gophercloud"
+ "github.com/gophercloud/gophercloud/pagination"
+)
+
+const (
+ invalidMarker = "-1"
+)
+
+// Share contains all information associated with an OpenStack Share
+type Share struct {
+ // The availability zone of the share
+ AvailabilityZone string `json:"availability_zone"`
+ // A description of the share
+ Description string `json:"description,omitempty"`
+ // DisplayDescription is inherited from BlockStorage API.
+ // Both Description and DisplayDescription can be used
+ DisplayDescription string `json:"display_description,omitempty"`
+ // DisplayName is inherited from BlockStorage API
+ // Both DisplayName and Name can be used
+ DisplayName string `json:"display_name,omitempty"`
+ // Indicates whether a share has replicas or not.
+ HasReplicas bool `json:"has_replicas"`
+ // The host name of the share
+ Host string `json:"host"`
+ // The UUID of the share
+ ID string `json:"id"`
+ // Indicates the visibility of the share
+ IsPublic bool `json:"is_public,omitempty"`
+ // Share links for pagination
+ Links []map[string]string `json:"links"`
+ // Key, value -pairs of custom metadata
+ Metadata map[string]string `json:"metadata,omitempty"`
+ // The name of the share
+ Name string `json:"name,omitempty"`
+ // The UUID of the project to which this share belongs to
+ ProjectID string `json:"project_id"`
+ // The share replication type
+ ReplicationType string `json:"replication_type,omitempty"`
+ // The UUID of the share network
+ ShareNetworkID string `json:"share_network_id"`
+ // The shared file system protocol
+ ShareProto string `json:"share_proto"`
+ // The UUID of the share server
+ ShareServerID string `json:"share_server_id"`
+ // The UUID of the share type.
+ ShareType string `json:"share_type"`
+ // The name of the share type.
+ ShareTypeName string `json:"share_type_name"`
+ // Size of the share in GB
+ Size int `json:"size"`
+ // UUID of the snapshot from which to create the share
+ SnapshotID string `json:"snapshot_id"`
+ // The share status
+ Status string `json:"status"`
+ // The task state, used for share migration
+ TaskState string `json:"task_state"`
+ // The type of the volume
+ VolumeType string `json:"volume_type,omitempty"`
+ // The UUID of the consistency group this share belongs to
+ ConsistencyGroupID string `json:"consistency_group_id"`
+ // Used for filtering backends which either support or do not support share snapshots
+ SnapshotSupport bool `json:"snapshot_support"`
+ SourceCgsnapshotMemberID string `json:"source_cgsnapshot_member_id"`
+ // Timestamp when the share was created
+ CreatedAt time.Time `json:"-"`
+ // Timestamp when the share was updated
+ UpdatedAt time.Time `json:"-"`
+}
+
+func (r *Share) UnmarshalJSON(b []byte) error {
+ type tmp Share
+ var s struct {
+ tmp
+ CreatedAt gophercloud.JSONRFC3339MilliNoZ `json:"created_at"`
+ UpdatedAt gophercloud.JSONRFC3339MilliNoZ `json:"updated_at"`
+ }
+ err := json.Unmarshal(b, &s)
+ if err != nil {
+ return err
+ }
+ *r = Share(s.tmp)
+
+ r.CreatedAt = time.Time(s.CreatedAt)
+ r.UpdatedAt = time.Time(s.UpdatedAt)
+
+ return nil
+}
+
+type commonResult struct {
+ gophercloud.Result
+}
+
+// Extract will get the Share object from the commonResult
+func (r commonResult) Extract() (*Share, error) {
+ var s struct {
+ Share *Share `json:"share"`
+ }
+ err := r.ExtractInto(&s)
+ return s.Share, err
+}
+
+// CreateResult contains the response body and error from a Create request.
+type CreateResult struct {
+ commonResult
+}
+
+// SharePage is a pagination.pager that is returned from a call to the List function.
+type SharePage struct {
+ pagination.MarkerPageBase
+}
+
+// NextPageURL generates the URL for the page of results after this one.
+func (r SharePage) NextPageURL() (string, error) {
+ currentURL := r.URL
+ mark, err := r.Owner.LastMarker()
+ if err != nil {
+ return "", err
+ }
+ if mark == invalidMarker {
+ return "", nil
+ }
+
+ q := currentURL.Query()
+ q.Set("offset", mark)
+ currentURL.RawQuery = q.Encode()
+ return currentURL.String(), nil
+}
+
+// LastMarker returns the last offset in a ListResult.
+func (r SharePage) LastMarker() (string, error) {
+ shares, err := ExtractShares(r)
+ if err != nil {
+ return invalidMarker, err
+ }
+ if len(shares) == 0 {
+ return invalidMarker, nil
+ }
+
+ u, err := url.Parse(r.URL.String())
+ if err != nil {
+ return invalidMarker, err
+ }
+ queryParams := u.Query()
+ offset := queryParams.Get("offset")
+ limit := queryParams.Get("limit")
+
+ // Limit is not present, only one page required
+ if limit == "" {
+ return invalidMarker, nil
+ }
+
+ iOffset := 0
+ if offset != "" {
+ iOffset, err = strconv.Atoi(offset)
+ if err != nil {
+ return invalidMarker, err
+ }
+ }
+ iLimit, err := strconv.Atoi(limit)
+ if err != nil {
+ return invalidMarker, err
+ }
+ iOffset = iOffset + iLimit
+ offset = strconv.Itoa(iOffset)
+
+ return offset, nil
+}
+
+// IsEmpty satisifies the IsEmpty method of the Page interface
+func (r SharePage) IsEmpty() (bool, error) {
+ shares, err := ExtractShares(r)
+ return len(shares) == 0, err
+}
+
+// ExtractShares extracts and returns a Share slice. It is used while
+// iterating over a shares.List call.
+func ExtractShares(r pagination.Page) ([]Share, error) {
+ var s struct {
+ Shares []Share `json:"shares"`
+ }
+
+ err := (r.(SharePage)).ExtractInto(&s)
+
+ return s.Shares, err
+}
+
+// DeleteResult contains the response body and error from a Delete request.
+type DeleteResult struct {
+ gophercloud.ErrResult
+}
+
+// GetResult contains the response body and error from a Get request.
+type GetResult struct {
+ commonResult
+}
+
+// UpdateResult contains the response body and error from an Update request.
+type UpdateResult struct {
+ commonResult
+}
+
+// ListExportLocationsResult contains the result body and error from a
+// ListExportLocations request.
+type ListExportLocationsResult struct {
+ gophercloud.Result
+}
+
+// GetExportLocationResult contains the result body and error from a
+// GetExportLocation request.
+type GetExportLocationResult struct {
+ gophercloud.Result
+}
+
+// ExportLocation contains all information associated with a share export location
+type ExportLocation struct {
+ // The export location path that should be used for mount operation.
+ Path string `json:"path"`
+ // The UUID of the share instance that this export location belongs to.
+ ShareInstanceID string `json:"share_instance_id"`
+ // Defines purpose of an export location.
+ // If set to true, then it is expected to be used for service needs
+ // and by administrators only.
+ // If it is set to false, then this export location can be used by end users.
+ IsAdminOnly bool `json:"is_admin_only"`
+ // The share export location UUID.
+ ID string `json:"id"`
+ // Drivers may use this field to identify which export locations are
+ // most efficient and should be used preferentially by clients.
+ // By default it is set to false value. New in version 2.14
+ Preferred bool `json:"preferred"`
+}
+
+// Extract will get the Export Locations from the ListExportLocationsResult
+func (r ListExportLocationsResult) Extract() ([]ExportLocation, error) {
+ var s struct {
+ ExportLocations []ExportLocation `json:"export_locations"`
+ }
+ err := r.ExtractInto(&s)
+ return s.ExportLocations, err
+}
+
+// Extract will get the Export Location from the GetExportLocationResult
+func (r GetExportLocationResult) Extract() (*ExportLocation, error) {
+ var s struct {
+ ExportLocation *ExportLocation `json:"export_location"`
+ }
+ err := r.ExtractInto(&s)
+ return s.ExportLocation, err
+}
+
+// AccessRight contains all information associated with an OpenStack share
+// Grant Access Response
+type AccessRight struct {
+ // The UUID of the share to which you are granted or denied access.
+ ShareID string `json:"share_id"`
+ // The access rule type that can be "ip", "cert" or "user".
+ AccessType string `json:"access_type,omitempty"`
+ // The value that defines the access that can be a valid format of IP, cert or user.
+ AccessTo string `json:"access_to,omitempty"`
+ // The access credential of the entity granted share access.
+ AccessKey string `json:"access_key,omitempty"`
+ // The access level to the share is either "rw" or "ro".
+ AccessLevel string `json:"access_level,omitempty"`
+ // The state of the access rule
+ State string `json:"state,omitempty"`
+ // The access rule ID.
+ ID string `json:"id"`
+}
+
+// Extract will get the GrantAccess object from the commonResult
+func (r GrantAccessResult) Extract() (*AccessRight, error) {
+ var s struct {
+ AccessRight *AccessRight `json:"access"`
+ }
+ err := r.ExtractInto(&s)
+ return s.AccessRight, err
+}
+
+// GrantAccessResult contains the result body and error from an GrantAccess request.
+type GrantAccessResult struct {
+ gophercloud.Result
+}
+
+// RevokeAccessResult contains the response body and error from a Revoke access request.
+type RevokeAccessResult struct {
+ gophercloud.ErrResult
+}
+
+// Extract will get a slice of AccessRight objects from the commonResult
+func (r ListAccessRightsResult) Extract() ([]AccessRight, error) {
+ var s struct {
+ AccessRights []AccessRight `json:"access_list"`
+ }
+ err := r.ExtractInto(&s)
+ return s.AccessRights, err
+}
+
+// ListAccessRightsResult contains the result body and error from a ListAccessRights request.
+type ListAccessRightsResult struct {
+ gophercloud.Result
+}
+
+// ExtendResult contains the response body and error from an Extend request.
+type ExtendResult struct {
+ gophercloud.ErrResult
+}
+
+// ShrinkResult contains the response body and error from a Shrink request.
+type ShrinkResult struct {
+ gophercloud.ErrResult
+}
+
+// GetMetadatumResult contains the response body and error from a GetMetadatum request.
+type GetMetadatumResult struct {
+ gophercloud.Result
+}
+
+// Extract will get the string-string map from GetMetadatumResult
+func (r GetMetadatumResult) Extract() (map[string]string, error) {
+ var s struct {
+ Meta map[string]string `json:"meta"`
+ }
+ err := r.ExtractInto(&s)
+ return s.Meta, err
+}
+
+// MetadataResult contains the response body and error from GetMetadata, SetMetadata or UpdateMetadata requests.
+type MetadataResult struct {
+ gophercloud.Result
+}
+
+// Extract will get the string-string map from MetadataResult
+func (r MetadataResult) Extract() (map[string]string, error) {
+ var s struct {
+ Metadata map[string]string `json:"metadata"`
+ }
+ err := r.ExtractInto(&s)
+ return s.Metadata, err
+}
+
+// DeleteMetadatumResult contains the response body and error from a DeleteMetadatum request.
+type DeleteMetadatumResult struct {
+ gophercloud.ErrResult
+}
+
+// RevertResult contains the response error from an Revert request.
+type RevertResult struct {
+ gophercloud.ErrResult
+}
+
+// ResetStatusResult contains the response error from an ResetStatus request.
+type ResetStatusResult struct {
+ gophercloud.ErrResult
+}
+
+// ForceDeleteResult contains the response error from an ForceDelete request.
+type ForceDeleteResult struct {
+ gophercloud.ErrResult
+}
+
+// UnmanageResult contains the response error from an Unmanage request.
+type UnmanageResult struct {
+ gophercloud.ErrResult
+}
diff --git a/vendor/github.com/gophercloud/gophercloud/openstack/sharedfilesystems/v2/shares/urls.go b/vendor/github.com/gophercloud/gophercloud/openstack/sharedfilesystems/v2/shares/urls.go
new file mode 100644
index 00000000000..f5c347cbda6
--- /dev/null
+++ b/vendor/github.com/gophercloud/gophercloud/openstack/sharedfilesystems/v2/shares/urls.go
@@ -0,0 +1,87 @@
+package shares
+
+import "github.com/gophercloud/gophercloud"
+
+func createURL(c *gophercloud.ServiceClient) string {
+ return c.ServiceURL("shares")
+}
+
+func listDetailURL(c *gophercloud.ServiceClient) string {
+ return c.ServiceURL("shares", "detail")
+}
+
+func deleteURL(c *gophercloud.ServiceClient, id string) string {
+ return c.ServiceURL("shares", id)
+}
+
+func getURL(c *gophercloud.ServiceClient, id string) string {
+ return c.ServiceURL("shares", id)
+}
+
+func updateURL(c *gophercloud.ServiceClient, id string) string {
+ return c.ServiceURL("shares", id)
+}
+
+func listExportLocationsURL(c *gophercloud.ServiceClient, id string) string {
+ return c.ServiceURL("shares", id, "export_locations")
+}
+
+func getExportLocationURL(c *gophercloud.ServiceClient, shareID, id string) string {
+ return c.ServiceURL("shares", shareID, "export_locations", id)
+}
+
+func grantAccessURL(c *gophercloud.ServiceClient, id string) string {
+ return c.ServiceURL("shares", id, "action")
+}
+
+func revokeAccessURL(c *gophercloud.ServiceClient, id string) string {
+ return c.ServiceURL("shares", id, "action")
+}
+
+func listAccessRightsURL(c *gophercloud.ServiceClient, id string) string {
+ return c.ServiceURL("shares", id, "action")
+}
+
+func extendURL(c *gophercloud.ServiceClient, id string) string {
+ return c.ServiceURL("shares", id, "action")
+}
+
+func shrinkURL(c *gophercloud.ServiceClient, id string) string {
+ return c.ServiceURL("shares", id, "action")
+}
+
+func revertURL(c *gophercloud.ServiceClient, id string) string {
+ return c.ServiceURL("shares", id, "action")
+}
+
+func resetStatusURL(c *gophercloud.ServiceClient, id string) string {
+ return c.ServiceURL("shares", id, "action")
+}
+
+func forceDeleteURL(c *gophercloud.ServiceClient, id string) string {
+ return c.ServiceURL("shares", id, "action")
+}
+
+func unmanageURL(c *gophercloud.ServiceClient, id string) string {
+ return c.ServiceURL("shares", id, "action")
+}
+
+func getMetadataURL(c *gophercloud.ServiceClient, id string) string {
+ return c.ServiceURL("shares", id, "metadata")
+}
+
+func getMetadatumURL(c *gophercloud.ServiceClient, id, key string) string {
+ return c.ServiceURL("shares", id, "metadata", key)
+}
+
+func setMetadataURL(c *gophercloud.ServiceClient, id string) string {
+ return c.ServiceURL("shares", id, "metadata")
+}
+
+func updateMetadataURL(c *gophercloud.ServiceClient, id string) string {
+ return c.ServiceURL("shares", id, "metadata")
+}
+
+func deleteMetadatumURL(c *gophercloud.ServiceClient, id, key string) string {
+ return c.ServiceURL("shares", id, "metadata", key)
+}
diff --git a/vendor/github.com/gophercloud/gophercloud/openstack/sharedfilesystems/v2/snapshots/requests.go b/vendor/github.com/gophercloud/gophercloud/openstack/sharedfilesystems/v2/snapshots/requests.go
new file mode 100644
index 00000000000..1ed6e8aef2f
--- /dev/null
+++ b/vendor/github.com/gophercloud/gophercloud/openstack/sharedfilesystems/v2/snapshots/requests.go
@@ -0,0 +1,165 @@
+package snapshots
+
+import (
+ "github.com/gophercloud/gophercloud"
+ "github.com/gophercloud/gophercloud/pagination"
+)
+
+// CreateOptsBuilder allows extensions to add additional parameters to the
+// Create request.
+type CreateOptsBuilder interface {
+ ToSnapshotCreateMap() (map[string]interface{}, error)
+}
+
+// CreateOpts contains the options for create a Snapshot. This object is
+// passed to snapshots.Create(). For more information about these parameters,
+// please refer to the Snapshot object, or the shared file systems API v2
+// documentation
+type CreateOpts struct {
+ // The UUID of the share from which to create a snapshot
+ ShareID string `json:"share_id" required:"true"`
+ // Defines the snapshot name
+ Name string `json:"name,omitempty"`
+ // Defines the snapshot description
+ Description string `json:"description,omitempty"`
+ // DisplayName is equivalent to Name. The API supports using both
+ // This is an inherited attribute from the block storage API
+ DisplayName string `json:"display_name,omitempty"`
+ // DisplayDescription is equivalent to Description. The API supports using both
+ // This is an inherited attribute from the block storage API
+ DisplayDescription string `json:"display_description,omitempty"`
+}
+
+// ToSnapshotCreateMap assembles a request body based on the contents of a
+// CreateOpts.
+func (opts CreateOpts) ToSnapshotCreateMap() (map[string]interface{}, error) {
+ return gophercloud.BuildRequestBody(opts, "snapshot")
+}
+
+// Create will create a new Snapshot based on the values in CreateOpts. To extract
+// the Snapshot object from the response, call the Extract method on the
+// CreateResult.
+func Create(client *gophercloud.ServiceClient, opts CreateOptsBuilder) (r CreateResult) {
+ b, err := opts.ToSnapshotCreateMap()
+ if err != nil {
+ r.Err = err
+ return
+ }
+ resp, err := client.Post(createURL(client), b, &r.Body, &gophercloud.RequestOpts{
+ OkCodes: []int{200, 201, 202},
+ })
+ _, r.Header, r.Err = gophercloud.ParseResponse(resp, err)
+ return
+}
+
+// ListOpts holds options for listing Snapshots. It is passed to the
+// snapshots.List function.
+type ListOpts struct {
+ // (Admin only). Defines whether to list the requested resources for all projects.
+ AllTenants bool `q:"all_tenants"`
+ // The snapshot name.
+ Name string `q:"name"`
+ // Filter by a snapshot description.
+ Description string `q:"description"`
+ // Filters by a share from which the snapshot was created.
+ ShareID string `q:"share_id"`
+ // Filters by a snapshot size in GB.
+ Size int `q:"size"`
+ // Filters by a snapshot status.
+ Status string `q:"status"`
+ // The maximum number of snapshots to return.
+ Limit int `q:"limit"`
+ // The offset to define start point of snapshot or snapshot group listing.
+ Offset int `q:"offset"`
+ // The key to sort a list of snapshots.
+ SortKey string `q:"sort_key"`
+ // The direction to sort a list of snapshots.
+ SortDir string `q:"sort_dir"`
+ // The UUID of the project in which the snapshot was created. Useful with all_tenants parameter.
+ ProjectID string `q:"project_id"`
+ // The name pattern that can be used to filter snapshots, snapshot snapshots, snapshot networks or snapshot groups.
+ NamePattern string `q:"name~"`
+ // The description pattern that can be used to filter snapshots, snapshot snapshots, snapshot networks or snapshot groups.
+ DescriptionPattern string `q:"description~"`
+}
+
+// ListOptsBuilder allows extensions to add additional parameters to the List
+// request.
+type ListOptsBuilder interface {
+ ToSnapshotListQuery() (string, error)
+}
+
+// ToSnapshotListQuery formats a ListOpts into a query string.
+func (opts ListOpts) ToSnapshotListQuery() (string, error) {
+ q, err := gophercloud.BuildQueryString(opts)
+ return q.String(), err
+}
+
+// ListDetail returns []Snapshot optionally limited by the conditions provided in ListOpts.
+func ListDetail(client *gophercloud.ServiceClient, opts ListOptsBuilder) pagination.Pager {
+ url := listDetailURL(client)
+ if opts != nil {
+ query, err := opts.ToSnapshotListQuery()
+ if err != nil {
+ return pagination.Pager{Err: err}
+ }
+ url += query
+ }
+
+ return pagination.NewPager(client, url, func(r pagination.PageResult) pagination.Page {
+ p := SnapshotPage{pagination.MarkerPageBase{PageResult: r}}
+ p.MarkerPageBase.Owner = p
+ return p
+ })
+}
+
+// Delete will delete an existing Snapshot with the given UUID.
+func Delete(client *gophercloud.ServiceClient, id string) (r DeleteResult) {
+ resp, err := client.Delete(deleteURL(client, id), nil)
+ _, r.Header, r.Err = gophercloud.ParseResponse(resp, err)
+ return
+}
+
+// Get will get a single snapshot with given UUID
+func Get(client *gophercloud.ServiceClient, id string) (r GetResult) {
+ resp, err := client.Get(getURL(client, id), &r.Body, nil)
+ _, r.Header, r.Err = gophercloud.ParseResponse(resp, err)
+ return
+}
+
+// UpdateOptsBuilder allows extensions to add additional parameters to the
+// Update request.
+type UpdateOptsBuilder interface {
+ ToSnapshotUpdateMap() (map[string]interface{}, error)
+}
+
+// UpdateOpts contain options for updating an existing Snapshot. This object is passed
+// to the snapshot.Update function. For more information about the parameters, see
+// the Snapshot object.
+type UpdateOpts struct {
+ // Snapshot name. Manila snapshot update logic doesn't have a "name" alias.
+ DisplayName *string `json:"display_name,omitempty"`
+ // Snapshot description. Manila snapshot update logic doesn't have a "description" alias.
+ DisplayDescription *string `json:"display_description,omitempty"`
+}
+
+// ToSnapshotUpdateMap assembles a request body based on the contents of an
+// UpdateOpts.
+func (opts UpdateOpts) ToSnapshotUpdateMap() (map[string]interface{}, error) {
+ return gophercloud.BuildRequestBody(opts, "snapshot")
+}
+
+// Update will update the Snapshot with provided information. To extract the updated
+// Snapshot from the response, call the Extract method on the UpdateResult.
+func Update(client *gophercloud.ServiceClient, id string, opts UpdateOptsBuilder) (r UpdateResult) {
+ b, err := opts.ToSnapshotUpdateMap()
+ if err != nil {
+ r.Err = err
+ return
+ }
+ resp, err := client.Put(updateURL(client, id), b, &r.Body, &gophercloud.RequestOpts{
+ OkCodes: []int{200},
+ })
+ _, r.Header, r.Err = gophercloud.ParseResponse(resp, err)
+ return
+}
diff --git a/vendor/github.com/gophercloud/gophercloud/openstack/sharedfilesystems/v2/snapshots/results.go b/vendor/github.com/gophercloud/gophercloud/openstack/sharedfilesystems/v2/snapshots/results.go
new file mode 100644
index 00000000000..6b4bb9b95c6
--- /dev/null
+++ b/vendor/github.com/gophercloud/gophercloud/openstack/sharedfilesystems/v2/snapshots/results.go
@@ -0,0 +1,171 @@
+package snapshots
+
+import (
+ "encoding/json"
+ "net/url"
+ "strconv"
+ "time"
+
+ "github.com/gophercloud/gophercloud"
+ "github.com/gophercloud/gophercloud/pagination"
+)
+
+const (
+ invalidMarker = "-1"
+)
+
+// Snapshot contains all information associated with an OpenStack Snapshot
+type Snapshot struct {
+ // The UUID of the snapshot
+ ID string `json:"id"`
+ // The name of the snapshot
+ Name string `json:"name,omitempty"`
+ // A description of the snapshot
+ Description string `json:"description,omitempty"`
+ // UUID of the share from which the snapshot was created
+ ShareID string `json:"share_id"`
+ // The shared file system protocol
+ ShareProto string `json:"share_proto"`
+ // Size of the snapshot share in GB
+ ShareSize int `json:"share_size"`
+ // Size of the snapshot in GB
+ Size int `json:"size"`
+ // The snapshot status
+ Status string `json:"status"`
+ // The UUID of the project in which the snapshot was created
+ ProjectID string `json:"project_id"`
+ // Timestamp when the snapshot was created
+ CreatedAt time.Time `json:"-"`
+ // Snapshot links for pagination
+ Links []map[string]string `json:"links"`
+}
+
+func (r *Snapshot) UnmarshalJSON(b []byte) error {
+ type tmp Snapshot
+ var s struct {
+ tmp
+ CreatedAt gophercloud.JSONRFC3339MilliNoZ `json:"created_at"`
+ }
+ err := json.Unmarshal(b, &s)
+ if err != nil {
+ return err
+ }
+ *r = Snapshot(s.tmp)
+
+ r.CreatedAt = time.Time(s.CreatedAt)
+
+ return nil
+}
+
+type commonResult struct {
+ gophercloud.Result
+}
+
+// Extract will get the Snapshot object from the commonResult
+func (r commonResult) Extract() (*Snapshot, error) {
+ var s struct {
+ Snapshot *Snapshot `json:"snapshot"`
+ }
+ err := r.ExtractInto(&s)
+ return s.Snapshot, err
+}
+
+// CreateResult contains the response body and error from a Create request.
+type CreateResult struct {
+ commonResult
+}
+
+// SnapshotPage is a pagination.pager that is returned from a call to the List function.
+type SnapshotPage struct {
+ pagination.MarkerPageBase
+}
+
+// NextPageURL generates the URL for the page of results after this one.
+func (r SnapshotPage) NextPageURL() (string, error) {
+ currentURL := r.URL
+ mark, err := r.Owner.LastMarker()
+ if err != nil {
+ return "", err
+ }
+ if mark == invalidMarker {
+ return "", nil
+ }
+
+ q := currentURL.Query()
+ q.Set("offset", mark)
+ currentURL.RawQuery = q.Encode()
+ return currentURL.String(), nil
+}
+
+// LastMarker returns the last offset in a ListResult.
+func (r SnapshotPage) LastMarker() (string, error) {
+ snapshots, err := ExtractSnapshots(r)
+ if err != nil {
+ return invalidMarker, err
+ }
+ if len(snapshots) == 0 {
+ return invalidMarker, nil
+ }
+
+ u, err := url.Parse(r.URL.String())
+ if err != nil {
+ return invalidMarker, err
+ }
+ queryParams := u.Query()
+ offset := queryParams.Get("offset")
+ limit := queryParams.Get("limit")
+
+ // Limit is not present, only one page required
+ if limit == "" {
+ return invalidMarker, nil
+ }
+
+ iOffset := 0
+ if offset != "" {
+ iOffset, err = strconv.Atoi(offset)
+ if err != nil {
+ return invalidMarker, err
+ }
+ }
+ iLimit, err := strconv.Atoi(limit)
+ if err != nil {
+ return invalidMarker, err
+ }
+ iOffset = iOffset + iLimit
+ offset = strconv.Itoa(iOffset)
+
+ return offset, nil
+}
+
+// IsEmpty satisifies the IsEmpty method of the Page interface
+func (r SnapshotPage) IsEmpty() (bool, error) {
+ snapshots, err := ExtractSnapshots(r)
+ return len(snapshots) == 0, err
+}
+
+// ExtractSnapshots extracts and returns a Snapshot slice. It is used while
+// iterating over a snapshots.List call.
+func ExtractSnapshots(r pagination.Page) ([]Snapshot, error) {
+ var s struct {
+ Snapshots []Snapshot `json:"snapshots"`
+ }
+
+ err := (r.(SnapshotPage)).ExtractInto(&s)
+
+ return s.Snapshots, err
+}
+
+// DeleteResult contains the response body and error from a Delete request.
+type DeleteResult struct {
+ gophercloud.ErrResult
+}
+
+// GetResult contains the response body and error from a Get request.
+type GetResult struct {
+ commonResult
+}
+
+// UpdateResult contains the response body and error from an Update request.
+type UpdateResult struct {
+ commonResult
+}
diff --git a/vendor/github.com/gophercloud/gophercloud/openstack/sharedfilesystems/v2/snapshots/urls.go b/vendor/github.com/gophercloud/gophercloud/openstack/sharedfilesystems/v2/snapshots/urls.go
new file mode 100644
index 00000000000..a07e3ec8739
--- /dev/null
+++ b/vendor/github.com/gophercloud/gophercloud/openstack/sharedfilesystems/v2/snapshots/urls.go
@@ -0,0 +1,23 @@
+package snapshots
+
+import "github.com/gophercloud/gophercloud"
+
+func createURL(c *gophercloud.ServiceClient) string {
+ return c.ServiceURL("snapshots")
+}
+
+func listDetailURL(c *gophercloud.ServiceClient) string {
+ return c.ServiceURL("snapshots", "detail")
+}
+
+func deleteURL(c *gophercloud.ServiceClient, id string) string {
+ return c.ServiceURL("snapshots", id)
+}
+
+func getURL(c *gophercloud.ServiceClient, id string) string {
+ return c.ServiceURL("snapshots", id)
+}
+
+func updateURL(c *gophercloud.ServiceClient, id string) string {
+ return c.ServiceURL("snapshots", id)
+}
diff --git a/vendor/github.com/gophercloud/gophercloud/pagination/linked.go b/vendor/github.com/gophercloud/gophercloud/pagination/linked.go
index 3656fb7f8f4..a664e056738 100644
--- a/vendor/github.com/gophercloud/gophercloud/pagination/linked.go
+++ b/vendor/github.com/gophercloud/gophercloud/pagination/linked.go
@@ -40,7 +40,7 @@ func (current LinkedPageBase) NextPageURL() (string, error) {
}
for {
- key, path = path[0], path[1:len(path)]
+ key, path = path[0], path[1:]
value, ok := submap[key]
if !ok {
diff --git a/vendor/github.com/gophercloud/gophercloud/provider_client.go b/vendor/github.com/gophercloud/gophercloud/provider_client.go
index 53b3ecf27f5..f56c1375fe5 100644
--- a/vendor/github.com/gophercloud/gophercloud/provider_client.go
+++ b/vendor/github.com/gophercloud/gophercloud/provider_client.go
@@ -13,7 +13,10 @@ import (
)
// DefaultUserAgent is the default User-Agent string set in the request header.
-const DefaultUserAgent = "gophercloud/2.0.0"
+const (
+ DefaultUserAgent = "gophercloud/2.0.0"
+ DefaultMaxBackoffRetries = 60
+)
// UserAgent represents a User-Agent header.
type UserAgent struct {
@@ -22,6 +25,8 @@ type UserAgent struct {
prepend []string
}
+type RetryFunc func(context.Context, *ErrUnexpectedResponseCode, error, uint) error
+
// Prepend prepends a user-defined string to the default User-Agent string. Users
// may pass in one or more strings to prepend.
func (ua *UserAgent) Prepend(s ...string) {
@@ -80,6 +85,12 @@ type ProviderClient struct {
// Context is the context passed to the HTTP request.
Context context.Context
+ // Retry backoff func
+ RetryBackoffFunc RetryFunc
+
+ // MaxBackoffRetries set the maximum number of backoffs. When not set, defaults to DefaultMaxBackoffRetries
+ MaxBackoffRetries uint
+
// mut is a mutex for the client. It protects read and write access to client attributes such as getting
// and setting the TokenID.
mut *sync.RWMutex
@@ -323,6 +334,8 @@ type requestState struct {
// reauthenticate, but keep getting 401 responses with the fresh token, reauthenticating some more
// will just get us into an infinite loop.
hasReauthenticated bool
+ // Retry-After backoff counter, increments during each backoff call
+ retries uint
}
var applicationJSON = "application/json"
@@ -498,11 +511,29 @@ func (client *ProviderClient) doRequest(method, url string, options *RequestOpts
if error409er, ok := errType.(Err409er); ok {
err = error409er.Error409(respErr)
}
- case 429:
+ case http.StatusTooManyRequests, 498:
err = ErrDefault429{respErr}
if error429er, ok := errType.(Err429er); ok {
err = error429er.Error429(respErr)
}
+
+ maxTries := client.MaxBackoffRetries
+ if maxTries == 0 {
+ maxTries = DefaultMaxBackoffRetries
+ }
+
+ if f := client.RetryBackoffFunc; f != nil && state.retries < maxTries {
+ var e error
+
+ state.retries = state.retries + 1
+ e = f(client.Context, &respErr, err, state.retries)
+
+ if e != nil {
+ return resp, e
+ }
+
+ return client.doRequest(method, url, options, state)
+ }
case http.StatusInternalServerError:
err = ErrDefault500{respErr}
if error500er, ok := errType.(Err500er); ok {
diff --git a/vendor/github.com/gophercloud/gophercloud/util.go b/vendor/github.com/gophercloud/gophercloud/util.go
index 68f9a5d3eca..2740c301e51 100644
--- a/vendor/github.com/gophercloud/gophercloud/util.go
+++ b/vendor/github.com/gophercloud/gophercloud/util.go
@@ -4,10 +4,85 @@ import (
"fmt"
"net/url"
"path/filepath"
+ "reflect"
"strings"
"time"
)
+// NormalizePathURL is used to convert rawPath to a fqdn, using basePath as
+// a reference in the filesystem, if necessary. basePath is assumed to contain
+// either '.' when first used, or the file:// type fqdn of the parent resource.
+// e.g. myFavScript.yaml => file://opt/lib/myFavScript.yaml
+func NormalizePathURL(basePath, rawPath string) (string, error) {
+ u, err := url.Parse(rawPath)
+ if err != nil {
+ return "", err
+ }
+ // if a scheme is defined, it must be a fqdn already
+ if u.Scheme != "" {
+ return u.String(), nil
+ }
+ // if basePath is a url, then child resources are assumed to be relative to it
+ bu, err := url.Parse(basePath)
+ if err != nil {
+ return "", err
+ }
+ var basePathSys, absPathSys string
+ if bu.Scheme != "" {
+ basePathSys = filepath.FromSlash(bu.Path)
+ absPathSys = filepath.Join(basePathSys, rawPath)
+ bu.Path = filepath.ToSlash(absPathSys)
+ return bu.String(), nil
+ }
+
+ absPathSys = filepath.Join(basePath, rawPath)
+ u.Path = filepath.ToSlash(absPathSys)
+ if err != nil {
+ return "", err
+ }
+ u.Scheme = "file"
+ return u.String(), nil
+}
+
+// NormalizeURL is an internal function to be used by provider clients.
+//
+// It ensures that each endpoint URL has a closing `/`, as expected by
+// ServiceClient's methods.
+func NormalizeURL(url string) string {
+ if !strings.HasSuffix(url, "/") {
+ return url + "/"
+ }
+ return url
+}
+
+// RemainingKeys will inspect a struct and compare it to a map. Any struct
+// field that does not have a JSON tag that matches a key in the map or
+// a matching lower-case field in the map will be returned as an extra.
+//
+// This is useful for determining the extra fields returned in response bodies
+// for resources that can contain an arbitrary or dynamic number of fields.
+func RemainingKeys(s interface{}, m map[string]interface{}) (extras map[string]interface{}) {
+ extras = make(map[string]interface{})
+ for k, v := range m {
+ extras[k] = v
+ }
+
+ valueOf := reflect.ValueOf(s)
+ typeOf := reflect.TypeOf(s)
+ for i := 0; i < valueOf.NumField(); i++ {
+ field := typeOf.Field(i)
+
+ lowerField := strings.ToLower(field.Name)
+ delete(extras, lowerField)
+
+ if tagValue := field.Tag.Get("json"); tagValue != "" && tagValue != "-" {
+ delete(extras, tagValue)
+ }
+ }
+
+ return
+}
+
// WaitFor polls a predicate function, once per second, up to a timeout limit.
// This is useful to wait for a resource to transition to a certain state.
// To handle situations when the predicate might hang indefinitely, the
@@ -53,50 +128,3 @@ func WaitFor(timeout int, predicate func() (bool, error)) error {
}
}
}
-
-// NormalizeURL is an internal function to be used by provider clients.
-//
-// It ensures that each endpoint URL has a closing `/`, as expected by
-// ServiceClient's methods.
-func NormalizeURL(url string) string {
- if !strings.HasSuffix(url, "/") {
- return url + "/"
- }
- return url
-}
-
-// NormalizePathURL is used to convert rawPath to a fqdn, using basePath as
-// a reference in the filesystem, if necessary. basePath is assumed to contain
-// either '.' when first used, or the file:// type fqdn of the parent resource.
-// e.g. myFavScript.yaml => file://opt/lib/myFavScript.yaml
-func NormalizePathURL(basePath, rawPath string) (string, error) {
- u, err := url.Parse(rawPath)
- if err != nil {
- return "", err
- }
- // if a scheme is defined, it must be a fqdn already
- if u.Scheme != "" {
- return u.String(), nil
- }
- // if basePath is a url, then child resources are assumed to be relative to it
- bu, err := url.Parse(basePath)
- if err != nil {
- return "", err
- }
- var basePathSys, absPathSys string
- if bu.Scheme != "" {
- basePathSys = filepath.FromSlash(bu.Path)
- absPathSys = filepath.Join(basePathSys, rawPath)
- bu.Path = filepath.ToSlash(absPathSys)
- return bu.String(), nil
- }
-
- absPathSys = filepath.Join(basePath, rawPath)
- u.Path = filepath.ToSlash(absPathSys)
- if err != nil {
- return "", err
- }
- u.Scheme = "file"
- return u.String(), nil
-
-}
diff --git a/vendor/github.com/gophercloud/utils/openstack/clientconfig/requests.go b/vendor/github.com/gophercloud/utils/openstack/clientconfig/requests.go
index b077a15fdae..17b283b5dee 100644
--- a/vendor/github.com/gophercloud/utils/openstack/clientconfig/requests.go
+++ b/vendor/github.com/gophercloud/utils/openstack/clientconfig/requests.go
@@ -1,8 +1,10 @@
package clientconfig
import (
+ "errors"
"fmt"
"net/http"
+ "os"
"reflect"
"strings"
@@ -122,7 +124,7 @@ func LoadCloudsYAML() (map[string]Cloud, error) {
var clouds Clouds
err = yaml.Unmarshal(content, &clouds)
if err != nil {
- return nil, fmt.Errorf("failed to unmarshal yaml: %v", err)
+ return nil, fmt.Errorf("failed to unmarshal yaml: %w", err)
}
return clouds.Clouds, nil
@@ -138,7 +140,7 @@ func LoadSecureCloudsYAML() (map[string]Cloud, error) {
_, content, err := FindAndReadSecureCloudsYAML()
if err != nil {
- if err.Error() == "no secure.yaml file found" {
+ if errors.Is(err, os.ErrNotExist) {
// secure.yaml is optional so just ignore read error
return secureClouds.Clouds, nil
}
@@ -147,7 +149,7 @@ func LoadSecureCloudsYAML() (map[string]Cloud, error) {
err = yaml.Unmarshal(content, &secureClouds)
if err != nil {
- return nil, fmt.Errorf("failed to unmarshal yaml: %v", err)
+ return nil, fmt.Errorf("failed to unmarshal yaml: %w", err)
}
return secureClouds.Clouds, nil
@@ -163,7 +165,7 @@ func LoadPublicCloudsYAML() (map[string]Cloud, error) {
_, content, err := FindAndReadPublicCloudsYAML()
if err != nil {
- if err.Error() == "no clouds-public.yaml file found" {
+ if errors.Is(err, os.ErrNotExist) {
// clouds-public.yaml is optional so just ignore read error
return publicClouds.Clouds, nil
}
@@ -173,7 +175,7 @@ func LoadPublicCloudsYAML() (map[string]Cloud, error) {
err = yaml.Unmarshal(content, &publicClouds)
if err != nil {
- return nil, fmt.Errorf("failed to unmarshal yaml: %v", err)
+ return nil, fmt.Errorf("failed to unmarshal yaml: %w", err)
}
return publicClouds.Clouds, nil
@@ -189,7 +191,7 @@ func GetCloudFromYAML(opts *ClientOpts) (*Cloud, error) {
clouds, err := yamlOpts.LoadCloudsYAML()
if err != nil {
- return nil, fmt.Errorf("unable to load clouds.yaml: %s", err)
+ return nil, fmt.Errorf("unable to load clouds.yaml: %w", err)
}
// Determine which cloud to use.
@@ -236,7 +238,7 @@ func GetCloudFromYAML(opts *ClientOpts) (*Cloud, error) {
if profileName != "" {
publicClouds, err := yamlOpts.LoadPublicCloudsYAML()
if err != nil {
- return nil, fmt.Errorf("unable to load clouds-public.yaml: %s", err)
+ return nil, fmt.Errorf("unable to load clouds-public.yaml: %w", err)
}
publicCloud, ok := publicClouds[profileName]
@@ -255,7 +257,7 @@ func GetCloudFromYAML(opts *ClientOpts) (*Cloud, error) {
// can be found or merged.
secureClouds, err := yamlOpts.LoadSecureCloudsYAML()
if err != nil {
- return nil, fmt.Errorf("unable to load secure.yaml: %s", err)
+ return nil, fmt.Errorf("unable to load secure.yaml: %w", err)
}
if secureClouds != nil {
@@ -299,6 +301,16 @@ func GetCloudFromYAML(opts *ClientOpts) (*Cloud, error) {
cloud.Verify = &iTrue
}
+ // merging per-region value overrides
+ if opts.RegionName != "" {
+ for _, v := range cloud.Regions {
+ if opts.RegionName == v.Name {
+ cloud, err = mergeClouds(v.Values, cloud)
+ break
+ }
+ }
+ }
+
// TODO: this is where reading vendor files should go be considered when not found in
// clouds-public.yml
// https://github.com/openstack/openstacksdk/tree/master/openstack/config/vendors
@@ -805,11 +817,9 @@ func NewServiceClient(service string, opts *ClientOpts) (*gophercloud.ServiceCli
pClient.HTTPClient = *opts.HTTPClient
} else {
// Otherwise create a new HTTP client with the generated TLS config.
- pClient.HTTPClient = http.Client{
- Transport: &http.Transport{
- TLSClientConfig: tlsConfig,
- },
- }
+ transport := http.DefaultTransport.(*http.Transport).Clone()
+ transport.TLSClientConfig = tlsConfig
+ pClient.HTTPClient = http.Client{Transport: transport}
}
err = openstack.Authenticate(pClient, *ao)
diff --git a/vendor/github.com/gophercloud/utils/openstack/clientconfig/results.go b/vendor/github.com/gophercloud/utils/openstack/clientconfig/results.go
index 3ffae32783d..ed1c6ef6725 100644
--- a/vendor/github.com/gophercloud/utils/openstack/clientconfig/results.go
+++ b/vendor/github.com/gophercloud/utils/openstack/clientconfig/results.go
@@ -1,5 +1,7 @@
package clientconfig
+import "encoding/json"
+
// PublicClouds represents a collection of PublicCloud entries in clouds-public.yaml file.
// The format of the clouds-public.yml is documented at
// https://docs.openstack.org/python-openstackclient/latest/configuration/
@@ -16,12 +18,12 @@ type Clouds struct {
// Cloud represents an entry in a clouds.yaml/public-clouds.yaml/secure.yaml file.
type Cloud struct {
- Cloud string `yaml:"cloud,omitempty" json:"cloud,omitempty"`
- Profile string `yaml:"profile,omitempty" json:"profile,omitempty"`
- AuthInfo *AuthInfo `yaml:"auth,omitempty" json:"auth,omitempty"`
- AuthType AuthType `yaml:"auth_type,omitempty" json:"auth_type,omitempty"`
- RegionName string `yaml:"region_name,omitempty" json:"region_name,omitempty"`
- Regions []interface{} `yaml:"regions,omitempty" json:"regions,omitempty"`
+ Cloud string `yaml:"cloud,omitempty" json:"cloud,omitempty"`
+ Profile string `yaml:"profile,omitempty" json:"profile,omitempty"`
+ AuthInfo *AuthInfo `yaml:"auth,omitempty" json:"auth,omitempty"`
+ AuthType AuthType `yaml:"auth_type,omitempty" json:"auth_type,omitempty"`
+ RegionName string `yaml:"region_name,omitempty" json:"region_name,omitempty"`
+ Regions []Region `yaml:"regions,omitempty" json:"regions,omitempty"`
// EndpointType and Interface both specify whether to use the public, internal,
// or admin interface of a service. They should be considered synonymous, but
@@ -125,3 +127,51 @@ type AuthInfo struct {
// been specified and a domain is required for scope.
DefaultDomain string `yaml:"default_domain,omitempty" json:"default_domain,omitempty"`
}
+
+// Region represents a region included as part of cloud in clouds.yaml
+// According to Python-based openstacksdk, this can be either a struct (as defined)
+// or a plain string. Custom unmarshallers handle both cases.
+type Region struct {
+ Name string `yaml:"name,omitempty" json:"name,omitempty"`
+ Values Cloud `yaml:"values,omitempty" json:"values,omitempty"`
+}
+
+// UnmarshalJSON handles either a plain string acting as the Name property or
+// a struct, mimicking the Python-based openstacksdk.
+func (r *Region) UnmarshalJSON(data []byte) error {
+ var name string
+ if err := json.Unmarshal(data, &name); err == nil {
+ r.Name = name
+ return nil
+ }
+
+ type region Region
+ var tmp region
+ if err := json.Unmarshal(data, &tmp); err != nil {
+ return err
+ }
+ r.Name = tmp.Name
+ r.Values = tmp.Values
+
+ return nil
+}
+
+// UnmarshalYAML handles either a plain string acting as the Name property or
+// a struct, mimicking the Python-based openstacksdk.
+func (r *Region) UnmarshalYAML(unmarshal func(interface{}) error) error {
+ var name string
+ if err := unmarshal(&name); err == nil {
+ r.Name = name
+ return nil
+ }
+
+ type region Region
+ var tmp region
+ if err := unmarshal(&tmp); err != nil {
+ return err
+ }
+ r.Name = tmp.Name
+ r.Values = tmp.Values
+
+ return nil
+}
diff --git a/vendor/github.com/gophercloud/utils/openstack/clientconfig/utils.go b/vendor/github.com/gophercloud/utils/openstack/clientconfig/utils.go
index bc2adf4fc1f..3082073ab0e 100644
--- a/vendor/github.com/gophercloud/utils/openstack/clientconfig/utils.go
+++ b/vendor/github.com/gophercloud/utils/openstack/clientconfig/utils.go
@@ -46,7 +46,10 @@ func mergeClouds(override, cloud interface{}) (*Cloud, error) {
var mergedCloud Cloud
mergedInterface := mergeInterfaces(overrideInterface, cloudInterface)
mergedJson, err := json.Marshal(mergedInterface)
- json.Unmarshal(mergedJson, &mergedCloud)
+ err = json.Unmarshal(mergedJson, &mergedCloud)
+ if err != nil {
+ return nil, err
+ }
return &mergedCloud, nil
}
@@ -108,22 +111,34 @@ func FindAndReadCloudsYAML() (string, []byte, error) {
}
}
- return FindAndReadYAML("clouds.yaml")
+ s, b, err := FindAndReadYAML("clouds.yaml")
+ if s == "" {
+ return FindAndReadYAML("clouds.yml")
+ }
+ return s, b, err
}
func FindAndReadPublicCloudsYAML() (string, []byte, error) {
- return FindAndReadYAML("clouds-public.yaml")
+ s, b, err := FindAndReadYAML("clouds-public.yaml")
+ if s == "" {
+ return FindAndReadYAML("clouds-public.yml")
+ }
+ return s, b, err
}
func FindAndReadSecureCloudsYAML() (string, []byte, error) {
- return FindAndReadYAML("secure.yaml")
+ s, b, err := FindAndReadYAML("secure.yaml")
+ if s == "" {
+ return FindAndReadYAML("secure.yml")
+ }
+ return s, b, err
}
func FindAndReadYAML(yamlFile string) (string, []byte, error) {
// current directory
cwd, err := os.Getwd()
if err != nil {
- return "", nil, fmt.Errorf("unable to determine working directory: %s", err)
+ return "", nil, fmt.Errorf("unable to determine working directory: %w", err)
}
filename := filepath.Join(cwd, yamlFile)
@@ -151,7 +166,7 @@ func FindAndReadYAML(yamlFile string) (string, []byte, error) {
return filename, content, err
}
- return "", nil, fmt.Errorf("no " + yamlFile + " file found")
+ return "", nil, fmt.Errorf("no %s file found: %w", yamlFile, os.ErrNotExist)
}
// fileExists checks for the existence of a file at a given location.
diff --git a/vendor/github.com/mbilski/exhaustivestruct/LICENSE b/vendor/github.com/mbilski/exhaustivestruct/LICENSE
new file mode 100644
index 00000000000..893eb73b9fc
--- /dev/null
+++ b/vendor/github.com/mbilski/exhaustivestruct/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2020 Mateusz Bilski
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+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.
diff --git a/vendor/github.com/mbilski/exhaustivestruct/pkg/analyzer/analyzer.go b/vendor/github.com/mbilski/exhaustivestruct/pkg/analyzer/analyzer.go
new file mode 100644
index 00000000000..2cb4880c543
--- /dev/null
+++ b/vendor/github.com/mbilski/exhaustivestruct/pkg/analyzer/analyzer.go
@@ -0,0 +1,89 @@
+package analyzer
+
+import (
+ "go/ast"
+ "go/types"
+
+ "golang.org/x/tools/go/analysis/passes/inspect"
+ "golang.org/x/tools/go/ast/inspector"
+
+ "golang.org/x/tools/go/analysis"
+)
+
+// Analyzer that checks if all struct's fields are initialized
+var Analyzer = &analysis.Analyzer{
+ Name: "exhaustivestruct",
+ Doc: "Checks if all struct's fields are initialized",
+ Run: run,
+ Requires: []*analysis.Analyzer{inspect.Analyzer},
+}
+
+func run(pass *analysis.Pass) (interface{}, error) {
+ inspector := pass.ResultOf[inspect.Analyzer].(*inspector.Inspector)
+
+ nodeFilter := []ast.Node{
+ (*ast.CompositeLit)(nil),
+ }
+
+ inspector.Preorder(nodeFilter, func(node ast.Node) {
+ var name string
+
+ compositeLit := node.(*ast.CompositeLit)
+
+ i, ok := compositeLit.Type.(*ast.Ident)
+
+ if ok {
+ name = i.Name
+ } else {
+ s, ok := compositeLit.Type.(*ast.SelectorExpr)
+
+ if !ok {
+ return
+ }
+
+ name = s.Sel.Name
+ }
+
+ if compositeLit.Type == nil {
+ return
+ }
+
+ t := pass.TypesInfo.TypeOf(compositeLit.Type)
+
+ if t == nil {
+ return
+ }
+
+ str, ok := t.Underlying().(*types.Struct)
+
+ if !ok {
+ return
+ }
+
+ if len(compositeLit.Elts) == 0 {
+ return
+ }
+
+ for i := 0; i < str.NumFields(); i++ {
+ fieldName := str.Field(i).Name()
+ exists := false
+
+ for _, e := range compositeLit.Elts {
+ if k, ok := e.(*ast.KeyValueExpr); ok {
+ if i, ok := k.Key.(*ast.Ident); ok {
+ if i.Name == fieldName {
+ exists = true
+ break
+ }
+ }
+ }
+ }
+
+ if !exists {
+ pass.Reportf(node.Pos(), "%s is missing in %s", fieldName, name)
+ }
+ }
+ })
+
+ return nil, nil
+}
diff --git a/vendor/github.com/openshift/cluster-api/LICENSE b/vendor/github.com/metal3-io/baremetal-operator/apis/LICENSE
similarity index 100%
rename from vendor/github.com/openshift/cluster-api/LICENSE
rename to vendor/github.com/metal3-io/baremetal-operator/apis/LICENSE
diff --git a/vendor/github.com/metal3-io/baremetal-operator/pkg/apis/metal3/v1alpha1/baremetalhost_types.go b/vendor/github.com/metal3-io/baremetal-operator/apis/metal3.io/v1alpha1/baremetalhost_types.go
similarity index 66%
rename from vendor/github.com/metal3-io/baremetal-operator/pkg/apis/metal3/v1alpha1/baremetalhost_types.go
rename to vendor/github.com/metal3-io/baremetal-operator/apis/metal3.io/v1alpha1/baremetalhost_types.go
index cc9e2bcac17..0e079cf49ef 100644
--- a/vendor/github.com/metal3-io/baremetal-operator/pkg/apis/metal3/v1alpha1/baremetalhost_types.go
+++ b/vendor/github.com/metal3-io/baremetal-operator/apis/metal3.io/v1alpha1/baremetalhost_types.go
@@ -1,3 +1,19 @@
+/*
+
+
+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 v1alpha1
import (
@@ -23,6 +39,10 @@ const (
// an immediate requeue)
PausedAnnotation = "baremetalhost.metal3.io/paused"
+ // DetachedAnnotation is the annotation which stops provisioner management of the host
+ // unlike in the paused case, the host status may be updated
+ DetachedAnnotation = "baremetalhost.metal3.io/detached"
+
// StatusAnnotation is the annotation that keeps a copy of the Status of BMH
// This is particularly useful when we pivot BMH. If the status
// annotation is present and status is empty, BMO will reconstruct BMH Status
@@ -74,13 +94,15 @@ type RootDeviceHints struct {
}
// BootMode is the boot mode of the system
-// +kubebuilder:validation:Enum=UEFI;legacy
+// +kubebuilder:validation:Enum=UEFI;UEFISecureBoot;legacy
type BootMode string
// Allowed boot mode from metal3
const (
- UEFI BootMode = "UEFI"
- Legacy BootMode = "legacy"
+ UEFI BootMode = "UEFI"
+ UEFISecureBoot BootMode = "UEFISecureBoot"
+ Legacy BootMode = "legacy"
+ DefaultBootMode BootMode = UEFI
)
// OperationalStatus represents the state of the host
@@ -99,6 +121,14 @@ const (
// OperationalStatusError is the status value for when the host
// has any sort of error.
OperationalStatusError OperationalStatus = "error"
+
+ // OperationalStatusDelayed is the status value for when the host
+ // deployment needs to be delayed to limit simultaneous hosts provisioning
+ OperationalStatusDelayed = "delayed"
+
+ // OperationalStatusDetached is the status value when the host is
+ // marked unmanaged via the detached annotation
+ OperationalStatusDetached OperationalStatus = "detached"
)
// ErrorType indicates the class of problem that has caused the Host resource
@@ -106,6 +136,9 @@ const (
type ErrorType string
const (
+ // ProvisionedRegistrationError is an error condition occurring when the controller
+ // is unable to re-register an already provisioned host.
+ ProvisionedRegistrationError ErrorType = "provisioned registration error"
// RegistrationError is an error condition occurring when the
// controller is unable to connect to the Host's baseboard management
// controller.
@@ -113,12 +146,18 @@ const (
// InspectionError is an error condition occurring when an attempt to
// obtain hardware details from the Host fails.
InspectionError ErrorType = "inspection error"
- // ProvisioningError is an error condition occuring when the controller
+ // PreparationError is an error condition occurring when do
+ // cleaning steps failed.
+ PreparationError ErrorType = "preparation error"
+ // ProvisioningError is an error condition occurring when the controller
// fails to provision or deprovision the Host.
ProvisioningError ErrorType = "provisioning error"
// PowerManagementError is an error condition occurring when the
// controller is unable to modify the power state of the Host.
PowerManagementError ErrorType = "power management error"
+ // DetachError is an error condition occurring when the
+ // controller is unable to detatch the host from the provisioner
+ DetachError ErrorType = "detach error"
)
// ProvisioningState defines the states the provisioner will report
@@ -133,10 +172,6 @@ const (
// register the host
StateUnmanaged ProvisioningState = "unmanaged"
- // StateRegistrationError means there was an error registering the
- // host with the backend
- StateRegistrationError ProvisioningState = "registration error"
-
// StateRegistering means we are telling the backend about the host
StateRegistering ProvisioningState = "registering"
@@ -144,6 +179,9 @@ const (
// against known hardware profiles
StateMatchProfile ProvisioningState = "match profile"
+ // StatePreparing means we are removing existing configuration and set new configuration to the host
+ StatePreparing ProvisioningState = "preparing"
+
// StateReady means the host can be consumed
StateReady ProvisioningState = "ready"
@@ -154,10 +192,6 @@ const (
// disk(s)
StateProvisioning ProvisioningState = "provisioning"
- // StateProvisioningError means we are writing an image to the
- // host's disk(s)
- StateProvisioningError ProvisioningState = "provisioning error"
-
// StateProvisioned means we have written an image to the host's
// disk(s)
StateProvisioned ProvisioningState = "provisioned"
@@ -174,10 +208,6 @@ const (
// learn about the hardware components available there
StateInspecting ProvisioningState = "inspecting"
- // StatePowerManagementError means something went wrong trying to
- // power the server on or off.
- StatePowerManagementError ProvisioningState = "power management error"
-
// StateDeleting means we are in the process of cleaning up the host
// ready for deletion
StateDeleting ProvisioningState = "deleting"
@@ -203,9 +233,83 @@ type BMCDetails struct {
DisableCertificateVerification bool `json:"disableCertificateVerification,omitempty"`
}
+// HardwareRAIDVolume defines the desired configuration of volume in hardware RAID
+type HardwareRAIDVolume struct {
+ // Size (Integer) of the logical disk to be created in GiB.
+ // If unspecified or set be 0, the maximum capacity of disk will be used for logical disk.
+ // +kubebuilder:validation:Minimum=0
+ SizeGibibytes *int `json:"sizeGibibytes,omitempty"`
+
+ // RAID level for the logical disk. The following levels are supported: 0;1;2;5;6;1+0;5+0;6+0.
+ // +kubebuilder:validation:Enum="0";"1";"2";"5";"6";"1+0";"5+0";"6+0"
+ Level string `json:"level" required:"true"`
+
+ // Name of the volume. Should be unique within the Node. If not specified, volume name will be auto-generated.
+ // +kubebuilder:validation:MaxLength=64
+ Name string `json:"name,omitempty"`
+
+ // Select disks with only rotational or solid-state storage
+ Rotational *bool `json:"rotational,omitempty"`
+
+ // Integer, number of physical disks to use for the logical disk. Defaults to minimum number of disks required
+ // for the particular RAID level.
+ // +kubebuilder:validation:Minimum=1
+ NumberOfPhysicalDisks *int `json:"numberOfPhysicalDisks,omitempty"`
+}
+
+// SoftwareRAIDVolume defines the desired configuration of volume in software RAID
+type SoftwareRAIDVolume struct {
+ // Size (Integer) of the logical disk to be created in GiB.
+ // If unspecified or set be 0, the maximum capacity of disk will be used for logical disk.
+ // +kubebuilder:validation:Minimum=0
+ SizeGibibytes *int `json:"sizeGibibytes,omitempty"`
+
+ // RAID level for the logical disk. The following levels are supported: 0;1;1+0.
+ // +kubebuilder:validation:Enum="0";"1";"1+0"
+ Level string `json:"level" required:"true"`
+
+ // A list of device hints, the number of items should be greater than or equal to 2.
+ // +kubebuilder:validation:MinItems=2
+ PhysicalDisks []RootDeviceHints `json:"physicalDisks,omitempty"`
+}
+
+// RAIDConfig contains the configuration that are required to config RAID in Bare Metal server
+type RAIDConfig struct {
+ // The list of logical disks for hardware RAID, if rootDeviceHints isn't used, first volume is root volume.
+ HardwareRAIDVolumes []HardwareRAIDVolume `json:"hardwareRAIDVolumes,omitempty"`
+
+ // The list of logical disks for software RAID, if rootDeviceHints isn't used, first volume is root volume.
+ // If HardwareRAIDVolumes is set this item will be invalid.
+ // The number of created Software RAID devices must be 1 or 2.
+ // If there is only one Software RAID device, it has to be a RAID-1.
+ // If there are two, the first one has to be a RAID-1, while the RAID level for the second one can be 0, 1, or 1+0.
+ // As the first RAID device will be the deployment device,
+ // enforcing a RAID-1 reduces the risk of ending up with a non-booting node in case of a disk failure.
+ // +kubebuilder:validation:MaxItems=2
+ SoftwareRAIDVolumes []SoftwareRAIDVolume `json:"softwareRAIDVolumes,omitempty"`
+}
+
+// FirmwareConfig contains the configuration that you want to configure BIOS settings in Bare metal server
+type FirmwareConfig struct {
+ // Supports the virtualization of platform hardware.
+ // This supports following options: true, false.
+ // +kubebuilder:validation:Enum=true;false
+ VirtualizationEnabled *bool `json:"virtualizationEnabled,omitempty"`
+
+ // Allows a single physical processor core to appear as several logical processors.
+ // This supports following options: true, false.
+ // +kubebuilder:validation:Enum=true;false
+ SimultaneousMultithreadingEnabled *bool `json:"simultaneousMultithreadingEnabled,omitempty"`
+
+ // SR-IOV support enables a hypervisor to create virtual instances of a PCI-express device, potentially increasing performance.
+ // This supports following options: true, false.
+ // +kubebuilder:validation:Enum=true;false
+ SriovEnabled *bool `json:"sriovEnabled,omitempty"`
+}
+
// BareMetalHostSpec defines the desired state of BareMetalHost
type BareMetalHostSpec struct {
- // Important: Run "operator-sdk generate k8s" to regenerate code
+ // Important: Run "make generate manifests" to regenerate code
// after modifying this file
// Taints is the full, authoritative list of taints to apply to
@@ -217,6 +321,12 @@ type BareMetalHostSpec struct {
// How do we connect to the BMC?
BMC BMCDetails `json:"bmc,omitempty"`
+ // RAID configuration for bare metal server
+ RAID *RAIDConfig `json:"raid,omitempty"`
+
+ // BIOS configuration for bare metal server
+ Firmware *FirmwareConfig `json:"firmware,omitempty"`
+
// What is the name of the hardware profile for this host? It
// should only be necessary to set this when inspection cannot
// automatically determine the profile.
@@ -226,8 +336,8 @@ type BareMetalHostSpec struct {
// being provisioned.
RootDeviceHints *RootDeviceHints `json:"rootDeviceHints,omitempty"`
- // Select the method of initializing the hardware during boot to
- // override the value based on the BMC driver.
+ // Select the method of initializing the hardware during
+ // boot. Defaults to UEFI.
// +optional
BootMode BootMode `json:"bootMode,omitempty"`
@@ -268,8 +378,25 @@ type BareMetalHostSpec struct {
// the power status and hardware inventory inspection. If the
// Image field is filled in, this field is ignored.
ExternallyProvisioned bool `json:"externallyProvisioned,omitempty"`
+
+ // When set to disabled, automated cleaning will be avoided
+ // during provisioning and deprovisioning.
+ // +optional
+ // +kubebuilder:default:=metadata
+ // +kubebuilder:validation:Optional
+ AutomatedCleaningMode AutomatedCleaningMode `json:"automatedCleaningMode,omitempty"`
}
+// AutomatedCleaningMode is the interface to enable/disable automated cleaning
+// +kubebuilder:validation:Enum:=metadata;disabled
+type AutomatedCleaningMode string
+
+// Allowed automated cleaning modes
+const (
+ CleaningModeDisabled AutomatedCleaningMode = "disabled"
+ CleaningModeMetadata AutomatedCleaningMode = "metadata"
+)
+
// ChecksumType holds the algorithm name for the checksum
// +kubebuilder:validation:Enum=md5;sha256;sha512
type ChecksumType string
@@ -292,15 +419,18 @@ type Image struct {
URL string `json:"url"`
// Checksum is the checksum for the image.
- Checksum string `json:"checksum"`
+ Checksum string `json:"checksum,omitempty"`
// ChecksumType is the checksum algorithm for the image.
// e.g md5, sha256, sha512
ChecksumType ChecksumType `json:"checksumType,omitempty"`
- // DiskFormat contains the format of the image (raw, qcow2, ...)
- // Needs to be set to raw for raw images streaming
- // +kubebuilder:validation:Enum=raw;qcow2;vdi;vmdk
+ // DiskFormat contains the format of the image (raw, qcow2, ...).
+ // Needs to be set to raw for raw images streaming.
+ // Note live-iso means an iso referenced by the url will be live-booted
+ // and not deployed to disk, and in this case the checksum options
+ // are not required and if specified will be ignored.
+ // +kubebuilder:validation:Enum=raw;qcow2;vdi;vmdk;live-iso
DiskFormat *string `json:"format,omitempty"`
}
@@ -308,6 +438,7 @@ type Image struct {
// data structures.
// ClockSpeed is a clock speed in MHz
+// +kubebuilder:validation:Format=double
type ClockSpeed float64
// ClockSpeed multipliers
@@ -332,25 +463,44 @@ const (
TeraByte = GigaByte * 1000
)
+// DiskType is a disk type, i.e. HDD, SSD, NVME.
+type DiskType string
+
+// DiskType constants.
+const (
+ HDD DiskType = "HDD"
+ SSD DiskType = "SSD"
+ NVME DiskType = "NVME"
+)
+
// CPU describes one processor on the host.
type CPU struct {
- Arch string `json:"arch"`
- Model string `json:"model"`
- ClockMegahertz ClockSpeed `json:"clockMegahertz"`
- Flags []string `json:"flags"`
- Count int `json:"count"`
+ Arch string `json:"arch,omitempty"`
+ Model string `json:"model,omitempty"`
+ ClockMegahertz ClockSpeed `json:"clockMegahertz,omitempty"`
+ Flags []string `json:"flags,omitempty"`
+ Count int `json:"count,omitempty"`
}
// Storage describes one storage device (disk, SSD, etc.) on the host.
type Storage struct {
- // A name for the disk, e.g. "disk 1 (boot)"
- Name string `json:"name"`
+ // The Linux device name of the disk, e.g. "/dev/sda". Note that this
+ // may not be stable across reboots.
+ Name string `json:"name,omitempty"`
+
+ // Whether this disk represents rotational storage.
+ // This field is not recommended for usage, please
+ // prefer using 'Type' field instead, this field
+ // will be deprecated eventually.
+ Rotational bool `json:"rotational,omitempty"`
- // Whether this disk represents rotational storage
- Rotational bool `json:"rotational"`
+ // Device type, one of: HDD, SSD, NVME.
+ // +kubebuilder:validation:Optional
+ // +kubebuilder:validation:Enum=HDD;SSD;NVME;
+ Type DiskType `json:"type,omitempty"`
// The size of the disk in Bytes
- SizeBytes Capacity `json:"sizeBytes"`
+ SizeBytes Capacity `json:"sizeBytes,omitempty"`
// The name of the vendor of the device
Vendor string `json:"vendor,omitempty"`
@@ -359,7 +509,7 @@ type Storage struct {
Model string `json:"model,omitempty"`
// The serial number of the device
- SerialNumber string `json:"serialNumber"`
+ SerialNumber string `json:"serialNumber,omitempty"`
// The WWN of the device
WWN string `json:"wwn,omitempty"`
@@ -382,74 +532,76 @@ type VLANID int32
// VLAN represents the name and ID of a VLAN
type VLAN struct {
- ID VLANID `json:"id"`
+ ID VLANID `json:"id,omitempty"`
Name string `json:"name,omitempty"`
}
// NIC describes one network interface on the host.
type NIC struct {
- // The name of the NIC, e.g. "nic-1"
- Name string `json:"name"`
+ // The name of the network interface, e.g. "en0"
+ Name string `json:"name,omitempty"`
- // The name of the model, e.g. "virt-io"
- Model string `json:"model"`
+ // The vendor and product IDs of the NIC, e.g. "0x8086 0x1572"
+ Model string `json:"model,omitempty"`
- // The device MAC addr
+ // The device MAC address
// +kubebuilder:validation:Pattern=`[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}`
- MAC string `json:"mac"`
+ MAC string `json:"mac,omitempty"`
- // The IP address of the device
- IP string `json:"ip"`
+ // The IP address of the interface. This will be an IPv4 or IPv6 address
+ // if one is present. If both IPv4 and IPv6 addresses are present in a
+ // dual-stack environment, two nics will be output, one with each IP.
+ IP string `json:"ip,omitempty"`
- // The speed of the device
- SpeedGbps int `json:"speedGbps"`
+ // The speed of the device in Gigabits per second
+ SpeedGbps int `json:"speedGbps,omitempty"`
// The VLANs available
VLANs []VLAN `json:"vlans,omitempty"`
// The untagged VLAN ID
- VLANID VLANID `json:"vlanId"`
+ VLANID VLANID `json:"vlanId,omitempty"`
// Whether the NIC is PXE Bootable
- PXE bool `json:"pxe"`
+ PXE bool `json:"pxe,omitempty"`
}
// Firmware describes the firmware on the host.
type Firmware struct {
// The BIOS for this firmware
- BIOS BIOS `json:"bios"`
+ BIOS BIOS `json:"bios,omitempty"`
}
// BIOS describes the BIOS version on the host.
type BIOS struct {
// The release/build date for this BIOS
- Date string `json:"date"`
+ Date string `json:"date,omitempty"`
// The vendor name for this BIOS
- Vendor string `json:"vendor"`
+ Vendor string `json:"vendor,omitempty"`
// The version of the BIOS
- Version string `json:"version"`
+ Version string `json:"version,omitempty"`
}
// HardwareDetails collects all of the information about hardware
// discovered on the host.
type HardwareDetails struct {
- SystemVendor HardwareSystemVendor `json:"systemVendor"`
- Firmware Firmware `json:"firmware"`
- RAMMebibytes int `json:"ramMebibytes"`
- NIC []NIC `json:"nics"`
- Storage []Storage `json:"storage"`
- CPU CPU `json:"cpu"`
- Hostname string `json:"hostname"`
+ SystemVendor HardwareSystemVendor `json:"systemVendor,omitempty"`
+ Firmware Firmware `json:"firmware,omitempty"`
+ RAMMebibytes int `json:"ramMebibytes,omitempty"`
+ NIC []NIC `json:"nics,omitempty"`
+ Storage []Storage `json:"storage,omitempty"`
+ CPU CPU `json:"cpu,omitempty"`
+ Hostname string `json:"hostname,omitempty"`
}
// HardwareSystemVendor stores details about the whole hardware system.
type HardwareSystemVendor struct {
- Manufacturer string `json:"manufacturer"`
- ProductName string `json:"productName"`
- SerialNumber string `json:"serialNumber"`
+ Manufacturer string `json:"manufacturer,omitempty"`
+ ProductName string `json:"productName,omitempty"`
+ SerialNumber string `json:"serialNumber,omitempty"`
}
// CredentialsStatus contains the reference and version of the last
@@ -459,6 +611,21 @@ type CredentialsStatus struct {
Version string `json:"credentialsVersion,omitempty"`
}
+// RebootMode defines known variations of reboot modes
+type RebootMode string
+
+const (
+ // RebootModeHard defined for hard reset of a node
+ RebootModeHard RebootMode = "hard"
+ // RebootModeSoft defined for soft reset of a node
+ RebootModeSoft RebootMode = "soft"
+)
+
+// RebootAnnotationArguments defines the arguments of the RebootAnnotation type
+type RebootAnnotationArguments struct {
+ Mode RebootMode `json:"mode"`
+}
+
// Match compares the saved status information with the name and
// content of a secret object.
func (cs CredentialsStatus) Match(secret corev1.Secret) bool {
@@ -504,16 +671,16 @@ type OperationHistory struct {
// BareMetalHostStatus defines the observed state of BareMetalHost
type BareMetalHostStatus struct {
- // Important: Run "operator-sdk generate k8s" to regenerate code
+ // Important: Run "make generate manifests" to regenerate code
// after modifying this file
// OperationalStatus holds the status of the host
- // +kubebuilder:validation:Enum="";OK;discovered;error
+ // +kubebuilder:validation:Enum="";OK;discovered;error;delayed;detached
OperationalStatus OperationalStatus `json:"operationalStatus"`
// ErrorType indicates the type of failure encountered when the
// OperationalStatus is OperationalStatusError
- // +kubebuilder:validation:Enum=registration error;inspection error;provisioning error;power management error
+ // +kubebuilder:validation:Enum=provisioned registration error;registration error;inspection error;preparation error;provisioning error;power management error
ErrorType ErrorType `json:"errorType,omitempty"`
// LastUpdated identifies when this status was last observed.
@@ -543,7 +710,11 @@ type BareMetalHostStatus struct {
// OperationHistory holds information about operations performed
// on this host.
- OperationHistory OperationHistory `json:"operationHistory"`
+ OperationHistory OperationHistory `json:"operationHistory,omitempty"`
+
+ // ErrorCount records how many times the host has encoutered an error since the last successful operation
+ // +kubebuilder:default:=0
+ ErrorCount int `json:"errorCount"`
}
// ProvisionStatus holds the state information for a single target.
@@ -563,6 +734,12 @@ type ProvisionStatus struct {
// BootMode indicates the boot mode used to provision the node
BootMode BootMode `json:"bootMode,omitempty"`
+
+ // The Raid set by the user
+ RAID *RAIDConfig `json:"raid,omitempty"`
+
+ // The Bios set by the user
+ Firmware *FirmwareConfig `json:"firmware,omitempty"`
}
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
@@ -571,13 +748,14 @@ type ProvisionStatus struct {
// +k8s:openapi-gen=true
// +kubebuilder:resource:shortName=bmh;bmhost
// +kubebuilder:subresource:status
-// +kubebuilder:printcolumn:name="Status",type="string",JSONPath=".status.operationalStatus",description="Operational status"
-// +kubebuilder:printcolumn:name="Provisioning Status",type="string",JSONPath=".status.provisioning.state",description="Provisioning status"
+// +kubebuilder:printcolumn:name="Status",type="string",JSONPath=".status.operationalStatus",description="Operational status",priority=1
+// +kubebuilder:printcolumn:name="State",type="string",JSONPath=".status.provisioning.state",description="Provisioning status"
// +kubebuilder:printcolumn:name="Consumer",type="string",JSONPath=".spec.consumerRef.name",description="Consumer using this host"
-// +kubebuilder:printcolumn:name="BMC",type="string",JSONPath=".spec.bmc.address",description="Address of management controller"
-// +kubebuilder:printcolumn:name="Hardware Profile",type="string",JSONPath=".status.hardwareProfile",description="The type of hardware detected"
+// +kubebuilder:printcolumn:name="BMC",type="string",JSONPath=".spec.bmc.address",description="Address of management controller",priority=1
+// +kubebuilder:printcolumn:name="Hardware_Profile",type="string",JSONPath=".status.hardwareProfile",description="The type of hardware detected",priority=1
// +kubebuilder:printcolumn:name="Online",type="string",JSONPath=".spec.online",description="Whether the host is online or not"
-// +kubebuilder:printcolumn:name="Error",type="string",JSONPath=".status.errorMessage",description="Most recent error"
+// +kubebuilder:printcolumn:name="Error",type="string",JSONPath=".status.errorType",description="Type of the most recent error"
+// +kubebuilder:object:root=true
type BareMetalHost struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
@@ -586,52 +764,13 @@ type BareMetalHost struct {
Status BareMetalHostStatus `json:"status,omitempty"`
}
-// Available returns true if the host is available to be provisioned.
-func (host *BareMetalHost) Available() bool {
- if host.Spec.ConsumerRef != nil {
- return false
- }
- if host.GetDeletionTimestamp() != nil {
- return false
+// BootMode returns the boot method to use for the host.
+func (host *BareMetalHost) BootMode() BootMode {
+ mode := host.Spec.BootMode
+ if mode == "" {
+ return DefaultBootMode
}
- if host.HasError() {
- return false
- }
- return true
-}
-
-// SetErrorMessage updates the ErrorMessage in the host Status struct
-// when necessary and returns true when a change is made or false when
-// no change is made.
-func (host *BareMetalHost) SetErrorMessage(errType ErrorType, message string) (dirty bool) {
- if host.Status.OperationalStatus != OperationalStatusError {
- host.Status.OperationalStatus = OperationalStatusError
- dirty = true
- }
- if host.Status.ErrorType != errType {
- host.Status.ErrorType = errType
- dirty = true
- }
- if host.Status.ErrorMessage != message {
- host.Status.ErrorMessage = message
- dirty = true
- }
- return dirty
-}
-
-// ClearError removes any existing error message.
-func (host *BareMetalHost) ClearError() (dirty bool) {
- dirty = host.SetOperationalStatus(OperationalStatusOK)
- var emptyErrType ErrorType = ""
- if host.Status.ErrorType != emptyErrType {
- host.Status.ErrorType = emptyErrType
- dirty = true
- }
- if host.Status.ErrorMessage != "" {
- host.Status.ErrorMessage = ""
- dirty = true
- }
- return dirty
+ return mode
}
// setLabel updates the given label when necessary and returns true
@@ -697,12 +836,6 @@ func (host *BareMetalHost) OperationalStatus() OperationalStatus {
return host.Status.OperationalStatus
}
-// HasError returns a boolean indicating whether there is an error
-// set for the host.
-func (host *BareMetalHost) HasError() bool {
- return host.Status.ErrorMessage != ""
-}
-
// CredentialsKey returns a NamespacedName suitable for loading the
// Secret containing the credentials associated with the host.
func (host *BareMetalHost) CredentialsKey() types.NamespacedName {
@@ -764,24 +897,6 @@ func (host *BareMetalHost) WasProvisioned() bool {
return false
}
-// NeedsDeprovisioning compares the settings with the provisioning
-// status and returns true when the host should be deprovisioned.
-func (host *BareMetalHost) NeedsDeprovisioning() bool {
- if host.Spec.Image == nil {
- return true
- }
- if host.Spec.Image.URL == "" {
- return true
- }
- if host.Status.Provisioning.Image.URL == "" {
- return false
- }
- if host.Spec.Image.URL != host.Status.Provisioning.Image.URL {
- return true
- }
- return false
-}
-
// UpdateGoodCredentials modifies the GoodCredentials portion of the
// Status struct to record the details of the secret containing
// credentials known to work.
@@ -818,7 +933,7 @@ func (host *BareMetalHost) NewEvent(reason, message string) corev1.Event {
Namespace: host.Namespace,
Name: host.Name,
UID: host.UID,
- APIVersion: SchemeGroupVersion.String(),
+ APIVersion: GroupVersion.String(),
},
Reason: reason,
Message: message,
@@ -851,32 +966,38 @@ func (host *BareMetalHost) OperationMetricForState(operation ProvisioningState)
return
}
-// GetImageChecksum returns the hash value and its algo.
-func (host *BareMetalHost) GetImageChecksum() (string, string, bool) {
- if host.Spec.Image == nil {
- return "", "", false
+// GetChecksum method returns the checksum of an image
+func (image *Image) GetChecksum() (checksum, checksumType string, ok bool) {
+ if image == nil {
+ return
}
- checksum := host.Spec.Image.Checksum
- checksumType := host.Spec.Image.ChecksumType
+ if image.DiskFormat != nil && *image.DiskFormat == "live-iso" {
+ // Checksum is not required for live-iso
+ ok = true
+ return
+ }
- if checksum == "" {
+ if image.Checksum == "" {
// Return empty if checksum is not provided
- return "", "", false
- }
- if checksumType == "" {
- // If only checksum is specified. Assume type is md5
- return checksum, string(MD5), true
+ return
}
- switch checksumType {
+
+ switch image.ChecksumType {
+ case "":
+ checksumType = string(MD5)
case MD5, SHA256, SHA512:
- return checksum, string(checksumType), true
+ checksumType = string(image.ChecksumType)
default:
- return "", "", false
+ return
}
+
+ checksum = image.Checksum
+ ok = true
+ return
}
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
+// +kubebuilder:object:root=true
// BareMetalHostList contains a list of BareMetalHost
type BareMetalHostList struct {
diff --git a/vendor/github.com/metal3-io/baremetal-operator/apis/metal3.io/v1alpha1/groupversion_info.go b/vendor/github.com/metal3-io/baremetal-operator/apis/metal3.io/v1alpha1/groupversion_info.go
new file mode 100644
index 00000000000..700bd31345c
--- /dev/null
+++ b/vendor/github.com/metal3-io/baremetal-operator/apis/metal3.io/v1alpha1/groupversion_info.go
@@ -0,0 +1,36 @@
+/*
+
+
+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 v1alpha1 contains API Schema definitions for the metal3.io v1alpha1 API group
+// +kubebuilder:object:generate=true
+// +groupName=metal3.io
+package v1alpha1
+
+import (
+ "k8s.io/apimachinery/pkg/runtime/schema"
+ "sigs.k8s.io/controller-runtime/pkg/scheme"
+)
+
+var (
+ // GroupVersion is group version used to register these objects
+ GroupVersion = schema.GroupVersion{Group: "metal3.io", Version: "v1alpha1"}
+
+ // SchemeBuilder is used to add go types to the GroupVersionKind scheme
+ SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}
+
+ // AddToScheme adds the types in this group-version to the given scheme.
+ AddToScheme = SchemeBuilder.AddToScheme
+)
diff --git a/vendor/github.com/metal3-io/baremetal-operator/pkg/apis/metal3/v1alpha1/zz_generated.deepcopy.go b/vendor/github.com/metal3-io/baremetal-operator/apis/metal3.io/v1alpha1/zz_generated.deepcopy.go
similarity index 70%
rename from vendor/github.com/metal3-io/baremetal-operator/pkg/apis/metal3/v1alpha1/zz_generated.deepcopy.go
rename to vendor/github.com/metal3-io/baremetal-operator/apis/metal3.io/v1alpha1/zz_generated.deepcopy.go
index 4c57aff70b0..8993e77c6af 100644
--- a/vendor/github.com/metal3-io/baremetal-operator/pkg/apis/metal3/v1alpha1/zz_generated.deepcopy.go
+++ b/vendor/github.com/metal3-io/baremetal-operator/apis/metal3.io/v1alpha1/zz_generated.deepcopy.go
@@ -1,18 +1,33 @@
// +build !ignore_autogenerated
-// Code generated by operator-sdk. DO NOT EDIT.
+/*
+
+
+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 controller-gen. DO NOT EDIT.
package v1alpha1
import (
- v1 "k8s.io/api/core/v1"
+ "k8s.io/api/core/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
)
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *BIOS) DeepCopyInto(out *BIOS) {
*out = *in
- return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BIOS.
@@ -28,7 +43,6 @@ func (in *BIOS) DeepCopy() *BIOS {
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *BMCDetails) DeepCopyInto(out *BMCDetails) {
*out = *in
- return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BMCDetails.
@@ -48,7 +62,6 @@ func (in *BareMetalHost) DeepCopyInto(out *BareMetalHost) {
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
in.Spec.DeepCopyInto(&out.Spec)
in.Status.DeepCopyInto(&out.Status)
- return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BareMetalHost.
@@ -81,7 +94,6 @@ func (in *BareMetalHostList) DeepCopyInto(out *BareMetalHostList) {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
- return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BareMetalHostList.
@@ -113,6 +125,16 @@ func (in *BareMetalHostSpec) DeepCopyInto(out *BareMetalHostSpec) {
}
}
out.BMC = in.BMC
+ if in.RAID != nil {
+ in, out := &in.RAID, &out.RAID
+ *out = new(RAIDConfig)
+ (*in).DeepCopyInto(*out)
+ }
+ if in.Firmware != nil {
+ in, out := &in.Firmware, &out.Firmware
+ *out = new(FirmwareConfig)
+ (*in).DeepCopyInto(*out)
+ }
if in.RootDeviceHints != nil {
in, out := &in.RootDeviceHints, &out.RootDeviceHints
*out = new(RootDeviceHints)
@@ -143,7 +165,6 @@ func (in *BareMetalHostSpec) DeepCopyInto(out *BareMetalHostSpec) {
*out = new(v1.SecretReference)
**out = **in
}
- return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BareMetalHostSpec.
@@ -172,7 +193,6 @@ func (in *BareMetalHostStatus) DeepCopyInto(out *BareMetalHostStatus) {
in.GoodCredentials.DeepCopyInto(&out.GoodCredentials)
in.TriedCredentials.DeepCopyInto(&out.TriedCredentials)
in.OperationHistory.DeepCopyInto(&out.OperationHistory)
- return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BareMetalHostStatus.
@@ -193,7 +213,6 @@ func (in *CPU) DeepCopyInto(out *CPU) {
*out = make([]string, len(*in))
copy(*out, *in)
}
- return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CPU.
@@ -214,7 +233,6 @@ func (in *CredentialsStatus) DeepCopyInto(out *CredentialsStatus) {
*out = new(v1.SecretReference)
**out = **in
}
- return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CredentialsStatus.
@@ -231,7 +249,6 @@ func (in *CredentialsStatus) DeepCopy() *CredentialsStatus {
func (in *Firmware) DeepCopyInto(out *Firmware) {
*out = *in
out.BIOS = in.BIOS
- return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Firmware.
@@ -244,6 +261,36 @@ func (in *Firmware) DeepCopy() *Firmware {
return out
}
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *FirmwareConfig) DeepCopyInto(out *FirmwareConfig) {
+ *out = *in
+ if in.VirtualizationEnabled != nil {
+ in, out := &in.VirtualizationEnabled, &out.VirtualizationEnabled
+ *out = new(bool)
+ **out = **in
+ }
+ if in.SimultaneousMultithreadingEnabled != nil {
+ in, out := &in.SimultaneousMultithreadingEnabled, &out.SimultaneousMultithreadingEnabled
+ *out = new(bool)
+ **out = **in
+ }
+ if in.SriovEnabled != nil {
+ in, out := &in.SriovEnabled, &out.SriovEnabled
+ *out = new(bool)
+ **out = **in
+ }
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FirmwareConfig.
+func (in *FirmwareConfig) DeepCopy() *FirmwareConfig {
+ if in == nil {
+ return nil
+ }
+ out := new(FirmwareConfig)
+ in.DeepCopyInto(out)
+ return out
+}
+
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *HardwareDetails) DeepCopyInto(out *HardwareDetails) {
*out = *in
@@ -262,7 +309,6 @@ func (in *HardwareDetails) DeepCopyInto(out *HardwareDetails) {
copy(*out, *in)
}
in.CPU.DeepCopyInto(&out.CPU)
- return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HardwareDetails.
@@ -275,10 +321,39 @@ func (in *HardwareDetails) DeepCopy() *HardwareDetails {
return out
}
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *HardwareRAIDVolume) DeepCopyInto(out *HardwareRAIDVolume) {
+ *out = *in
+ if in.SizeGibibytes != nil {
+ in, out := &in.SizeGibibytes, &out.SizeGibibytes
+ *out = new(int)
+ **out = **in
+ }
+ if in.Rotational != nil {
+ in, out := &in.Rotational, &out.Rotational
+ *out = new(bool)
+ **out = **in
+ }
+ if in.NumberOfPhysicalDisks != nil {
+ in, out := &in.NumberOfPhysicalDisks, &out.NumberOfPhysicalDisks
+ *out = new(int)
+ **out = **in
+ }
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HardwareRAIDVolume.
+func (in *HardwareRAIDVolume) DeepCopy() *HardwareRAIDVolume {
+ if in == nil {
+ return nil
+ }
+ out := new(HardwareRAIDVolume)
+ in.DeepCopyInto(out)
+ return out
+}
+
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *HardwareSystemVendor) DeepCopyInto(out *HardwareSystemVendor) {
*out = *in
- return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HardwareSystemVendor.
@@ -299,7 +374,6 @@ func (in *Image) DeepCopyInto(out *Image) {
*out = new(string)
**out = **in
}
- return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Image.
@@ -320,7 +394,6 @@ func (in *NIC) DeepCopyInto(out *NIC) {
*out = make([]VLAN, len(*in))
copy(*out, *in)
}
- return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NIC.
@@ -340,7 +413,6 @@ func (in *OperationHistory) DeepCopyInto(out *OperationHistory) {
in.Inspect.DeepCopyInto(&out.Inspect)
in.Provision.DeepCopyInto(&out.Provision)
in.Deprovision.DeepCopyInto(&out.Deprovision)
- return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OperationHistory.
@@ -358,7 +430,6 @@ func (in *OperationMetric) DeepCopyInto(out *OperationMetric) {
*out = *in
in.Start.DeepCopyInto(&out.Start)
in.End.DeepCopyInto(&out.End)
- return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OperationMetric.
@@ -380,7 +451,16 @@ func (in *ProvisionStatus) DeepCopyInto(out *ProvisionStatus) {
*out = new(RootDeviceHints)
(*in).DeepCopyInto(*out)
}
- return
+ if in.RAID != nil {
+ in, out := &in.RAID, &out.RAID
+ *out = new(RAIDConfig)
+ (*in).DeepCopyInto(*out)
+ }
+ if in.Firmware != nil {
+ in, out := &in.Firmware, &out.Firmware
+ *out = new(FirmwareConfig)
+ (*in).DeepCopyInto(*out)
+ }
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProvisionStatus.
@@ -393,6 +473,50 @@ func (in *ProvisionStatus) DeepCopy() *ProvisionStatus {
return out
}
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *RAIDConfig) DeepCopyInto(out *RAIDConfig) {
+ *out = *in
+ if in.HardwareRAIDVolumes != nil {
+ in, out := &in.HardwareRAIDVolumes, &out.HardwareRAIDVolumes
+ *out = make([]HardwareRAIDVolume, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
+ if in.SoftwareRAIDVolumes != nil {
+ in, out := &in.SoftwareRAIDVolumes, &out.SoftwareRAIDVolumes
+ *out = make([]SoftwareRAIDVolume, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RAIDConfig.
+func (in *RAIDConfig) DeepCopy() *RAIDConfig {
+ if in == nil {
+ return nil
+ }
+ out := new(RAIDConfig)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *RebootAnnotationArguments) DeepCopyInto(out *RebootAnnotationArguments) {
+ *out = *in
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RebootAnnotationArguments.
+func (in *RebootAnnotationArguments) DeepCopy() *RebootAnnotationArguments {
+ if in == nil {
+ return nil
+ }
+ out := new(RebootAnnotationArguments)
+ in.DeepCopyInto(out)
+ return out
+}
+
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *RootDeviceHints) DeepCopyInto(out *RootDeviceHints) {
*out = *in
@@ -401,7 +525,6 @@ func (in *RootDeviceHints) DeepCopyInto(out *RootDeviceHints) {
*out = new(bool)
**out = **in
}
- return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RootDeviceHints.
@@ -414,10 +537,36 @@ func (in *RootDeviceHints) DeepCopy() *RootDeviceHints {
return out
}
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *SoftwareRAIDVolume) DeepCopyInto(out *SoftwareRAIDVolume) {
+ *out = *in
+ if in.SizeGibibytes != nil {
+ in, out := &in.SizeGibibytes, &out.SizeGibibytes
+ *out = new(int)
+ **out = **in
+ }
+ if in.PhysicalDisks != nil {
+ in, out := &in.PhysicalDisks, &out.PhysicalDisks
+ *out = make([]RootDeviceHints, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SoftwareRAIDVolume.
+func (in *SoftwareRAIDVolume) DeepCopy() *SoftwareRAIDVolume {
+ if in == nil {
+ return nil
+ }
+ out := new(SoftwareRAIDVolume)
+ in.DeepCopyInto(out)
+ return out
+}
+
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *Storage) DeepCopyInto(out *Storage) {
*out = *in
- return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Storage.
@@ -433,7 +582,6 @@ func (in *Storage) DeepCopy() *Storage {
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *VLAN) DeepCopyInto(out *VLAN) {
*out = *in
- return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VLAN.
diff --git a/vendor/github.com/metal3-io/baremetal-operator/pkg/apis/metal3/v1alpha1/doc.go b/vendor/github.com/metal3-io/baremetal-operator/pkg/apis/metal3/v1alpha1/doc.go
deleted file mode 100644
index 8e47c2938e9..00000000000
--- a/vendor/github.com/metal3-io/baremetal-operator/pkg/apis/metal3/v1alpha1/doc.go
+++ /dev/null
@@ -1,4 +0,0 @@
-// Package v1alpha1 contains API Schema definitions for the metal3 v1alpha1 API group
-// +k8s:deepcopy-gen=package,register
-// +groupName=metal3.io
-package v1alpha1
diff --git a/vendor/github.com/metal3-io/baremetal-operator/pkg/apis/metal3/v1alpha1/register.go b/vendor/github.com/metal3-io/baremetal-operator/pkg/apis/metal3/v1alpha1/register.go
deleted file mode 100644
index 289dca190b2..00000000000
--- a/vendor/github.com/metal3-io/baremetal-operator/pkg/apis/metal3/v1alpha1/register.go
+++ /dev/null
@@ -1,19 +0,0 @@
-// NOTE: Boilerplate only. Ignore this file.
-
-// Package v1alpha1 contains API Schema definitions for the metal3 v1alpha1 API group
-// +k8s:deepcopy-gen=package,register
-// +groupName=metal3.io
-package v1alpha1
-
-import (
- "k8s.io/apimachinery/pkg/runtime/schema"
- "sigs.k8s.io/controller-runtime/pkg/scheme"
-)
-
-var (
- // SchemeGroupVersion is group version used to register these objects
- SchemeGroupVersion = schema.GroupVersion{Group: "metal3.io", Version: "v1alpha1"}
-
- // SchemeBuilder is used to add go types to the GroupVersionKind scheme
- SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion}
-)
diff --git a/vendor/github.com/metal3-io/baremetal-operator/pkg/apis/metal3/v1alpha1/zz_generated.defaults.go b/vendor/github.com/metal3-io/baremetal-operator/pkg/apis/metal3/v1alpha1/zz_generated.defaults.go
deleted file mode 100644
index dd621a3acda..00000000000
--- a/vendor/github.com/metal3-io/baremetal-operator/pkg/apis/metal3/v1alpha1/zz_generated.defaults.go
+++ /dev/null
@@ -1,32 +0,0 @@
-// +build !ignore_autogenerated
-
-/*
-Copyright 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.
-*/
-
-// Code generated by defaulter-gen. DO NOT EDIT.
-
-package v1alpha1
-
-import (
- runtime "k8s.io/apimachinery/pkg/runtime"
-)
-
-// RegisterDefaults adds defaulters functions to the given scheme.
-// Public to allow building arbitrary schemes.
-// All generated defaulters are covering - they call all nested defaulters.
-func RegisterDefaults(scheme *runtime.Scheme) error {
- return nil
-}
diff --git a/vendor/github.com/metal3-io/baremetal-operator/pkg/apis/metal3/v1alpha1/zz_generated.openapi.go b/vendor/github.com/metal3-io/baremetal-operator/pkg/apis/metal3/v1alpha1/zz_generated.openapi.go
deleted file mode 100644
index c96e3ffb385..00000000000
--- a/vendor/github.com/metal3-io/baremetal-operator/pkg/apis/metal3/v1alpha1/zz_generated.openapi.go
+++ /dev/null
@@ -1,62 +0,0 @@
-// +build !ignore_autogenerated
-
-// Code generated by openapi-gen. DO NOT EDIT.
-
-// This file was autogenerated by openapi-gen. Do not edit it manually!
-
-package v1alpha1
-
-import (
- spec "github.com/go-openapi/spec"
- common "k8s.io/kube-openapi/pkg/common"
-)
-
-func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenAPIDefinition {
- return map[string]common.OpenAPIDefinition{
- "github.com/metal3-io/baremetal-operator/pkg/apis/metal3/v1alpha1.BareMetalHost": schema_pkg_apis_metal3_v1alpha1_BareMetalHost(ref),
- }
-}
-
-func schema_pkg_apis_metal3_v1alpha1_BareMetalHost(ref common.ReferenceCallback) common.OpenAPIDefinition {
- return common.OpenAPIDefinition{
- Schema: spec.Schema{
- SchemaProps: spec.SchemaProps{
- Description: "BareMetalHost is the Schema for the baremetalhosts API",
- Type: []string{"object"},
- Properties: map[string]spec.Schema{
- "kind": {
- SchemaProps: spec.SchemaProps{
- Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
- Type: []string{"string"},
- Format: "",
- },
- },
- "apiVersion": {
- SchemaProps: spec.SchemaProps{
- Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources",
- Type: []string{"string"},
- Format: "",
- },
- },
- "metadata": {
- SchemaProps: spec.SchemaProps{
- Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"),
- },
- },
- "spec": {
- SchemaProps: spec.SchemaProps{
- Ref: ref("github.com/metal3-io/baremetal-operator/pkg/apis/metal3/v1alpha1.BareMetalHostSpec"),
- },
- },
- "status": {
- SchemaProps: spec.SchemaProps{
- Ref: ref("github.com/metal3-io/baremetal-operator/pkg/apis/metal3/v1alpha1.BareMetalHostStatus"),
- },
- },
- },
- },
- },
- Dependencies: []string{
- "github.com/metal3-io/baremetal-operator/pkg/apis/metal3/v1alpha1.BareMetalHostSpec", "github.com/metal3-io/baremetal-operator/pkg/apis/metal3/v1alpha1.BareMetalHostStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"},
- }
-}
diff --git a/vendor/github.com/mitchellh/mapstructure/.travis.yml b/vendor/github.com/mitchellh/mapstructure/.travis.yml
deleted file mode 100644
index 5e31a95a8b8..00000000000
--- a/vendor/github.com/mitchellh/mapstructure/.travis.yml
+++ /dev/null
@@ -1,9 +0,0 @@
-language: go
-
-go:
- - "1.14.x"
- - tip
-
-script:
- - go test
- - go test -bench . -benchmem
diff --git a/vendor/github.com/mitchellh/mapstructure/CHANGELOG.md b/vendor/github.com/mitchellh/mapstructure/CHANGELOG.md
index 20eea2b7ade..b9e71de2ec4 100644
--- a/vendor/github.com/mitchellh/mapstructure/CHANGELOG.md
+++ b/vendor/github.com/mitchellh/mapstructure/CHANGELOG.md
@@ -1,3 +1,10 @@
+## 1.4.0
+
+* A new decode hook type `DecodeHookFuncValue` has been added that has
+ access to the full values. [GH-183]
+* Squash is now supported with embedded fields that are struct pointers [GH-205]
+* Empty strings will convert to 0 for all numeric types when weakly decoding [GH-206]
+
## 1.3.3
* Decoding maps from maps creates a settable value for decode hooks [GH-203]
diff --git a/vendor/github.com/mitchellh/mapstructure/decode_hooks.go b/vendor/github.com/mitchellh/mapstructure/decode_hooks.go
index 1f0abc65ab7..77578d00718 100644
--- a/vendor/github.com/mitchellh/mapstructure/decode_hooks.go
+++ b/vendor/github.com/mitchellh/mapstructure/decode_hooks.go
@@ -16,10 +16,11 @@ func typedDecodeHook(h DecodeHookFunc) DecodeHookFunc {
// Create variables here so we can reference them with the reflect pkg
var f1 DecodeHookFuncType
var f2 DecodeHookFuncKind
+ var f3 DecodeHookFuncValue
// Fill in the variables into this interface and the rest is done
// automatically using the reflect package.
- potential := []interface{}{f1, f2}
+ potential := []interface{}{f1, f2, f3}
v := reflect.ValueOf(h)
vt := v.Type()
@@ -38,13 +39,15 @@ func typedDecodeHook(h DecodeHookFunc) DecodeHookFunc {
// that took reflect.Kind instead of reflect.Type.
func DecodeHookExec(
raw DecodeHookFunc,
- from reflect.Type, to reflect.Type,
- data interface{}) (interface{}, error) {
+ from reflect.Value, to reflect.Value) (interface{}, error) {
+
switch f := typedDecodeHook(raw).(type) {
case DecodeHookFuncType:
- return f(from, to, data)
+ return f(from.Type(), to.Type(), from.Interface())
case DecodeHookFuncKind:
- return f(from.Kind(), to.Kind(), data)
+ return f(from.Kind(), to.Kind(), from.Interface())
+ case DecodeHookFuncValue:
+ return f(from, to)
default:
return nil, errors.New("invalid decode hook signature")
}
@@ -56,22 +59,16 @@ func DecodeHookExec(
// The composed funcs are called in order, with the result of the
// previous transformation.
func ComposeDecodeHookFunc(fs ...DecodeHookFunc) DecodeHookFunc {
- return func(
- f reflect.Type,
- t reflect.Type,
- data interface{}) (interface{}, error) {
+ return func(f reflect.Value, t reflect.Value) (interface{}, error) {
var err error
+ var data interface{}
+ newFrom := f
for _, f1 := range fs {
- data, err = DecodeHookExec(f1, f, t, data)
+ data, err = DecodeHookExec(f1, newFrom, t)
if err != nil {
return nil, err
}
-
- // Modify the from kind to be correct with the new data
- f = nil
- if val := reflect.ValueOf(data); val.IsValid() {
- f = val.Type()
- }
+ newFrom = reflect.ValueOf(data)
}
return data, nil
@@ -215,3 +212,21 @@ func WeaklyTypedHook(
return data, nil
}
+
+func RecursiveStructToMapHookFunc() DecodeHookFunc {
+ return func(f reflect.Value, t reflect.Value) (interface{}, error) {
+ if f.Kind() != reflect.Struct {
+ return f.Interface(), nil
+ }
+
+ var i interface{} = struct{}{}
+ if t.Type() != reflect.TypeOf(&i).Elem() {
+ return f.Interface(), nil
+ }
+
+ m := make(map[string]interface{})
+ t.Set(reflect.ValueOf(m))
+
+ return f.Interface(), nil
+ }
+}
diff --git a/vendor/github.com/mitchellh/mapstructure/mapstructure.go b/vendor/github.com/mitchellh/mapstructure/mapstructure.go
index f41bcc58fbb..cee7dc0b0e7 100644
--- a/vendor/github.com/mitchellh/mapstructure/mapstructure.go
+++ b/vendor/github.com/mitchellh/mapstructure/mapstructure.go
@@ -180,6 +180,10 @@ type DecodeHookFuncType func(reflect.Type, reflect.Type, interface{}) (interface
// source and target types.
type DecodeHookFuncKind func(reflect.Kind, reflect.Kind, interface{}) (interface{}, error)
+// DecodeHookFuncRaw is a DecodeHookFunc which has complete access to both the source and target
+// values.
+type DecodeHookFuncValue func(from reflect.Value, to reflect.Value) (interface{}, error)
+
// DecoderConfig is the configuration that is used to create a new decoder
// and allows customization of various aspects of decoding.
type DecoderConfig struct {
@@ -409,9 +413,7 @@ func (d *Decoder) decode(name string, input interface{}, outVal reflect.Value) e
if d.config.DecodeHook != nil {
// We have a DecodeHook, so let's pre-process the input.
var err error
- input, err = DecodeHookExec(
- d.config.DecodeHook,
- inputVal.Type(), outVal.Type(), input)
+ input, err = DecodeHookExec(d.config.DecodeHook, inputVal, outVal)
if err != nil {
return fmt.Errorf("error decoding '%s': %s", name, err)
}
@@ -562,8 +564,8 @@ func (d *Decoder) decodeString(name string, data interface{}, val reflect.Value)
if !converted {
return fmt.Errorf(
- "'%s' expected type '%s', got unconvertible type '%s'",
- name, val.Type(), dataVal.Type())
+ "'%s' expected type '%s', got unconvertible type '%s', value: '%v'",
+ name, val.Type(), dataVal.Type(), data)
}
return nil
@@ -588,7 +590,12 @@ func (d *Decoder) decodeInt(name string, data interface{}, val reflect.Value) er
val.SetInt(0)
}
case dataKind == reflect.String && d.config.WeaklyTypedInput:
- i, err := strconv.ParseInt(dataVal.String(), 0, val.Type().Bits())
+ str := dataVal.String()
+ if str == "" {
+ str = "0"
+ }
+
+ i, err := strconv.ParseInt(str, 0, val.Type().Bits())
if err == nil {
val.SetInt(i)
} else {
@@ -604,8 +611,8 @@ func (d *Decoder) decodeInt(name string, data interface{}, val reflect.Value) er
val.SetInt(i)
default:
return fmt.Errorf(
- "'%s' expected type '%s', got unconvertible type '%s'",
- name, val.Type(), dataVal.Type())
+ "'%s' expected type '%s', got unconvertible type '%s', value: '%v'",
+ name, val.Type(), dataVal.Type(), data)
}
return nil
@@ -640,7 +647,12 @@ func (d *Decoder) decodeUint(name string, data interface{}, val reflect.Value) e
val.SetUint(0)
}
case dataKind == reflect.String && d.config.WeaklyTypedInput:
- i, err := strconv.ParseUint(dataVal.String(), 0, val.Type().Bits())
+ str := dataVal.String()
+ if str == "" {
+ str = "0"
+ }
+
+ i, err := strconv.ParseUint(str, 0, val.Type().Bits())
if err == nil {
val.SetUint(i)
} else {
@@ -660,8 +672,8 @@ func (d *Decoder) decodeUint(name string, data interface{}, val reflect.Value) e
val.SetUint(uint64(i))
default:
return fmt.Errorf(
- "'%s' expected type '%s', got unconvertible type '%s'",
- name, val.Type(), dataVal.Type())
+ "'%s' expected type '%s', got unconvertible type '%s', value: '%v'",
+ name, val.Type(), dataVal.Type(), data)
}
return nil
@@ -691,8 +703,8 @@ func (d *Decoder) decodeBool(name string, data interface{}, val reflect.Value) e
}
default:
return fmt.Errorf(
- "'%s' expected type '%s', got unconvertible type '%s'",
- name, val.Type(), dataVal.Type())
+ "'%s' expected type '%s', got unconvertible type '%s', value: '%v'",
+ name, val.Type(), dataVal.Type(), data)
}
return nil
@@ -717,7 +729,12 @@ func (d *Decoder) decodeFloat(name string, data interface{}, val reflect.Value)
val.SetFloat(0)
}
case dataKind == reflect.String && d.config.WeaklyTypedInput:
- f, err := strconv.ParseFloat(dataVal.String(), val.Type().Bits())
+ str := dataVal.String()
+ if str == "" {
+ str = "0"
+ }
+
+ f, err := strconv.ParseFloat(str, val.Type().Bits())
if err == nil {
val.SetFloat(f)
} else {
@@ -733,8 +750,8 @@ func (d *Decoder) decodeFloat(name string, data interface{}, val reflect.Value)
val.SetFloat(i)
default:
return fmt.Errorf(
- "'%s' expected type '%s', got unconvertible type '%s'",
- name, val.Type(), dataVal.Type())
+ "'%s' expected type '%s', got unconvertible type '%s', value: '%v'",
+ name, val.Type(), dataVal.Type(), data)
}
return nil
@@ -785,7 +802,7 @@ func (d *Decoder) decodeMapFromSlice(name string, dataVal reflect.Value, val ref
for i := 0; i < dataVal.Len(); i++ {
err := d.decode(
- fmt.Sprintf("%s[%d]", name, i),
+ name+"["+strconv.Itoa(i)+"]",
dataVal.Index(i).Interface(), val)
if err != nil {
return err
@@ -818,7 +835,7 @@ func (d *Decoder) decodeMapFromMap(name string, dataVal reflect.Value, val refle
}
for _, k := range dataVal.MapKeys() {
- fieldName := fmt.Sprintf("%s[%s]", name, k)
+ fieldName := name + "[" + k.String() + "]"
// First decode the key into the proper type
currentKey := reflect.Indirect(reflect.New(valKeyType))
@@ -862,6 +879,10 @@ func (d *Decoder) decodeMapFromStruct(name string, dataVal reflect.Value, val re
// Next get the actual value of this field and verify it is assignable
// to the map value.
v := dataVal.Field(i)
+ if v.Kind() == reflect.Ptr && v.Elem().Kind() == reflect.Struct {
+ // Handle embedded struct pointers as embedded structs.
+ v = v.Elem()
+ }
if !v.Type().AssignableTo(valMap.Type().Elem()) {
return fmt.Errorf("cannot assign type '%s' to map value field of type '%s'", v.Type(), valMap.Type().Elem())
}
@@ -995,8 +1016,8 @@ func (d *Decoder) decodeFunc(name string, data interface{}, val reflect.Value) e
dataVal := reflect.Indirect(reflect.ValueOf(data))
if val.Type() != dataVal.Type() {
return fmt.Errorf(
- "'%s' expected type '%s', got unconvertible type '%s'",
- name, val.Type(), dataVal.Type())
+ "'%s' expected type '%s', got unconvertible type '%s', value: '%v'",
+ name, val.Type(), dataVal.Type(), data)
}
val.Set(dataVal)
return nil
@@ -1062,7 +1083,7 @@ func (d *Decoder) decodeSlice(name string, data interface{}, val reflect.Value)
}
currentField := valSlice.Index(i)
- fieldName := fmt.Sprintf("%s[%d]", name, i)
+ fieldName := name + "[" + strconv.Itoa(i) + "]"
if err := d.decode(fieldName, currentData, currentField); err != nil {
errors = appendErrors(errors, err)
}
@@ -1129,7 +1150,7 @@ func (d *Decoder) decodeArray(name string, data interface{}, val reflect.Value)
currentData := dataVal.Index(i).Interface()
currentField := valArray.Index(i)
- fieldName := fmt.Sprintf("%s[%d]", name, i)
+ fieldName := name + "[" + strconv.Itoa(i) + "]"
if err := d.decode(fieldName, currentData, currentField); err != nil {
errors = appendErrors(errors, err)
}
@@ -1232,10 +1253,14 @@ func (d *Decoder) decodeStructFromMap(name string, dataVal, val reflect.Value) e
for i := 0; i < structType.NumField(); i++ {
fieldType := structType.Field(i)
- fieldKind := fieldType.Type.Kind()
+ fieldVal := structVal.Field(i)
+ if fieldVal.Kind() == reflect.Ptr && fieldVal.Elem().Kind() == reflect.Struct {
+ // Handle embedded struct pointers as embedded structs.
+ fieldVal = fieldVal.Elem()
+ }
// If "squash" is specified in the tag, we squash the field down.
- squash := d.config.Squash && fieldKind == reflect.Struct && fieldType.Anonymous
+ squash := d.config.Squash && fieldVal.Kind() == reflect.Struct && fieldType.Anonymous
remain := false
// We always parse the tags cause we're looking for other tags too
@@ -1253,21 +1278,21 @@ func (d *Decoder) decodeStructFromMap(name string, dataVal, val reflect.Value) e
}
if squash {
- if fieldKind != reflect.Struct {
+ if fieldVal.Kind() != reflect.Struct {
errors = appendErrors(errors,
- fmt.Errorf("%s: unsupported type for squash: %s", fieldType.Name, fieldKind))
+ fmt.Errorf("%s: unsupported type for squash: %s", fieldType.Name, fieldVal.Kind()))
} else {
- structs = append(structs, structVal.FieldByName(fieldType.Name))
+ structs = append(structs, fieldVal)
}
continue
}
// Build our field
if remain {
- remainField = &field{fieldType, structVal.Field(i)}
+ remainField = &field{fieldType, fieldVal}
} else {
// Normal struct field, store it away
- fields = append(fields, field{fieldType, structVal.Field(i)})
+ fields = append(fields, field{fieldType, fieldVal})
}
}
}
@@ -1326,7 +1351,7 @@ func (d *Decoder) decodeStructFromMap(name string, dataVal, val reflect.Value) e
// If the name is empty string, then we're at the root, and we
// don't dot-join the fields.
if name != "" {
- fieldName = fmt.Sprintf("%s.%s", name, fieldName)
+ fieldName = name + "." + fieldName
}
if err := d.decode(fieldName, rawMapVal.Interface(), fieldValue); err != nil {
@@ -1373,7 +1398,7 @@ func (d *Decoder) decodeStructFromMap(name string, dataVal, val reflect.Value) e
for rawKey := range dataValKeysUnused {
key := rawKey.(string)
if name != "" {
- key = fmt.Sprintf("%s.%s", name, key)
+ key = name + "." + key
}
d.config.Metadata.Unused = append(d.config.Metadata.Unused, key)
diff --git a/vendor/github.com/moricho/tparallel/.gitignore b/vendor/github.com/moricho/tparallel/.gitignore
new file mode 100644
index 00000000000..71342280eae
--- /dev/null
+++ b/vendor/github.com/moricho/tparallel/.gitignore
@@ -0,0 +1,3 @@
+/tparallel
+.envrc
+/dist
diff --git a/vendor/github.com/moricho/tparallel/.goreleaser.yml b/vendor/github.com/moricho/tparallel/.goreleaser.yml
new file mode 100644
index 00000000000..e9f6d727e7a
--- /dev/null
+++ b/vendor/github.com/moricho/tparallel/.goreleaser.yml
@@ -0,0 +1,38 @@
+project_name: tparallel
+env:
+ - GO111MODULE=on
+before:
+ hooks:
+ - go mod tidy
+builds:
+ - main: ./cmd/tparallel
+ binary: tparallel
+ ldflags:
+ - -s -w
+ - -X main.Version={{.Version}}
+ - -X main.Revision={{.ShortCommit}}
+ env:
+ - CGO_ENABLED=0
+archives:
+ - name_template: '{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}'
+ replacements:
+ darwin: darwin
+ linux: linux
+ windows: windows
+ 386: i386
+ amd64: x86_64
+ format_overrides:
+ - goos: windows
+ format: zip
+release:
+ prerelease: auto
+brews:
+ - tap:
+ owner: moricho
+ name: homebrew-tparallel
+ homepage: https://github.com/moricho/tparallel
+ description: tparallel detects inappropriate usage of t.Parallel() method in your Go test codes
+ install: |
+ bin.install "tparallel"
+ test: |
+ system "#{bin}/goreleaser -v"
diff --git a/vendor/github.com/moricho/tparallel/LICENSE b/vendor/github.com/moricho/tparallel/LICENSE
new file mode 100644
index 00000000000..4f029982f26
--- /dev/null
+++ b/vendor/github.com/moricho/tparallel/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2020 moricho
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+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.
diff --git a/vendor/github.com/moricho/tparallel/Makefile b/vendor/github.com/moricho/tparallel/Makefile
new file mode 100644
index 00000000000..fb35880695f
--- /dev/null
+++ b/vendor/github.com/moricho/tparallel/Makefile
@@ -0,0 +1,13 @@
+all: build
+
+.PHONY: build
+build:
+ go build -o tparallel ./cmd/tparallel
+
+.PHONY: build_race
+build_race:
+ go build -race -o tparallel ./cmd/tparallel
+
+.PHONY: test
+test: build_race
+ go test -v ./...
diff --git a/vendor/github.com/moricho/tparallel/README.md b/vendor/github.com/moricho/tparallel/README.md
new file mode 100644
index 00000000000..cd358d15546
--- /dev/null
+++ b/vendor/github.com/moricho/tparallel/README.md
@@ -0,0 +1,100 @@
+# tparallel
+[](https://github.com/moricho/tparallel/actions)
+[](https://goreportcard.com/report/github.com/moricho/tparallel)
+[](LICENSE)
+
+`tparallel` finds inappropriate usage of `t.Parallel()` method in your Go test codes.
+It detects the following:
+- `t.Parallel()` is called in either a top-level test function or a sub-test function only
+- Although `t.Parallel()` is called in the sub-test function, it is post-processed by `defer` instead of `t.Cleanup()`
+
+This tool was inspired by this blog: [Go言語でのテストの並列化 〜t.Parallel()メソッドを理解する〜](https://engineering.mercari.com/blog/entry/how_to_use_t_parallel/)
+
+## Installation
+
+### From GitHub Releases
+Please see [GitHub Releases](https://github.com/moricho/tparallel/releases).
+Available binaries are:
+- macOS
+- Linux
+- Windows
+
+### macOS
+``` sh
+$ brew tap moricho/tparallel
+$ brew install tparallel
+```
+
+### go get
+```sh
+$ go get -u github.com/moricho/tparallel/cmd/tparallel
+```
+
+## Usage
+
+```sh
+$ go vet -vettool=`which tparallel`
+```
+
+## Example
+
+```go
+package sample
+
+import (
+ "testing"
+)
+
+func Test_Table1(t *testing.T) {
+ teardown := setup("Test_Table1")
+ defer teardown()
+
+ tests := []struct {
+ name string
+ }{
+ {
+ name: "Table1_Sub1",
+ },
+ {
+ name: "Table1_Sub2",
+ },
+ }
+
+ for _, tt := range tests {
+ t.Run(tt.name, func(t *testing.T) {
+ t.Parallel()
+ call(tt.name)
+ })
+ }
+}
+
+func Test_Table2(t *testing.T) {
+ teardown := setup("Test_Table2")
+ t.Cleanup(teardown)
+ t.Parallel()
+
+ tests := []struct {
+ name string
+ }{
+ {
+ name: "Table2_Sub1",
+ },
+ {
+ name: "Table2_Sub2",
+ },
+ }
+
+ for _, tt := range tests {
+ t.Run(tt.name, func(t *testing.T) {
+ call(tt.name)
+ })
+ }
+}
+```
+
+```console
+# github.com/moricho/tparallel/testdata/src/sample
+testdata/src/sample/table_test.go:7:6: Test_Table1 should use t.Cleanup
+testdata/src/sample/table_test.go:7:6: Test_Table1 should call t.Parallel on the top level as well as its subtests
+testdata/src/sample/table_test.go:30:6: Test_Table2's subtests should call t.Parallel
+```
diff --git a/vendor/github.com/moricho/tparallel/go.mod b/vendor/github.com/moricho/tparallel/go.mod
new file mode 100644
index 00000000000..9947ccb60df
--- /dev/null
+++ b/vendor/github.com/moricho/tparallel/go.mod
@@ -0,0 +1,8 @@
+module github.com/moricho/tparallel
+
+go 1.15
+
+require (
+ github.com/gostaticanalysis/analysisutil v0.1.0
+ golang.org/x/tools v0.0.0-20200831203904-5a2aa26beb65
+)
diff --git a/vendor/github.com/moricho/tparallel/go.sum b/vendor/github.com/moricho/tparallel/go.sum
new file mode 100644
index 00000000000..bcc4158da8c
--- /dev/null
+++ b/vendor/github.com/moricho/tparallel/go.sum
@@ -0,0 +1,34 @@
+github.com/gostaticanalysis/analysisutil v0.1.0 h1:E4c8Y1EQURbBEAHoXc/jBTK7Np14ArT8NPUiSFOl9yc=
+github.com/gostaticanalysis/analysisutil v0.1.0/go.mod h1:dMhHRU9KTiDcuLGdy87/2gTR8WruwYZrKdRq9m1O6uw=
+github.com/gostaticanalysis/comment v1.3.0 h1:wTVgynbFu8/nz6SGgywA0TcyIoAVsYc7ai/Zp5xNGlw=
+github.com/gostaticanalysis/comment v1.3.0/go.mod h1:xMicKDx7XRXYdVwY9f9wQpDJVnqWxw9wCauCMKp+IBI=
+github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
+github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
+golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
+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/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
+golang.org/x/mod v0.3.0 h1:RM4zey1++hCTbCVQfnWeKs9/IEsaBLA8vTkd0WVtmH4=
+golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
+golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
+golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
+golang.org/x/net v0.0.0-20190620200207-3b0461eec859/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-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
+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-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+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/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
+golang.org/x/tools v0.0.0-20190307163923-6a08e3108db3/go.mod h1:25r3+/G6/xytQM8iWZKq3Hn0kr0rgFKPUNVEL/dr3z4=
+golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
+golang.org/x/tools v0.0.0-20200624225443-88f3c62a19ff/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
+golang.org/x/tools v0.0.0-20200831203904-5a2aa26beb65 h1:DajXNh69ob79PCQz1N7OHxmqq6ASZC5xAnJJWIQGR6I=
+golang.org/x/tools v0.0.0-20200831203904-5a2aa26beb65/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE=
+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 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=
+golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
diff --git a/vendor/github.com/moricho/tparallel/pkg/ssafunc/ssafunc.go b/vendor/github.com/moricho/tparallel/pkg/ssafunc/ssafunc.go
new file mode 100644
index 00000000000..5a8e637bd97
--- /dev/null
+++ b/vendor/github.com/moricho/tparallel/pkg/ssafunc/ssafunc.go
@@ -0,0 +1,34 @@
+package ssafunc
+
+import (
+ "go/types"
+
+ "github.com/gostaticanalysis/analysisutil"
+ "github.com/moricho/tparallel/pkg/ssainstr"
+ "golang.org/x/tools/go/ssa"
+)
+
+// IsDeferCalled returns whether the given ssa.Function calls `defer`
+func IsDeferCalled(f *ssa.Function) bool {
+ for _, block := range f.Blocks {
+ for _, instr := range block.Instrs {
+ switch instr.(type) {
+ case *ssa.Defer:
+ return true
+ }
+ }
+ }
+ return false
+}
+
+// IsCalled returns whether the given ssa.Function calls `fn` func
+func IsCalled(f *ssa.Function, fn *types.Func) bool {
+ block := f.Blocks[0]
+ for _, instr := range block.Instrs {
+ called := analysisutil.Called(instr, nil, fn)
+ if _, ok := ssainstr.LookupCalled(instr, fn); ok || called {
+ return true
+ }
+ }
+ return false
+}
diff --git a/vendor/github.com/moricho/tparallel/pkg/ssainstr/ssainstr.go b/vendor/github.com/moricho/tparallel/pkg/ssainstr/ssainstr.go
new file mode 100644
index 00000000000..374553f5e20
--- /dev/null
+++ b/vendor/github.com/moricho/tparallel/pkg/ssainstr/ssainstr.go
@@ -0,0 +1,63 @@
+package ssainstr
+
+import (
+ "go/types"
+
+ "github.com/gostaticanalysis/analysisutil"
+ "golang.org/x/tools/go/ssa"
+)
+
+// LookupCalled looks up ssa.Instruction that call the `fn` func in the given instr
+func LookupCalled(instr ssa.Instruction, fn *types.Func) ([]ssa.Instruction, bool) {
+ instrs := []ssa.Instruction{}
+
+ call, ok := instr.(ssa.CallInstruction)
+ if !ok {
+ return instrs, false
+ }
+
+ ssaCall := call.Value()
+ if ssaCall == nil {
+ return instrs, false
+ }
+ common := ssaCall.Common()
+ if common == nil {
+ return instrs, false
+ }
+ val := common.Value
+
+ called := false
+ switch fnval := val.(type) {
+ case *ssa.Function:
+ for _, block := range fnval.Blocks {
+ for _, instr := range block.Instrs {
+ if analysisutil.Called(instr, nil, fn) {
+ called = true
+ instrs = append(instrs, instr)
+ }
+ }
+ }
+ }
+
+ return instrs, called
+}
+
+// HasArgs returns whether the given ssa.Instruction has `typ` type args
+func HasArgs(instr ssa.Instruction, typ types.Type) bool {
+ call, ok := instr.(ssa.CallInstruction)
+ if !ok {
+ return false
+ }
+
+ ssaCall := call.Value()
+ if ssaCall == nil {
+ return false
+ }
+
+ for _, arg := range ssaCall.Call.Args {
+ if types.Identical(arg.Type(), typ) {
+ return true
+ }
+ }
+ return false
+}
diff --git a/vendor/github.com/moricho/tparallel/testmap.go b/vendor/github.com/moricho/tparallel/testmap.go
new file mode 100644
index 00000000000..fa9bed7082b
--- /dev/null
+++ b/vendor/github.com/moricho/tparallel/testmap.go
@@ -0,0 +1,63 @@
+package tparallel
+
+import (
+ "go/types"
+ "strings"
+
+ "github.com/gostaticanalysis/analysisutil"
+ "golang.org/x/tools/go/analysis/passes/buildssa"
+ "golang.org/x/tools/go/ssa"
+
+ "github.com/moricho/tparallel/pkg/ssainstr"
+)
+
+// getTestMap gets a set of a top-level test and its sub-tests
+func getTestMap(ssaanalyzer *buildssa.SSA, testTyp types.Type) map[*ssa.Function][]*ssa.Function {
+ testMap := map[*ssa.Function][]*ssa.Function{}
+
+ trun := analysisutil.MethodOf(testTyp, "Run")
+ for _, f := range ssaanalyzer.SrcFuncs {
+ if !strings.HasPrefix(f.Name(), "Test") || !(f.Parent() == (*ssa.Function)(nil)) {
+ continue
+ }
+ testMap[f] = []*ssa.Function{}
+ for _, block := range f.Blocks {
+ for _, instr := range block.Instrs {
+ called := analysisutil.Called(instr, nil, trun)
+
+ if !called && ssainstr.HasArgs(instr, types.NewPointer(testTyp)) {
+ if instrs, ok := ssainstr.LookupCalled(instr, trun); ok {
+ for _, v := range instrs {
+ testMap[f] = appendTestMap(testMap[f], v)
+ }
+ }
+ } else if called {
+ testMap[f] = appendTestMap(testMap[f], instr)
+ }
+ }
+ }
+ }
+
+ return testMap
+}
+
+// appendTestMap converts ssa.Instruction to ssa.Function and append it to a given sub-test slice
+func appendTestMap(subtests []*ssa.Function, instr ssa.Instruction) []*ssa.Function {
+ call, ok := instr.(ssa.CallInstruction)
+ if !ok {
+ return subtests
+ }
+
+ ssaCall := call.Value()
+ for _, arg := range ssaCall.Call.Args {
+ switch arg := arg.(type) {
+ case *ssa.Function:
+ subtests = append(subtests, arg)
+ case *ssa.MakeClosure:
+ fn, _ := arg.Fn.(*ssa.Function)
+ subtests = append(subtests, fn)
+ }
+ }
+
+ return subtests
+}
diff --git a/vendor/github.com/moricho/tparallel/tparallel.go b/vendor/github.com/moricho/tparallel/tparallel.go
new file mode 100644
index 00000000000..3139e0425df
--- /dev/null
+++ b/vendor/github.com/moricho/tparallel/tparallel.go
@@ -0,0 +1,72 @@
+package tparallel
+
+import (
+ "go/types"
+
+ "github.com/gostaticanalysis/analysisutil"
+ "golang.org/x/tools/go/analysis"
+ "golang.org/x/tools/go/analysis/passes/buildssa"
+
+ "github.com/moricho/tparallel/pkg/ssafunc"
+)
+
+const doc = "tparallel detects inappropriate usage of t.Parallel() method in your Go test codes."
+
+// Analyzer analyzes Go test codes whether they use t.Parallel() appropriately
+// by using SSA (Single Static Assignment)
+var Analyzer = &analysis.Analyzer{
+ Name: "tparallel",
+ Doc: doc,
+ Run: run,
+ Requires: []*analysis.Analyzer{
+ buildssa.Analyzer,
+ },
+}
+
+func run(pass *analysis.Pass) (interface{}, error) {
+ ssaanalyzer := pass.ResultOf[buildssa.Analyzer].(*buildssa.SSA)
+
+ obj := analysisutil.ObjectOf(pass, "testing", "T")
+ if obj == nil {
+ // skip checking
+ return nil, nil
+ }
+ testTyp, testPkg := obj.Type(), obj.Pkg()
+
+ p, _, _ := types.LookupFieldOrMethod(testTyp, true, testPkg, "Parallel")
+ parallel, _ := p.(*types.Func)
+ c, _, _ := types.LookupFieldOrMethod(testTyp, true, testPkg, "Cleanup")
+ cleanup, _ := c.(*types.Func)
+
+ testMap := getTestMap(ssaanalyzer, testTyp) // ex. {Test1: [TestSub1, TestSub2], Test2: [TestSub1, TestSub2, TestSub3], ...}
+ for top, subs := range testMap {
+ if len(subs) == 0 {
+ continue
+ }
+ isParallelTop := ssafunc.IsCalled(top, parallel)
+ isPararellSub := false
+ for _, sub := range subs {
+ isPararellSub = ssafunc.IsCalled(sub, parallel)
+ if isPararellSub {
+ break
+ }
+ }
+
+ if ssafunc.IsDeferCalled(top) {
+ useCleanup := ssafunc.IsCalled(top, cleanup)
+ if isPararellSub && !useCleanup {
+ pass.Reportf(top.Pos(), "%s should use t.Cleanup instead of defer", top.Name())
+ }
+ }
+
+ if isParallelTop == isPararellSub {
+ continue
+ } else if isPararellSub {
+ pass.Reportf(top.Pos(), "%s should call t.Parallel on the top level as well as its subtests", top.Name())
+ } else if isParallelTop {
+ pass.Reportf(top.Pos(), "%s's subtests should call t.Parallel", top.Name())
+ }
+ }
+
+ return nil, nil
+}
diff --git a/vendor/github.com/nishanths/exhaustive/.gitignore b/vendor/github.com/nishanths/exhaustive/.gitignore
index a724b56a94f..24bde53010d 100644
--- a/vendor/github.com/nishanths/exhaustive/.gitignore
+++ b/vendor/github.com/nishanths/exhaustive/.gitignore
@@ -1,4 +1,6 @@
.DS_Store
+*.swp
+tags
# binary
cmd/exhaustive/exhaustive
diff --git a/vendor/github.com/nishanths/exhaustive/.travis.yml b/vendor/github.com/nishanths/exhaustive/.travis.yml
new file mode 100644
index 00000000000..bd342f55813
--- /dev/null
+++ b/vendor/github.com/nishanths/exhaustive/.travis.yml
@@ -0,0 +1,12 @@
+language: go
+
+go:
+ - 1.x
+ - master
+
+# Only clone the most recent commit.
+git:
+ depth: 1
+
+notifications:
+ email: false
diff --git a/vendor/github.com/nishanths/exhaustive/README.md b/vendor/github.com/nishanths/exhaustive/README.md
index ecc76c7c5dd..90afc87fecb 100644
--- a/vendor/github.com/nishanths/exhaustive/README.md
+++ b/vendor/github.com/nishanths/exhaustive/README.md
@@ -2,6 +2,8 @@
[](https://godoc.org/github.com/nishanths/exhaustive)
+[](https://travis-ci.org/nishanths/exhaustive)
+
The `exhaustive` package and command line program can be used to detect
enum switch statements that are not exhaustive.
@@ -29,6 +31,8 @@ The command line usage is:
Usage: exhaustive [-flags] [packages...]
Flags:
+ -check-generated
+ check switch statements in generated files also
-default-signifies-exhaustive
indicates that switch statements are to be considered exhaustive if a 'default' case
is present, even if all enum members aren't listed in the switch (default false)
@@ -36,8 +40,8 @@ Flags:
apply all suggested fixes (default false)
Examples:
- exhaustive code.org/proj/...
- exhaustive -fix example.org/foo/pkg example.org/foo/bar
+ exhaustive github.com/foo/bar/...
+ exhaustive github.com/a/b github.com/x/y
```
## Example
@@ -65,11 +69,11 @@ import "token"
func processToken(t token.Token) {
switch t {
case token.Add:
- // ...
+ ...
case token.Subtract:
- // ...
+ ...
case token.Multiply:
- // ...
+ ...
}
}
```
@@ -80,6 +84,8 @@ Running the `exhaustive` command will print:
calc.go:6:2: missing cases in switch of type token.Token: Quotient, Remainder
```
+Enums can also be defined using explicit constant values instead of `iota`.
+
## License
BSD 2-Clause
diff --git a/vendor/github.com/nishanths/exhaustive/enum.go b/vendor/github.com/nishanths/exhaustive/enum.go
index 98b5656b6e1..ed0df642b11 100644
--- a/vendor/github.com/nishanths/exhaustive/enum.go
+++ b/vendor/github.com/nishanths/exhaustive/enum.go
@@ -8,7 +8,42 @@ import (
"golang.org/x/tools/go/analysis"
)
-type enums map[string][]string // enum type name -> enum member names
+type enums map[string]*enumMembers // enum type name -> enum members
+
+type enumMembers struct {
+ // Names in the order encountered in the AST.
+ OrderedNames []string
+
+ // Maps name -> (constant.Value).ExactString().
+ // If a name is missing in the map, it means that it does not have a
+ // corresponding constant.Value defined in the AST.
+ NameToValue map[string]string
+
+ // Maps (constant.Value).ExactString() -> names.
+ // Names that don't have a constant.Value defined in the AST (e.g., some
+ // iota constants) will not have a corresponding entry in this map.
+ ValueToNames map[string][]string
+}
+
+func (em *enumMembers) add(name string, constVal *string) {
+ em.OrderedNames = append(em.OrderedNames, name)
+
+ if constVal != nil {
+ if em.NameToValue == nil {
+ em.NameToValue = make(map[string]string)
+ }
+ em.NameToValue[name] = *constVal
+
+ if em.ValueToNames == nil {
+ em.ValueToNames = make(map[string][]string)
+ }
+ em.ValueToNames[*constVal] = append(em.ValueToNames[*constVal], name)
+ }
+}
+
+func (em *enumMembers) numMembers() int {
+ return len(em.OrderedNames)
+}
func findEnums(pass *analysis.Pass) enums {
pkgEnums := make(enums)
@@ -39,13 +74,14 @@ func findEnums(pass *analysis.Pass) enums {
if !ok {
continue
}
+
switch i := basic.Info(); {
case i&types.IsInteger != 0:
- pkgEnums[named.Obj().Name()] = nil
+ pkgEnums[named.Obj().Name()] = &enumMembers{}
case i&types.IsFloat != 0:
- pkgEnums[named.Obj().Name()] = nil
+ pkgEnums[named.Obj().Name()] = &enumMembers{}
case i&types.IsString != 0:
- pkgEnums[named.Obj().Name()] = nil
+ pkgEnums[named.Obj().Name()] = &enumMembers{}
}
}
}
@@ -64,22 +100,33 @@ func findEnums(pass *analysis.Pass) enums {
for _, s := range gen.Specs {
// Must be ValueSpec since we've filtered on token.CONST, token.VAR.
v := s.(*ast.ValueSpec)
- for _, name := range v.Names {
+ for i, name := range v.Names {
obj := pass.TypesInfo.Defs[name]
if obj == nil {
continue
}
+
named, ok := obj.Type().(*types.Named)
if !ok {
continue
}
- members, ok := pkgEnums[named.Obj().Name()]
+ // Get the constant.Value representation, if any.
+ var constVal *string
+ if len(v.Values) > i {
+ value := v.Values[i]
+ if con, ok := pass.TypesInfo.Types[value]; ok && con.Value != nil {
+ str := con.Value.ExactString() // temp var to be able to take address
+ constVal = &str
+ }
+ }
+
+ em, ok := pkgEnums[named.Obj().Name()]
if !ok {
continue
}
- members = append(members, obj.Name())
- pkgEnums[named.Obj().Name()] = members
+ em.add(obj.Name(), constVal)
+ pkgEnums[named.Obj().Name()] = em
}
}
}
@@ -90,7 +137,7 @@ func findEnums(pass *analysis.Pass) enums {
// the existence of members. (The type may just be a named type,
// for instance.)
for k, v := range pkgEnums {
- if len(v) == 0 {
+ if v.numMembers() == 0 {
delete(pkgEnums, k)
}
}
diff --git a/vendor/github.com/nishanths/exhaustive/exhaustive.go b/vendor/github.com/nishanths/exhaustive/exhaustive.go
index ef869f26833..73815a62626 100644
--- a/vendor/github.com/nishanths/exhaustive/exhaustive.go
+++ b/vendor/github.com/nishanths/exhaustive/exhaustive.go
@@ -1,26 +1,27 @@
-// Package exhaustive provides an analyzer that helps ensure enum switch statements
-// are exhaustive. The analyzer also provides fixes to make the offending switch
-// statements exhaustive (see "Fixes" section).
+// Package exhaustive provides an analyzer that checks exhaustiveness of enum
+// switch statements. The analyzer also provides fixes to make the offending
+// switch statements exhaustive (see "Fixes" section).
//
// See "cmd/exhaustive" subpackage for the related command line program.
//
// Definition of enum
//
-// The language spec does not provide an explicit definition for enums.
+// The Go language spec does not provide an explicit definition for enums.
// For the purpose of this program, an enum type is a package-level named type
// whose underlying type is an integer (includes byte and rune), a float, or
// a string type. An enum type must have associated with it one or more
// package-level variables of the named type in the package. These variables
// constitute the enum's members.
//
-// In the code snippet below, Biome is an enum type with 3 members.
+// In the code snippet below, Biome is an enum type with 3 members. (You may
+// also use iota instead of explicitly specifying values.)
//
// type Biome int
//
// const (
-// Tundra Biome = iota
-// Savanna
-// Desert
+// Tundra Biome = 1
+// Savanna Biome = 2
+// Desert Biome = 3
// )
//
// Switch statement exhaustiveness
@@ -36,11 +37,15 @@
// Flags
//
// The analyzer accepts a boolean flag: -default-signifies-exhaustive.
-// The flag, if set, indicates to the analyzer that switch statements
+// The flag, if enabled, indicates to the analyzer that switch statements
// are to be considered exhaustive as long as a 'default' case is present, even
// if all enum members aren't listed in the switch statements cases.
//
-// The other relevant flag is the -fix flag.
+// The -check-generated boolean flag, disabled by default, indicates whether
+// to check switch statements in generated Go source files.
+//
+// The other relevant flag is the -fix flag; its behavior is described
+// in the next section.
//
// Fixes
//
@@ -48,7 +53,7 @@
// and does not have a 'default' case. The suggested fix always adds a single
// case clause for the missing enum members.
//
-// case missingA, missingB, missingC:
+// case MissingA, MissingB, MissingC:
// panic(fmt.Sprintf("unhandled value: %v", v))
//
// where v is the expression in the switch statement's tag (in other words, the
@@ -63,7 +68,7 @@
//
// Imports will be adjusted automatically to account for the "fmt" dependency.
//
-// Skip analysis of specific switch statements
+// Skipping analysis
//
// If the following directive comment:
//
@@ -71,6 +76,10 @@
//
// is associated with a switch statement, the analyzer skips
// checking of the switch statement and no diagnostics are reported.
+//
+// Additionally, no diagnostics are reported for switch statements in
+// generated files (see https://golang.org/s/generatedcode for definition of
+// generated file), unless the -check-generated flag is enabled.
package exhaustive
import (
@@ -84,20 +93,21 @@ import (
"golang.org/x/tools/go/ast/inspector"
)
+// Flag names used by the analyzer. They are exported for use by analyzer
+// driver programs.
const (
- // DefaultSignifiesExhaustiveFlag is a flag name used by the analyzer. It
- // is exported for use by analyzer driver programs.
DefaultSignifiesExhaustiveFlag = "default-signifies-exhaustive"
+ CheckGeneratedFlag = "check-generated"
)
var (
- fCheckMaps bool
fDefaultSignifiesExhaustive bool
+ fCheckGeneratedFiles bool
)
func init() {
- Analyzer.Flags.BoolVar(&fCheckMaps, "maps", false, "check key exhaustiveness for map literals of enum key type, in addition to checking switch statements")
Analyzer.Flags.BoolVar(&fDefaultSignifiesExhaustive, DefaultSignifiesExhaustiveFlag, false, "indicates that switch statements are to be considered exhaustive if a 'default' case is present, even if all enum members aren't listed in the switch")
+ Analyzer.Flags.BoolVar(&fCheckGeneratedFiles, CheckGeneratedFlag, false, "check switch statements in generated files also")
}
var Analyzer = &analysis.Analyzer{
@@ -109,8 +119,7 @@ var Analyzer = &analysis.Analyzer{
}
// IgnoreDirectivePrefix is used to exclude checking of specific switch statements.
-// See https://godoc.org/github.com/nishanths/exhaustive#hdr-Skip_analysis_of_specific_switch_statements
-// for details.
+// See package comment for details.
const IgnoreDirectivePrefix = "//exhaustive:ignore"
func containsIgnoreDirective(comments []*ast.Comment) bool {
@@ -123,7 +132,7 @@ func containsIgnoreDirective(comments []*ast.Comment) bool {
}
type enumsFact struct {
- Entries enums
+ Enums enums
}
var _ analysis.Fact = (*enumsFact)(nil)
@@ -133,20 +142,21 @@ func (e *enumsFact) AFact() {}
func (e *enumsFact) String() string {
// sort for stability (required for testing)
var sortedKeys []string
- for k := range e.Entries {
+ for k := range e.Enums {
sortedKeys = append(sortedKeys, k)
}
sort.Strings(sortedKeys)
var buf strings.Builder
for i, k := range sortedKeys {
- v := e.Entries[k]
+ v := e.Enums[k]
buf.WriteString(k)
buf.WriteString(":")
- for j, vv := range v {
+
+ for j, vv := range v.OrderedNames {
buf.WriteString(vv)
// add comma separator between each enum member in an enum type
- if j != len(v)-1 {
+ if j != len(v.OrderedNames)-1 {
buf.WriteString(",")
}
}
@@ -161,16 +171,14 @@ func (e *enumsFact) String() string {
func run(pass *analysis.Pass) (interface{}, error) {
e := findEnums(pass)
if len(e) != 0 {
- pass.ExportPackageFact(&enumsFact{Entries: e})
+ pass.ExportPackageFact(&enumsFact{Enums: e})
}
inspect := pass.ResultOf[inspect.Analyzer].(*inspector.Inspector)
comments := make(map[*ast.File]ast.CommentMap) // CommentMap per package file, lazily populated by reference
+ generated := make(map[*ast.File]bool)
- checkSwitchStatements(pass, inspect, comments)
- if fCheckMaps {
- checkMapLiterals(pass, inspect, comments)
- }
+ checkSwitchStatements(pass, inspect, comments, generated)
return nil, nil
}
diff --git a/vendor/github.com/nishanths/exhaustive/generated.go b/vendor/github.com/nishanths/exhaustive/generated.go
new file mode 100644
index 00000000000..19b4fb12ba9
--- /dev/null
+++ b/vendor/github.com/nishanths/exhaustive/generated.go
@@ -0,0 +1,34 @@
+package exhaustive
+
+import (
+ "go/ast"
+ "strings"
+)
+
+// Adapated from https://gotools.org/dmitri.shuralyov.com/go/generated
+
+func isGeneratedFile(file *ast.File) bool {
+ for _, c := range file.Comments {
+ for _, cc := range c.List {
+ s := cc.Text // "\n" already removed (see doc comment)
+ if len(s) >= 1 && s[len(s)-1] == '\r' {
+ s = s[:len(s)-1] // Trim "\r".
+ }
+ if containsGeneratedComment(s) {
+ return true
+ }
+ }
+ }
+
+ return false
+}
+
+func containsGeneratedComment(s string) bool {
+ return strings.HasPrefix(s, genCommentPrefix) &&
+ strings.HasSuffix(s, genCommentSuffix)
+}
+
+const (
+ genCommentPrefix = "// Code generated "
+ genCommentSuffix = " DO NOT EDIT."
+)
diff --git a/vendor/github.com/nishanths/exhaustive/go.mod b/vendor/github.com/nishanths/exhaustive/go.mod
index b15048eab4a..9a75e51525d 100644
--- a/vendor/github.com/nishanths/exhaustive/go.mod
+++ b/vendor/github.com/nishanths/exhaustive/go.mod
@@ -2,4 +2,4 @@ module github.com/nishanths/exhaustive
go 1.14
-require golang.org/x/tools v0.0.0-20200519015757-0d0afa43d58a
+require golang.org/x/tools v0.0.0-20201011145850-ed2f50202694
diff --git a/vendor/github.com/nishanths/exhaustive/go.sum b/vendor/github.com/nishanths/exhaustive/go.sum
index 01ba9996547..4f00a79ccab 100644
--- a/vendor/github.com/nishanths/exhaustive/go.sum
+++ b/vendor/github.com/nishanths/exhaustive/go.sum
@@ -1,21 +1,38 @@
+github.com/yuin/goldmark v1.1.27 h1:nqDD4MMMQA0lmWq03Z2/myGPYLQoXtmi0rGVs95ntbo=
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
+github.com/yuin/goldmark v1.2.1 h1:ruQGxdhGHe7FWOJPT0mKs5+pD2Xs1Bm/kdGlHO04FmM=
+github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
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/mod v0.2.0 h1:KU7oHjnv3XNWfa5COkzUifxZmxp1TyI7ImMXqFxLwvQ=
golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
+golang.org/x/mod v0.3.0 h1:RM4zey1++hCTbCVQfnWeKs9/IEsaBLA8vTkd0WVtmH4=
+golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
+golang.org/x/net v0.0.0-20200226121028-0de0cce0169b h1:0mm1VjtFUOIlE1SbDlwjYaDxZVDP2S5ou6y0gSgXHu8=
golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
+golang.org/x/net v0.0.0-20200822124328-c89045814202 h1:VvcQYSHwXgi7W+TpUR6A9g6Up98WAHf3f/ulnJ62IyA=
+golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e h1:vcxGaoTs7kV8m5Np9uUNQin4BrLOthgV7252N8V+FwY=
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208 h1:qwRHBd0NqMbJxfbotnDhm2ByMI1Shq4Y6oRJo21SGJA=
+golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
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/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20200519015757-0d0afa43d58a h1:gILuVKC+ZPD6g/tj6zBOdnOH1ZHI0zZ86+KLMogc6/s=
golang.org/x/tools v0.0.0-20200519015757-0d0afa43d58a/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
golang.org/x/tools v0.0.0-20200519142718-10921354bc51 h1:GtYAC9y+dpwWCXBwbcZgxcFfiqW4SI93yvQqpF+9+P8=
+golang.org/x/tools v0.0.0-20201011145850-ed2f50202694 h1:BANdcOVw3KTuUiyfDp7wrzCpkCe8UP3lowugJngxBTg=
+golang.org/x/tools v0.0.0-20201011145850-ed2f50202694/go.mod h1:z6u4i615ZeAfBE4XtMziQW1fSVJXACjjbWkB/mvPzlU=
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 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
+golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=
+golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
diff --git a/vendor/github.com/nishanths/exhaustive/map.go b/vendor/github.com/nishanths/exhaustive/map.go
deleted file mode 100644
index 6d875e32af5..00000000000
--- a/vendor/github.com/nishanths/exhaustive/map.go
+++ /dev/null
@@ -1,158 +0,0 @@
-package exhaustive
-
-import (
- "fmt"
- "go/ast"
- "go/token"
- "go/types"
- "sort"
- "strings"
-
- "golang.org/x/tools/go/analysis"
- "golang.org/x/tools/go/ast/astutil"
- "golang.org/x/tools/go/ast/inspector"
-)
-
-func checkMapLiterals(pass *analysis.Pass, inspect *inspector.Inspector, comments map[*ast.File]ast.CommentMap) {
- for _, f := range pass.Files {
- for _, d := range f.Decls {
- gen, ok := d.(*ast.GenDecl)
- if !ok {
- continue
- }
- if gen.Tok != token.VAR {
- continue // map literals have to be declared as "var"
- }
- for _, s := range gen.Specs {
- valueSpec := s.(*ast.ValueSpec)
- for idx, name := range valueSpec.Names {
- obj := pass.TypesInfo.Defs[name]
- if obj == nil {
- continue
- }
-
- mapType, ok := obj.Type().(*types.Map)
- if !ok {
- continue
- }
-
- keyType, ok := mapType.Key().(*types.Named)
- if !ok {
- continue
- }
- keyPkg := keyType.Obj().Pkg()
- if keyPkg == nil {
- // Doc comment: nil for labels and objects in the Universe scope.
- // This happens for the `error` type, for example.
- // Continuing would mean that ImportPackageFact panics.
- continue
- }
-
- var enums enumsFact
- if !pass.ImportPackageFact(keyPkg, &enums) {
- // Can't do anything further.
- continue
- }
-
- enumMembers, ok := enums.Entries[keyType.Obj().Name()]
- if !ok {
- // Key type is not a known enum.
- continue
- }
-
- // Check comments for the ignore directive.
-
- var allComments ast.CommentMap
- if cm, ok := comments[f]; ok {
- allComments = cm
- } else {
- allComments = ast.NewCommentMap(pass.Fset, f, f.Comments)
- comments[f] = allComments
- }
-
- genDeclComments := allComments.Filter(gen)
- genDeclIgnore := false
- for _, group := range genDeclComments.Comments() {
- if containsIgnoreDirective(group.List) && gen.Lparen == token.NoPos && len(gen.Specs) == 1 {
- genDeclIgnore = true
- break
- }
- }
- if genDeclIgnore {
- continue
- }
-
- if (valueSpec.Doc != nil && containsIgnoreDirective(valueSpec.Doc.List)) ||
- (valueSpec.Comment != nil && containsIgnoreDirective(valueSpec.Comment.List)) {
- continue
- }
-
- samePkg := keyPkg == pass.Pkg
- checkUnexported := samePkg
-
- hitlist := hitlistFromEnumMembers(enumMembers, checkUnexported)
- if len(hitlist) == 0 {
- // can happen if external package and enum consists only of
- // unexported members
- continue
- }
-
- if !(len(valueSpec.Values) > idx) {
- continue // no value for name
- }
- comp, ok := valueSpec.Values[idx].(*ast.CompositeLit)
- if !ok {
- continue
- }
- for _, el := range comp.Elts {
- kvExpr, ok := el.(*ast.KeyValueExpr)
- if !ok {
- continue
- }
- e := astutil.Unparen(kvExpr.Key)
- if samePkg {
- ident, ok := e.(*ast.Ident)
- if !ok {
- continue
- }
- delete(hitlist, ident.Name)
- } else {
- selExpr, ok := e.(*ast.SelectorExpr)
- if !ok {
- continue
- }
-
- // ensure X is package identifier
- ident, ok := selExpr.X.(*ast.Ident)
- if !ok {
- continue
- }
- if !isPackageNameIdentifier(pass, ident) {
- continue
- }
-
- delete(hitlist, selExpr.Sel.Name)
- }
- }
-
- if len(hitlist) > 0 {
- reportMapLiteral(pass, name, samePkg, keyType, hitlist)
- }
- }
- }
- }
- }
-}
-
-func reportMapLiteral(pass *analysis.Pass, mapVarIdent *ast.Ident, samePkg bool, enumType *types.Named, missingMembers map[string]struct{}) {
- missing := make([]string, 0, len(missingMembers))
- for m := range missingMembers {
- missing = append(missing, m)
- }
- sort.Strings(missing)
-
- pass.Report(analysis.Diagnostic{
- Pos: mapVarIdent.Pos(),
- Message: fmt.Sprintf("missing keys in map %s of key type %s: %s", mapVarIdent.Name, enumTypeName(enumType, samePkg), strings.Join(missing, ", ")),
- })
-}
diff --git a/vendor/github.com/nishanths/exhaustive/switch.go b/vendor/github.com/nishanths/exhaustive/switch.go
index 5889c293459..2cec7f9cb90 100644
--- a/vendor/github.com/nishanths/exhaustive/switch.go
+++ b/vendor/github.com/nishanths/exhaustive/switch.go
@@ -20,11 +20,33 @@ func isDefaultCase(c *ast.CaseClause) bool {
return c.List == nil // see doc comment on field
}
-func checkSwitchStatements(pass *analysis.Pass, inspect *inspector.Inspector, comments map[*ast.File]ast.CommentMap) {
+func checkSwitchStatements(
+ pass *analysis.Pass,
+ inspect *inspector.Inspector,
+ comments map[*ast.File]ast.CommentMap,
+ generated map[*ast.File]bool,
+) {
inspect.WithStack([]ast.Node{&ast.SwitchStmt{}}, func(n ast.Node, push bool, stack []ast.Node) bool {
if !push {
return true
}
+
+ file := stack[0].(*ast.File)
+
+ // Determine if file is a generated file, based on https://golang.org/s/generatedcode.
+ // If generated, don't check this file.
+ var isGenerated bool
+ if gen, ok := generated[file]; ok {
+ isGenerated = gen
+ } else {
+ isGenerated = isGeneratedFile(file)
+ generated[file] = isGenerated
+ }
+ if isGenerated && !fCheckGeneratedFiles {
+ // don't check
+ return true
+ }
+
sw := n.(*ast.SwitchStmt)
if sw.Tag == nil {
return true
@@ -52,14 +74,13 @@ func checkSwitchStatements(pass *analysis.Pass, inspect *inspector.Inspector, co
return true
}
- enumMembers, isEnum := enums.Entries[tagType.Obj().Name()]
+ em, isEnum := enums.Enums[tagType.Obj().Name()]
if !isEnum {
// Tag's type is not a known enum.
return true
}
// Get comment map.
- file := stack[0].(*ast.File)
var allComments ast.CommentMap
if cm, ok := comments[file]; ok {
allComments = cm
@@ -78,7 +99,7 @@ func checkSwitchStatements(pass *analysis.Pass, inspect *inspector.Inspector, co
samePkg := tagPkg == pass.Pkg
checkUnexported := samePkg
- hitlist := hitlistFromEnumMembers(enumMembers, checkUnexported)
+ hitlist := hitlistFromEnumMembers(em, checkUnexported)
if len(hitlist) == 0 {
// can happen if external package and enum consists only of
// unexported members
@@ -99,7 +120,7 @@ func checkSwitchStatements(pass *analysis.Pass, inspect *inspector.Inspector, co
if !ok {
continue
}
- delete(hitlist, ident.Name)
+ updateHitlist(hitlist, em, ident.Name)
} else {
selExpr, ok := e.(*ast.SelectorExpr)
if !ok {
@@ -115,7 +136,7 @@ func checkSwitchStatements(pass *analysis.Pass, inspect *inspector.Inspector, co
continue
}
- delete(hitlist, selExpr.Sel.Name)
+ updateHitlist(hitlist, em, selExpr.Sel.Name)
}
}
}
@@ -124,12 +145,27 @@ func checkSwitchStatements(pass *analysis.Pass, inspect *inspector.Inspector, co
shouldReport := len(hitlist) > 0 && !defaultSuffices
if shouldReport {
- reportSwitch(pass, sw, samePkg, tagType, hitlist, defaultCaseExists, file)
+ reportSwitch(pass, sw, samePkg, tagType, em, hitlist, defaultCaseExists, file)
}
return true
})
}
+func updateHitlist(hitlist map[string]struct{}, em *enumMembers, foundName string) {
+ constVal, ok := em.NameToValue[foundName]
+ if !ok {
+ // only delete the name alone from hitlist
+ delete(hitlist, foundName)
+ return
+ }
+
+ // delete all of the same-valued names from hitlist
+ namesToDelete := em.ValueToNames[constVal]
+ for _, n := range namesToDelete {
+ delete(hitlist, n)
+ }
+}
+
func isPackageNameIdentifier(pass *analysis.Pass, ident *ast.Ident) bool {
obj := pass.TypesInfo.ObjectOf(ident)
if obj == nil {
@@ -139,26 +175,54 @@ func isPackageNameIdentifier(pass *analysis.Pass, ident *ast.Ident) bool {
return ok
}
-func hitlistFromEnumMembers(enumMembers []string, checkUnexported bool) map[string]struct{} {
+func hitlistFromEnumMembers(em *enumMembers, checkUnexported bool) map[string]struct{} {
hitlist := make(map[string]struct{})
- for _, m := range enumMembers {
+ for _, m := range em.OrderedNames {
if m == "_" {
// blank identifier is often used to skip entries in iota lists
continue
}
- if ast.IsExported(m) || checkUnexported {
- hitlist[m] = struct{}{}
+ if !ast.IsExported(m) && !checkUnexported {
+ continue
}
+ hitlist[m] = struct{}{}
}
return hitlist
}
-func reportSwitch(pass *analysis.Pass, sw *ast.SwitchStmt, samePkg bool, enumType *types.Named, missingMembers map[string]struct{}, defaultCaseExists bool, f *ast.File) {
- missing := make([]string, 0, len(missingMembers))
+func determineMissingOutput(missingMembers map[string]struct{}, em *enumMembers) []string {
+ constValMembers := make(map[string][]string) // value -> names
+ var otherMembers []string // non-constant value names
+
for m := range missingMembers {
- missing = append(missing, m)
+ if constVal, ok := em.NameToValue[m]; ok {
+ constValMembers[constVal] = append(constValMembers[constVal], m)
+ } else {
+ otherMembers = append(otherMembers, m)
+ }
}
- sort.Strings(missing)
+
+ missingOutput := make([]string, 0, len(constValMembers)+len(otherMembers))
+ for _, names := range constValMembers {
+ sort.Strings(names)
+ missingOutput = append(missingOutput, strings.Join(names, "|"))
+ }
+ missingOutput = append(missingOutput, otherMembers...)
+ sort.Strings(missingOutput)
+ return missingOutput
+}
+
+func reportSwitch(
+ pass *analysis.Pass,
+ sw *ast.SwitchStmt,
+ samePkg bool,
+ enumType *types.Named,
+ em *enumMembers,
+ missingMembers map[string]struct{},
+ defaultCaseExists bool,
+ f *ast.File,
+) {
+ missingOutput := determineMissingOutput(missingMembers, em)
var fixes []analysis.SuggestedFix
if !defaultCaseExists {
@@ -170,7 +234,7 @@ func reportSwitch(pass *analysis.Pass, sw *ast.SwitchStmt, samePkg bool, enumTyp
pass.Report(analysis.Diagnostic{
Pos: sw.Pos(),
End: sw.End(),
- Message: fmt.Sprintf("missing cases in switch of type %s: %s", enumTypeName(enumType, samePkg), strings.Join(missing, ", ")),
+ Message: fmt.Sprintf("missing cases in switch of type %s: %s", enumTypeName(enumType, samePkg), strings.Join(missingOutput, ", ")),
SuggestedFixes: fixes,
})
}
diff --git a/vendor/github.com/openshift/api/LICENSE b/vendor/github.com/openshift/api/LICENSE
index 8dada3edaf5..5c389317ecc 100644
--- a/vendor/github.com/openshift/api/LICENSE
+++ b/vendor/github.com/openshift/api/LICENSE
@@ -1,3 +1,4 @@
+
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
@@ -175,18 +176,7 @@
END OF TERMS AND CONDITIONS
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "{}"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright {yyyy} {name of copyright owner}
+ Copyright 2020 Red Hat, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
diff --git a/vendor/github.com/openshift/api/apps/v1/generated.pb.go b/vendor/github.com/openshift/api/apps/v1/generated.pb.go
index 4ade112e2c4..36d83656a39 100644
--- a/vendor/github.com/openshift/api/apps/v1/generated.pb.go
+++ b/vendor/github.com/openshift/api/apps/v1/generated.pb.go
@@ -31,7 +31,7 @@ var _ = math.Inf
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
-const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
+const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
func (m *CustomDeploymentStrategyParams) Reset() { *m = CustomDeploymentStrategyParams{} }
func (*CustomDeploymentStrategyParams) ProtoMessage() {}
@@ -3249,10 +3249,7 @@ func (m *CustomDeploymentStrategyParams) Unmarshal(dAtA []byte) error {
if err != nil {
return err
}
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) < 0 {
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > l {
@@ -3370,10 +3367,7 @@ func (m *DeploymentCause) Unmarshal(dAtA []byte) error {
if err != nil {
return err
}
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) < 0 {
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > l {
@@ -3456,10 +3450,7 @@ func (m *DeploymentCauseImageTrigger) Unmarshal(dAtA []byte) error {
if err != nil {
return err
}
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) < 0 {
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > l {
@@ -3703,10 +3694,7 @@ func (m *DeploymentCondition) Unmarshal(dAtA []byte) error {
if err != nil {
return err
}
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) < 0 {
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > l {
@@ -3855,10 +3843,7 @@ func (m *DeploymentConfig) Unmarshal(dAtA []byte) error {
if err != nil {
return err
}
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) < 0 {
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > l {
@@ -3975,10 +3960,7 @@ func (m *DeploymentConfigList) Unmarshal(dAtA []byte) error {
if err != nil {
return err
}
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) < 0 {
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > l {
@@ -4170,7 +4152,7 @@ func (m *DeploymentConfigRollback) Unmarshal(dAtA []byte) error {
if err != nil {
return err
}
- if skippy < 0 {
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > postIndex {
@@ -4220,10 +4202,7 @@ func (m *DeploymentConfigRollback) Unmarshal(dAtA []byte) error {
if err != nil {
return err
}
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) < 0 {
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > l {
@@ -4405,10 +4384,7 @@ func (m *DeploymentConfigRollbackSpec) Unmarshal(dAtA []byte) error {
if err != nil {
return err
}
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) < 0 {
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > l {
@@ -4716,7 +4692,7 @@ func (m *DeploymentConfigSpec) Unmarshal(dAtA []byte) error {
if err != nil {
return err
}
- if skippy < 0 {
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > postIndex {
@@ -4788,10 +4764,7 @@ func (m *DeploymentConfigSpec) Unmarshal(dAtA []byte) error {
if err != nil {
return err
}
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) < 0 {
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > l {
@@ -5044,10 +5017,7 @@ func (m *DeploymentConfigStatus) Unmarshal(dAtA []byte) error {
if err != nil {
return err
}
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) < 0 {
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > l {
@@ -5163,10 +5133,7 @@ func (m *DeploymentDetails) Unmarshal(dAtA []byte) error {
if err != nil {
return err
}
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) < 0 {
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > l {
@@ -5216,10 +5183,7 @@ func (m *DeploymentLog) Unmarshal(dAtA []byte) error {
if err != nil {
return err
}
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) < 0 {
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > l {
@@ -5497,10 +5461,7 @@ func (m *DeploymentLogOptions) Unmarshal(dAtA []byte) error {
if err != nil {
return err
}
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) < 0 {
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > l {
@@ -5654,10 +5615,7 @@ func (m *DeploymentRequest) Unmarshal(dAtA []byte) error {
if err != nil {
return err
}
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) < 0 {
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > l {
@@ -5990,7 +5948,7 @@ func (m *DeploymentStrategy) Unmarshal(dAtA []byte) error {
if err != nil {
return err
}
- if skippy < 0 {
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > postIndex {
@@ -6117,7 +6075,7 @@ func (m *DeploymentStrategy) Unmarshal(dAtA []byte) error {
if err != nil {
return err
}
- if skippy < 0 {
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > postIndex {
@@ -6154,10 +6112,7 @@ func (m *DeploymentStrategy) Unmarshal(dAtA []byte) error {
if err != nil {
return err
}
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) < 0 {
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > l {
@@ -6324,10 +6279,7 @@ func (m *DeploymentTriggerImageChangeParams) Unmarshal(dAtA []byte) error {
if err != nil {
return err
}
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) < 0 {
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > l {
@@ -6411,10 +6363,7 @@ func (m *DeploymentTriggerPolicies) Unmarshal(dAtA []byte) error {
if err != nil {
return err
}
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) < 0 {
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > l {
@@ -6532,10 +6481,7 @@ func (m *DeploymentTriggerPolicy) Unmarshal(dAtA []byte) error {
if err != nil {
return err
}
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) < 0 {
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > l {
@@ -6715,10 +6661,7 @@ func (m *ExecNewPodHook) Unmarshal(dAtA []byte) error {
if err != nil {
return err
}
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) < 0 {
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > l {
@@ -6870,10 +6813,7 @@ func (m *LifecycleHook) Unmarshal(dAtA []byte) error {
if err != nil {
return err
}
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) < 0 {
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > l {
@@ -7051,10 +6991,7 @@ func (m *RecreateDeploymentStrategyParams) Unmarshal(dAtA []byte) error {
if err != nil {
return err
}
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) < 0 {
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > l {
@@ -7308,10 +7245,7 @@ func (m *RollingDeploymentStrategyParams) Unmarshal(dAtA []byte) error {
if err != nil {
return err
}
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) < 0 {
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > l {
@@ -7426,10 +7360,7 @@ func (m *TagImageHook) Unmarshal(dAtA []byte) error {
if err != nil {
return err
}
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) < 0 {
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > l {
@@ -7447,6 +7378,7 @@ func (m *TagImageHook) Unmarshal(dAtA []byte) error {
func skipGenerated(dAtA []byte) (n int, err error) {
l := len(dAtA)
iNdEx := 0
+ depth := 0
for iNdEx < l {
var wire uint64
for shift := uint(0); ; shift += 7 {
@@ -7478,10 +7410,8 @@ func skipGenerated(dAtA []byte) (n int, err error) {
break
}
}
- return iNdEx, nil
case 1:
iNdEx += 8
- return iNdEx, nil
case 2:
var length int
for shift := uint(0); ; shift += 7 {
@@ -7502,55 +7432,30 @@ func skipGenerated(dAtA []byte) (n int, err error) {
return 0, ErrInvalidLengthGenerated
}
iNdEx += length
- if iNdEx < 0 {
- return 0, ErrInvalidLengthGenerated
- }
- return iNdEx, nil
case 3:
- for {
- var innerWire uint64
- var start int = iNdEx
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- innerWire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- innerWireType := int(innerWire & 0x7)
- if innerWireType == 4 {
- break
- }
- next, err := skipGenerated(dAtA[start:])
- if err != nil {
- return 0, err
- }
- iNdEx = start + next
- if iNdEx < 0 {
- return 0, ErrInvalidLengthGenerated
- }
- }
- return iNdEx, nil
+ depth++
case 4:
- return iNdEx, nil
+ if depth == 0 {
+ return 0, ErrUnexpectedEndOfGroupGenerated
+ }
+ depth--
case 5:
iNdEx += 4
- return iNdEx, nil
default:
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
}
+ if iNdEx < 0 {
+ return 0, ErrInvalidLengthGenerated
+ }
+ if depth == 0 {
+ return iNdEx, nil
+ }
}
- panic("unreachable")
+ return 0, io.ErrUnexpectedEOF
}
var (
- ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling")
- ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow")
+ ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling")
+ ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow")
+ ErrUnexpectedEndOfGroupGenerated = fmt.Errorf("proto: unexpected end of group")
)
diff --git a/vendor/github.com/openshift/api/apps/v1/generated.proto b/vendor/github.com/openshift/api/apps/v1/generated.proto
index b412aad7653..464ed9a516c 100644
--- a/vendor/github.com/openshift/api/apps/v1/generated.proto
+++ b/vendor/github.com/openshift/api/apps/v1/generated.proto
@@ -1,7 +1,7 @@
// This file was autogenerated by go-to-protobuf. Do not edit it manually!
-syntax = 'proto2';
+syntax = "proto2";
package github.com.openshift.api.apps.v1;
@@ -79,6 +79,7 @@ message DeploymentConfig {
optional DeploymentConfigSpec spec = 2;
// Status represents the current deployment state.
+ // +optional
optional DeploymentConfigStatus status = 3;
}
@@ -282,6 +283,7 @@ message DeploymentRequest {
// DeploymentStrategy describes how to perform a deployment.
message DeploymentStrategy {
// Type is the name of a deployment strategy.
+ // +optional
optional string type = 1;
// CustomParams are the input to the Custom deployment strategy, and may also
diff --git a/vendor/github.com/openshift/api/apps/v1/types.go b/vendor/github.com/openshift/api/apps/v1/types.go
index 02e03984946..2a2a7e7b5d0 100644
--- a/vendor/github.com/openshift/api/apps/v1/types.go
+++ b/vendor/github.com/openshift/api/apps/v1/types.go
@@ -32,6 +32,7 @@ type DeploymentConfig struct {
Spec DeploymentConfigSpec `json:"spec" protobuf:"bytes,2,opt,name=spec"`
// Status represents the current deployment state.
+ // +optional
Status DeploymentConfigStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
}
@@ -82,6 +83,7 @@ type DeploymentConfigSpec struct {
// DeploymentStrategy describes how to perform a deployment.
type DeploymentStrategy struct {
// Type is the name of a deployment strategy.
+ // +optional
Type DeploymentStrategyType `json:"type,omitempty" protobuf:"bytes,1,opt,name=type,casttype=DeploymentStrategyType"`
// CustomParams are the input to the Custom deployment strategy, and may also
diff --git a/vendor/github.com/openshift/api/authorization/v1/0000_03_authorization-openshift_01_rolebindingrestriction.crd.yaml b/vendor/github.com/openshift/api/authorization/v1/0000_03_authorization-openshift_01_rolebindingrestriction.crd.yaml
index cbbe69d2841..d1656be7927 100644
--- a/vendor/github.com/openshift/api/authorization/v1/0000_03_authorization-openshift_01_rolebindingrestriction.crd.yaml
+++ b/vendor/github.com/openshift/api/authorization/v1/0000_03_authorization-openshift_01_rolebindingrestriction.crd.yaml
@@ -1,6 +1,11 @@
-apiVersion: apiextensions.k8s.io/v1beta1
+apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
+ annotations:
+ api-approved.openshift.io: https://github.com/openshift/api/pull/470
+ include.release.openshift.io/ibm-cloud-managed: "true"
+ include.release.openshift.io/self-managed-high-availability: "true"
+ include.release.openshift.io/single-node-developer: "true"
name: rolebindingrestrictions.authorization.openshift.io
spec:
group: authorization.openshift.io
@@ -10,196 +15,142 @@ spec:
plural: rolebindingrestrictions
singular: rolebindingrestriction
scope: Namespaced
- preserveUnknownFields: false
versions:
- - name: v1
- served: true
- storage: true
- "validation":
- "openAPIV3Schema":
- description: RoleBindingRestriction is an object that can be matched against
- a subject (user, group, or service account) to determine whether rolebindings
- on that subject are allowed in the namespace to which the RoleBindingRestriction
- belongs. If any one of those RoleBindingRestriction objects matches a subject,
- rolebindings on that subject in the namespace are allowed.
- type: object
- properties:
- apiVersion:
- description: 'APIVersion defines the versioned schema of this representation
- of an object. Servers should convert recognized schemas to the latest
- internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
- type: string
- kind:
- description: 'Kind is a string value representing the REST resource this
- object represents. Servers may infer this from the endpoint the client
- submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
- type: string
- metadata:
- type: object
- spec:
- description: Spec defines the matcher.
+ - name: v1
+ schema:
+ openAPIV3Schema:
+ description: RoleBindingRestriction is an object that can be matched against a subject (user, group, or service account) to determine whether rolebindings on that subject are allowed in the namespace to which the RoleBindingRestriction belongs. If any one of those RoleBindingRestriction objects matches a subject, rolebindings on that subject in the namespace are allowed.
type: object
properties:
- grouprestriction:
- description: GroupRestriction matches against group subjects.
+ apiVersion:
+ description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
+ type: string
+ kind:
+ description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
+ type: string
+ metadata:
type: object
- properties:
- groups:
- description: Groups is a list of groups used to match against an
- individual user's groups. If the user is a member of one of the
- whitelisted groups, the user is allowed to be bound to a role.
- type: array
- items:
- type: string
- nullable: true
- labels:
- description: Selectors specifies a list of label selectors over
- group labels.
- type: array
- items:
- description: A label selector is a label query over a set of resources.
- The result of matchLabels and matchExpressions are ANDed. An
- empty label selector matches all objects. A null label selector
- matches no objects.
- type: object
- properties:
- matchExpressions:
- description: matchExpressions is a list of label selector
- requirements. The requirements are ANDed.
- type: array
- items:
- description: A label selector requirement is a selector
- that contains values, a key, and an operator that relates
- the key and values.
- type: object
- required:
- - key
- - operator
- properties:
- key:
- description: key is the label key that the selector
- applies to.
- type: string
- operator:
- description: operator represents a key's relationship
- to a set of values. Valid operators are In, NotIn,
- Exists and DoesNotExist.
- type: string
- values:
- description: values is an array of string values. If
- the operator is In or NotIn, the values array must
- be non-empty. If the operator is Exists or DoesNotExist,
- the values array must be empty. This array is replaced
- during a strategic merge patch.
- type: array
- items:
- type: string
- matchLabels:
- description: matchLabels is a map of {key,value} pairs. A
- single {key,value} in the matchLabels map is equivalent
- to an element of matchExpressions, whose key field is "key",
- the operator is "In", and the values array contains only
- "value". The requirements are ANDed.
- type: object
- additionalProperties:
- type: string
- nullable: true
- nullable: true
- serviceaccountrestriction:
- description: ServiceAccountRestriction matches against service-account
- subjects.
+ spec:
+ description: Spec defines the matcher.
type: object
properties:
- namespaces:
- description: Namespaces specifies a list of literal namespace names.
- type: array
- items:
- type: string
- serviceaccounts:
- description: ServiceAccounts specifies a list of literal service-account
- names.
- type: array
- items:
- description: ServiceAccountReference specifies a service account
- and namespace by their names.
- type: object
- properties:
- name:
- description: Name is the name of the service account.
+ grouprestriction:
+ description: GroupRestriction matches against group subjects.
+ type: object
+ properties:
+ groups:
+ description: Groups is a list of groups used to match against an individual user's groups. If the user is a member of one of the whitelisted groups, the user is allowed to be bound to a role.
+ type: array
+ items:
type: string
- namespace:
- description: Namespace is the namespace of the service account. Service
- accounts from inside the whitelisted namespaces are allowed
- to be bound to roles. If Namespace is empty, then the namespace
- of the RoleBindingRestriction in which the ServiceAccountReference
- is embedded is used.
+ nullable: true
+ labels:
+ description: Selectors specifies a list of label selectors over group labels.
+ type: array
+ items:
+ description: A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects.
+ type: object
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of label selector requirements. The requirements are ANDed.
+ type: array
+ items:
+ description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.
+ type: object
+ required:
+ - key
+ - operator
+ properties:
+ key:
+ description: key is the label key that the selector applies to.
+ type: string
+ operator:
+ description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
+ type: string
+ values:
+ description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
+ type: array
+ items:
+ type: string
+ matchLabels:
+ description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.
+ type: object
+ additionalProperties:
+ type: string
+ nullable: true
+ nullable: true
+ serviceaccountrestriction:
+ description: ServiceAccountRestriction matches against service-account subjects.
+ type: object
+ properties:
+ namespaces:
+ description: Namespaces specifies a list of literal namespace names.
+ type: array
+ items:
type: string
- nullable: true
- userrestriction:
- description: UserRestriction matches against user subjects.
- type: object
- properties:
- groups:
- description: Groups specifies a list of literal group names.
- type: array
- items:
- type: string
+ serviceaccounts:
+ description: ServiceAccounts specifies a list of literal service-account names.
+ type: array
+ items:
+ description: ServiceAccountReference specifies a service account and namespace by their names.
+ type: object
+ properties:
+ name:
+ description: Name is the name of the service account.
+ type: string
+ namespace:
+ description: Namespace is the namespace of the service account. Service accounts from inside the whitelisted namespaces are allowed to be bound to roles. If Namespace is empty, then the namespace of the RoleBindingRestriction in which the ServiceAccountReference is embedded is used.
+ type: string
nullable: true
- labels:
- description: Selectors specifies a list of label selectors over
- user labels.
- type: array
- items:
- description: A label selector is a label query over a set of resources.
- The result of matchLabels and matchExpressions are ANDed. An
- empty label selector matches all objects. A null label selector
- matches no objects.
- type: object
- properties:
- matchExpressions:
- description: matchExpressions is a list of label selector
- requirements. The requirements are ANDed.
- type: array
- items:
- description: A label selector requirement is a selector
- that contains values, a key, and an operator that relates
- the key and values.
- type: object
- required:
- - key
- - operator
- properties:
- key:
- description: key is the label key that the selector
- applies to.
- type: string
- operator:
- description: operator represents a key's relationship
- to a set of values. Valid operators are In, NotIn,
- Exists and DoesNotExist.
- type: string
- values:
- description: values is an array of string values. If
- the operator is In or NotIn, the values array must
- be non-empty. If the operator is Exists or DoesNotExist,
- the values array must be empty. This array is replaced
- during a strategic merge patch.
- type: array
- items:
- type: string
- matchLabels:
- description: matchLabels is a map of {key,value} pairs. A
- single {key,value} in the matchLabels map is equivalent
- to an element of matchExpressions, whose key field is "key",
- the operator is "In", and the values array contains only
- "value". The requirements are ANDed.
+ userrestriction:
+ description: UserRestriction matches against user subjects.
+ type: object
+ properties:
+ groups:
+ description: Groups specifies a list of literal group names.
+ type: array
+ items:
+ type: string
+ nullable: true
+ labels:
+ description: Selectors specifies a list of label selectors over user labels.
+ type: array
+ items:
+ description: A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects.
type: object
- additionalProperties:
- type: string
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of label selector requirements. The requirements are ANDed.
+ type: array
+ items:
+ description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.
+ type: object
+ required:
+ - key
+ - operator
+ properties:
+ key:
+ description: key is the label key that the selector applies to.
+ type: string
+ operator:
+ description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
+ type: string
+ values:
+ description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
+ type: array
+ items:
+ type: string
+ matchLabels:
+ description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.
+ type: object
+ additionalProperties:
+ type: string
+ nullable: true
+ users:
+ description: Users specifies a list of literal user names.
+ type: array
+ items:
+ type: string
nullable: true
- users:
- description: Users specifies a list of literal user names.
- type: array
- items:
- type: string
- nullable: true
+ served: true
+ storage: true
diff --git a/vendor/github.com/openshift/api/authorization/v1/generated.pb.go b/vendor/github.com/openshift/api/authorization/v1/generated.pb.go
index b18c5cfff04..93294acc9ae 100644
--- a/vendor/github.com/openshift/api/authorization/v1/generated.pb.go
+++ b/vendor/github.com/openshift/api/authorization/v1/generated.pb.go
@@ -28,7 +28,7 @@ var _ = math.Inf
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
-const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
+const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
func (m *Action) Reset() { *m = Action{} }
func (*Action) ProtoMessage() {}
@@ -4267,10 +4267,7 @@ func (m *Action) Unmarshal(dAtA []byte) error {
if err != nil {
return err
}
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) < 0 {
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > l {
@@ -4423,10 +4420,7 @@ func (m *ClusterRole) Unmarshal(dAtA []byte) error {
if err != nil {
return err
}
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) < 0 {
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > l {
@@ -4648,10 +4642,7 @@ func (m *ClusterRoleBinding) Unmarshal(dAtA []byte) error {
if err != nil {
return err
}
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) < 0 {
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > l {
@@ -4768,10 +4759,7 @@ func (m *ClusterRoleBindingList) Unmarshal(dAtA []byte) error {
if err != nil {
return err
}
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) < 0 {
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > l {
@@ -4888,10 +4876,7 @@ func (m *ClusterRoleList) Unmarshal(dAtA []byte) error {
if err != nil {
return err
}
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) < 0 {
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > l {
@@ -5007,10 +4992,7 @@ func (m *GroupRestriction) Unmarshal(dAtA []byte) error {
if err != nil {
return err
}
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) < 0 {
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > l {
@@ -5060,10 +5042,7 @@ func (m *IsPersonalSubjectAccessReview) Unmarshal(dAtA []byte) error {
if err != nil {
return err
}
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) < 0 {
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > l {
@@ -5146,10 +5125,7 @@ func (m *LocalResourceAccessReview) Unmarshal(dAtA []byte) error {
if err != nil {
return err
}
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) < 0 {
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > l {
@@ -5332,10 +5308,7 @@ func (m *LocalSubjectAccessReview) Unmarshal(dAtA []byte) error {
if err != nil {
return err
}
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) < 0 {
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > l {
@@ -5450,10 +5423,7 @@ func (m *NamedClusterRole) Unmarshal(dAtA []byte) error {
if err != nil {
return err
}
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) < 0 {
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > l {
@@ -5568,10 +5538,7 @@ func (m *NamedClusterRoleBinding) Unmarshal(dAtA []byte) error {
if err != nil {
return err
}
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) < 0 {
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > l {
@@ -5686,10 +5653,7 @@ func (m *NamedRole) Unmarshal(dAtA []byte) error {
if err != nil {
return err
}
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) < 0 {
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > l {
@@ -5804,10 +5768,7 @@ func (m *NamedRoleBinding) Unmarshal(dAtA []byte) error {
if err != nil {
return err
}
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) < 0 {
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > l {
@@ -5889,10 +5850,7 @@ func (m *OptionalNames) Unmarshal(dAtA []byte) error {
if err != nil {
return err
}
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) < 0 {
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > l {
@@ -5974,10 +5932,7 @@ func (m *OptionalScopes) Unmarshal(dAtA []byte) error {
if err != nil {
return err
}
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) < 0 {
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > l {
@@ -6220,10 +6175,7 @@ func (m *PolicyRule) Unmarshal(dAtA []byte) error {
if err != nil {
return err
}
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) < 0 {
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > l {
@@ -6306,10 +6258,7 @@ func (m *ResourceAccessReview) Unmarshal(dAtA []byte) error {
if err != nil {
return err
}
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) < 0 {
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > l {
@@ -6487,10 +6436,7 @@ func (m *ResourceAccessReviewResponse) Unmarshal(dAtA []byte) error {
if err != nil {
return err
}
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) < 0 {
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > l {
@@ -6607,10 +6553,7 @@ func (m *Role) Unmarshal(dAtA []byte) error {
if err != nil {
return err
}
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) < 0 {
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > l {
@@ -6832,10 +6775,7 @@ func (m *RoleBinding) Unmarshal(dAtA []byte) error {
if err != nil {
return err
}
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) < 0 {
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > l {
@@ -6952,10 +6892,7 @@ func (m *RoleBindingList) Unmarshal(dAtA []byte) error {
if err != nil {
return err
}
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) < 0 {
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > l {
@@ -7071,10 +7008,7 @@ func (m *RoleBindingRestriction) Unmarshal(dAtA []byte) error {
if err != nil {
return err
}
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) < 0 {
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > l {
@@ -7191,10 +7125,7 @@ func (m *RoleBindingRestrictionList) Unmarshal(dAtA []byte) error {
if err != nil {
return err
}
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) < 0 {
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > l {
@@ -7352,10 +7283,7 @@ func (m *RoleBindingRestrictionSpec) Unmarshal(dAtA []byte) error {
if err != nil {
return err
}
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) < 0 {
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > l {
@@ -7472,10 +7400,7 @@ func (m *RoleList) Unmarshal(dAtA []byte) error {
if err != nil {
return err
}
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) < 0 {
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > l {
@@ -7591,10 +7516,7 @@ func (m *SelfSubjectRulesReview) Unmarshal(dAtA []byte) error {
if err != nil {
return err
}
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) < 0 {
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > l {
@@ -7680,10 +7602,7 @@ func (m *SelfSubjectRulesReviewSpec) Unmarshal(dAtA []byte) error {
if err != nil {
return err
}
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) < 0 {
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > l {
@@ -7797,10 +7716,7 @@ func (m *ServiceAccountReference) Unmarshal(dAtA []byte) error {
if err != nil {
return err
}
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) < 0 {
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > l {
@@ -7916,10 +7832,7 @@ func (m *ServiceAccountRestriction) Unmarshal(dAtA []byte) error {
if err != nil {
return err
}
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) < 0 {
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > l {
@@ -8102,10 +8015,7 @@ func (m *SubjectAccessReview) Unmarshal(dAtA []byte) error {
if err != nil {
return err
}
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) < 0 {
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > l {
@@ -8271,10 +8181,7 @@ func (m *SubjectAccessReviewResponse) Unmarshal(dAtA []byte) error {
if err != nil {
return err
}
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) < 0 {
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > l {
@@ -8390,10 +8297,7 @@ func (m *SubjectRulesReview) Unmarshal(dAtA []byte) error {
if err != nil {
return err
}
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) < 0 {
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > l {
@@ -8543,10 +8447,7 @@ func (m *SubjectRulesReviewSpec) Unmarshal(dAtA []byte) error {
if err != nil {
return err
}
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) < 0 {
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > l {
@@ -8662,10 +8563,7 @@ func (m *SubjectRulesReviewStatus) Unmarshal(dAtA []byte) error {
if err != nil {
return err
}
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) < 0 {
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > l {
@@ -8813,10 +8711,7 @@ func (m *UserRestriction) Unmarshal(dAtA []byte) error {
if err != nil {
return err
}
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) < 0 {
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > l {
@@ -8834,6 +8729,7 @@ func (m *UserRestriction) Unmarshal(dAtA []byte) error {
func skipGenerated(dAtA []byte) (n int, err error) {
l := len(dAtA)
iNdEx := 0
+ depth := 0
for iNdEx < l {
var wire uint64
for shift := uint(0); ; shift += 7 {
@@ -8865,10 +8761,8 @@ func skipGenerated(dAtA []byte) (n int, err error) {
break
}
}
- return iNdEx, nil
case 1:
iNdEx += 8
- return iNdEx, nil
case 2:
var length int
for shift := uint(0); ; shift += 7 {
@@ -8889,55 +8783,30 @@ func skipGenerated(dAtA []byte) (n int, err error) {
return 0, ErrInvalidLengthGenerated
}
iNdEx += length
- if iNdEx < 0 {
- return 0, ErrInvalidLengthGenerated
- }
- return iNdEx, nil
case 3:
- for {
- var innerWire uint64
- var start int = iNdEx
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- innerWire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- innerWireType := int(innerWire & 0x7)
- if innerWireType == 4 {
- break
- }
- next, err := skipGenerated(dAtA[start:])
- if err != nil {
- return 0, err
- }
- iNdEx = start + next
- if iNdEx < 0 {
- return 0, ErrInvalidLengthGenerated
- }
- }
- return iNdEx, nil
+ depth++
case 4:
- return iNdEx, nil
+ if depth == 0 {
+ return 0, ErrUnexpectedEndOfGroupGenerated
+ }
+ depth--
case 5:
iNdEx += 4
- return iNdEx, nil
default:
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
}
+ if iNdEx < 0 {
+ return 0, ErrInvalidLengthGenerated
+ }
+ if depth == 0 {
+ return iNdEx, nil
+ }
}
- panic("unreachable")
+ return 0, io.ErrUnexpectedEOF
}
var (
- ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling")
- ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow")
+ ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling")
+ ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow")
+ ErrUnexpectedEndOfGroupGenerated = fmt.Errorf("proto: unexpected end of group")
)
diff --git a/vendor/github.com/openshift/api/authorization/v1/generated.proto b/vendor/github.com/openshift/api/authorization/v1/generated.proto
index dc194e85a1d..5bf2e5df665 100644
--- a/vendor/github.com/openshift/api/authorization/v1/generated.proto
+++ b/vendor/github.com/openshift/api/authorization/v1/generated.proto
@@ -1,7 +1,7 @@
// This file was autogenerated by go-to-protobuf. Do not edit it manually!
-syntax = 'proto2';
+syntax = "proto2";
package github.com.openshift.api.authorization.v1;
@@ -39,7 +39,7 @@ message Action {
// Path is the path of a non resource URL
optional string path = 8;
- // IsNonResourceURL is true if this is a request for a non-resource URL (outside of the resource hieraarchy)
+ // IsNonResourceURL is true if this is a request for a non-resource URL (outside of the resource hierarchy)
optional bool isNonResourceURL = 9;
// Content is the actual content of the request for create and update
@@ -70,12 +70,14 @@ message ClusterRoleBinding {
// This field should only be specified when supporting legacy clients and servers.
// See Subjects for further details.
// +k8s:conversion-gen=false
+ // +optional
optional OptionalNames userNames = 2;
// GroupNames holds all the groups directly bound to the role.
// This field should only be specified when supporting legacy clients and servers.
// See Subjects for further details.
// +k8s:conversion-gen=false
+ // +optional
optional OptionalNames groupNames = 3;
// Subjects hold object references to authorize with this rule.
@@ -218,6 +220,8 @@ message PolicyRule {
// APIGroups is the name of the APIGroup that contains the resources. If this field is empty, then both kubernetes and origin API groups are assumed.
// That means that if an action is requested against one of the enumerated resources in either the kubernetes or the origin API group, the request
// will be allowed
+ // +optional
+ // +nullable
repeated string apiGroups = 3;
// Resources is a list of resources this rule applies to. ResourceAll represents all resources.
@@ -275,12 +279,14 @@ message RoleBinding {
// This field should only be specified when supporting legacy clients and servers.
// See Subjects for further details.
// +k8s:conversion-gen=false
+ // +optional
optional OptionalNames userNames = 2;
// GroupNames holds all the groups directly bound to the role.
// This field should only be specified when supporting legacy clients and servers.
// See Subjects for further details.
// +k8s:conversion-gen=false
+ // +optional
optional OptionalNames groupNames = 3;
// Subjects hold object references to authorize with this rule.
diff --git a/vendor/github.com/openshift/api/authorization/v1/types.go b/vendor/github.com/openshift/api/authorization/v1/types.go
index 2fd7edf030d..355d2f3120d 100644
--- a/vendor/github.com/openshift/api/authorization/v1/types.go
+++ b/vendor/github.com/openshift/api/authorization/v1/types.go
@@ -37,7 +37,9 @@ type PolicyRule struct {
// APIGroups is the name of the APIGroup that contains the resources. If this field is empty, then both kubernetes and origin API groups are assumed.
// That means that if an action is requested against one of the enumerated resources in either the kubernetes or the origin API group, the request
// will be allowed
- APIGroups []string `json:"apiGroups" protobuf:"bytes,3,rep,name=apiGroups"`
+ // +optional
+ // +nullable
+ APIGroups []string `json:"apiGroups,omitempty" protobuf:"bytes,3,rep,name=apiGroups"`
// Resources is a list of resources this rule applies to. ResourceAll represents all resources.
Resources []string `json:"resources" protobuf:"bytes,4,rep,name=resources"`
// ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed.
@@ -89,11 +91,13 @@ type RoleBinding struct {
// This field should only be specified when supporting legacy clients and servers.
// See Subjects for further details.
// +k8s:conversion-gen=false
+ // +optional
UserNames OptionalNames `json:"userNames" protobuf:"bytes,2,rep,name=userNames"`
// GroupNames holds all the groups directly bound to the role.
// This field should only be specified when supporting legacy clients and servers.
// See Subjects for further details.
// +k8s:conversion-gen=false
+ // +optional
GroupNames OptionalNames `json:"groupNames" protobuf:"bytes,3,rep,name=groupNames"`
// Subjects hold object references to authorize with this rule.
// This field is ignored if UserNames or GroupNames are specified to support legacy clients and servers.
@@ -322,7 +326,7 @@ type Action struct {
ResourceName string `json:"resourceName" protobuf:"bytes,6,opt,name=resourceName"`
// Path is the path of a non resource URL
Path string `json:"path" protobuf:"bytes,8,opt,name=path"`
- // IsNonResourceURL is true if this is a request for a non-resource URL (outside of the resource hieraarchy)
+ // IsNonResourceURL is true if this is a request for a non-resource URL (outside of the resource hierarchy)
IsNonResourceURL bool `json:"isNonResourceURL" protobuf:"varint,9,opt,name=isNonResourceURL"`
// Content is the actual content of the request for create and update
// +kubebuilder:pruning:PreserveUnknownFields
@@ -384,11 +388,13 @@ type ClusterRoleBinding struct {
// This field should only be specified when supporting legacy clients and servers.
// See Subjects for further details.
// +k8s:conversion-gen=false
+ // +optional
UserNames OptionalNames `json:"userNames" protobuf:"bytes,2,rep,name=userNames"`
// GroupNames holds all the groups directly bound to the role.
// This field should only be specified when supporting legacy clients and servers.
// See Subjects for further details.
// +k8s:conversion-gen=false
+ // +optional
GroupNames OptionalNames `json:"groupNames" protobuf:"bytes,3,rep,name=groupNames"`
// Subjects hold object references to authorize with this rule.
// This field is ignored if UserNames or GroupNames are specified to support legacy clients and servers.
diff --git a/vendor/github.com/openshift/api/authorization/v1/zz_generated.swagger_doc_generated.go b/vendor/github.com/openshift/api/authorization/v1/zz_generated.swagger_doc_generated.go
index 04b3c7f446e..8bce982f199 100644
--- a/vendor/github.com/openshift/api/authorization/v1/zz_generated.swagger_doc_generated.go
+++ b/vendor/github.com/openshift/api/authorization/v1/zz_generated.swagger_doc_generated.go
@@ -20,7 +20,7 @@ var map_Action = map[string]string{
"resource": "Resource is one of the existing resource types",
"resourceName": "ResourceName is the name of the resource being requested for a \"get\" or deleted for a \"delete\"",
"path": "Path is the path of a non resource URL",
- "isNonResourceURL": "IsNonResourceURL is true if this is a request for a non-resource URL (outside of the resource hieraarchy)",
+ "isNonResourceURL": "IsNonResourceURL is true if this is a request for a non-resource URL (outside of the resource hierarchy)",
"content": "Content is the actual content of the request for create and update",
}
diff --git a/vendor/github.com/openshift/api/config/v1/0000_00_cluster-version-operator_01_clusteroperator.crd.yaml b/vendor/github.com/openshift/api/config/v1/0000_00_cluster-version-operator_01_clusteroperator.crd.yaml
index 918c0f6f8dd..7e5d27027cf 100644
--- a/vendor/github.com/openshift/api/config/v1/0000_00_cluster-version-operator_01_clusteroperator.crd.yaml
+++ b/vendor/github.com/openshift/api/config/v1/0000_00_cluster-version-operator_01_clusteroperator.crd.yaml
@@ -1,164 +1,137 @@
+apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
-apiVersion: apiextensions.k8s.io/v1beta1
metadata:
+ annotations:
+ api-approved.openshift.io: https://github.com/openshift/api/pull/497
+ include.release.openshift.io/self-managed-high-availability: "true"
+ include.release.openshift.io/single-node-developer: "true"
name: clusteroperators.config.openshift.io
spec:
- additionalPrinterColumns:
- - JSONPath: .status.versions[?(@.name=="operator")].version
- description: The version the operator is at.
- name: Version
- type: string
- - JSONPath: .status.conditions[?(@.type=="Available")].status
- description: Whether the operator is running and stable.
- name: Available
- type: string
- - JSONPath: .status.conditions[?(@.type=="Progressing")].status
- description: Whether the operator is processing changes.
- name: Progressing
- type: string
- - JSONPath: .status.conditions[?(@.type=="Degraded")].status
- description: Whether the operator is degraded.
- name: Degraded
- type: string
- - JSONPath: .status.conditions[?(@.type=="Available")].lastTransitionTime
- description: The time the operator's Available status last changed.
- name: Since
- type: date
group: config.openshift.io
names:
kind: ClusterOperator
listKind: ClusterOperatorList
plural: clusteroperators
- singular: clusteroperator
shortNames:
- - co
- preserveUnknownFields: false
+ - co
+ singular: clusteroperator
scope: Cluster
- subresources:
- status: {}
- version: v1
versions:
- - name: v1
- served: true
- storage: true
- validation:
- openAPIV3Schema:
- description: ClusterOperator is the Custom Resource object which holds the current
- state of an operator. This object is used by operators to convey their state
- to the rest of the cluster.
- type: object
- required:
- - spec
- properties:
- apiVersion:
- description: 'APIVersion defines the versioned schema of this representation
- of an object. Servers should convert recognized schemas to the latest
- internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
+ - additionalPrinterColumns:
+ - description: The version the operator is at.
+ jsonPath: .status.versions[?(@.name=="operator")].version
+ name: Version
type: string
- kind:
- description: 'Kind is a string value representing the REST resource this
- object represents. Servers may infer this from the endpoint the client
- submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
+ - description: Whether the operator is running and stable.
+ jsonPath: .status.conditions[?(@.type=="Available")].status
+ name: Available
type: string
- metadata:
- type: object
- spec:
- description: spec hold the intent of how this operator should behave.
- type: object
- status:
- description: status holds the information about the state of an operator. It
- is consistent with status information across the Kubernetes ecosystem.
+ - description: Whether the operator is processing changes.
+ jsonPath: .status.conditions[?(@.type=="Progressing")].status
+ name: Progressing
+ type: string
+ - description: Whether the operator is degraded.
+ jsonPath: .status.conditions[?(@.type=="Degraded")].status
+ name: Degraded
+ type: string
+ - description: The time the operator's Available status last changed.
+ jsonPath: .status.conditions[?(@.type=="Available")].lastTransitionTime
+ name: Since
+ type: date
+ name: v1
+ schema:
+ openAPIV3Schema:
+ description: ClusterOperator is the Custom Resource object which holds the current state of an operator. This object is used by operators to convey their state to the rest of the cluster.
type: object
+ required:
+ - spec
properties:
- conditions:
- description: conditions describes the state of the operator's managed
- and monitored components.
- type: array
- items:
- description: ClusterOperatorStatusCondition represents the state of
- the operator's managed and monitored components.
- type: object
- required:
- - lastTransitionTime
- - status
- - type
- properties:
- lastTransitionTime:
- description: lastTransitionTime is the time of the last update
- to the current status property.
- type: string
- format: date-time
- message:
- description: message provides additional information about the
- current condition. This is only to be consumed by humans.
- type: string
- reason:
- description: reason is the CamelCase reason for the condition's
- current status.
- type: string
- status:
- description: status of the condition, one of True, False, Unknown.
- type: string
- type:
- description: type specifies the aspect reported by this condition.
- type: string
- extension:
- description: extension contains any additional status information specific
- to the operator which owns this status object.
+ apiVersion:
+ description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
+ type: string
+ kind:
+ description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
+ type: string
+ metadata:
type: object
- nullable: true
- x-kubernetes-preserve-unknown-fields: true
- relatedObjects:
- description: 'relatedObjects is a list of objects that are "interesting"
- or related to this operator. Common uses are: 1. the detailed resource
- driving the operator 2. operator namespaces 3. operand namespaces'
- type: array
- items:
- description: ObjectReference contains enough information to let you
- inspect or modify the referred object.
- type: object
- required:
- - group
- - name
- - resource
- properties:
- group:
- description: group of the referent.
- type: string
- name:
- description: name of the referent.
- type: string
- namespace:
- description: namespace of the referent.
- type: string
- resource:
- description: resource of the referent.
- type: string
- versions:
- description: versions is a slice of operator and operand version tuples. Operators
- which manage multiple operands will have multiple operand entries
- in the array. Available operators must report the version of the
- operator itself with the name "operator". An operator reports a new
- "operator" version when it has rolled out the new version to all of
- its operands.
- type: array
- items:
- type: object
- required:
- - name
- - version
- properties:
- name:
- description: name is the name of the particular operand this version
- is for. It usually matches container images, not operators.
- type: string
- version:
- description: version indicates which version of a particular operand
- is currently being managed. It must always match the Available
- operand. If 1.0.0 is Available, then this must indicate 1.0.0
- even if the operator is trying to rollout 1.1.0
- type: string
- versions:
- - name: v1
- served: true
- storage: true
+ spec:
+ description: spec holds configuration that could apply to any operator.
+ type: object
+ status:
+ description: status holds the information about the state of an operator. It is consistent with status information across the Kubernetes ecosystem.
+ type: object
+ properties:
+ conditions:
+ description: conditions describes the state of the operator's managed and monitored components.
+ type: array
+ items:
+ description: ClusterOperatorStatusCondition represents the state of the operator's managed and monitored components.
+ type: object
+ required:
+ - lastTransitionTime
+ - status
+ - type
+ properties:
+ lastTransitionTime:
+ description: lastTransitionTime is the time of the last update to the current status property.
+ type: string
+ format: date-time
+ message:
+ description: message provides additional information about the current condition. This is only to be consumed by humans. It may contain Line Feed characters (U+000A), which should be rendered as new lines.
+ type: string
+ reason:
+ description: reason is the CamelCase reason for the condition's current status.
+ type: string
+ status:
+ description: status of the condition, one of True, False, Unknown.
+ type: string
+ type:
+ description: type specifies the aspect reported by this condition.
+ type: string
+ extension:
+ description: extension contains any additional status information specific to the operator which owns this status object.
+ type: object
+ nullable: true
+ x-kubernetes-preserve-unknown-fields: true
+ relatedObjects:
+ description: 'relatedObjects is a list of objects that are "interesting" or related to this operator. Common uses are: 1. the detailed resource driving the operator 2. operator namespaces 3. operand namespaces'
+ type: array
+ items:
+ description: ObjectReference contains enough information to let you inspect or modify the referred object.
+ type: object
+ required:
+ - group
+ - name
+ - resource
+ properties:
+ group:
+ description: group of the referent.
+ type: string
+ name:
+ description: name of the referent.
+ type: string
+ namespace:
+ description: namespace of the referent.
+ type: string
+ resource:
+ description: resource of the referent.
+ type: string
+ versions:
+ description: versions is a slice of operator and operand version tuples. Operators which manage multiple operands will have multiple operand entries in the array. Available operators must report the version of the operator itself with the name "operator". An operator reports a new "operator" version when it has rolled out the new version to all of its operands.
+ type: array
+ items:
+ type: object
+ required:
+ - name
+ - version
+ properties:
+ name:
+ description: name is the name of the particular operand this version is for. It usually matches container images, not operators.
+ type: string
+ version:
+ description: version indicates which version of a particular operand is currently being managed. It must always match the Available operand. If 1.0.0 is Available, then this must indicate 1.0.0 even if the operator is trying to rollout 1.1.0
+ type: string
+ served: true
+ storage: true
+ subresources:
+ status: {}
diff --git a/vendor/github.com/openshift/api/config/v1/0000_00_cluster-version-operator_01_clusterversion.crd.yaml b/vendor/github.com/openshift/api/config/v1/0000_00_cluster-version-operator_01_clusterversion.crd.yaml
index ccde0db23bb..25bd91d1e4e 100644
--- a/vendor/github.com/openshift/api/config/v1/0000_00_cluster-version-operator_01_clusterversion.crd.yaml
+++ b/vendor/github.com/openshift/api/config/v1/0000_00_cluster-version-operator_01_clusterversion.crd.yaml
@@ -1,328 +1,225 @@
-apiVersion: apiextensions.k8s.io/v1beta1
+apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
+ annotations:
+ api-approved.openshift.io: https://github.com/openshift/api/pull/495
+ include.release.openshift.io/self-managed-high-availability: "true"
+ include.release.openshift.io/single-node-developer: "true"
name: clusterversions.config.openshift.io
spec:
group: config.openshift.io
- versions:
- - name: v1
- served: true
- storage: true
- scope: Cluster
- subresources:
- status: {}
names:
+ kind: ClusterVersion
plural: clusterversions
singular: clusterversion
- kind: ClusterVersion
- preserveUnknownFields: false
- additionalPrinterColumns:
- - name: Version
- type: string
- JSONPath: .status.history[?(@.state=="Completed")].version
- - name: Available
- type: string
- JSONPath: .status.conditions[?(@.type=="Available")].status
- - name: Progressing
- type: string
- JSONPath: .status.conditions[?(@.type=="Progressing")].status
- - name: Since
- type: date
- JSONPath: .status.conditions[?(@.type=="Progressing")].lastTransitionTime
- - name: Status
- type: string
- JSONPath: .status.conditions[?(@.type=="Progressing")].message
- validation:
- openAPIV3Schema:
- description: ClusterVersion is the configuration for the ClusterVersionOperator.
- This is where parameters related to automatic updates can be set.
- type: object
- required:
- - spec
- properties:
- apiVersion:
- description: 'APIVersion defines the versioned schema of this representation
- of an object. Servers should convert recognized schemas to the latest
- internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
+ scope: Cluster
+ versions:
+ - additionalPrinterColumns:
+ - jsonPath: .status.history[?(@.state=="Completed")].version
+ name: Version
type: string
- kind:
- description: 'Kind is a string value representing the REST resource this
- object represents. Servers may infer this from the endpoint the client
- submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
+ - jsonPath: .status.conditions[?(@.type=="Available")].status
+ name: Available
type: string
- metadata:
- type: object
- spec:
- description: spec is the desired state of the cluster version - the operator
- will work to ensure that the desired version is applied to the cluster.
+ - jsonPath: .status.conditions[?(@.type=="Progressing")].status
+ name: Progressing
+ type: string
+ - jsonPath: .status.conditions[?(@.type=="Progressing")].lastTransitionTime
+ name: Since
+ type: date
+ - jsonPath: .status.conditions[?(@.type=="Progressing")].message
+ name: Status
+ type: string
+ name: v1
+ schema:
+ openAPIV3Schema:
+ description: ClusterVersion is the configuration for the ClusterVersionOperator. This is where parameters related to automatic updates can be set.
type: object
required:
- - clusterID
+ - spec
properties:
- channel:
- description: channel is an identifier for explicitly requesting that
- a non-default set of updates be applied to this cluster. The default
- channel will be contain stable updates that are appropriate for production
- clusters.
+ apiVersion:
+ description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
type: string
- clusterID:
- description: clusterID uniquely identifies this cluster. This is expected
- to be an RFC4122 UUID value (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
- in hexadecimal values). This is a required field.
+ kind:
+ description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type: string
- desiredUpdate:
- description: "desiredUpdate is an optional field that indicates the
- desired value of the cluster version. Setting this value will trigger
- an upgrade (if the current version does not match the desired version).
- The set of recommended update values is listed as part of available
- updates in status, and setting values outside that range may cause
- the upgrade to fail. You may specify the version field without setting
- image if an update exists with that version in the availableUpdates
- or history. \n If an upgrade fails the operator will halt and report
- status about the failing component. Setting the desired update value
- back to the previous version will cause a rollback to be attempted.
- Not all rollbacks will succeed."
+ metadata:
type: object
+ spec:
+ description: spec is the desired state of the cluster version - the operator will work to ensure that the desired version is applied to the cluster.
+ type: object
+ required:
+ - clusterID
properties:
- force:
- description: "force allows an administrator to update to an image
- that has failed verification, does not appear in the availableUpdates
- list, or otherwise would be blocked by normal protections on update.
- This option should only be used when the authenticity of the provided
- image has been verified out of band because the provided image
- will run with full administrative access to the cluster. Do not
- use this flag with images that comes from unknown or potentially
- malicious sources. \n This flag does not override other forms
- of consistency checking that are required before a new update
- is deployed."
- type: boolean
- image:
- description: image is a container image location that contains the
- update. When this field is part of spec, image is optional if
- version is specified and the availableUpdates field contains a
- matching version.
+ channel:
+ description: channel is an identifier for explicitly requesting that a non-default set of updates be applied to this cluster. The default channel will be contain stable updates that are appropriate for production clusters.
type: string
- version:
- description: version is a semantic versioning identifying the update
- version. When this field is part of spec, version is optional
- if image is specified.
+ clusterID:
+ description: clusterID uniquely identifies this cluster. This is expected to be an RFC4122 UUID value (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx in hexadecimal values). This is a required field.
type: string
- overrides:
- description: overrides is list of overides for components that are managed
- by cluster version operator. Marking a component unmanaged will prevent
- the operator from creating or updating the object.
- type: array
- items:
- description: ComponentOverride allows overriding cluster version operator's
- behavior for a component.
- type: object
- required:
- - group
- - kind
- - name
- - namespace
- - unmanaged
- properties:
- group:
- description: group identifies the API group that the kind is in.
- type: string
- kind:
- description: kind indentifies which object to override.
- type: string
- name:
- description: name is the component's name.
- type: string
- namespace:
- description: namespace is the component's namespace. If the resource
- is cluster scoped, the namespace should be empty.
- type: string
- unmanaged:
- description: 'unmanaged controls if cluster version operator should
- stop managing the resources in this cluster. Default: false'
- type: boolean
- upstream:
- description: upstream may be used to specify the preferred update server.
- By default it will use the appropriate update server for the cluster
- and region.
- type: string
- status:
- description: status contains information about the available updates and
- any in-progress updates.
- type: object
- required:
- - availableUpdates
- - desired
- - observedGeneration
- - versionHash
- properties:
- availableUpdates:
- description: availableUpdates contains the list of updates that are
- appropriate for this cluster. This list may be empty if no updates
- are recommended, if the update service is unavailable, or if an invalid
- channel has been specified.
- type: array
- items:
- description: Update represents a release of the ClusterVersionOperator,
- referenced by the Image member.
- type: object
- properties:
- force:
- description: "force allows an administrator to update to an image
- that has failed verification, does not appear in the availableUpdates
- list, or otherwise would be blocked by normal protections on
- update. This option should only be used when the authenticity
- of the provided image has been verified out of band because
- the provided image will run with full administrative access
- to the cluster. Do not use this flag with images that comes
- from unknown or potentially malicious sources. \n This flag
- does not override other forms of consistency checking that are
- required before a new update is deployed."
- type: boolean
- image:
- description: image is a container image location that contains
- the update. When this field is part of spec, image is optional
- if version is specified and the availableUpdates field contains
- a matching version.
- type: string
- version:
- description: version is a semantic versioning identifying the
- update version. When this field is part of spec, version is
- optional if image is specified.
- type: string
- nullable: true
- conditions:
- description: conditions provides information about the cluster version.
- The condition "Available" is set to true if the desiredUpdate has
- been reached. The condition "Progressing" is set to true if an update
- is being applied. The condition "Degraded" is set to true if an update
- is currently blocked by a temporary or permanent error. Conditions
- are only valid for the current desiredUpdate when metadata.generation
- is equal to status.generation.
- type: array
- items:
- description: ClusterOperatorStatusCondition represents the state of
- the operator's managed and monitored components.
- type: object
- required:
- - lastTransitionTime
- - status
- - type
- properties:
- lastTransitionTime:
- description: lastTransitionTime is the time of the last update
- to the current status property.
- type: string
- format: date-time
- message:
- description: message provides additional information about the
- current condition. This is only to be consumed by humans.
- type: string
- reason:
- description: reason is the CamelCase reason for the condition's
- current status.
- type: string
- status:
- description: status of the condition, one of True, False, Unknown.
- type: string
- type:
- description: type specifies the aspect reported by this condition.
- type: string
- desired:
- description: desired is the version that the cluster is reconciling
- towards. If the cluster is not yet fully initialized desired will
- be set with the information available, which may be an image or a
- tag.
+ desiredUpdate:
+ description: "desiredUpdate is an optional field that indicates the desired value of the cluster version. Setting this value will trigger an upgrade (if the current version does not match the desired version). The set of recommended update values is listed as part of available updates in status, and setting values outside that range may cause the upgrade to fail. You may specify the version field without setting image if an update exists with that version in the availableUpdates or history. \n If an upgrade fails the operator will halt and report status about the failing component. Setting the desired update value back to the previous version will cause a rollback to be attempted. Not all rollbacks will succeed."
+ type: object
+ properties:
+ force:
+ description: "force allows an administrator to update to an image that has failed verification, does not appear in the availableUpdates list, or otherwise would be blocked by normal protections on update. This option should only be used when the authenticity of the provided image has been verified out of band because the provided image will run with full administrative access to the cluster. Do not use this flag with images that comes from unknown or potentially malicious sources. \n This flag does not override other forms of consistency checking that are required before a new update is deployed."
+ type: boolean
+ image:
+ description: image is a container image location that contains the update. When this field is part of spec, image is optional if version is specified and the availableUpdates field contains a matching version.
+ type: string
+ version:
+ description: version is a semantic versioning identifying the update version. When this field is part of spec, version is optional if image is specified.
+ type: string
+ overrides:
+ description: overrides is list of overides for components that are managed by cluster version operator. Marking a component unmanaged will prevent the operator from creating or updating the object.
+ type: array
+ items:
+ description: ComponentOverride allows overriding cluster version operator's behavior for a component.
+ type: object
+ required:
+ - group
+ - kind
+ - name
+ - namespace
+ - unmanaged
+ properties:
+ group:
+ description: group identifies the API group that the kind is in.
+ type: string
+ kind:
+ description: kind indentifies which object to override.
+ type: string
+ name:
+ description: name is the component's name.
+ type: string
+ namespace:
+ description: namespace is the component's namespace. If the resource is cluster scoped, the namespace should be empty.
+ type: string
+ unmanaged:
+ description: 'unmanaged controls if cluster version operator should stop managing the resources in this cluster. Default: false'
+ type: boolean
+ upstream:
+ description: upstream may be used to specify the preferred update server. By default it will use the appropriate update server for the cluster and region.
+ type: string
+ status:
+ description: status contains information about the available updates and any in-progress updates.
type: object
+ required:
+ - availableUpdates
+ - desired
+ - observedGeneration
+ - versionHash
properties:
- force:
- description: "force allows an administrator to update to an image
- that has failed verification, does not appear in the availableUpdates
- list, or otherwise would be blocked by normal protections on update.
- This option should only be used when the authenticity of the provided
- image has been verified out of band because the provided image
- will run with full administrative access to the cluster. Do not
- use this flag with images that comes from unknown or potentially
- malicious sources. \n This flag does not override other forms
- of consistency checking that are required before a new update
- is deployed."
- type: boolean
- image:
- description: image is a container image location that contains the
- update. When this field is part of spec, image is optional if
- version is specified and the availableUpdates field contains a
- matching version.
- type: string
- version:
- description: version is a semantic versioning identifying the update
- version. When this field is part of spec, version is optional
- if image is specified.
+ availableUpdates:
+ description: availableUpdates contains the list of updates that are appropriate for this cluster. This list may be empty if no updates are recommended, if the update service is unavailable, or if an invalid channel has been specified.
+ type: array
+ items:
+ description: Release represents an OpenShift release image and associated metadata.
+ type: object
+ properties:
+ channels:
+ description: channels is the set of Cincinnati channels to which the release currently belongs.
+ type: array
+ items:
+ type: string
+ image:
+ description: image is a container image location that contains the update. When this field is part of spec, image is optional if version is specified and the availableUpdates field contains a matching version.
+ type: string
+ url:
+ description: url contains information about this release. This URL is set by the 'url' metadata property on a release or the metadata returned by the update API and should be displayed as a link in user interfaces. The URL field may not be set for test or nightly releases.
+ type: string
+ version:
+ description: version is a semantic versioning identifying the update version. When this field is part of spec, version is optional if image is specified.
+ type: string
+ nullable: true
+ conditions:
+ description: conditions provides information about the cluster version. The condition "Available" is set to true if the desiredUpdate has been reached. The condition "Progressing" is set to true if an update is being applied. The condition "Degraded" is set to true if an update is currently blocked by a temporary or permanent error. Conditions are only valid for the current desiredUpdate when metadata.generation is equal to status.generation.
+ type: array
+ items:
+ description: ClusterOperatorStatusCondition represents the state of the operator's managed and monitored components.
+ type: object
+ required:
+ - lastTransitionTime
+ - status
+ - type
+ properties:
+ lastTransitionTime:
+ description: lastTransitionTime is the time of the last update to the current status property.
+ type: string
+ format: date-time
+ message:
+ description: message provides additional information about the current condition. This is only to be consumed by humans. It may contain Line Feed characters (U+000A), which should be rendered as new lines.
+ type: string
+ reason:
+ description: reason is the CamelCase reason for the condition's current status.
+ type: string
+ status:
+ description: status of the condition, one of True, False, Unknown.
+ type: string
+ type:
+ description: type specifies the aspect reported by this condition.
+ type: string
+ desired:
+ description: desired is the version that the cluster is reconciling towards. If the cluster is not yet fully initialized desired will be set with the information available, which may be an image or a tag.
+ type: object
+ properties:
+ channels:
+ description: channels is the set of Cincinnati channels to which the release currently belongs.
+ type: array
+ items:
+ type: string
+ image:
+ description: image is a container image location that contains the update. When this field is part of spec, image is optional if version is specified and the availableUpdates field contains a matching version.
+ type: string
+ url:
+ description: url contains information about this release. This URL is set by the 'url' metadata property on a release or the metadata returned by the update API and should be displayed as a link in user interfaces. The URL field may not be set for test or nightly releases.
+ type: string
+ version:
+ description: version is a semantic versioning identifying the update version. When this field is part of spec, version is optional if image is specified.
+ type: string
+ history:
+ description: history contains a list of the most recent versions applied to the cluster. This value may be empty during cluster startup, and then will be updated when a new update is being applied. The newest update is first in the list and it is ordered by recency. Updates in the history have state Completed if the rollout completed - if an update was failing or halfway applied the state will be Partial. Only a limited amount of update history is preserved.
+ type: array
+ items:
+ description: UpdateHistory is a single attempted update to the cluster.
+ type: object
+ required:
+ - completionTime
+ - image
+ - startedTime
+ - state
+ - verified
+ properties:
+ completionTime:
+ description: completionTime, if set, is when the update was fully applied. The update that is currently being applied will have a null completion time. Completion time will always be set for entries that are not the current update (usually to the started time of the next update).
+ type: string
+ format: date-time
+ nullable: true
+ image:
+ description: image is a container image location that contains the update. This value is always populated.
+ type: string
+ startedTime:
+ description: startedTime is the time at which the update was started.
+ type: string
+ format: date-time
+ state:
+ description: state reflects whether the update was fully applied. The Partial state indicates the update is not fully applied, while the Completed state indicates the update was successfully rolled out at least once (all parts of the update successfully applied).
+ type: string
+ verified:
+ description: verified indicates whether the provided update was properly verified before it was installed. If this is false the cluster may not be trusted.
+ type: boolean
+ version:
+ description: version is a semantic versioning identifying the update version. If the requested image does not define a version, or if a failure occurs retrieving the image, this value may be empty.
+ type: string
+ observedGeneration:
+ description: observedGeneration reports which version of the spec is being synced. If this value is not equal to metadata.generation, then the desired and conditions fields may represent a previous version.
+ type: integer
+ format: int64
+ versionHash:
+ description: versionHash is a fingerprint of the content that the cluster will be updated with. It is used by the operator to avoid unnecessary work and is for internal use only.
type: string
- history:
- description: history contains a list of the most recent versions applied
- to the cluster. This value may be empty during cluster startup, and
- then will be updated when a new update is being applied. The newest
- update is first in the list and it is ordered by recency. Updates
- in the history have state Completed if the rollout completed - if
- an update was failing or halfway applied the state will be Partial.
- Only a limited amount of update history is preserved.
- type: array
- items:
- description: UpdateHistory is a single attempted update to the cluster.
- type: object
- required:
- - completionTime
- - image
- - startedTime
- - state
- - verified
- properties:
- completionTime:
- description: completionTime, if set, is when the update was fully
- applied. The update that is currently being applied will have
- a null completion time. Completion time will always be set for
- entries that are not the current update (usually to the started
- time of the next update).
- type: string
- format: date-time
- nullable: true
- image:
- description: image is a container image location that contains
- the update. This value is always populated.
- type: string
- startedTime:
- description: startedTime is the time at which the update was started.
- type: string
- format: date-time
- state:
- description: state reflects whether the update was fully applied.
- The Partial state indicates the update is not fully applied,
- while the Completed state indicates the update was successfully
- rolled out at least once (all parts of the update successfully
- applied).
- type: string
- verified:
- description: verified indicates whether the provided update was
- properly verified before it was installed. If this is false
- the cluster may not be trusted.
- type: boolean
- version:
- description: version is a semantic versioning identifying the
- update version. If the requested image does not define a version,
- or if a failure occurs retrieving the image, this value may
- be empty.
- type: string
- observedGeneration:
- description: observedGeneration reports which version of the spec is
- being synced. If this value is not equal to metadata.generation, then
- the desired and conditions fields may represent a previous version.
- type: integer
- format: int64
- versionHash:
- description: versionHash is a fingerprint of the content that the cluster
- will be updated with. It is used by the operator to avoid unnecessary
- work and is for internal use only.
- type: string
- versions:
- - name: v1
- served: true
- storage: true
+ served: true
+ storage: true
+ subresources:
+ status: {}
diff --git a/vendor/github.com/openshift/api/config/v1/0000_03_config-operator_01_operatorhub.crd.yaml b/vendor/github.com/openshift/api/config/v1/0000_03_config-operator_01_operatorhub.crd.yaml
index 8c857d45a4b..8b206f68e76 100644
--- a/vendor/github.com/openshift/api/config/v1/0000_03_config-operator_01_operatorhub.crd.yaml
+++ b/vendor/github.com/openshift/api/config/v1/0000_03_config-operator_01_operatorhub.crd.yaml
@@ -1,6 +1,11 @@
-apiVersion: apiextensions.k8s.io/v1beta1
+apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
+ annotations:
+ api-approved.openshift.io: https://github.com/openshift/api/pull/470
+ include.release.openshift.io/ibm-cloud-managed: "true"
+ include.release.openshift.io/self-managed-high-availability: "true"
+ include.release.openshift.io/single-node-developer: "true"
name: operatorhubs.config.openshift.io
spec:
group: config.openshift.io
@@ -10,92 +15,69 @@ spec:
plural: operatorhubs
singular: operatorhub
scope: Cluster
- preserveUnknownFields: false
- subresources:
- status: {}
- version: v1
versions:
- - name: v1
- served: true
- storage: true
- "validation":
- "openAPIV3Schema":
- description: OperatorHub is the Schema for the operatorhubs API. It can be used
- to change the state of the default hub sources for OperatorHub on the cluster
- from enabled to disabled and vice versa.
- type: object
- properties:
- apiVersion:
- description: 'APIVersion defines the versioned schema of this representation
- of an object. Servers should convert recognized schemas to the latest
- internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
- type: string
- kind:
- description: 'Kind is a string value representing the REST resource this
- object represents. Servers may infer this from the endpoint the client
- submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
- type: string
- metadata:
- type: object
- spec:
- description: OperatorHubSpec defines the desired state of OperatorHub
- type: object
- properties:
- disableAllDefaultSources:
- description: disableAllDefaultSources allows you to disable all the
- default hub sources. If this is true, a specific entry in sources
- can be used to enable a default source. If this is false, a specific
- entry in sources can be used to disable or enable a default source.
- type: boolean
- sources:
- description: sources is the list of default hub sources and their configuration.
- If the list is empty, it implies that the default hub sources are
- enabled on the cluster unless disableAllDefaultSources is true. If
- disableAllDefaultSources is true and sources is not empty, the configuration
- present in sources will take precedence. The list of default hub sources
- and their current state will always be reflected in the status block.
- type: array
- items:
- description: HubSource is used to specify the hub source and its configuration
- type: object
- properties:
- disabled:
- description: disabled is used to disable a default hub source
- on cluster
- type: boolean
- name:
- description: name is the name of one of the default hub sources
- type: string
- maxLength: 253
- minLength: 1
- status:
- description: OperatorHubStatus defines the observed state of OperatorHub.
- The current state of the default hub sources will always be reflected
- here.
+ - name: v1
+ schema:
+ openAPIV3Schema:
+ description: OperatorHub is the Schema for the operatorhubs API. It can be used to change the state of the default hub sources for OperatorHub on the cluster from enabled to disabled and vice versa.
type: object
properties:
- sources:
- description: sources encapsulates the result of applying the configuration
- for each hub source
- type: array
- items:
- description: HubSourceStatus is used to reflect the current state
- of applying the configuration to a default source
- type: object
- properties:
- disabled:
- description: disabled is used to disable a default hub source
- on cluster
- type: boolean
- message:
- description: message provides more information regarding failures
- type: string
- name:
- description: name is the name of one of the default hub sources
- type: string
- maxLength: 253
- minLength: 1
- status:
- description: status indicates success or failure in applying the
- configuration
- type: string
+ apiVersion:
+ description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
+ type: string
+ kind:
+ description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
+ type: string
+ metadata:
+ type: object
+ spec:
+ description: OperatorHubSpec defines the desired state of OperatorHub
+ type: object
+ properties:
+ disableAllDefaultSources:
+ description: disableAllDefaultSources allows you to disable all the default hub sources. If this is true, a specific entry in sources can be used to enable a default source. If this is false, a specific entry in sources can be used to disable or enable a default source.
+ type: boolean
+ sources:
+ description: sources is the list of default hub sources and their configuration. If the list is empty, it implies that the default hub sources are enabled on the cluster unless disableAllDefaultSources is true. If disableAllDefaultSources is true and sources is not empty, the configuration present in sources will take precedence. The list of default hub sources and their current state will always be reflected in the status block.
+ type: array
+ items:
+ description: HubSource is used to specify the hub source and its configuration
+ type: object
+ properties:
+ disabled:
+ description: disabled is used to disable a default hub source on cluster
+ type: boolean
+ name:
+ description: name is the name of one of the default hub sources
+ type: string
+ maxLength: 253
+ minLength: 1
+ status:
+ description: OperatorHubStatus defines the observed state of OperatorHub. The current state of the default hub sources will always be reflected here.
+ type: object
+ properties:
+ sources:
+ description: sources encapsulates the result of applying the configuration for each hub source
+ type: array
+ items:
+ description: HubSourceStatus is used to reflect the current state of applying the configuration to a default source
+ type: object
+ properties:
+ disabled:
+ description: disabled is used to disable a default hub source on cluster
+ type: boolean
+ message:
+ description: message provides more information regarding failures
+ type: string
+ name:
+ description: name is the name of one of the default hub sources
+ type: string
+ maxLength: 253
+ minLength: 1
+ status:
+ description: status indicates success or failure in applying the configuration
+ type: string
+ served: true
+ storage: true
+ subresources:
+ status: {}
diff --git a/vendor/github.com/openshift/api/config/v1/0000_03_config-operator_01_proxy.crd.yaml b/vendor/github.com/openshift/api/config/v1/0000_03_config-operator_01_proxy.crd.yaml
index afd0767479e..c20fb108936 100644
--- a/vendor/github.com/openshift/api/config/v1/0000_03_config-operator_01_proxy.crd.yaml
+++ b/vendor/github.com/openshift/api/config/v1/0000_03_config-operator_01_proxy.crd.yaml
@@ -1,98 +1,78 @@
-apiVersion: apiextensions.k8s.io/v1beta1
+apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
+ annotations:
+ api-approved.openshift.io: https://github.com/openshift/api/pull/470
+ include.release.openshift.io/ibm-cloud-managed: "true"
+ include.release.openshift.io/self-managed-high-availability: "true"
+ include.release.openshift.io/single-node-developer: "true"
name: proxies.config.openshift.io
spec:
group: config.openshift.io
- scope: Cluster
- preserveUnknownFields: false
- versions:
- - name: v1
- served: true
- storage: true
names:
kind: Proxy
listKind: ProxyList
plural: proxies
singular: proxy
- subresources:
- status: {}
- "validation":
- "openAPIV3Schema":
- description: Proxy holds cluster-wide information on how to configure default
- proxies for the cluster. The canonical name is `cluster`
- type: object
- required:
- - spec
- properties:
- apiVersion:
- description: 'APIVersion defines the versioned schema of this representation
- of an object. Servers should convert recognized schemas to the latest
- internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
- type: string
- kind:
- description: 'Kind is a string value representing the REST resource this
- object represents. Servers may infer this from the endpoint the client
- submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
- type: string
- metadata:
- type: object
- spec:
- description: Spec holds user-settable values for the proxy configuration
+ scope: Cluster
+ versions:
+ - name: v1
+ schema:
+ openAPIV3Schema:
+ description: Proxy holds cluster-wide information on how to configure default proxies for the cluster. The canonical name is `cluster`
type: object
+ required:
+ - spec
properties:
- httpProxy:
- description: httpProxy is the URL of the proxy for HTTP requests. Empty
- means unset and will not result in an env var.
+ apiVersion:
+ description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
type: string
- httpsProxy:
- description: httpsProxy is the URL of the proxy for HTTPS requests. Empty
- means unset and will not result in an env var.
+ kind:
+ description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type: string
- noProxy:
- description: noProxy is a comma-separated list of hostnames and/or CIDRs
- for which the proxy should not be used. Empty means unset and will
- not result in an env var.
- type: string
- readinessEndpoints:
- description: readinessEndpoints is a list of endpoints used to verify
- readiness of the proxy.
- type: array
- items:
- type: string
- trustedCA:
- description: "trustedCA is a reference to a ConfigMap containing a CA
- certificate bundle used for client egress HTTPS connections. The certificate
- bundle must be from the CA that signed the proxy's certificate and
- be signed for everything. The trustedCA field should only be consumed
- by a proxy validator. The validator is responsible for reading the
- certificate bundle from required key \"ca-bundle.crt\" and copying
- it to a ConfigMap named \"trusted-ca-bundle\" in the \"openshift-config-managed\"
- namespace. The namespace for the ConfigMap referenced by trustedCA
- is \"openshift-config\". Here is an example ConfigMap (in yaml): \n
- apiVersion: v1 kind: ConfigMap metadata: name: user-ca-bundle namespace:
- openshift-config data: ca-bundle.crt: | -----BEGIN CERTIFICATE-----
- \ Custom CA certificate bundle. -----END CERTIFICATE-----"
+ metadata:
+ type: object
+ spec:
+ description: Spec holds user-settable values for the proxy configuration
type: object
- required:
- - name
properties:
- name:
- description: name is the metadata.name of the referenced config
- map
+ httpProxy:
+ description: httpProxy is the URL of the proxy for HTTP requests. Empty means unset and will not result in an env var.
type: string
- status:
- description: status holds observed values from the cluster. They may not
- be overridden.
- type: object
- properties:
- httpProxy:
- description: httpProxy is the URL of the proxy for HTTP requests.
- type: string
- httpsProxy:
- description: httpsProxy is the URL of the proxy for HTTPS requests.
- type: string
- noProxy:
- description: noProxy is a comma-separated list of hostnames and/or CIDRs
- for which the proxy should not be used.
- type: string
+ httpsProxy:
+ description: httpsProxy is the URL of the proxy for HTTPS requests. Empty means unset and will not result in an env var.
+ type: string
+ noProxy:
+ description: noProxy is a comma-separated list of hostnames and/or CIDRs for which the proxy should not be used. Empty means unset and will not result in an env var.
+ type: string
+ readinessEndpoints:
+ description: readinessEndpoints is a list of endpoints used to verify readiness of the proxy.
+ type: array
+ items:
+ type: string
+ trustedCA:
+ description: "trustedCA is a reference to a ConfigMap containing a CA certificate bundle. The trustedCA field should only be consumed by a proxy validator. The validator is responsible for reading the certificate bundle from the required key \"ca-bundle.crt\", merging it with the system default trust bundle, and writing the merged trust bundle to a ConfigMap named \"trusted-ca-bundle\" in the \"openshift-config-managed\" namespace. Clients that expect to make proxy connections must use the trusted-ca-bundle for all HTTPS requests to the proxy, and may use the trusted-ca-bundle for non-proxy HTTPS requests as well. \n The namespace for the ConfigMap referenced by trustedCA is \"openshift-config\". Here is an example ConfigMap (in yaml): \n apiVersion: v1 kind: ConfigMap metadata: name: user-ca-bundle namespace: openshift-config data: ca-bundle.crt: | -----BEGIN CERTIFICATE----- Custom CA certificate bundle. -----END CERTIFICATE-----"
+ type: object
+ required:
+ - name
+ properties:
+ name:
+ description: name is the metadata.name of the referenced config map
+ type: string
+ status:
+ description: status holds observed values from the cluster. They may not be overridden.
+ type: object
+ properties:
+ httpProxy:
+ description: httpProxy is the URL of the proxy for HTTP requests.
+ type: string
+ httpsProxy:
+ description: httpsProxy is the URL of the proxy for HTTPS requests.
+ type: string
+ noProxy:
+ description: noProxy is a comma-separated list of hostnames and/or CIDRs for which the proxy should not be used.
+ type: string
+ served: true
+ storage: true
+ subresources:
+ status: {}
diff --git a/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_apiserver.crd.yaml b/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_apiserver.crd.yaml
index 4e1fdac3704..9742f9b1ca5 100644
--- a/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_apiserver.crd.yaml
+++ b/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_apiserver.crd.yaml
@@ -1,219 +1,151 @@
-apiVersion: apiextensions.k8s.io/v1beta1
+apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
+ annotations:
+ api-approved.openshift.io: https://github.com/openshift/api/pull/470
+ include.release.openshift.io/ibm-cloud-managed: "true"
+ include.release.openshift.io/self-managed-high-availability: "true"
+ include.release.openshift.io/single-node-developer: "true"
name: apiservers.config.openshift.io
spec:
group: config.openshift.io
- scope: Cluster
- preserveUnknownFields: false
names:
kind: APIServer
- singular: apiserver
- plural: apiservers
listKind: APIServerList
+ plural: apiservers
+ singular: apiserver
+ scope: Cluster
versions:
- - name: v1
- served: true
- storage: true
- subresources:
- status: {}
- "validation":
- "openAPIV3Schema":
- description: APIServer holds configuration (like serving certificates, client
- CA and CORS domains) shared by all API servers in the system, among them especially
- kube-apiserver and openshift-apiserver. The canonical name of an instance
- is 'cluster'.
- type: object
- required:
- - spec
- properties:
- apiVersion:
- description: 'APIVersion defines the versioned schema of this representation
- of an object. Servers should convert recognized schemas to the latest
- internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
- type: string
- kind:
- description: 'Kind is a string value representing the REST resource this
- object represents. Servers may infer this from the endpoint the client
- submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
- type: string
- metadata:
- type: object
- spec:
+ - name: v1
+ schema:
+ openAPIV3Schema:
+ description: APIServer holds configuration (like serving certificates, client CA and CORS domains) shared by all API servers in the system, among them especially kube-apiserver and openshift-apiserver. The canonical name of an instance is 'cluster'.
type: object
+ required:
+ - spec
properties:
- additionalCORSAllowedOrigins:
- description: additionalCORSAllowedOrigins lists additional, user-defined
- regular expressions describing hosts for which the API server allows
- access using the CORS headers. This may be needed to access the API
- and the integrated OAuth server from JavaScript applications. The
- values are regular expressions that correspond to the Golang regular
- expression language.
- type: array
- items:
- type: string
- clientCA:
- description: 'clientCA references a ConfigMap containing a certificate
- bundle for the signers that will be recognized for incoming client
- certificates in addition to the operator managed signers. If this
- is empty, then only operator managed signers are valid. You usually
- only have to set this if you have your own PKI you wish to honor client
- certificates from. The ConfigMap must exist in the openshift-config
- namespace and contain the following required fields: - ConfigMap.Data["ca-bundle.crt"]
- - CA bundle.'
+ apiVersion:
+ description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
+ type: string
+ kind:
+ description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
+ type: string
+ metadata:
type: object
- required:
- - name
- properties:
- name:
- description: name is the metadata.name of the referenced config
- map
- type: string
- encryption:
- description: encryption allows the configuration of encryption of resources
- at the datastore layer.
+ spec:
+ description: spec holds user settable values for configuration
type: object
properties:
- type:
- description: "type defines what encryption type should be used to
- encrypt resources at the datastore layer. When this field is unset
- (i.e. when it is set to the empty string), identity is implied.
- The behavior of unset can and will change over time. Even if
- encryption is enabled by default, the meaning of unset may change
- to a different encryption type based on changes in best practices.
- \n When encryption is enabled, all sensitive resources shipped
- with the platform are encrypted. This list of sensitive resources
- can and will change over time. The current authoritative list
- is: \n 1. secrets 2. configmaps 3. routes.route.openshift.io
- \ 4. oauthaccesstokens.oauth.openshift.io 5. oauthauthorizetokens.oauth.openshift.io"
- type: string
- enum:
- - ""
- - identity
- - aescbc
- servingCerts:
- description: servingCert is the TLS cert info for serving secure traffic.
- If not specified, operator managed certificates will be used for serving
- secure traffic.
- type: object
- properties:
- namedCertificates:
- description: namedCertificates references secrets containing the
- TLS cert info for serving secure traffic to specific hostnames.
- If no named certificates are provided, or no named certificates
- match the server name as understood by a client, the defaultServingCertificate
- will be used.
+ additionalCORSAllowedOrigins:
+ description: additionalCORSAllowedOrigins lists additional, user-defined regular expressions describing hosts for which the API server allows access using the CORS headers. This may be needed to access the API and the integrated OAuth server from JavaScript applications. The values are regular expressions that correspond to the Golang regular expression language.
type: array
items:
- description: APIServerNamedServingCert maps a server DNS name,
- as understood by a client, to a certificate.
- type: object
- properties:
- names:
- description: names is a optional list of explicit DNS names
- (leading wildcards allowed) that should use this certificate
- to serve secure traffic. If no names are provided, the implicit
- names will be extracted from the certificates. Exact names
- trump over wildcard names. Explicit names defined here trump
- over extracted implicit names.
- type: array
- items:
- type: string
- servingCertificate:
- description: 'servingCertificate references a kubernetes.io/tls
- type secret containing the TLS cert info for serving secure
- traffic. The secret must exist in the openshift-config namespace
- and contain the following required fields: - Secret.Data["tls.key"]
- - TLS private key. - Secret.Data["tls.crt"] - TLS certificate.'
- type: object
- required:
- - name
- properties:
- name:
- description: name is the metadata.name of the referenced
- secret
- type: string
- tlsSecurityProfile:
- description: "tlsSecurityProfile specifies settings for TLS connections
- for externally exposed servers. \n If unset, a default (which may
- change between releases) is chosen. Note that only Old and Intermediate
- profiles are currently supported, and the maximum available MinTLSVersions
- is VersionTLS12."
- type: object
- properties:
- custom:
- description: "custom is a user-defined TLS security profile. Be
- extremely careful using a custom profile as invalid configurations
- can be catastrophic. An example custom profile looks like this:
- \n ciphers: - ECDHE-ECDSA-CHACHA20-POLY1305 - ECDHE-RSA-CHACHA20-POLY1305
- \ - ECDHE-RSA-AES128-GCM-SHA256 - ECDHE-ECDSA-AES128-GCM-SHA256
- \ minTLSVersion: TLSv1.1"
+ type: string
+ audit:
+ description: audit specifies the settings for audit configuration to be applied to all OpenShift-provided API servers in the cluster.
type: object
+ default:
+ profile: Default
properties:
- ciphers:
- description: "ciphers is used to specify the cipher algorithms
- that are negotiated during the TLS handshake. Operators may
- remove entries their operands do not support. For example,
- to use DES-CBC3-SHA (yaml): \n ciphers: - DES-CBC3-SHA"
- type: array
- items:
- type: string
- minTLSVersion:
- description: "minTLSVersion is used to specify the minimal version
- of the TLS protocol that is negotiated during the TLS handshake.
- For example, to use TLS versions 1.1, 1.2 and 1.3 (yaml):
- \n minTLSVersion: TLSv1.1 \n NOTE: currently the highest
- minTLSVersion allowed is VersionTLS12"
+ profile:
+ description: "profile specifies the name of the desired audit policy configuration to be deployed to all OpenShift-provided API servers in the cluster. \n The following profiles are provided: - Default: the existing default policy. - WriteRequestBodies: like 'Default', but logs request and response HTTP payloads for write requests (create, update, patch). - AllRequestBodies: like 'WriteRequestBodies', but also logs request and response HTTP payloads for read requests (get, list). \n If unset, the 'Default' profile is used as the default."
type: string
- nullable: true
- intermediate:
- description: "intermediate is a TLS security profile based on: \n
- https://wiki.mozilla.org/Security/Server_Side_TLS#Intermediate_compatibility_.28recommended.29
- \n and looks like this (yaml): \n ciphers: - TLS_AES_128_GCM_SHA256
- \ - TLS_AES_256_GCM_SHA384 - TLS_CHACHA20_POLY1305_SHA256
- \ - ECDHE-ECDSA-AES128-GCM-SHA256 - ECDHE-RSA-AES128-GCM-SHA256
- \ - ECDHE-ECDSA-AES256-GCM-SHA384 - ECDHE-RSA-AES256-GCM-SHA384
- \ - ECDHE-ECDSA-CHACHA20-POLY1305 - ECDHE-RSA-CHACHA20-POLY1305
- \ - DHE-RSA-AES128-GCM-SHA256 - DHE-RSA-AES256-GCM-SHA384
- \ minTLSVersion: TLSv1.2"
+ default: Default
+ enum:
+ - Default
+ - WriteRequestBodies
+ - AllRequestBodies
+ clientCA:
+ description: 'clientCA references a ConfigMap containing a certificate bundle for the signers that will be recognized for incoming client certificates in addition to the operator managed signers. If this is empty, then only operator managed signers are valid. You usually only have to set this if you have your own PKI you wish to honor client certificates from. The ConfigMap must exist in the openshift-config namespace and contain the following required fields: - ConfigMap.Data["ca-bundle.crt"] - CA bundle.'
type: object
- nullable: true
- modern:
- description: "modern is a TLS security profile based on: \n https://wiki.mozilla.org/Security/Server_Side_TLS#Modern_compatibility
- \n and looks like this (yaml): \n ciphers: - TLS_AES_128_GCM_SHA256
- \ - TLS_AES_256_GCM_SHA384 - TLS_CHACHA20_POLY1305_SHA256
- \ minTLSVersion: TLSv1.3 \n NOTE: Currently unsupported."
+ required:
+ - name
+ properties:
+ name:
+ description: name is the metadata.name of the referenced config map
+ type: string
+ encryption:
+ description: encryption allows the configuration of encryption of resources at the datastore layer.
type: object
- nullable: true
- old:
- description: "old is a TLS security profile based on: \n https://wiki.mozilla.org/Security/Server_Side_TLS#Old_backward_compatibility
- \n and looks like this (yaml): \n ciphers: - TLS_AES_128_GCM_SHA256
- \ - TLS_AES_256_GCM_SHA384 - TLS_CHACHA20_POLY1305_SHA256
- \ - ECDHE-ECDSA-AES128-GCM-SHA256 - ECDHE-RSA-AES128-GCM-SHA256
- \ - ECDHE-ECDSA-AES256-GCM-SHA384 - ECDHE-RSA-AES256-GCM-SHA384
- \ - ECDHE-ECDSA-CHACHA20-POLY1305 - ECDHE-RSA-CHACHA20-POLY1305
- \ - DHE-RSA-AES128-GCM-SHA256 - DHE-RSA-AES256-GCM-SHA384
- \ - DHE-RSA-CHACHA20-POLY1305 - ECDHE-ECDSA-AES128-SHA256
- \ - ECDHE-RSA-AES128-SHA256 - ECDHE-ECDSA-AES128-SHA -
- ECDHE-RSA-AES128-SHA - ECDHE-ECDSA-AES256-SHA384 - ECDHE-RSA-AES256-SHA384
- \ - ECDHE-ECDSA-AES256-SHA - ECDHE-RSA-AES256-SHA -
- DHE-RSA-AES128-SHA256 - DHE-RSA-AES256-SHA256 - AES128-GCM-SHA256
- \ - AES256-GCM-SHA384 - AES128-SHA256 - AES256-SHA256
- \ - AES128-SHA - AES256-SHA - DES-CBC3-SHA minTLSVersion:
- TLSv1.0"
+ properties:
+ type:
+ description: "type defines what encryption type should be used to encrypt resources at the datastore layer. When this field is unset (i.e. when it is set to the empty string), identity is implied. The behavior of unset can and will change over time. Even if encryption is enabled by default, the meaning of unset may change to a different encryption type based on changes in best practices. \n When encryption is enabled, all sensitive resources shipped with the platform are encrypted. This list of sensitive resources can and will change over time. The current authoritative list is: \n 1. secrets 2. configmaps 3. routes.route.openshift.io 4. oauthaccesstokens.oauth.openshift.io 5. oauthauthorizetokens.oauth.openshift.io"
+ type: string
+ enum:
+ - ""
+ - identity
+ - aescbc
+ servingCerts:
+ description: servingCert is the TLS cert info for serving secure traffic. If not specified, operator managed certificates will be used for serving secure traffic.
type: object
- nullable: true
- type:
- description: "type is one of Old, Intermediate, Modern or Custom.
- Custom provides the ability to specify individual TLS security
- profile parameters. Old, Intermediate and Modern are TLS security
- profiles based on: \n https://wiki.mozilla.org/Security/Server_Side_TLS#Recommended_configurations
- \n The profiles are intent based, so they may change over time
- as new ciphers are developed and existing ciphers are found to
- be insecure. Depending on precisely which ciphers are available
- to a process, the list may be reduced. \n Note that the Modern
- profile is currently not supported because it is not yet well
- adopted by common software libraries."
- type: string
- status:
- type: object
+ properties:
+ namedCertificates:
+ description: namedCertificates references secrets containing the TLS cert info for serving secure traffic to specific hostnames. If no named certificates are provided, or no named certificates match the server name as understood by a client, the defaultServingCertificate will be used.
+ type: array
+ items:
+ description: APIServerNamedServingCert maps a server DNS name, as understood by a client, to a certificate.
+ type: object
+ properties:
+ names:
+ description: names is a optional list of explicit DNS names (leading wildcards allowed) that should use this certificate to serve secure traffic. If no names are provided, the implicit names will be extracted from the certificates. Exact names trump over wildcard names. Explicit names defined here trump over extracted implicit names.
+ type: array
+ items:
+ type: string
+ servingCertificate:
+ description: 'servingCertificate references a kubernetes.io/tls type secret containing the TLS cert info for serving secure traffic. The secret must exist in the openshift-config namespace and contain the following required fields: - Secret.Data["tls.key"] - TLS private key. - Secret.Data["tls.crt"] - TLS certificate.'
+ type: object
+ required:
+ - name
+ properties:
+ name:
+ description: name is the metadata.name of the referenced secret
+ type: string
+ tlsSecurityProfile:
+ description: "tlsSecurityProfile specifies settings for TLS connections for externally exposed servers. \n If unset, a default (which may change between releases) is chosen. Note that only Old, Intermediate and Custom profiles are currently supported, and the maximum available MinTLSVersions is VersionTLS12."
+ type: object
+ properties:
+ custom:
+ description: "custom is a user-defined TLS security profile. Be extremely careful using a custom profile as invalid configurations can be catastrophic. An example custom profile looks like this: \n ciphers: - ECDHE-ECDSA-CHACHA20-POLY1305 - ECDHE-RSA-CHACHA20-POLY1305 - ECDHE-RSA-AES128-GCM-SHA256 - ECDHE-ECDSA-AES128-GCM-SHA256 minTLSVersion: TLSv1.1"
+ type: object
+ properties:
+ ciphers:
+ description: "ciphers is used to specify the cipher algorithms that are negotiated during the TLS handshake. Operators may remove entries their operands do not support. For example, to use DES-CBC3-SHA (yaml): \n ciphers: - DES-CBC3-SHA"
+ type: array
+ items:
+ type: string
+ minTLSVersion:
+ description: "minTLSVersion is used to specify the minimal version of the TLS protocol that is negotiated during the TLS handshake. For example, to use TLS versions 1.1, 1.2 and 1.3 (yaml): \n minTLSVersion: TLSv1.1 \n NOTE: currently the highest minTLSVersion allowed is VersionTLS12"
+ type: string
+ enum:
+ - VersionTLS10
+ - VersionTLS11
+ - VersionTLS12
+ - VersionTLS13
+ nullable: true
+ intermediate:
+ description: "intermediate is a TLS security profile based on: \n https://wiki.mozilla.org/Security/Server_Side_TLS#Intermediate_compatibility_.28recommended.29 \n and looks like this (yaml): \n ciphers: - TLS_AES_128_GCM_SHA256 - TLS_AES_256_GCM_SHA384 - TLS_CHACHA20_POLY1305_SHA256 - ECDHE-ECDSA-AES128-GCM-SHA256 - ECDHE-RSA-AES128-GCM-SHA256 - ECDHE-ECDSA-AES256-GCM-SHA384 - ECDHE-RSA-AES256-GCM-SHA384 - ECDHE-ECDSA-CHACHA20-POLY1305 - ECDHE-RSA-CHACHA20-POLY1305 - DHE-RSA-AES128-GCM-SHA256 - DHE-RSA-AES256-GCM-SHA384 minTLSVersion: TLSv1.2"
+ type: object
+ nullable: true
+ modern:
+ description: "modern is a TLS security profile based on: \n https://wiki.mozilla.org/Security/Server_Side_TLS#Modern_compatibility \n and looks like this (yaml): \n ciphers: - TLS_AES_128_GCM_SHA256 - TLS_AES_256_GCM_SHA384 - TLS_CHACHA20_POLY1305_SHA256 minTLSVersion: TLSv1.3 \n NOTE: Currently unsupported."
+ type: object
+ nullable: true
+ old:
+ description: "old is a TLS security profile based on: \n https://wiki.mozilla.org/Security/Server_Side_TLS#Old_backward_compatibility \n and looks like this (yaml): \n ciphers: - TLS_AES_128_GCM_SHA256 - TLS_AES_256_GCM_SHA384 - TLS_CHACHA20_POLY1305_SHA256 - ECDHE-ECDSA-AES128-GCM-SHA256 - ECDHE-RSA-AES128-GCM-SHA256 - ECDHE-ECDSA-AES256-GCM-SHA384 - ECDHE-RSA-AES256-GCM-SHA384 - ECDHE-ECDSA-CHACHA20-POLY1305 - ECDHE-RSA-CHACHA20-POLY1305 - DHE-RSA-AES128-GCM-SHA256 - DHE-RSA-AES256-GCM-SHA384 - DHE-RSA-CHACHA20-POLY1305 - ECDHE-ECDSA-AES128-SHA256 - ECDHE-RSA-AES128-SHA256 - ECDHE-ECDSA-AES128-SHA - ECDHE-RSA-AES128-SHA - ECDHE-ECDSA-AES256-SHA384 - ECDHE-RSA-AES256-SHA384 - ECDHE-ECDSA-AES256-SHA - ECDHE-RSA-AES256-SHA - DHE-RSA-AES128-SHA256 - DHE-RSA-AES256-SHA256 - AES128-GCM-SHA256 - AES256-GCM-SHA384 - AES128-SHA256 - AES256-SHA256 - AES128-SHA - AES256-SHA - DES-CBC3-SHA minTLSVersion: TLSv1.0"
+ type: object
+ nullable: true
+ type:
+ description: "type is one of Old, Intermediate, Modern or Custom. Custom provides the ability to specify individual TLS security profile parameters. Old, Intermediate and Modern are TLS security profiles based on: \n https://wiki.mozilla.org/Security/Server_Side_TLS#Recommended_configurations \n The profiles are intent based, so they may change over time as new ciphers are developed and existing ciphers are found to be insecure. Depending on precisely which ciphers are available to a process, the list may be reduced. \n Note that the Modern profile is currently not supported because it is not yet well adopted by common software libraries."
+ type: string
+ enum:
+ - Old
+ - Intermediate
+ - Modern
+ - Custom
+ status:
+ description: status holds observed values from the cluster. They may not be overridden.
+ type: object
+ served: true
+ storage: true
+ subresources:
+ status: {}
diff --git a/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_authentication.crd.yaml b/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_authentication.crd.yaml
index f21ac7ea8bf..736ea3af01d 100644
--- a/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_authentication.crd.yaml
+++ b/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_authentication.crd.yaml
@@ -1,6 +1,11 @@
-apiVersion: apiextensions.k8s.io/v1beta1
+apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
+ annotations:
+ api-approved.openshift.io: https://github.com/openshift/api/pull/470
+ include.release.openshift.io/ibm-cloud-managed: "true"
+ include.release.openshift.io/self-managed-high-availability: "true"
+ include.release.openshift.io/single-node-developer: "true"
name: authentications.config.openshift.io
spec:
group: config.openshift.io
@@ -10,114 +15,87 @@ spec:
plural: authentications
singular: authentication
scope: Cluster
- preserveUnknownFields: false
- subresources:
- status: {}
versions:
- - name: v1
- served: true
- storage: true
- "validation":
- "openAPIV3Schema":
- description: Authentication specifies cluster-wide settings for authentication
- (like OAuth and webhook token authenticators). The canonical name of an instance
- is `cluster`.
- type: object
- required:
- - spec
- properties:
- apiVersion:
- description: 'APIVersion defines the versioned schema of this representation
- of an object. Servers should convert recognized schemas to the latest
- internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
- type: string
- kind:
- description: 'Kind is a string value representing the REST resource this
- object represents. Servers may infer this from the endpoint the client
- submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
- type: string
- metadata:
- type: object
- spec:
- description: spec holds user settable values for configuration
+ - name: v1
+ schema:
+ openAPIV3Schema:
+ description: Authentication specifies cluster-wide settings for authentication (like OAuth and webhook token authenticators). The canonical name of an instance is `cluster`.
type: object
+ required:
+ - spec
properties:
- oauthMetadata:
- description: 'oauthMetadata contains the discovery endpoint data for
- OAuth 2.0 Authorization Server Metadata for an external OAuth server.
- This discovery document can be viewed from its served location: oc
- get --raw ''/.well-known/oauth-authorization-server'' For further
- details, see the IETF Draft: https://tools.ietf.org/html/draft-ietf-oauth-discovery-04#section-2
- If oauthMetadata.name is non-empty, this value has precedence over
- any metadata reference stored in status. The key "oauthMetadata" is
- used to locate the data. If specified and the config map or expected
- key is not found, no metadata is served. If the specified metadata
- is not valid, no metadata is served. The namespace for this config
- map is openshift-config.'
+ apiVersion:
+ description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
+ type: string
+ kind:
+ description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
+ type: string
+ metadata:
+ type: object
+ spec:
+ description: spec holds user settable values for configuration
type: object
- required:
- - name
properties:
- name:
- description: name is the metadata.name of the referenced config
- map
+ oauthMetadata:
+ description: 'oauthMetadata contains the discovery endpoint data for OAuth 2.0 Authorization Server Metadata for an external OAuth server. This discovery document can be viewed from its served location: oc get --raw ''/.well-known/oauth-authorization-server'' For further details, see the IETF Draft: https://tools.ietf.org/html/draft-ietf-oauth-discovery-04#section-2 If oauthMetadata.name is non-empty, this value has precedence over any metadata reference stored in status. The key "oauthMetadata" is used to locate the data. If specified and the config map or expected key is not found, no metadata is served. If the specified metadata is not valid, no metadata is served. The namespace for this config map is openshift-config.'
+ type: object
+ required:
+ - name
+ properties:
+ name:
+ description: name is the metadata.name of the referenced config map
+ type: string
+ serviceAccountIssuer:
+ description: 'serviceAccountIssuer is the identifier of the bound service account token issuer. The default is https://kubernetes.default.svc WARNING: Updating this field will result in the invalidation of all bound tokens with the previous issuer value. Unless the holder of a bound token has explicit support for a change in issuer, they will not request a new bound token until pod restart or until their existing token exceeds 80% of its duration.'
type: string
- type:
- description: type identifies the cluster managed, user facing authentication
- mode in use. Specifically, it manages the component that responds
- to login attempts. The default is IntegratedOAuth.
- type: string
- webhookTokenAuthenticators:
- description: webhookTokenAuthenticators configures remote token reviewers.
- These remote authentication webhooks can be used to verify bearer
- tokens via the tokenreviews.authentication.k8s.io REST API. This
- is required to honor bearer tokens that are provisioned by an external
- authentication service. The namespace for these secrets is openshift-config.
- type: array
- items:
- description: webhookTokenAuthenticator holds the necessary configuration
- options for a remote token authenticator
- type: object
- properties:
- kubeConfig:
- description: 'kubeConfig contains kube config file data which
- describes how to access the remote webhook service. For further
- details, see: https://kubernetes.io/docs/reference/access-authn-authz/authentication/#webhook-token-authentication
- The key "kubeConfig" is used to locate the data. If the secret
- or expected key is not found, the webhook is not honored. If
- the specified kube config data is not valid, the webhook is
- not honored. The namespace for this secret is determined by
- the point of use.'
+ type:
+ description: type identifies the cluster managed, user facing authentication mode in use. Specifically, it manages the component that responds to login attempts. The default is IntegratedOAuth.
+ type: string
+ webhookTokenAuthenticator:
+ description: webhookTokenAuthenticator configures a remote token reviewer. These remote authentication webhooks can be used to verify bearer tokens via the tokenreviews.authentication.k8s.io REST API. This is required to honor bearer tokens that are provisioned by an external authentication service.
+ type: object
+ required:
+ - kubeConfig
+ properties:
+ kubeConfig:
+ description: "kubeConfig references a secret that contains kube config file data which describes how to access the remote webhook service. The namespace for the referenced secret is openshift-config. \n For further details, see: \n https://kubernetes.io/docs/reference/access-authn-authz/authentication/#webhook-token-authentication \n The key \"kubeConfig\" is used to locate the data. If the secret or expected key is not found, the webhook is not honored. If the specified kube config data is not valid, the webhook is not honored."
+ type: object
+ required:
+ - name
+ properties:
+ name:
+ description: name is the metadata.name of the referenced secret
+ type: string
+ webhookTokenAuthenticators:
+ description: webhookTokenAuthenticators is DEPRECATED, setting it has no effect.
+ type: array
+ items:
+ description: deprecatedWebhookTokenAuthenticator holds the necessary configuration options for a remote token authenticator. It's the same as WebhookTokenAuthenticator but it's missing the 'required' validation on KubeConfig field.
type: object
- required:
- - name
properties:
- name:
- description: name is the metadata.name of the referenced secret
- type: string
- status:
- description: status holds observed values from the cluster. They may not
- be overridden.
- type: object
- properties:
- integratedOAuthMetadata:
- description: 'integratedOAuthMetadata contains the discovery endpoint
- data for OAuth 2.0 Authorization Server Metadata for the in-cluster
- integrated OAuth server. This discovery document can be viewed from
- its served location: oc get --raw ''/.well-known/oauth-authorization-server''
- For further details, see the IETF Draft: https://tools.ietf.org/html/draft-ietf-oauth-discovery-04#section-2
- This contains the observed value based on cluster state. An explicitly
- set value in spec.oauthMetadata has precedence over this field. This
- field has no meaning if authentication spec.type is not set to IntegratedOAuth.
- The key "oauthMetadata" is used to locate the data. If the config
- map or expected key is not found, no metadata is served. If the specified
- metadata is not valid, no metadata is served. The namespace for this
- config map is openshift-config-managed.'
+ kubeConfig:
+ description: 'kubeConfig contains kube config file data which describes how to access the remote webhook service. For further details, see: https://kubernetes.io/docs/reference/access-authn-authz/authentication/#webhook-token-authentication The key "kubeConfig" is used to locate the data. If the secret or expected key is not found, the webhook is not honored. If the specified kube config data is not valid, the webhook is not honored. The namespace for this secret is determined by the point of use.'
+ type: object
+ required:
+ - name
+ properties:
+ name:
+ description: name is the metadata.name of the referenced secret
+ type: string
+ status:
+ description: status holds observed values from the cluster. They may not be overridden.
type: object
- required:
- - name
properties:
- name:
- description: name is the metadata.name of the referenced config
- map
- type: string
+ integratedOAuthMetadata:
+ description: 'integratedOAuthMetadata contains the discovery endpoint data for OAuth 2.0 Authorization Server Metadata for the in-cluster integrated OAuth server. This discovery document can be viewed from its served location: oc get --raw ''/.well-known/oauth-authorization-server'' For further details, see the IETF Draft: https://tools.ietf.org/html/draft-ietf-oauth-discovery-04#section-2 This contains the observed value based on cluster state. An explicitly set value in spec.oauthMetadata has precedence over this field. This field has no meaning if authentication spec.type is not set to IntegratedOAuth. The key "oauthMetadata" is used to locate the data. If the config map or expected key is not found, no metadata is served. If the specified metadata is not valid, no metadata is served. The namespace for this config map is openshift-config-managed.'
+ type: object
+ required:
+ - name
+ properties:
+ name:
+ description: name is the metadata.name of the referenced config map
+ type: string
+ served: true
+ storage: true
+ subresources:
+ status: {}
diff --git a/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_build.crd.yaml b/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_build.crd.yaml
index 961f4478b7f..3055b2b8051 100644
--- a/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_build.crd.yaml
+++ b/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_build.crd.yaml
@@ -1,366 +1,271 @@
-apiVersion: apiextensions.k8s.io/v1beta1
+apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
+ annotations:
+ api-approved.openshift.io: https://github.com/openshift/api/pull/470
+ include.release.openshift.io/ibm-cloud-managed: "true"
+ include.release.openshift.io/self-managed-high-availability: "true"
+ include.release.openshift.io/single-node-developer: "true"
name: builds.config.openshift.io
spec:
group: config.openshift.io
- scope: Cluster
- preserveUnknownFields: false
names:
kind: Build
- singular: build
- plural: builds
listKind: BuildList
+ plural: builds
+ singular: build
+ preserveUnknownFields: false
+ scope: Cluster
versions:
- - name: v1
- served: true
- storage: true
- subresources:
- status: {}
- "validation":
- "openAPIV3Schema":
- description: "Build configures the behavior of OpenShift builds for the entire
- cluster. This includes default settings that can be overridden in BuildConfig
- objects, and overrides which are applied to all builds. \n The canonical name
- is \"cluster\""
- type: object
- required:
- - spec
- properties:
- apiVersion:
- description: 'APIVersion defines the versioned schema of this representation
- of an object. Servers should convert recognized schemas to the latest
- internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
- type: string
- kind:
- description: 'Kind is a string value representing the REST resource this
- object represents. Servers may infer this from the endpoint the client
- submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
- type: string
- metadata:
- type: object
- spec:
- description: Spec holds user-settable values for the build controller configuration
+ - name: v1
+ schema:
+ openAPIV3Schema:
+ description: "Build configures the behavior of OpenShift builds for the entire cluster. This includes default settings that can be overridden in BuildConfig objects, and overrides which are applied to all builds. \n The canonical name is \"cluster\""
type: object
+ required:
+ - spec
properties:
- additionalTrustedCA:
- description: "AdditionalTrustedCA is a reference to a ConfigMap containing
- additional CAs that should be trusted for image pushes and pulls during
- builds. The namespace for this config map is openshift-config. \n
- DEPRECATED: Additional CAs for image pull and push should be set on
- image.config.openshift.io/cluster instead."
+ apiVersion:
+ description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
+ type: string
+ kind:
+ description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
+ type: string
+ metadata:
type: object
- required:
- - name
- properties:
- name:
- description: name is the metadata.name of the referenced config
- map
- type: string
- buildDefaults:
- description: BuildDefaults controls the default information for Builds
+ spec:
+ description: Spec holds user-settable values for the build controller configuration
type: object
properties:
- defaultProxy:
- description: "DefaultProxy contains the default proxy settings for
- all build operations, including image pull/push and source download.
- \n Values can be overrode by setting the `HTTP_PROXY`, `HTTPS_PROXY`,
- and `NO_PROXY` environment variables in the build config's strategy."
+ additionalTrustedCA:
+ description: "AdditionalTrustedCA is a reference to a ConfigMap containing additional CAs that should be trusted for image pushes and pulls during builds. The namespace for this config map is openshift-config. \n DEPRECATED: Additional CAs for image pull and push should be set on image.config.openshift.io/cluster instead."
type: object
+ required:
+ - name
properties:
- httpProxy:
- description: httpProxy is the URL of the proxy for HTTP requests. Empty
- means unset and will not result in an env var.
- type: string
- httpsProxy:
- description: httpsProxy is the URL of the proxy for HTTPS requests. Empty
- means unset and will not result in an env var.
- type: string
- noProxy:
- description: noProxy is a comma-separated list of hostnames
- and/or CIDRs for which the proxy should not be used. Empty
- means unset and will not result in an env var.
+ name:
+ description: name is the metadata.name of the referenced config map
type: string
- readinessEndpoints:
- description: readinessEndpoints is a list of endpoints used
- to verify readiness of the proxy.
- type: array
- items:
- type: string
- trustedCA:
- description: "trustedCA is a reference to a ConfigMap containing
- a CA certificate bundle used for client egress HTTPS connections.
- The certificate bundle must be from the CA that signed the
- proxy's certificate and be signed for everything. The trustedCA
- field should only be consumed by a proxy validator. The validator
- is responsible for reading the certificate bundle from required
- key \"ca-bundle.crt\" and copying it to a ConfigMap named
- \"trusted-ca-bundle\" in the \"openshift-config-managed\"
- namespace. The namespace for the ConfigMap referenced by trustedCA
- is \"openshift-config\". Here is an example ConfigMap (in
- yaml): \n apiVersion: v1 kind: ConfigMap metadata: name:
- user-ca-bundle namespace: openshift-config data: ca-bundle.crt:
- | -----BEGIN CERTIFICATE----- Custom CA certificate
- bundle. -----END CERTIFICATE-----"
+ buildDefaults:
+ description: BuildDefaults controls the default information for Builds
+ type: object
+ properties:
+ defaultProxy:
+ description: "DefaultProxy contains the default proxy settings for all build operations, including image pull/push and source download. \n Values can be overrode by setting the `HTTP_PROXY`, `HTTPS_PROXY`, and `NO_PROXY` environment variables in the build config's strategy."
type: object
- required:
- - name
properties:
- name:
- description: name is the metadata.name of the referenced
- config map
+ httpProxy:
+ description: httpProxy is the URL of the proxy for HTTP requests. Empty means unset and will not result in an env var.
type: string
- env:
- description: Env is a set of default environment variables that
- will be applied to the build if the specified variables do not
- exist on the build
- type: array
- items:
- description: EnvVar represents an environment variable present
- in a Container.
- type: object
- required:
- - name
- properties:
- name:
- description: Name of the environment variable. Must be a C_IDENTIFIER.
- type: string
- value:
- description: 'Variable references $(VAR_NAME) are expanded
- using the previous defined environment variables in the
- container and any service environment variables. If a variable
- cannot be resolved, the reference in the input string will
- be unchanged. The $(VAR_NAME) syntax can be escaped with
- a double $$, ie: $$(VAR_NAME). Escaped references will never
- be expanded, regardless of whether the variable exists or
- not. Defaults to "".'
- type: string
- valueFrom:
- description: Source for the environment variable's value.
- Cannot be used if value is not empty.
+ httpsProxy:
+ description: httpsProxy is the URL of the proxy for HTTPS requests. Empty means unset and will not result in an env var.
+ type: string
+ noProxy:
+ description: noProxy is a comma-separated list of hostnames and/or CIDRs for which the proxy should not be used. Empty means unset and will not result in an env var.
+ type: string
+ readinessEndpoints:
+ description: readinessEndpoints is a list of endpoints used to verify readiness of the proxy.
+ type: array
+ items:
+ type: string
+ trustedCA:
+ description: "trustedCA is a reference to a ConfigMap containing a CA certificate bundle. The trustedCA field should only be consumed by a proxy validator. The validator is responsible for reading the certificate bundle from the required key \"ca-bundle.crt\", merging it with the system default trust bundle, and writing the merged trust bundle to a ConfigMap named \"trusted-ca-bundle\" in the \"openshift-config-managed\" namespace. Clients that expect to make proxy connections must use the trusted-ca-bundle for all HTTPS requests to the proxy, and may use the trusted-ca-bundle for non-proxy HTTPS requests as well. \n The namespace for the ConfigMap referenced by trustedCA is \"openshift-config\". Here is an example ConfigMap (in yaml): \n apiVersion: v1 kind: ConfigMap metadata: name: user-ca-bundle namespace: openshift-config data: ca-bundle.crt: | -----BEGIN CERTIFICATE----- Custom CA certificate bundle. -----END CERTIFICATE-----"
+ type: object
+ required:
+ - name
+ properties:
+ name:
+ description: name is the metadata.name of the referenced config map
+ type: string
+ env:
+ description: Env is a set of default environment variables that will be applied to the build if the specified variables do not exist on the build
+ type: array
+ items:
+ description: EnvVar represents an environment variable present in a Container.
type: object
+ required:
+ - name
properties:
- configMapKeyRef:
- description: Selects a key of a ConfigMap.
+ name:
+ description: Name of the environment variable. Must be a C_IDENTIFIER.
+ type: string
+ value:
+ description: 'Variable references $(VAR_NAME) are expanded using the previous defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".'
+ type: string
+ valueFrom:
+ description: Source for the environment variable's value. Cannot be used if value is not empty.
type: object
- required:
- - key
properties:
- key:
- description: The key to select.
- type: string
- name:
- description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind,
- uid?'
- type: string
- optional:
- description: Specify whether the ConfigMap or its
- key must be defined
- type: boolean
- fieldRef:
- description: 'Selects a field of the pod: supports metadata.name,
- metadata.namespace, metadata.labels, metadata.annotations,
- spec.nodeName, spec.serviceAccountName, status.hostIP,
- status.podIP.'
- type: object
- required:
- - fieldPath
- properties:
- apiVersion:
- description: Version of the schema the FieldPath is
- written in terms of, defaults to "v1".
- type: string
- fieldPath:
- description: Path of the field to select in the specified
- API version.
- type: string
- resourceFieldRef:
- description: 'Selects a resource of the container: only
- resources limits and requests (limits.cpu, limits.memory,
- limits.ephemeral-storage, requests.cpu, requests.memory
- and requests.ephemeral-storage) are currently supported.'
- type: object
- required:
- - resource
- properties:
- containerName:
- description: 'Container name: required for volumes,
- optional for env vars'
- type: string
- divisor:
- description: Specifies the output format of the exposed
- resources, defaults to "1"
- type: string
- resource:
- description: 'Required: resource to select'
- type: string
- secretKeyRef:
- description: Selects a key of a secret in the pod's namespace
- type: object
- required:
- - key
- properties:
- key:
- description: The key of the secret to select from. Must
- be a valid secret key.
- type: string
- name:
- description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind,
- uid?'
- type: string
- optional:
- description: Specify whether the Secret or its key
- must be defined
- type: boolean
- gitProxy:
- description: "GitProxy contains the proxy settings for git operations
- only. If set, this will override any Proxy settings for all git
- commands, such as git clone. \n Values that are not set here will
- be inherited from DefaultProxy."
- type: object
- properties:
- httpProxy:
- description: httpProxy is the URL of the proxy for HTTP requests. Empty
- means unset and will not result in an env var.
- type: string
- httpsProxy:
- description: httpsProxy is the URL of the proxy for HTTPS requests. Empty
- means unset and will not result in an env var.
- type: string
- noProxy:
- description: noProxy is a comma-separated list of hostnames
- and/or CIDRs for which the proxy should not be used. Empty
- means unset and will not result in an env var.
- type: string
- readinessEndpoints:
- description: readinessEndpoints is a list of endpoints used
- to verify readiness of the proxy.
+ configMapKeyRef:
+ description: Selects a key of a ConfigMap.
+ type: object
+ required:
+ - key
+ properties:
+ key:
+ description: The key to select.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the ConfigMap or its key must be defined
+ type: boolean
+ fieldRef:
+ description: 'Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['''']`, `metadata.annotations['''']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.'
+ type: object
+ required:
+ - fieldPath
+ properties:
+ apiVersion:
+ description: Version of the schema the FieldPath is written in terms of, defaults to "v1".
+ type: string
+ fieldPath:
+ description: Path of the field to select in the specified API version.
+ type: string
+ resourceFieldRef:
+ description: 'Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported.'
+ type: object
+ required:
+ - resource
+ properties:
+ containerName:
+ description: 'Container name: required for volumes, optional for env vars'
+ type: string
+ divisor:
+ description: Specifies the output format of the exposed resources, defaults to "1"
+ pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
+ anyOf:
+ - type: integer
+ - type: string
+ x-kubernetes-int-or-string: true
+ resource:
+ description: 'Required: resource to select'
+ type: string
+ secretKeyRef:
+ description: Selects a key of a secret in the pod's namespace
+ type: object
+ required:
+ - key
+ properties:
+ key:
+ description: The key of the secret to select from. Must be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key must be defined
+ type: boolean
+ gitProxy:
+ description: "GitProxy contains the proxy settings for git operations only. If set, this will override any Proxy settings for all git commands, such as git clone. \n Values that are not set here will be inherited from DefaultProxy."
+ type: object
+ properties:
+ httpProxy:
+ description: httpProxy is the URL of the proxy for HTTP requests. Empty means unset and will not result in an env var.
+ type: string
+ httpsProxy:
+ description: httpsProxy is the URL of the proxy for HTTPS requests. Empty means unset and will not result in an env var.
+ type: string
+ noProxy:
+ description: noProxy is a comma-separated list of hostnames and/or CIDRs for which the proxy should not be used. Empty means unset and will not result in an env var.
+ type: string
+ readinessEndpoints:
+ description: readinessEndpoints is a list of endpoints used to verify readiness of the proxy.
+ type: array
+ items:
+ type: string
+ trustedCA:
+ description: "trustedCA is a reference to a ConfigMap containing a CA certificate bundle. The trustedCA field should only be consumed by a proxy validator. The validator is responsible for reading the certificate bundle from the required key \"ca-bundle.crt\", merging it with the system default trust bundle, and writing the merged trust bundle to a ConfigMap named \"trusted-ca-bundle\" in the \"openshift-config-managed\" namespace. Clients that expect to make proxy connections must use the trusted-ca-bundle for all HTTPS requests to the proxy, and may use the trusted-ca-bundle for non-proxy HTTPS requests as well. \n The namespace for the ConfigMap referenced by trustedCA is \"openshift-config\". Here is an example ConfigMap (in yaml): \n apiVersion: v1 kind: ConfigMap metadata: name: user-ca-bundle namespace: openshift-config data: ca-bundle.crt: | -----BEGIN CERTIFICATE----- Custom CA certificate bundle. -----END CERTIFICATE-----"
+ type: object
+ required:
+ - name
+ properties:
+ name:
+ description: name is the metadata.name of the referenced config map
+ type: string
+ imageLabels:
+ description: ImageLabels is a list of docker labels that are applied to the resulting image. User can override a default label by providing a label with the same name in their Build/BuildConfig.
type: array
items:
- type: string
- trustedCA:
- description: "trustedCA is a reference to a ConfigMap containing
- a CA certificate bundle used for client egress HTTPS connections.
- The certificate bundle must be from the CA that signed the
- proxy's certificate and be signed for everything. The trustedCA
- field should only be consumed by a proxy validator. The validator
- is responsible for reading the certificate bundle from required
- key \"ca-bundle.crt\" and copying it to a ConfigMap named
- \"trusted-ca-bundle\" in the \"openshift-config-managed\"
- namespace. The namespace for the ConfigMap referenced by trustedCA
- is \"openshift-config\". Here is an example ConfigMap (in
- yaml): \n apiVersion: v1 kind: ConfigMap metadata: name:
- user-ca-bundle namespace: openshift-config data: ca-bundle.crt:
- | -----BEGIN CERTIFICATE----- Custom CA certificate
- bundle. -----END CERTIFICATE-----"
+ type: object
+ properties:
+ name:
+ description: Name defines the name of the label. It must have non-zero length.
+ type: string
+ value:
+ description: Value defines the literal value of the label.
+ type: string
+ resources:
+ description: Resources defines resource requirements to execute the build.
type: object
- required:
- - name
properties:
- name:
- description: name is the metadata.name of the referenced
- config map
- type: string
- imageLabels:
- description: ImageLabels is a list of docker labels that are applied
- to the resulting image. User can override a default label by providing
- a label with the same name in their Build/BuildConfig.
- type: array
- items:
- type: object
- properties:
- name:
- description: Name defines the name of the label. It must have
- non-zero length.
- type: string
- value:
- description: Value defines the literal value of the label.
- type: string
- resources:
- description: Resources defines resource requirements to execute
- the build.
+ limits:
+ description: 'Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
+ type: object
+ additionalProperties:
+ pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
+ anyOf:
+ - type: integer
+ - type: string
+ x-kubernetes-int-or-string: true
+ requests:
+ description: 'Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
+ type: object
+ additionalProperties:
+ pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
+ anyOf:
+ - type: integer
+ - type: string
+ x-kubernetes-int-or-string: true
+ buildOverrides:
+ description: BuildOverrides controls override settings for builds
type: object
properties:
- limits:
- description: 'Limits describes the maximum amount of compute
- resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/'
- type: object
- additionalProperties:
- type: string
- requests:
- description: 'Requests describes the minimum amount of compute
- resources required. If Requests is omitted for a container,
- it defaults to Limits if that is explicitly specified, otherwise
- to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/'
+ forcePull:
+ description: ForcePull overrides, if set, the equivalent value in the builds, i.e. false disables force pull for all builds, true enables force pull for all builds, independently of what each build specifies itself
+ type: boolean
+ imageLabels:
+ description: ImageLabels is a list of docker labels that are applied to the resulting image. If user provided a label in their Build/BuildConfig with the same name as one in this list, the user's label will be overwritten.
+ type: array
+ items:
+ type: object
+ properties:
+ name:
+ description: Name defines the name of the label. It must have non-zero length.
+ type: string
+ value:
+ description: Value defines the literal value of the label.
+ type: string
+ nodeSelector:
+ description: NodeSelector is a selector which must be true for the build pod to fit on a node
type: object
additionalProperties:
type: string
- buildOverrides:
- description: BuildOverrides controls override settings for builds
- type: object
- properties:
- imageLabels:
- description: ImageLabels is a list of docker labels that are applied
- to the resulting image. If user provided a label in their Build/BuildConfig
- with the same name as one in this list, the user's label will
- be overwritten.
- type: array
- items:
- type: object
- properties:
- name:
- description: Name defines the name of the label. It must have
- non-zero length.
- type: string
- value:
- description: Value defines the literal value of the label.
- type: string
- nodeSelector:
- description: NodeSelector is a selector which must be true for the
- build pod to fit on a node
- type: object
- additionalProperties:
- type: string
- tolerations:
- description: Tolerations is a list of Tolerations that will override
- any existing tolerations set on a build pod.
- type: array
- items:
- description: The pod this Toleration is attached to tolerates
- any taint that matches the triple using the
- matching operator .
- type: object
- properties:
- effect:
- description: Effect indicates the taint effect to match. Empty
- means match all taint effects. When specified, allowed values
- are NoSchedule, PreferNoSchedule and NoExecute.
- type: string
- key:
- description: Key is the taint key that the toleration applies
- to. Empty means match all taint keys. If the key is empty,
- operator must be Exists; this combination means to match
- all values and all keys.
- type: string
- operator:
- description: Operator represents a key's relationship to the
- value. Valid operators are Exists and Equal. Defaults to
- Equal. Exists is equivalent to wildcard for value, so that
- a pod can tolerate all taints of a particular category.
- type: string
- tolerationSeconds:
- description: TolerationSeconds represents the period of time
- the toleration (which must be of effect NoExecute, otherwise
- this field is ignored) tolerates the taint. By default,
- it is not set, which means tolerate the taint forever (do
- not evict). Zero and negative values will be treated as
- 0 (evict immediately) by the system.
- type: integer
- format: int64
- value:
- description: Value is the taint value the toleration matches
- to. If the operator is Exists, the value should be empty,
- otherwise just a regular string.
- type: string
+ tolerations:
+ description: Tolerations is a list of Tolerations that will override any existing tolerations set on a build pod.
+ type: array
+ items:
+ description: The pod this Toleration is attached to tolerates any taint that matches the triple using the matching operator .
+ type: object
+ properties:
+ effect:
+ description: Effect indicates the taint effect to match. Empty means match all taint effects. When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute.
+ type: string
+ key:
+ description: Key is the taint key that the toleration applies to. Empty means match all taint keys. If the key is empty, operator must be Exists; this combination means to match all values and all keys.
+ type: string
+ operator:
+ description: Operator represents a key's relationship to the value. Valid operators are Exists and Equal. Defaults to Equal. Exists is equivalent to wildcard for value, so that a pod can tolerate all taints of a particular category.
+ type: string
+ tolerationSeconds:
+ description: TolerationSeconds represents the period of time the toleration (which must be of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, it is not set, which means tolerate the taint forever (do not evict). Zero and negative values will be treated as 0 (evict immediately) by the system.
+ type: integer
+ format: int64
+ value:
+ description: Value is the taint value the toleration matches to. If the operator is Exists, the value should be empty, otherwise just a regular string.
+ type: string
+ served: true
+ storage: true
+ subresources:
+ status: {}
diff --git a/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_console.crd.yaml b/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_console.crd.yaml
index b527f7aa32d..a07cd573296 100644
--- a/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_console.crd.yaml
+++ b/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_console.crd.yaml
@@ -1,70 +1,57 @@
-apiVersion: apiextensions.k8s.io/v1beta1
+apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
+ annotations:
+ api-approved.openshift.io: https://github.com/openshift/api/pull/470
+ include.release.openshift.io/ibm-cloud-managed: "true"
+ include.release.openshift.io/self-managed-high-availability: "true"
+ include.release.openshift.io/single-node-developer: "true"
name: consoles.config.openshift.io
spec:
- scope: Cluster
- preserveUnknownFields: false
group: config.openshift.io
names:
kind: Console
listKind: ConsoleList
plural: consoles
singular: console
- subresources:
- status: {}
+ scope: Cluster
versions:
- - name: v1
- served: true
- storage: true
- "validation":
- "openAPIV3Schema":
- description: Console holds cluster-wide configuration for the web console, including
- the logout URL, and reports the public URL of the console. The canonical name
- is `cluster`.
- type: object
- required:
- - spec
- properties:
- apiVersion:
- description: 'APIVersion defines the versioned schema of this representation
- of an object. Servers should convert recognized schemas to the latest
- internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
- type: string
- kind:
- description: 'Kind is a string value representing the REST resource this
- object represents. Servers may infer this from the endpoint the client
- submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
- type: string
- metadata:
- type: object
- spec:
- description: spec holds user settable values for configuration
+ - name: v1
+ schema:
+ openAPIV3Schema:
+ description: Console holds cluster-wide configuration for the web console, including the logout URL, and reports the public URL of the console. The canonical name is `cluster`.
type: object
+ required:
+ - spec
properties:
- authentication:
- description: ConsoleAuthentication defines a list of optional configuration
- for console authentication.
+ apiVersion:
+ description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
+ type: string
+ kind:
+ description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
+ type: string
+ metadata:
+ type: object
+ spec:
+ description: spec holds user settable values for configuration
type: object
properties:
- logoutRedirect:
- description: 'An optional, absolute URL to redirect web browsers
- to after logging out of the console. If not specified, it will
- redirect to the default login page. This is required when using
- an identity provider that supports single sign-on (SSO) such as:
- - OpenID (Keycloak, Azure) - RequestHeader (GSSAPI, SSPI, SAML)
- - OAuth (GitHub, GitLab, Google) Logging out of the console will
- destroy the user''s token. The logoutRedirect provides the user
- the option to perform single logout (SLO) through the identity
- provider to destroy their single sign-on session.'
+ authentication:
+ description: ConsoleAuthentication defines a list of optional configuration for console authentication.
+ type: object
+ properties:
+ logoutRedirect:
+ description: 'An optional, absolute URL to redirect web browsers to after logging out of the console. If not specified, it will redirect to the default login page. This is required when using an identity provider that supports single sign-on (SSO) such as: - OpenID (Keycloak, Azure) - RequestHeader (GSSAPI, SSPI, SAML) - OAuth (GitHub, GitLab, Google) Logging out of the console will destroy the user''s token. The logoutRedirect provides the user the option to perform single logout (SLO) through the identity provider to destroy their single sign-on session.'
+ type: string
+ pattern: ^$|^((https):\/\/?)[^\s()<>]+(?:\([\w\d]+\)|([^[:punct:]\s]|\/?))$
+ status:
+ description: status holds observed values from the cluster. They may not be overridden.
+ type: object
+ properties:
+ consoleURL:
+ description: The URL for the console. This will be derived from the host for the route that is created for the console.
type: string
- pattern: ^$|^((https):\/\/?)[^\s()<>]+(?:\([\w\d]+\)|([^[:punct:]\s]|\/?))$
- status:
- description: status holds observed values from the cluster. They may not
- be overridden.
- type: object
- properties:
- consoleURL:
- description: The URL for the console. This will be derived from the
- host for the route that is created for the console.
- type: string
+ served: true
+ storage: true
+ subresources:
+ status: {}
diff --git a/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_dns.crd.yaml b/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_dns.crd.yaml
index c883ee0f0cf..fde17e4d032 100644
--- a/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_dns.crd.yaml
+++ b/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_dns.crd.yaml
@@ -1,6 +1,11 @@
-apiVersion: apiextensions.k8s.io/v1beta1
+apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
+ annotations:
+ api-approved.openshift.io: https://github.com/openshift/api/pull/470
+ include.release.openshift.io/ibm-cloud-managed: "true"
+ include.release.openshift.io/self-managed-high-availability: "true"
+ include.release.openshift.io/single-node-developer: "true"
name: dnses.config.openshift.io
spec:
group: config.openshift.io
@@ -10,91 +15,58 @@ spec:
plural: dnses
singular: dns
scope: Cluster
- preserveUnknownFields: false
versions:
- - name: v1
- served: true
- storage: true
- subresources:
- status: {}
- "validation":
- "openAPIV3Schema":
- description: DNS holds cluster-wide information about DNS. The canonical name
- is `cluster`
- type: object
- required:
- - spec
- properties:
- apiVersion:
- description: 'APIVersion defines the versioned schema of this representation
- of an object. Servers should convert recognized schemas to the latest
- internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
- type: string
- kind:
- description: 'Kind is a string value representing the REST resource this
- object represents. Servers may infer this from the endpoint the client
- submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
- type: string
- metadata:
- type: object
- spec:
- description: spec holds user settable values for configuration
+ - name: v1
+ schema:
+ openAPIV3Schema:
+ description: DNS holds cluster-wide information about DNS. The canonical name is `cluster`
type: object
+ required:
+ - spec
properties:
- baseDomain:
- description: "baseDomain is the base domain of the cluster. All managed
- DNS records will be sub-domains of this base. \n For example, given
- the base domain `openshift.example.com`, an API server DNS record
- may be created for `cluster-api.openshift.example.com`. \n Once set,
- this field cannot be changed."
+ apiVersion:
+ description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
+ type: string
+ kind:
+ description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type: string
- privateZone:
- description: "privateZone is the location where all the DNS records
- that are only available internally to the cluster exist. \n If this
- field is nil, no private records should be created. \n Once set, this
- field cannot be changed."
+ metadata:
type: object
- properties:
- id:
- description: "id is the identifier that can be used to find the
- DNS hosted zone. \n on AWS zone can be fetched using `ID` as id
- in [1] on Azure zone can be fetched using `ID` as a pre-determined
- name in [2], on GCP zone can be fetched using `ID` as a pre-determined
- name in [3]. \n [1]: https://docs.aws.amazon.com/cli/latest/reference/route53/get-hosted-zone.html#options
- [2]: https://docs.microsoft.com/en-us/cli/azure/network/dns/zone?view=azure-cli-latest#az-network-dns-zone-show
- [3]: https://cloud.google.com/dns/docs/reference/v1/managedZones/get"
- type: string
- tags:
- description: "tags can be used to query the DNS hosted zone. \n
- on AWS, resourcegroupstaggingapi [1] can be used to fetch a zone
- using `Tags` as tag-filters, \n [1]: https://docs.aws.amazon.com/cli/latest/reference/resourcegroupstaggingapi/get-resources.html#options"
- type: object
- additionalProperties:
- type: string
- publicZone:
- description: "publicZone is the location where all the DNS records that
- are publicly accessible to the internet exist. \n If this field is
- nil, no public records should be created. \n Once set, this field
- cannot be changed."
+ spec:
+ description: spec holds user settable values for configuration
type: object
properties:
- id:
- description: "id is the identifier that can be used to find the
- DNS hosted zone. \n on AWS zone can be fetched using `ID` as id
- in [1] on Azure zone can be fetched using `ID` as a pre-determined
- name in [2], on GCP zone can be fetched using `ID` as a pre-determined
- name in [3]. \n [1]: https://docs.aws.amazon.com/cli/latest/reference/route53/get-hosted-zone.html#options
- [2]: https://docs.microsoft.com/en-us/cli/azure/network/dns/zone?view=azure-cli-latest#az-network-dns-zone-show
- [3]: https://cloud.google.com/dns/docs/reference/v1/managedZones/get"
+ baseDomain:
+ description: "baseDomain is the base domain of the cluster. All managed DNS records will be sub-domains of this base. \n For example, given the base domain `openshift.example.com`, an API server DNS record may be created for `cluster-api.openshift.example.com`. \n Once set, this field cannot be changed."
type: string
- tags:
- description: "tags can be used to query the DNS hosted zone. \n
- on AWS, resourcegroupstaggingapi [1] can be used to fetch a zone
- using `Tags` as tag-filters, \n [1]: https://docs.aws.amazon.com/cli/latest/reference/resourcegroupstaggingapi/get-resources.html#options"
+ privateZone:
+ description: "privateZone is the location where all the DNS records that are only available internally to the cluster exist. \n If this field is nil, no private records should be created. \n Once set, this field cannot be changed."
type: object
- additionalProperties:
- type: string
- status:
- description: status holds observed values from the cluster. They may not
- be overridden.
- type: object
+ properties:
+ id:
+ description: "id is the identifier that can be used to find the DNS hosted zone. \n on AWS zone can be fetched using `ID` as id in [1] on Azure zone can be fetched using `ID` as a pre-determined name in [2], on GCP zone can be fetched using `ID` as a pre-determined name in [3]. \n [1]: https://docs.aws.amazon.com/cli/latest/reference/route53/get-hosted-zone.html#options [2]: https://docs.microsoft.com/en-us/cli/azure/network/dns/zone?view=azure-cli-latest#az-network-dns-zone-show [3]: https://cloud.google.com/dns/docs/reference/v1/managedZones/get"
+ type: string
+ tags:
+ description: "tags can be used to query the DNS hosted zone. \n on AWS, resourcegroupstaggingapi [1] can be used to fetch a zone using `Tags` as tag-filters, \n [1]: https://docs.aws.amazon.com/cli/latest/reference/resourcegroupstaggingapi/get-resources.html#options"
+ type: object
+ additionalProperties:
+ type: string
+ publicZone:
+ description: "publicZone is the location where all the DNS records that are publicly accessible to the internet exist. \n If this field is nil, no public records should be created. \n Once set, this field cannot be changed."
+ type: object
+ properties:
+ id:
+ description: "id is the identifier that can be used to find the DNS hosted zone. \n on AWS zone can be fetched using `ID` as id in [1] on Azure zone can be fetched using `ID` as a pre-determined name in [2], on GCP zone can be fetched using `ID` as a pre-determined name in [3]. \n [1]: https://docs.aws.amazon.com/cli/latest/reference/route53/get-hosted-zone.html#options [2]: https://docs.microsoft.com/en-us/cli/azure/network/dns/zone?view=azure-cli-latest#az-network-dns-zone-show [3]: https://cloud.google.com/dns/docs/reference/v1/managedZones/get"
+ type: string
+ tags:
+ description: "tags can be used to query the DNS hosted zone. \n on AWS, resourcegroupstaggingapi [1] can be used to fetch a zone using `Tags` as tag-filters, \n [1]: https://docs.aws.amazon.com/cli/latest/reference/resourcegroupstaggingapi/get-resources.html#options"
+ type: object
+ additionalProperties:
+ type: string
+ status:
+ description: status holds observed values from the cluster. They may not be overridden.
+ type: object
+ served: true
+ storage: true
+ subresources:
+ status: {}
diff --git a/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_featuregate.crd.yaml b/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_featuregate.crd.yaml
index 89084a33f57..aabf4f63f4b 100644
--- a/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_featuregate.crd.yaml
+++ b/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_featuregate.crd.yaml
@@ -1,76 +1,63 @@
-apiVersion: apiextensions.k8s.io/v1beta1
+apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
+ annotations:
+ api-approved.openshift.io: https://github.com/openshift/api/pull/470
+ include.release.openshift.io/ibm-cloud-managed: "true"
+ include.release.openshift.io/self-managed-high-availability: "true"
+ include.release.openshift.io/single-node-developer: "true"
name: featuregates.config.openshift.io
spec:
group: config.openshift.io
- version: v1
- scope: Cluster
- preserveUnknownFields: false
names:
kind: FeatureGate
- singular: featuregate
- plural: featuregates
listKind: FeatureGateList
+ plural: featuregates
+ singular: featuregate
+ scope: Cluster
versions:
- - name: v1
- served: true
- storage: true
- subresources:
- status: {}
- "validation":
- "openAPIV3Schema":
- description: Feature holds cluster-wide information about feature gates. The
- canonical name is `cluster`
- type: object
- required:
- - spec
- properties:
- apiVersion:
- description: 'APIVersion defines the versioned schema of this representation
- of an object. Servers should convert recognized schemas to the latest
- internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
- type: string
- kind:
- description: 'Kind is a string value representing the REST resource this
- object represents. Servers may infer this from the endpoint the client
- submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
- type: string
- metadata:
- type: object
- spec:
- description: spec holds user settable values for configuration
+ - name: v1
+ schema:
+ openAPIV3Schema:
+ description: Feature holds cluster-wide information about feature gates. The canonical name is `cluster`
type: object
+ required:
+ - spec
properties:
- customNoUpgrade:
- description: customNoUpgrade allows the enabling or disabling of any
- feature. Turning this feature set on IS NOT SUPPORTED, CANNOT BE UNDONE,
- and PREVENTS UPGRADES. Because of its nature, this setting cannot
- be validated. If you have any typos or accidentally apply invalid
- combinations your cluster may fail in an unrecoverable way. featureSet
- must equal "CustomNoUpgrade" must be set to use this field.
+ apiVersion:
+ description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
+ type: string
+ kind:
+ description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
+ type: string
+ metadata:
+ type: object
+ spec:
+ description: spec holds user settable values for configuration
type: object
properties:
- disabled:
- description: disabled is a list of all feature gates that you want
- to force off
- type: array
- items:
- type: string
- enabled:
- description: enabled is a list of all feature gates that you want
- to force on
- type: array
- items:
- type: string
- nullable: true
- featureSet:
- description: featureSet changes the list of features in the cluster. The
- default is empty. Be very careful adjusting this setting. Turning
- on or off features may cause irreversible changes in your cluster
- which cannot be undone.
- type: string
- status:
- description: status holds observed values from the cluster. They may not
- be overridden.
- type: object
+ customNoUpgrade:
+ description: customNoUpgrade allows the enabling or disabling of any feature. Turning this feature set on IS NOT SUPPORTED, CANNOT BE UNDONE, and PREVENTS UPGRADES. Because of its nature, this setting cannot be validated. If you have any typos or accidentally apply invalid combinations your cluster may fail in an unrecoverable way. featureSet must equal "CustomNoUpgrade" must be set to use this field.
+ type: object
+ properties:
+ disabled:
+ description: disabled is a list of all feature gates that you want to force off
+ type: array
+ items:
+ type: string
+ enabled:
+ description: enabled is a list of all feature gates that you want to force on
+ type: array
+ items:
+ type: string
+ nullable: true
+ featureSet:
+ description: featureSet changes the list of features in the cluster. The default is empty. Be very careful adjusting this setting. Turning on or off features may cause irreversible changes in your cluster which cannot be undone.
+ type: string
+ status:
+ description: status holds observed values from the cluster. They may not be overridden.
+ type: object
+ served: true
+ storage: true
+ subresources:
+ status: {}
diff --git a/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_image.crd.yaml b/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_image.crd.yaml
index a0fd4870925..ea1b6b36f88 100644
--- a/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_image.crd.yaml
+++ b/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_image.crd.yaml
@@ -1,144 +1,108 @@
-apiVersion: apiextensions.k8s.io/v1beta1
+apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
+ annotations:
+ api-approved.openshift.io: https://github.com/openshift/api/pull/470
+ include.release.openshift.io/ibm-cloud-managed: "true"
+ include.release.openshift.io/self-managed-high-availability: "true"
+ include.release.openshift.io/single-node-developer: "true"
name: images.config.openshift.io
spec:
group: config.openshift.io
- scope: Cluster
- preserveUnknownFields: false
names:
kind: Image
- singular: image
- plural: images
listKind: ImageList
+ plural: images
+ singular: image
+ scope: Cluster
versions:
- - name: v1
- served: true
- storage: true
- subresources:
- status: {}
- "validation":
- "openAPIV3Schema":
- description: Image governs policies related to imagestream imports and runtime
- configuration for external registries. It allows cluster admins to configure
- which registries OpenShift is allowed to import images from, extra CA trust
- bundles for external registries, and policies to blacklist/whitelist registry
- hostnames. When exposing OpenShift's image registry to the public, this also
- lets cluster admins specify the external hostname.
- type: object
- required:
- - spec
- properties:
- apiVersion:
- description: 'APIVersion defines the versioned schema of this representation
- of an object. Servers should convert recognized schemas to the latest
- internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
- type: string
- kind:
- description: 'Kind is a string value representing the REST resource this
- object represents. Servers may infer this from the endpoint the client
- submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
- type: string
- metadata:
- type: object
- spec:
- description: spec holds user settable values for configuration
+ - name: v1
+ schema:
+ openAPIV3Schema:
+ description: Image governs policies related to imagestream imports and runtime configuration for external registries. It allows cluster admins to configure which registries OpenShift is allowed to import images from, extra CA trust bundles for external registries, and policies to block or allow registry hostnames. When exposing OpenShift's image registry to the public, this also lets cluster admins specify the external hostname.
type: object
+ required:
+ - spec
properties:
- additionalTrustedCA:
- description: additionalTrustedCA is a reference to a ConfigMap containing
- additional CAs that should be trusted during imagestream import, pod
- image pull, build image pull, and imageregistry pullthrough. The namespace
- for this config map is openshift-config.
+ apiVersion:
+ description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
+ type: string
+ kind:
+ description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
+ type: string
+ metadata:
type: object
- required:
- - name
- properties:
- name:
- description: name is the metadata.name of the referenced config
- map
- type: string
- allowedRegistriesForImport:
- description: allowedRegistriesForImport limits the container image registries
- that normal users may import images from. Set this list to the registries
- that you trust to contain valid Docker images and that you want applications
- to be able to import from. Users with permission to create Images
- or ImageStreamMappings via the API are not affected by this policy
- - typically only administrators or system integrations will have those
- permissions.
- type: array
- items:
- description: RegistryLocation contains a location of the registry
- specified by the registry domain name. The domain name might include
- wildcards, like '*' or '??'.
- type: object
- properties:
- domainName:
- description: domainName specifies a domain name for the registry
- In case the registry use non-standard (80 or 443) port, the
- port should be included in the domain name as well.
- type: string
- insecure:
- description: insecure indicates whether the registry is secure
- (https) or insecure (http) By default (if not specified) the
- registry is assumed as secure.
- type: boolean
- externalRegistryHostnames:
- description: externalRegistryHostnames provides the hostnames for the
- default external image registry. The external hostname should be set
- only when the image registry is exposed externally. The first value
- is used in 'publicDockerImageRepository' field in ImageStreams. The
- value must be in "hostname[:port]" format.
- type: array
- items:
- type: string
- registrySources:
- description: registrySources contains configuration that determines
- how the container runtime should treat individual registries when
- accessing images for builds+pods. (e.g. whether or not to allow insecure
- access). It does not contain configuration for the internal cluster
- registry.
+ spec:
+ description: spec holds user settable values for configuration
type: object
properties:
- allowedRegistries:
- description: "allowedRegistries are whitelisted for image pull/push.
- All other registries are blocked. \n Only one of BlockedRegistries
- or AllowedRegistries may be set."
+ additionalTrustedCA:
+ description: additionalTrustedCA is a reference to a ConfigMap containing additional CAs that should be trusted during imagestream import, pod image pull, build image pull, and imageregistry pullthrough. The namespace for this config map is openshift-config.
+ type: object
+ required:
+ - name
+ properties:
+ name:
+ description: name is the metadata.name of the referenced config map
+ type: string
+ allowedRegistriesForImport:
+ description: allowedRegistriesForImport limits the container image registries that normal users may import images from. Set this list to the registries that you trust to contain valid Docker images and that you want applications to be able to import from. Users with permission to create Images or ImageStreamMappings via the API are not affected by this policy - typically only administrators or system integrations will have those permissions.
type: array
items:
- type: string
- blockedRegistries:
- description: "blockedRegistries are blacklisted from image pull/push.
- All other registries are allowed. \n Only one of BlockedRegistries
- or AllowedRegistries may be set."
+ description: RegistryLocation contains a location of the registry specified by the registry domain name. The domain name might include wildcards, like '*' or '??'.
+ type: object
+ properties:
+ domainName:
+ description: domainName specifies a domain name for the registry In case the registry use non-standard (80 or 443) port, the port should be included in the domain name as well.
+ type: string
+ insecure:
+ description: insecure indicates whether the registry is secure (https) or insecure (http) By default (if not specified) the registry is assumed as secure.
+ type: boolean
+ externalRegistryHostnames:
+ description: externalRegistryHostnames provides the hostnames for the default external image registry. The external hostname should be set only when the image registry is exposed externally. The first value is used in 'publicDockerImageRepository' field in ImageStreams. The value must be in "hostname[:port]" format.
type: array
items:
type: string
- insecureRegistries:
- description: insecureRegistries are registries which do not have
- a valid TLS certificates or only support HTTP connections.
+ registrySources:
+ description: registrySources contains configuration that determines how the container runtime should treat individual registries when accessing images for builds+pods. (e.g. whether or not to allow insecure access). It does not contain configuration for the internal cluster registry.
+ type: object
+ properties:
+ allowedRegistries:
+ description: "allowedRegistries are the only registries permitted for image pull and push actions. All other registries are denied. \n Only one of BlockedRegistries or AllowedRegistries may be set."
+ type: array
+ items:
+ type: string
+ blockedRegistries:
+ description: "blockedRegistries cannot be used for image pull and push actions. All other registries are permitted. \n Only one of BlockedRegistries or AllowedRegistries may be set."
+ type: array
+ items:
+ type: string
+ containerRuntimeSearchRegistries:
+ description: 'containerRuntimeSearchRegistries are registries that will be searched when pulling images that do not have fully qualified domains in their pull specs. Registries will be searched in the order provided in the list. Note: this search list only works with the container runtime, i.e CRI-O. Will NOT work with builds or imagestream imports.'
+ type: array
+ format: hostname
+ minItems: 1
+ items:
+ type: string
+ x-kubernetes-list-type: set
+ insecureRegistries:
+ description: insecureRegistries are registries which do not have a valid TLS certificates or only support HTTP connections.
+ type: array
+ items:
+ type: string
+ status:
+ description: status holds observed values from the cluster. They may not be overridden.
+ type: object
+ properties:
+ externalRegistryHostnames:
+ description: externalRegistryHostnames provides the hostnames for the default external image registry. The external hostname should be set only when the image registry is exposed externally. The first value is used in 'publicDockerImageRepository' field in ImageStreams. The value must be in "hostname[:port]" format.
type: array
items:
type: string
- status:
- description: status holds observed values from the cluster. They may not
- be overridden.
- type: object
- properties:
- externalRegistryHostnames:
- description: externalRegistryHostnames provides the hostnames for the
- default external image registry. The external hostname should be set
- only when the image registry is exposed externally. The first value
- is used in 'publicDockerImageRepository' field in ImageStreams. The
- value must be in "hostname[:port]" format.
- type: array
- items:
- type: string
- internalRegistryHostname:
- description: internalRegistryHostname sets the hostname for the default
- internal image registry. The value must be in "hostname[:port]" format.
- This value is set by the image registry operator which controls the
- internal registry hostname. For backward compatibility, users can
- still use OPENSHIFT_DEFAULT_REGISTRY environment variable but this
- setting overrides the environment variable.
- type: string
+ internalRegistryHostname:
+ description: internalRegistryHostname sets the hostname for the default internal image registry. The value must be in "hostname[:port]" format. This value is set by the image registry operator which controls the internal registry hostname. For backward compatibility, users can still use OPENSHIFT_DEFAULT_REGISTRY environment variable but this setting overrides the environment variable.
+ type: string
+ served: true
+ storage: true
+ subresources:
+ status: {}
diff --git a/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_infrastructure.crd.yaml b/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_infrastructure.crd.yaml
index 2aba542dae4..67ace21acb7 100644
--- a/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_infrastructure.crd.yaml
+++ b/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_infrastructure.crd.yaml
@@ -1,6 +1,11 @@
-apiVersion: apiextensions.k8s.io/v1beta1
+apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
+ annotations:
+ api-approved.openshift.io: https://github.com/openshift/api/pull/470
+ include.release.openshift.io/ibm-cloud-managed: "true"
+ include.release.openshift.io/self-managed-high-availability: "true"
+ include.release.openshift.io/single-node-developer: "true"
name: infrastructures.config.openshift.io
spec:
group: config.openshift.io
@@ -10,212 +15,338 @@ spec:
plural: infrastructures
singular: infrastructure
scope: Cluster
- preserveUnknownFields: false
versions:
- - name: v1
- served: true
- storage: true
- "validation":
- "openAPIV3Schema":
- description: Infrastructure holds cluster-wide information about Infrastructure. The
- canonical name is `cluster`
- type: object
- required:
- - spec
- properties:
- apiVersion:
- description: 'APIVersion defines the versioned schema of this representation
- of an object. Servers should convert recognized schemas to the latest
- internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
- type: string
- kind:
- description: 'Kind is a string value representing the REST resource this
- object represents. Servers may infer this from the endpoint the client
- submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
- type: string
- metadata:
- type: object
- spec:
- description: spec holds user settable values for configuration
- type: object
- properties:
- cloudConfig:
- description: cloudConfig is a reference to a ConfigMap containing the
- cloud provider configuration file. This configuration file is used
- to configure the Kubernetes cloud provider integration when using
- the built-in cloud provider integration or the external cloud controller
- manager. The namespace for this config map is openshift-config.
- type: object
- properties:
- key:
- description: Key allows pointing to a specific key/value inside
- of the configmap. This is useful for logical file references.
- type: string
- name:
- type: string
- status:
- description: status holds observed values from the cluster. They may not
- be overridden.
+ - name: v1
+ schema:
+ openAPIV3Schema:
+ description: Infrastructure holds cluster-wide information about Infrastructure. The canonical name is `cluster`
type: object
+ required:
+ - spec
properties:
- apiServerInternalURI:
- description: apiServerInternalURL is a valid URI with scheme(http/https),
- address and port. apiServerInternalURL can be used by components
- like kubelets, to contact the Kubernetes API server using the infrastructure
- provider rather than Kubernetes networking.
- type: string
- apiServerURL:
- description: apiServerURL is a valid URI with scheme(http/https), address
- and port. apiServerURL can be used by components like the web console
- to tell users where to find the Kubernetes API.
- type: string
- etcdDiscoveryDomain:
- description: 'etcdDiscoveryDomain is the domain used to fetch the SRV
- records for discovering etcd servers and clients. For more info: https://github.com/etcd-io/etcd/blob/329be66e8b3f9e2e6af83c123ff89297e49ebd15/Documentation/op-guide/clustering.md#dns-discovery'
- type: string
- infrastructureName:
- description: infrastructureName uniquely identifies a cluster with a
- human friendly name. Once set it should not be changed. Must be of
- max length 27 and must have only alphanumeric or hyphen characters.
+ apiVersion:
+ description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
type: string
- platform:
- description: "platform is the underlying infrastructure provider for
- the cluster. \n Deprecated: Use platformStatus.type instead."
+ kind:
+ description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type: string
- platformStatus:
- description: platformStatus holds status information specific to the
- underlying infrastructure provider.
+ metadata:
+ type: object
+ spec:
+ description: spec holds user settable values for configuration
type: object
properties:
- aws:
- description: AWS contains settings specific to the Amazon Web Services
- infrastructure provider.
- type: object
- properties:
- region:
- description: region holds the default AWS region for new AWS
- resources created by the cluster.
- type: string
- azure:
- description: Azure contains settings specific to the Azure infrastructure
- provider.
- type: object
- properties:
- networkResourceGroupName:
- description: networkResourceGroupName is the Resource Group
- for network resources like the Virtual Network and Subnets
- used by the cluster. If empty, the value is same as ResourceGroupName.
- type: string
- resourceGroupName:
- description: resourceGroupName is the Resource Group for new
- Azure resources created for the cluster.
- type: string
- baremetal:
- description: BareMetal contains settings specific to the BareMetal
- platform.
- type: object
- properties:
- apiServerInternalIP:
- description: apiServerInternalIP is an IP address to contact
- the Kubernetes API server that can be used by components inside
- the cluster, like kubelets using the infrastructure rather
- than Kubernetes networking. It is the IP that the Infrastructure.status.apiServerInternalURI
- points to. It is the IP for a self-hosted load balancer in
- front of the API servers.
- type: string
- ingressIP:
- description: ingressIP is an external IP which routes to the
- default ingress controller. The IP is a suitable target of
- a wildcard DNS record used to resolve default route host names.
- type: string
- nodeDNSIP:
- description: nodeDNSIP is the IP address for the internal DNS
- used by the nodes. Unlike the one managed by the DNS operator,
- `NodeDNSIP` provides name resolution for the nodes themselves.
- There is no DNS-as-a-service for BareMetal deployments. In
- order to minimize necessary changes to the datacenter DNS,
- a DNS service is hosted as a static pod to serve those hostnames
- to the nodes in the cluster.
- type: string
- gcp:
- description: GCP contains settings specific to the Google Cloud
- Platform infrastructure provider.
+ cloudConfig:
+ description: "cloudConfig is a reference to a ConfigMap containing the cloud provider configuration file. This configuration file is used to configure the Kubernetes cloud provider integration when using the built-in cloud provider integration or the external cloud controller manager. The namespace for this config map is openshift-config. \n cloudConfig should only be consumed by the kube_cloud_config controller. The controller is responsible for using the user configuration in the spec for various platforms and combining that with the user provided ConfigMap in this field to create a stitched kube cloud config. The controller generates a ConfigMap `kube-cloud-config` in `openshift-config-managed` namespace with the kube cloud config is stored in `cloud.conf` key. All the clients are expected to use the generated ConfigMap only."
type: object
properties:
- projectID:
- description: resourceGroupName is the Project ID for new GCP
- resources created for the cluster.
+ key:
+ description: Key allows pointing to a specific key/value inside of the configmap. This is useful for logical file references.
type: string
- region:
- description: region holds the region for new GCP resources created
- for the cluster.
+ name:
type: string
- openstack:
- description: OpenStack contains settings specific to the OpenStack
- infrastructure provider.
+ platformSpec:
+ description: platformSpec holds desired information specific to the underlying infrastructure provider.
type: object
properties:
- apiServerInternalIP:
- description: apiServerInternalIP is an IP address to contact
- the Kubernetes API server that can be used by components inside
- the cluster, like kubelets using the infrastructure rather
- than Kubernetes networking. It is the IP that the Infrastructure.status.apiServerInternalURI
- points to. It is the IP for a self-hosted load balancer in
- front of the API servers.
- type: string
- cloudName:
- description: cloudName is the name of the desired OpenStack
- cloud in the client configuration file (`clouds.yaml`).
+ aws:
+ description: AWS contains settings specific to the Amazon Web Services infrastructure provider.
+ type: object
+ properties:
+ serviceEndpoints:
+ description: serviceEndpoints list contains custom endpoints which will override default service endpoint of AWS Services. There must be only one ServiceEndpoint for a service.
+ type: array
+ items:
+ description: AWSServiceEndpoint store the configuration of a custom url to override existing defaults of AWS Services.
+ type: object
+ properties:
+ name:
+ description: name is the name of the AWS service. The list of all the service names can be found at https://docs.aws.amazon.com/general/latest/gr/aws-service-information.html This must be provided and cannot be empty.
+ type: string
+ pattern: ^[a-z0-9-]+$
+ url:
+ description: url is fully qualified URI with scheme https, that overrides the default generated endpoint for a client. This must be provided and cannot be empty.
+ type: string
+ pattern: ^https://
+ azure:
+ description: Azure contains settings specific to the Azure infrastructure provider.
+ type: object
+ baremetal:
+ description: BareMetal contains settings specific to the BareMetal platform.
+ type: object
+ equinixMetal:
+ description: EquinixMetal contains settings specific to the Equinix Metal infrastructure provider.
+ type: object
+ gcp:
+ description: GCP contains settings specific to the Google Cloud Platform infrastructure provider.
+ type: object
+ ibmcloud:
+ description: IBMCloud contains settings specific to the IBMCloud infrastructure provider.
+ type: object
+ kubevirt:
+ description: Kubevirt contains settings specific to the kubevirt infrastructure provider.
+ type: object
+ openstack:
+ description: OpenStack contains settings specific to the OpenStack infrastructure provider.
+ type: object
+ ovirt:
+ description: Ovirt contains settings specific to the oVirt infrastructure provider.
+ type: object
+ type:
+ description: type is the underlying infrastructure provider for the cluster. This value controls whether infrastructure automation such as service load balancers, dynamic volume provisioning, machine creation and deletion, and other integrations are enabled. If None, no infrastructure automation is enabled. Allowed values are "AWS", "Azure", "BareMetal", "GCP", "Libvirt", "OpenStack", "VSphere", "oVirt", "KubeVirt", "EquinixMetal", and "None". Individual components may not support all platforms, and must handle unrecognized platforms as None if they do not support that platform.
type: string
- ingressIP:
- description: ingressIP is an external IP which routes to the
- default ingress controller. The IP is a suitable target of
- a wildcard DNS record used to resolve default route host names.
- type: string
- nodeDNSIP:
- description: nodeDNSIP is the IP address for the internal DNS
- used by the nodes. Unlike the one managed by the DNS operator,
- `NodeDNSIP` provides name resolution for the nodes themselves.
- There is no DNS-as-a-service for OpenStack deployments. In
- order to minimize necessary changes to the datacenter DNS,
- a DNS service is hosted as a static pod to serve those hostnames
- to the nodes in the cluster.
- type: string
- ovirt:
- description: Ovirt contains settings specific to the oVirt infrastructure
- provider.
+ enum:
+ - ""
+ - AWS
+ - Azure
+ - BareMetal
+ - GCP
+ - Libvirt
+ - OpenStack
+ - None
+ - VSphere
+ - oVirt
+ - IBMCloud
+ - KubeVirt
+ - EquinixMetal
+ vsphere:
+ description: VSphere contains settings specific to the VSphere infrastructure provider.
+ type: object
+ status:
+ description: status holds observed values from the cluster. They may not be overridden.
+ type: object
+ properties:
+ apiServerInternalURI:
+ description: apiServerInternalURL is a valid URI with scheme 'https', address and optionally a port (defaulting to 443). apiServerInternalURL can be used by components like kubelets, to contact the Kubernetes API server using the infrastructure provider rather than Kubernetes networking.
+ type: string
+ apiServerURL:
+ description: apiServerURL is a valid URI with scheme 'https', address and optionally a port (defaulting to 443). apiServerURL can be used by components like the web console to tell users where to find the Kubernetes API.
+ type: string
+ controlPlaneTopology:
+ description: controlPlaneTopology expresses the expectations for operands that normally run on control nodes. The default is 'HighlyAvailable', which represents the behavior operators have in a "normal" cluster. The 'SingleReplica' mode will be used in single-node deployments and the operators should not configure the operand for highly-available operation
+ type: string
+ default: HighlyAvailable
+ enum:
+ - HighlyAvailable
+ - SingleReplica
+ etcdDiscoveryDomain:
+ description: 'etcdDiscoveryDomain is the domain used to fetch the SRV records for discovering etcd servers and clients. For more info: https://github.com/etcd-io/etcd/blob/329be66e8b3f9e2e6af83c123ff89297e49ebd15/Documentation/op-guide/clustering.md#dns-discovery deprecated: as of 4.7, this field is no longer set or honored. It will be removed in a future release.'
+ type: string
+ infrastructureName:
+ description: infrastructureName uniquely identifies a cluster with a human friendly name. Once set it should not be changed. Must be of max length 27 and must have only alphanumeric or hyphen characters.
+ type: string
+ infrastructureTopology:
+ description: infrastructureTopology expresses the expectations for infrastructure services that do not run on control plane nodes, usually indicated by a node selector for a `role` value other than `master`. The default is 'HighlyAvailable', which represents the behavior operators have in a "normal" cluster. The 'SingleReplica' mode will be used in single-node deployments and the operators should not configure the operand for highly-available operation
+ type: string
+ default: HighlyAvailable
+ enum:
+ - HighlyAvailable
+ - SingleReplica
+ platform:
+ description: "platform is the underlying infrastructure provider for the cluster. \n Deprecated: Use platformStatus.type instead."
+ type: string
+ enum:
+ - ""
+ - AWS
+ - Azure
+ - BareMetal
+ - GCP
+ - Libvirt
+ - OpenStack
+ - None
+ - VSphere
+ - oVirt
+ - IBMCloud
+ - KubeVirt
+ - EquinixMetal
+ platformStatus:
+ description: platformStatus holds status information specific to the underlying infrastructure provider.
type: object
properties:
- apiServerInternalIP:
- description: apiServerInternalIP is an IP address to contact
- the Kubernetes API server that can be used by components inside
- the cluster, like kubelets using the infrastructure rather
- than Kubernetes networking. It is the IP that the Infrastructure.status.apiServerInternalURI
- points to. It is the IP for a self-hosted load balancer in
- front of the API servers.
- type: string
- ingressIP:
- description: ingressIP is an external IP which routes to the
- default ingress controller. The IP is a suitable target of
- a wildcard DNS record used to resolve default route host names.
+ aws:
+ description: AWS contains settings specific to the Amazon Web Services infrastructure provider.
+ type: object
+ properties:
+ region:
+ description: region holds the default AWS region for new AWS resources created by the cluster.
+ type: string
+ resourceTags:
+ description: resourceTags is a list of additional tags to apply to AWS resources created for the cluster. See https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html for information on tagging AWS resources. AWS supports a maximum of 50 tags per resource. OpenShift reserves 25 tags for its use, leaving 25 tags available for the user.
+ type: array
+ maxItems: 25
+ items:
+ description: AWSResourceTag is a tag to apply to AWS resources created for the cluster.
+ type: object
+ required:
+ - key
+ - value
+ properties:
+ key:
+ description: key is the key of the tag
+ type: string
+ maxLength: 128
+ minLength: 1
+ pattern: ^[0-9A-Za-z_.:/=+-@]+$
+ value:
+ description: value is the value of the tag. Some AWS service do not support empty values. Since tags are added to resources in many services, the length of the tag value must meet the requirements of all services.
+ type: string
+ maxLength: 256
+ minLength: 1
+ pattern: ^[0-9A-Za-z_.:/=+-@]+$
+ serviceEndpoints:
+ description: ServiceEndpoints list contains custom endpoints which will override default service endpoint of AWS Services. There must be only one ServiceEndpoint for a service.
+ type: array
+ items:
+ description: AWSServiceEndpoint store the configuration of a custom url to override existing defaults of AWS Services.
+ type: object
+ properties:
+ name:
+ description: name is the name of the AWS service. The list of all the service names can be found at https://docs.aws.amazon.com/general/latest/gr/aws-service-information.html This must be provided and cannot be empty.
+ type: string
+ pattern: ^[a-z0-9-]+$
+ url:
+ description: url is fully qualified URI with scheme https, that overrides the default generated endpoint for a client. This must be provided and cannot be empty.
+ type: string
+ pattern: ^https://
+ azure:
+ description: Azure contains settings specific to the Azure infrastructure provider.
+ type: object
+ properties:
+ armEndpoint:
+ description: armEndpoint specifies a URL to use for resource management in non-soverign clouds such as Azure Stack.
+ type: string
+ cloudName:
+ description: cloudName is the name of the Azure cloud environment which can be used to configure the Azure SDK with the appropriate Azure API endpoints. If empty, the value is equal to `AzurePublicCloud`.
+ type: string
+ enum:
+ - ""
+ - AzurePublicCloud
+ - AzureUSGovernmentCloud
+ - AzureChinaCloud
+ - AzureGermanCloud
+ - AzureStackCloud
+ networkResourceGroupName:
+ description: networkResourceGroupName is the Resource Group for network resources like the Virtual Network and Subnets used by the cluster. If empty, the value is same as ResourceGroupName.
+ type: string
+ resourceGroupName:
+ description: resourceGroupName is the Resource Group for new Azure resources created for the cluster.
+ type: string
+ baremetal:
+ description: BareMetal contains settings specific to the BareMetal platform.
+ type: object
+ properties:
+ apiServerInternalIP:
+ description: apiServerInternalIP is an IP address to contact the Kubernetes API server that can be used by components inside the cluster, like kubelets using the infrastructure rather than Kubernetes networking. It is the IP that the Infrastructure.status.apiServerInternalURI points to. It is the IP for a self-hosted load balancer in front of the API servers.
+ type: string
+ ingressIP:
+ description: ingressIP is an external IP which routes to the default ingress controller. The IP is a suitable target of a wildcard DNS record used to resolve default route host names.
+ type: string
+ nodeDNSIP:
+ description: nodeDNSIP is the IP address for the internal DNS used by the nodes. Unlike the one managed by the DNS operator, `NodeDNSIP` provides name resolution for the nodes themselves. There is no DNS-as-a-service for BareMetal deployments. In order to minimize necessary changes to the datacenter DNS, a DNS service is hosted as a static pod to serve those hostnames to the nodes in the cluster.
+ type: string
+ equinixMetal:
+ description: EquinixMetal contains settings specific to the Equinix Metal infrastructure provider.
+ type: object
+ properties:
+ apiServerInternalIP:
+ description: apiServerInternalIP is an IP address to contact the Kubernetes API server that can be used by components inside the cluster, like kubelets using the infrastructure rather than Kubernetes networking. It is the IP that the Infrastructure.status.apiServerInternalURI points to. It is the IP for a self-hosted load balancer in front of the API servers.
+ type: string
+ ingressIP:
+ description: ingressIP is an external IP which routes to the default ingress controller. The IP is a suitable target of a wildcard DNS record used to resolve default route host names.
+ type: string
+ gcp:
+ description: GCP contains settings specific to the Google Cloud Platform infrastructure provider.
+ type: object
+ properties:
+ projectID:
+ description: resourceGroupName is the Project ID for new GCP resources created for the cluster.
+ type: string
+ region:
+ description: region holds the region for new GCP resources created for the cluster.
+ type: string
+ ibmcloud:
+ description: IBMCloud contains settings specific to the IBMCloud infrastructure provider.
+ type: object
+ properties:
+ location:
+ description: Location is where the cluster has been deployed
+ type: string
+ providerType:
+ description: ProviderType indicates the type of cluster that was created
+ type: string
+ resourceGroupName:
+ description: ResourceGroupName is the Resource Group for new IBMCloud resources created for the cluster.
+ type: string
+ kubevirt:
+ description: Kubevirt contains settings specific to the kubevirt infrastructure provider.
+ type: object
+ properties:
+ apiServerInternalIP:
+ description: apiServerInternalIP is an IP address to contact the Kubernetes API server that can be used by components inside the cluster, like kubelets using the infrastructure rather than Kubernetes networking. It is the IP that the Infrastructure.status.apiServerInternalURI points to. It is the IP for a self-hosted load balancer in front of the API servers.
+ type: string
+ ingressIP:
+ description: ingressIP is an external IP which routes to the default ingress controller. The IP is a suitable target of a wildcard DNS record used to resolve default route host names.
+ type: string
+ openstack:
+ description: OpenStack contains settings specific to the OpenStack infrastructure provider.
+ type: object
+ properties:
+ apiServerInternalIP:
+ description: apiServerInternalIP is an IP address to contact the Kubernetes API server that can be used by components inside the cluster, like kubelets using the infrastructure rather than Kubernetes networking. It is the IP that the Infrastructure.status.apiServerInternalURI points to. It is the IP for a self-hosted load balancer in front of the API servers.
+ type: string
+ cloudName:
+ description: cloudName is the name of the desired OpenStack cloud in the client configuration file (`clouds.yaml`).
+ type: string
+ ingressIP:
+ description: ingressIP is an external IP which routes to the default ingress controller. The IP is a suitable target of a wildcard DNS record used to resolve default route host names.
+ type: string
+ nodeDNSIP:
+ description: nodeDNSIP is the IP address for the internal DNS used by the nodes. Unlike the one managed by the DNS operator, `NodeDNSIP` provides name resolution for the nodes themselves. There is no DNS-as-a-service for OpenStack deployments. In order to minimize necessary changes to the datacenter DNS, a DNS service is hosted as a static pod to serve those hostnames to the nodes in the cluster.
+ type: string
+ ovirt:
+ description: Ovirt contains settings specific to the oVirt infrastructure provider.
+ type: object
+ properties:
+ apiServerInternalIP:
+ description: apiServerInternalIP is an IP address to contact the Kubernetes API server that can be used by components inside the cluster, like kubelets using the infrastructure rather than Kubernetes networking. It is the IP that the Infrastructure.status.apiServerInternalURI points to. It is the IP for a self-hosted load balancer in front of the API servers.
+ type: string
+ ingressIP:
+ description: ingressIP is an external IP which routes to the default ingress controller. The IP is a suitable target of a wildcard DNS record used to resolve default route host names.
+ type: string
+ nodeDNSIP:
+ description: 'deprecated: as of 4.6, this field is no longer set or honored. It will be removed in a future release.'
+ type: string
+ type:
+ description: "type is the underlying infrastructure provider for the cluster. This value controls whether infrastructure automation such as service load balancers, dynamic volume provisioning, machine creation and deletion, and other integrations are enabled. If None, no infrastructure automation is enabled. Allowed values are \"AWS\", \"Azure\", \"BareMetal\", \"GCP\", \"Libvirt\", \"OpenStack\", \"VSphere\", \"oVirt\", \"EquinixMetal\", and \"None\". Individual components may not support all platforms, and must handle unrecognized platforms as None if they do not support that platform. \n This value will be synced with to the `status.platform` and `status.platformStatus.type`. Currently this value cannot be changed once set."
type: string
- nodeDNSIP:
- description: nodeDNSIP is the IP address for the internal DNS
- used by the nodes. Unlike the one managed by the DNS operator,
- `NodeDNSIP` provides name resolution for the nodes themselves.
- There is no DNS-as-a-service for oVirt deployments. In order
- to minimize necessary changes to the datacenter DNS, a DNS
- service is hosted as a static pod to serve those hostnames
- to the nodes in the cluster.
- type: string
- type:
- description: type is the underlying infrastructure provider for
- the cluster. This value controls whether infrastructure automation
- such as service load balancers, dynamic volume provisioning, machine
- creation and deletion, and other integrations are enabled. If
- None, no infrastructure automation is enabled. Allowed values
- are "AWS", "Azure", "BareMetal", "GCP", "Libvirt", "OpenStack",
- "VSphere", "oVirt", and "None". Individual components may not
- support all platforms, and must handle unrecognized platforms
- as None if they do not support that platform.
- type: string
+ enum:
+ - ""
+ - AWS
+ - Azure
+ - BareMetal
+ - GCP
+ - Libvirt
+ - OpenStack
+ - None
+ - VSphere
+ - oVirt
+ - IBMCloud
+ - KubeVirt
+ - EquinixMetal
+ vsphere:
+ description: VSphere contains settings specific to the VSphere infrastructure provider.
+ type: object
+ properties:
+ apiServerInternalIP:
+ description: apiServerInternalIP is an IP address to contact the Kubernetes API server that can be used by components inside the cluster, like kubelets using the infrastructure rather than Kubernetes networking. It is the IP that the Infrastructure.status.apiServerInternalURI points to. It is the IP for a self-hosted load balancer in front of the API servers.
+ type: string
+ ingressIP:
+ description: ingressIP is an external IP which routes to the default ingress controller. The IP is a suitable target of a wildcard DNS record used to resolve default route host names.
+ type: string
+ nodeDNSIP:
+ description: nodeDNSIP is the IP address for the internal DNS used by the nodes. Unlike the one managed by the DNS operator, `NodeDNSIP` provides name resolution for the nodes themselves. There is no DNS-as-a-service for vSphere deployments. In order to minimize necessary changes to the datacenter DNS, a DNS service is hosted as a static pod to serve those hostnames to the nodes in the cluster.
+ type: string
+ served: true
+ storage: true
+ subresources:
+ status: {}
diff --git a/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_ingress.crd.yaml b/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_ingress.crd.yaml
index ada4404256a..b45c74cdb75 100644
--- a/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_ingress.crd.yaml
+++ b/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_ingress.crd.yaml
@@ -1,6 +1,11 @@
-apiVersion: apiextensions.k8s.io/v1beta1
+apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
+ annotations:
+ api-approved.openshift.io: https://github.com/openshift/api/pull/470
+ include.release.openshift.io/ibm-cloud-managed: "true"
+ include.release.openshift.io/self-managed-high-availability: "true"
+ include.release.openshift.io/single-node-developer: "true"
name: ingresses.config.openshift.io
spec:
group: config.openshift.io
@@ -10,46 +15,186 @@ spec:
plural: ingresses
singular: ingress
scope: Cluster
- preserveUnknownFields: false
versions:
- - name: v1
- served: true
- storage: true
- subresources:
- status: {}
- "validation":
- "openAPIV3Schema":
- description: Ingress holds cluster-wide information about ingress, including
- the default ingress domain used for routes. The canonical name is `cluster`.
- type: object
- required:
- - spec
- properties:
- apiVersion:
- description: 'APIVersion defines the versioned schema of this representation
- of an object. Servers should convert recognized schemas to the latest
- internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
- type: string
- kind:
- description: 'Kind is a string value representing the REST resource this
- object represents. Servers may infer this from the endpoint the client
- submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
- type: string
- metadata:
- type: object
- spec:
- description: spec holds user settable values for configuration
+ - name: v1
+ schema:
+ openAPIV3Schema:
+ description: Ingress holds cluster-wide information about ingress, including the default ingress domain used for routes. The canonical name is `cluster`.
type: object
+ required:
+ - spec
properties:
- domain:
- description: "domain is used to generate a default host name for a route
- when the route's host name is empty. The generated host name will
- follow this pattern: \"..\".
- \n It is also used as the default wildcard domain suffix for ingress.
- The default ingresscontroller domain will follow this pattern: \"*.\".
- \n Once set, changing domain is not currently supported."
+ apiVersion:
+ description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
type: string
- status:
- description: status holds observed values from the cluster. They may not
- be overridden.
- type: object
+ kind:
+ description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
+ type: string
+ metadata:
+ type: object
+ spec:
+ description: spec holds user settable values for configuration
+ type: object
+ properties:
+ appsDomain:
+ description: appsDomain is an optional domain to use instead of the one specified in the domain field when a Route is created without specifying an explicit host. If appsDomain is nonempty, this value is used to generate default host values for Route. Unlike domain, appsDomain may be modified after installation. This assumes a new ingresscontroller has been setup with a wildcard certificate.
+ type: string
+ componentRoutes:
+ description: "componentRoutes is an optional list of routes that are managed by OpenShift components that a cluster-admin is able to configure the hostname and serving certificate for. The namespace and name of each route in this list should match an existing entry in the status.componentRoutes list. \n To determine the set of configurable Routes, look at namespace and name of entries in the .status.componentRoutes list, where participating operators write the status of configurable routes."
+ type: array
+ items:
+ description: ComponentRouteSpec allows for configuration of a route's hostname and serving certificate.
+ type: object
+ required:
+ - hostname
+ - name
+ - namespace
+ properties:
+ hostname:
+ description: hostname is the hostname that should be used by the route.
+ type: string
+ format: hostname
+ name:
+ description: "name is the logical name of the route to customize. \n The namespace and name of this componentRoute must match a corresponding entry in the list of status.componentRoutes if the route is to be customized."
+ type: string
+ maxLength: 256
+ minLength: 1
+ namespace:
+ description: "namespace is the namespace of the route to customize. \n The namespace and name of this componentRoute must match a corresponding entry in the list of status.componentRoutes if the route is to be customized."
+ type: string
+ maxLength: 63
+ minLength: 1
+ pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$
+ servingCertKeyPairSecret:
+ description: servingCertKeyPairSecret is a reference to a secret of type `kubernetes.io/tls` in the openshift-config namespace. The serving cert/key pair must match and will be used by the operator to fulfill the intent of serving with this name. If the custom hostname uses the default routing suffix of the cluster, the Secret specification for a serving certificate will not be needed.
+ type: object
+ required:
+ - name
+ properties:
+ name:
+ description: name is the metadata.name of the referenced secret
+ type: string
+ domain:
+ description: "domain is used to generate a default host name for a route when the route's host name is empty. The generated host name will follow this pattern: \"..\". \n It is also used as the default wildcard domain suffix for ingress. The default ingresscontroller domain will follow this pattern: \"*.\". \n Once set, changing domain is not currently supported."
+ type: string
+ status:
+ description: status holds observed values from the cluster. They may not be overridden.
+ type: object
+ properties:
+ componentRoutes:
+ description: componentRoutes is where participating operators place the current route status for routes whose hostnames and serving certificates can be customized by the cluster-admin.
+ type: array
+ items:
+ description: ComponentRouteStatus contains information allowing configuration of a route's hostname and serving certificate.
+ type: object
+ required:
+ - defaultHostname
+ - name
+ - namespace
+ - relatedObjects
+ properties:
+ conditions:
+ description: "conditions are used to communicate the state of the componentRoutes entry. \n Supported conditions include Available, Degraded and Progressing. \n If available is true, the content served by the route can be accessed by users. This includes cases where a default may continue to serve content while the customized route specified by the cluster-admin is being configured. \n If Degraded is true, that means something has gone wrong trying to handle the componentRoutes entry. The currentHostnames field may or may not be in effect. \n If Progressing is true, that means the component is taking some action related to the componentRoutes entry."
+ type: array
+ items:
+ description: "Condition contains details for one aspect of the current state of this API Resource. --- This struct is intended for direct use as an array at the field path .status.conditions. For example, type FooStatus struct{ // Represents the observations of a foo's current state. // Known .status.conditions.type are: \"Available\", \"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge // +listType=map // +listMapKey=type Conditions []metav1.Condition `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"` \n // other fields }"
+ type: object
+ required:
+ - lastTransitionTime
+ - message
+ - reason
+ - status
+ - type
+ properties:
+ lastTransitionTime:
+ description: lastTransitionTime is the last time the condition transitioned from one status to another. This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.
+ type: string
+ format: date-time
+ message:
+ description: message is a human readable message indicating details about the transition. This may be an empty string.
+ type: string
+ maxLength: 32768
+ observedGeneration:
+ description: observedGeneration represents the .metadata.generation that the condition was set based upon. For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date with respect to the current state of the instance.
+ type: integer
+ format: int64
+ minimum: 0
+ reason:
+ description: reason contains a programmatic identifier indicating the reason for the condition's last transition. Producers of specific condition types may define expected values and meanings for this field, and whether the values are considered a guaranteed API. The value should be a CamelCase string. This field may not be empty.
+ type: string
+ maxLength: 1024
+ minLength: 1
+ pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$
+ status:
+ description: status of the condition, one of True, False, Unknown.
+ type: string
+ enum:
+ - "True"
+ - "False"
+ - Unknown
+ type:
+ description: type of condition in CamelCase or in foo.example.com/CamelCase. --- Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be useful (see .node.status.conditions), the ability to deconflict is important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)
+ type: string
+ maxLength: 316
+ pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
+ consumingUsers:
+ description: consumingUsers is a slice of ServiceAccounts that need to have read permission on the servingCertKeyPairSecret secret.
+ type: array
+ maxItems: 5
+ items:
+ description: ConsumingUser is an alias for string which we add validation to. Currently only service accounts are supported.
+ type: string
+ maxLength: 512
+ minLength: 1
+ pattern: ^system:serviceaccount:[a-z0-9]([-a-z0-9]*[a-z0-9])?:[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
+ currentHostnames:
+ description: currentHostnames is the list of current names used by the route. Typically, this list should consist of a single hostname, but if multiple hostnames are supported by the route the operator may write multiple entries to this list.
+ type: array
+ minItems: 1
+ items:
+ description: Hostname is an alias for hostname string validation.
+ type: string
+ format: hostname
+ defaultHostname:
+ description: defaultHostname is the hostname of this route prior to customization.
+ type: string
+ format: hostname
+ name:
+ description: "name is the logical name of the route to customize. It does not have to be the actual name of a route resource but it cannot be renamed. \n The namespace and name of this componentRoute must match a corresponding entry in the list of spec.componentRoutes if the route is to be customized."
+ type: string
+ maxLength: 256
+ minLength: 1
+ namespace:
+ description: "namespace is the namespace of the route to customize. It must be a real namespace. Using an actual namespace ensures that no two components will conflict and the same component can be installed multiple times. \n The namespace and name of this componentRoute must match a corresponding entry in the list of spec.componentRoutes if the route is to be customized."
+ type: string
+ maxLength: 63
+ minLength: 1
+ pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$
+ relatedObjects:
+ description: relatedObjects is a list of resources which are useful when debugging or inspecting how spec.componentRoutes is applied.
+ type: array
+ minItems: 1
+ items:
+ description: ObjectReference contains enough information to let you inspect or modify the referred object.
+ type: object
+ required:
+ - group
+ - name
+ - resource
+ properties:
+ group:
+ description: group of the referent.
+ type: string
+ name:
+ description: name of the referent.
+ type: string
+ namespace:
+ description: namespace of the referent.
+ type: string
+ resource:
+ description: resource of the referent.
+ type: string
+ served: true
+ storage: true
+ subresources:
+ status: {}
diff --git a/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_network.crd.yaml b/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_network.crd.yaml
index bc3b62a8715..5b17f211b35 100644
--- a/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_network.crd.yaml
+++ b/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_network.crd.yaml
@@ -1,6 +1,11 @@
-apiVersion: apiextensions.k8s.io/v1beta1
+apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
+ annotations:
+ api-approved.openshift.io: https://github.com/openshift/api/pull/470
+ include.release.openshift.io/ibm-cloud-managed: "true"
+ include.release.openshift.io/self-managed-high-availability: "true"
+ include.release.openshift.io/single-node-developer: "true"
name: networks.config.openshift.io
spec:
group: config.openshift.io
@@ -9,133 +14,118 @@ spec:
listKind: NetworkList
plural: networks
singular: network
- scope: Cluster
preserveUnknownFields: false
+ scope: Cluster
versions:
- - name: v1
- served: true
- storage: true
- "validation":
- "openAPIV3Schema":
- description: 'Network holds cluster-wide information about Network. The canonical
- name is `cluster`. It is used to configure the desired network configuration,
- such as: IP address pools for services/pod IPs, network plugin, etc. Please
- view network.spec for an explanation on what applies when configuring this
- resource.'
- type: object
- required:
- - spec
- properties:
- apiVersion:
- description: 'APIVersion defines the versioned schema of this representation
- of an object. Servers should convert recognized schemas to the latest
- internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
- type: string
- kind:
- description: 'Kind is a string value representing the REST resource this
- object represents. Servers may infer this from the endpoint the client
- submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
- type: string
- metadata:
- type: object
- spec:
- description: spec holds user settable values for configuration. As a general
- rule, this SHOULD NOT be read directly. Instead, you should consume the
- NetworkStatus, as it indicates the currently deployed configuration. Currently,
- most spec fields are immutable after installation. Please view the individual
- ones for further details on each.
+ - name: v1
+ schema:
+ openAPIV3Schema:
+ description: 'Network holds cluster-wide information about Network. The canonical name is `cluster`. It is used to configure the desired network configuration, such as: IP address pools for services/pod IPs, network plugin, etc. Please view network.spec for an explanation on what applies when configuring this resource.'
type: object
+ required:
+ - spec
properties:
- clusterNetwork:
- description: IP address pool to use for pod IPs. This field is immutable
- after installation.
- type: array
- items:
- description: ClusterNetworkEntry is a contiguous block of IP addresses
- from which pod IPs are allocated.
- type: object
- properties:
- cidr:
- description: The complete block for pod IPs.
- type: string
- hostPrefix:
- description: The size (prefix) of block to allocate to each node.
- type: integer
- format: int32
- minimum: 0
- externalIP:
- description: externalIP defines configuration for controllers that affect
- Service.ExternalIP. If nil, then ExternalIP is not allowed to be set.
+ apiVersion:
+ description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
+ type: string
+ kind:
+ description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
+ type: string
+ metadata:
+ type: object
+ spec:
+ description: spec holds user settable values for configuration. As a general rule, this SHOULD NOT be read directly. Instead, you should consume the NetworkStatus, as it indicates the currently deployed configuration. Currently, most spec fields are immutable after installation. Please view the individual ones for further details on each.
type: object
properties:
- autoAssignCIDRs:
- description: autoAssignCIDRs is a list of CIDRs from which to automatically
- assign Service.ExternalIP. These are assigned when the service
- is of type LoadBalancer. In general, this is only useful for bare-metal
- clusters. In Openshift 3.x, this was misleadingly called "IngressIPs".
- Automatically assigned External IPs are not affected by any ExternalIPPolicy
- rules. Currently, only one entry may be provided.
+ clusterNetwork:
+ description: IP address pool to use for pod IPs. This field is immutable after installation.
type: array
items:
- type: string
- policy:
- description: policy is a set of restrictions applied to the ExternalIP
- field. If nil or empty, then ExternalIP is not allowed to be set.
+ description: ClusterNetworkEntry is a contiguous block of IP addresses from which pod IPs are allocated.
+ type: object
+ properties:
+ cidr:
+ description: The complete block for pod IPs.
+ type: string
+ hostPrefix:
+ description: The size (prefix) of block to allocate to each node. If this field is not used by the plugin, it can be left unset.
+ type: integer
+ format: int32
+ minimum: 0
+ externalIP:
+ description: externalIP defines configuration for controllers that affect Service.ExternalIP. If nil, then ExternalIP is not allowed to be set.
type: object
properties:
- allowedCIDRs:
- description: allowedCIDRs is the list of allowed CIDRs.
+ autoAssignCIDRs:
+ description: autoAssignCIDRs is a list of CIDRs from which to automatically assign Service.ExternalIP. These are assigned when the service is of type LoadBalancer. In general, this is only useful for bare-metal clusters. In Openshift 3.x, this was misleadingly called "IngressIPs". Automatically assigned External IPs are not affected by any ExternalIPPolicy rules. Currently, only one entry may be provided.
type: array
items:
type: string
- rejectedCIDRs:
- description: rejectedCIDRs is the list of disallowed CIDRs.
- These take precedence over allowedCIDRs.
- type: array
- items:
+ policy:
+ description: policy is a set of restrictions applied to the ExternalIP field. If nil or empty, then ExternalIP is not allowed to be set.
+ type: object
+ properties:
+ allowedCIDRs:
+ description: allowedCIDRs is the list of allowed CIDRs.
+ type: array
+ items:
+ type: string
+ rejectedCIDRs:
+ description: rejectedCIDRs is the list of disallowed CIDRs. These take precedence over allowedCIDRs.
+ type: array
+ items:
+ type: string
+ networkType:
+ description: 'NetworkType is the plugin that is to be deployed (e.g. OpenShiftSDN). This should match a value that the cluster-network-operator understands, or else no networking will be installed. Currently supported values are: - OpenShiftSDN This field is immutable after installation.'
+ type: string
+ serviceNetwork:
+ description: IP address pool for services. Currently, we only support a single entry here. This field is immutable after installation.
+ type: array
+ items:
+ type: string
+ serviceNodePortRange:
+ description: The port range allowed for Services of type NodePort. If not specified, the default of 30000-32767 will be used. Such Services without a NodePort specified will have one automatically allocated from this range. This parameter can be updated after the cluster is installed.
+ type: string
+ pattern: ^([0-9]{1,4}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])-([0-9]{1,4}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])$
+ status:
+ description: status holds observed values from the cluster. They may not be overridden.
+ type: object
+ properties:
+ clusterNetwork:
+ description: IP address pool to use for pod IPs.
+ type: array
+ items:
+ description: ClusterNetworkEntry is a contiguous block of IP addresses from which pod IPs are allocated.
+ type: object
+ properties:
+ cidr:
+ description: The complete block for pod IPs.
type: string
- networkType:
- description: 'NetworkType is the plugin that is to be deployed (e.g.
- OpenShiftSDN). This should match a value that the cluster-network-operator
- understands, or else no networking will be installed. Currently supported
- values are: - OpenShiftSDN This field is immutable after installation.'
- type: string
- serviceNetwork:
- description: IP address pool for services. Currently, we only support
- a single entry here. This field is immutable after installation.
- type: array
- items:
- type: string
- status:
- description: status holds observed values from the cluster. They may not
- be overridden.
- type: object
- properties:
- clusterNetwork:
- description: IP address pool to use for pod IPs.
- type: array
- items:
- description: ClusterNetworkEntry is a contiguous block of IP addresses
- from which pod IPs are allocated.
- type: object
- properties:
- cidr:
- description: The complete block for pod IPs.
+ hostPrefix:
+ description: The size (prefix) of block to allocate to each node. If this field is not used by the plugin, it can be left unset.
+ type: integer
+ format: int32
+ minimum: 0
+ clusterNetworkMTU:
+ description: ClusterNetworkMTU is the MTU for inter-pod networking.
+ type: integer
+ migration:
+ description: Migration contains the cluster network migration configuration.
+ type: object
+ properties:
+ networkType:
+ description: 'NetworkType is the target plugin that is to be deployed. Currently supported values are: OpenShiftSDN, OVNKubernetes'
+ type: string
+ enum:
+ - OpenShiftSDN
+ - OVNKubernetes
+ networkType:
+ description: NetworkType is the plugin that is deployed (e.g. OpenShiftSDN).
+ type: string
+ serviceNetwork:
+ description: IP address pool for services. Currently, we only support a single entry here.
+ type: array
+ items:
type: string
- hostPrefix:
- description: The size (prefix) of block to allocate to each node.
- type: integer
- format: int32
- minimum: 0
- clusterNetworkMTU:
- description: ClusterNetworkMTU is the MTU for inter-pod networking.
- type: integer
- networkType:
- description: NetworkType is the plugin that is deployed (e.g. OpenShiftSDN).
- type: string
- serviceNetwork:
- description: IP address pool for services. Currently, we only support
- a single entry here.
- type: array
- items:
- type: string
+ served: true
+ storage: true
diff --git a/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_oauth.crd.yaml b/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_oauth.crd.yaml
index fd763d04776..61da741c4b2 100644
--- a/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_oauth.crd.yaml
+++ b/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_oauth.crd.yaml
@@ -1,6 +1,11 @@
-apiVersion: apiextensions.k8s.io/v1beta1
+apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
+ annotations:
+ api-approved.openshift.io: https://github.com/openshift/api/pull/470
+ include.release.openshift.io/ibm-cloud-managed: "true"
+ include.release.openshift.io/self-managed-high-availability: "true"
+ include.release.openshift.io/single-node-developer: "true"
name: oauths.config.openshift.io
spec:
group: config.openshift.io
@@ -10,652 +15,418 @@ spec:
plural: oauths
singular: oauth
scope: Cluster
- preserveUnknownFields: false
- subresources:
- status: {}
versions:
- - name: v1
- served: true
- storage: true
- "validation":
- "openAPIV3Schema":
- description: OAuth holds cluster-wide information about OAuth. The canonical
- name is `cluster`. It is used to configure the integrated OAuth server. This
- configuration is only honored when the top level Authentication config has
- type set to IntegratedOAuth.
- type: object
- required:
- - spec
- properties:
- apiVersion:
- description: 'APIVersion defines the versioned schema of this representation
- of an object. Servers should convert recognized schemas to the latest
- internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
- type: string
- kind:
- description: 'Kind is a string value representing the REST resource this
- object represents. Servers may infer this from the endpoint the client
- submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
- type: string
- metadata:
- type: object
- spec:
- description: OAuthSpec contains desired cluster auth configuration
+ - name: v1
+ schema:
+ openAPIV3Schema:
+ description: OAuth holds cluster-wide information about OAuth. The canonical name is `cluster`. It is used to configure the integrated OAuth server. This configuration is only honored when the top level Authentication config has type set to IntegratedOAuth.
type: object
+ required:
+ - spec
properties:
- identityProviders:
- description: identityProviders is an ordered list of ways for a user
- to identify themselves. When this list is empty, no identities are
- provisioned for users.
- type: array
- items:
- description: IdentityProvider provides identities for users authenticating
- using credentials
- type: object
- properties:
- basicAuth:
- description: basicAuth contains configuration options for the
- BasicAuth IdP
+ apiVersion:
+ description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
+ type: string
+ kind:
+ description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
+ type: string
+ metadata:
+ type: object
+ spec:
+ description: spec holds user settable values for configuration
+ type: object
+ properties:
+ identityProviders:
+ description: identityProviders is an ordered list of ways for a user to identify themselves. When this list is empty, no identities are provisioned for users.
+ type: array
+ items:
+ description: IdentityProvider provides identities for users authenticating using credentials
type: object
properties:
- ca:
- description: ca is an optional reference to a config map by
- name containing the PEM-encoded CA bundle. It is used as
- a trust anchor to validate the TLS certificate presented
- by the remote server. The key "ca.crt" is used to locate
- the data. If specified and the config map or expected key
- is not found, the identity provider is not honored. If the
- specified ca data is not valid, the identity provider is
- not honored. If empty, the default system roots are used.
- The namespace for this config map is openshift-config.
+ basicAuth:
+ description: basicAuth contains configuration options for the BasicAuth IdP
type: object
- required:
- - name
properties:
- name:
- description: name is the metadata.name of the referenced
- config map
+ ca:
+ description: ca is an optional reference to a config map by name containing the PEM-encoded CA bundle. It is used as a trust anchor to validate the TLS certificate presented by the remote server. The key "ca.crt" is used to locate the data. If specified and the config map or expected key is not found, the identity provider is not honored. If the specified ca data is not valid, the identity provider is not honored. If empty, the default system roots are used. The namespace for this config map is openshift-config.
+ type: object
+ required:
+ - name
+ properties:
+ name:
+ description: name is the metadata.name of the referenced config map
+ type: string
+ tlsClientCert:
+ description: tlsClientCert is an optional reference to a secret by name that contains the PEM-encoded TLS client certificate to present when connecting to the server. The key "tls.crt" is used to locate the data. If specified and the secret or expected key is not found, the identity provider is not honored. If the specified certificate data is not valid, the identity provider is not honored. The namespace for this secret is openshift-config.
+ type: object
+ required:
+ - name
+ properties:
+ name:
+ description: name is the metadata.name of the referenced secret
+ type: string
+ tlsClientKey:
+ description: tlsClientKey is an optional reference to a secret by name that contains the PEM-encoded TLS private key for the client certificate referenced in tlsClientCert. The key "tls.key" is used to locate the data. If specified and the secret or expected key is not found, the identity provider is not honored. If the specified certificate data is not valid, the identity provider is not honored. The namespace for this secret is openshift-config.
+ type: object
+ required:
+ - name
+ properties:
+ name:
+ description: name is the metadata.name of the referenced secret
+ type: string
+ url:
+ description: url is the remote URL to connect to
type: string
- tlsClientCert:
- description: tlsClientCert is an optional reference to a secret
- by name that contains the PEM-encoded TLS client certificate
- to present when connecting to the server. The key "tls.crt"
- is used to locate the data. If specified and the secret
- or expected key is not found, the identity provider is not
- honored. If the specified certificate data is not valid,
- the identity provider is not honored. The namespace for
- this secret is openshift-config.
+ github:
+ description: github enables user authentication using GitHub credentials
type: object
- required:
- - name
properties:
- name:
- description: name is the metadata.name of the referenced
- secret
+ ca:
+ description: ca is an optional reference to a config map by name containing the PEM-encoded CA bundle. It is used as a trust anchor to validate the TLS certificate presented by the remote server. The key "ca.crt" is used to locate the data. If specified and the config map or expected key is not found, the identity provider is not honored. If the specified ca data is not valid, the identity provider is not honored. If empty, the default system roots are used. This can only be configured when hostname is set to a non-empty value. The namespace for this config map is openshift-config.
+ type: object
+ required:
+ - name
+ properties:
+ name:
+ description: name is the metadata.name of the referenced config map
+ type: string
+ clientID:
+ description: clientID is the oauth client ID
type: string
- tlsClientKey:
- description: tlsClientKey is an optional reference to a secret
- by name that contains the PEM-encoded TLS private key for
- the client certificate referenced in tlsClientCert. The
- key "tls.key" is used to locate the data. If specified and
- the secret or expected key is not found, the identity provider
- is not honored. If the specified certificate data is not
- valid, the identity provider is not honored. The namespace
- for this secret is openshift-config.
- type: object
- required:
- - name
- properties:
- name:
- description: name is the metadata.name of the referenced
- secret
+ clientSecret:
+ description: clientSecret is a required reference to the secret by name containing the oauth client secret. The key "clientSecret" is used to locate the data. If the secret or expected key is not found, the identity provider is not honored. The namespace for this secret is openshift-config.
+ type: object
+ required:
+ - name
+ properties:
+ name:
+ description: name is the metadata.name of the referenced secret
+ type: string
+ hostname:
+ description: hostname is the optional domain (e.g. "mycompany.com") for use with a hosted instance of GitHub Enterprise. It must match the GitHub Enterprise settings value configured at /setup/settings#hostname.
type: string
- url:
- description: url is the remote URL to connect to
- type: string
- github:
- description: github enables user authentication using GitHub credentials
- type: object
- properties:
- ca:
- description: ca is an optional reference to a config map by
- name containing the PEM-encoded CA bundle. It is used as
- a trust anchor to validate the TLS certificate presented
- by the remote server. The key "ca.crt" is used to locate
- the data. If specified and the config map or expected key
- is not found, the identity provider is not honored. If the
- specified ca data is not valid, the identity provider is
- not honored. If empty, the default system roots are used.
- This can only be configured when hostname is set to a non-empty
- value. The namespace for this config map is openshift-config.
+ organizations:
+ description: organizations optionally restricts which organizations are allowed to log in
+ type: array
+ items:
+ type: string
+ teams:
+ description: teams optionally restricts which teams are allowed to log in. Format is /.
+ type: array
+ items:
+ type: string
+ gitlab:
+ description: gitlab enables user authentication using GitLab credentials
type: object
- required:
- - name
properties:
- name:
- description: name is the metadata.name of the referenced
- config map
+ ca:
+ description: ca is an optional reference to a config map by name containing the PEM-encoded CA bundle. It is used as a trust anchor to validate the TLS certificate presented by the remote server. The key "ca.crt" is used to locate the data. If specified and the config map or expected key is not found, the identity provider is not honored. If the specified ca data is not valid, the identity provider is not honored. If empty, the default system roots are used. The namespace for this config map is openshift-config.
+ type: object
+ required:
+ - name
+ properties:
+ name:
+ description: name is the metadata.name of the referenced config map
+ type: string
+ clientID:
+ description: clientID is the oauth client ID
type: string
- clientID:
- description: clientID is the oauth client ID
- type: string
- clientSecret:
- description: clientSecret is a required reference to the secret
- by name containing the oauth client secret. The key "clientSecret"
- is used to locate the data. If the secret or expected key
- is not found, the identity provider is not honored. The
- namespace for this secret is openshift-config.
- type: object
- required:
- - name
- properties:
- name:
- description: name is the metadata.name of the referenced
- secret
+ clientSecret:
+ description: clientSecret is a required reference to the secret by name containing the oauth client secret. The key "clientSecret" is used to locate the data. If the secret or expected key is not found, the identity provider is not honored. The namespace for this secret is openshift-config.
+ type: object
+ required:
+ - name
+ properties:
+ name:
+ description: name is the metadata.name of the referenced secret
+ type: string
+ url:
+ description: url is the oauth server base URL
type: string
- hostname:
- description: hostname is the optional domain (e.g. "mycompany.com")
- for use with a hosted instance of GitHub Enterprise. It
- must match the GitHub Enterprise settings value configured
- at /setup/settings#hostname.
- type: string
- organizations:
- description: organizations optionally restricts which organizations
- are allowed to log in
- type: array
- items:
- type: string
- teams:
- description: teams optionally restricts which teams are allowed
- to log in. Format is /.
- type: array
- items:
- type: string
- gitlab:
- description: gitlab enables user authentication using GitLab credentials
- type: object
- properties:
- ca:
- description: ca is an optional reference to a config map by
- name containing the PEM-encoded CA bundle. It is used as
- a trust anchor to validate the TLS certificate presented
- by the remote server. The key "ca.crt" is used to locate
- the data. If specified and the config map or expected key
- is not found, the identity provider is not honored. If the
- specified ca data is not valid, the identity provider is
- not honored. If empty, the default system roots are used.
- The namespace for this config map is openshift-config.
+ google:
+ description: google enables user authentication using Google credentials
type: object
- required:
- - name
properties:
- name:
- description: name is the metadata.name of the referenced
- config map
+ clientID:
+ description: clientID is the oauth client ID
type: string
- clientID:
- description: clientID is the oauth client ID
- type: string
- clientSecret:
- description: clientSecret is a required reference to the secret
- by name containing the oauth client secret. The key "clientSecret"
- is used to locate the data. If the secret or expected key
- is not found, the identity provider is not honored. The
- namespace for this secret is openshift-config.
- type: object
- required:
- - name
- properties:
- name:
- description: name is the metadata.name of the referenced
- secret
+ clientSecret:
+ description: clientSecret is a required reference to the secret by name containing the oauth client secret. The key "clientSecret" is used to locate the data. If the secret or expected key is not found, the identity provider is not honored. The namespace for this secret is openshift-config.
+ type: object
+ required:
+ - name
+ properties:
+ name:
+ description: name is the metadata.name of the referenced secret
+ type: string
+ hostedDomain:
+ description: hostedDomain is the optional Google App domain (e.g. "mycompany.com") to restrict logins to
type: string
- url:
- description: url is the oauth server base URL
- type: string
- google:
- description: google enables user authentication using Google credentials
- type: object
- properties:
- clientID:
- description: clientID is the oauth client ID
- type: string
- clientSecret:
- description: clientSecret is a required reference to the secret
- by name containing the oauth client secret. The key "clientSecret"
- is used to locate the data. If the secret or expected key
- is not found, the identity provider is not honored. The
- namespace for this secret is openshift-config.
+ htpasswd:
+ description: htpasswd enables user authentication using an HTPasswd file to validate credentials
type: object
- required:
- - name
properties:
- name:
- description: name is the metadata.name of the referenced
- secret
- type: string
- hostedDomain:
- description: hostedDomain is the optional Google App domain
- (e.g. "mycompany.com") to restrict logins to
- type: string
- htpasswd:
- description: htpasswd enables user authentication using an HTPasswd
- file to validate credentials
- type: object
- properties:
- fileData:
- description: fileData is a required reference to a secret
- by name containing the data to use as the htpasswd file.
- The key "htpasswd" is used to locate the data. If the secret
- or expected key is not found, the identity provider is not
- honored. If the specified htpasswd data is not valid, the
- identity provider is not honored. The namespace for this
- secret is openshift-config.
+ fileData:
+ description: fileData is a required reference to a secret by name containing the data to use as the htpasswd file. The key "htpasswd" is used to locate the data. If the secret or expected key is not found, the identity provider is not honored. If the specified htpasswd data is not valid, the identity provider is not honored. The namespace for this secret is openshift-config.
+ type: object
+ required:
+ - name
+ properties:
+ name:
+ description: name is the metadata.name of the referenced secret
+ type: string
+ keystone:
+ description: keystone enables user authentication using keystone password credentials
type: object
- required:
- - name
properties:
- name:
- description: name is the metadata.name of the referenced
- secret
+ ca:
+ description: ca is an optional reference to a config map by name containing the PEM-encoded CA bundle. It is used as a trust anchor to validate the TLS certificate presented by the remote server. The key "ca.crt" is used to locate the data. If specified and the config map or expected key is not found, the identity provider is not honored. If the specified ca data is not valid, the identity provider is not honored. If empty, the default system roots are used. The namespace for this config map is openshift-config.
+ type: object
+ required:
+ - name
+ properties:
+ name:
+ description: name is the metadata.name of the referenced config map
+ type: string
+ domainName:
+ description: domainName is required for keystone v3
type: string
- keystone:
- description: keystone enables user authentication using keystone
- password credentials
- type: object
- properties:
- ca:
- description: ca is an optional reference to a config map by
- name containing the PEM-encoded CA bundle. It is used as
- a trust anchor to validate the TLS certificate presented
- by the remote server. The key "ca.crt" is used to locate
- the data. If specified and the config map or expected key
- is not found, the identity provider is not honored. If the
- specified ca data is not valid, the identity provider is
- not honored. If empty, the default system roots are used.
- The namespace for this config map is openshift-config.
- type: object
- required:
- - name
- properties:
- name:
- description: name is the metadata.name of the referenced
- config map
+ tlsClientCert:
+ description: tlsClientCert is an optional reference to a secret by name that contains the PEM-encoded TLS client certificate to present when connecting to the server. The key "tls.crt" is used to locate the data. If specified and the secret or expected key is not found, the identity provider is not honored. If the specified certificate data is not valid, the identity provider is not honored. The namespace for this secret is openshift-config.
+ type: object
+ required:
+ - name
+ properties:
+ name:
+ description: name is the metadata.name of the referenced secret
+ type: string
+ tlsClientKey:
+ description: tlsClientKey is an optional reference to a secret by name that contains the PEM-encoded TLS private key for the client certificate referenced in tlsClientCert. The key "tls.key" is used to locate the data. If specified and the secret or expected key is not found, the identity provider is not honored. If the specified certificate data is not valid, the identity provider is not honored. The namespace for this secret is openshift-config.
+ type: object
+ required:
+ - name
+ properties:
+ name:
+ description: name is the metadata.name of the referenced secret
+ type: string
+ url:
+ description: url is the remote URL to connect to
type: string
- domainName:
- description: domainName is required for keystone v3
- type: string
- tlsClientCert:
- description: tlsClientCert is an optional reference to a secret
- by name that contains the PEM-encoded TLS client certificate
- to present when connecting to the server. The key "tls.crt"
- is used to locate the data. If specified and the secret
- or expected key is not found, the identity provider is not
- honored. If the specified certificate data is not valid,
- the identity provider is not honored. The namespace for
- this secret is openshift-config.
+ ldap:
+ description: ldap enables user authentication using LDAP credentials
type: object
- required:
- - name
properties:
- name:
- description: name is the metadata.name of the referenced
- secret
+ attributes:
+ description: attributes maps LDAP attributes to identities
+ type: object
+ properties:
+ email:
+ description: email is the list of attributes whose values should be used as the email address. Optional. If unspecified, no email is set for the identity
+ type: array
+ items:
+ type: string
+ id:
+ description: id is the list of attributes whose values should be used as the user ID. Required. First non-empty attribute is used. At least one attribute is required. If none of the listed attribute have a value, authentication fails. LDAP standard identity attribute is "dn"
+ type: array
+ items:
+ type: string
+ name:
+ description: name is the list of attributes whose values should be used as the display name. Optional. If unspecified, no display name is set for the identity LDAP standard display name attribute is "cn"
+ type: array
+ items:
+ type: string
+ preferredUsername:
+ description: preferredUsername is the list of attributes whose values should be used as the preferred username. LDAP standard login attribute is "uid"
+ type: array
+ items:
+ type: string
+ bindDN:
+ description: bindDN is an optional DN to bind with during the search phase.
type: string
- tlsClientKey:
- description: tlsClientKey is an optional reference to a secret
- by name that contains the PEM-encoded TLS private key for
- the client certificate referenced in tlsClientCert. The
- key "tls.key" is used to locate the data. If specified and
- the secret or expected key is not found, the identity provider
- is not honored. If the specified certificate data is not
- valid, the identity provider is not honored. The namespace
- for this secret is openshift-config.
- type: object
- required:
- - name
- properties:
- name:
- description: name is the metadata.name of the referenced
- secret
+ bindPassword:
+ description: bindPassword is an optional reference to a secret by name containing a password to bind with during the search phase. The key "bindPassword" is used to locate the data. If specified and the secret or expected key is not found, the identity provider is not honored. The namespace for this secret is openshift-config.
+ type: object
+ required:
+ - name
+ properties:
+ name:
+ description: name is the metadata.name of the referenced secret
+ type: string
+ ca:
+ description: ca is an optional reference to a config map by name containing the PEM-encoded CA bundle. It is used as a trust anchor to validate the TLS certificate presented by the remote server. The key "ca.crt" is used to locate the data. If specified and the config map or expected key is not found, the identity provider is not honored. If the specified ca data is not valid, the identity provider is not honored. If empty, the default system roots are used. The namespace for this config map is openshift-config.
+ type: object
+ required:
+ - name
+ properties:
+ name:
+ description: name is the metadata.name of the referenced config map
+ type: string
+ insecure:
+ description: 'insecure, if true, indicates the connection should not use TLS WARNING: Should not be set to `true` with the URL scheme "ldaps://" as "ldaps://" URLs always attempt to connect using TLS, even when `insecure` is set to `true` When `true`, "ldap://" URLS connect insecurely. When `false`, "ldap://" URLs are upgraded to a TLS connection using StartTLS as specified in https://tools.ietf.org/html/rfc2830.'
+ type: boolean
+ url:
+ description: 'url is an RFC 2255 URL which specifies the LDAP search parameters to use. The syntax of the URL is: ldap://host:port/basedn?attribute?scope?filter'
type: string
- url:
- description: url is the remote URL to connect to
+ mappingMethod:
+ description: mappingMethod determines how identities from this provider are mapped to users Defaults to "claim"
type: string
- ldap:
- description: ldap enables user authentication using LDAP credentials
- type: object
- properties:
- attributes:
- description: attributes maps LDAP attributes to identities
+ name:
+ description: 'name is used to qualify the identities returned by this provider. - It MUST be unique and not shared by any other identity provider used - It MUST be a valid path segment: name cannot equal "." or ".." or contain "/" or "%" or ":" Ref: https://godoc.org/github.com/openshift/origin/pkg/user/apis/user/validation#ValidateIdentityProviderName'
+ type: string
+ openID:
+ description: openID enables user authentication using OpenID credentials
type: object
properties:
- email:
- description: email is the list of attributes whose values
- should be used as the email address. Optional. If unspecified,
- no email is set for the identity
- type: array
- items:
+ ca:
+ description: ca is an optional reference to a config map by name containing the PEM-encoded CA bundle. It is used as a trust anchor to validate the TLS certificate presented by the remote server. The key "ca.crt" is used to locate the data. If specified and the config map or expected key is not found, the identity provider is not honored. If the specified ca data is not valid, the identity provider is not honored. If empty, the default system roots are used. The namespace for this config map is openshift-config.
+ type: object
+ required:
+ - name
+ properties:
+ name:
+ description: name is the metadata.name of the referenced config map
+ type: string
+ claims:
+ description: claims mappings
+ type: object
+ properties:
+ email:
+ description: email is the list of claims whose values should be used as the email address. Optional. If unspecified, no email is set for the identity
+ type: array
+ items:
+ type: string
+ name:
+ description: name is the list of claims whose values should be used as the display name. Optional. If unspecified, no display name is set for the identity
+ type: array
+ items:
+ type: string
+ preferredUsername:
+ description: preferredUsername is the list of claims whose values should be used as the preferred username. If unspecified, the preferred username is determined from the value of the sub claim
+ type: array
+ items:
+ type: string
+ clientID:
+ description: clientID is the oauth client ID
+ type: string
+ clientSecret:
+ description: clientSecret is a required reference to the secret by name containing the oauth client secret. The key "clientSecret" is used to locate the data. If the secret or expected key is not found, the identity provider is not honored. The namespace for this secret is openshift-config.
+ type: object
+ required:
+ - name
+ properties:
+ name:
+ description: name is the metadata.name of the referenced secret
+ type: string
+ extraAuthorizeParameters:
+ description: extraAuthorizeParameters are any custom parameters to add to the authorize request.
+ type: object
+ additionalProperties:
type: string
- id:
- description: id is the list of attributes whose values
- should be used as the user ID. Required. First non-empty
- attribute is used. At least one attribute is required.
- If none of the listed attribute have a value, authentication
- fails. LDAP standard identity attribute is "dn"
+ extraScopes:
+ description: extraScopes are any scopes to request in addition to the standard "openid" scope.
type: array
items:
type: string
- name:
- description: name is the list of attributes whose values
- should be used as the display name. Optional. If unspecified,
- no display name is set for the identity LDAP standard
- display name attribute is "cn"
+ issuer:
+ description: issuer is the URL that the OpenID Provider asserts as its Issuer Identifier. It must use the https scheme with no query or fragment component.
+ type: string
+ requestHeader:
+ description: requestHeader enables user authentication using request header credentials
+ type: object
+ properties:
+ ca:
+ description: ca is a required reference to a config map by name containing the PEM-encoded CA bundle. It is used as a trust anchor to validate the TLS certificate presented by the remote server. Specifically, it allows verification of incoming requests to prevent header spoofing. The key "ca.crt" is used to locate the data. If the config map or expected key is not found, the identity provider is not honored. If the specified ca data is not valid, the identity provider is not honored. The namespace for this config map is openshift-config.
+ type: object
+ required:
+ - name
+ properties:
+ name:
+ description: name is the metadata.name of the referenced config map
+ type: string
+ challengeURL:
+ description: challengeURL is a URL to redirect unauthenticated /authorize requests to Unauthenticated requests from OAuth clients which expect WWW-Authenticate challenges will be redirected here. ${url} is replaced with the current URL, escaped to be safe in a query parameter https://www.example.com/sso-login?then=${url} ${query} is replaced with the current query string https://www.example.com/auth-proxy/oauth/authorize?${query} Required when challenge is set to true.
+ type: string
+ clientCommonNames:
+ description: clientCommonNames is an optional list of common names to require a match from. If empty, any client certificate validated against the clientCA bundle is considered authoritative.
type: array
items:
type: string
- preferredUsername:
- description: preferredUsername is the list of attributes
- whose values should be used as the preferred username.
- LDAP standard login attribute is "uid"
+ emailHeaders:
+ description: emailHeaders is the set of headers to check for the email address
type: array
items:
type: string
- bindDN:
- description: bindDN is an optional DN to bind with during
- the search phase.
- type: string
- bindPassword:
- description: bindPassword is an optional reference to a secret
- by name containing a password to bind with during the search
- phase. The key "bindPassword" is used to locate the data.
- If specified and the secret or expected key is not found,
- the identity provider is not honored. The namespace for
- this secret is openshift-config.
- type: object
- required:
- - name
- properties:
- name:
- description: name is the metadata.name of the referenced
- secret
- type: string
- ca:
- description: ca is an optional reference to a config map by
- name containing the PEM-encoded CA bundle. It is used as
- a trust anchor to validate the TLS certificate presented
- by the remote server. The key "ca.crt" is used to locate
- the data. If specified and the config map or expected key
- is not found, the identity provider is not honored. If the
- specified ca data is not valid, the identity provider is
- not honored. If empty, the default system roots are used.
- The namespace for this config map is openshift-config.
- type: object
- required:
- - name
- properties:
- name:
- description: name is the metadata.name of the referenced
- config map
- type: string
- insecure:
- description: 'insecure, if true, indicates the connection
- should not use TLS WARNING: Should not be set to `true`
- with the URL scheme "ldaps://" as "ldaps://" URLs always attempt
- to connect using TLS, even when `insecure` is set to `true`
- When `true`, "ldap://" URLS connect insecurely. When `false`,
- "ldap://" URLs are upgraded to a TLS connection using StartTLS
- as specified in https://tools.ietf.org/html/rfc2830.'
- type: boolean
- url:
- description: 'url is an RFC 2255 URL which specifies the LDAP
- search parameters to use. The syntax of the URL is: ldap://host:port/basedn?attribute?scope?filter'
- type: string
- mappingMethod:
- description: mappingMethod determines how identities from this
- provider are mapped to users Defaults to "claim"
- type: string
- name:
- description: 'name is used to qualify the identities returned
- by this provider. - It MUST be unique and not shared by any
- other identity provider used - It MUST be a valid path segment:
- name cannot equal "." or ".." or contain "/" or "%" or ":" Ref:
- https://godoc.org/github.com/openshift/origin/pkg/user/apis/user/validation#ValidateIdentityProviderName'
- type: string
- openID:
- description: openID enables user authentication using OpenID credentials
- type: object
- properties:
- ca:
- description: ca is an optional reference to a config map by
- name containing the PEM-encoded CA bundle. It is used as
- a trust anchor to validate the TLS certificate presented
- by the remote server. The key "ca.crt" is used to locate
- the data. If specified and the config map or expected key
- is not found, the identity provider is not honored. If the
- specified ca data is not valid, the identity provider is
- not honored. If empty, the default system roots are used.
- The namespace for this config map is openshift-config.
- type: object
- required:
- - name
- properties:
- name:
- description: name is the metadata.name of the referenced
- config map
- type: string
- claims:
- description: claims mappings
- type: object
- properties:
- email:
- description: email is the list of claims whose values
- should be used as the email address. Optional. If unspecified,
- no email is set for the identity
+ headers:
+ description: headers is the set of headers to check for identity information
type: array
items:
type: string
- name:
- description: name is the list of claims whose values should
- be used as the display name. Optional. If unspecified,
- no display name is set for the identity
+ loginURL:
+ description: loginURL is a URL to redirect unauthenticated /authorize requests to Unauthenticated requests from OAuth clients which expect interactive logins will be redirected here ${url} is replaced with the current URL, escaped to be safe in a query parameter https://www.example.com/sso-login?then=${url} ${query} is replaced with the current query string https://www.example.com/auth-proxy/oauth/authorize?${query} Required when login is set to true.
+ type: string
+ nameHeaders:
+ description: nameHeaders is the set of headers to check for the display name
type: array
items:
type: string
- preferredUsername:
- description: preferredUsername is the list of claims whose
- values should be used as the preferred username. If
- unspecified, the preferred username is determined from
- the value of the sub claim
+ preferredUsernameHeaders:
+ description: preferredUsernameHeaders is the set of headers to check for the preferred username
type: array
items:
type: string
- clientID:
- description: clientID is the oauth client ID
+ type:
+ description: type identifies the identity provider type for this entry.
type: string
- clientSecret:
- description: clientSecret is a required reference to the secret
- by name containing the oauth client secret. The key "clientSecret"
- is used to locate the data. If the secret or expected key
- is not found, the identity provider is not honored. The
- namespace for this secret is openshift-config.
- type: object
- required:
+ templates:
+ description: templates allow you to customize pages like the login page.
+ type: object
+ properties:
+ error:
+ description: error is the name of a secret that specifies a go template to use to render error pages during the authentication or grant flow. The key "errors.html" is used to locate the template data. If specified and the secret or expected key is not found, the default error page is used. If the specified template is not valid, the default error page is used. If unspecified, the default error page is used. The namespace for this secret is openshift-config.
+ type: object
+ required:
- name
- properties:
- name:
- description: name is the metadata.name of the referenced
- secret
- type: string
- extraAuthorizeParameters:
- description: extraAuthorizeParameters are any custom parameters
- to add to the authorize request.
- type: object
- additionalProperties:
+ properties:
+ name:
+ description: name is the metadata.name of the referenced secret
type: string
- extraScopes:
- description: extraScopes are any scopes to request in addition
- to the standard "openid" scope.
- type: array
- items:
- type: string
- issuer:
- description: issuer is the URL that the OpenID Provider asserts
- as its Issuer Identifier. It must use the https scheme with
- no query or fragment component.
- type: string
- requestHeader:
- description: requestHeader enables user authentication using request
- header credentials
- type: object
- properties:
- ca:
- description: ca is a required reference to a config map by
- name containing the PEM-encoded CA bundle. It is used as
- a trust anchor to validate the TLS certificate presented
- by the remote server. Specifically, it allows verification
- of incoming requests to prevent header spoofing. The key
- "ca.crt" is used to locate the data. If the config map or
- expected key is not found, the identity provider is not
- honored. If the specified ca data is not valid, the identity
- provider is not honored. The namespace for this config map
- is openshift-config.
- type: object
- required:
+ login:
+ description: login is the name of a secret that specifies a go template to use to render the login page. The key "login.html" is used to locate the template data. If specified and the secret or expected key is not found, the default login page is used. If the specified template is not valid, the default login page is used. If unspecified, the default login page is used. The namespace for this secret is openshift-config.
+ type: object
+ required:
- name
- properties:
- name:
- description: name is the metadata.name of the referenced
- config map
- type: string
- challengeURL:
- description: challengeURL is a URL to redirect unauthenticated
- /authorize requests to Unauthenticated requests from OAuth
- clients which expect WWW-Authenticate challenges will be
- redirected here. ${url} is replaced with the current URL,
- escaped to be safe in a query parameter https://www.example.com/sso-login?then=${url}
- ${query} is replaced with the current query string https://www.example.com/auth-proxy/oauth/authorize?${query}
- Required when challenge is set to true.
- type: string
- clientCommonNames:
- description: clientCommonNames is an optional list of common
- names to require a match from. If empty, any client certificate
- validated against the clientCA bundle is considered authoritative.
- type: array
- items:
- type: string
- emailHeaders:
- description: emailHeaders is the set of headers to check for
- the email address
- type: array
- items:
- type: string
- headers:
- description: headers is the set of headers to check for identity
- information
- type: array
- items:
+ properties:
+ name:
+ description: name is the metadata.name of the referenced secret
type: string
- loginURL:
- description: loginURL is a URL to redirect unauthenticated
- /authorize requests to Unauthenticated requests from OAuth
- clients which expect interactive logins will be redirected
- here ${url} is replaced with the current URL, escaped to
- be safe in a query parameter https://www.example.com/sso-login?then=${url}
- ${query} is replaced with the current query string https://www.example.com/auth-proxy/oauth/authorize?${query}
- Required when login is set to true.
- type: string
- nameHeaders:
- description: nameHeaders is the set of headers to check for
- the display name
- type: array
- items:
- type: string
- preferredUsernameHeaders:
- description: preferredUsernameHeaders is the set of headers
- to check for the preferred username
- type: array
- items:
+ providerSelection:
+ description: providerSelection is the name of a secret that specifies a go template to use to render the provider selection page. The key "providers.html" is used to locate the template data. If specified and the secret or expected key is not found, the default provider selection page is used. If the specified template is not valid, the default provider selection page is used. If unspecified, the default provider selection page is used. The namespace for this secret is openshift-config.
+ type: object
+ required:
+ - name
+ properties:
+ name:
+ description: name is the metadata.name of the referenced secret
type: string
- type:
- description: type identifies the identity provider type for this
- entry.
- type: string
- templates:
- description: templates allow you to customize pages like the login page.
- type: object
- properties:
- error:
- description: error is the name of a secret that specifies a go template
- to use to render error pages during the authentication or grant
- flow. The key "errors.html" is used to locate the template data.
- If specified and the secret or expected key is not found, the
- default error page is used. If the specified template is not valid,
- the default error page is used. If unspecified, the default error
- page is used. The namespace for this secret is openshift-config.
+ tokenConfig:
+ description: tokenConfig contains options for authorization and access tokens
type: object
- required:
- - name
properties:
- name:
- description: name is the metadata.name of the referenced secret
+ accessTokenInactivityTimeout:
+ description: accessTokenInactivityTimeout defines the token inactivity timeout for tokens granted by any client. The value represents the maximum amount of time that can occur between consecutive uses of the token. Tokens become invalid if they are not used within this temporal window. The user will need to acquire a new token to regain access once a token times out. Takes valid time duration string such as "5m", "1.5h" or "2h45m". The minimum allowed value for duration is 300s (5 minutes). If the timeout is configured per client, then that value takes precedence. If the timeout value is not specified and the client does not override the value, then tokens are valid until their lifetime.
type: string
- login:
- description: login is the name of a secret that specifies a go template
- to use to render the login page. The key "login.html" is used
- to locate the template data. If specified and the secret or expected
- key is not found, the default login page is used. If the specified
- template is not valid, the default login page is used. If unspecified,
- the default login page is used. The namespace for this secret
- is openshift-config.
- type: object
- required:
- - name
- properties:
- name:
- description: name is the metadata.name of the referenced secret
- type: string
- providerSelection:
- description: providerSelection is the name of a secret that specifies
- a go template to use to render the provider selection page. The
- key "providers.html" is used to locate the template data. If specified
- and the secret or expected key is not found, the default provider
- selection page is used. If the specified template is not valid,
- the default provider selection page is used. If unspecified, the
- default provider selection page is used. The namespace for this
- secret is openshift-config.
- type: object
- required:
- - name
- properties:
- name:
- description: name is the metadata.name of the referenced secret
- type: string
- tokenConfig:
- description: tokenConfig contains options for authorization and access
- tokens
+ accessTokenInactivityTimeoutSeconds:
+ description: 'accessTokenInactivityTimeoutSeconds - DEPRECATED: setting this field has no effect.'
+ type: integer
+ format: int32
+ accessTokenMaxAgeSeconds:
+ description: accessTokenMaxAgeSeconds defines the maximum age of access tokens
+ type: integer
+ format: int32
+ status:
+ description: status holds observed values from the cluster. They may not be overridden.
type: object
- properties:
- accessTokenInactivityTimeoutSeconds:
- description: 'accessTokenInactivityTimeoutSeconds defines the default
- token inactivity timeout for tokens granted by any client. The
- value represents the maximum amount of time that can occur between
- consecutive uses of the token. Tokens become invalid if they are
- not used within this temporal window. The user will need to acquire
- a new token to regain access once a token times out. Valid values
- are integer values: x < 0 Tokens time out is enabled but tokens
- never timeout unless configured per client (e.g. `-1`) x = 0 Tokens
- time out is disabled (default) x > 0 Tokens time out if there
- is no activity for x seconds The current minimum allowed value
- for X is 300 (5 minutes)'
- type: integer
- format: int32
- accessTokenMaxAgeSeconds:
- description: accessTokenMaxAgeSeconds defines the maximum age of
- access tokens
- type: integer
- format: int32
- status:
- description: OAuthStatus shows current known state of OAuth server in the
- cluster
- type: object
+ served: true
+ storage: true
+ subresources:
+ status: {}
diff --git a/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_project.crd.yaml b/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_project.crd.yaml
index a625aa61716..ccc0981e1ab 100644
--- a/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_project.crd.yaml
+++ b/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_project.crd.yaml
@@ -1,63 +1,55 @@
-apiVersion: apiextensions.k8s.io/v1beta1
+apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
+ annotations:
+ api-approved.openshift.io: https://github.com/openshift/api/pull/470
+ include.release.openshift.io/ibm-cloud-managed: "true"
+ include.release.openshift.io/self-managed-high-availability: "true"
+ include.release.openshift.io/single-node-developer: "true"
name: projects.config.openshift.io
spec:
group: config.openshift.io
- scope: Cluster
- preserveUnknownFields: false
- versions:
- - name: v1
- served: true
- storage: true
names:
kind: Project
listKind: ProjectList
plural: projects
singular: project
- subresources:
- status: {}
- "validation":
- "openAPIV3Schema":
- description: Project holds cluster-wide information about Project. The canonical
- name is `cluster`
- type: object
- required:
- - spec
- properties:
- apiVersion:
- description: 'APIVersion defines the versioned schema of this representation
- of an object. Servers should convert recognized schemas to the latest
- internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
- type: string
- kind:
- description: 'Kind is a string value representing the REST resource this
- object represents. Servers may infer this from the endpoint the client
- submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
- type: string
- metadata:
- type: object
- spec:
- description: spec holds user settable values for configuration
+ scope: Cluster
+ versions:
+ - name: v1
+ schema:
+ openAPIV3Schema:
+ description: Project holds cluster-wide information about Project. The canonical name is `cluster`
type: object
+ required:
+ - spec
properties:
- projectRequestMessage:
- description: projectRequestMessage is the string presented to a user
- if they are unable to request a project via the projectrequest api
- endpoint
+ apiVersion:
+ description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
type: string
- projectRequestTemplate:
- description: projectRequestTemplate is the template to use for creating
- projects in response to projectrequest. This must point to a template
- in 'openshift-config' namespace. It is optional. If it is not specified,
- a default template is used.
+ kind:
+ description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
+ type: string
+ metadata:
+ type: object
+ spec:
+ description: spec holds user settable values for configuration
type: object
properties:
- name:
- description: name is the metadata.name of the referenced project
- request template
+ projectRequestMessage:
+ description: projectRequestMessage is the string presented to a user if they are unable to request a project via the projectrequest api endpoint
type: string
- status:
- description: status holds observed values from the cluster. They may not
- be overridden.
- type: object
+ projectRequestTemplate:
+ description: projectRequestTemplate is the template to use for creating projects in response to projectrequest. This must point to a template in 'openshift-config' namespace. It is optional. If it is not specified, a default template is used.
+ type: object
+ properties:
+ name:
+ description: name is the metadata.name of the referenced project request template
+ type: string
+ status:
+ description: status holds observed values from the cluster. They may not be overridden.
+ type: object
+ served: true
+ storage: true
+ subresources:
+ status: {}
diff --git a/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_scheduler.crd.yaml b/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_scheduler.crd.yaml
index 6f5336c8f6d..86122ed06cb 100644
--- a/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_scheduler.crd.yaml
+++ b/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_scheduler.crd.yaml
@@ -1,88 +1,68 @@
-apiVersion: apiextensions.k8s.io/v1beta1
+apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
+ annotations:
+ api-approved.openshift.io: https://github.com/openshift/api/pull/470
+ include.release.openshift.io/ibm-cloud-managed: "true"
+ include.release.openshift.io/self-managed-high-availability: "true"
+ include.release.openshift.io/single-node-developer: "true"
name: schedulers.config.openshift.io
spec:
group: config.openshift.io
- scope: Cluster
- preserveUnknownFields: false
names:
kind: Scheduler
- singular: scheduler
- plural: schedulers
listKind: SchedulerList
+ plural: schedulers
+ singular: scheduler
+ scope: Cluster
versions:
- - name: v1
- served: true
- storage: true
- subresources:
- status: {}
- "validation":
- "openAPIV3Schema":
- description: Scheduler holds cluster-wide config information to run the Kubernetes
- Scheduler and influence its placement decisions. The canonical name for this
- config is `cluster`.
- type: object
- required:
- - spec
- properties:
- apiVersion:
- description: 'APIVersion defines the versioned schema of this representation
- of an object. Servers should convert recognized schemas to the latest
- internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
- type: string
- kind:
- description: 'Kind is a string value representing the REST resource this
- object represents. Servers may infer this from the endpoint the client
- submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
- type: string
- metadata:
- type: object
- spec:
- description: spec holds user settable values for configuration
+ - name: v1
+ schema:
+ openAPIV3Schema:
+ description: Scheduler holds cluster-wide config information to run the Kubernetes Scheduler and influence its placement decisions. The canonical name for this config is `cluster`.
type: object
+ required:
+ - spec
properties:
- defaultNodeSelector:
- description: 'defaultNodeSelector helps set the cluster-wide default
- node selector to restrict pod placement to specific nodes. This is
- applied to the pods created in all namespaces without a specified
- nodeSelector value. For example, defaultNodeSelector: "type=user-node,region=east"
- would set nodeSelector field in pod spec to "type=user-node,region=east"
- to all pods created in all namespaces. Namespaces having project-wide
- node selectors won''t be impacted even if this field is set. This
- adds an annotation section to the namespace. For example, if a new
- namespace is created with node-selector=''type=user-node,region=east'',
- the annotation openshift.io/node-selector: type=user-node,region=east
- gets added to the project. When the openshift.io/node-selector annotation
- is set on the project the value is used in preference to the value
- we are setting for defaultNodeSelector field. For instance, openshift.io/node-selector:
- "type=user-node,region=west" means that the default of "type=user-node,region=east"
- set in defaultNodeSelector would not be applied.'
+ apiVersion:
+ description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
+ type: string
+ kind:
+ description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type: string
- mastersSchedulable:
- description: 'MastersSchedulable allows masters nodes to be schedulable.
- When this flag is turned on, all the master nodes in the cluster will
- be made schedulable, so that workload pods can run on them. The default
- value for this field is false, meaning none of the master nodes are
- schedulable. Important Note: Once the workload pods start running
- on the master nodes, extreme care must be taken to ensure that cluster-critical
- control plane components are not impacted. Please turn on this field
- after doing due diligence.'
- type: boolean
- policy:
- description: policy is a reference to a ConfigMap containing scheduler
- policy which has user specified predicates and priorities. If this
- ConfigMap is not available scheduler will default to use DefaultAlgorithmProvider.
- The namespace for this configmap is openshift-config.
+ metadata:
+ type: object
+ spec:
+ description: spec holds user settable values for configuration
type: object
- required:
- - name
properties:
- name:
- description: name is the metadata.name of the referenced config
- map
+ defaultNodeSelector:
+ description: 'defaultNodeSelector helps set the cluster-wide default node selector to restrict pod placement to specific nodes. This is applied to the pods created in all namespaces and creates an intersection with any existing nodeSelectors already set on a pod, additionally constraining that pod''s selector. For example, defaultNodeSelector: "type=user-node,region=east" would set nodeSelector field in pod spec to "type=user-node,region=east" to all pods created in all namespaces. Namespaces having project-wide node selectors won''t be impacted even if this field is set. This adds an annotation section to the namespace. For example, if a new namespace is created with node-selector=''type=user-node,region=east'', the annotation openshift.io/node-selector: type=user-node,region=east gets added to the project. When the openshift.io/node-selector annotation is set on the project the value is used in preference to the value we are setting for defaultNodeSelector field. For instance, openshift.io/node-selector: "type=user-node,region=west" means that the default of "type=user-node,region=east" set in defaultNodeSelector would not be applied.'
type: string
- status:
- description: status holds observed values from the cluster. They may not
- be overridden.
- type: object
+ mastersSchedulable:
+ description: 'MastersSchedulable allows masters nodes to be schedulable. When this flag is turned on, all the master nodes in the cluster will be made schedulable, so that workload pods can run on them. The default value for this field is false, meaning none of the master nodes are schedulable. Important Note: Once the workload pods start running on the master nodes, extreme care must be taken to ensure that cluster-critical control plane components are not impacted. Please turn on this field after doing due diligence.'
+ type: boolean
+ policy:
+ description: 'DEPRECATED: the scheduler Policy API has been deprecated and will be removed in a future release. policy is a reference to a ConfigMap containing scheduler policy which has user specified predicates and priorities. If this ConfigMap is not available scheduler will default to use DefaultAlgorithmProvider. The namespace for this configmap is openshift-config.'
+ type: object
+ required:
+ - name
+ properties:
+ name:
+ description: name is the metadata.name of the referenced config map
+ type: string
+ profile:
+ description: "profile sets which scheduling profile should be set in order to configure scheduling decisions for new pods. \n Valid values are \"LowNodeUtilization\", \"HighNodeUtilization\", \"NoScoring\" Defaults to \"LowNodeUtilization\""
+ type: string
+ enum:
+ - ""
+ - LowNodeUtilization
+ - HighNodeUtilization
+ - NoScoring
+ status:
+ description: status holds observed values from the cluster. They may not be overridden.
+ type: object
+ served: true
+ storage: true
+ subresources:
+ status: {}
diff --git a/vendor/github.com/openshift/api/config/v1/types_apiserver.go b/vendor/github.com/openshift/api/config/v1/types_apiserver.go
index b347bd80eb6..013105e360a 100644
--- a/vendor/github.com/openshift/api/config/v1/types_apiserver.go
+++ b/vendor/github.com/openshift/api/config/v1/types_apiserver.go
@@ -14,9 +14,11 @@ import (
type APIServer struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
+ // spec holds user settable values for configuration
// +kubebuilder:validation:Required
// +required
Spec APIServerSpec `json:"spec"`
+ // status holds observed values from the cluster. They may not be overridden.
// +optional
Status APIServerStatus `json:"status"`
}
@@ -44,11 +46,49 @@ type APIServerSpec struct {
Encryption APIServerEncryption `json:"encryption"`
// tlsSecurityProfile specifies settings for TLS connections for externally exposed servers.
//
- // If unset, a default (which may change between releases) is chosen. Note that only Old and
- // Intermediate profiles are currently supported, and the maximum available MinTLSVersions
- // is VersionTLS12.
+ // If unset, a default (which may change between releases) is chosen. Note that only Old,
+ // Intermediate and Custom profiles are currently supported, and the maximum available
+ // MinTLSVersions is VersionTLS12.
// +optional
TLSSecurityProfile *TLSSecurityProfile `json:"tlsSecurityProfile,omitempty"`
+ // audit specifies the settings for audit configuration to be applied to all OpenShift-provided
+ // API servers in the cluster.
+ // +optional
+ // +kubebuilder:default={profile: Default}
+ Audit Audit `json:"audit"`
+}
+
+// AuditProfileType defines the audit policy profile type.
+// +kubebuilder:validation:Enum=Default;WriteRequestBodies;AllRequestBodies
+type AuditProfileType string
+
+const (
+ // "Default" is the existing default audit configuration policy.
+ AuditProfileDefaultType AuditProfileType = "Default"
+
+ // "WriteRequestBodies" is similar to Default but it logs request and response
+ // HTTP payloads for write requests (create, update, patch)
+ WriteRequestBodiesAuditProfileType AuditProfileType = "WriteRequestBodies"
+
+ // "AllRequestBodies" is similar to WriteRequestBodies, but also logs request
+ // and response HTTP payloads for read requests (get, list).
+ AllRequestBodiesAuditProfileType AuditProfileType = "AllRequestBodies"
+)
+
+type Audit struct {
+ // profile specifies the name of the desired audit policy configuration to be deployed to
+ // all OpenShift-provided API servers in the cluster.
+ //
+ // The following profiles are provided:
+ // - Default: the existing default policy.
+ // - WriteRequestBodies: like 'Default', but logs request and response HTTP payloads for
+ // write requests (create, update, patch).
+ // - AllRequestBodies: like 'WriteRequestBodies', but also logs request and response
+ // HTTP payloads for read requests (get, list).
+ //
+ // If unset, the 'Default' profile is used as the default.
+ // +kubebuilder:default=Default
+ Profile AuditProfileType `json:"profile,omitempty"`
}
type APIServerServingCerts struct {
diff --git a/vendor/github.com/openshift/api/config/v1/types_authentication.go b/vendor/github.com/openshift/api/config/v1/types_authentication.go
index eecfe75e7c1..0d1041bd5f5 100644
--- a/vendor/github.com/openshift/api/config/v1/types_authentication.go
+++ b/vendor/github.com/openshift/api/config/v1/types_authentication.go
@@ -43,13 +43,27 @@ type AuthenticationSpec struct {
// +optional
OAuthMetadata ConfigMapNameReference `json:"oauthMetadata"`
- // webhookTokenAuthenticators configures remote token reviewers.
+ // webhookTokenAuthenticators is DEPRECATED, setting it has no effect.
+ WebhookTokenAuthenticators []DeprecatedWebhookTokenAuthenticator `json:"webhookTokenAuthenticators,omitempty"`
+
+ // webhookTokenAuthenticator configures a remote token reviewer.
// These remote authentication webhooks can be used to verify bearer tokens
- // via the tokenreviews.authentication.k8s.io REST API. This is required to
+ // via the tokenreviews.authentication.k8s.io REST API. This is required to
// honor bearer tokens that are provisioned by an external authentication service.
- // The namespace for these secrets is openshift-config.
// +optional
- WebhookTokenAuthenticators []WebhookTokenAuthenticator `json:"webhookTokenAuthenticators,omitempty"`
+ WebhookTokenAuthenticator *WebhookTokenAuthenticator `json:"webhookTokenAuthenticator,omitempty"`
+
+ // serviceAccountIssuer is the identifier of the bound service account token
+ // issuer.
+ // The default is https://kubernetes.default.svc
+ // WARNING: Updating this field will result in the invalidation of
+ // all bound tokens with the previous issuer value. Unless the
+ // holder of a bound token has explicit support for a change in
+ // issuer, they will not request a new bound token until pod
+ // restart or until their existing token exceeds 80% of its
+ // duration.
+ // +optional
+ ServiceAccountIssuer string `json:"serviceAccountIssuer"`
}
type AuthenticationStatus struct {
@@ -97,8 +111,9 @@ const (
// AuthenticationTypeKeycloak AuthenticationType = "Keycloak"
)
-// webhookTokenAuthenticator holds the necessary configuration options for a remote token authenticator
-type WebhookTokenAuthenticator struct {
+// deprecatedWebhookTokenAuthenticator holds the necessary configuration options for a remote token authenticator.
+// It's the same as WebhookTokenAuthenticator but it's missing the 'required' validation on KubeConfig field.
+type DeprecatedWebhookTokenAuthenticator struct {
// kubeConfig contains kube config file data which describes how to access the remote webhook service.
// For further details, see:
// https://kubernetes.io/docs/reference/access-authn-authz/authentication/#webhook-token-authentication
@@ -109,6 +124,24 @@ type WebhookTokenAuthenticator struct {
KubeConfig SecretNameReference `json:"kubeConfig"`
}
+// webhookTokenAuthenticator holds the necessary configuration options for a remote token authenticator
+type WebhookTokenAuthenticator struct {
+ // kubeConfig references a secret that contains kube config file data which
+ // describes how to access the remote webhook service.
+ // The namespace for the referenced secret is openshift-config.
+ //
+ // For further details, see:
+ //
+ // https://kubernetes.io/docs/reference/access-authn-authz/authentication/#webhook-token-authentication
+ //
+ // The key "kubeConfig" is used to locate the data.
+ // If the secret or expected key is not found, the webhook is not honored.
+ // If the specified kube config data is not valid, the webhook is not honored.
+ // +kubebuilder:validation:Required
+ // +required
+ KubeConfig SecretNameReference `json:"kubeConfig"`
+}
+
const (
// OAuthMetadataKey is the key for the oauth authorization server metadata
OAuthMetadataKey = "oauthMetadata"
diff --git a/vendor/github.com/openshift/api/config/v1/types_build.go b/vendor/github.com/openshift/api/config/v1/types_build.go
index ef4512aa170..16882e1caf0 100644
--- a/vendor/github.com/openshift/api/config/v1/types_build.go
+++ b/vendor/github.com/openshift/api/config/v1/types_build.go
@@ -97,6 +97,13 @@ type BuildOverrides struct {
// tolerations set on a build pod.
// +optional
Tolerations []corev1.Toleration `json:"tolerations,omitempty"`
+
+ // ForcePull overrides, if set, the equivalent value in the builds,
+ // i.e. false disables force pull for all builds,
+ // true enables force pull for all builds,
+ // independently of what each build specifies itself
+ // +optional
+ ForcePull *bool `json:"forcePull,omitempty"`
}
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
diff --git a/vendor/github.com/openshift/api/config/v1/types_cluster_operator.go b/vendor/github.com/openshift/api/config/v1/types_cluster_operator.go
index e4718d59f46..3339a8688cb 100644
--- a/vendor/github.com/openshift/api/config/v1/types_cluster_operator.go
+++ b/vendor/github.com/openshift/api/config/v1/types_cluster_operator.go
@@ -16,7 +16,7 @@ type ClusterOperator struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata"`
- // spec hold the intent of how this operator should behave.
+ // spec holds configuration that could apply to any operator.
// +kubebuilder:validation:Required
// +required
Spec ClusterOperatorSpec `json:"spec"`
@@ -130,7 +130,8 @@ type ClusterOperatorStatusCondition struct {
Reason string `json:"reason,omitempty"`
// message provides additional information about the current condition.
- // This is only to be consumed by humans.
+ // This is only to be consumed by humans. It may contain Line Feed
+ // characters (U+000A), which should be rendered as new lines.
// +optional
Message string `json:"message,omitempty"`
}
@@ -141,6 +142,8 @@ type ClusterStatusConditionType string
const (
// Available indicates that the operand (eg: openshift-apiserver for the
// openshift-apiserver-operator), is functional and available in the cluster.
+ // Available=False means at least part of the component is non-functional,
+ // and that the condition requires immediate administrator intervention.
OperatorAvailable ClusterStatusConditionType = "Available"
// Progressing indicates that the operator is actively rolling out new code,
@@ -149,11 +152,7 @@ const (
// a previously known state.
OperatorProgressing ClusterStatusConditionType = "Progressing"
- // Degraded indicates that the operand is not functioning completely. An example of a degraded state
- // would be if there should be 5 copies of the operand running but only 4 are running. It may still be available,
- // but it is degraded
-
- // Degraded indicated that the operator's current state does not match its
+ // Degraded indicates that the operator's current state does not match its
// desired state over a period of time resulting in a lower quality of service.
// The period of time may vary by component, but a Degraded state represents
// persistent observation of a condition. As a result, a component should not
@@ -165,13 +164,13 @@ const (
// persist over a long enough period to report Degraded. A service should not
// report Degraded during the course of a normal upgrade. A service may report
// Degraded in response to a persistent infrastructure failure that requires
- // administrator intervention. For example, if a control plane host is unhealthy
- // and must be replaced. An operator should report Degraded if unexpected
- // errors occur over a period, but the expectation is that all unexpected errors
- // are handled as operators mature.
+ // eventual administrator intervention. For example, if a control plane host
+ // is unhealthy and must be replaced. An operator should report Degraded if
+ // unexpected errors occur over a period, but the expectation is that all
+ // unexpected errors are handled as operators mature.
OperatorDegraded ClusterStatusConditionType = "Degraded"
- // Upgradeable indicates whether the operator is in a state that is safe to upgrade. When status is `False`
+ // Upgradeable indicates whether the operator safe to upgrade based on the current cluster state. When status is `False`
// administrators should not upgrade their cluster and the message field should contain a human readable description
// of what the administrator should do to allow the operator to successfully update. A missing condition, True,
// and Unknown are all treated by the CVO as allowing an upgrade.
diff --git a/vendor/github.com/openshift/api/config/v1/types_cluster_version.go b/vendor/github.com/openshift/api/config/v1/types_cluster_version.go
index 771e962add0..58a65228da4 100644
--- a/vendor/github.com/openshift/api/config/v1/types_cluster_version.go
+++ b/vendor/github.com/openshift/api/config/v1/types_cluster_version.go
@@ -84,7 +84,7 @@ type ClusterVersionStatus struct {
// with the information available, which may be an image or a tag.
// +kubebuilder:validation:Required
// +required
- Desired Update `json:"desired"`
+ Desired Release `json:"desired"`
// history contains a list of the most recent versions applied to the cluster.
// This value may be empty during cluster startup, and then will be updated
@@ -127,7 +127,7 @@ type ClusterVersionStatus struct {
// +nullable
// +kubebuilder:validation:Required
// +required
- AvailableUpdates []Update `json:"availableUpdates"`
+ AvailableUpdates []Release `json:"availableUpdates"`
}
// UpdateState is a constant representing whether an update was successfully
@@ -221,8 +221,7 @@ type ComponentOverride struct {
// URL is a thin wrapper around string that ensures the string is a valid URL.
type URL string
-// Update represents a release of the ClusterVersionOperator, referenced by the
-// Image member.
+// Update represents an administrator update request.
// +k8s:deepcopy-gen=true
type Update struct {
// version is a semantic versioning identifying the update version. When this
@@ -251,6 +250,34 @@ type Update struct {
Force bool `json:"force"`
}
+// Release represents an OpenShift release image and associated metadata.
+// +k8s:deepcopy-gen=true
+type Release struct {
+ // version is a semantic versioning identifying the update version. When this
+ // field is part of spec, version is optional if image is specified.
+ // +required
+ Version string `json:"version"`
+
+ // image is a container image location that contains the update. When this
+ // field is part of spec, image is optional if version is specified and the
+ // availableUpdates field contains a matching version.
+ // +required
+ Image string `json:"image"`
+
+ // url contains information about this release. This URL is set by
+ // the 'url' metadata property on a release or the metadata returned by
+ // the update API and should be displayed as a link in user
+ // interfaces. The URL field may not be set for test or nightly
+ // releases.
+ // +optional
+ URL URL `json:"url,omitempty"`
+
+ // channels is the set of Cincinnati channels to which the release
+ // currently belongs.
+ // +optional
+ Channels []string `json:"channels,omitempty"`
+}
+
// RetrievedUpdates reports whether available updates have been retrieved from
// the upstream update server. The condition is Unknown before retrieval, False
// if the updates could not be retrieved or recently failed, or True if the
diff --git a/vendor/github.com/openshift/api/config/v1/types_console.go b/vendor/github.com/openshift/api/config/v1/types_console.go
index 22b0b5160ae..d64219300dd 100644
--- a/vendor/github.com/openshift/api/config/v1/types_console.go
+++ b/vendor/github.com/openshift/api/config/v1/types_console.go
@@ -1,6 +1,8 @@
package v1
-import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+import (
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+)
// +genclient
// +genclient:nonNamespaced
diff --git a/vendor/github.com/openshift/api/config/v1/types_feature.go b/vendor/github.com/openshift/api/config/v1/types_feature.go
index 154f588a9aa..b083e6d1f6b 100644
--- a/vendor/github.com/openshift/api/config/v1/types_feature.go
+++ b/vendor/github.com/openshift/api/config/v1/types_feature.go
@@ -37,6 +37,9 @@ var (
// TopologyManager enables ToplogyManager support. Upgrades are enabled with this feature.
LatencySensitive FeatureSet = "LatencySensitive"
+
+ // IPv6DualStackNoUpgrade enables dual-stack. Turning this feature set on IS NOT SUPPORTED, CANNOT BE UNDONE, and PREVENTS UPGRADES.
+ IPv6DualStackNoUpgrade FeatureSet = "IPv6DualStackNoUpgrade"
)
type FeatureGateSpec struct {
@@ -97,42 +100,109 @@ type FeatureGateEnabledDisabled struct {
//
// If you put an item in either of these lists, put your area and name on it so we can find owners.
var FeatureSets = map[FeatureSet]*FeatureGateEnabledDisabled{
- Default: {
- Enabled: []string{
- "RotateKubeletServerCertificate", // sig-pod, sjenning
- "SupportPodPidsLimit", // sig-pod, sjenning
- "NodeDisruptionExclusion", // sig-scheduling, ccoleman
- "ServiceNodeExclusion", // sig-scheduling, ccoleman
- },
- Disabled: []string{
- "LegacyNodeRoleBehavior", // sig-scheduling, ccoleman
- },
- },
+ Default: defaultFeatures,
CustomNoUpgrade: {
Enabled: []string{},
Disabled: []string{},
},
- TechPreviewNoUpgrade: {
- Enabled: []string{
- "RotateKubeletServerCertificate", // sig-pod, sjenning
- "SupportPodPidsLimit", // sig-pod, sjenning
- "NodeDisruptionExclusion", // sig-scheduling, ccoleman
- "ServiceNodeExclusion", // sig-scheduling, ccoleman
- },
- Disabled: []string{
- "LegacyNodeRoleBehavior", // sig-scheduling, ccoleman
- },
+ TechPreviewNoUpgrade: newDefaultFeatures().
+ with("CSIDriverAzureDisk"). // sig-storage, jsafrane, OCP specific
+ with("CSIDriverVSphere"). // sig-storage, jsafrane, OCP specific
+ with("CSIMigrationAWS"). // sig-storage, jsafrane, Kubernetes feature gate
+ with("CSIMigrationOpenStack"). // sig-storage, jsafrane, Kubernetes feature gate
+ toFeatures(),
+ LatencySensitive: newDefaultFeatures().
+ with(
+ "TopologyManager", // sig-pod, sjenning
+ ).
+ toFeatures(),
+ IPv6DualStackNoUpgrade: newDefaultFeatures().
+ with(
+ "IPv6DualStack", // sig-network, danwinship
+ ).
+ toFeatures(),
+}
+
+var defaultFeatures = &FeatureGateEnabledDisabled{
+ Enabled: []string{
+ "APIPriorityAndFairness", // sig-apimachinery, deads2k
+ "RotateKubeletServerCertificate", // sig-pod, sjenning
+ "SupportPodPidsLimit", // sig-pod, sjenning
+ "NodeDisruptionExclusion", // sig-scheduling, ccoleman
+ "ServiceNodeExclusion", // sig-scheduling, ccoleman
+ "DownwardAPIHugePages", // sig-node, rphillips
},
- LatencySensitive: {
- Enabled: []string{
- "RotateKubeletServerCertificate", // sig-pod, sjenning
- "SupportPodPidsLimit", // sig-pod, sjenning
- "TopologyManager", // sig-pod, sjenning
- "NodeDisruptionExclusion", // sig-scheduling, ccoleman
- "ServiceNodeExclusion", // sig-scheduling, ccoleman
- },
- Disabled: []string{
- "LegacyNodeRoleBehavior", // sig-scheduling, ccoleman
- },
+ Disabled: []string{
+ "LegacyNodeRoleBehavior", // sig-scheduling, ccoleman
},
}
+
+type featureSetBuilder struct {
+ forceOn []string
+ forceOff []string
+}
+
+func newDefaultFeatures() *featureSetBuilder {
+ return &featureSetBuilder{}
+}
+
+func (f *featureSetBuilder) with(forceOn ...string) *featureSetBuilder {
+ f.forceOn = append(f.forceOn, forceOn...)
+ return f
+}
+
+func (f *featureSetBuilder) without(forceOff ...string) *featureSetBuilder {
+ f.forceOff = append(f.forceOff, forceOff...)
+ return f
+}
+
+func (f *featureSetBuilder) isForcedOff(needle string) bool {
+ for _, forcedOff := range f.forceOff {
+ if needle == forcedOff {
+ return true
+ }
+ }
+ return false
+}
+
+func (f *featureSetBuilder) isForcedOn(needle string) bool {
+ for _, forceOn := range f.forceOn {
+ if needle == forceOn {
+ return true
+ }
+ }
+ return false
+}
+
+func (f *featureSetBuilder) toFeatures() *FeatureGateEnabledDisabled {
+ finalOn := []string{}
+ finalOff := []string{}
+
+ // only add the default enabled features if they haven't been explicitly set off
+ for _, defaultOn := range defaultFeatures.Enabled {
+ if !f.isForcedOff(defaultOn) {
+ finalOn = append(finalOn, defaultOn)
+ }
+ }
+ for _, currOn := range f.forceOn {
+ if f.isForcedOff(currOn) {
+ panic("coding error, you can't have features both on and off")
+ }
+ finalOn = append(finalOn, currOn)
+ }
+
+ // only add the default disabled features if they haven't been explicitly set on
+ for _, defaultOff := range defaultFeatures.Disabled {
+ if !f.isForcedOn(defaultOff) {
+ finalOff = append(finalOff, defaultOff)
+ }
+ }
+ for _, currOff := range f.forceOff {
+ finalOff = append(finalOff, currOff)
+ }
+
+ return &FeatureGateEnabledDisabled{
+ Enabled: finalOn,
+ Disabled: finalOff,
+ }
+}
diff --git a/vendor/github.com/openshift/api/config/v1/types_image.go b/vendor/github.com/openshift/api/config/v1/types_image.go
index bf594c1b775..8b762a5a694 100644
--- a/vendor/github.com/openshift/api/config/v1/types_image.go
+++ b/vendor/github.com/openshift/api/config/v1/types_image.go
@@ -9,7 +9,7 @@ import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
// Image governs policies related to imagestream imports and runtime configuration
// for external registries. It allows cluster admins to configure which registries
// OpenShift is allowed to import images from, extra CA trust bundles for external
-// registries, and policies to blacklist/whitelist registry hostnames.
+// registries, and policies to block or allow registry hostnames.
// When exposing OpenShift's image registry to the public, this also lets cluster
// admins specify the external hostname.
type Image struct {
@@ -102,14 +102,22 @@ type RegistrySources struct {
// insecureRegistries are registries which do not have a valid TLS certificates or only support HTTP connections.
// +optional
InsecureRegistries []string `json:"insecureRegistries,omitempty"`
- // blockedRegistries are blacklisted from image pull/push. All other registries are allowed.
+ // blockedRegistries cannot be used for image pull and push actions. All other registries are permitted.
//
// Only one of BlockedRegistries or AllowedRegistries may be set.
// +optional
BlockedRegistries []string `json:"blockedRegistries,omitempty"`
- // allowedRegistries are whitelisted for image pull/push. All other registries are blocked.
+ // allowedRegistries are the only registries permitted for image pull and push actions. All other registries are denied.
//
// Only one of BlockedRegistries or AllowedRegistries may be set.
// +optional
AllowedRegistries []string `json:"allowedRegistries,omitempty"`
+ // containerRuntimeSearchRegistries are registries that will be searched when pulling images that do not have fully qualified
+ // domains in their pull specs. Registries will be searched in the order provided in the list.
+ // Note: this search list only works with the container runtime, i.e CRI-O. Will NOT work with builds or imagestream imports.
+ // +optional
+ // +kubebuilder:validation:MinItems=1
+ // +kubebuilder:validation:Format=hostname
+ // +listType=set
+ ContainerRuntimeSearchRegistries []string `json:"containerRuntimeSearchRegistries,omitempty"`
}
diff --git a/vendor/github.com/openshift/api/config/v1/types_infrastructure.go b/vendor/github.com/openshift/api/config/v1/types_infrastructure.go
index ac1e5048ee1..5ca08dc8361 100644
--- a/vendor/github.com/openshift/api/config/v1/types_infrastructure.go
+++ b/vendor/github.com/openshift/api/config/v1/types_infrastructure.go
@@ -5,6 +5,7 @@ import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
// +genclient
// +genclient:nonNamespaced
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
+// +kubebuilder:subresource:status
// Infrastructure holds cluster-wide information about Infrastructure. The canonical name is `cluster`
type Infrastructure struct {
@@ -26,8 +27,21 @@ type InfrastructureSpec struct {
// This configuration file is used to configure the Kubernetes cloud provider integration
// when using the built-in cloud provider integration or the external cloud controller manager.
// The namespace for this config map is openshift-config.
+ //
+ // cloudConfig should only be consumed by the kube_cloud_config controller.
+ // The controller is responsible for using the user configuration in the spec
+ // for various platforms and combining that with the user provided ConfigMap in this field
+ // to create a stitched kube cloud config.
+ // The controller generates a ConfigMap `kube-cloud-config` in `openshift-config-managed` namespace
+ // with the kube cloud config is stored in `cloud.conf` key.
+ // All the clients are expected to use the generated ConfigMap only.
+ //
// +optional
CloudConfig ConfigMapFileReference `json:"cloudConfig"`
+
+ // platformSpec holds desired information specific to the underlying
+ // infrastructure provider.
+ PlatformSpec PlatformSpec `json:"platformSpec,omitempty"`
}
// InfrastructureStatus describes the infrastructure the cluster is leveraging.
@@ -50,21 +64,51 @@ type InfrastructureStatus struct {
// etcdDiscoveryDomain is the domain used to fetch the SRV records for discovering
// etcd servers and clients.
// For more info: https://github.com/etcd-io/etcd/blob/329be66e8b3f9e2e6af83c123ff89297e49ebd15/Documentation/op-guide/clustering.md#dns-discovery
+ // deprecated: as of 4.7, this field is no longer set or honored. It will be removed in a future release.
EtcdDiscoveryDomain string `json:"etcdDiscoveryDomain"`
- // apiServerURL is a valid URI with scheme(http/https), address and
- // port. apiServerURL can be used by components like the web console
+ // apiServerURL is a valid URI with scheme 'https', address and
+ // optionally a port (defaulting to 443). apiServerURL can be used by components like the web console
// to tell users where to find the Kubernetes API.
APIServerURL string `json:"apiServerURL"`
- // apiServerInternalURL is a valid URI with scheme(http/https),
- // address and port. apiServerInternalURL can be used by components
+ // apiServerInternalURL is a valid URI with scheme 'https',
+ // address and optionally a port (defaulting to 443). apiServerInternalURL can be used by components
// like kubelets, to contact the Kubernetes API server using the
// infrastructure provider rather than Kubernetes networking.
APIServerInternalURL string `json:"apiServerInternalURI"`
+
+ // controlPlaneTopology expresses the expectations for operands that normally run on control nodes.
+ // The default is 'HighlyAvailable', which represents the behavior operators have in a "normal" cluster.
+ // The 'SingleReplica' mode will be used in single-node deployments
+ // and the operators should not configure the operand for highly-available operation
+ // +kubebuilder:default=HighlyAvailable
+ ControlPlaneTopology TopologyMode `json:"controlPlaneTopology"`
+
+ // infrastructureTopology expresses the expectations for infrastructure services that do not run on control
+ // plane nodes, usually indicated by a node selector for a `role` value
+ // other than `master`.
+ // The default is 'HighlyAvailable', which represents the behavior operators have in a "normal" cluster.
+ // The 'SingleReplica' mode will be used in single-node deployments
+ // and the operators should not configure the operand for highly-available operation
+ // +kubebuilder:default=HighlyAvailable
+ InfrastructureTopology TopologyMode `json:"infrastructureTopology"`
}
+// TopologyMode defines the topology mode of the control/infra nodes.
+// +kubebuilder:validation:Enum=HighlyAvailable;SingleReplica
+type TopologyMode string
+
+const (
+ // "HighlyAvailable" is for operators to configure high-availability as much as possible.
+ HighlyAvailableTopologyMode TopologyMode = "HighlyAvailable"
+
+ // "SingleReplica" is for operators to avoid spending resources for high-availability purpose.
+ SingleReplicaTopologyMode TopologyMode = "SingleReplica"
+)
+
// PlatformType is a specific supported infrastructure provider.
+// +kubebuilder:validation:Enum="";AWS;Azure;BareMetal;GCP;Libvirt;OpenStack;None;VSphere;oVirt;IBMCloud;KubeVirt;EquinixMetal
type PlatformType string
const (
@@ -94,8 +138,85 @@ const (
// OvirtPlatformType represents oVirt/RHV infrastructure.
OvirtPlatformType PlatformType = "oVirt"
+
+ // IBMCloudPlatformType represents IBM Cloud infrastructure.
+ IBMCloudPlatformType PlatformType = "IBMCloud"
+
+ // KubevirtPlatformType represents KubeVirt/Openshift Virtualization infrastructure.
+ KubevirtPlatformType PlatformType = "KubeVirt"
+
+ // EquinixMetalPlatformType represents Equinix Metal infrastructure.
+ EquinixMetalPlatformType PlatformType = "EquinixMetal"
+)
+
+// IBMCloudProviderType is a specific supported IBM Cloud provider cluster type
+type IBMCloudProviderType string
+
+const (
+ // Classic means that the IBM Cloud cluster is using classic infrastructure
+ IBMCloudProviderTypeClassic IBMCloudProviderType = "Classic"
+
+ // VPC means that the IBM Cloud cluster is using VPC infrastructure
+ IBMCloudProviderTypeVPC IBMCloudProviderType = "VPC"
)
+// PlatformSpec holds the desired state specific to the underlying infrastructure provider
+// of the current cluster. Since these are used at spec-level for the underlying cluster, it
+// is supposed that only one of the spec structs is set.
+type PlatformSpec struct {
+ // type is the underlying infrastructure provider for the cluster. This
+ // value controls whether infrastructure automation such as service load
+ // balancers, dynamic volume provisioning, machine creation and deletion, and
+ // other integrations are enabled. If None, no infrastructure automation is
+ // enabled. Allowed values are "AWS", "Azure", "BareMetal", "GCP", "Libvirt",
+ // "OpenStack", "VSphere", "oVirt", "KubeVirt", "EquinixMetal", and "None". Individual components may not support
+ // all platforms, and must handle unrecognized platforms as None if they do
+ // not support that platform.
+ //
+ // +unionDiscriminator
+ Type PlatformType `json:"type"`
+
+ // AWS contains settings specific to the Amazon Web Services infrastructure provider.
+ // +optional
+ AWS *AWSPlatformSpec `json:"aws,omitempty"`
+
+ // Azure contains settings specific to the Azure infrastructure provider.
+ // +optional
+ Azure *AzurePlatformSpec `json:"azure,omitempty"`
+
+ // GCP contains settings specific to the Google Cloud Platform infrastructure provider.
+ // +optional
+ GCP *GCPPlatformSpec `json:"gcp,omitempty"`
+
+ // BareMetal contains settings specific to the BareMetal platform.
+ // +optional
+ BareMetal *BareMetalPlatformSpec `json:"baremetal,omitempty"`
+
+ // OpenStack contains settings specific to the OpenStack infrastructure provider.
+ // +optional
+ OpenStack *OpenStackPlatformSpec `json:"openstack,omitempty"`
+
+ // Ovirt contains settings specific to the oVirt infrastructure provider.
+ // +optional
+ Ovirt *OvirtPlatformSpec `json:"ovirt,omitempty"`
+
+ // VSphere contains settings specific to the VSphere infrastructure provider.
+ // +optional
+ VSphere *VSpherePlatformSpec `json:"vsphere,omitempty"`
+
+ // IBMCloud contains settings specific to the IBMCloud infrastructure provider.
+ // +optional
+ IBMCloud *IBMCloudPlatformSpec `json:"ibmcloud,omitempty"`
+
+ // Kubevirt contains settings specific to the kubevirt infrastructure provider.
+ // +optional
+ Kubevirt *KubevirtPlatformSpec `json:"kubevirt,omitempty"`
+
+ // EquinixMetal contains settings specific to the Equinix Metal infrastructure provider.
+ // +optional
+ EquinixMetal *EquinixMetalPlatformSpec `json:"equinixMetal,omitempty"`
+}
+
// PlatformStatus holds the current status specific to the underlying infrastructure provider
// of the current cluster. Since these are used at status-level for the underlying cluster, it
// is supposed that only one of the status structs is set.
@@ -105,9 +226,12 @@ type PlatformStatus struct {
// balancers, dynamic volume provisioning, machine creation and deletion, and
// other integrations are enabled. If None, no infrastructure automation is
// enabled. Allowed values are "AWS", "Azure", "BareMetal", "GCP", "Libvirt",
- // "OpenStack", "VSphere", "oVirt", and "None". Individual components may not support
+ // "OpenStack", "VSphere", "oVirt", "EquinixMetal", and "None". Individual components may not support
// all platforms, and must handle unrecognized platforms as None if they do
// not support that platform.
+ //
+ // This value will be synced with to the `status.platform` and `status.platformStatus.type`.
+ // Currently this value cannot be changed once set.
Type PlatformType `json:"type"`
// AWS contains settings specific to the Amazon Web Services infrastructure provider.
@@ -133,14 +257,96 @@ type PlatformStatus struct {
// Ovirt contains settings specific to the oVirt infrastructure provider.
// +optional
Ovirt *OvirtPlatformStatus `json:"ovirt,omitempty"`
+
+ // VSphere contains settings specific to the VSphere infrastructure provider.
+ // +optional
+ VSphere *VSpherePlatformStatus `json:"vsphere,omitempty"`
+
+ // IBMCloud contains settings specific to the IBMCloud infrastructure provider.
+ // +optional
+ IBMCloud *IBMCloudPlatformStatus `json:"ibmcloud,omitempty"`
+
+ // Kubevirt contains settings specific to the kubevirt infrastructure provider.
+ // +optional
+ Kubevirt *KubevirtPlatformStatus `json:"kubevirt,omitempty"`
+
+ // EquinixMetal contains settings specific to the Equinix Metal infrastructure provider.
+ // +optional
+ EquinixMetal *EquinixMetalPlatformStatus `json:"equinixMetal,omitempty"`
+}
+
+// AWSServiceEndpoint store the configuration of a custom url to
+// override existing defaults of AWS Services.
+type AWSServiceEndpoint struct {
+ // name is the name of the AWS service.
+ // The list of all the service names can be found at https://docs.aws.amazon.com/general/latest/gr/aws-service-information.html
+ // This must be provided and cannot be empty.
+ //
+ // +kubebuilder:validation:Pattern=`^[a-z0-9-]+$`
+ Name string `json:"name"`
+
+ // url is fully qualified URI with scheme https, that overrides the default generated
+ // endpoint for a client.
+ // This must be provided and cannot be empty.
+ //
+ // +kubebuilder:validation:Pattern=`^https://`
+ URL string `json:"url"`
+}
+
+// AWSPlatformSpec holds the desired state of the Amazon Web Services infrastructure provider.
+// This only includes fields that can be modified in the cluster.
+type AWSPlatformSpec struct {
+ // serviceEndpoints list contains custom endpoints which will override default
+ // service endpoint of AWS Services.
+ // There must be only one ServiceEndpoint for a service.
+ // +optional
+ ServiceEndpoints []AWSServiceEndpoint `json:"serviceEndpoints,omitempty"`
}
// AWSPlatformStatus holds the current status of the Amazon Web Services infrastructure provider.
type AWSPlatformStatus struct {
// region holds the default AWS region for new AWS resources created by the cluster.
Region string `json:"region"`
+
+ // ServiceEndpoints list contains custom endpoints which will override default
+ // service endpoint of AWS Services.
+ // There must be only one ServiceEndpoint for a service.
+ // +optional
+ ServiceEndpoints []AWSServiceEndpoint `json:"serviceEndpoints,omitempty"`
+
+ // resourceTags is a list of additional tags to apply to AWS resources created for the cluster.
+ // See https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html for information on tagging AWS resources.
+ // AWS supports a maximum of 50 tags per resource. OpenShift reserves 25 tags for its use, leaving 25 tags
+ // available for the user.
+ // +kubebuilder:validation:MaxItems=25
+ // +optional
+ ResourceTags []AWSResourceTag `json:"resourceTags,omitempty"`
+}
+
+// AWSResourceTag is a tag to apply to AWS resources created for the cluster.
+type AWSResourceTag struct {
+ // key is the key of the tag
+ // +kubebuilder:validation:Required
+ // +kubebuilder:validation:MinLength=1
+ // +kubebuilder:validation:MaxLength=128
+ // +kubebuilder:validation:Pattern=`^[0-9A-Za-z_.:/=+-@]+$`
+ // +required
+ Key string `json:"key"`
+ // value is the value of the tag.
+ // Some AWS service do not support empty values. Since tags are added to resources in many services, the
+ // length of the tag value must meet the requirements of all services.
+ // +kubebuilder:validation:Required
+ // +kubebuilder:validation:MinLength=1
+ // +kubebuilder:validation:MaxLength=256
+ // +kubebuilder:validation:Pattern=`^[0-9A-Za-z_.:/=+-@]+$`
+ // +required
+ Value string `json:"value"`
}
+// AzurePlatformSpec holds the desired state of the Azure infrastructure provider.
+// This only includes fields that can be modified in the cluster.
+type AzurePlatformSpec struct{}
+
// AzurePlatformStatus holds the current status of the Azure infrastructure provider.
type AzurePlatformStatus struct {
// resourceGroupName is the Resource Group for new Azure resources created for the cluster.
@@ -150,8 +356,43 @@ type AzurePlatformStatus struct {
// If empty, the value is same as ResourceGroupName.
// +optional
NetworkResourceGroupName string `json:"networkResourceGroupName,omitempty"`
+
+ // cloudName is the name of the Azure cloud environment which can be used to configure the Azure SDK
+ // with the appropriate Azure API endpoints.
+ // If empty, the value is equal to `AzurePublicCloud`.
+ // +optional
+ CloudName AzureCloudEnvironment `json:"cloudName,omitempty"`
+
+ // armEndpoint specifies a URL to use for resource management in non-soverign clouds such as Azure Stack.
+ // +optional
+ ARMEndpoint string `json:"armEndpoint,omitempty"`
}
+// AzureCloudEnvironment is the name of the Azure cloud environment
+// +kubebuilder:validation:Enum="";AzurePublicCloud;AzureUSGovernmentCloud;AzureChinaCloud;AzureGermanCloud;AzureStackCloud
+type AzureCloudEnvironment string
+
+const (
+ // AzurePublicCloud is the general-purpose, public Azure cloud environment.
+ AzurePublicCloud AzureCloudEnvironment = "AzurePublicCloud"
+
+ // AzureUSGovernmentCloud is the Azure cloud environment for the US government.
+ AzureUSGovernmentCloud AzureCloudEnvironment = "AzureUSGovernmentCloud"
+
+ // AzureChinaCloud is the Azure cloud environment used in China.
+ AzureChinaCloud AzureCloudEnvironment = "AzureChinaCloud"
+
+ // AzureGermanCloud is the Azure cloud environment used in Germany.
+ AzureGermanCloud AzureCloudEnvironment = "AzureGermanCloud"
+
+ // AzureStackCloud is the Azure cloud environment used at the edge and on premises.
+ AzureStackCloud AzureCloudEnvironment = "AzureStackCloud"
+)
+
+// GCPPlatformSpec holds the desired state of the Google Cloud Platform infrastructure provider.
+// This only includes fields that can be modified in the cluster.
+type GCPPlatformSpec struct{}
+
// GCPPlatformStatus holds the current status of the Google Cloud Platform infrastructure provider.
type GCPPlatformStatus struct {
// resourceGroupName is the Project ID for new GCP resources created for the cluster.
@@ -161,6 +402,10 @@ type GCPPlatformStatus struct {
Region string `json:"region"`
}
+// BareMetalPlatformSpec holds the desired state of the BareMetal infrastructure provider.
+// This only includes fields that can be modified in the cluster.
+type BareMetalPlatformSpec struct{}
+
// BareMetalPlatformStatus holds the current status of the BareMetal infrastructure provider.
// For more information about the network architecture used with the BareMetal platform type, see:
// https://github.com/openshift/installer/blob/master/docs/design/baremetal/networking-infrastructure.md
@@ -184,6 +429,10 @@ type BareMetalPlatformStatus struct {
NodeDNSIP string `json:"nodeDNSIP,omitempty"`
}
+// OpenStackPlatformSpec holds the desired state of the OpenStack infrastructure provider.
+// This only includes fields that can be modified in the cluster.
+type OpenStackPlatformSpec struct{}
+
// OpenStackPlatformStatus holds the current status of the OpenStack infrastructure provider.
type OpenStackPlatformStatus struct {
// apiServerInternalIP is an IP address to contact the Kubernetes API server that can be used
@@ -209,6 +458,10 @@ type OpenStackPlatformStatus struct {
NodeDNSIP string `json:"nodeDNSIP,omitempty"`
}
+// OvirtPlatformSpec holds the desired state of the oVirt infrastructure provider.
+// This only includes fields that can be modified in the cluster.
+type OvirtPlatformSpec struct{}
+
// OvirtPlatformStatus holds the current status of the oVirt infrastructure provider.
type OvirtPlatformStatus struct {
// apiServerInternalIP is an IP address to contact the Kubernetes API server that can be used
@@ -221,15 +474,85 @@ type OvirtPlatformStatus struct {
// The IP is a suitable target of a wildcard DNS record used to resolve default route host names.
IngressIP string `json:"ingressIP,omitempty"`
+ // deprecated: as of 4.6, this field is no longer set or honored. It will be removed in a future release.
+ NodeDNSIP string `json:"nodeDNSIP,omitempty"`
+}
+
+// VSpherePlatformSpec holds the desired state of the vSphere infrastructure provider.
+// This only includes fields that can be modified in the cluster.
+type VSpherePlatformSpec struct{}
+
+// VSpherePlatformStatus holds the current status of the vSphere infrastructure provider.
+type VSpherePlatformStatus struct {
+ // apiServerInternalIP is an IP address to contact the Kubernetes API server that can be used
+ // by components inside the cluster, like kubelets using the infrastructure rather
+ // than Kubernetes networking. It is the IP that the Infrastructure.status.apiServerInternalURI
+ // points to. It is the IP for a self-hosted load balancer in front of the API servers.
+ APIServerInternalIP string `json:"apiServerInternalIP,omitempty"`
+
+ // ingressIP is an external IP which routes to the default ingress controller.
+ // The IP is a suitable target of a wildcard DNS record used to resolve default route host names.
+ IngressIP string `json:"ingressIP,omitempty"`
+
// nodeDNSIP is the IP address for the internal DNS used by the
// nodes. Unlike the one managed by the DNS operator, `NodeDNSIP`
// provides name resolution for the nodes themselves. There is no DNS-as-a-service for
- // oVirt deployments. In order to minimize necessary changes to the
+ // vSphere deployments. In order to minimize necessary changes to the
// datacenter DNS, a DNS service is hosted as a static pod to serve those hostnames
// to the nodes in the cluster.
NodeDNSIP string `json:"nodeDNSIP,omitempty"`
}
+// IBMCloudPlatformSpec holds the desired state of the IBMCloud infrastructure provider.
+// This only includes fields that can be modified in the cluster.
+type IBMCloudPlatformSpec struct{}
+
+//IBMCloudPlatformStatus holds the current status of the IBMCloud infrastructure provider.
+type IBMCloudPlatformStatus struct {
+ // Location is where the cluster has been deployed
+ Location string `json:"location,omitempty"`
+
+ // ResourceGroupName is the Resource Group for new IBMCloud resources created for the cluster.
+ ResourceGroupName string `json:"resourceGroupName,omitempty"`
+
+ // ProviderType indicates the type of cluster that was created
+ ProviderType IBMCloudProviderType `json:"providerType,omitempty"`
+}
+
+// KubevirtPlatformSpec holds the desired state of the kubevirt infrastructure provider.
+// This only includes fields that can be modified in the cluster.
+type KubevirtPlatformSpec struct{}
+
+// KubevirtPlatformStatus holds the current status of the kubevirt infrastructure provider.
+type KubevirtPlatformStatus struct {
+ // apiServerInternalIP is an IP address to contact the Kubernetes API server that can be used
+ // by components inside the cluster, like kubelets using the infrastructure rather
+ // than Kubernetes networking. It is the IP that the Infrastructure.status.apiServerInternalURI
+ // points to. It is the IP for a self-hosted load balancer in front of the API servers.
+ APIServerInternalIP string `json:"apiServerInternalIP,omitempty"`
+
+ // ingressIP is an external IP which routes to the default ingress controller.
+ // The IP is a suitable target of a wildcard DNS record used to resolve default route host names.
+ IngressIP string `json:"ingressIP,omitempty"`
+}
+
+// EquinixMetalPlatformSpec holds the desired state of the Equinix Metal infrastructure provider.
+// This only includes fields that can be modified in the cluster.
+type EquinixMetalPlatformSpec struct{}
+
+// EquinixMetalPlatformStatus holds the current status of the Equinix Metal infrastructure provider.
+type EquinixMetalPlatformStatus struct {
+ // apiServerInternalIP is an IP address to contact the Kubernetes API server that can be used
+ // by components inside the cluster, like kubelets using the infrastructure rather
+ // than Kubernetes networking. It is the IP that the Infrastructure.status.apiServerInternalURI
+ // points to. It is the IP for a self-hosted load balancer in front of the API servers.
+ APIServerInternalIP string `json:"apiServerInternalIP,omitempty"`
+
+ // ingressIP is an external IP which routes to the default ingress controller.
+ // The IP is a suitable target of a wildcard DNS record used to resolve default route host names.
+ IngressIP string `json:"ingressIP,omitempty"`
+}
+
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// InfrastructureList is
diff --git a/vendor/github.com/openshift/api/config/v1/types_ingress.go b/vendor/github.com/openshift/api/config/v1/types_ingress.go
index 0216919ad8e..9451adc2782 100644
--- a/vendor/github.com/openshift/api/config/v1/types_ingress.go
+++ b/vendor/github.com/openshift/api/config/v1/types_ingress.go
@@ -1,6 +1,8 @@
package v1
-import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+import (
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+)
// +genclient
// +genclient:nonNamespaced
@@ -31,13 +33,146 @@ type IngressSpec struct {
//
// Once set, changing domain is not currently supported.
Domain string `json:"domain"`
+
+ // appsDomain is an optional domain to use instead of the one specified
+ // in the domain field when a Route is created without specifying an explicit
+ // host. If appsDomain is nonempty, this value is used to generate default
+ // host values for Route. Unlike domain, appsDomain may be modified after
+ // installation.
+ // This assumes a new ingresscontroller has been setup with a wildcard
+ // certificate.
+ // +optional
+ AppsDomain string `json:"appsDomain,omitempty"`
+
+ // componentRoutes is an optional list of routes that are managed by OpenShift components
+ // that a cluster-admin is able to configure the hostname and serving certificate for.
+ // The namespace and name of each route in this list should match an existing entry in the
+ // status.componentRoutes list.
+ //
+ // To determine the set of configurable Routes, look at namespace and name of entries in the
+ // .status.componentRoutes list, where participating operators write the status of
+ // configurable routes.
+ // +optional
+ ComponentRoutes []ComponentRouteSpec `json:"componentRoutes,omitempty"`
}
+// ConsumingUser is an alias for string which we add validation to. Currently only service accounts are supported.
+// +kubebuilder:validation:Pattern="^system:serviceaccount:[a-z0-9]([-a-z0-9]*[a-z0-9])?:[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$"
+// +kubebuilder:validation:MinLength=1
+// +kubebuilder:validation:MaxLength=512
+type ConsumingUser string
+
+// Hostname is an alias for hostname string validation.
+// +kubebuilder:validation:Format=hostname
+type Hostname string
+
type IngressStatus struct {
+ // componentRoutes is where participating operators place the current route status for routes whose
+ // hostnames and serving certificates can be customized by the cluster-admin.
+ // +optional
+ ComponentRoutes []ComponentRouteStatus `json:"componentRoutes,omitempty"`
}
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
+// ComponentRouteSpec allows for configuration of a route's hostname and serving certificate.
+type ComponentRouteSpec struct {
+ // namespace is the namespace of the route to customize.
+ //
+ // The namespace and name of this componentRoute must match a corresponding
+ // entry in the list of status.componentRoutes if the route is to be customized.
+ // +kubebuilder:validation:Pattern=^[a-z0-9]([-a-z0-9]*[a-z0-9])?$
+ // +kubebuilder:validation:MinLength=1
+ // +kubebuilder:validation:MaxLength=63
+ // +kubebuilder:validation:Required
+ // +required
+ Namespace string `json:"namespace"`
+
+ // name is the logical name of the route to customize.
+ //
+ // The namespace and name of this componentRoute must match a corresponding
+ // entry in the list of status.componentRoutes if the route is to be customized.
+ // +kubebuilder:validation:MinLength=1
+ // +kubebuilder:validation:MaxLength=256
+ // +kubebuilder:validation:Required
+ // +required
+ Name string `json:"name"`
+
+ // hostname is the hostname that should be used by the route.
+ // +kubebuilder:validation:Required
+ // +required
+ Hostname Hostname `json:"hostname"`
+
+ // servingCertKeyPairSecret is a reference to a secret of type `kubernetes.io/tls` in the openshift-config namespace.
+ // The serving cert/key pair must match and will be used by the operator to fulfill the intent of serving with this name.
+ // If the custom hostname uses the default routing suffix of the cluster,
+ // the Secret specification for a serving certificate will not be needed.
+ // +optional
+ ServingCertKeyPairSecret SecretNameReference `json:"servingCertKeyPairSecret"`
+}
+
+// ComponentRouteStatus contains information allowing configuration of a route's hostname and serving certificate.
+type ComponentRouteStatus struct {
+ // namespace is the namespace of the route to customize. It must be a real namespace. Using an actual namespace
+ // ensures that no two components will conflict and the same component can be installed multiple times.
+ //
+ // The namespace and name of this componentRoute must match a corresponding
+ // entry in the list of spec.componentRoutes if the route is to be customized.
+ // +kubebuilder:validation:Pattern=^[a-z0-9]([-a-z0-9]*[a-z0-9])?$
+ // +kubebuilder:validation:MinLength=1
+ // +kubebuilder:validation:MaxLength=63
+ // +kubebuilder:validation:Required
+ // +required
+ Namespace string `json:"namespace"`
+
+ // name is the logical name of the route to customize. It does not have to be the actual name of a route resource
+ // but it cannot be renamed.
+ //
+ // The namespace and name of this componentRoute must match a corresponding
+ // entry in the list of spec.componentRoutes if the route is to be customized.
+ // +kubebuilder:validation:MinLength=1
+ // +kubebuilder:validation:MaxLength=256
+ // +kubebuilder:validation:Required
+ // +required
+ Name string `json:"name"`
+
+ // defaultHostname is the hostname of this route prior to customization.
+ // +kubebuilder:validation:Required
+ // +required
+ DefaultHostname Hostname `json:"defaultHostname"`
+
+ // consumingUsers is a slice of ServiceAccounts that need to have read permission on the servingCertKeyPairSecret secret.
+ // +kubebuilder:validation:MaxItems=5
+ // +optional
+ ConsumingUsers []ConsumingUser `json:"consumingUsers,omitempty"`
+
+ // currentHostnames is the list of current names used by the route. Typically, this list should consist of a single
+ // hostname, but if multiple hostnames are supported by the route the operator may write multiple entries to this list.
+ // +kubebuilder:validation:MinItems=1
+ // +optional
+ CurrentHostnames []Hostname `json:"currentHostnames,omitempty"`
+
+ // conditions are used to communicate the state of the componentRoutes entry.
+ //
+ // Supported conditions include Available, Degraded and Progressing.
+ //
+ // If available is true, the content served by the route can be accessed by users. This includes cases
+ // where a default may continue to serve content while the customized route specified by the cluster-admin
+ // is being configured.
+ //
+ // If Degraded is true, that means something has gone wrong trying to handle the componentRoutes entry.
+ // The currentHostnames field may or may not be in effect.
+ //
+ // If Progressing is true, that means the component is taking some action related to the componentRoutes entry.
+ // +optional
+ Conditions []metav1.Condition `json:"conditions,omitempty"`
+
+ // relatedObjects is a list of resources which are useful when debugging or inspecting how spec.componentRoutes is applied.
+ // +kubebuilder:validation:MinItems=1
+ // +kubebuilder:validation:Required
+ // +required
+ RelatedObjects []ObjectReference `json:"relatedObjects"`
+}
+// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type IngressList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata"`
diff --git a/vendor/github.com/openshift/api/config/v1/types_network.go b/vendor/github.com/openshift/api/config/v1/types_network.go
index a09c5fe8ed3..ebfdf016264 100644
--- a/vendor/github.com/openshift/api/config/v1/types_network.go
+++ b/vendor/github.com/openshift/api/config/v1/types_network.go
@@ -51,6 +51,15 @@ type NetworkSpec struct {
// not allowed to be set.
// +optional
ExternalIP *ExternalIPConfig `json:"externalIP,omitempty"`
+
+ // The port range allowed for Services of type NodePort.
+ // If not specified, the default of 30000-32767 will be used.
+ // Such Services without a NodePort specified will have one
+ // automatically allocated from this range.
+ // This parameter can be updated after the cluster is
+ // installed.
+ // +kubebuilder:validation:Pattern=`^([0-9]{1,4}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])-([0-9]{1,4}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])$`
+ ServiceNodePortRange string `json:"serviceNodePortRange,omitempty"`
}
// NetworkStatus is the current network configuration.
@@ -67,6 +76,9 @@ type NetworkStatus struct {
// ClusterNetworkMTU is the MTU for inter-pod networking.
ClusterNetworkMTU int `json:"clusterNetworkMTU,omitempty"`
+
+ // Migration contains the cluster network migration configuration.
+ Migration *NetworkMigration `json:"migration,omitempty"`
}
// ClusterNetworkEntry is a contiguous block of IP addresses from which pod IPs
@@ -75,9 +87,11 @@ type ClusterNetworkEntry struct {
// The complete block for pod IPs.
CIDR string `json:"cidr"`
- // The size (prefix) of block to allocate to each node.
+ // The size (prefix) of block to allocate to each node. If this
+ // field is not used by the plugin, it can be left unset.
// +kubebuilder:validation:Minimum=0
- HostPrefix uint32 `json:"hostPrefix"`
+ // +optional
+ HostPrefix uint32 `json:"hostPrefix,omitempty"`
}
// ExternalIPConfig specifies some IP blocks relevant for the ExternalIP field
@@ -120,3 +134,11 @@ type NetworkList struct {
Items []Network `json:"items"`
}
+
+// NetworkMigration represents the cluster network configuration.
+type NetworkMigration struct {
+ // NetworkType is the target plugin that is to be deployed.
+ // Currently supported values are: OpenShiftSDN, OVNKubernetes
+ // +kubebuilder:validation:Enum={"OpenShiftSDN","OVNKubernetes"}
+ NetworkType string `json:"networkType"`
+}
diff --git a/vendor/github.com/openshift/api/config/v1/types_oauth.go b/vendor/github.com/openshift/api/config/v1/types_oauth.go
index 15bc5b1c1a4..fcbd191aa65 100644
--- a/vendor/github.com/openshift/api/config/v1/types_oauth.go
+++ b/vendor/github.com/openshift/api/config/v1/types_oauth.go
@@ -14,10 +14,11 @@ import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
type OAuth struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata"`
-
+ // spec holds user settable values for configuration
// +kubebuilder:validation:Required
// +required
Spec OAuthSpec `json:"spec"`
+ // status holds observed values from the cluster. They may not be overridden.
// +optional
Status OAuthStatus `json:"status"`
}
@@ -45,21 +46,25 @@ type OAuthStatus struct {
// TokenConfig holds the necessary configuration options for authorization and access tokens
type TokenConfig struct {
// accessTokenMaxAgeSeconds defines the maximum age of access tokens
- AccessTokenMaxAgeSeconds int32 `json:"accessTokenMaxAgeSeconds"`
+ AccessTokenMaxAgeSeconds int32 `json:"accessTokenMaxAgeSeconds,omitempty"`
+
+ // accessTokenInactivityTimeoutSeconds - DEPRECATED: setting this field has no effect.
+ // +optional
+ AccessTokenInactivityTimeoutSeconds int32 `json:"accessTokenInactivityTimeoutSeconds,omitempty"`
- // accessTokenInactivityTimeoutSeconds defines the default token
- // inactivity timeout for tokens granted by any client.
+ // accessTokenInactivityTimeout defines the token inactivity timeout
+ // for tokens granted by any client.
// The value represents the maximum amount of time that can occur between
// consecutive uses of the token. Tokens become invalid if they are not
// used within this temporal window. The user will need to acquire a new
- // token to regain access once a token times out.
- // Valid values are integer values:
- // x < 0 Tokens time out is enabled but tokens never timeout unless configured per client (e.g. `-1`)
- // x = 0 Tokens time out is disabled (default)
- // x > 0 Tokens time out if there is no activity for x seconds
- // The current minimum allowed value for X is 300 (5 minutes)
- // +optional
- AccessTokenInactivityTimeoutSeconds int32 `json:"accessTokenInactivityTimeoutSeconds,omitempty"`
+ // token to regain access once a token times out. Takes valid time
+ // duration string such as "5m", "1.5h" or "2h45m". The minimum allowed
+ // value for duration is 300s (5 minutes). If the timeout is configured
+ // per client, then that value takes precedence. If the timeout value is
+ // not specified and the client does not override the value, then tokens
+ // are valid until their lifetime.
+ // +optional
+ AccessTokenInactivityTimeout *metav1.Duration `json:"accessTokenInactivityTimeout,omitempty"`
}
const (
diff --git a/vendor/github.com/openshift/api/config/v1/types_operatorhub.go b/vendor/github.com/openshift/api/config/v1/types_operatorhub.go
index 1d998bf37d9..1b2b7f82e9e 100644
--- a/vendor/github.com/openshift/api/config/v1/types_operatorhub.go
+++ b/vendor/github.com/openshift/api/config/v1/types_operatorhub.go
@@ -37,6 +37,7 @@ type OperatorHubStatus struct {
// the state of the default hub sources for OperatorHub on the cluster from
// enabled to disabled and vice versa.
// +kubebuilder:subresource:status
+// +genclient
// +genclient:nonNamespaced
type OperatorHub struct {
metav1.TypeMeta `json:",inline"`
diff --git a/vendor/github.com/openshift/api/config/v1/types_proxy.go b/vendor/github.com/openshift/api/config/v1/types_proxy.go
index 93f4c487e49..211e501e08c 100644
--- a/vendor/github.com/openshift/api/config/v1/types_proxy.go
+++ b/vendor/github.com/openshift/api/config/v1/types_proxy.go
@@ -41,13 +41,17 @@ type ProxySpec struct {
// +optional
ReadinessEndpoints []string `json:"readinessEndpoints,omitempty"`
- // trustedCA is a reference to a ConfigMap containing a CA certificate bundle used
- // for client egress HTTPS connections. The certificate bundle must be from the CA
- // that signed the proxy's certificate and be signed for everything. The trustedCA
- // field should only be consumed by a proxy validator. The validator is responsible
- // for reading the certificate bundle from required key "ca-bundle.crt" and copying
- // it to a ConfigMap named "trusted-ca-bundle" in the "openshift-config-managed"
- // namespace. The namespace for the ConfigMap referenced by trustedCA is
+ // trustedCA is a reference to a ConfigMap containing a CA certificate bundle.
+ // The trustedCA field should only be consumed by a proxy validator. The
+ // validator is responsible for reading the certificate bundle from the required
+ // key "ca-bundle.crt", merging it with the system default trust bundle,
+ // and writing the merged trust bundle to a ConfigMap named "trusted-ca-bundle"
+ // in the "openshift-config-managed" namespace. Clients that expect to make
+ // proxy connections must use the trusted-ca-bundle for all HTTPS requests to
+ // the proxy, and may use the trusted-ca-bundle for non-proxy HTTPS requests as
+ // well.
+ //
+ // The namespace for the ConfigMap referenced by trustedCA is
// "openshift-config". Here is an example ConfigMap (in yaml):
//
// apiVersion: v1
diff --git a/vendor/github.com/openshift/api/config/v1/types_scheduling.go b/vendor/github.com/openshift/api/config/v1/types_scheduling.go
index d5bf0c36275..570f8affcea 100644
--- a/vendor/github.com/openshift/api/config/v1/types_scheduling.go
+++ b/vendor/github.com/openshift/api/config/v1/types_scheduling.go
@@ -22,15 +22,24 @@ type Scheduler struct {
}
type SchedulerSpec struct {
+ // DEPRECATED: the scheduler Policy API has been deprecated and will be removed in a future release.
// policy is a reference to a ConfigMap containing scheduler policy which has
// user specified predicates and priorities. If this ConfigMap is not available
// scheduler will default to use DefaultAlgorithmProvider.
// The namespace for this configmap is openshift-config.
// +optional
- Policy ConfigMapNameReference `json:"policy"`
+ Policy ConfigMapNameReference `json:"policy,omitempty"`
+ // profile sets which scheduling profile should be set in order to configure scheduling
+ // decisions for new pods.
+ //
+ // Valid values are "LowNodeUtilization", "HighNodeUtilization", "NoScoring"
+ // Defaults to "LowNodeUtilization"
+ // +optional
+ Profile SchedulerProfile `json:"profile,omitempty"`
// defaultNodeSelector helps set the cluster-wide default node selector to
// restrict pod placement to specific nodes. This is applied to the pods
- // created in all namespaces without a specified nodeSelector value.
+ // created in all namespaces and creates an intersection with any existing
+ // nodeSelectors already set on a pod, additionally constraining that pod's selector.
// For example,
// defaultNodeSelector: "type=user-node,region=east" would set nodeSelector
// field in pod spec to "type=user-node,region=east" to all pods created
@@ -61,6 +70,23 @@ type SchedulerSpec struct {
MastersSchedulable bool `json:"mastersSchedulable"`
}
+// +kubebuilder:validation:Enum="";LowNodeUtilization;HighNodeUtilization;NoScoring
+type SchedulerProfile string
+
+var (
+ // LowNodeUtililization is the default, and defines a scheduling profile which prefers to
+ // spread pods evenly among nodes targeting low resource consumption on each node.
+ LowNodeUtilization SchedulerProfile = "LowNodeUtilization"
+
+ // HighNodeUtilization defines a scheduling profile which packs as many pods as possible onto
+ // as few nodes as possible targeting a small node count but high resource usage on each node.
+ HighNodeUtilization SchedulerProfile = "HighNodeUtilization"
+
+ // NoScoring defines a scheduling profile which tries to provide lower-latency scheduling
+ // at the expense of potentially less optimal pod placement decisions.
+ NoScoring SchedulerProfile = "NoScoring"
+)
+
type SchedulerStatus struct {
}
diff --git a/vendor/github.com/openshift/api/config/v1/types_tlssecurityprofile.go b/vendor/github.com/openshift/api/config/v1/types_tlssecurityprofile.go
index ea788dc162d..9dbacb99668 100644
--- a/vendor/github.com/openshift/api/config/v1/types_tlssecurityprofile.go
+++ b/vendor/github.com/openshift/api/config/v1/types_tlssecurityprofile.go
@@ -136,6 +136,7 @@ type CustomTLSProfile struct {
}
// TLSProfileType defines a TLS security profile type.
+// +kubebuilder:validation:Enum=Old;Intermediate;Modern;Custom
type TLSProfileType string
const (
@@ -180,6 +181,7 @@ type TLSProfileSpec struct {
//
// Note that SSLv3.0 is not a supported protocol version due to well known
// vulnerabilities such as POODLE: https://en.wikipedia.org/wiki/POODLE
+// +kubebuilder:validation:Enum=VersionTLS10;VersionTLS11;VersionTLS12;VersionTLS13
type TLSProtocolVersion string
const (
diff --git a/vendor/github.com/openshift/api/config/v1/zz_generated.deepcopy.go b/vendor/github.com/openshift/api/config/v1/zz_generated.deepcopy.go
index 37888a9395b..cb933dac08c 100644
--- a/vendor/github.com/openshift/api/config/v1/zz_generated.deepcopy.go
+++ b/vendor/github.com/openshift/api/config/v1/zz_generated.deepcopy.go
@@ -6,6 +6,7 @@ package v1
import (
corev1 "k8s.io/api/core/v1"
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
)
@@ -147,6 +148,7 @@ func (in *APIServerSpec) DeepCopyInto(out *APIServerSpec) {
*out = new(TLSSecurityProfile)
(*in).DeepCopyInto(*out)
}
+ out.Audit = in.Audit
return
}
@@ -176,9 +178,40 @@ func (in *APIServerStatus) DeepCopy() *APIServerStatus {
return out
}
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *AWSPlatformSpec) DeepCopyInto(out *AWSPlatformSpec) {
+ *out = *in
+ if in.ServiceEndpoints != nil {
+ in, out := &in.ServiceEndpoints, &out.ServiceEndpoints
+ *out = make([]AWSServiceEndpoint, len(*in))
+ copy(*out, *in)
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AWSPlatformSpec.
+func (in *AWSPlatformSpec) DeepCopy() *AWSPlatformSpec {
+ if in == nil {
+ return nil
+ }
+ out := new(AWSPlatformSpec)
+ in.DeepCopyInto(out)
+ return out
+}
+
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *AWSPlatformStatus) DeepCopyInto(out *AWSPlatformStatus) {
*out = *in
+ if in.ServiceEndpoints != nil {
+ in, out := &in.ServiceEndpoints, &out.ServiceEndpoints
+ *out = make([]AWSServiceEndpoint, len(*in))
+ copy(*out, *in)
+ }
+ if in.ResourceTags != nil {
+ in, out := &in.ResourceTags, &out.ResourceTags
+ *out = make([]AWSResourceTag, len(*in))
+ copy(*out, *in)
+ }
return
}
@@ -192,6 +225,38 @@ func (in *AWSPlatformStatus) DeepCopy() *AWSPlatformStatus {
return out
}
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *AWSResourceTag) DeepCopyInto(out *AWSResourceTag) {
+ *out = *in
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AWSResourceTag.
+func (in *AWSResourceTag) DeepCopy() *AWSResourceTag {
+ if in == nil {
+ return nil
+ }
+ out := new(AWSResourceTag)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *AWSServiceEndpoint) DeepCopyInto(out *AWSServiceEndpoint) {
+ *out = *in
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AWSServiceEndpoint.
+func (in *AWSServiceEndpoint) DeepCopy() *AWSServiceEndpoint {
+ if in == nil {
+ return nil
+ }
+ out := new(AWSServiceEndpoint)
+ in.DeepCopyInto(out)
+ return out
+}
+
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *AdmissionConfig) DeepCopyInto(out *AdmissionConfig) {
*out = *in
@@ -242,6 +307,22 @@ func (in *AdmissionPluginConfig) DeepCopy() *AdmissionPluginConfig {
return out
}
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *Audit) DeepCopyInto(out *Audit) {
+ *out = *in
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Audit.
+func (in *Audit) DeepCopy() *Audit {
+ if in == nil {
+ return nil
+ }
+ out := new(Audit)
+ in.DeepCopyInto(out)
+ return out
+}
+
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *AuditConfig) DeepCopyInto(out *AuditConfig) {
*out = *in
@@ -326,9 +407,14 @@ func (in *AuthenticationSpec) DeepCopyInto(out *AuthenticationSpec) {
out.OAuthMetadata = in.OAuthMetadata
if in.WebhookTokenAuthenticators != nil {
in, out := &in.WebhookTokenAuthenticators, &out.WebhookTokenAuthenticators
- *out = make([]WebhookTokenAuthenticator, len(*in))
+ *out = make([]DeprecatedWebhookTokenAuthenticator, len(*in))
copy(*out, *in)
}
+ if in.WebhookTokenAuthenticator != nil {
+ in, out := &in.WebhookTokenAuthenticator, &out.WebhookTokenAuthenticator
+ *out = new(WebhookTokenAuthenticator)
+ **out = **in
+ }
return
}
@@ -359,6 +445,22 @@ func (in *AuthenticationStatus) DeepCopy() *AuthenticationStatus {
return out
}
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *AzurePlatformSpec) DeepCopyInto(out *AzurePlatformSpec) {
+ *out = *in
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzurePlatformSpec.
+func (in *AzurePlatformSpec) DeepCopy() *AzurePlatformSpec {
+ if in == nil {
+ return nil
+ }
+ out := new(AzurePlatformSpec)
+ in.DeepCopyInto(out)
+ return out
+}
+
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *AzurePlatformStatus) DeepCopyInto(out *AzurePlatformStatus) {
*out = *in
@@ -375,6 +477,22 @@ func (in *AzurePlatformStatus) DeepCopy() *AzurePlatformStatus {
return out
}
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *BareMetalPlatformSpec) DeepCopyInto(out *BareMetalPlatformSpec) {
+ *out = *in
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BareMetalPlatformSpec.
+func (in *BareMetalPlatformSpec) DeepCopy() *BareMetalPlatformSpec {
+ if in == nil {
+ return nil
+ }
+ out := new(BareMetalPlatformSpec)
+ in.DeepCopyInto(out)
+ return out
+}
+
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *BareMetalPlatformStatus) DeepCopyInto(out *BareMetalPlatformStatus) {
*out = *in
@@ -529,6 +647,11 @@ func (in *BuildOverrides) DeepCopyInto(out *BuildOverrides) {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
+ if in.ForcePull != nil {
+ in, out := &in.ForcePull, &out.ForcePull
+ *out = new(bool)
+ **out = **in
+ }
return
}
@@ -827,7 +950,7 @@ func (in *ClusterVersionSpec) DeepCopy() *ClusterVersionSpec {
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ClusterVersionStatus) DeepCopyInto(out *ClusterVersionStatus) {
*out = *in
- out.Desired = in.Desired
+ in.Desired.DeepCopyInto(&out.Desired)
if in.History != nil {
in, out := &in.History, &out.History
*out = make([]UpdateHistory, len(*in))
@@ -844,8 +967,10 @@ func (in *ClusterVersionStatus) DeepCopyInto(out *ClusterVersionStatus) {
}
if in.AvailableUpdates != nil {
in, out := &in.AvailableUpdates, &out.AvailableUpdates
- *out = make([]Update, len(*in))
- copy(*out, *in)
+ *out = make([]Release, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
}
return
}
@@ -876,6 +1001,61 @@ func (in *ComponentOverride) DeepCopy() *ComponentOverride {
return out
}
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *ComponentRouteSpec) DeepCopyInto(out *ComponentRouteSpec) {
+ *out = *in
+ out.ServingCertKeyPairSecret = in.ServingCertKeyPairSecret
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComponentRouteSpec.
+func (in *ComponentRouteSpec) DeepCopy() *ComponentRouteSpec {
+ if in == nil {
+ return nil
+ }
+ out := new(ComponentRouteSpec)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *ComponentRouteStatus) DeepCopyInto(out *ComponentRouteStatus) {
+ *out = *in
+ if in.ConsumingUsers != nil {
+ in, out := &in.ConsumingUsers, &out.ConsumingUsers
+ *out = make([]ConsumingUser, len(*in))
+ copy(*out, *in)
+ }
+ if in.CurrentHostnames != nil {
+ in, out := &in.CurrentHostnames, &out.CurrentHostnames
+ *out = make([]Hostname, len(*in))
+ copy(*out, *in)
+ }
+ if in.Conditions != nil {
+ in, out := &in.Conditions, &out.Conditions
+ *out = make([]metav1.Condition, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
+ if in.RelatedObjects != nil {
+ in, out := &in.RelatedObjects, &out.RelatedObjects
+ *out = make([]ObjectReference, len(*in))
+ copy(*out, *in)
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComponentRouteStatus.
+func (in *ComponentRouteStatus) DeepCopy() *ComponentRouteStatus {
+ if in == nil {
+ return nil
+ }
+ out := new(ComponentRouteStatus)
+ in.DeepCopyInto(out)
+ return out
+}
+
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ConfigMapFileReference) DeepCopyInto(out *ConfigMapFileReference) {
*out = *in
@@ -1219,6 +1399,55 @@ func (in *DelegatedAuthorization) DeepCopy() *DelegatedAuthorization {
return out
}
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *DeprecatedWebhookTokenAuthenticator) DeepCopyInto(out *DeprecatedWebhookTokenAuthenticator) {
+ *out = *in
+ out.KubeConfig = in.KubeConfig
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeprecatedWebhookTokenAuthenticator.
+func (in *DeprecatedWebhookTokenAuthenticator) DeepCopy() *DeprecatedWebhookTokenAuthenticator {
+ if in == nil {
+ return nil
+ }
+ out := new(DeprecatedWebhookTokenAuthenticator)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *EquinixMetalPlatformSpec) DeepCopyInto(out *EquinixMetalPlatformSpec) {
+ *out = *in
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EquinixMetalPlatformSpec.
+func (in *EquinixMetalPlatformSpec) DeepCopy() *EquinixMetalPlatformSpec {
+ if in == nil {
+ return nil
+ }
+ out := new(EquinixMetalPlatformSpec)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *EquinixMetalPlatformStatus) DeepCopyInto(out *EquinixMetalPlatformStatus) {
+ *out = *in
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EquinixMetalPlatformStatus.
+func (in *EquinixMetalPlatformStatus) DeepCopy() *EquinixMetalPlatformStatus {
+ if in == nil {
+ return nil
+ }
+ out := new(EquinixMetalPlatformStatus)
+ in.DeepCopyInto(out)
+ return out
+}
+
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *EtcdConnectionInfo) DeepCopyInto(out *EtcdConnectionInfo) {
*out = *in
@@ -1451,6 +1680,22 @@ func (in *FeatureGateStatus) DeepCopy() *FeatureGateStatus {
return out
}
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *GCPPlatformSpec) DeepCopyInto(out *GCPPlatformSpec) {
+ *out = *in
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GCPPlatformSpec.
+func (in *GCPPlatformSpec) DeepCopy() *GCPPlatformSpec {
+ if in == nil {
+ return nil
+ }
+ out := new(GCPPlatformSpec)
+ in.DeepCopyInto(out)
+ return out
+}
+
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *GCPPlatformStatus) DeepCopyInto(out *GCPPlatformStatus) {
*out = *in
@@ -1643,6 +1888,38 @@ func (in *HubSourceStatus) DeepCopy() *HubSourceStatus {
return out
}
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *IBMCloudPlatformSpec) DeepCopyInto(out *IBMCloudPlatformSpec) {
+ *out = *in
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IBMCloudPlatformSpec.
+func (in *IBMCloudPlatformSpec) DeepCopy() *IBMCloudPlatformSpec {
+ if in == nil {
+ return nil
+ }
+ out := new(IBMCloudPlatformSpec)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *IBMCloudPlatformStatus) DeepCopyInto(out *IBMCloudPlatformStatus) {
+ *out = *in
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IBMCloudPlatformStatus.
+func (in *IBMCloudPlatformStatus) DeepCopy() *IBMCloudPlatformStatus {
+ if in == nil {
+ return nil
+ }
+ out := new(IBMCloudPlatformStatus)
+ in.DeepCopyInto(out)
+ return out
+}
+
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *IdentityProvider) DeepCopyInto(out *IdentityProvider) {
*out = *in
@@ -1852,7 +2129,7 @@ func (in *Infrastructure) DeepCopyInto(out *Infrastructure) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
- out.Spec = in.Spec
+ in.Spec.DeepCopyInto(&out.Spec)
in.Status.DeepCopyInto(&out.Status)
return
}
@@ -1912,6 +2189,7 @@ func (in *InfrastructureList) DeepCopyObject() runtime.Object {
func (in *InfrastructureSpec) DeepCopyInto(out *InfrastructureSpec) {
*out = *in
out.CloudConfig = in.CloudConfig
+ in.PlatformSpec.DeepCopyInto(&out.PlatformSpec)
return
}
@@ -1951,8 +2229,8 @@ func (in *Ingress) DeepCopyInto(out *Ingress) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
- out.Spec = in.Spec
- out.Status = in.Status
+ in.Spec.DeepCopyInto(&out.Spec)
+ in.Status.DeepCopyInto(&out.Status)
return
}
@@ -2010,6 +2288,11 @@ func (in *IngressList) DeepCopyObject() runtime.Object {
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *IngressSpec) DeepCopyInto(out *IngressSpec) {
*out = *in
+ if in.ComponentRoutes != nil {
+ in, out := &in.ComponentRoutes, &out.ComponentRoutes
+ *out = make([]ComponentRouteSpec, len(*in))
+ copy(*out, *in)
+ }
return
}
@@ -2026,6 +2309,13 @@ func (in *IngressSpec) DeepCopy() *IngressSpec {
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *IngressStatus) DeepCopyInto(out *IngressStatus) {
*out = *in
+ if in.ComponentRoutes != nil {
+ in, out := &in.ComponentRoutes, &out.ComponentRoutes
+ *out = make([]ComponentRouteStatus, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
return
}
@@ -2089,6 +2379,38 @@ func (in *KubeClientConfig) DeepCopy() *KubeClientConfig {
return out
}
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *KubevirtPlatformSpec) DeepCopyInto(out *KubevirtPlatformSpec) {
+ *out = *in
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubevirtPlatformSpec.
+func (in *KubevirtPlatformSpec) DeepCopy() *KubevirtPlatformSpec {
+ if in == nil {
+ return nil
+ }
+ out := new(KubevirtPlatformSpec)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *KubevirtPlatformStatus) DeepCopyInto(out *KubevirtPlatformStatus) {
+ *out = *in
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubevirtPlatformStatus.
+func (in *KubevirtPlatformStatus) DeepCopy() *KubevirtPlatformStatus {
+ if in == nil {
+ return nil
+ }
+ out := new(KubevirtPlatformStatus)
+ in.DeepCopyInto(out)
+ return out
+}
+
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *LDAPAttributeMapping) DeepCopyInto(out *LDAPAttributeMapping) {
*out = *in
@@ -2262,6 +2584,22 @@ func (in *NetworkList) DeepCopyObject() runtime.Object {
return nil
}
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *NetworkMigration) DeepCopyInto(out *NetworkMigration) {
+ *out = *in
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkMigration.
+func (in *NetworkMigration) DeepCopy() *NetworkMigration {
+ if in == nil {
+ return nil
+ }
+ out := new(NetworkMigration)
+ in.DeepCopyInto(out)
+ return out
+}
+
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *NetworkSpec) DeepCopyInto(out *NetworkSpec) {
*out = *in
@@ -2306,6 +2644,11 @@ func (in *NetworkStatus) DeepCopyInto(out *NetworkStatus) {
*out = make([]string, len(*in))
copy(*out, *in)
}
+ if in.Migration != nil {
+ in, out := &in.Migration, &out.Migration
+ *out = new(NetworkMigration)
+ **out = **in
+ }
return
}
@@ -2409,7 +2752,7 @@ func (in *OAuthSpec) DeepCopyInto(out *OAuthSpec) {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
- out.TokenConfig = in.TokenConfig
+ in.TokenConfig.DeepCopyInto(&out.TokenConfig)
out.Templates = in.Templates
return
}
@@ -2553,6 +2896,22 @@ func (in *OpenIDIdentityProvider) DeepCopy() *OpenIDIdentityProvider {
return out
}
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *OpenStackPlatformSpec) DeepCopyInto(out *OpenStackPlatformSpec) {
+ *out = *in
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenStackPlatformSpec.
+func (in *OpenStackPlatformSpec) DeepCopy() *OpenStackPlatformSpec {
+ if in == nil {
+ return nil
+ }
+ out := new(OpenStackPlatformSpec)
+ in.DeepCopyInto(out)
+ return out
+}
+
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *OpenStackPlatformStatus) DeepCopyInto(out *OpenStackPlatformStatus) {
*out = *in
@@ -2688,6 +3047,22 @@ func (in *OperatorHubStatus) DeepCopy() *OperatorHubStatus {
return out
}
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *OvirtPlatformSpec) DeepCopyInto(out *OvirtPlatformSpec) {
+ *out = *in
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OvirtPlatformSpec.
+func (in *OvirtPlatformSpec) DeepCopy() *OvirtPlatformSpec {
+ if in == nil {
+ return nil
+ }
+ out := new(OvirtPlatformSpec)
+ in.DeepCopyInto(out)
+ return out
+}
+
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *OvirtPlatformStatus) DeepCopyInto(out *OvirtPlatformStatus) {
*out = *in
@@ -2704,13 +3079,79 @@ func (in *OvirtPlatformStatus) DeepCopy() *OvirtPlatformStatus {
return out
}
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *PlatformSpec) DeepCopyInto(out *PlatformSpec) {
+ *out = *in
+ if in.AWS != nil {
+ in, out := &in.AWS, &out.AWS
+ *out = new(AWSPlatformSpec)
+ (*in).DeepCopyInto(*out)
+ }
+ if in.Azure != nil {
+ in, out := &in.Azure, &out.Azure
+ *out = new(AzurePlatformSpec)
+ **out = **in
+ }
+ if in.GCP != nil {
+ in, out := &in.GCP, &out.GCP
+ *out = new(GCPPlatformSpec)
+ **out = **in
+ }
+ if in.BareMetal != nil {
+ in, out := &in.BareMetal, &out.BareMetal
+ *out = new(BareMetalPlatformSpec)
+ **out = **in
+ }
+ if in.OpenStack != nil {
+ in, out := &in.OpenStack, &out.OpenStack
+ *out = new(OpenStackPlatformSpec)
+ **out = **in
+ }
+ if in.Ovirt != nil {
+ in, out := &in.Ovirt, &out.Ovirt
+ *out = new(OvirtPlatformSpec)
+ **out = **in
+ }
+ if in.VSphere != nil {
+ in, out := &in.VSphere, &out.VSphere
+ *out = new(VSpherePlatformSpec)
+ **out = **in
+ }
+ if in.IBMCloud != nil {
+ in, out := &in.IBMCloud, &out.IBMCloud
+ *out = new(IBMCloudPlatformSpec)
+ **out = **in
+ }
+ if in.Kubevirt != nil {
+ in, out := &in.Kubevirt, &out.Kubevirt
+ *out = new(KubevirtPlatformSpec)
+ **out = **in
+ }
+ if in.EquinixMetal != nil {
+ in, out := &in.EquinixMetal, &out.EquinixMetal
+ *out = new(EquinixMetalPlatformSpec)
+ **out = **in
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PlatformSpec.
+func (in *PlatformSpec) DeepCopy() *PlatformSpec {
+ if in == nil {
+ return nil
+ }
+ out := new(PlatformSpec)
+ in.DeepCopyInto(out)
+ return out
+}
+
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *PlatformStatus) DeepCopyInto(out *PlatformStatus) {
*out = *in
if in.AWS != nil {
in, out := &in.AWS, &out.AWS
*out = new(AWSPlatformStatus)
- **out = **in
+ (*in).DeepCopyInto(*out)
}
if in.Azure != nil {
in, out := &in.Azure, &out.Azure
@@ -2737,6 +3178,26 @@ func (in *PlatformStatus) DeepCopyInto(out *PlatformStatus) {
*out = new(OvirtPlatformStatus)
**out = **in
}
+ if in.VSphere != nil {
+ in, out := &in.VSphere, &out.VSphere
+ *out = new(VSpherePlatformStatus)
+ **out = **in
+ }
+ if in.IBMCloud != nil {
+ in, out := &in.IBMCloud, &out.IBMCloud
+ *out = new(IBMCloudPlatformStatus)
+ **out = **in
+ }
+ if in.Kubevirt != nil {
+ in, out := &in.Kubevirt, &out.Kubevirt
+ *out = new(KubevirtPlatformStatus)
+ **out = **in
+ }
+ if in.EquinixMetal != nil {
+ in, out := &in.EquinixMetal, &out.EquinixMetal
+ *out = new(EquinixMetalPlatformStatus)
+ **out = **in
+ }
return
}
@@ -2977,6 +3438,11 @@ func (in *RegistrySources) DeepCopyInto(out *RegistrySources) {
*out = make([]string, len(*in))
copy(*out, *in)
}
+ if in.ContainerRuntimeSearchRegistries != nil {
+ in, out := &in.ContainerRuntimeSearchRegistries, &out.ContainerRuntimeSearchRegistries
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
return
}
@@ -2990,6 +3456,27 @@ func (in *RegistrySources) DeepCopy() *RegistrySources {
return out
}
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *Release) DeepCopyInto(out *Release) {
+ *out = *in
+ if in.Channels != nil {
+ in, out := &in.Channels, &out.Channels
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Release.
+func (in *Release) DeepCopy() *Release {
+ if in == nil {
+ return nil
+ }
+ out := new(Release)
+ in.DeepCopyInto(out)
+ return out
+}
+
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *RemoteConnectionInfo) DeepCopyInto(out *RemoteConnectionInfo) {
*out = *in
@@ -3297,6 +3784,11 @@ func (in *TemplateReference) DeepCopy() *TemplateReference {
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *TokenConfig) DeepCopyInto(out *TokenConfig) {
*out = *in
+ if in.AccessTokenInactivityTimeout != nil {
+ in, out := &in.AccessTokenInactivityTimeout, &out.AccessTokenInactivityTimeout
+ *out = new(metav1.Duration)
+ **out = **in
+ }
return
}
@@ -3347,6 +3839,38 @@ func (in *UpdateHistory) DeepCopy() *UpdateHistory {
return out
}
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *VSpherePlatformSpec) DeepCopyInto(out *VSpherePlatformSpec) {
+ *out = *in
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VSpherePlatformSpec.
+func (in *VSpherePlatformSpec) DeepCopy() *VSpherePlatformSpec {
+ if in == nil {
+ return nil
+ }
+ out := new(VSpherePlatformSpec)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *VSpherePlatformStatus) DeepCopyInto(out *VSpherePlatformStatus) {
+ *out = *in
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VSpherePlatformStatus.
+func (in *VSpherePlatformStatus) DeepCopy() *VSpherePlatformStatus {
+ if in == nil {
+ return nil
+ }
+ out := new(VSpherePlatformStatus)
+ in.DeepCopyInto(out)
+ return out
+}
+
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *WebhookTokenAuthenticator) DeepCopyInto(out *WebhookTokenAuthenticator) {
*out = *in
diff --git a/vendor/github.com/openshift/api/config/v1/zz_generated.swagger_doc_generated.go b/vendor/github.com/openshift/api/config/v1/zz_generated.swagger_doc_generated.go
index 4ef6e1b69d7..23bb4fbb8f3 100644
--- a/vendor/github.com/openshift/api/config/v1/zz_generated.swagger_doc_generated.go
+++ b/vendor/github.com/openshift/api/config/v1/zz_generated.swagger_doc_generated.go
@@ -244,7 +244,9 @@ func (StringSourceSpec) SwaggerDoc() map[string]string {
}
var map_APIServer = map[string]string{
- "": "APIServer holds configuration (like serving certificates, client CA and CORS domains) shared by all API servers in the system, among them especially kube-apiserver and openshift-apiserver. The canonical name of an instance is 'cluster'.",
+ "": "APIServer holds configuration (like serving certificates, client CA and CORS domains) shared by all API servers in the system, among them especially kube-apiserver and openshift-apiserver. The canonical name of an instance is 'cluster'.",
+ "spec": "spec holds user settable values for configuration",
+ "status": "status holds observed values from the cluster. They may not be overridden.",
}
func (APIServer) SwaggerDoc() map[string]string {
@@ -282,13 +284,22 @@ var map_APIServerSpec = map[string]string{
"clientCA": "clientCA references a ConfigMap containing a certificate bundle for the signers that will be recognized for incoming client certificates in addition to the operator managed signers. If this is empty, then only operator managed signers are valid. You usually only have to set this if you have your own PKI you wish to honor client certificates from. The ConfigMap must exist in the openshift-config namespace and contain the following required fields: - ConfigMap.Data[\"ca-bundle.crt\"] - CA bundle.",
"additionalCORSAllowedOrigins": "additionalCORSAllowedOrigins lists additional, user-defined regular expressions describing hosts for which the API server allows access using the CORS headers. This may be needed to access the API and the integrated OAuth server from JavaScript applications. The values are regular expressions that correspond to the Golang regular expression language.",
"encryption": "encryption allows the configuration of encryption of resources at the datastore layer.",
- "tlsSecurityProfile": "tlsSecurityProfile specifies settings for TLS connections for externally exposed servers.\n\nIf unset, a default (which may change between releases) is chosen. Note that only Old and Intermediate profiles are currently supported, and the maximum available MinTLSVersions is VersionTLS12.",
+ "tlsSecurityProfile": "tlsSecurityProfile specifies settings for TLS connections for externally exposed servers.\n\nIf unset, a default (which may change between releases) is chosen. Note that only Old, Intermediate and Custom profiles are currently supported, and the maximum available MinTLSVersions is VersionTLS12.",
+ "audit": "audit specifies the settings for audit configuration to be applied to all OpenShift-provided API servers in the cluster.",
}
func (APIServerSpec) SwaggerDoc() map[string]string {
return map_APIServerSpec
}
+var map_Audit = map[string]string{
+ "profile": "profile specifies the name of the desired audit policy configuration to be deployed to all OpenShift-provided API servers in the cluster.\n\nThe following profiles are provided: - Default: the existing default policy. - WriteRequestBodies: like 'Default', but logs request and response HTTP payloads for write requests (create, update, patch). - AllRequestBodies: like 'WriteRequestBodies', but also logs request and response HTTP payloads for read requests (get, list).\n\nIf unset, the 'Default' profile is used as the default.",
+}
+
+func (Audit) SwaggerDoc() map[string]string {
+ return map_Audit
+}
+
var map_Authentication = map[string]string{
"": "Authentication specifies cluster-wide settings for authentication (like OAuth and webhook token authenticators). The canonical name of an instance is `cluster`.",
"spec": "spec holds user settable values for configuration",
@@ -302,7 +313,9 @@ func (Authentication) SwaggerDoc() map[string]string {
var map_AuthenticationSpec = map[string]string{
"type": "type identifies the cluster managed, user facing authentication mode in use. Specifically, it manages the component that responds to login attempts. The default is IntegratedOAuth.",
"oauthMetadata": "oauthMetadata contains the discovery endpoint data for OAuth 2.0 Authorization Server Metadata for an external OAuth server. This discovery document can be viewed from its served location: oc get --raw '/.well-known/oauth-authorization-server' For further details, see the IETF Draft: https://tools.ietf.org/html/draft-ietf-oauth-discovery-04#section-2 If oauthMetadata.name is non-empty, this value has precedence over any metadata reference stored in status. The key \"oauthMetadata\" is used to locate the data. If specified and the config map or expected key is not found, no metadata is served. If the specified metadata is not valid, no metadata is served. The namespace for this config map is openshift-config.",
- "webhookTokenAuthenticators": "webhookTokenAuthenticators configures remote token reviewers. These remote authentication webhooks can be used to verify bearer tokens via the tokenreviews.authentication.k8s.io REST API. This is required to honor bearer tokens that are provisioned by an external authentication service. The namespace for these secrets is openshift-config.",
+ "webhookTokenAuthenticators": "webhookTokenAuthenticators is DEPRECATED, setting it has no effect.",
+ "webhookTokenAuthenticator": "webhookTokenAuthenticator configures a remote token reviewer. These remote authentication webhooks can be used to verify bearer tokens via the tokenreviews.authentication.k8s.io REST API. This is required to honor bearer tokens that are provisioned by an external authentication service.",
+ "serviceAccountIssuer": "serviceAccountIssuer is the identifier of the bound service account token issuer. The default is https://kubernetes.default.svc WARNING: Updating this field will result in the invalidation of all bound tokens with the previous issuer value. Unless the holder of a bound token has explicit support for a change in issuer, they will not request a new bound token until pod restart or until their existing token exceeds 80% of its duration.",
}
func (AuthenticationSpec) SwaggerDoc() map[string]string {
@@ -317,9 +330,18 @@ func (AuthenticationStatus) SwaggerDoc() map[string]string {
return map_AuthenticationStatus
}
+var map_DeprecatedWebhookTokenAuthenticator = map[string]string{
+ "": "deprecatedWebhookTokenAuthenticator holds the necessary configuration options for a remote token authenticator. It's the same as WebhookTokenAuthenticator but it's missing the 'required' validation on KubeConfig field.",
+ "kubeConfig": "kubeConfig contains kube config file data which describes how to access the remote webhook service. For further details, see: https://kubernetes.io/docs/reference/access-authn-authz/authentication/#webhook-token-authentication The key \"kubeConfig\" is used to locate the data. If the secret or expected key is not found, the webhook is not honored. If the specified kube config data is not valid, the webhook is not honored. The namespace for this secret is determined by the point of use.",
+}
+
+func (DeprecatedWebhookTokenAuthenticator) SwaggerDoc() map[string]string {
+ return map_DeprecatedWebhookTokenAuthenticator
+}
+
var map_WebhookTokenAuthenticator = map[string]string{
"": "webhookTokenAuthenticator holds the necessary configuration options for a remote token authenticator",
- "kubeConfig": "kubeConfig contains kube config file data which describes how to access the remote webhook service. For further details, see: https://kubernetes.io/docs/reference/access-authn-authz/authentication/#webhook-token-authentication The key \"kubeConfig\" is used to locate the data. If the secret or expected key is not found, the webhook is not honored. If the specified kube config data is not valid, the webhook is not honored. The namespace for this secret is determined by the point of use.",
+ "kubeConfig": "kubeConfig references a secret that contains kube config file data which describes how to access the remote webhook service. The namespace for the referenced secret is openshift-config.\n\nFor further details, see:\n\nhttps://kubernetes.io/docs/reference/access-authn-authz/authentication/#webhook-token-authentication\n\nThe key \"kubeConfig\" is used to locate the data. If the secret or expected key is not found, the webhook is not honored. If the specified kube config data is not valid, the webhook is not honored.",
}
func (WebhookTokenAuthenticator) SwaggerDoc() map[string]string {
@@ -351,6 +373,7 @@ var map_BuildOverrides = map[string]string{
"imageLabels": "ImageLabels is a list of docker labels that are applied to the resulting image. If user provided a label in their Build/BuildConfig with the same name as one in this list, the user's label will be overwritten.",
"nodeSelector": "NodeSelector is a selector which must be true for the build pod to fit on a node",
"tolerations": "Tolerations is a list of Tolerations that will override any existing tolerations set on a build pod.",
+ "forcePull": "ForcePull overrides, if set, the equivalent value in the builds, i.e. false disables force pull for all builds, true enables force pull for all builds, independently of what each build specifies itself",
}
func (BuildOverrides) SwaggerDoc() map[string]string {
@@ -378,7 +401,7 @@ func (ImageLabel) SwaggerDoc() map[string]string {
var map_ClusterOperator = map[string]string{
"": "ClusterOperator is the Custom Resource object which holds the current state of an operator. This object is used by operators to convey their state to the rest of the cluster.",
- "spec": "spec hold the intent of how this operator should behave.",
+ "spec": "spec holds configuration that could apply to any operator.",
"status": "status holds the information about the state of an operator. It is consistent with status information across the Kubernetes ecosystem.",
}
@@ -420,7 +443,7 @@ var map_ClusterOperatorStatusCondition = map[string]string{
"status": "status of the condition, one of True, False, Unknown.",
"lastTransitionTime": "lastTransitionTime is the time of the last update to the current status property.",
"reason": "reason is the CamelCase reason for the condition's current status.",
- "message": "message provides additional information about the current condition. This is only to be consumed by humans.",
+ "message": "message provides additional information about the current condition. This is only to be consumed by humans. It may contain Line Feed characters (U+000A), which should be rendered as new lines.",
}
func (ClusterOperatorStatusCondition) SwaggerDoc() map[string]string {
@@ -506,8 +529,20 @@ func (ComponentOverride) SwaggerDoc() map[string]string {
return map_ComponentOverride
}
+var map_Release = map[string]string{
+ "": "Release represents an OpenShift release image and associated metadata.",
+ "version": "version is a semantic versioning identifying the update version. When this field is part of spec, version is optional if image is specified.",
+ "image": "image is a container image location that contains the update. When this field is part of spec, image is optional if version is specified and the availableUpdates field contains a matching version.",
+ "url": "url contains information about this release. This URL is set by the 'url' metadata property on a release or the metadata returned by the update API and should be displayed as a link in user interfaces. The URL field may not be set for test or nightly releases.",
+ "channels": "channels is the set of Cincinnati channels to which the release currently belongs.",
+}
+
+func (Release) SwaggerDoc() map[string]string {
+ return map_Release
+}
+
var map_Update = map[string]string{
- "": "Update represents a release of the ClusterVersionOperator, referenced by the Image member.",
+ "": "Update represents an administrator update request.",
"version": "version is a semantic versioning identifying the update version. When this field is part of spec, version is optional if image is specified.",
"image": "image is a container image location that contains the update. When this field is part of spec, image is optional if version is specified and the availableUpdates field contains a matching version.",
"force": "force allows an administrator to update to an image that has failed verification, does not appear in the availableUpdates list, or otherwise would be blocked by normal protections on update. This option should only be used when the authenticity of the provided image has been verified out of band because the provided image will run with full administrative access to the cluster. Do not use this flag with images that comes from unknown or potentially malicious sources.\n\nThis flag does not override other forms of consistency checking that are required before a new update is deployed.",
@@ -626,7 +661,7 @@ func (FeatureGateSelection) SwaggerDoc() map[string]string {
}
var map_Image = map[string]string{
- "": "Image governs policies related to imagestream imports and runtime configuration for external registries. It allows cluster admins to configure which registries OpenShift is allowed to import images from, extra CA trust bundles for external registries, and policies to blacklist/whitelist registry hostnames. When exposing OpenShift's image registry to the public, this also lets cluster admins specify the external hostname.",
+ "": "Image governs policies related to imagestream imports and runtime configuration for external registries. It allows cluster admins to configure which registries OpenShift is allowed to import images from, extra CA trust bundles for external registries, and policies to block or allow registry hostnames. When exposing OpenShift's image registry to the public, this also lets cluster admins specify the external hostname.",
"spec": "spec holds user settable values for configuration",
"status": "status holds observed values from the cluster. They may not be overridden.",
}
@@ -666,35 +701,85 @@ func (RegistryLocation) SwaggerDoc() map[string]string {
}
var map_RegistrySources = map[string]string{
- "": "RegistrySources holds cluster-wide information about how to handle the registries config.",
- "insecureRegistries": "insecureRegistries are registries which do not have a valid TLS certificates or only support HTTP connections.",
- "blockedRegistries": "blockedRegistries are blacklisted from image pull/push. All other registries are allowed.\n\nOnly one of BlockedRegistries or AllowedRegistries may be set.",
- "allowedRegistries": "allowedRegistries are whitelisted for image pull/push. All other registries are blocked.\n\nOnly one of BlockedRegistries or AllowedRegistries may be set.",
+ "": "RegistrySources holds cluster-wide information about how to handle the registries config.",
+ "insecureRegistries": "insecureRegistries are registries which do not have a valid TLS certificates or only support HTTP connections.",
+ "blockedRegistries": "blockedRegistries cannot be used for image pull and push actions. All other registries are permitted.\n\nOnly one of BlockedRegistries or AllowedRegistries may be set.",
+ "allowedRegistries": "allowedRegistries are the only registries permitted for image pull and push actions. All other registries are denied.\n\nOnly one of BlockedRegistries or AllowedRegistries may be set.",
+ "containerRuntimeSearchRegistries": "containerRuntimeSearchRegistries are registries that will be searched when pulling images that do not have fully qualified domains in their pull specs. Registries will be searched in the order provided in the list. Note: this search list only works with the container runtime, i.e CRI-O. Will NOT work with builds or imagestream imports.",
}
func (RegistrySources) SwaggerDoc() map[string]string {
return map_RegistrySources
}
+var map_AWSPlatformSpec = map[string]string{
+ "": "AWSPlatformSpec holds the desired state of the Amazon Web Services infrastructure provider. This only includes fields that can be modified in the cluster.",
+ "serviceEndpoints": "serviceEndpoints list contains custom endpoints which will override default service endpoint of AWS Services. There must be only one ServiceEndpoint for a service.",
+}
+
+func (AWSPlatformSpec) SwaggerDoc() map[string]string {
+ return map_AWSPlatformSpec
+}
+
var map_AWSPlatformStatus = map[string]string{
- "": "AWSPlatformStatus holds the current status of the Amazon Web Services infrastructure provider.",
- "region": "region holds the default AWS region for new AWS resources created by the cluster.",
+ "": "AWSPlatformStatus holds the current status of the Amazon Web Services infrastructure provider.",
+ "region": "region holds the default AWS region for new AWS resources created by the cluster.",
+ "serviceEndpoints": "ServiceEndpoints list contains custom endpoints which will override default service endpoint of AWS Services. There must be only one ServiceEndpoint for a service.",
+ "resourceTags": "resourceTags is a list of additional tags to apply to AWS resources created for the cluster. See https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html for information on tagging AWS resources. AWS supports a maximum of 50 tags per resource. OpenShift reserves 25 tags for its use, leaving 25 tags available for the user.",
}
func (AWSPlatformStatus) SwaggerDoc() map[string]string {
return map_AWSPlatformStatus
}
+var map_AWSResourceTag = map[string]string{
+ "": "AWSResourceTag is a tag to apply to AWS resources created for the cluster.",
+ "key": "key is the key of the tag",
+ "value": "value is the value of the tag. Some AWS service do not support empty values. Since tags are added to resources in many services, the length of the tag value must meet the requirements of all services.",
+}
+
+func (AWSResourceTag) SwaggerDoc() map[string]string {
+ return map_AWSResourceTag
+}
+
+var map_AWSServiceEndpoint = map[string]string{
+ "": "AWSServiceEndpoint store the configuration of a custom url to override existing defaults of AWS Services.",
+ "name": "name is the name of the AWS service. The list of all the service names can be found at https://docs.aws.amazon.com/general/latest/gr/aws-service-information.html This must be provided and cannot be empty.",
+ "url": "url is fully qualified URI with scheme https, that overrides the default generated endpoint for a client. This must be provided and cannot be empty.",
+}
+
+func (AWSServiceEndpoint) SwaggerDoc() map[string]string {
+ return map_AWSServiceEndpoint
+}
+
+var map_AzurePlatformSpec = map[string]string{
+ "": "AzurePlatformSpec holds the desired state of the Azure infrastructure provider. This only includes fields that can be modified in the cluster.",
+}
+
+func (AzurePlatformSpec) SwaggerDoc() map[string]string {
+ return map_AzurePlatformSpec
+}
+
var map_AzurePlatformStatus = map[string]string{
"": "AzurePlatformStatus holds the current status of the Azure infrastructure provider.",
"resourceGroupName": "resourceGroupName is the Resource Group for new Azure resources created for the cluster.",
"networkResourceGroupName": "networkResourceGroupName is the Resource Group for network resources like the Virtual Network and Subnets used by the cluster. If empty, the value is same as ResourceGroupName.",
+ "cloudName": "cloudName is the name of the Azure cloud environment which can be used to configure the Azure SDK with the appropriate Azure API endpoints. If empty, the value is equal to `AzurePublicCloud`.",
+ "armEndpoint": "armEndpoint specifies a URL to use for resource management in non-soverign clouds such as Azure Stack.",
}
func (AzurePlatformStatus) SwaggerDoc() map[string]string {
return map_AzurePlatformStatus
}
+var map_BareMetalPlatformSpec = map[string]string{
+ "": "BareMetalPlatformSpec holds the desired state of the BareMetal infrastructure provider. This only includes fields that can be modified in the cluster.",
+}
+
+func (BareMetalPlatformSpec) SwaggerDoc() map[string]string {
+ return map_BareMetalPlatformSpec
+}
+
var map_BareMetalPlatformStatus = map[string]string{
"": "BareMetalPlatformStatus holds the current status of the BareMetal infrastructure provider. For more information about the network architecture used with the BareMetal platform type, see: https://github.com/openshift/installer/blob/master/docs/design/baremetal/networking-infrastructure.md",
"apiServerInternalIP": "apiServerInternalIP is an IP address to contact the Kubernetes API server that can be used by components inside the cluster, like kubelets using the infrastructure rather than Kubernetes networking. It is the IP that the Infrastructure.status.apiServerInternalURI points to. It is the IP for a self-hosted load balancer in front of the API servers.",
@@ -706,6 +791,32 @@ func (BareMetalPlatformStatus) SwaggerDoc() map[string]string {
return map_BareMetalPlatformStatus
}
+var map_EquinixMetalPlatformSpec = map[string]string{
+ "": "EquinixMetalPlatformSpec holds the desired state of the Equinix Metal infrastructure provider. This only includes fields that can be modified in the cluster.",
+}
+
+func (EquinixMetalPlatformSpec) SwaggerDoc() map[string]string {
+ return map_EquinixMetalPlatformSpec
+}
+
+var map_EquinixMetalPlatformStatus = map[string]string{
+ "": "EquinixMetalPlatformStatus holds the current status of the Equinix Metal infrastructure provider.",
+ "apiServerInternalIP": "apiServerInternalIP is an IP address to contact the Kubernetes API server that can be used by components inside the cluster, like kubelets using the infrastructure rather than Kubernetes networking. It is the IP that the Infrastructure.status.apiServerInternalURI points to. It is the IP for a self-hosted load balancer in front of the API servers.",
+ "ingressIP": "ingressIP is an external IP which routes to the default ingress controller. The IP is a suitable target of a wildcard DNS record used to resolve default route host names.",
+}
+
+func (EquinixMetalPlatformStatus) SwaggerDoc() map[string]string {
+ return map_EquinixMetalPlatformStatus
+}
+
+var map_GCPPlatformSpec = map[string]string{
+ "": "GCPPlatformSpec holds the desired state of the Google Cloud Platform infrastructure provider. This only includes fields that can be modified in the cluster.",
+}
+
+func (GCPPlatformSpec) SwaggerDoc() map[string]string {
+ return map_GCPPlatformSpec
+}
+
var map_GCPPlatformStatus = map[string]string{
"": "GCPPlatformStatus holds the current status of the Google Cloud Platform infrastructure provider.",
"projectID": "resourceGroupName is the Project ID for new GCP resources created for the cluster.",
@@ -716,6 +827,25 @@ func (GCPPlatformStatus) SwaggerDoc() map[string]string {
return map_GCPPlatformStatus
}
+var map_IBMCloudPlatformSpec = map[string]string{
+ "": "IBMCloudPlatformSpec holds the desired state of the IBMCloud infrastructure provider. This only includes fields that can be modified in the cluster.",
+}
+
+func (IBMCloudPlatformSpec) SwaggerDoc() map[string]string {
+ return map_IBMCloudPlatformSpec
+}
+
+var map_IBMCloudPlatformStatus = map[string]string{
+ "": "IBMCloudPlatformStatus holds the current status of the IBMCloud infrastructure provider.",
+ "location": "Location is where the cluster has been deployed",
+ "resourceGroupName": "ResourceGroupName is the Resource Group for new IBMCloud resources created for the cluster.",
+ "providerType": "ProviderType indicates the type of cluster that was created",
+}
+
+func (IBMCloudPlatformStatus) SwaggerDoc() map[string]string {
+ return map_IBMCloudPlatformStatus
+}
+
var map_Infrastructure = map[string]string{
"": "Infrastructure holds cluster-wide information about Infrastructure. The canonical name is `cluster`",
"spec": "spec holds user settable values for configuration",
@@ -735,8 +865,9 @@ func (InfrastructureList) SwaggerDoc() map[string]string {
}
var map_InfrastructureSpec = map[string]string{
- "": "InfrastructureSpec contains settings that apply to the cluster infrastructure.",
- "cloudConfig": "cloudConfig is a reference to a ConfigMap containing the cloud provider configuration file. This configuration file is used to configure the Kubernetes cloud provider integration when using the built-in cloud provider integration or the external cloud controller manager. The namespace for this config map is openshift-config.",
+ "": "InfrastructureSpec contains settings that apply to the cluster infrastructure.",
+ "cloudConfig": "cloudConfig is a reference to a ConfigMap containing the cloud provider configuration file. This configuration file is used to configure the Kubernetes cloud provider integration when using the built-in cloud provider integration or the external cloud controller manager. The namespace for this config map is openshift-config.\n\ncloudConfig should only be consumed by the kube_cloud_config controller. The controller is responsible for using the user configuration in the spec for various platforms and combining that with the user provided ConfigMap in this field to create a stitched kube cloud config. The controller generates a ConfigMap `kube-cloud-config` in `openshift-config-managed` namespace with the kube cloud config is stored in `cloud.conf` key. All the clients are expected to use the generated ConfigMap only.",
+ "platformSpec": "platformSpec holds desired information specific to the underlying infrastructure provider.",
}
func (InfrastructureSpec) SwaggerDoc() map[string]string {
@@ -744,19 +875,47 @@ func (InfrastructureSpec) SwaggerDoc() map[string]string {
}
var map_InfrastructureStatus = map[string]string{
- "": "InfrastructureStatus describes the infrastructure the cluster is leveraging.",
- "infrastructureName": "infrastructureName uniquely identifies a cluster with a human friendly name. Once set it should not be changed. Must be of max length 27 and must have only alphanumeric or hyphen characters.",
- "platform": "platform is the underlying infrastructure provider for the cluster.\n\nDeprecated: Use platformStatus.type instead.",
- "platformStatus": "platformStatus holds status information specific to the underlying infrastructure provider.",
- "etcdDiscoveryDomain": "etcdDiscoveryDomain is the domain used to fetch the SRV records for discovering etcd servers and clients. For more info: https://github.com/etcd-io/etcd/blob/329be66e8b3f9e2e6af83c123ff89297e49ebd15/Documentation/op-guide/clustering.md#dns-discovery",
- "apiServerURL": "apiServerURL is a valid URI with scheme(http/https), address and port. apiServerURL can be used by components like the web console to tell users where to find the Kubernetes API.",
- "apiServerInternalURI": "apiServerInternalURL is a valid URI with scheme(http/https), address and port. apiServerInternalURL can be used by components like kubelets, to contact the Kubernetes API server using the infrastructure provider rather than Kubernetes networking.",
+ "": "InfrastructureStatus describes the infrastructure the cluster is leveraging.",
+ "infrastructureName": "infrastructureName uniquely identifies a cluster with a human friendly name. Once set it should not be changed. Must be of max length 27 and must have only alphanumeric or hyphen characters.",
+ "platform": "platform is the underlying infrastructure provider for the cluster.\n\nDeprecated: Use platformStatus.type instead.",
+ "platformStatus": "platformStatus holds status information specific to the underlying infrastructure provider.",
+ "etcdDiscoveryDomain": "etcdDiscoveryDomain is the domain used to fetch the SRV records for discovering etcd servers and clients. For more info: https://github.com/etcd-io/etcd/blob/329be66e8b3f9e2e6af83c123ff89297e49ebd15/Documentation/op-guide/clustering.md#dns-discovery deprecated: as of 4.7, this field is no longer set or honored. It will be removed in a future release.",
+ "apiServerURL": "apiServerURL is a valid URI with scheme 'https', address and optionally a port (defaulting to 443). apiServerURL can be used by components like the web console to tell users where to find the Kubernetes API.",
+ "apiServerInternalURI": "apiServerInternalURL is a valid URI with scheme 'https', address and optionally a port (defaulting to 443). apiServerInternalURL can be used by components like kubelets, to contact the Kubernetes API server using the infrastructure provider rather than Kubernetes networking.",
+ "controlPlaneTopology": "controlPlaneTopology expresses the expectations for operands that normally run on control nodes. The default is 'HighlyAvailable', which represents the behavior operators have in a \"normal\" cluster. The 'SingleReplica' mode will be used in single-node deployments and the operators should not configure the operand for highly-available operation",
+ "infrastructureTopology": "infrastructureTopology expresses the expectations for infrastructure services that do not run on control plane nodes, usually indicated by a node selector for a `role` value other than `master`. The default is 'HighlyAvailable', which represents the behavior operators have in a \"normal\" cluster. The 'SingleReplica' mode will be used in single-node deployments and the operators should not configure the operand for highly-available operation",
}
func (InfrastructureStatus) SwaggerDoc() map[string]string {
return map_InfrastructureStatus
}
+var map_KubevirtPlatformSpec = map[string]string{
+ "": "KubevirtPlatformSpec holds the desired state of the kubevirt infrastructure provider. This only includes fields that can be modified in the cluster.",
+}
+
+func (KubevirtPlatformSpec) SwaggerDoc() map[string]string {
+ return map_KubevirtPlatformSpec
+}
+
+var map_KubevirtPlatformStatus = map[string]string{
+ "": "KubevirtPlatformStatus holds the current status of the kubevirt infrastructure provider.",
+ "apiServerInternalIP": "apiServerInternalIP is an IP address to contact the Kubernetes API server that can be used by components inside the cluster, like kubelets using the infrastructure rather than Kubernetes networking. It is the IP that the Infrastructure.status.apiServerInternalURI points to. It is the IP for a self-hosted load balancer in front of the API servers.",
+ "ingressIP": "ingressIP is an external IP which routes to the default ingress controller. The IP is a suitable target of a wildcard DNS record used to resolve default route host names.",
+}
+
+func (KubevirtPlatformStatus) SwaggerDoc() map[string]string {
+ return map_KubevirtPlatformStatus
+}
+
+var map_OpenStackPlatformSpec = map[string]string{
+ "": "OpenStackPlatformSpec holds the desired state of the OpenStack infrastructure provider. This only includes fields that can be modified in the cluster.",
+}
+
+func (OpenStackPlatformSpec) SwaggerDoc() map[string]string {
+ return map_OpenStackPlatformSpec
+}
+
var map_OpenStackPlatformStatus = map[string]string{
"": "OpenStackPlatformStatus holds the current status of the OpenStack infrastructure provider.",
"apiServerInternalIP": "apiServerInternalIP is an IP address to contact the Kubernetes API server that can be used by components inside the cluster, like kubelets using the infrastructure rather than Kubernetes networking. It is the IP that the Infrastructure.status.apiServerInternalURI points to. It is the IP for a self-hosted load balancer in front of the API servers.",
@@ -769,32 +928,109 @@ func (OpenStackPlatformStatus) SwaggerDoc() map[string]string {
return map_OpenStackPlatformStatus
}
+var map_OvirtPlatformSpec = map[string]string{
+ "": "OvirtPlatformSpec holds the desired state of the oVirt infrastructure provider. This only includes fields that can be modified in the cluster.",
+}
+
+func (OvirtPlatformSpec) SwaggerDoc() map[string]string {
+ return map_OvirtPlatformSpec
+}
+
var map_OvirtPlatformStatus = map[string]string{
"": "OvirtPlatformStatus holds the current status of the oVirt infrastructure provider.",
"apiServerInternalIP": "apiServerInternalIP is an IP address to contact the Kubernetes API server that can be used by components inside the cluster, like kubelets using the infrastructure rather than Kubernetes networking. It is the IP that the Infrastructure.status.apiServerInternalURI points to. It is the IP for a self-hosted load balancer in front of the API servers.",
"ingressIP": "ingressIP is an external IP which routes to the default ingress controller. The IP is a suitable target of a wildcard DNS record used to resolve default route host names.",
- "nodeDNSIP": "nodeDNSIP is the IP address for the internal DNS used by the nodes. Unlike the one managed by the DNS operator, `NodeDNSIP` provides name resolution for the nodes themselves. There is no DNS-as-a-service for oVirt deployments. In order to minimize necessary changes to the datacenter DNS, a DNS service is hosted as a static pod to serve those hostnames to the nodes in the cluster.",
+ "nodeDNSIP": "deprecated: as of 4.6, this field is no longer set or honored. It will be removed in a future release.",
}
func (OvirtPlatformStatus) SwaggerDoc() map[string]string {
return map_OvirtPlatformStatus
}
+var map_PlatformSpec = map[string]string{
+ "": "PlatformSpec holds the desired state specific to the underlying infrastructure provider of the current cluster. Since these are used at spec-level for the underlying cluster, it is supposed that only one of the spec structs is set.",
+ "type": "type is the underlying infrastructure provider for the cluster. This value controls whether infrastructure automation such as service load balancers, dynamic volume provisioning, machine creation and deletion, and other integrations are enabled. If None, no infrastructure automation is enabled. Allowed values are \"AWS\", \"Azure\", \"BareMetal\", \"GCP\", \"Libvirt\", \"OpenStack\", \"VSphere\", \"oVirt\", \"KubeVirt\", \"EquinixMetal\", and \"None\". Individual components may not support all platforms, and must handle unrecognized platforms as None if they do not support that platform.",
+ "aws": "AWS contains settings specific to the Amazon Web Services infrastructure provider.",
+ "azure": "Azure contains settings specific to the Azure infrastructure provider.",
+ "gcp": "GCP contains settings specific to the Google Cloud Platform infrastructure provider.",
+ "baremetal": "BareMetal contains settings specific to the BareMetal platform.",
+ "openstack": "OpenStack contains settings specific to the OpenStack infrastructure provider.",
+ "ovirt": "Ovirt contains settings specific to the oVirt infrastructure provider.",
+ "vsphere": "VSphere contains settings specific to the VSphere infrastructure provider.",
+ "ibmcloud": "IBMCloud contains settings specific to the IBMCloud infrastructure provider.",
+ "kubevirt": "Kubevirt contains settings specific to the kubevirt infrastructure provider.",
+ "equinixMetal": "EquinixMetal contains settings specific to the Equinix Metal infrastructure provider.",
+}
+
+func (PlatformSpec) SwaggerDoc() map[string]string {
+ return map_PlatformSpec
+}
+
var map_PlatformStatus = map[string]string{
- "": "PlatformStatus holds the current status specific to the underlying infrastructure provider of the current cluster. Since these are used at status-level for the underlying cluster, it is supposed that only one of the status structs is set.",
- "type": "type is the underlying infrastructure provider for the cluster. This value controls whether infrastructure automation such as service load balancers, dynamic volume provisioning, machine creation and deletion, and other integrations are enabled. If None, no infrastructure automation is enabled. Allowed values are \"AWS\", \"Azure\", \"BareMetal\", \"GCP\", \"Libvirt\", \"OpenStack\", \"VSphere\", \"oVirt\", and \"None\". Individual components may not support all platforms, and must handle unrecognized platforms as None if they do not support that platform.",
- "aws": "AWS contains settings specific to the Amazon Web Services infrastructure provider.",
- "azure": "Azure contains settings specific to the Azure infrastructure provider.",
- "gcp": "GCP contains settings specific to the Google Cloud Platform infrastructure provider.",
- "baremetal": "BareMetal contains settings specific to the BareMetal platform.",
- "openstack": "OpenStack contains settings specific to the OpenStack infrastructure provider.",
- "ovirt": "Ovirt contains settings specific to the oVirt infrastructure provider.",
+ "": "PlatformStatus holds the current status specific to the underlying infrastructure provider of the current cluster. Since these are used at status-level for the underlying cluster, it is supposed that only one of the status structs is set.",
+ "type": "type is the underlying infrastructure provider for the cluster. This value controls whether infrastructure automation such as service load balancers, dynamic volume provisioning, machine creation and deletion, and other integrations are enabled. If None, no infrastructure automation is enabled. Allowed values are \"AWS\", \"Azure\", \"BareMetal\", \"GCP\", \"Libvirt\", \"OpenStack\", \"VSphere\", \"oVirt\", \"EquinixMetal\", and \"None\". Individual components may not support all platforms, and must handle unrecognized platforms as None if they do not support that platform.\n\nThis value will be synced with to the `status.platform` and `status.platformStatus.type`. Currently this value cannot be changed once set.",
+ "aws": "AWS contains settings specific to the Amazon Web Services infrastructure provider.",
+ "azure": "Azure contains settings specific to the Azure infrastructure provider.",
+ "gcp": "GCP contains settings specific to the Google Cloud Platform infrastructure provider.",
+ "baremetal": "BareMetal contains settings specific to the BareMetal platform.",
+ "openstack": "OpenStack contains settings specific to the OpenStack infrastructure provider.",
+ "ovirt": "Ovirt contains settings specific to the oVirt infrastructure provider.",
+ "vsphere": "VSphere contains settings specific to the VSphere infrastructure provider.",
+ "ibmcloud": "IBMCloud contains settings specific to the IBMCloud infrastructure provider.",
+ "kubevirt": "Kubevirt contains settings specific to the kubevirt infrastructure provider.",
+ "equinixMetal": "EquinixMetal contains settings specific to the Equinix Metal infrastructure provider.",
}
func (PlatformStatus) SwaggerDoc() map[string]string {
return map_PlatformStatus
}
+var map_VSpherePlatformSpec = map[string]string{
+ "": "VSpherePlatformSpec holds the desired state of the vSphere infrastructure provider. This only includes fields that can be modified in the cluster.",
+}
+
+func (VSpherePlatformSpec) SwaggerDoc() map[string]string {
+ return map_VSpherePlatformSpec
+}
+
+var map_VSpherePlatformStatus = map[string]string{
+ "": "VSpherePlatformStatus holds the current status of the vSphere infrastructure provider.",
+ "apiServerInternalIP": "apiServerInternalIP is an IP address to contact the Kubernetes API server that can be used by components inside the cluster, like kubelets using the infrastructure rather than Kubernetes networking. It is the IP that the Infrastructure.status.apiServerInternalURI points to. It is the IP for a self-hosted load balancer in front of the API servers.",
+ "ingressIP": "ingressIP is an external IP which routes to the default ingress controller. The IP is a suitable target of a wildcard DNS record used to resolve default route host names.",
+ "nodeDNSIP": "nodeDNSIP is the IP address for the internal DNS used by the nodes. Unlike the one managed by the DNS operator, `NodeDNSIP` provides name resolution for the nodes themselves. There is no DNS-as-a-service for vSphere deployments. In order to minimize necessary changes to the datacenter DNS, a DNS service is hosted as a static pod to serve those hostnames to the nodes in the cluster.",
+}
+
+func (VSpherePlatformStatus) SwaggerDoc() map[string]string {
+ return map_VSpherePlatformStatus
+}
+
+var map_ComponentRouteSpec = map[string]string{
+ "": "ComponentRouteSpec allows for configuration of a route's hostname and serving certificate.",
+ "namespace": "namespace is the namespace of the route to customize.\n\nThe namespace and name of this componentRoute must match a corresponding entry in the list of status.componentRoutes if the route is to be customized.",
+ "name": "name is the logical name of the route to customize.\n\nThe namespace and name of this componentRoute must match a corresponding entry in the list of status.componentRoutes if the route is to be customized.",
+ "hostname": "hostname is the hostname that should be used by the route.",
+ "servingCertKeyPairSecret": "servingCertKeyPairSecret is a reference to a secret of type `kubernetes.io/tls` in the openshift-config namespace. The serving cert/key pair must match and will be used by the operator to fulfill the intent of serving with this name. If the custom hostname uses the default routing suffix of the cluster, the Secret specification for a serving certificate will not be needed.",
+}
+
+func (ComponentRouteSpec) SwaggerDoc() map[string]string {
+ return map_ComponentRouteSpec
+}
+
+var map_ComponentRouteStatus = map[string]string{
+ "": "ComponentRouteStatus contains information allowing configuration of a route's hostname and serving certificate.",
+ "namespace": "namespace is the namespace of the route to customize. It must be a real namespace. Using an actual namespace ensures that no two components will conflict and the same component can be installed multiple times.\n\nThe namespace and name of this componentRoute must match a corresponding entry in the list of spec.componentRoutes if the route is to be customized.",
+ "name": "name is the logical name of the route to customize. It does not have to be the actual name of a route resource but it cannot be renamed.\n\nThe namespace and name of this componentRoute must match a corresponding entry in the list of spec.componentRoutes if the route is to be customized.",
+ "defaultHostname": "defaultHostname is the hostname of this route prior to customization.",
+ "consumingUsers": "consumingUsers is a slice of ServiceAccounts that need to have read permission on the servingCertKeyPairSecret secret.",
+ "currentHostnames": "currentHostnames is the list of current names used by the route. Typically, this list should consist of a single hostname, but if multiple hostnames are supported by the route the operator may write multiple entries to this list.",
+ "conditions": "conditions are used to communicate the state of the componentRoutes entry.\n\nSupported conditions include Available, Degraded and Progressing.\n\nIf available is true, the content served by the route can be accessed by users. This includes cases where a default may continue to serve content while the customized route specified by the cluster-admin is being configured.\n\nIf Degraded is true, that means something has gone wrong trying to handle the componentRoutes entry. The currentHostnames field may or may not be in effect.\n\nIf Progressing is true, that means the component is taking some action related to the componentRoutes entry.",
+ "relatedObjects": "relatedObjects is a list of resources which are useful when debugging or inspecting how spec.componentRoutes is applied.",
+}
+
+func (ComponentRouteStatus) SwaggerDoc() map[string]string {
+ return map_ComponentRouteStatus
+}
+
var map_Ingress = map[string]string{
"": "Ingress holds cluster-wide information about ingress, including the default ingress domain used for routes. The canonical name is `cluster`.",
"spec": "spec holds user settable values for configuration",
@@ -806,17 +1042,27 @@ func (Ingress) SwaggerDoc() map[string]string {
}
var map_IngressSpec = map[string]string{
- "domain": "domain is used to generate a default host name for a route when the route's host name is empty. The generated host name will follow this pattern: \"..\".\n\nIt is also used as the default wildcard domain suffix for ingress. The default ingresscontroller domain will follow this pattern: \"*.\".\n\nOnce set, changing domain is not currently supported.",
+ "domain": "domain is used to generate a default host name for a route when the route's host name is empty. The generated host name will follow this pattern: \"..\".\n\nIt is also used as the default wildcard domain suffix for ingress. The default ingresscontroller domain will follow this pattern: \"*.\".\n\nOnce set, changing domain is not currently supported.",
+ "appsDomain": "appsDomain is an optional domain to use instead of the one specified in the domain field when a Route is created without specifying an explicit host. If appsDomain is nonempty, this value is used to generate default host values for Route. Unlike domain, appsDomain may be modified after installation. This assumes a new ingresscontroller has been setup with a wildcard certificate.",
+ "componentRoutes": "componentRoutes is an optional list of routes that are managed by OpenShift components that a cluster-admin is able to configure the hostname and serving certificate for. The namespace and name of each route in this list should match an existing entry in the status.componentRoutes list.\n\nTo determine the set of configurable Routes, look at namespace and name of entries in the .status.componentRoutes list, where participating operators write the status of configurable routes.",
}
func (IngressSpec) SwaggerDoc() map[string]string {
return map_IngressSpec
}
+var map_IngressStatus = map[string]string{
+ "componentRoutes": "componentRoutes is where participating operators place the current route status for routes whose hostnames and serving certificates can be customized by the cluster-admin.",
+}
+
+func (IngressStatus) SwaggerDoc() map[string]string {
+ return map_IngressStatus
+}
+
var map_ClusterNetworkEntry = map[string]string{
"": "ClusterNetworkEntry is a contiguous block of IP addresses from which pod IPs are allocated.",
"cidr": "The complete block for pod IPs.",
- "hostPrefix": "The size (prefix) of block to allocate to each node.",
+ "hostPrefix": "The size (prefix) of block to allocate to each node. If this field is not used by the plugin, it can be left unset.",
}
func (ClusterNetworkEntry) SwaggerDoc() map[string]string {
@@ -853,12 +1099,22 @@ func (Network) SwaggerDoc() map[string]string {
return map_Network
}
+var map_NetworkMigration = map[string]string{
+ "": "NetworkMigration represents the cluster network configuration.",
+ "networkType": "NetworkType is the target plugin that is to be deployed. Currently supported values are: OpenShiftSDN, OVNKubernetes",
+}
+
+func (NetworkMigration) SwaggerDoc() map[string]string {
+ return map_NetworkMigration
+}
+
var map_NetworkSpec = map[string]string{
- "": "NetworkSpec is the desired network configuration. As a general rule, this SHOULD NOT be read directly. Instead, you should consume the NetworkStatus, as it indicates the currently deployed configuration. Currently, most spec fields are immutable after installation. Please view the individual ones for further details on each.",
- "clusterNetwork": "IP address pool to use for pod IPs. This field is immutable after installation.",
- "serviceNetwork": "IP address pool for services. Currently, we only support a single entry here. This field is immutable after installation.",
- "networkType": "NetworkType is the plugin that is to be deployed (e.g. OpenShiftSDN). This should match a value that the cluster-network-operator understands, or else no networking will be installed. Currently supported values are: - OpenShiftSDN This field is immutable after installation.",
- "externalIP": "externalIP defines configuration for controllers that affect Service.ExternalIP. If nil, then ExternalIP is not allowed to be set.",
+ "": "NetworkSpec is the desired network configuration. As a general rule, this SHOULD NOT be read directly. Instead, you should consume the NetworkStatus, as it indicates the currently deployed configuration. Currently, most spec fields are immutable after installation. Please view the individual ones for further details on each.",
+ "clusterNetwork": "IP address pool to use for pod IPs. This field is immutable after installation.",
+ "serviceNetwork": "IP address pool for services. Currently, we only support a single entry here. This field is immutable after installation.",
+ "networkType": "NetworkType is the plugin that is to be deployed (e.g. OpenShiftSDN). This should match a value that the cluster-network-operator understands, or else no networking will be installed. Currently supported values are: - OpenShiftSDN This field is immutable after installation.",
+ "externalIP": "externalIP defines configuration for controllers that affect Service.ExternalIP. If nil, then ExternalIP is not allowed to be set.",
+ "serviceNodePortRange": "The port range allowed for Services of type NodePort. If not specified, the default of 30000-32767 will be used. Such Services without a NodePort specified will have one automatically allocated from this range. This parameter can be updated after the cluster is installed.",
}
func (NetworkSpec) SwaggerDoc() map[string]string {
@@ -871,6 +1127,7 @@ var map_NetworkStatus = map[string]string{
"serviceNetwork": "IP address pool for services. Currently, we only support a single entry here.",
"networkType": "NetworkType is the plugin that is deployed (e.g. OpenShiftSDN).",
"clusterNetworkMTU": "ClusterNetworkMTU is the MTU for inter-pod networking.",
+ "migration": "Migration contains the cluster network migration configuration.",
}
func (NetworkStatus) SwaggerDoc() map[string]string {
@@ -995,7 +1252,9 @@ func (LDAPIdentityProvider) SwaggerDoc() map[string]string {
}
var map_OAuth = map[string]string{
- "": "OAuth holds cluster-wide information about OAuth. The canonical name is `cluster`. It is used to configure the integrated OAuth server. This configuration is only honored when the top level Authentication config has type set to IntegratedOAuth.",
+ "": "OAuth holds cluster-wide information about OAuth. The canonical name is `cluster`. It is used to configure the integrated OAuth server. This configuration is only honored when the top level Authentication config has type set to IntegratedOAuth.",
+ "spec": "spec holds user settable values for configuration",
+ "status": "status holds observed values from the cluster. They may not be overridden.",
}
func (OAuth) SwaggerDoc() map[string]string {
@@ -1089,7 +1348,8 @@ func (RequestHeaderIdentityProvider) SwaggerDoc() map[string]string {
var map_TokenConfig = map[string]string{
"": "TokenConfig holds the necessary configuration options for authorization and access tokens",
"accessTokenMaxAgeSeconds": "accessTokenMaxAgeSeconds defines the maximum age of access tokens",
- "accessTokenInactivityTimeoutSeconds": "accessTokenInactivityTimeoutSeconds defines the default token inactivity timeout for tokens granted by any client. The value represents the maximum amount of time that can occur between consecutive uses of the token. Tokens become invalid if they are not used within this temporal window. The user will need to acquire a new token to regain access once a token times out. Valid values are integer values:\n x < 0 Tokens time out is enabled but tokens never timeout unless configured per client (e.g. `-1`)\n x = 0 Tokens time out is disabled (default)\n x > 0 Tokens time out if there is no activity for x seconds\nThe current minimum allowed value for X is 300 (5 minutes)",
+ "accessTokenInactivityTimeoutSeconds": "accessTokenInactivityTimeoutSeconds - DEPRECATED: setting this field has no effect.",
+ "accessTokenInactivityTimeout": "accessTokenInactivityTimeout defines the token inactivity timeout for tokens granted by any client. The value represents the maximum amount of time that can occur between consecutive uses of the token. Tokens become invalid if they are not used within this temporal window. The user will need to acquire a new token to regain access once a token times out. Takes valid time duration string such as \"5m\", \"1.5h\" or \"2h45m\". The minimum allowed value for duration is 300s (5 minutes). If the timeout is configured per client, then that value takes precedence. If the timeout value is not specified and the client does not override the value, then tokens are valid until their lifetime.",
}
func (TokenConfig) SwaggerDoc() map[string]string {
@@ -1196,7 +1456,7 @@ var map_ProxySpec = map[string]string{
"httpsProxy": "httpsProxy is the URL of the proxy for HTTPS requests. Empty means unset and will not result in an env var.",
"noProxy": "noProxy is a comma-separated list of hostnames and/or CIDRs for which the proxy should not be used. Empty means unset and will not result in an env var.",
"readinessEndpoints": "readinessEndpoints is a list of endpoints used to verify readiness of the proxy.",
- "trustedCA": "trustedCA is a reference to a ConfigMap containing a CA certificate bundle used for client egress HTTPS connections. The certificate bundle must be from the CA that signed the proxy's certificate and be signed for everything. The trustedCA field should only be consumed by a proxy validator. The validator is responsible for reading the certificate bundle from required key \"ca-bundle.crt\" and copying it to a ConfigMap named \"trusted-ca-bundle\" in the \"openshift-config-managed\" namespace. The namespace for the ConfigMap referenced by trustedCA is \"openshift-config\". Here is an example ConfigMap (in yaml):\n\napiVersion: v1 kind: ConfigMap metadata:\n name: user-ca-bundle\n namespace: openshift-config\n data:\n ca-bundle.crt: |",
+ "trustedCA": "trustedCA is a reference to a ConfigMap containing a CA certificate bundle. The trustedCA field should only be consumed by a proxy validator. The validator is responsible for reading the certificate bundle from the required key \"ca-bundle.crt\", merging it with the system default trust bundle, and writing the merged trust bundle to a ConfigMap named \"trusted-ca-bundle\" in the \"openshift-config-managed\" namespace. Clients that expect to make proxy connections must use the trusted-ca-bundle for all HTTPS requests to the proxy, and may use the trusted-ca-bundle for non-proxy HTTPS requests as well.\n\nThe namespace for the ConfigMap referenced by trustedCA is \"openshift-config\". Here is an example ConfigMap (in yaml):\n\napiVersion: v1 kind: ConfigMap metadata:\n name: user-ca-bundle\n namespace: openshift-config\n data:\n ca-bundle.crt: |",
}
func (ProxySpec) SwaggerDoc() map[string]string {
@@ -1225,8 +1485,9 @@ func (Scheduler) SwaggerDoc() map[string]string {
}
var map_SchedulerSpec = map[string]string{
- "policy": "policy is a reference to a ConfigMap containing scheduler policy which has user specified predicates and priorities. If this ConfigMap is not available scheduler will default to use DefaultAlgorithmProvider. The namespace for this configmap is openshift-config.",
- "defaultNodeSelector": "defaultNodeSelector helps set the cluster-wide default node selector to restrict pod placement to specific nodes. This is applied to the pods created in all namespaces without a specified nodeSelector value. For example, defaultNodeSelector: \"type=user-node,region=east\" would set nodeSelector field in pod spec to \"type=user-node,region=east\" to all pods created in all namespaces. Namespaces having project-wide node selectors won't be impacted even if this field is set. This adds an annotation section to the namespace. For example, if a new namespace is created with node-selector='type=user-node,region=east', the annotation openshift.io/node-selector: type=user-node,region=east gets added to the project. When the openshift.io/node-selector annotation is set on the project the value is used in preference to the value we are setting for defaultNodeSelector field. For instance, openshift.io/node-selector: \"type=user-node,region=west\" means that the default of \"type=user-node,region=east\" set in defaultNodeSelector would not be applied.",
+ "policy": "DEPRECATED: the scheduler Policy API has been deprecated and will be removed in a future release. policy is a reference to a ConfigMap containing scheduler policy which has user specified predicates and priorities. If this ConfigMap is not available scheduler will default to use DefaultAlgorithmProvider. The namespace for this configmap is openshift-config.",
+ "profile": "profile sets which scheduling profile should be set in order to configure scheduling decisions for new pods.\n\nValid values are \"LowNodeUtilization\", \"HighNodeUtilization\", \"NoScoring\" Defaults to \"LowNodeUtilization\"",
+ "defaultNodeSelector": "defaultNodeSelector helps set the cluster-wide default node selector to restrict pod placement to specific nodes. This is applied to the pods created in all namespaces and creates an intersection with any existing nodeSelectors already set on a pod, additionally constraining that pod's selector. For example, defaultNodeSelector: \"type=user-node,region=east\" would set nodeSelector field in pod spec to \"type=user-node,region=east\" to all pods created in all namespaces. Namespaces having project-wide node selectors won't be impacted even if this field is set. This adds an annotation section to the namespace. For example, if a new namespace is created with node-selector='type=user-node,region=east', the annotation openshift.io/node-selector: type=user-node,region=east gets added to the project. When the openshift.io/node-selector annotation is set on the project the value is used in preference to the value we are setting for defaultNodeSelector field. For instance, openshift.io/node-selector: \"type=user-node,region=west\" means that the default of \"type=user-node,region=east\" set in defaultNodeSelector would not be applied.",
"mastersSchedulable": "MastersSchedulable allows masters nodes to be schedulable. When this flag is turned on, all the master nodes in the cluster will be made schedulable, so that workload pods can run on them. The default value for this field is false, meaning none of the master nodes are schedulable. Important Note: Once the workload pods start running on the master nodes, extreme care must be taken to ensure that cluster-critical control plane components are not impacted. Please turn on this field after doing due diligence.",
}
diff --git a/vendor/github.com/openshift/api/image/v1/generated.pb.go b/vendor/github.com/openshift/api/image/v1/generated.pb.go
index 858101af7ad..7ce4e63ecf2 100644
--- a/vendor/github.com/openshift/api/image/v1/generated.pb.go
+++ b/vendor/github.com/openshift/api/image/v1/generated.pb.go
@@ -29,7 +29,7 @@ var _ = math.Inf
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
-const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
+const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
func (m *DockerImageReference) Reset() { *m = DockerImageReference{} }
func (*DockerImageReference) ProtoMessage() {}
@@ -647,10 +647,66 @@ func (m *ImageStreamTagList) XXX_DiscardUnknown() {
var xxx_messageInfo_ImageStreamTagList proto.InternalMessageInfo
+func (m *ImageTag) Reset() { *m = ImageTag{} }
+func (*ImageTag) ProtoMessage() {}
+func (*ImageTag) Descriptor() ([]byte, []int) {
+ return fileDescriptor_650a0b34f65fde60, []int{22}
+}
+func (m *ImageTag) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *ImageTag) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ b = b[:cap(b)]
+ n, err := m.MarshalToSizedBuffer(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+}
+func (m *ImageTag) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_ImageTag.Merge(m, src)
+}
+func (m *ImageTag) XXX_Size() int {
+ return m.Size()
+}
+func (m *ImageTag) XXX_DiscardUnknown() {
+ xxx_messageInfo_ImageTag.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_ImageTag proto.InternalMessageInfo
+
+func (m *ImageTagList) Reset() { *m = ImageTagList{} }
+func (*ImageTagList) ProtoMessage() {}
+func (*ImageTagList) Descriptor() ([]byte, []int) {
+ return fileDescriptor_650a0b34f65fde60, []int{23}
+}
+func (m *ImageTagList) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *ImageTagList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ b = b[:cap(b)]
+ n, err := m.MarshalToSizedBuffer(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+}
+func (m *ImageTagList) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_ImageTagList.Merge(m, src)
+}
+func (m *ImageTagList) XXX_Size() int {
+ return m.Size()
+}
+func (m *ImageTagList) XXX_DiscardUnknown() {
+ xxx_messageInfo_ImageTagList.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_ImageTagList proto.InternalMessageInfo
+
func (m *NamedTagEventList) Reset() { *m = NamedTagEventList{} }
func (*NamedTagEventList) ProtoMessage() {}
func (*NamedTagEventList) Descriptor() ([]byte, []int) {
- return fileDescriptor_650a0b34f65fde60, []int{22}
+ return fileDescriptor_650a0b34f65fde60, []int{24}
}
func (m *NamedTagEventList) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -678,7 +734,7 @@ var xxx_messageInfo_NamedTagEventList proto.InternalMessageInfo
func (m *RepositoryImportSpec) Reset() { *m = RepositoryImportSpec{} }
func (*RepositoryImportSpec) ProtoMessage() {}
func (*RepositoryImportSpec) Descriptor() ([]byte, []int) {
- return fileDescriptor_650a0b34f65fde60, []int{23}
+ return fileDescriptor_650a0b34f65fde60, []int{25}
}
func (m *RepositoryImportSpec) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -706,7 +762,7 @@ var xxx_messageInfo_RepositoryImportSpec proto.InternalMessageInfo
func (m *RepositoryImportStatus) Reset() { *m = RepositoryImportStatus{} }
func (*RepositoryImportStatus) ProtoMessage() {}
func (*RepositoryImportStatus) Descriptor() ([]byte, []int) {
- return fileDescriptor_650a0b34f65fde60, []int{24}
+ return fileDescriptor_650a0b34f65fde60, []int{26}
}
func (m *RepositoryImportStatus) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -731,10 +787,38 @@ func (m *RepositoryImportStatus) XXX_DiscardUnknown() {
var xxx_messageInfo_RepositoryImportStatus proto.InternalMessageInfo
+func (m *SecretList) Reset() { *m = SecretList{} }
+func (*SecretList) ProtoMessage() {}
+func (*SecretList) Descriptor() ([]byte, []int) {
+ return fileDescriptor_650a0b34f65fde60, []int{27}
+}
+func (m *SecretList) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *SecretList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ b = b[:cap(b)]
+ n, err := m.MarshalToSizedBuffer(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+}
+func (m *SecretList) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_SecretList.Merge(m, src)
+}
+func (m *SecretList) XXX_Size() int {
+ return m.Size()
+}
+func (m *SecretList) XXX_DiscardUnknown() {
+ xxx_messageInfo_SecretList.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_SecretList proto.InternalMessageInfo
+
func (m *SignatureCondition) Reset() { *m = SignatureCondition{} }
func (*SignatureCondition) ProtoMessage() {}
func (*SignatureCondition) Descriptor() ([]byte, []int) {
- return fileDescriptor_650a0b34f65fde60, []int{25}
+ return fileDescriptor_650a0b34f65fde60, []int{28}
}
func (m *SignatureCondition) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -762,7 +846,7 @@ var xxx_messageInfo_SignatureCondition proto.InternalMessageInfo
func (m *SignatureGenericEntity) Reset() { *m = SignatureGenericEntity{} }
func (*SignatureGenericEntity) ProtoMessage() {}
func (*SignatureGenericEntity) Descriptor() ([]byte, []int) {
- return fileDescriptor_650a0b34f65fde60, []int{26}
+ return fileDescriptor_650a0b34f65fde60, []int{29}
}
func (m *SignatureGenericEntity) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -790,7 +874,7 @@ var xxx_messageInfo_SignatureGenericEntity proto.InternalMessageInfo
func (m *SignatureIssuer) Reset() { *m = SignatureIssuer{} }
func (*SignatureIssuer) ProtoMessage() {}
func (*SignatureIssuer) Descriptor() ([]byte, []int) {
- return fileDescriptor_650a0b34f65fde60, []int{27}
+ return fileDescriptor_650a0b34f65fde60, []int{30}
}
func (m *SignatureIssuer) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -818,7 +902,7 @@ var xxx_messageInfo_SignatureIssuer proto.InternalMessageInfo
func (m *SignatureSubject) Reset() { *m = SignatureSubject{} }
func (*SignatureSubject) ProtoMessage() {}
func (*SignatureSubject) Descriptor() ([]byte, []int) {
- return fileDescriptor_650a0b34f65fde60, []int{28}
+ return fileDescriptor_650a0b34f65fde60, []int{31}
}
func (m *SignatureSubject) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -846,7 +930,7 @@ var xxx_messageInfo_SignatureSubject proto.InternalMessageInfo
func (m *TagEvent) Reset() { *m = TagEvent{} }
func (*TagEvent) ProtoMessage() {}
func (*TagEvent) Descriptor() ([]byte, []int) {
- return fileDescriptor_650a0b34f65fde60, []int{29}
+ return fileDescriptor_650a0b34f65fde60, []int{32}
}
func (m *TagEvent) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -874,7 +958,7 @@ var xxx_messageInfo_TagEvent proto.InternalMessageInfo
func (m *TagEventCondition) Reset() { *m = TagEventCondition{} }
func (*TagEventCondition) ProtoMessage() {}
func (*TagEventCondition) Descriptor() ([]byte, []int) {
- return fileDescriptor_650a0b34f65fde60, []int{30}
+ return fileDescriptor_650a0b34f65fde60, []int{33}
}
func (m *TagEventCondition) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -902,7 +986,7 @@ var xxx_messageInfo_TagEventCondition proto.InternalMessageInfo
func (m *TagImportPolicy) Reset() { *m = TagImportPolicy{} }
func (*TagImportPolicy) ProtoMessage() {}
func (*TagImportPolicy) Descriptor() ([]byte, []int) {
- return fileDescriptor_650a0b34f65fde60, []int{31}
+ return fileDescriptor_650a0b34f65fde60, []int{34}
}
func (m *TagImportPolicy) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -930,7 +1014,7 @@ var xxx_messageInfo_TagImportPolicy proto.InternalMessageInfo
func (m *TagReference) Reset() { *m = TagReference{} }
func (*TagReference) ProtoMessage() {}
func (*TagReference) Descriptor() ([]byte, []int) {
- return fileDescriptor_650a0b34f65fde60, []int{32}
+ return fileDescriptor_650a0b34f65fde60, []int{35}
}
func (m *TagReference) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -958,7 +1042,7 @@ var xxx_messageInfo_TagReference proto.InternalMessageInfo
func (m *TagReferencePolicy) Reset() { *m = TagReferencePolicy{} }
func (*TagReferencePolicy) ProtoMessage() {}
func (*TagReferencePolicy) Descriptor() ([]byte, []int) {
- return fileDescriptor_650a0b34f65fde60, []int{33}
+ return fileDescriptor_650a0b34f65fde60, []int{36}
}
func (m *TagReferencePolicy) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -1009,9 +1093,12 @@ func init() {
proto.RegisterType((*ImageStreamStatus)(nil), "github.com.openshift.api.image.v1.ImageStreamStatus")
proto.RegisterType((*ImageStreamTag)(nil), "github.com.openshift.api.image.v1.ImageStreamTag")
proto.RegisterType((*ImageStreamTagList)(nil), "github.com.openshift.api.image.v1.ImageStreamTagList")
+ proto.RegisterType((*ImageTag)(nil), "github.com.openshift.api.image.v1.ImageTag")
+ proto.RegisterType((*ImageTagList)(nil), "github.com.openshift.api.image.v1.ImageTagList")
proto.RegisterType((*NamedTagEventList)(nil), "github.com.openshift.api.image.v1.NamedTagEventList")
proto.RegisterType((*RepositoryImportSpec)(nil), "github.com.openshift.api.image.v1.RepositoryImportSpec")
proto.RegisterType((*RepositoryImportStatus)(nil), "github.com.openshift.api.image.v1.RepositoryImportStatus")
+ proto.RegisterType((*SecretList)(nil), "github.com.openshift.api.image.v1.SecretList")
proto.RegisterType((*SignatureCondition)(nil), "github.com.openshift.api.image.v1.SignatureCondition")
proto.RegisterType((*SignatureGenericEntity)(nil), "github.com.openshift.api.image.v1.SignatureGenericEntity")
proto.RegisterType((*SignatureIssuer)(nil), "github.com.openshift.api.image.v1.SignatureIssuer")
@@ -1029,160 +1116,165 @@ func init() {
}
var fileDescriptor_650a0b34f65fde60 = []byte{
- // 2446 bytes of a gzipped FileDescriptorProto
+ // 2527 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x5a, 0x4d, 0x6c, 0x1c, 0x49,
- 0x15, 0x4e, 0xcf, 0x9f, 0xc7, 0xcf, 0x8e, 0x1d, 0x57, 0xe2, 0xdd, 0xd9, 0x49, 0xd6, 0xf6, 0x76,
- 0x48, 0x14, 0x20, 0xdb, 0x83, 0x4d, 0x76, 0x71, 0x82, 0xc4, 0x6e, 0x26, 0x13, 0xa2, 0x01, 0x7b,
- 0xe3, 0x2d, 0x0f, 0x39, 0x44, 0x41, 0xa2, 0xdc, 0x53, 0x6e, 0x37, 0x9e, 0xe9, 0x1e, 0xba, 0x7b,
- 0xbc, 0xeb, 0x08, 0x24, 0x0e, 0x68, 0xb5, 0x07, 0x0e, 0x70, 0xe2, 0xb0, 0x47, 0xb4, 0x42, 0x9c,
- 0x11, 0x88, 0x3b, 0x20, 0x45, 0x5c, 0x58, 0x2d, 0x97, 0xbd, 0x60, 0x91, 0x81, 0x33, 0x37, 0x2e,
- 0x7b, 0x42, 0x55, 0x5d, 0xdd, 0x5d, 0xdd, 0xd3, 0xe3, 0x74, 0x47, 0xb1, 0x81, 0x9b, 0xa7, 0xea,
- 0xbd, 0xef, 0xbd, 0x7a, 0xaf, 0xde, 0x4f, 0xbd, 0x36, 0xac, 0x1a, 0xa6, 0xb7, 0x37, 0xdc, 0xd1,
- 0x74, 0xbb, 0xdf, 0xb0, 0x07, 0xd4, 0x72, 0xf7, 0xcc, 0x5d, 0xaf, 0x41, 0x06, 0x66, 0xc3, 0xec,
- 0x13, 0x83, 0x36, 0x0e, 0x56, 0x1b, 0x06, 0xb5, 0xa8, 0x43, 0x3c, 0xda, 0xd5, 0x06, 0x8e, 0xed,
- 0xd9, 0xe8, 0xb5, 0x88, 0x45, 0x0b, 0x59, 0x34, 0x32, 0x30, 0x35, 0xce, 0xa2, 0x1d, 0xac, 0xd6,
- 0x5f, 0x97, 0x50, 0x0d, 0xdb, 0xb0, 0x1b, 0x9c, 0x73, 0x67, 0xb8, 0xcb, 0x7f, 0xf1, 0x1f, 0xfc,
- 0x2f, 0x1f, 0xb1, 0xae, 0xee, 0xaf, 0xbb, 0x9a, 0x69, 0x73, 0xb1, 0xba, 0xed, 0xa4, 0x49, 0xad,
- 0xdf, 0x88, 0x68, 0xfa, 0x44, 0xdf, 0x33, 0x2d, 0xea, 0x1c, 0x36, 0x06, 0xfb, 0x06, 0x5b, 0x70,
- 0x1b, 0x7d, 0xea, 0x91, 0x34, 0xae, 0xc6, 0x24, 0x2e, 0x67, 0x68, 0x79, 0x66, 0x9f, 0x8e, 0x31,
- 0xbc, 0xf9, 0x2c, 0x06, 0x57, 0xdf, 0xa3, 0x7d, 0x92, 0xe4, 0x53, 0x3f, 0x55, 0xe0, 0x42, 0xcb,
- 0xd6, 0xf7, 0xa9, 0xd3, 0x66, 0x46, 0xc0, 0x74, 0x97, 0x3a, 0xd4, 0xd2, 0x29, 0xba, 0x0e, 0x55,
- 0x87, 0x1a, 0xa6, 0xeb, 0x39, 0x87, 0x35, 0x65, 0x45, 0xb9, 0x36, 0xdd, 0x3c, 0xf7, 0xe4, 0x68,
- 0xf9, 0xcc, 0xe8, 0x68, 0xb9, 0x8a, 0xc5, 0x3a, 0x0e, 0x29, 0x50, 0x03, 0xa6, 0x2d, 0xd2, 0xa7,
- 0xee, 0x80, 0xe8, 0xb4, 0x56, 0xe0, 0xe4, 0x0b, 0x82, 0x7c, 0xfa, 0x9d, 0x60, 0x03, 0x47, 0x34,
- 0x68, 0x05, 0x4a, 0xec, 0x47, 0xad, 0xc8, 0x69, 0x67, 0x05, 0x6d, 0x89, 0xd1, 0x62, 0xbe, 0x83,
- 0x5e, 0x85, 0xa2, 0x47, 0x8c, 0x5a, 0x89, 0x13, 0xcc, 0x08, 0x82, 0x62, 0x87, 0x18, 0x98, 0xad,
- 0xa3, 0x3a, 0x14, 0xcc, 0x56, 0xad, 0xcc, 0x77, 0x41, 0xec, 0x16, 0xda, 0x2d, 0x5c, 0x30, 0x5b,
- 0xea, 0x5f, 0xa6, 0xa0, 0xcc, 0x8f, 0x83, 0xbe, 0x07, 0x55, 0x66, 0xe2, 0x2e, 0xf1, 0x08, 0x3f,
- 0xc5, 0xcc, 0xda, 0x57, 0x34, 0xdf, 0x52, 0x9a, 0x6c, 0x29, 0x6d, 0xb0, 0x6f, 0xb0, 0x05, 0x57,
- 0x63, 0xd4, 0xda, 0xc1, 0xaa, 0x76, 0x7f, 0xe7, 0xfb, 0x54, 0xf7, 0x36, 0xa9, 0x47, 0x9a, 0x48,
- 0xa0, 0x43, 0xb4, 0x86, 0x43, 0x54, 0xb4, 0x05, 0x17, 0xba, 0x29, 0xf6, 0x13, 0x46, 0xb8, 0x24,
- 0x78, 0x53, 0x6d, 0x8c, 0x53, 0x39, 0xd1, 0x0f, 0xe1, 0xbc, 0xb4, 0xbe, 0x19, 0xa8, 0x5f, 0xe4,
- 0xea, 0xbf, 0x3e, 0x51, 0x7d, 0xe1, 0x68, 0x0d, 0x93, 0xf7, 0xee, 0xbe, 0xef, 0x51, 0xcb, 0x35,
- 0x6d, 0xab, 0x79, 0x51, 0xc8, 0x3f, 0xdf, 0x1a, 0x47, 0xc4, 0x69, 0x62, 0xd0, 0x0e, 0xd4, 0x53,
- 0x96, 0x1f, 0x50, 0x87, 0xe1, 0x09, 0x6f, 0xa8, 0x02, 0xb5, 0xde, 0x9a, 0x48, 0x89, 0x8f, 0x41,
- 0x41, 0x9b, 0xf1, 0x13, 0x12, 0xcb, 0xdc, 0xa5, 0xae, 0x27, 0x9c, 0x99, 0xaa, 0xb2, 0x20, 0xc1,
- 0x69, 0x7c, 0xe8, 0x00, 0x16, 0xa4, 0xe5, 0x0d, 0x72, 0x48, 0x1d, 0xb7, 0x56, 0x59, 0x29, 0x72,
- 0x73, 0x3d, 0x33, 0xe8, 0xb5, 0x88, 0xab, 0xf9, 0x8a, 0x90, 0xbd, 0xd0, 0x4a, 0xe2, 0xe1, 0x71,
- 0x11, 0x88, 0x02, 0xb8, 0xa6, 0x61, 0x11, 0x6f, 0xe8, 0x50, 0xb7, 0x36, 0xc5, 0x05, 0xae, 0x66,
- 0x15, 0xb8, 0x1d, 0x70, 0x46, 0xf7, 0x2b, 0x5c, 0x72, 0xb1, 0x04, 0x8c, 0xee, 0xc3, 0xa2, 0x24,
- 0x3b, 0x22, 0xaa, 0x55, 0x57, 0x8a, 0xd7, 0x66, 0x9b, 0xaf, 0x8c, 0x8e, 0x96, 0x17, 0x5b, 0x69,
- 0x04, 0x38, 0x9d, 0x0f, 0xed, 0xc1, 0xa5, 0x14, 0x33, 0x6e, 0xd2, 0xae, 0x49, 0x3a, 0x87, 0x03,
- 0x5a, 0x9b, 0xe6, 0x7e, 0xf8, 0x82, 0x50, 0xeb, 0x52, 0xeb, 0x18, 0x5a, 0x7c, 0x2c, 0x12, 0xba,
- 0x17, 0xf3, 0xcc, 0x1d, 0xdb, 0xda, 0x35, 0x8d, 0x1a, 0x70, 0xf8, 0x34, 0x53, 0xfb, 0x04, 0x78,
- 0x9c, 0x47, 0xfd, 0x85, 0x02, 0xe7, 0xf9, 0xef, 0x66, 0xcf, 0xde, 0x09, 0x43, 0xc5, 0x45, 0xeb,
- 0x30, 0xcb, 0xcd, 0xba, 0x69, 0xba, 0xae, 0x69, 0x19, 0x3c, 0x48, 0xaa, 0xcd, 0x0b, 0x02, 0x7b,
- 0xb6, 0x2d, 0xed, 0xe1, 0x18, 0x25, 0x52, 0xa1, 0xd2, 0xf3, 0x6f, 0x8a, 0xb2, 0x52, 0x64, 0x39,
- 0x64, 0x74, 0xb4, 0x5c, 0x11, 0xbe, 0x16, 0x3b, 0x8c, 0x46, 0xf7, 0x75, 0xf6, 0xa3, 0x99, 0xd3,
- 0x08, 0x25, 0xc5, 0x8e, 0xfa, 0xa7, 0x22, 0xcc, 0x73, 0x31, 0xed, 0xfe, 0xc0, 0x76, 0xbc, 0xed,
- 0x01, 0xd5, 0xd1, 0x5d, 0x28, 0xed, 0x3a, 0x76, 0x5f, 0x64, 0x9c, 0xcb, 0x52, 0xc8, 0x6a, 0xac,
- 0x4c, 0x44, 0xf9, 0x25, 0x3c, 0x49, 0x94, 0x01, 0xbf, 0xe9, 0xd8, 0x7d, 0xcc, 0xd9, 0xd1, 0xdb,
- 0x50, 0xf0, 0x6c, 0x2e, 0x7a, 0x66, 0xed, 0x5a, 0x1a, 0xc8, 0x86, 0xad, 0x93, 0x5e, 0x12, 0xa9,
- 0xc2, 0x12, 0x61, 0xc7, 0xc6, 0x05, 0xcf, 0x46, 0x3d, 0x66, 0x1e, 0xa6, 0xd6, 0x96, 0xdd, 0x33,
- 0xf5, 0x43, 0x91, 0x43, 0xd6, 0x32, 0xdc, 0xd1, 0x0e, 0x31, 0xda, 0x12, 0xa7, 0x6c, 0xd2, 0x68,
- 0x15, 0xc7, 0xd0, 0xd1, 0xfb, 0x30, 0xef, 0x04, 0x6a, 0x08, 0x81, 0x65, 0x2e, 0xf0, 0x8d, 0x6c,
- 0x02, 0x71, 0x9c, 0xb9, 0xf9, 0xb2, 0x90, 0x39, 0x9f, 0xd8, 0xc0, 0x49, 0x31, 0xe8, 0x36, 0xcc,
- 0x9b, 0x96, 0xde, 0x1b, 0x76, 0xa3, 0x64, 0x52, 0xe2, 0x37, 0x21, 0x84, 0x68, 0xc7, 0xb7, 0x71,
- 0x92, 0x5e, 0xfd, 0xab, 0x02, 0x0b, 0xb2, 0x1f, 0x3d, 0xe2, 0x0d, 0x5d, 0xd4, 0x81, 0x8a, 0xcb,
- 0xff, 0x12, 0xbe, 0xbc, 0x9e, 0xad, 0x7a, 0xf8, 0xdc, 0xcd, 0x39, 0x21, 0xbd, 0xe2, 0xff, 0xc6,
- 0x02, 0x0b, 0xb5, 0xa1, 0xcc, 0xcf, 0x1d, 0xfa, 0x36, 0x63, 0xce, 0x68, 0x4e, 0x8f, 0x8e, 0x96,
- 0xfd, 0xca, 0x86, 0x7d, 0x84, 0xa0, 0x4a, 0x16, 0xd3, 0xab, 0xa4, 0xfa, 0x81, 0x02, 0x10, 0xa5,
- 0xac, 0xb0, 0xea, 0x2a, 0x13, 0xab, 0xee, 0x15, 0x28, 0xb9, 0xe6, 0x63, 0x5f, 0xb3, 0x62, 0x54,
- 0xc3, 0x39, 0xfb, 0xb6, 0xf9, 0x98, 0x62, 0xbe, 0xcd, 0xea, 0x7d, 0x3f, 0xcc, 0x17, 0xc5, 0x78,
- 0xbd, 0x8f, 0x92, 0x43, 0x44, 0xa3, 0x76, 0x61, 0x2e, 0xd2, 0xa3, 0xc5, 0x0a, 0xcd, 0x6b, 0x42,
- 0x92, 0xc2, 0x25, 0x9d, 0x7d, 0xa6, 0x94, 0x42, 0x06, 0x29, 0xbf, 0x57, 0x60, 0xda, 0x17, 0x63,
- 0xba, 0x1e, 0x7a, 0x34, 0x56, 0xfc, 0xb5, 0x6c, 0xee, 0x63, 0xdc, 0xbc, 0xf4, 0x87, 0x2d, 0x4f,
- 0xb0, 0x22, 0x15, 0xfe, 0x4d, 0x28, 0x9b, 0x1e, 0xed, 0xbb, 0xb5, 0x02, 0x4f, 0xfc, 0xd9, 0x9d,
- 0x78, 0x56, 0x80, 0x96, 0xdb, 0x8c, 0x1d, 0xfb, 0x28, 0xea, 0xba, 0xb8, 0x7e, 0x1b, 0xb6, 0xbd,
- 0x3f, 0x1c, 0x88, 0x7b, 0x7d, 0x19, 0xca, 0x3d, 0x16, 0xe3, 0x22, 0xaf, 0x85, 0x9c, 0x3c, 0xf0,
- 0xb1, 0xbf, 0xa7, 0xfe, 0xa6, 0x22, 0x6c, 0x1b, 0xa6, 0xf8, 0x53, 0x68, 0x7b, 0x56, 0xa0, 0xe4,
- 0x45, 0x5e, 0x09, 0x6f, 0x12, 0x77, 0x08, 0xdf, 0x41, 0x57, 0x60, 0x4a, 0xb7, 0x2d, 0x8f, 0x5a,
- 0x1e, 0xd7, 0x7e, 0xb6, 0x39, 0x33, 0x3a, 0x5a, 0x9e, 0xba, 0xe3, 0x2f, 0xe1, 0x60, 0x0f, 0x99,
- 0x00, 0xba, 0x6d, 0x75, 0x4d, 0xcf, 0xb4, 0x2d, 0xb7, 0x56, 0xe2, 0xb6, 0xcc, 0x92, 0x2f, 0xc2,
- 0xc3, 0xde, 0x09, 0xb8, 0x23, 0x8d, 0xc3, 0x25, 0x17, 0x4b, 0xe0, 0xe8, 0xeb, 0x70, 0x96, 0xb3,
- 0xb7, 0xbb, 0xd4, 0xf2, 0x4c, 0xef, 0x50, 0x34, 0x1c, 0x8b, 0x82, 0xed, 0x6c, 0x5b, 0xde, 0xc4,
- 0x71, 0x5a, 0xf4, 0x23, 0x98, 0x65, 0x35, 0x99, 0x76, 0xef, 0xf4, 0x88, 0xd9, 0x0f, 0xfa, 0x8b,
- 0x3b, 0xb9, 0xcb, 0x3d, 0x57, 0x3c, 0x40, 0xb9, 0x6b, 0x79, 0x8e, 0x94, 0x5b, 0xe5, 0x2d, 0x1c,
- 0x13, 0x87, 0xde, 0x85, 0x29, 0xdd, 0xa1, 0xac, 0x71, 0xaf, 0x4d, 0x71, 0x87, 0x7e, 0x29, 0x9b,
- 0x43, 0x3b, 0x66, 0x9f, 0x0a, 0xcb, 0xfb, 0xec, 0x38, 0xc0, 0x61, 0xe1, 0x61, 0xba, 0xee, 0x90,
- 0x76, 0x9b, 0x87, 0xb5, 0x6a, 0xe6, 0xc2, 0x10, 0x1e, 0xa4, 0xcd, 0x78, 0x9d, 0xe6, 0x2c, 0x0b,
- 0x8f, 0xb6, 0xc0, 0xc1, 0x21, 0x22, 0xfa, 0x6e, 0x80, 0xde, 0xb1, 0x79, 0x43, 0x31, 0xb3, 0xf6,
- 0xd5, 0x3c, 0xe8, 0xdb, 0x43, 0x7e, 0xeb, 0x64, 0xf8, 0x8e, 0x8d, 0x43, 0xc8, 0xfa, 0x5b, 0xb0,
- 0x30, 0x66, 0x48, 0x74, 0x0e, 0x8a, 0xfb, 0x54, 0x3c, 0x57, 0x30, 0xfb, 0x13, 0x5d, 0x80, 0xf2,
- 0x01, 0xe9, 0x0d, 0xc5, 0x3d, 0xc5, 0xfe, 0x8f, 0x5b, 0x85, 0x75, 0x45, 0xfd, 0x65, 0x01, 0x66,
- 0x7c, 0xcf, 0x78, 0x0e, 0x25, 0xfd, 0x53, 0x08, 0x99, 0x0e, 0x94, 0xdc, 0x01, 0xd5, 0x45, 0xd2,
- 0x5f, 0xcb, 0x7c, 0x73, 0xb8, 0x7e, 0xac, 0xaf, 0x88, 0xc2, 0x8c, 0xfd, 0xc2, 0x1c, 0x0d, 0x3d,
- 0x0a, 0x2b, 0x94, 0x5f, 0xdc, 0x6f, 0xe4, 0xc4, 0x3d, 0xb6, 0x52, 0xa9, 0x7f, 0x50, 0xe0, 0x9c,
- 0x44, 0x7d, 0x5a, 0x8f, 0xaa, 0xcd, 0xe7, 0x2d, 0x90, 0x51, 0x6e, 0x95, 0x8a, 0xa4, 0xfa, 0xdb,
- 0x82, 0x48, 0xae, 0xc1, 0x29, 0x58, 0x85, 0x3f, 0x85, 0x63, 0x3c, 0x8c, 0x79, 0x7c, 0x3d, 0x9f,
- 0x67, 0xa2, 0x7e, 0x32, 0xd5, 0xef, 0x3b, 0x09, 0xbf, 0xdf, 0x7a, 0x2e, 0xf4, 0xe3, 0xbd, 0xff,
- 0x93, 0x02, 0x2c, 0xa6, 0x6a, 0x84, 0xae, 0x42, 0xc5, 0x6f, 0xfd, 0xb8, 0xe5, 0xaa, 0x11, 0x82,
- 0x4f, 0x83, 0xc5, 0x2e, 0x32, 0x00, 0x1c, 0x3a, 0xb0, 0x5d, 0xd3, 0xb3, 0x9d, 0x43, 0x61, 0x87,
- 0xaf, 0x65, 0xd0, 0x14, 0x87, 0x4c, 0x92, 0x19, 0xe6, 0x98, 0xa1, 0xa3, 0x1d, 0x2c, 0x41, 0xa3,
- 0x87, 0x4c, 0x21, 0x62, 0x50, 0x66, 0x8e, 0x62, 0x9e, 0xf0, 0x92, 0xf1, 0xa3, 0x43, 0x30, 0x24,
- 0x2c, 0x10, 0xd5, 0xdf, 0x15, 0xe0, 0xe5, 0x09, 0xa6, 0x43, 0x38, 0x66, 0x08, 0xd6, 0x61, 0xe4,
- 0x72, 0x83, 0xff, 0xa4, 0x48, 0x18, 0xcd, 0x4c, 0x31, 0xda, 0xcd, 0xe7, 0x31, 0x9a, 0xf0, 0xee,
- 0x31, 0x66, 0x7b, 0x94, 0x30, 0xdb, 0x8d, 0x9c, 0x66, 0x4b, 0xdc, 0x9f, 0x84, 0xe1, 0x3e, 0x2e,
- 0xc5, 0xe2, 0x4e, 0x3c, 0x9b, 0x4f, 0x3e, 0xee, 0xba, 0x50, 0xde, 0xe9, 0xd9, 0x3b, 0x41, 0x6b,
- 0xf6, 0x56, 0x3e, 0x9f, 0xf8, 0x6a, 0x6a, 0xec, 0xa5, 0x29, 0x0a, 0x74, 0x98, 0x55, 0xf8, 0x1a,
- 0xf6, 0xc1, 0xd1, 0x5e, 0xc2, 0x76, 0x6f, 0x3f, 0x97, 0x18, 0xdf, 0x64, 0xbe, 0x9c, 0x09, 0x76,
- 0xac, 0xef, 0x03, 0x44, 0xda, 0xa4, 0x54, 0xb9, 0x7b, 0x72, 0x95, 0xcb, 0x31, 0x83, 0x08, 0x9b,
- 0x71, 0xa9, 0x30, 0xd6, 0x7f, 0x20, 0xea, 0xe2, 0x44, 0x69, 0x1b, 0x71, 0x69, 0x6f, 0x66, 0x4e,
- 0xce, 0xb1, 0xa7, 0xbb, 0x5c, 0x8b, 0xff, 0xa8, 0x88, 0x37, 0xb4, 0xb0, 0xcc, 0xc9, 0x37, 0xef,
- 0xdb, 0xf1, 0xe6, 0x3d, 0x6f, 0xd4, 0xa6, 0xb7, 0xf0, 0xff, 0x54, 0x00, 0x49, 0x54, 0x9b, 0x64,
- 0x30, 0x30, 0x2d, 0xe3, 0xff, 0xae, 0x5c, 0x3e, 0xeb, 0x4d, 0xf9, 0xeb, 0x42, 0xcc, 0x5b, 0xbc,
- 0x1e, 0x58, 0x30, 0xdb, 0x93, 0x1e, 0x2e, 0x79, 0x7b, 0x11, 0xf9, 0xd1, 0x13, 0xb5, 0xc3, 0xf2,
- 0x2a, 0x8e, 0xe1, 0xa3, 0xed, 0xd8, 0x4c, 0x2c, 0x4a, 0x6e, 0xe2, 0x65, 0xfb, 0xaa, 0x80, 0x58,
- 0x6c, 0xa5, 0x11, 0xe1, 0x74, 0x5e, 0xf4, 0x2e, 0x94, 0x3c, 0x62, 0x04, 0x77, 0xa2, 0x91, 0x73,
- 0x68, 0x21, 0x3d, 0x82, 0x88, 0xe1, 0x62, 0x0e, 0xa5, 0xfe, 0x2a, 0xde, 0x79, 0x88, 0xa2, 0x71,
- 0x22, 0xda, 0x53, 0xb8, 0x38, 0x18, 0xee, 0xf4, 0x4c, 0x3d, 0x95, 0x4b, 0x78, 0xf3, 0xb2, 0x80,
- 0xbe, 0xb8, 0x35, 0x99, 0x14, 0x1f, 0x87, 0x83, 0x1e, 0xc4, 0x8c, 0x94, 0xc5, 0xc3, 0xef, 0x90,
- 0x3e, 0xed, 0x76, 0x88, 0x71, 0xf7, 0x80, 0x5a, 0x1e, 0x8b, 0xc5, 0x54, 0x4b, 0x7d, 0x54, 0x0a,
- 0x5e, 0xb1, 0xdc, 0x52, 0x1d, 0x72, 0x1a, 0x81, 0xf3, 0x2d, 0xff, 0xa6, 0xfb, 0x61, 0x93, 0xdb,
- 0xe1, 0x53, 0xb1, 0x0f, 0x12, 0x6b, 0x00, 0xe2, 0xe3, 0x8a, 0x69, 0x5b, 0xdc, 0xdc, 0xc5, 0x48,
- 0xfa, 0xbd, 0x70, 0x07, 0x4b, 0x54, 0x63, 0x61, 0x53, 0x39, 0xe1, 0xb0, 0xd9, 0x4b, 0x79, 0x6c,
- 0xdf, 0xc8, 0x76, 0x6c, 0xee, 0xbd, 0xec, 0x6f, 0xed, 0x30, 0x25, 0x95, 0x5f, 0x48, 0x07, 0xff,
- 0xe7, 0x78, 0x6a, 0xed, 0x10, 0xe3, 0x14, 0x8a, 0xc4, 0x83, 0x78, 0x91, 0x58, 0xcd, 0x57, 0x24,
- 0x3a, 0xc4, 0x98, 0x50, 0x27, 0xfe, 0xa5, 0xc0, 0xc2, 0x58, 0x50, 0x04, 0x59, 0x57, 0x99, 0xf0,
- 0xbd, 0x6b, 0x2b, 0xae, 0xcc, 0x97, 0x73, 0x78, 0x2d, 0x5d, 0x8d, 0xc4, 0x65, 0x28, 0x9e, 0xdc,
- 0x65, 0x50, 0x3f, 0x2c, 0xc2, 0x85, 0xb4, 0x8e, 0xfe, 0x45, 0x0d, 0xca, 0x93, 0x63, 0xee, 0xc2,
- 0x69, 0x8f, 0xb9, 0x4b, 0xff, 0xb5, 0x31, 0x77, 0x31, 0xe7, 0x98, 0xfb, 0xc3, 0x02, 0xbc, 0x94,
- 0xfe, 0x4e, 0x38, 0xa1, 0x59, 0x77, 0xf4, 0xc2, 0x28, 0xbc, 0xf8, 0x17, 0x06, 0xba, 0x05, 0x73,
- 0xa4, 0xeb, 0x5f, 0x33, 0xd2, 0x63, 0xd5, 0x84, 0xdf, 0xe3, 0xe9, 0x26, 0x1a, 0x1d, 0x2d, 0xcf,
- 0xdd, 0x8e, 0xed, 0xe0, 0x04, 0xa5, 0xfa, 0x69, 0x11, 0xd0, 0xf8, 0x14, 0x11, 0xdd, 0x12, 0x93,
- 0x4d, 0x3f, 0x10, 0xaf, 0xca, 0x93, 0xcd, 0xcf, 0x8f, 0x96, 0x5f, 0x1a, 0xe7, 0x90, 0x66, 0x9e,
- 0x1b, 0xa1, 0x09, 0xfd, 0xb9, 0xe8, 0x8d, 0xb8, 0x51, 0x3e, 0x3f, 0x5a, 0x4e, 0xf9, 0x97, 0x01,
- 0x2d, 0x44, 0x4a, 0x98, 0xce, 0x80, 0xb3, 0x3d, 0xe2, 0x7a, 0x5b, 0x8e, 0xbd, 0x43, 0x3b, 0xa6,
- 0xf8, 0x58, 0x9e, 0x6f, 0xf2, 0x17, 0xce, 0x36, 0x37, 0x64, 0x20, 0x1c, 0xc7, 0x45, 0x07, 0x80,
- 0xd8, 0x42, 0xc7, 0x21, 0x96, 0xeb, 0x1f, 0x89, 0x49, 0x2b, 0xe5, 0x96, 0x56, 0x17, 0xd2, 0xd0,
- 0xc6, 0x18, 0x1a, 0x4e, 0x91, 0x80, 0xae, 0x42, 0xc5, 0xa1, 0xc4, 0xb5, 0x2d, 0x31, 0x89, 0x0d,
- 0xbd, 0x8c, 0xf9, 0x2a, 0x16, 0xbb, 0xe8, 0x8b, 0x30, 0xd5, 0xa7, 0xae, 0xcb, 0xca, 0x49, 0x85,
- 0x13, 0xce, 0x0b, 0xc2, 0xa9, 0x4d, 0x7f, 0x19, 0x07, 0xfb, 0xea, 0x07, 0x0a, 0x44, 0x2e, 0xe2,
- 0x55, 0xd7, 0xd4, 0xef, 0xfa, 0x13, 0xdc, 0x75, 0x98, 0xb5, 0x1d, 0x83, 0x58, 0xe6, 0x63, 0xbf,
- 0x44, 0xfb, 0x0e, 0x0e, 0x23, 0xfe, 0xbe, 0xb4, 0x87, 0x63, 0x94, 0xac, 0xb4, 0xeb, 0x76, 0xbf,
- 0x6f, 0x5b, 0x2c, 0x6b, 0x0b, 0xd7, 0x4a, 0x39, 0x2f, 0xd8, 0xc1, 0x12, 0x95, 0xfa, 0xb1, 0x02,
- 0xf3, 0x89, 0x59, 0x29, 0xfa, 0xb9, 0x02, 0x2f, 0xb9, 0xa9, 0xca, 0x89, 0x90, 0xbb, 0x99, 0x67,
- 0x44, 0x1a, 0x03, 0x68, 0x2e, 0x09, 0x7d, 0x26, 0x9c, 0x1e, 0x4f, 0x10, 0xac, 0xfe, 0x4d, 0x81,
- 0x73, 0xc9, 0xa9, 0xeb, 0xff, 0xa2, 0xa2, 0xe8, 0x0d, 0x98, 0xf1, 0xfb, 0xd2, 0x6f, 0xd3, 0xc3,
- 0x76, 0x4b, 0x78, 0xe1, 0xbc, 0x00, 0x9b, 0xd9, 0x8a, 0xb6, 0xb0, 0x4c, 0xa7, 0xfe, 0xb4, 0x00,
- 0xd5, 0xa0, 0x62, 0xa1, 0xef, 0x44, 0x53, 0x74, 0x25, 0xf7, 0xed, 0x0e, 0x2f, 0xdd, 0xd8, 0x24,
- 0xfd, 0xc5, 0xff, 0x0f, 0xc8, 0xe5, 0xa0, 0x7d, 0xf2, 0xdb, 0xf6, 0xf4, 0x77, 0x5a, 0xbc, 0xe3,
- 0x2c, 0x65, 0xe9, 0x38, 0xd5, 0x8f, 0x8a, 0xb0, 0x30, 0x56, 0xc0, 0xd1, 0xcd, 0x58, 0xce, 0xbb,
- 0x92, 0xc8, 0x79, 0x8b, 0x63, 0x0c, 0x27, 0x96, 0xf2, 0xd2, 0x33, 0x51, 0xf1, 0x14, 0x33, 0x51,
- 0x29, 0x6b, 0x26, 0x2a, 0x1f, 0x9f, 0x89, 0x12, 0xde, 0xa9, 0x64, 0xf2, 0xce, 0x00, 0xe6, 0x13,
- 0x1d, 0x09, 0xba, 0x0e, 0x55, 0xd3, 0x72, 0xa9, 0x3e, 0x74, 0xa8, 0x98, 0xb5, 0x86, 0x2d, 0x6b,
- 0x5b, 0xac, 0xe3, 0x90, 0x02, 0x35, 0x60, 0xda, 0xd5, 0xf7, 0x68, 0x77, 0xd8, 0xa3, 0x5d, 0xee,
- 0x90, 0x6a, 0xf4, 0xc5, 0x74, 0x3b, 0xd8, 0xc0, 0x11, 0x8d, 0xfa, 0xef, 0x12, 0xcc, 0xca, 0x3d,
- 0x49, 0x86, 0x4f, 0xc4, 0xef, 0xc1, 0x0c, 0xb1, 0x2c, 0xdb, 0x23, 0x7e, 0xe3, 0x58, 0xc8, 0x3c,
- 0xfc, 0x92, 0xe5, 0x68, 0xb7, 0x23, 0x08, 0x7f, 0xf8, 0x15, 0x86, 0xb2, 0xb4, 0x83, 0x65, 0x49,
- 0xe8, 0xb6, 0xe8, 0x16, 0x8b, 0xd9, 0xbb, 0xc5, 0x6a, 0xa2, 0x53, 0x6c, 0xc0, 0x74, 0xd8, 0x54,
- 0x89, 0x7f, 0x11, 0x08, 0xed, 0x13, 0xc5, 0x64, 0x44, 0x83, 0xb4, 0x98, 0x17, 0xcb, 0xdc, 0x8b,
- 0x73, 0xc7, 0xbc, 0xe8, 0x92, 0xad, 0x68, 0xe5, 0xb4, 0x5b, 0xd1, 0xa9, 0x53, 0x69, 0x45, 0xeb,
- 0xdf, 0x80, 0x73, 0x49, 0x0f, 0xe6, 0xfa, 0xfc, 0xb6, 0x05, 0x68, 0x5c, 0xfe, 0xb3, 0x7a, 0xaf,
- 0x71, 0x8e, 0x28, 0x11, 0x35, 0xaf, 0x3d, 0x79, 0xba, 0x74, 0xe6, 0x93, 0xa7, 0x4b, 0x67, 0x3e,
- 0x7b, 0xba, 0x74, 0xe6, 0xc7, 0xa3, 0x25, 0xe5, 0xc9, 0x68, 0x49, 0xf9, 0x64, 0xb4, 0xa4, 0x7c,
- 0x36, 0x5a, 0x52, 0xfe, 0x3e, 0x5a, 0x52, 0x7e, 0xf6, 0x8f, 0xa5, 0x33, 0x0f, 0x0b, 0x07, 0xab,
- 0xff, 0x09, 0x00, 0x00, 0xff, 0xff, 0x9c, 0x37, 0xe5, 0xab, 0x3c, 0x2a, 0x00, 0x00,
+ 0xf5, 0x4f, 0xcf, 0x97, 0xc7, 0xcf, 0x13, 0x3b, 0xae, 0xc4, 0xd9, 0xd9, 0x49, 0xd6, 0xf6, 0x76,
+ 0xfe, 0x89, 0xf2, 0x87, 0xec, 0x0c, 0x36, 0xd9, 0xc5, 0x09, 0x12, 0xd9, 0x4c, 0x26, 0x44, 0x03,
+ 0xf6, 0xc6, 0x5b, 0x1e, 0x22, 0x14, 0x05, 0x89, 0x72, 0x4f, 0xb9, 0xdd, 0x78, 0xa6, 0x7b, 0xe8,
+ 0xee, 0xf1, 0xae, 0x23, 0x90, 0x38, 0xa0, 0xd5, 0x1e, 0x38, 0xc0, 0x89, 0xc3, 0x1e, 0xd1, 0x0a,
+ 0x21, 0x8e, 0x08, 0xc4, 0x89, 0x0b, 0x20, 0x45, 0x5c, 0x58, 0x2d, 0x97, 0xbd, 0x60, 0x6d, 0x06,
+ 0xce, 0xdc, 0xb8, 0xec, 0x09, 0x55, 0x75, 0x75, 0x77, 0x75, 0x4f, 0x8f, 0xdd, 0x63, 0xe2, 0x01,
+ 0x6e, 0xd3, 0x55, 0xef, 0xfd, 0xde, 0xab, 0xf7, 0xaa, 0xde, 0x47, 0xd5, 0xc0, 0x8a, 0x6e, 0xb8,
+ 0xbb, 0xfd, 0xed, 0xaa, 0x66, 0x75, 0x6b, 0x56, 0x8f, 0x9a, 0xce, 0xae, 0xb1, 0xe3, 0xd6, 0x48,
+ 0xcf, 0xa8, 0x19, 0x5d, 0xa2, 0xd3, 0xda, 0xfe, 0x4a, 0x4d, 0xa7, 0x26, 0xb5, 0x89, 0x4b, 0xdb,
+ 0xd5, 0x9e, 0x6d, 0xb9, 0x16, 0x7a, 0x35, 0x64, 0xa9, 0x06, 0x2c, 0x55, 0xd2, 0x33, 0xaa, 0x9c,
+ 0xa5, 0xba, 0xbf, 0x52, 0x79, 0x4d, 0x42, 0xd5, 0x2d, 0xdd, 0xaa, 0x71, 0xce, 0xed, 0xfe, 0x0e,
+ 0xff, 0xe2, 0x1f, 0xfc, 0x97, 0x87, 0x58, 0x51, 0xf7, 0xd6, 0x9c, 0xaa, 0x61, 0x71, 0xb1, 0x9a,
+ 0x65, 0x27, 0x49, 0xad, 0xdc, 0x0c, 0x69, 0xba, 0x44, 0xdb, 0x35, 0x4c, 0x6a, 0x1f, 0xd4, 0x7a,
+ 0x7b, 0x3a, 0x1b, 0x70, 0x6a, 0x5d, 0xea, 0x92, 0x24, 0xae, 0xda, 0x28, 0x2e, 0xbb, 0x6f, 0xba,
+ 0x46, 0x97, 0x0e, 0x31, 0xbc, 0x71, 0x1c, 0x83, 0xa3, 0xed, 0xd2, 0x2e, 0x89, 0xf3, 0xa9, 0x1f,
+ 0x2b, 0x70, 0xa1, 0x61, 0x69, 0x7b, 0xd4, 0x6e, 0x32, 0x23, 0x60, 0xba, 0x43, 0x6d, 0x6a, 0x6a,
+ 0x14, 0xdd, 0x80, 0xa2, 0x4d, 0x75, 0xc3, 0x71, 0xed, 0x83, 0xb2, 0xb2, 0xac, 0x5c, 0x9f, 0xae,
+ 0x9f, 0x7b, 0x76, 0xb8, 0x74, 0x66, 0x70, 0xb8, 0x54, 0xc4, 0x62, 0x1c, 0x07, 0x14, 0xa8, 0x06,
+ 0xd3, 0x26, 0xe9, 0x52, 0xa7, 0x47, 0x34, 0x5a, 0xce, 0x70, 0xf2, 0x79, 0x41, 0x3e, 0xfd, 0x96,
+ 0x3f, 0x81, 0x43, 0x1a, 0xb4, 0x0c, 0x39, 0xf6, 0x51, 0xce, 0x72, 0xda, 0x92, 0xa0, 0xcd, 0x31,
+ 0x5a, 0xcc, 0x67, 0xd0, 0x2b, 0x90, 0x75, 0x89, 0x5e, 0xce, 0x71, 0x82, 0x19, 0x41, 0x90, 0x6d,
+ 0x11, 0x1d, 0xb3, 0x71, 0x54, 0x81, 0x8c, 0xd1, 0x28, 0xe7, 0xf9, 0x2c, 0x88, 0xd9, 0x4c, 0xb3,
+ 0x81, 0x33, 0x46, 0x43, 0xfd, 0xf3, 0x14, 0xe4, 0xf9, 0x72, 0xd0, 0xb7, 0xa1, 0xc8, 0x4c, 0xdc,
+ 0x26, 0x2e, 0xe1, 0xab, 0x98, 0x59, 0xfd, 0x42, 0xd5, 0xb3, 0x54, 0x55, 0xb6, 0x54, 0xb5, 0xb7,
+ 0xa7, 0xb3, 0x01, 0xa7, 0xca, 0xa8, 0xab, 0xfb, 0x2b, 0xd5, 0x87, 0xdb, 0xdf, 0xa1, 0x9a, 0xbb,
+ 0x41, 0x5d, 0x52, 0x47, 0x02, 0x1d, 0xc2, 0x31, 0x1c, 0xa0, 0xa2, 0x4d, 0xb8, 0xd0, 0x4e, 0xb0,
+ 0x9f, 0x30, 0xc2, 0x65, 0xc1, 0x9b, 0x68, 0x63, 0x9c, 0xc8, 0x89, 0xbe, 0x07, 0xe7, 0xa5, 0xf1,
+ 0x0d, 0x5f, 0xfd, 0x2c, 0x57, 0xff, 0xb5, 0x91, 0xea, 0x0b, 0x47, 0x57, 0x31, 0x79, 0xe7, 0xfe,
+ 0xbb, 0x2e, 0x35, 0x1d, 0xc3, 0x32, 0xeb, 0x97, 0x84, 0xfc, 0xf3, 0x8d, 0x61, 0x44, 0x9c, 0x24,
+ 0x06, 0x6d, 0x43, 0x25, 0x61, 0xf8, 0x11, 0xb5, 0x19, 0x9e, 0xf0, 0x86, 0x2a, 0x50, 0x2b, 0x8d,
+ 0x91, 0x94, 0xf8, 0x08, 0x14, 0xb4, 0x11, 0x5d, 0x21, 0x31, 0x8d, 0x1d, 0xea, 0xb8, 0xc2, 0x99,
+ 0x89, 0x2a, 0x0b, 0x12, 0x9c, 0xc4, 0x87, 0xf6, 0x61, 0x5e, 0x1a, 0x5e, 0x27, 0x07, 0xd4, 0x76,
+ 0xca, 0x85, 0xe5, 0x2c, 0x37, 0xd7, 0xb1, 0x87, 0xbe, 0x1a, 0x72, 0xd5, 0x5f, 0x16, 0xb2, 0xe7,
+ 0x1b, 0x71, 0x3c, 0x3c, 0x2c, 0x02, 0x51, 0x00, 0xc7, 0xd0, 0x4d, 0xe2, 0xf6, 0x6d, 0xea, 0x94,
+ 0xa7, 0xb8, 0xc0, 0x95, 0xb4, 0x02, 0xb7, 0x7c, 0xce, 0x70, 0x7f, 0x05, 0x43, 0x0e, 0x96, 0x80,
+ 0xd1, 0x43, 0x58, 0x90, 0x64, 0x87, 0x44, 0xe5, 0xe2, 0x72, 0xf6, 0x7a, 0xa9, 0xfe, 0xf2, 0xe0,
+ 0x70, 0x69, 0xa1, 0x91, 0x44, 0x80, 0x93, 0xf9, 0xd0, 0x2e, 0x5c, 0x4e, 0x30, 0xe3, 0x06, 0x6d,
+ 0x1b, 0xa4, 0x75, 0xd0, 0xa3, 0xe5, 0x69, 0xee, 0x87, 0xff, 0x13, 0x6a, 0x5d, 0x6e, 0x1c, 0x41,
+ 0x8b, 0x8f, 0x44, 0x42, 0x0f, 0x22, 0x9e, 0xb9, 0x67, 0x99, 0x3b, 0x86, 0x5e, 0x06, 0x0e, 0x9f,
+ 0x64, 0x6a, 0x8f, 0x00, 0x0f, 0xf3, 0xa8, 0x3f, 0x55, 0xe0, 0x3c, 0xff, 0xae, 0x77, 0xac, 0xed,
+ 0xe0, 0xa8, 0x38, 0x68, 0x0d, 0x4a, 0xdc, 0xac, 0x1b, 0x86, 0xe3, 0x18, 0xa6, 0xce, 0x0f, 0x49,
+ 0xb1, 0x7e, 0x41, 0x60, 0x97, 0x9a, 0xd2, 0x1c, 0x8e, 0x50, 0x22, 0x15, 0x0a, 0x1d, 0x6f, 0xa7,
+ 0x28, 0xcb, 0x59, 0x16, 0x43, 0x06, 0x87, 0x4b, 0x05, 0xe1, 0x6b, 0x31, 0xc3, 0x68, 0x34, 0x4f,
+ 0x67, 0xef, 0x34, 0x73, 0x1a, 0xa1, 0xa4, 0x98, 0x51, 0xff, 0x98, 0x85, 0x39, 0x2e, 0xa6, 0xd9,
+ 0xed, 0x59, 0xb6, 0xbb, 0xd5, 0xa3, 0x1a, 0xba, 0x0f, 0xb9, 0x1d, 0xdb, 0xea, 0x8a, 0x88, 0x73,
+ 0x45, 0x3a, 0xb2, 0x55, 0x96, 0x26, 0xc2, 0xf8, 0x12, 0xac, 0x24, 0x8c, 0x80, 0x5f, 0xb5, 0xad,
+ 0x2e, 0xe6, 0xec, 0xe8, 0x4d, 0xc8, 0xb8, 0x16, 0x17, 0x3d, 0xb3, 0x7a, 0x3d, 0x09, 0x64, 0xdd,
+ 0xd2, 0x48, 0x27, 0x8e, 0x54, 0x60, 0x81, 0xb0, 0x65, 0xe1, 0x8c, 0x6b, 0xa1, 0x0e, 0x33, 0x0f,
+ 0x53, 0x6b, 0xd3, 0xea, 0x18, 0xda, 0x81, 0x88, 0x21, 0xab, 0x29, 0xf6, 0x68, 0x8b, 0xe8, 0x4d,
+ 0x89, 0x53, 0x36, 0x69, 0x38, 0x8a, 0x23, 0xe8, 0xe8, 0x5d, 0x98, 0xb3, 0x7d, 0x35, 0x84, 0xc0,
+ 0x3c, 0x17, 0xf8, 0x7a, 0x3a, 0x81, 0x38, 0xca, 0x5c, 0x7f, 0x49, 0xc8, 0x9c, 0x8b, 0x4d, 0xe0,
+ 0xb8, 0x18, 0x74, 0x17, 0xe6, 0x0c, 0x53, 0xeb, 0xf4, 0xdb, 0x61, 0x30, 0xc9, 0xf1, 0x9d, 0x10,
+ 0x40, 0x34, 0xa3, 0xd3, 0x38, 0x4e, 0xaf, 0xfe, 0x45, 0x81, 0x79, 0xd9, 0x8f, 0x2e, 0x71, 0xfb,
+ 0x0e, 0x6a, 0x41, 0xc1, 0xe1, 0xbf, 0x84, 0x2f, 0x6f, 0xa4, 0xcb, 0x1e, 0x1e, 0x77, 0x7d, 0x56,
+ 0x48, 0x2f, 0x78, 0xdf, 0x58, 0x60, 0xa1, 0x26, 0xe4, 0xf9, 0xba, 0x03, 0xdf, 0xa6, 0x8c, 0x19,
+ 0xf5, 0xe9, 0xc1, 0xe1, 0x92, 0x97, 0xd9, 0xb0, 0x87, 0xe0, 0x67, 0xc9, 0x6c, 0x72, 0x96, 0x54,
+ 0xdf, 0x53, 0x00, 0xc2, 0x90, 0x15, 0x64, 0x5d, 0x65, 0x64, 0xd6, 0xbd, 0x0a, 0x39, 0xc7, 0x78,
+ 0xea, 0x69, 0x96, 0x0d, 0x73, 0x38, 0x67, 0xdf, 0x32, 0x9e, 0x52, 0xcc, 0xa7, 0x59, 0xbe, 0xef,
+ 0x06, 0xf1, 0x22, 0x1b, 0xcd, 0xf7, 0x61, 0x70, 0x08, 0x69, 0xd4, 0x36, 0xcc, 0x86, 0x7a, 0x34,
+ 0x58, 0xa2, 0x79, 0x55, 0x48, 0x52, 0xb8, 0xa4, 0xb3, 0xc7, 0x4a, 0xc9, 0xa4, 0x90, 0xf2, 0x5b,
+ 0x05, 0xa6, 0x3d, 0x31, 0x86, 0xe3, 0xa2, 0x27, 0x43, 0xc9, 0xbf, 0x9a, 0xce, 0x7d, 0x8c, 0x9b,
+ 0xa7, 0xfe, 0xa0, 0xe4, 0xf1, 0x47, 0xa4, 0xc4, 0xbf, 0x01, 0x79, 0xc3, 0xa5, 0x5d, 0xa7, 0x9c,
+ 0xe1, 0x81, 0x3f, 0xbd, 0x13, 0xcf, 0x0a, 0xd0, 0x7c, 0x93, 0xb1, 0x63, 0x0f, 0x45, 0x5d, 0x13,
+ 0xdb, 0x6f, 0xdd, 0xb2, 0xf6, 0xfa, 0x3d, 0xb1, 0xaf, 0xaf, 0x40, 0xbe, 0xc3, 0xce, 0xb8, 0x88,
+ 0x6b, 0x01, 0x27, 0x3f, 0xf8, 0xd8, 0x9b, 0x53, 0x7f, 0x55, 0x10, 0xb6, 0x0d, 0x42, 0xfc, 0x04,
+ 0xca, 0x9e, 0x65, 0xc8, 0xb9, 0xa1, 0x57, 0x82, 0x9d, 0xc4, 0x1d, 0xc2, 0x67, 0xd0, 0x55, 0x98,
+ 0xd2, 0x2c, 0xd3, 0xa5, 0xa6, 0xcb, 0xb5, 0x2f, 0xd5, 0x67, 0x06, 0x87, 0x4b, 0x53, 0xf7, 0xbc,
+ 0x21, 0xec, 0xcf, 0x21, 0x03, 0x40, 0xb3, 0xcc, 0xb6, 0xe1, 0x1a, 0x96, 0xe9, 0x94, 0x73, 0xdc,
+ 0x96, 0x69, 0xe2, 0x45, 0xb0, 0xd8, 0x7b, 0x3e, 0x77, 0xa8, 0x71, 0x30, 0xe4, 0x60, 0x09, 0x1c,
+ 0x7d, 0x19, 0xce, 0x72, 0xf6, 0x66, 0x9b, 0x9a, 0xae, 0xe1, 0x1e, 0x88, 0x82, 0x63, 0x41, 0xb0,
+ 0x9d, 0x6d, 0xca, 0x93, 0x38, 0x4a, 0x8b, 0xbe, 0x0f, 0x25, 0x96, 0x93, 0x69, 0xfb, 0x5e, 0x87,
+ 0x18, 0x5d, 0xbf, 0xbe, 0xb8, 0x37, 0x76, 0xba, 0xe7, 0x8a, 0xfb, 0x28, 0xf7, 0x4d, 0xd7, 0x96,
+ 0x62, 0xab, 0x3c, 0x85, 0x23, 0xe2, 0xd0, 0xdb, 0x30, 0xa5, 0xd9, 0x94, 0x15, 0xee, 0xe5, 0x29,
+ 0xee, 0xd0, 0xcf, 0xa5, 0x73, 0x68, 0xcb, 0xe8, 0x52, 0x61, 0x79, 0x8f, 0x1d, 0xfb, 0x38, 0xec,
+ 0x78, 0x18, 0x8e, 0xd3, 0xa7, 0xed, 0xfa, 0x41, 0xb9, 0x98, 0x3a, 0x31, 0x04, 0x0b, 0x69, 0x32,
+ 0x5e, 0xbb, 0x5e, 0x62, 0xc7, 0xa3, 0x29, 0x70, 0x70, 0x80, 0x88, 0xbe, 0xe5, 0xa3, 0xb7, 0x2c,
+ 0x5e, 0x50, 0xcc, 0xac, 0x7e, 0x71, 0x1c, 0xf4, 0xad, 0x3e, 0xdf, 0x75, 0x32, 0x7c, 0xcb, 0xc2,
+ 0x01, 0x64, 0xe5, 0x0e, 0xcc, 0x0f, 0x19, 0x12, 0x9d, 0x83, 0xec, 0x1e, 0x15, 0xed, 0x0a, 0x66,
+ 0x3f, 0xd1, 0x05, 0xc8, 0xef, 0x93, 0x4e, 0x5f, 0xec, 0x53, 0xec, 0x7d, 0xdc, 0xce, 0xac, 0x29,
+ 0xea, 0xcf, 0x32, 0x30, 0xe3, 0x79, 0xc6, 0xb5, 0x29, 0xe9, 0x4e, 0xe0, 0xc8, 0xb4, 0x20, 0xe7,
+ 0xf4, 0xa8, 0x26, 0x82, 0xfe, 0x6a, 0xea, 0x9d, 0xc3, 0xf5, 0x63, 0x75, 0x45, 0x78, 0xcc, 0xd8,
+ 0x17, 0xe6, 0x68, 0xe8, 0x49, 0x90, 0xa1, 0xbc, 0xe4, 0x7e, 0x73, 0x4c, 0xdc, 0x23, 0x33, 0x95,
+ 0xfa, 0x7b, 0x05, 0xce, 0x49, 0xd4, 0x93, 0x6a, 0xaa, 0x36, 0x4e, 0x9a, 0x20, 0xc3, 0xd8, 0x2a,
+ 0x25, 0x49, 0xf5, 0xd7, 0x19, 0x11, 0x5c, 0xfd, 0x55, 0xb0, 0x0c, 0x3f, 0x81, 0x65, 0x3c, 0x8e,
+ 0x78, 0x7c, 0x6d, 0x3c, 0xcf, 0x84, 0xf5, 0x64, 0xa2, 0xdf, 0xb7, 0x63, 0x7e, 0xbf, 0x7d, 0x22,
+ 0xf4, 0xa3, 0xbd, 0xff, 0xc3, 0x0c, 0x2c, 0x24, 0x6a, 0x84, 0xae, 0x41, 0xc1, 0x2b, 0xfd, 0xb8,
+ 0xe5, 0x8a, 0x21, 0x82, 0x47, 0x83, 0xc5, 0x2c, 0xd2, 0x01, 0x6c, 0xda, 0xb3, 0x1c, 0xc3, 0xb5,
+ 0xec, 0x03, 0x61, 0x87, 0x2f, 0xa5, 0xd0, 0x14, 0x07, 0x4c, 0x92, 0x19, 0x66, 0x99, 0xa1, 0xc3,
+ 0x19, 0x2c, 0x41, 0xa3, 0xc7, 0x4c, 0x21, 0xa2, 0x53, 0x66, 0x8e, 0xec, 0x38, 0xc7, 0x4b, 0xc6,
+ 0x0f, 0x17, 0xc1, 0x90, 0xb0, 0x40, 0x54, 0x7f, 0x93, 0x81, 0x97, 0x46, 0x98, 0x0e, 0xe1, 0x88,
+ 0x21, 0x58, 0x85, 0x31, 0x96, 0x1b, 0xbc, 0x96, 0x22, 0x66, 0x34, 0x23, 0xc1, 0x68, 0xb7, 0x4e,
+ 0x62, 0x34, 0xe1, 0xdd, 0x23, 0xcc, 0xf6, 0x24, 0x66, 0xb6, 0x9b, 0x63, 0x9a, 0x2d, 0xb6, 0x7f,
+ 0x62, 0x86, 0xfb, 0x30, 0x17, 0x39, 0x77, 0xa2, 0x6d, 0x3e, 0xfd, 0x73, 0xd7, 0x86, 0xfc, 0x76,
+ 0xc7, 0xda, 0xf6, 0x4b, 0xb3, 0x3b, 0xe3, 0xf9, 0xc4, 0x53, 0xb3, 0xca, 0x3a, 0x4d, 0x91, 0xa0,
+ 0x83, 0xa8, 0xc2, 0xc7, 0xb0, 0x07, 0x8e, 0x76, 0x63, 0xb6, 0x7b, 0xf3, 0x44, 0x62, 0x3c, 0x93,
+ 0x79, 0x72, 0x46, 0xd8, 0xb1, 0xb2, 0x07, 0x10, 0x6a, 0x93, 0x90, 0xe5, 0x1e, 0xc8, 0x59, 0x6e,
+ 0x8c, 0x3b, 0x88, 0xa0, 0x18, 0x97, 0x12, 0x63, 0xe5, 0xbb, 0x22, 0x2f, 0x8e, 0x94, 0xb6, 0x1e,
+ 0x95, 0xf6, 0x46, 0xea, 0xe0, 0x1c, 0x69, 0xdd, 0xe5, 0x5c, 0xfc, 0x07, 0x45, 0xf4, 0xd0, 0xc2,
+ 0x32, 0xa7, 0x5f, 0xbc, 0x6f, 0x45, 0x8b, 0xf7, 0x71, 0x4f, 0x6d, 0x72, 0x09, 0xff, 0x77, 0x05,
+ 0x90, 0x44, 0xb5, 0x41, 0x7a, 0x3d, 0xc3, 0xd4, 0xff, 0xe7, 0xd2, 0xe5, 0x71, 0x3d, 0xe5, 0x2f,
+ 0x32, 0x11, 0x6f, 0xf1, 0x7c, 0x60, 0x42, 0xa9, 0x23, 0x35, 0x2e, 0xe3, 0xd6, 0x22, 0x72, 0xd3,
+ 0x13, 0x96, 0xc3, 0xf2, 0x28, 0x8e, 0xe0, 0xa3, 0xad, 0xc8, 0x9d, 0x58, 0x18, 0xdc, 0x44, 0x67,
+ 0xfb, 0x8a, 0x80, 0x58, 0x68, 0x24, 0x11, 0xe1, 0x64, 0x5e, 0xf4, 0x36, 0xe4, 0x5c, 0xa2, 0xfb,
+ 0x7b, 0xa2, 0x36, 0xe6, 0xa5, 0x85, 0xd4, 0x04, 0x11, 0xdd, 0xc1, 0x1c, 0x4a, 0xfd, 0x79, 0xb4,
+ 0xf2, 0x10, 0x49, 0xe3, 0x54, 0xb4, 0xa7, 0x70, 0xa9, 0xd7, 0xdf, 0xee, 0x18, 0x5a, 0x22, 0x97,
+ 0xf0, 0xe6, 0x15, 0x01, 0x7d, 0x69, 0x73, 0x34, 0x29, 0x3e, 0x0a, 0x07, 0x3d, 0x8a, 0x18, 0x29,
+ 0x8d, 0x87, 0xdf, 0x22, 0x5d, 0xda, 0x6e, 0x11, 0xfd, 0xfe, 0x3e, 0x35, 0x5d, 0x76, 0x16, 0x13,
+ 0x2d, 0xf5, 0x41, 0xce, 0xef, 0x62, 0xb9, 0xa5, 0x5a, 0x64, 0x12, 0x07, 0xe7, 0x6b, 0xde, 0x4e,
+ 0xf7, 0x8e, 0xcd, 0xd8, 0x0e, 0x9f, 0x8a, 0x3c, 0x48, 0xac, 0x02, 0x88, 0xc7, 0x15, 0xc3, 0x32,
+ 0xb9, 0xb9, 0xb3, 0xa1, 0xf4, 0x07, 0xc1, 0x0c, 0x96, 0xa8, 0x86, 0x8e, 0x4d, 0xe1, 0x94, 0x8f,
+ 0xcd, 0x6e, 0x42, 0xb3, 0x7d, 0x33, 0xdd, 0xb2, 0xb9, 0xf7, 0xd2, 0xf7, 0xda, 0x41, 0x48, 0xca,
+ 0xbf, 0x90, 0x0a, 0xfe, 0x4f, 0xd1, 0xd0, 0xda, 0x22, 0xfa, 0x04, 0x92, 0xc4, 0xa3, 0x68, 0x92,
+ 0x58, 0x19, 0x2f, 0x49, 0xb4, 0x88, 0x3e, 0x22, 0x4f, 0x7c, 0x9a, 0x81, 0x22, 0x27, 0x9c, 0xcc,
+ 0x26, 0xdf, 0x88, 0x74, 0x21, 0x63, 0xef, 0xf2, 0x62, 0xac, 0xf1, 0xf8, 0xe6, 0x09, 0x1a, 0xce,
+ 0xe1, 0x10, 0x00, 0x47, 0x5d, 0x8b, 0xe6, 0xfe, 0xdd, 0x6b, 0x51, 0xf5, 0x77, 0x0a, 0x94, 0x7c,
+ 0x13, 0x4f, 0x60, 0xa7, 0x6c, 0x46, 0x77, 0xca, 0xe7, 0xd3, 0x6a, 0x3e, 0x7a, 0x8f, 0xfc, 0x43,
+ 0x81, 0xf9, 0x21, 0xab, 0xf9, 0x99, 0x59, 0x19, 0xf1, 0x26, 0x7a, 0x02, 0x35, 0x7c, 0xf8, 0x64,
+ 0x35, 0x62, 0x01, 0x23, 0x7b, 0x7a, 0x01, 0x43, 0x7d, 0x3f, 0x0b, 0x17, 0x92, 0xba, 0xbe, 0x17,
+ 0xf5, 0x98, 0x12, 0x7f, 0x0a, 0xc9, 0x4c, 0xfa, 0x29, 0x24, 0xf7, 0x1f, 0x7b, 0x0a, 0xc9, 0x8e,
+ 0xf9, 0x14, 0xf2, 0x7e, 0x06, 0x2e, 0x26, 0xf7, 0x92, 0xa7, 0xf4, 0x1e, 0x12, 0x76, 0xa1, 0x99,
+ 0x17, 0xdf, 0x85, 0xa2, 0xdb, 0x30, 0x4b, 0xda, 0xde, 0x36, 0x23, 0x1d, 0x56, 0x71, 0xf0, 0x7d,
+ 0x3c, 0x5d, 0x47, 0x83, 0xc3, 0xa5, 0xd9, 0xbb, 0x91, 0x19, 0x1c, 0xa3, 0x54, 0x7f, 0xa9, 0x00,
+ 0x6c, 0x51, 0xcd, 0xa6, 0xee, 0x04, 0xa2, 0xc8, 0x9d, 0xe8, 0xf1, 0xad, 0x24, 0x6d, 0x75, 0x4f,
+ 0x99, 0x11, 0x41, 0xe3, 0xe3, 0x2c, 0xa0, 0xe1, 0x7b, 0x71, 0x74, 0x5b, 0xdc, 0xd5, 0x7b, 0x61,
+ 0xe3, 0x9a, 0x7c, 0x57, 0xff, 0xd9, 0xe1, 0xd2, 0xc5, 0x61, 0x0e, 0xe9, 0x16, 0x7f, 0x3d, 0x70,
+ 0xb8, 0x77, 0xd3, 0x7f, 0x33, 0xea, 0xc2, 0xcf, 0x0e, 0x97, 0x12, 0xfe, 0x04, 0x53, 0x0d, 0x90,
+ 0x62, 0x8e, 0xd6, 0xe1, 0x6c, 0x87, 0x38, 0xee, 0xa6, 0x6d, 0x6d, 0xd3, 0x96, 0x21, 0xfe, 0xfe,
+ 0x31, 0xde, 0x5d, 0x76, 0x70, 0x5b, 0xbf, 0x2e, 0x03, 0xe1, 0x28, 0x2e, 0xda, 0x07, 0xc4, 0x06,
+ 0x5a, 0x36, 0x31, 0x1d, 0x6f, 0x49, 0x4c, 0x5a, 0x6e, 0x6c, 0x69, 0x15, 0x21, 0x0d, 0xad, 0x0f,
+ 0xa1, 0xe1, 0x04, 0x09, 0xe8, 0x1a, 0x14, 0x6c, 0x4a, 0x1c, 0xcb, 0x14, 0x6f, 0x0b, 0xc1, 0x9e,
+ 0xc4, 0x7c, 0x14, 0x8b, 0x59, 0xf4, 0xff, 0x30, 0xd5, 0xa5, 0x8e, 0xc3, 0x92, 0x5d, 0x81, 0x13,
+ 0xce, 0x09, 0xc2, 0xa9, 0x0d, 0x6f, 0x18, 0xfb, 0xf3, 0xea, 0x7b, 0x0a, 0x84, 0x2e, 0xe2, 0x75,
+ 0xa4, 0xa1, 0xdd, 0xf7, 0xde, 0x24, 0xd6, 0xa0, 0x64, 0xd9, 0x3a, 0x31, 0x8d, 0xa7, 0x5e, 0xd1,
+ 0xe9, 0x39, 0x38, 0x88, 0x4f, 0x0f, 0xa5, 0x39, 0x1c, 0xa1, 0x64, 0xc5, 0xaa, 0x66, 0x75, 0xbb,
+ 0x96, 0xc9, 0x72, 0x8c, 0x70, 0xad, 0x14, 0xa1, 0xfd, 0x19, 0x2c, 0x51, 0xa9, 0x1f, 0x2a, 0x30,
+ 0x17, 0xbb, 0xfd, 0x47, 0x3f, 0x51, 0xe0, 0xa2, 0x93, 0xa8, 0x9c, 0x38, 0x1f, 0xb7, 0xc6, 0xb9,
+ 0xf4, 0x8f, 0x00, 0xd4, 0x17, 0x85, 0x3e, 0x23, 0x56, 0x8f, 0x47, 0x08, 0x56, 0xff, 0xaa, 0xc0,
+ 0xb9, 0xf8, 0x3b, 0xc2, 0x7f, 0xa3, 0xa2, 0xe8, 0x75, 0x98, 0xf1, 0x3a, 0xad, 0xaf, 0xd3, 0x83,
+ 0x66, 0x43, 0x78, 0xe1, 0xbc, 0x00, 0x9b, 0xd9, 0x0c, 0xa7, 0xb0, 0x4c, 0xa7, 0xfe, 0x28, 0x03,
+ 0x45, 0x3f, 0xbf, 0xa2, 0x6f, 0x84, 0xef, 0x42, 0xca, 0xd8, 0xbb, 0x3b, 0xd8, 0x74, 0x43, 0x6f,
+ 0x43, 0x2f, 0xfe, 0x5f, 0x4d, 0x57, 0xfc, 0xe2, 0xce, 0x6b, 0x44, 0x93, 0x6f, 0x1e, 0xa2, 0x3d,
+ 0x54, 0x2e, 0x4d, 0x0f, 0xa5, 0x7e, 0x90, 0x85, 0xf9, 0xa1, 0x72, 0x03, 0xdd, 0x8a, 0xc4, 0xbc,
+ 0xab, 0xb1, 0x98, 0xb7, 0x30, 0xc4, 0x70, 0x6a, 0x21, 0x2f, 0x39, 0x12, 0x65, 0x27, 0x18, 0x89,
+ 0x72, 0x69, 0x23, 0x51, 0xfe, 0xe8, 0x48, 0x14, 0xf3, 0x4e, 0x21, 0x95, 0x77, 0x7a, 0x30, 0x17,
+ 0xab, 0x9f, 0xd0, 0x0d, 0x28, 0x1a, 0xa6, 0x43, 0xb5, 0xbe, 0x4d, 0xc5, 0xeb, 0x41, 0x90, 0x14,
+ 0x9b, 0x62, 0x1c, 0x07, 0x14, 0xa8, 0x06, 0xd3, 0x8e, 0xb6, 0x4b, 0xdb, 0xfd, 0x0e, 0x6d, 0x73,
+ 0x87, 0x14, 0xc3, 0xff, 0x00, 0x6c, 0xf9, 0x13, 0x38, 0xa4, 0x51, 0xff, 0x99, 0x83, 0x92, 0x5c,
+ 0x41, 0xa5, 0xf8, 0xd3, 0xc3, 0x3b, 0x30, 0x43, 0x4c, 0xd3, 0x72, 0x89, 0x57, 0xe6, 0x66, 0x52,
+ 0x5f, 0xe7, 0xca, 0x72, 0xaa, 0x77, 0x43, 0x08, 0xef, 0x3a, 0x37, 0x38, 0xca, 0xd2, 0x0c, 0x96,
+ 0x25, 0xa1, 0xbb, 0xa2, 0xb6, 0xcd, 0xa6, 0xaf, 0x6d, 0x8b, 0xb1, 0xba, 0xb6, 0x06, 0xd3, 0x41,
+ 0x09, 0x28, 0xfe, 0xf4, 0x12, 0xd8, 0x27, 0x3c, 0x93, 0x21, 0x0d, 0xaa, 0x46, 0xbc, 0x98, 0xe7,
+ 0x5e, 0x9c, 0x3d, 0xe2, 0x8e, 0x22, 0x5e, 0x38, 0x17, 0x26, 0x5d, 0x38, 0x4f, 0x4d, 0xa4, 0x70,
+ 0xae, 0x7c, 0x05, 0xce, 0xc5, 0x3d, 0x38, 0xd6, 0x83, 0xf2, 0x26, 0xa0, 0x61, 0xf9, 0xc7, 0xd5,
+ 0x5e, 0xc3, 0x1c, 0x61, 0x20, 0xaa, 0x5f, 0x7f, 0xf6, 0x7c, 0xf1, 0xcc, 0x47, 0xcf, 0x17, 0xcf,
+ 0x7c, 0xf2, 0x7c, 0xf1, 0xcc, 0x0f, 0x06, 0x8b, 0xca, 0xb3, 0xc1, 0xa2, 0xf2, 0xd1, 0x60, 0x51,
+ 0xf9, 0x64, 0xb0, 0xa8, 0x7c, 0x3a, 0x58, 0x54, 0x7e, 0xfc, 0xb7, 0xc5, 0x33, 0x8f, 0x33, 0xfb,
+ 0x2b, 0xff, 0x0a, 0x00, 0x00, 0xff, 0xff, 0xee, 0x69, 0x81, 0xbe, 0x0e, 0x2d, 0x00, 0x00,
}
func (m *DockerImageReference) Marshal() (dAtA []byte, err error) {
@@ -2460,6 +2552,122 @@ func (m *ImageStreamTagList) MarshalToSizedBuffer(dAtA []byte) (int, error) {
return len(dAtA) - i, nil
}
+func (m *ImageTag) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBuffer(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ImageTag) MarshalTo(dAtA []byte) (int, error) {
+ size := m.Size()
+ return m.MarshalToSizedBuffer(dAtA[:size])
+}
+
+func (m *ImageTag) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.Image != nil {
+ {
+ size, err := m.Image.MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0x22
+ }
+ if m.Status != nil {
+ {
+ size, err := m.Status.MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0x1a
+ }
+ if m.Spec != nil {
+ {
+ size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0x12
+ }
+ {
+ size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0xa
+ return len(dAtA) - i, nil
+}
+
+func (m *ImageTagList) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBuffer(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ImageTagList) MarshalTo(dAtA []byte) (int, error) {
+ size := m.Size()
+ return m.MarshalToSizedBuffer(dAtA[:size])
+}
+
+func (m *ImageTagList) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if len(m.Items) > 0 {
+ for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- {
+ {
+ size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0x12
+ }
+ }
+ {
+ size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0xa
+ return len(dAtA) - i, nil
+}
+
func (m *NamedTagEventList) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
@@ -2633,6 +2841,53 @@ func (m *RepositoryImportStatus) MarshalToSizedBuffer(dAtA []byte) (int, error)
return len(dAtA) - i, nil
}
+func (m *SecretList) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBuffer(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *SecretList) MarshalTo(dAtA []byte) (int, error) {
+ size := m.Size()
+ return m.MarshalToSizedBuffer(dAtA[:size])
+}
+
+func (m *SecretList) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if len(m.Items) > 0 {
+ for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- {
+ {
+ size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0x12
+ }
+ }
+ {
+ size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenerated(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0xa
+ return len(dAtA) - i, nil
+}
+
func (m *SignatureCondition) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
@@ -3522,6 +3777,46 @@ func (m *ImageStreamTagList) Size() (n int) {
return n
}
+func (m *ImageTag) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if m.Spec != nil {
+ l = m.Spec.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.Status != nil {
+ l = m.Status.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.Image != nil {
+ l = m.Image.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ return n
+}
+
+func (m *ImageTagList) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = m.ListMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Items) > 0 {
+ for _, e := range m.Items {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
func (m *NamedTagEventList) Size() (n int) {
if m == nil {
return 0
@@ -3584,7 +3879,24 @@ func (m *RepositoryImportStatus) Size() (n int) {
return n
}
-func (m *SignatureCondition) Size() (n int) {
+func (m *SecretList) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = m.ListMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Items) > 0 {
+ for _, e := range m.Items {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *SignatureCondition) Size() (n int) {
if m == nil {
return 0
}
@@ -4099,6 +4411,35 @@ func (this *ImageStreamTagList) String() string {
}, "")
return s
}
+func (this *ImageTag) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ImageTag{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Spec:` + strings.Replace(this.Spec.String(), "TagReference", "TagReference", 1) + `,`,
+ `Status:` + strings.Replace(this.Status.String(), "NamedTagEventList", "NamedTagEventList", 1) + `,`,
+ `Image:` + strings.Replace(this.Image.String(), "Image", "Image", 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ImageTagList) String() string {
+ if this == nil {
+ return "nil"
+ }
+ repeatedStringForItems := "[]ImageTag{"
+ for _, f := range this.Items {
+ repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "ImageTag", "ImageTag", 1), `&`, ``, 1) + ","
+ }
+ repeatedStringForItems += "}"
+ s := strings.Join([]string{`&ImageTagList{`,
+ `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`,
+ `Items:` + repeatedStringForItems + `,`,
+ `}`,
+ }, "")
+ return s
+}
func (this *NamedTagEventList) String() string {
if this == nil {
return "nil"
@@ -4151,6 +4492,22 @@ func (this *RepositoryImportStatus) String() string {
}, "")
return s
}
+func (this *SecretList) String() string {
+ if this == nil {
+ return "nil"
+ }
+ repeatedStringForItems := "[]Secret{"
+ for _, f := range this.Items {
+ repeatedStringForItems += fmt.Sprintf("%v", f) + ","
+ }
+ repeatedStringForItems += "}"
+ s := strings.Join([]string{`&SecretList{`,
+ `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`,
+ `Items:` + repeatedStringForItems + `,`,
+ `}`,
+ }, "")
+ return s
+}
func (this *SignatureCondition) String() string {
if this == nil {
return "nil"
@@ -4476,10 +4833,7 @@ func (m *DockerImageReference) Unmarshal(dAtA []byte) error {
if err != nil {
return err
}
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) < 0 {
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > l {
@@ -4855,10 +5209,7 @@ func (m *Image) Unmarshal(dAtA []byte) error {
if err != nil {
return err
}
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) < 0 {
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > l {
@@ -4993,10 +5344,7 @@ func (m *ImageBlobReferences) Unmarshal(dAtA []byte) error {
if err != nil {
return err
}
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) < 0 {
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > l {
@@ -5201,10 +5549,7 @@ func (m *ImageImportSpec) Unmarshal(dAtA []byte) error {
if err != nil {
return err
}
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) < 0 {
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > l {
@@ -5355,10 +5700,7 @@ func (m *ImageImportStatus) Unmarshal(dAtA []byte) error {
if err != nil {
return err
}
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) < 0 {
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > l {
@@ -5491,10 +5833,7 @@ func (m *ImageLayer) Unmarshal(dAtA []byte) error {
if err != nil {
return err
}
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) < 0 {
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > l {
@@ -5596,10 +5935,7 @@ func (m *ImageLayerData) Unmarshal(dAtA []byte) error {
if err != nil {
return err
}
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) < 0 {
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > l {
@@ -5716,10 +6052,7 @@ func (m *ImageList) Unmarshal(dAtA []byte) error {
if err != nil {
return err
}
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) < 0 {
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > l {
@@ -5789,10 +6122,7 @@ func (m *ImageLookupPolicy) Unmarshal(dAtA []byte) error {
if err != nil {
return err
}
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) < 0 {
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > l {
@@ -6117,7 +6447,7 @@ func (m *ImageSignature) Unmarshal(dAtA []byte) error {
if err != nil {
return err
}
- if skippy < 0 {
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > postIndex {
@@ -6242,10 +6572,7 @@ func (m *ImageSignature) Unmarshal(dAtA []byte) error {
if err != nil {
return err
}
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) < 0 {
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > l {
@@ -6394,10 +6721,7 @@ func (m *ImageStream) Unmarshal(dAtA []byte) error {
if err != nil {
return err
}
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) < 0 {
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > l {
@@ -6513,10 +6837,7 @@ func (m *ImageStreamImage) Unmarshal(dAtA []byte) error {
if err != nil {
return err
}
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) < 0 {
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > l {
@@ -6665,10 +6986,7 @@ func (m *ImageStreamImport) Unmarshal(dAtA []byte) error {
if err != nil {
return err
}
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) < 0 {
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > l {
@@ -6808,10 +7126,7 @@ func (m *ImageStreamImportSpec) Unmarshal(dAtA []byte) error {
if err != nil {
return err
}
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) < 0 {
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > l {
@@ -6967,10 +7282,7 @@ func (m *ImageStreamImportStatus) Unmarshal(dAtA []byte) error {
if err != nil {
return err
}
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) < 0 {
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > l {
@@ -7165,7 +7477,7 @@ func (m *ImageStreamLayers) Unmarshal(dAtA []byte) error {
if err != nil {
return err
}
- if skippy < 0 {
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > postIndex {
@@ -7294,7 +7606,7 @@ func (m *ImageStreamLayers) Unmarshal(dAtA []byte) error {
if err != nil {
return err
}
- if skippy < 0 {
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > postIndex {
@@ -7311,10 +7623,7 @@ func (m *ImageStreamLayers) Unmarshal(dAtA []byte) error {
if err != nil {
return err
}
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) < 0 {
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > l {
@@ -7431,10 +7740,7 @@ func (m *ImageStreamList) Unmarshal(dAtA []byte) error {
if err != nil {
return err
}
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) < 0 {
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > l {
@@ -7582,10 +7888,7 @@ func (m *ImageStreamMapping) Unmarshal(dAtA []byte) error {
if err != nil {
return err
}
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) < 0 {
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > l {
@@ -7734,10 +8037,7 @@ func (m *ImageStreamSpec) Unmarshal(dAtA []byte) error {
if err != nil {
return err
}
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) < 0 {
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > l {
@@ -7885,10 +8185,7 @@ func (m *ImageStreamStatus) Unmarshal(dAtA []byte) error {
if err != nil {
return err
}
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) < 0 {
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > l {
@@ -8126,10 +8423,7 @@ func (m *ImageStreamTag) Unmarshal(dAtA []byte) error {
if err != nil {
return err
}
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) < 0 {
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > l {
@@ -8246,10 +8540,7 @@ func (m *ImageStreamTagList) Unmarshal(dAtA []byte) error {
if err != nil {
return err
}
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) < 0 {
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > l {
@@ -8264,7 +8555,7 @@ func (m *ImageStreamTagList) Unmarshal(dAtA []byte) error {
}
return nil
}
-func (m *NamedTagEventList) Unmarshal(dAtA []byte) error {
+func (m *ImageTag) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
@@ -8287,17 +8578,17 @@ func (m *NamedTagEventList) Unmarshal(dAtA []byte) error {
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
- return fmt.Errorf("proto: NamedTagEventList: wiretype end group for non-group")
+ return fmt.Errorf("proto: ImageTag: wiretype end group for non-group")
}
if fieldNum <= 0 {
- return fmt.Errorf("proto: NamedTagEventList: illegal tag %d (wire type %d)", fieldNum, wire)
+ return fmt.Errorf("proto: ImageTag: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Tag", wireType)
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
}
- var stringLen uint64
+ var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenerated
@@ -8307,27 +8598,28 @@ func (m *NamedTagEventList) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= uint64(b&0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
- intStringLen := int(stringLen)
- if intStringLen < 0 {
+ if msglen < 0 {
return ErrInvalidLengthGenerated
}
- postIndex := iNdEx + intStringLen
+ postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthGenerated
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
- m.Tag = string(dAtA[iNdEx:postIndex])
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
iNdEx = postIndex
case 2:
if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
+ return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
@@ -8354,14 +8646,16 @@ func (m *NamedTagEventList) Unmarshal(dAtA []byte) error {
if postIndex > l {
return io.ErrUnexpectedEOF
}
- m.Items = append(m.Items, TagEvent{})
- if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ if m.Spec == nil {
+ m.Spec = &TagReference{}
+ }
+ if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 3:
if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Conditions", wireType)
+ return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
@@ -8388,8 +8682,46 @@ func (m *NamedTagEventList) Unmarshal(dAtA []byte) error {
if postIndex > l {
return io.ErrUnexpectedEOF
}
- m.Conditions = append(m.Conditions, TagEventCondition{})
- if err := m.Conditions[len(m.Conditions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ if m.Status == nil {
+ m.Status = &NamedTagEventList{}
+ }
+ if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Image", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Image == nil {
+ m.Image = &Image{}
+ }
+ if err := m.Image.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
@@ -8399,10 +8731,7 @@ func (m *NamedTagEventList) Unmarshal(dAtA []byte) error {
if err != nil {
return err
}
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) < 0 {
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > l {
@@ -8417,7 +8746,7 @@ func (m *NamedTagEventList) Unmarshal(dAtA []byte) error {
}
return nil
}
-func (m *RepositoryImportSpec) Unmarshal(dAtA []byte) error {
+func (m *ImageTagList) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
@@ -8440,15 +8769,15 @@ func (m *RepositoryImportSpec) Unmarshal(dAtA []byte) error {
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
- return fmt.Errorf("proto: RepositoryImportSpec: wiretype end group for non-group")
+ return fmt.Errorf("proto: ImageTagList: wiretype end group for non-group")
}
if fieldNum <= 0 {
- return fmt.Errorf("proto: RepositoryImportSpec: illegal tag %d (wire type %d)", fieldNum, wire)
+ return fmt.Errorf("proto: ImageTagList: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field From", wireType)
+ return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
@@ -8475,66 +8804,13 @@ func (m *RepositoryImportSpec) Unmarshal(dAtA []byte) error {
if postIndex > l {
return io.ErrUnexpectedEOF
}
- if err := m.From.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 2:
if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ImportPolicy", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= int(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthGenerated
- }
- postIndex := iNdEx + msglen
- if postIndex < 0 {
- return ErrInvalidLengthGenerated
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.ImportPolicy.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 3:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field IncludeManifest", wireType)
- }
- var v int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- v |= int(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- m.IncludeManifest = bool(v != 0)
- case 4:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ReferencePolicy", wireType)
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
@@ -8561,7 +8837,8 @@ func (m *RepositoryImportSpec) Unmarshal(dAtA []byte) error {
if postIndex > l {
return io.ErrUnexpectedEOF
}
- if err := m.ReferencePolicy.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ m.Items = append(m.Items, ImageTag{})
+ if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
@@ -8571,10 +8848,7 @@ func (m *RepositoryImportSpec) Unmarshal(dAtA []byte) error {
if err != nil {
return err
}
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) < 0 {
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > l {
@@ -8589,7 +8863,7 @@ func (m *RepositoryImportSpec) Unmarshal(dAtA []byte) error {
}
return nil
}
-func (m *RepositoryImportStatus) Unmarshal(dAtA []byte) error {
+func (m *NamedTagEventList) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
@@ -8612,17 +8886,17 @@ func (m *RepositoryImportStatus) Unmarshal(dAtA []byte) error {
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
- return fmt.Errorf("proto: RepositoryImportStatus: wiretype end group for non-group")
+ return fmt.Errorf("proto: NamedTagEventList: wiretype end group for non-group")
}
if fieldNum <= 0 {
- return fmt.Errorf("proto: RepositoryImportStatus: illegal tag %d (wire type %d)", fieldNum, wire)
+ return fmt.Errorf("proto: NamedTagEventList: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
+ return fmt.Errorf("proto: wrong wireType = %d for field Tag", wireType)
}
- var msglen int
+ var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenerated
@@ -8632,28 +8906,27 @@ func (m *RepositoryImportStatus) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= int(b&0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
- if msglen < 0 {
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
return ErrInvalidLengthGenerated
}
- postIndex := iNdEx + msglen
+ postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthGenerated
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
- if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
+ m.Tag = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 2:
if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Images", wireType)
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
@@ -8680,14 +8953,334 @@ func (m *RepositoryImportStatus) Unmarshal(dAtA []byte) error {
if postIndex > l {
return io.ErrUnexpectedEOF
}
- m.Images = append(m.Images, ImageImportStatus{})
- if err := m.Images[len(m.Images)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ m.Items = append(m.Items, TagEvent{})
+ if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 3:
if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field AdditionalTags", wireType)
+ return fmt.Errorf("proto: wrong wireType = %d for field Conditions", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Conditions = append(m.Conditions, TagEventCondition{})
+ if err := m.Conditions[len(m.Conditions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *RepositoryImportSpec) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: RepositoryImportSpec: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: RepositoryImportSpec: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field From", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.From.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ImportPolicy", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ImportPolicy.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field IncludeManifest", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.IncludeManifest = bool(v != 0)
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ReferencePolicy", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ReferencePolicy.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *RepositoryImportStatus) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: RepositoryImportStatus: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: RepositoryImportStatus: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Images", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Images = append(m.Images, ImageImportStatus{})
+ if err := m.Images[len(m.Images)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field AdditionalTags", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
@@ -8723,10 +9316,124 @@ func (m *RepositoryImportStatus) Unmarshal(dAtA []byte) error {
if err != nil {
return err
}
- if skippy < 0 {
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *SecretList) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: SecretList: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: SecretList: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
return ErrInvalidLengthGenerated
}
- if (iNdEx + skippy) < 0 {
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Items = append(m.Items, v11.Secret{})
+ if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > l {
@@ -8970,10 +9677,7 @@ func (m *SignatureCondition) Unmarshal(dAtA []byte) error {
if err != nil {
return err
}
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) < 0 {
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > l {
@@ -9087,10 +9791,7 @@ func (m *SignatureGenericEntity) Unmarshal(dAtA []byte) error {
if err != nil {
return err
}
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) < 0 {
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > l {
@@ -9173,10 +9874,7 @@ func (m *SignatureIssuer) Unmarshal(dAtA []byte) error {
if err != nil {
return err
}
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) < 0 {
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > l {
@@ -9291,10 +9989,7 @@ func (m *SignatureSubject) Unmarshal(dAtA []byte) error {
if err != nil {
return err
}
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) < 0 {
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > l {
@@ -9460,10 +10155,7 @@ func (m *TagEvent) Unmarshal(dAtA []byte) error {
if err != nil {
return err
}
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) < 0 {
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > l {
@@ -9693,10 +10385,7 @@ func (m *TagEventCondition) Unmarshal(dAtA []byte) error {
if err != nil {
return err
}
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) < 0 {
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > l {
@@ -9786,10 +10475,7 @@ func (m *TagImportPolicy) Unmarshal(dAtA []byte) error {
if err != nil {
return err
}
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) < 0 {
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > l {
@@ -9981,7 +10667,7 @@ func (m *TagReference) Unmarshal(dAtA []byte) error {
if err != nil {
return err
}
- if skippy < 0 {
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > postIndex {
@@ -10140,10 +10826,7 @@ func (m *TagReference) Unmarshal(dAtA []byte) error {
if err != nil {
return err
}
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) < 0 {
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > l {
@@ -10225,10 +10908,7 @@ func (m *TagReferencePolicy) Unmarshal(dAtA []byte) error {
if err != nil {
return err
}
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) < 0 {
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > l {
@@ -10246,6 +10926,7 @@ func (m *TagReferencePolicy) Unmarshal(dAtA []byte) error {
func skipGenerated(dAtA []byte) (n int, err error) {
l := len(dAtA)
iNdEx := 0
+ depth := 0
for iNdEx < l {
var wire uint64
for shift := uint(0); ; shift += 7 {
@@ -10277,10 +10958,8 @@ func skipGenerated(dAtA []byte) (n int, err error) {
break
}
}
- return iNdEx, nil
case 1:
iNdEx += 8
- return iNdEx, nil
case 2:
var length int
for shift := uint(0); ; shift += 7 {
@@ -10301,55 +10980,30 @@ func skipGenerated(dAtA []byte) (n int, err error) {
return 0, ErrInvalidLengthGenerated
}
iNdEx += length
- if iNdEx < 0 {
- return 0, ErrInvalidLengthGenerated
- }
- return iNdEx, nil
case 3:
- for {
- var innerWire uint64
- var start int = iNdEx
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- innerWire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- innerWireType := int(innerWire & 0x7)
- if innerWireType == 4 {
- break
- }
- next, err := skipGenerated(dAtA[start:])
- if err != nil {
- return 0, err
- }
- iNdEx = start + next
- if iNdEx < 0 {
- return 0, ErrInvalidLengthGenerated
- }
- }
- return iNdEx, nil
+ depth++
case 4:
- return iNdEx, nil
+ if depth == 0 {
+ return 0, ErrUnexpectedEndOfGroupGenerated
+ }
+ depth--
case 5:
iNdEx += 4
- return iNdEx, nil
default:
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
}
+ if iNdEx < 0 {
+ return 0, ErrInvalidLengthGenerated
+ }
+ if depth == 0 {
+ return iNdEx, nil
+ }
}
- panic("unreachable")
+ return 0, io.ErrUnexpectedEOF
}
var (
- ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling")
- ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow")
+ ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling")
+ ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow")
+ ErrUnexpectedEndOfGroupGenerated = fmt.Errorf("proto: unexpected end of group")
)
diff --git a/vendor/github.com/openshift/api/image/v1/generated.proto b/vendor/github.com/openshift/api/image/v1/generated.proto
index 770c5b79424..8f606b04fa7 100644
--- a/vendor/github.com/openshift/api/image/v1/generated.proto
+++ b/vendor/github.com/openshift/api/image/v1/generated.proto
@@ -1,7 +1,7 @@
// This file was autogenerated by go-to-protobuf. Do not edit it manually!
-syntax = 'proto2';
+syntax = "proto2";
package github.com.openshift.api.image.v1;
@@ -32,6 +32,13 @@ message DockerImageReference {
}
// Image is an immutable representation of a container image and metadata at a point in time.
+// Images are named by taking a hash of their contents (metadata and content) and any change
+// in format, content, or metadata results in a new name. The images resource is primarily
+// for use by cluster administrators and integrations like the cluster image registry - end
+// users instead access images via the imagestreamtags or imagestreamimages resources. While
+// image metadata is stored in the API, any integration that implements the container image
+// registry API must provide its own storage for the raw manifest data, image config, and
+// layer contents.
message Image {
optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
@@ -197,20 +204,44 @@ message ImageSignature {
optional SignatureSubject issuedTo = 9;
}
-// ImageStream stores a mapping of tags to images, metadata overrides that are applied
+// An ImageStream stores a mapping of tags to images, metadata overrides that are applied
// when images are tagged in a stream, and an optional reference to a container image
-// repository on a registry.
+// repository on a registry. Users typically update the spec.tags field to point to external
+// images which are imported from container registries using credentials in your namespace
+// with the pull secret type, or to existing image stream tags and images which are
+// immediately accessible for tagging or pulling. The history of images applied to a tag
+// is visible in the status.tags field and any user who can view an image stream is allowed
+// to tag that image into their own image streams. Access to pull images from the integrated
+// registry is granted by having the "get imagestreams/layers" permission on a given image
+// stream. Users may remove a tag by deleting the imagestreamtag resource, which causes both
+// spec and status for that tag to be removed. Image stream history is retained until an
+// administrator runs the prune operation, which removes references that are no longer in
+// use. To preserve a historical image, ensure there is a tag in spec pointing to that image
+// by its digest.
message ImageStream {
optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
// Spec describes the desired state of this stream
+ // +optional
optional ImageStreamSpec spec = 2;
// Status describes the current state of this stream
+ // +optional
optional ImageStreamStatus status = 3;
}
// ImageStreamImage represents an Image that is retrieved by image name from an ImageStream.
+// User interfaces and regular users can use this resource to access the metadata details of
+// a tagged image in the image stream history for viewing, since Image resources are not
+// directly accessible to end users. A not found error will be returned if no such image is
+// referenced by a tag within the ImageStream. Images are created when spec tags are set on
+// an image stream that represent an image in an external registry, when pushing to the
+// integrated registry, or when tagging an existing image from one image stream to another.
+// The name of an image stream image is in the form "@", where the digest is
+// the content addressible identifier for the image (sha256:xxxxx...). You can use
+// ImageStreamImages as the from.kind of an image stream spec tag to reference an image
+// exactly. The only operations supported on the imagestreamimage endpoint are retrieving
+// the image.
message ImageStreamImage {
optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
@@ -283,8 +314,14 @@ message ImageStreamList {
repeated ImageStream items = 2;
}
-// ImageStreamMapping represents a mapping from a single tag to a container image as
-// well as the reference to the container image stream the image came from.
+// ImageStreamMapping represents a mapping from a single image stream tag to a container
+// image as well as the reference to the container image stream the image came from. This
+// resource is used by privileged integrators to create an image resource and to associate
+// it with an image stream in the status tags field. Creating an ImageStreamMapping will
+// allow any user who can view the image stream to tag or pull that image, so only create
+// mappings where the user has proven they have access to the image contents directly.
+// The only operation supported for this resource is create and the metadata name and
+// namespace should be set to the image stream containing the tag that should be updated.
message ImageStreamMapping {
optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
@@ -330,6 +367,13 @@ message ImageStreamStatus {
}
// ImageStreamTag represents an Image that is retrieved by tag name from an ImageStream.
+// Use this resource to interact with the tags and images in an image stream by tag, or
+// to see the image details for a particular tag. The image associated with this resource
+// is the most recently successfully tagged, imported, or pushed image (as described in the
+// image stream status.tags.items list for this tag). If an import is in progress or has
+// failed the previous image will be shown. Deleting an image stream tag clears both the
+// status and spec fields of an image stream. If no image can be retrieved for a given tag,
+// a not found error will be returned.
message ImageStreamTag {
optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
@@ -362,6 +406,43 @@ message ImageStreamTagList {
repeated ImageStreamTag items = 2;
}
+// ImageTag represents a single tag within an image stream and includes the spec,
+// the status history, and the currently referenced image (if any) of the provided
+// tag. This type replaces the ImageStreamTag by providing a full view of the tag.
+// ImageTags are returned for every spec or status tag present on the image stream.
+// If no tag exists in either form a not found error will be returned by the API.
+// A create operation will succeed if no spec tag has already been defined and the
+// spec field is set. Delete will remove both spec and status elements from the
+// image stream.
+message ImageTag {
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // spec is the spec tag associated with this image stream tag, and it may be null
+ // if only pushes have occurred to this image stream.
+ optional TagReference spec = 2;
+
+ // status is the status tag details associated with this image stream tag, and it
+ // may be null if no push or import has been performed.
+ optional NamedTagEventList status = 3;
+
+ // image is the details of the most recent image stream status tag, and it may be
+ // null if import has not completed or an administrator has deleted the image
+ // object. To verify this is the most recent image, you must verify the generation
+ // of the most recent status.items entry matches the spec tag (if a spec tag is
+ // set). This field will not be set when listing image tags.
+ optional Image image = 4;
+}
+
+// ImageTagList is a list of ImageTag objects. When listing image tags, the image
+// field is not populated. Tags are returned in alphabetical order by image stream
+// and then tag.
+message ImageTagList {
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
+
+ // Items is the list of image stream tags
+ repeated ImageTag items = 2;
+}
+
// NamedTagEventList relates a tag to its image history.
message NamedTagEventList {
// Tag is the tag for which the history is recorded
@@ -402,6 +483,18 @@ message RepositoryImportStatus {
repeated string additionalTags = 3;
}
+// SecretList is a list of Secret.
+message SecretList {
+ // Standard list metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
+
+ // Items is a list of secret objects.
+ // More info: https://kubernetes.io/docs/concepts/configuration/secret
+ repeated k8s.io.api.core.v1.Secret items = 2;
+}
+
// SignatureCondition describes an image signature condition of particular kind at particular probe time.
message SignatureCondition {
// Type of signature condition, Complete or Failed.
diff --git a/vendor/github.com/openshift/api/image/v1/register.go b/vendor/github.com/openshift/api/image/v1/register.go
index 46f785c471a..0d924103a64 100644
--- a/vendor/github.com/openshift/api/image/v1/register.go
+++ b/vendor/github.com/openshift/api/image/v1/register.go
@@ -45,7 +45,9 @@ func addKnownTypes(scheme *runtime.Scheme) error {
&ImageStreamImage{},
&ImageStreamLayers{},
&ImageStreamImport{},
- &corev1.SecretList{},
+ &ImageTag{},
+ &ImageTagList{},
+ &SecretList{},
)
metav1.AddToGroupVersion(scheme, GroupVersion)
return nil
diff --git a/vendor/github.com/openshift/api/image/v1/types.go b/vendor/github.com/openshift/api/image/v1/types.go
index 7fb7471d882..8319921e9dd 100644
--- a/vendor/github.com/openshift/api/image/v1/types.go
+++ b/vendor/github.com/openshift/api/image/v1/types.go
@@ -22,6 +22,13 @@ type ImageList struct {
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// Image is an immutable representation of a container image and metadata at a point in time.
+// Images are named by taking a hash of their contents (metadata and content) and any change
+// in format, content, or metadata results in a new name. The images resource is primarily
+// for use by cluster administrators and integrations like the cluster image registry - end
+// users instead access images via the imagestreamtags or imagestreamimages resources. While
+// image metadata is stored in the API, any integration that implements the container image
+// registry API must provide its own storage for the raw manifest data, image config, and
+// layer contents.
type Image struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
@@ -155,20 +162,33 @@ type ImageStreamList struct {
}
// +genclient
-// +genclient:method=Secrets,verb=get,subresource=secrets,result=k8s.io/api/core/v1.SecretList
+// +genclient:method=Secrets,verb=get,subresource=secrets,result=github.com/openshift/api/image/v1.SecretList
// +genclient:method=Layers,verb=get,subresource=layers,result=github.com/openshift/api/image/v1.ImageStreamLayers
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-// ImageStream stores a mapping of tags to images, metadata overrides that are applied
+// An ImageStream stores a mapping of tags to images, metadata overrides that are applied
// when images are tagged in a stream, and an optional reference to a container image
-// repository on a registry.
+// repository on a registry. Users typically update the spec.tags field to point to external
+// images which are imported from container registries using credentials in your namespace
+// with the pull secret type, or to existing image stream tags and images which are
+// immediately accessible for tagging or pulling. The history of images applied to a tag
+// is visible in the status.tags field and any user who can view an image stream is allowed
+// to tag that image into their own image streams. Access to pull images from the integrated
+// registry is granted by having the "get imagestreams/layers" permission on a given image
+// stream. Users may remove a tag by deleting the imagestreamtag resource, which causes both
+// spec and status for that tag to be removed. Image stream history is retained until an
+// administrator runs the prune operation, which removes references that are no longer in
+// use. To preserve a historical image, ensure there is a tag in spec pointing to that image
+// by its digest.
type ImageStream struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
// Spec describes the desired state of this stream
+ // +optional
Spec ImageStreamSpec `json:"spec" protobuf:"bytes,2,opt,name=spec"`
// Status describes the current state of this stream
+ // +optional
Status ImageStreamStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
}
@@ -330,8 +350,14 @@ type TagEventCondition struct {
// +genclient:method=Create,verb=create,result=k8s.io/apimachinery/pkg/apis/meta/v1.Status
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-// ImageStreamMapping represents a mapping from a single tag to a container image as
-// well as the reference to the container image stream the image came from.
+// ImageStreamMapping represents a mapping from a single image stream tag to a container
+// image as well as the reference to the container image stream the image came from. This
+// resource is used by privileged integrators to create an image resource and to associate
+// it with an image stream in the status tags field. Creating an ImageStreamMapping will
+// allow any user who can view the image stream to tag or pull that image, so only create
+// mappings where the user has proven they have access to the image contents directly.
+// The only operation supported for this resource is create and the metadata name and
+// namespace should be set to the image stream containing the tag that should be updated.
type ImageStreamMapping struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
@@ -347,6 +373,13 @@ type ImageStreamMapping struct {
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// ImageStreamTag represents an Image that is retrieved by tag name from an ImageStream.
+// Use this resource to interact with the tags and images in an image stream by tag, or
+// to see the image details for a particular tag. The image associated with this resource
+// is the most recently successfully tagged, imported, or pushed image (as described in the
+// image stream status.tags.items list for this tag). If an import is in progress or has
+// failed the previous image will be shown. Deleting an image stream tag clears both the
+// status and spec fields of an image stream. If no image can be retrieved for a given tag,
+// a not found error will be returned.
type ImageStreamTag struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
@@ -383,11 +416,65 @@ type ImageStreamTagList struct {
Items []ImageStreamTag `json:"items" protobuf:"bytes,2,rep,name=items"`
}
+// +genclient
+// +genclient:onlyVerbs=get,list,create,update,delete
+// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
+
+// ImageTag represents a single tag within an image stream and includes the spec,
+// the status history, and the currently referenced image (if any) of the provided
+// tag. This type replaces the ImageStreamTag by providing a full view of the tag.
+// ImageTags are returned for every spec or status tag present on the image stream.
+// If no tag exists in either form a not found error will be returned by the API.
+// A create operation will succeed if no spec tag has already been defined and the
+// spec field is set. Delete will remove both spec and status elements from the
+// image stream.
+type ImageTag struct {
+ metav1.TypeMeta `json:",inline"`
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // spec is the spec tag associated with this image stream tag, and it may be null
+ // if only pushes have occurred to this image stream.
+ Spec *TagReference `json:"spec" protobuf:"bytes,2,opt,name=spec"`
+ // status is the status tag details associated with this image stream tag, and it
+ // may be null if no push or import has been performed.
+ Status *NamedTagEventList `json:"status" protobuf:"bytes,3,opt,name=status"`
+ // image is the details of the most recent image stream status tag, and it may be
+ // null if import has not completed or an administrator has deleted the image
+ // object. To verify this is the most recent image, you must verify the generation
+ // of the most recent status.items entry matches the spec tag (if a spec tag is
+ // set). This field will not be set when listing image tags.
+ Image *Image `json:"image" protobuf:"bytes,4,opt,name=image"`
+}
+
+// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
+
+// ImageTagList is a list of ImageTag objects. When listing image tags, the image
+// field is not populated. Tags are returned in alphabetical order by image stream
+// and then tag.
+type ImageTagList struct {
+ metav1.TypeMeta `json:",inline"`
+ metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Items is the list of image stream tags
+ Items []ImageTag `json:"items" protobuf:"bytes,2,rep,name=items"`
+}
+
// +genclient
// +genclient:onlyVerbs=get
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// ImageStreamImage represents an Image that is retrieved by image name from an ImageStream.
+// User interfaces and regular users can use this resource to access the metadata details of
+// a tagged image in the image stream history for viewing, since Image resources are not
+// directly accessible to end users. A not found error will be returned if no such image is
+// referenced by a tag within the ImageStream. Images are created when spec tags are set on
+// an image stream that represent an image in an external registry, when pushing to the
+// integrated registry, or when tagging an existing image from one image stream to another.
+// The name of an image stream image is in the form "@", where the digest is
+// the content addressible identifier for the image (sha256:xxxxx...). You can use
+// ImageStreamImages as the from.kind of an image stream spec tag to reference an image
+// exactly. The only operations supported on the imagestreamimage endpoint are retrieving
+// the image.
type ImageStreamImage struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
@@ -545,3 +632,8 @@ type ImageImportStatus struct {
// Tag is the tag this image was located under, if any
Tag string `json:"tag,omitempty" protobuf:"bytes,3,opt,name=tag"`
}
+
+// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
+
+// SecretList is a list of Secret.
+type SecretList corev1.SecretList
diff --git a/vendor/github.com/openshift/api/image/v1/zz_generated.deepcopy.go b/vendor/github.com/openshift/api/image/v1/zz_generated.deepcopy.go
index c0877d67e35..654fd31d678 100644
--- a/vendor/github.com/openshift/api/image/v1/zz_generated.deepcopy.go
+++ b/vendor/github.com/openshift/api/image/v1/zz_generated.deepcopy.go
@@ -656,6 +656,80 @@ func (in *ImageStreamTagList) DeepCopyObject() runtime.Object {
return nil
}
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *ImageTag) DeepCopyInto(out *ImageTag) {
+ *out = *in
+ out.TypeMeta = in.TypeMeta
+ in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
+ if in.Spec != nil {
+ in, out := &in.Spec, &out.Spec
+ *out = new(TagReference)
+ (*in).DeepCopyInto(*out)
+ }
+ if in.Status != nil {
+ in, out := &in.Status, &out.Status
+ *out = new(NamedTagEventList)
+ (*in).DeepCopyInto(*out)
+ }
+ if in.Image != nil {
+ in, out := &in.Image, &out.Image
+ *out = new(Image)
+ (*in).DeepCopyInto(*out)
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageTag.
+func (in *ImageTag) DeepCopy() *ImageTag {
+ if in == nil {
+ return nil
+ }
+ out := new(ImageTag)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
+func (in *ImageTag) DeepCopyObject() runtime.Object {
+ if c := in.DeepCopy(); c != nil {
+ return c
+ }
+ return nil
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *ImageTagList) DeepCopyInto(out *ImageTagList) {
+ *out = *in
+ out.TypeMeta = in.TypeMeta
+ in.ListMeta.DeepCopyInto(&out.ListMeta)
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]ImageTag, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageTagList.
+func (in *ImageTagList) DeepCopy() *ImageTagList {
+ if in == nil {
+ return nil
+ }
+ out := new(ImageTagList)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
+func (in *ImageTagList) DeepCopyObject() runtime.Object {
+ if c := in.DeepCopy(); c != nil {
+ return c
+ }
+ return nil
+}
+
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *NamedTagEventList) DeepCopyInto(out *NamedTagEventList) {
*out = *in
@@ -734,6 +808,39 @@ func (in *RepositoryImportStatus) DeepCopy() *RepositoryImportStatus {
return out
}
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *SecretList) DeepCopyInto(out *SecretList) {
+ *out = *in
+ out.TypeMeta = in.TypeMeta
+ in.ListMeta.DeepCopyInto(&out.ListMeta)
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]corev1.Secret, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecretList.
+func (in *SecretList) DeepCopy() *SecretList {
+ if in == nil {
+ return nil
+ }
+ out := new(SecretList)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
+func (in *SecretList) DeepCopyObject() runtime.Object {
+ if c := in.DeepCopy(); c != nil {
+ return c
+ }
+ return nil
+}
+
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *SignatureCondition) DeepCopyInto(out *SignatureCondition) {
*out = *in
diff --git a/vendor/github.com/openshift/api/image/v1/zz_generated.swagger_doc_generated.go b/vendor/github.com/openshift/api/image/v1/zz_generated.swagger_doc_generated.go
index 43e67e620b9..a50ffbbc524 100644
--- a/vendor/github.com/openshift/api/image/v1/zz_generated.swagger_doc_generated.go
+++ b/vendor/github.com/openshift/api/image/v1/zz_generated.swagger_doc_generated.go
@@ -25,7 +25,7 @@ func (DockerImageReference) SwaggerDoc() map[string]string {
}
var map_Image = map[string]string{
- "": "Image is an immutable representation of a container image and metadata at a point in time.",
+ "": "Image is an immutable representation of a container image and metadata at a point in time. Images are named by taking a hash of their contents (metadata and content) and any change in format, content, or metadata results in a new name. The images resource is primarily for use by cluster administrators and integrations like the cluster image registry - end users instead access images via the imagestreamtags or imagestreamimages resources. While image metadata is stored in the API, any integration that implements the container image registry API must provide its own storage for the raw manifest data, image config, and layer contents.",
"dockerImageReference": "DockerImageReference is the string that can be used to pull this image.",
"dockerImageMetadata": "DockerImageMetadata contains metadata about this image",
"dockerImageMetadataVersion": "DockerImageMetadataVersion conveys the version of the object, which if empty defaults to \"1.0\"",
@@ -132,7 +132,7 @@ func (ImageSignature) SwaggerDoc() map[string]string {
}
var map_ImageStream = map[string]string{
- "": "ImageStream stores a mapping of tags to images, metadata overrides that are applied when images are tagged in a stream, and an optional reference to a container image repository on a registry.",
+ "": "An ImageStream stores a mapping of tags to images, metadata overrides that are applied when images are tagged in a stream, and an optional reference to a container image repository on a registry. Users typically update the spec.tags field to point to external images which are imported from container registries using credentials in your namespace with the pull secret type, or to existing image stream tags and images which are immediately accessible for tagging or pulling. The history of images applied to a tag is visible in the status.tags field and any user who can view an image stream is allowed to tag that image into their own image streams. Access to pull images from the integrated registry is granted by having the \"get imagestreams/layers\" permission on a given image stream. Users may remove a tag by deleting the imagestreamtag resource, which causes both spec and status for that tag to be removed. Image stream history is retained until an administrator runs the prune operation, which removes references that are no longer in use. To preserve a historical image, ensure there is a tag in spec pointing to that image by its digest.",
"spec": "Spec describes the desired state of this stream",
"status": "Status describes the current state of this stream",
}
@@ -142,7 +142,7 @@ func (ImageStream) SwaggerDoc() map[string]string {
}
var map_ImageStreamImage = map[string]string{
- "": "ImageStreamImage represents an Image that is retrieved by image name from an ImageStream.",
+ "": "ImageStreamImage represents an Image that is retrieved by image name from an ImageStream. User interfaces and regular users can use this resource to access the metadata details of a tagged image in the image stream history for viewing, since Image resources are not directly accessible to end users. A not found error will be returned if no such image is referenced by a tag within the ImageStream. Images are created when spec tags are set on an image stream that represent an image in an external registry, when pushing to the integrated registry, or when tagging an existing image from one image stream to another. The name of an image stream image is in the form \"@\", where the digest is the content addressible identifier for the image (sha256:xxxxx...). You can use ImageStreamImages as the from.kind of an image stream spec tag to reference an image exactly. The only operations supported on the imagestreamimage endpoint are retrieving the image.",
"image": "Image associated with the ImageStream and image name.",
}
@@ -202,7 +202,7 @@ func (ImageStreamList) SwaggerDoc() map[string]string {
}
var map_ImageStreamMapping = map[string]string{
- "": "ImageStreamMapping represents a mapping from a single tag to a container image as well as the reference to the container image stream the image came from.",
+ "": "ImageStreamMapping represents a mapping from a single image stream tag to a container image as well as the reference to the container image stream the image came from. This resource is used by privileged integrators to create an image resource and to associate it with an image stream in the status tags field. Creating an ImageStreamMapping will allow any user who can view the image stream to tag or pull that image, so only create mappings where the user has proven they have access to the image contents directly. The only operation supported for this resource is create and the metadata name and namespace should be set to the image stream containing the tag that should be updated.",
"image": "Image is a container image.",
"tag": "Tag is a string value this image can be located with inside the stream.",
}
@@ -234,7 +234,7 @@ func (ImageStreamStatus) SwaggerDoc() map[string]string {
}
var map_ImageStreamTag = map[string]string{
- "": "ImageStreamTag represents an Image that is retrieved by tag name from an ImageStream.",
+ "": "ImageStreamTag represents an Image that is retrieved by tag name from an ImageStream. Use this resource to interact with the tags and images in an image stream by tag, or to see the image details for a particular tag. The image associated with this resource is the most recently successfully tagged, imported, or pushed image (as described in the image stream status.tags.items list for this tag). If an import is in progress or has failed the previous image will be shown. Deleting an image stream tag clears both the status and spec fields of an image stream. If no image can be retrieved for a given tag, a not found error will be returned.",
"tag": "tag is the spec tag associated with this image stream tag, and it may be null if only pushes have occurred to this image stream.",
"generation": "generation is the current generation of the tagged image - if tag is provided and this value is not equal to the tag generation, a user has requested an import that has not completed, or conditions will be filled out indicating any error.",
"lookupPolicy": "lookupPolicy indicates whether this tag will handle image references in this namespace.",
@@ -255,6 +255,26 @@ func (ImageStreamTagList) SwaggerDoc() map[string]string {
return map_ImageStreamTagList
}
+var map_ImageTag = map[string]string{
+ "": "ImageTag represents a single tag within an image stream and includes the spec, the status history, and the currently referenced image (if any) of the provided tag. This type replaces the ImageStreamTag by providing a full view of the tag. ImageTags are returned for every spec or status tag present on the image stream. If no tag exists in either form a not found error will be returned by the API. A create operation will succeed if no spec tag has already been defined and the spec field is set. Delete will remove both spec and status elements from the image stream.",
+ "spec": "spec is the spec tag associated with this image stream tag, and it may be null if only pushes have occurred to this image stream.",
+ "status": "status is the status tag details associated with this image stream tag, and it may be null if no push or import has been performed.",
+ "image": "image is the details of the most recent image stream status tag, and it may be null if import has not completed or an administrator has deleted the image object. To verify this is the most recent image, you must verify the generation of the most recent status.items entry matches the spec tag (if a spec tag is set). This field will not be set when listing image tags.",
+}
+
+func (ImageTag) SwaggerDoc() map[string]string {
+ return map_ImageTag
+}
+
+var map_ImageTagList = map[string]string{
+ "": "ImageTagList is a list of ImageTag objects. When listing image tags, the image field is not populated. Tags are returned in alphabetical order by image stream and then tag.",
+ "items": "Items is the list of image stream tags",
+}
+
+func (ImageTagList) SwaggerDoc() map[string]string {
+ return map_ImageTagList
+}
+
var map_NamedTagEventList = map[string]string{
"": "NamedTagEventList relates a tag to its image history.",
"tag": "Tag is the tag for which the history is recorded",
diff --git a/vendor/github.com/openshift/api/operator/v1/0000_10_config-operator_01_config.crd.yaml b/vendor/github.com/openshift/api/operator/v1/0000_10_config-operator_01_config.crd.yaml
new file mode 100644
index 00000000000..0284f683306
--- /dev/null
+++ b/vendor/github.com/openshift/api/operator/v1/0000_10_config-operator_01_config.crd.yaml
@@ -0,0 +1,136 @@
+apiVersion: apiextensions.k8s.io/v1
+kind: CustomResourceDefinition
+metadata:
+ annotations:
+ api-approved.openshift.io: https://github.com/openshift/api/pull/612
+ include.release.openshift.io/ibm-cloud-managed: "true"
+ include.release.openshift.io/self-managed-high-availability: "true"
+ include.release.openshift.io/single-node-developer: "true"
+ name: configs.operator.openshift.io
+spec:
+ group: operator.openshift.io
+ names:
+ categories:
+ - coreoperators
+ kind: Config
+ plural: configs
+ singular: config
+ scope: Cluster
+ versions:
+ - name: v1
+ schema:
+ openAPIV3Schema:
+ description: Config provides information to configure the config operator. It handles installation, migration or synchronization of cloud based cluster configurations like AWS or Azure.
+ type: object
+ required:
+ - spec
+ properties:
+ apiVersion:
+ description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
+ type: string
+ kind:
+ description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
+ type: string
+ metadata:
+ type: object
+ spec:
+ description: spec is the specification of the desired behavior of the Config Operator.
+ type: object
+ properties:
+ logLevel:
+ description: "logLevel is an intent based logging for an overall component. It does not give fine grained control, but it is a simple way to manage coarse grained logging choices that operators have to interpret for their operands. \n Valid values are: \"Normal\", \"Debug\", \"Trace\", \"TraceAll\". Defaults to \"Normal\"."
+ type: string
+ default: Normal
+ enum:
+ - ""
+ - Normal
+ - Debug
+ - Trace
+ - TraceAll
+ managementState:
+ description: managementState indicates whether and how the operator should manage the component
+ type: string
+ pattern: ^(Managed|Unmanaged|Force|Removed)$
+ observedConfig:
+ description: observedConfig holds a sparse config that controller has observed from the cluster state. It exists in spec because it is an input to the level for the operator
+ type: object
+ nullable: true
+ x-kubernetes-preserve-unknown-fields: true
+ operatorLogLevel:
+ description: "operatorLogLevel is an intent based logging for the operator itself. It does not give fine grained control, but it is a simple way to manage coarse grained logging choices that operators have to interpret for themselves. \n Valid values are: \"Normal\", \"Debug\", \"Trace\", \"TraceAll\". Defaults to \"Normal\"."
+ type: string
+ default: Normal
+ enum:
+ - ""
+ - Normal
+ - Debug
+ - Trace
+ - TraceAll
+ unsupportedConfigOverrides:
+ description: 'unsupportedConfigOverrides holds a sparse config that will override any previously set options. It only needs to be the fields to override it will end up overlaying in the following order: 1. hardcoded defaults 2. observedConfig 3. unsupportedConfigOverrides'
+ type: object
+ nullable: true
+ x-kubernetes-preserve-unknown-fields: true
+ status:
+ description: status defines the observed status of the Config Operator.
+ type: object
+ properties:
+ conditions:
+ description: conditions is a list of conditions and their status
+ type: array
+ items:
+ description: OperatorCondition is just the standard condition fields.
+ type: object
+ properties:
+ lastTransitionTime:
+ type: string
+ format: date-time
+ message:
+ type: string
+ reason:
+ type: string
+ status:
+ type: string
+ type:
+ type: string
+ generations:
+ description: generations are used to determine when an item needs to be reconciled or has changed in a way that needs a reaction.
+ type: array
+ items:
+ description: GenerationStatus keeps track of the generation for a given resource so that decisions about forced updates can be made.
+ type: object
+ properties:
+ group:
+ description: group is the group of the thing you're tracking
+ type: string
+ hash:
+ description: hash is an optional field set for resources without generation that are content sensitive like secrets and configmaps
+ type: string
+ lastGeneration:
+ description: lastGeneration is the last generation of the workload controller involved
+ type: integer
+ format: int64
+ name:
+ description: name is the name of the thing you're tracking
+ type: string
+ namespace:
+ description: namespace is where the thing you're tracking is
+ type: string
+ resource:
+ description: resource is the resource type of the thing you're tracking
+ type: string
+ observedGeneration:
+ description: observedGeneration is the last generation change you've dealt with
+ type: integer
+ format: int64
+ readyReplicas:
+ description: readyReplicas indicates how many replicas are ready and at the desired state
+ type: integer
+ format: int32
+ version:
+ description: version is the level this availability applies to
+ type: string
+ served: true
+ storage: true
+ subresources:
+ status: {}
diff --git a/vendor/github.com/openshift/api/operator/v1/0000_12_etcd-operator_01_config.crd.yaml b/vendor/github.com/openshift/api/operator/v1/0000_12_etcd-operator_01_config.crd.yaml
new file mode 100644
index 00000000000..10f7e216878
--- /dev/null
+++ b/vendor/github.com/openshift/api/operator/v1/0000_12_etcd-operator_01_config.crd.yaml
@@ -0,0 +1,186 @@
+apiVersion: apiextensions.k8s.io/v1
+kind: CustomResourceDefinition
+metadata:
+ annotations:
+ api-approved.openshift.io: https://github.com/openshift/api/pull/752
+ include.release.openshift.io/ibm-cloud-managed: "true"
+ include.release.openshift.io/self-managed-high-availability: "true"
+ include.release.openshift.io/single-node-developer: "true"
+ name: etcds.operator.openshift.io
+spec:
+ group: operator.openshift.io
+ names:
+ categories:
+ - coreoperators
+ kind: Etcd
+ plural: etcds
+ singular: etcd
+ scope: Cluster
+ versions:
+ - name: v1
+ schema:
+ openAPIV3Schema:
+ description: Etcd provides information to configure an operator to manage etcd.
+ type: object
+ required:
+ - spec
+ properties:
+ apiVersion:
+ description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
+ type: string
+ kind:
+ description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
+ type: string
+ metadata:
+ type: object
+ spec:
+ type: object
+ properties:
+ failedRevisionLimit:
+ description: failedRevisionLimit is the number of failed static pod installer revisions to keep on disk and in the api -1 = unlimited, 0 or unset = 5 (default)
+ type: integer
+ format: int32
+ forceRedeploymentReason:
+ description: forceRedeploymentReason can be used to force the redeployment of the operand by providing a unique string. This provides a mechanism to kick a previously failed deployment and provide a reason why you think it will work this time instead of failing again on the same config.
+ type: string
+ logLevel:
+ description: "logLevel is an intent based logging for an overall component. It does not give fine grained control, but it is a simple way to manage coarse grained logging choices that operators have to interpret for their operands. \n Valid values are: \"Normal\", \"Debug\", \"Trace\", \"TraceAll\". Defaults to \"Normal\"."
+ type: string
+ default: Normal
+ enum:
+ - ""
+ - Normal
+ - Debug
+ - Trace
+ - TraceAll
+ managementState:
+ description: managementState indicates whether and how the operator should manage the component
+ type: string
+ pattern: ^(Managed|Unmanaged|Force|Removed)$
+ observedConfig:
+ description: observedConfig holds a sparse config that controller has observed from the cluster state. It exists in spec because it is an input to the level for the operator
+ type: object
+ nullable: true
+ x-kubernetes-preserve-unknown-fields: true
+ operatorLogLevel:
+ description: "operatorLogLevel is an intent based logging for the operator itself. It does not give fine grained control, but it is a simple way to manage coarse grained logging choices that operators have to interpret for themselves. \n Valid values are: \"Normal\", \"Debug\", \"Trace\", \"TraceAll\". Defaults to \"Normal\"."
+ type: string
+ default: Normal
+ enum:
+ - ""
+ - Normal
+ - Debug
+ - Trace
+ - TraceAll
+ succeededRevisionLimit:
+ description: succeededRevisionLimit is the number of successful static pod installer revisions to keep on disk and in the api -1 = unlimited, 0 or unset = 5 (default)
+ type: integer
+ format: int32
+ unsupportedConfigOverrides:
+ description: 'unsupportedConfigOverrides holds a sparse config that will override any previously set options. It only needs to be the fields to override it will end up overlaying in the following order: 1. hardcoded defaults 2. observedConfig 3. unsupportedConfigOverrides'
+ type: object
+ nullable: true
+ x-kubernetes-preserve-unknown-fields: true
+ status:
+ type: object
+ properties:
+ conditions:
+ description: conditions is a list of conditions and their status
+ type: array
+ items:
+ description: OperatorCondition is just the standard condition fields.
+ type: object
+ properties:
+ lastTransitionTime:
+ type: string
+ format: date-time
+ message:
+ type: string
+ reason:
+ type: string
+ status:
+ type: string
+ type:
+ type: string
+ generations:
+ description: generations are used to determine when an item needs to be reconciled or has changed in a way that needs a reaction.
+ type: array
+ items:
+ description: GenerationStatus keeps track of the generation for a given resource so that decisions about forced updates can be made.
+ type: object
+ properties:
+ group:
+ description: group is the group of the thing you're tracking
+ type: string
+ hash:
+ description: hash is an optional field set for resources without generation that are content sensitive like secrets and configmaps
+ type: string
+ lastGeneration:
+ description: lastGeneration is the last generation of the workload controller involved
+ type: integer
+ format: int64
+ name:
+ description: name is the name of the thing you're tracking
+ type: string
+ namespace:
+ description: namespace is where the thing you're tracking is
+ type: string
+ resource:
+ description: resource is the resource type of the thing you're tracking
+ type: string
+ latestAvailableRevision:
+ description: latestAvailableRevision is the deploymentID of the most recent deployment
+ type: integer
+ format: int32
+ latestAvailableRevisionReason:
+ description: latestAvailableRevisionReason describe the detailed reason for the most recent deployment
+ type: string
+ nodeStatuses:
+ description: nodeStatuses track the deployment values and errors across individual nodes
+ type: array
+ items:
+ description: NodeStatus provides information about the current state of a particular node managed by this operator.
+ type: object
+ properties:
+ currentRevision:
+ description: currentRevision is the generation of the most recently successful deployment
+ type: integer
+ format: int32
+ lastFailedCount:
+ description: lastFailedCount is how often the last failed revision failed.
+ type: integer
+ lastFailedRevision:
+ description: lastFailedRevision is the generation of the deployment we tried and failed to deploy.
+ type: integer
+ format: int32
+ lastFailedRevisionErrors:
+ description: lastFailedRevisionErrors is a list of the errors during the failed deployment referenced in lastFailedRevision
+ type: array
+ items:
+ type: string
+ lastFailedTime:
+ description: lastFailedTime is the time the last failed revision failed the last time.
+ type: string
+ format: date-time
+ nodeName:
+ description: nodeName is the name of the node
+ type: string
+ targetRevision:
+ description: targetRevision is the generation of the deployment we're trying to apply
+ type: integer
+ format: int32
+ observedGeneration:
+ description: observedGeneration is the last generation change you've dealt with
+ type: integer
+ format: int64
+ readyReplicas:
+ description: readyReplicas indicates how many replicas are ready and at the desired state
+ type: integer
+ format: int32
+ version:
+ description: version is the level this availability applies to
+ type: string
+ served: true
+ storage: true
+ subresources:
+ status: {}
diff --git a/vendor/github.com/openshift/api/operator/v1/0000_20_kube-apiserver-operator_01_config.crd.yaml b/vendor/github.com/openshift/api/operator/v1/0000_20_kube-apiserver-operator_01_config.crd.yaml
index aaf3c7d4208..63ba8cdded3 100644
--- a/vendor/github.com/openshift/api/operator/v1/0000_20_kube-apiserver-operator_01_config.crd.yaml
+++ b/vendor/github.com/openshift/api/operator/v1/0000_20_kube-apiserver-operator_01_config.crd.yaml
@@ -1,6 +1,11 @@
-apiVersion: apiextensions.k8s.io/v1beta1
+apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
+ annotations:
+ api-approved.openshift.io: https://github.com/openshift/api/pull/475
+ include.release.openshift.io/ibm-cloud-managed: "true"
+ include.release.openshift.io/self-managed-high-availability: "true"
+ include.release.openshift.io/single-node-developer: "true"
name: kubeapiservers.operator.openshift.io
spec:
group: operator.openshift.io
@@ -8,189 +13,221 @@ spec:
kind: KubeAPIServer
plural: kubeapiservers
singular: kubeapiserver
- preserveUnknownFields: false
scope: Cluster
- subresources:
- status: {}
- validation:
- openAPIV3Schema:
- description: KubeAPIServer provides information to configure an operator to
- manage kube-apiserver.
- properties:
- apiVersion:
- description: 'APIVersion defines the versioned schema of this representation
- of an object. Servers should convert recognized schemas to the latest
- internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
- type: string
- kind:
- description: 'Kind is a string value representing the REST resource this
- object represents. Servers may infer this from the endpoint the client
- submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
- type: string
- metadata:
- type: object
- spec:
- properties:
- failedRevisionLimit:
- description: failedRevisionLimit is the number of failed static pod
- installer revisions to keep on disk and in the api -1 = unlimited,
- 0 or unset = 5 (default)
- format: int32
- type: integer
- forceRedeploymentReason:
- description: forceRedeploymentReason can be used to force the redeployment
- of the operand by providing a unique string. This provides a mechanism
- to kick a previously failed deployment and provide a reason why you
- think it will work this time instead of failing again on the same
- config.
- type: string
- logLevel:
- description: logLevel is an intent based logging for an overall component. It
- does not give fine grained control, but it is a simple way to manage
- coarse grained logging choices that operators have to interpret for
- their operands.
- type: string
- managementState:
- description: managementState indicates whether and how the operator
- should manage the component
- pattern: ^(Managed|Force)$
- type: string
- observedConfig:
- description: observedConfig holds a sparse config that controller has
- observed from the cluster state. It exists in spec because it is
- an input to the level for the operator
- nullable: true
- type: object
- x-kubernetes-preserve-unknown-fields: true
- operatorLogLevel:
- description: operatorLogLevel is an intent based logging for the operator
- itself. It does not give fine grained control, but it is a simple
- way to manage coarse grained logging choices that operators have to
- interpret for themselves.
- type: string
- succeededRevisionLimit:
- description: succeededRevisionLimit is the number of successful static
- pod installer revisions to keep on disk and in the api -1 = unlimited,
- 0 or unset = 5 (default)
- format: int32
- type: integer
- unsupportedConfigOverrides:
- description: 'unsupportedConfigOverrides holds a sparse config that
- will override any previously set options. It only needs to be the
- fields to override it will end up overlaying in the following order:
- 1. hardcoded defaults 2. observedConfig 3. unsupportedConfigOverrides'
- nullable: true
- type: object
- x-kubernetes-preserve-unknown-fields: true
- type: object
- status:
- properties:
- conditions:
- description: conditions is a list of conditions and their status
- items:
- description: OperatorCondition is just the standard condition fields.
- properties:
- lastTransitionTime:
- format: date-time
- type: string
- message:
- type: string
- reason:
- type: string
- status:
- type: string
- type:
- type: string
+ versions:
+ - name: v1
+ schema:
+ openAPIV3Schema:
+ description: KubeAPIServer provides information to configure an operator to
+ manage kube-apiserver.
+ properties:
+ apiVersion:
+ description: 'APIVersion defines the versioned schema of this representation
+ of an object. Servers should convert recognized schemas to the latest
+ internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
+ type: string
+ kind:
+ description: 'Kind is a string value representing the REST resource this
+ object represents. Servers may infer this from the endpoint the client
+ submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
+ type: string
+ metadata:
+ type: object
+ spec:
+ description: spec is the specification of the desired behavior of the
+ Kubernetes API Server
+ properties:
+ failedRevisionLimit:
+ description: failedRevisionLimit is the number of failed static pod
+ installer revisions to keep on disk and in the api -1 = unlimited,
+ 0 or unset = 5 (default)
+ format: int32
+ type: integer
+ forceRedeploymentReason:
+ description: forceRedeploymentReason can be used to force the redeployment
+ of the operand by providing a unique string. This provides a mechanism
+ to kick a previously failed deployment and provide a reason why
+ you think it will work this time instead of failing again on the
+ same config.
+ type: string
+ logLevel:
+ default: Normal
+ description: "logLevel is an intent based logging for an overall component.
+ \ It does not give fine grained control, but it is a simple way
+ to manage coarse grained logging choices that operators have to
+ interpret for their operands. \n Valid values are: \"Normal\", \"Debug\",
+ \"Trace\", \"TraceAll\". Defaults to \"Normal\"."
+ enum:
+ - ""
+ - Normal
+ - Debug
+ - Trace
+ - TraceAll
+ type: string
+ managementState:
+ description: managementState indicates whether and how the operator
+ should manage the component
+ pattern: ^(Managed|Force)$
+ type: string
+ observedConfig:
+ description: observedConfig holds a sparse config that controller
+ has observed from the cluster state. It exists in spec because
+ it is an input to the level for the operator
+ nullable: true
type: object
- type: array
- generations:
- description: generations are used to determine when an item needs to
- be reconciled or has changed in a way that needs a reaction.
- items:
- description: GenerationStatus keeps track of the generation for a
- given resource so that decisions about forced updates can be made.
- properties:
- group:
- description: group is the group of the thing you're tracking
- type: string
- hash:
- description: hash is an optional field set for resources without
- generation that are content sensitive like secrets and configmaps
- type: string
- lastGeneration:
- description: lastGeneration is the last generation of the workload
- controller involved
- format: int64
- type: integer
- name:
- description: name is the name of the thing you're tracking
- type: string
- namespace:
- description: namespace is where the thing you're tracking is
- type: string
- resource:
- description: resource is the resource type of the thing you're
- tracking
- type: string
+ x-kubernetes-preserve-unknown-fields: true
+ operatorLogLevel:
+ default: Normal
+ description: "operatorLogLevel is an intent based logging for the
+ operator itself. It does not give fine grained control, but it
+ is a simple way to manage coarse grained logging choices that operators
+ have to interpret for themselves. \n Valid values are: \"Normal\",
+ \"Debug\", \"Trace\", \"TraceAll\". Defaults to \"Normal\"."
+ enum:
+ - ""
+ - Normal
+ - Debug
+ - Trace
+ - TraceAll
+ type: string
+ succeededRevisionLimit:
+ description: succeededRevisionLimit is the number of successful static
+ pod installer revisions to keep on disk and in the api -1 = unlimited,
+ 0 or unset = 5 (default)
+ format: int32
+ type: integer
+ unsupportedConfigOverrides:
+ description: 'unsupportedConfigOverrides holds a sparse config that
+ will override any previously set options. It only needs to be the
+ fields to override it will end up overlaying in the following order:
+ 1. hardcoded defaults 2. observedConfig 3. unsupportedConfigOverrides'
+ nullable: true
type: object
- type: array
- latestAvailableRevision:
- description: latestAvailableRevision is the deploymentID of the most
- recent deployment
- format: int32
- type: integer
- latestAvailableRevisionReason:
- description: latestAvailableRevisionReason describe the detailed reason
- for the most recent deployment
- type: string
- nodeStatuses:
- description: nodeStatuses track the deployment values and errors across
- individual nodes
- items:
- description: NodeStatus provides information about the current state
- of a particular node managed by this operator.
- properties:
- currentRevision:
- description: currentRevision is the generation of the most recently
- successful deployment
- format: int32
- type: integer
- lastFailedRevision:
- description: lastFailedRevision is the generation of the deployment
- we tried and failed to deploy.
- format: int32
- type: integer
- lastFailedRevisionErrors:
- description: lastFailedRevisionErrors is a list of the errors
- during the failed deployment referenced in lastFailedRevision
- items:
+ x-kubernetes-preserve-unknown-fields: true
+ type: object
+ status:
+ description: status is the most recently observed status of the Kubernetes
+ API Server
+ properties:
+ conditions:
+ description: conditions is a list of conditions and their status
+ items:
+ description: OperatorCondition is just the standard condition fields.
+ properties:
+ lastTransitionTime:
+ format: date-time
type: string
- type: array
- nodeName:
- description: nodeName is the name of the node
- type: string
- targetRevision:
- description: targetRevision is the generation of the deployment
- we're trying to apply
- format: int32
- type: integer
- type: object
- type: array
- observedGeneration:
- description: observedGeneration is the last generation change you've
- dealt with
- format: int64
- type: integer
- readyReplicas:
- description: readyReplicas indicates how many replicas are ready and
- at the desired state
- format: int32
- type: integer
- version:
- description: version is the level this availability applies to
- type: string
- type: object
- required:
- - spec
- type: object
- version: v1
+ message:
+ type: string
+ reason:
+ type: string
+ status:
+ type: string
+ type:
+ type: string
+ type: object
+ type: array
+ generations:
+ description: generations are used to determine when an item needs
+ to be reconciled or has changed in a way that needs a reaction.
+ items:
+ description: GenerationStatus keeps track of the generation for
+ a given resource so that decisions about forced updates can be
+ made.
+ properties:
+ group:
+ description: group is the group of the thing you're tracking
+ type: string
+ hash:
+ description: hash is an optional field set for resources without
+ generation that are content sensitive like secrets and configmaps
+ type: string
+ lastGeneration:
+ description: lastGeneration is the last generation of the workload
+ controller involved
+ format: int64
+ type: integer
+ name:
+ description: name is the name of the thing you're tracking
+ type: string
+ namespace:
+ description: namespace is where the thing you're tracking is
+ type: string
+ resource:
+ description: resource is the resource type of the thing you're
+ tracking
+ type: string
+ type: object
+ type: array
+ latestAvailableRevision:
+ description: latestAvailableRevision is the deploymentID of the most
+ recent deployment
+ format: int32
+ type: integer
+ latestAvailableRevisionReason:
+ description: latestAvailableRevisionReason describe the detailed reason
+ for the most recent deployment
+ type: string
+ nodeStatuses:
+ description: nodeStatuses track the deployment values and errors across
+ individual nodes
+ items:
+ description: NodeStatus provides information about the current state
+ of a particular node managed by this operator.
+ properties:
+ currentRevision:
+ description: currentRevision is the generation of the most recently
+ successful deployment
+ format: int32
+ type: integer
+ lastFailedCount:
+ description: lastFailedCount is how often the last failed revision
+ failed.
+ type: integer
+ lastFailedRevision:
+ description: lastFailedRevision is the generation of the deployment
+ we tried and failed to deploy.
+ format: int32
+ type: integer
+ lastFailedRevisionErrors:
+ description: lastFailedRevisionErrors is a list of the errors
+ during the failed deployment referenced in lastFailedRevision
+ items:
+ type: string
+ type: array
+ lastFailedTime:
+ description: lastFailedTime is the time the last failed revision
+ failed the last time.
+ format: date-time
+ type: string
+ nodeName:
+ description: nodeName is the name of the node
+ type: string
+ targetRevision:
+ description: targetRevision is the generation of the deployment
+ we're trying to apply
+ format: int32
+ type: integer
+ type: object
+ type: array
+ observedGeneration:
+ description: observedGeneration is the last generation change you've
+ dealt with
+ format: int64
+ type: integer
+ readyReplicas:
+ description: readyReplicas indicates how many replicas are ready and
+ at the desired state
+ format: int32
+ type: integer
+ version:
+ description: version is the level this availability applies to
+ type: string
+ type: object
+ required:
+ - spec
+ type: object
+ served: true
+ storage: true
+ subresources:
+ status: {}
diff --git a/vendor/github.com/openshift/api/operator/v1/0000_20_kube-apiserver-operator_01_config.crd.yaml-merge-patch b/vendor/github.com/openshift/api/operator/v1/0000_20_kube-apiserver-operator_01_config.crd.yaml-merge-patch
deleted file mode 100644
index be6a3cc2e7f..00000000000
--- a/vendor/github.com/openshift/api/operator/v1/0000_20_kube-apiserver-operator_01_config.crd.yaml-merge-patch
+++ /dev/null
@@ -1,8 +0,0 @@
-spec:
- validation:
- openAPIV3Schema:
- properties:
- spec:
- properties:
- managementState:
- pattern: "^(Managed|Force)$"
\ No newline at end of file
diff --git a/vendor/github.com/openshift/api/operator/v1/0000_20_kube-apiserver-operator_01_config.crd.yaml-patch b/vendor/github.com/openshift/api/operator/v1/0000_20_kube-apiserver-operator_01_config.crd.yaml-patch
new file mode 100644
index 00000000000..8145f00c49b
--- /dev/null
+++ b/vendor/github.com/openshift/api/operator/v1/0000_20_kube-apiserver-operator_01_config.crd.yaml-patch
@@ -0,0 +1,3 @@
+- op: replace
+ path: /spec/versions/name=v1/schema/openAPIV3Schema/properties/spec/properties/managementState/pattern
+ value: "^(Managed|Force)$"
diff --git a/vendor/github.com/openshift/api/operator/v1/0000_25_kube-controller-manager-operator_01_config.crd.yaml b/vendor/github.com/openshift/api/operator/v1/0000_25_kube-controller-manager-operator_01_config.crd.yaml
index aa3e21e8a27..94b2820bf8a 100644
--- a/vendor/github.com/openshift/api/operator/v1/0000_25_kube-controller-manager-operator_01_config.crd.yaml
+++ b/vendor/github.com/openshift/api/operator/v1/0000_25_kube-controller-manager-operator_01_config.crd.yaml
@@ -1,6 +1,11 @@
-apiVersion: apiextensions.k8s.io/v1beta1
+apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
+ annotations:
+ api-approved.openshift.io: https://github.com/openshift/api/pull/475
+ include.release.openshift.io/ibm-cloud-managed: "true"
+ include.release.openshift.io/self-managed-high-availability: "true"
+ include.release.openshift.io/single-node-developer: "true"
name: kubecontrollermanagers.operator.openshift.io
spec:
group: operator.openshift.io
@@ -10,189 +15,221 @@ spec:
kind: KubeControllerManager
plural: kubecontrollermanagers
singular: kubecontrollermanager
- preserveUnknownFields: false
scope: Cluster
- subresources:
- status: {}
- validation:
- openAPIV3Schema:
- description: KubeControllerManager provides information to configure an operator
- to manage kube-controller-manager.
- properties:
- apiVersion:
- description: 'APIVersion defines the versioned schema of this representation
- of an object. Servers should convert recognized schemas to the latest
- internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
- type: string
- kind:
- description: 'Kind is a string value representing the REST resource this
- object represents. Servers may infer this from the endpoint the client
- submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
- type: string
- metadata:
- type: object
- spec:
- properties:
- failedRevisionLimit:
- description: failedRevisionLimit is the number of failed static pod
- installer revisions to keep on disk and in the api -1 = unlimited,
- 0 or unset = 5 (default)
- format: int32
- type: integer
- forceRedeploymentReason:
- description: forceRedeploymentReason can be used to force the redeployment
- of the operand by providing a unique string. This provides a mechanism
- to kick a previously failed deployment and provide a reason why you
- think it will work this time instead of failing again on the same
- config.
- type: string
- logLevel:
- description: logLevel is an intent based logging for an overall component. It
- does not give fine grained control, but it is a simple way to manage
- coarse grained logging choices that operators have to interpret for
- their operands.
- type: string
- managementState:
- description: managementState indicates whether and how the operator
- should manage the component
- pattern: ^(Managed|Force)$
- type: string
- observedConfig:
- description: observedConfig holds a sparse config that controller has
- observed from the cluster state. It exists in spec because it is
- an input to the level for the operator
- nullable: true
- type: object
- x-kubernetes-preserve-unknown-fields: true
- operatorLogLevel:
- description: operatorLogLevel is an intent based logging for the operator
- itself. It does not give fine grained control, but it is a simple
- way to manage coarse grained logging choices that operators have to
- interpret for themselves.
- type: string
- succeededRevisionLimit:
- description: succeededRevisionLimit is the number of successful static
- pod installer revisions to keep on disk and in the api -1 = unlimited,
- 0 or unset = 5 (default)
- format: int32
- type: integer
- unsupportedConfigOverrides:
- description: 'unsupportedConfigOverrides holds a sparse config that
- will override any previously set options. It only needs to be the
- fields to override it will end up overlaying in the following order:
- 1. hardcoded defaults 2. observedConfig 3. unsupportedConfigOverrides'
- nullable: true
- type: object
- x-kubernetes-preserve-unknown-fields: true
- type: object
- status:
- properties:
- conditions:
- description: conditions is a list of conditions and their status
- items:
- description: OperatorCondition is just the standard condition fields.
- properties:
- lastTransitionTime:
- format: date-time
- type: string
- message:
- type: string
- reason:
- type: string
- status:
- type: string
- type:
- type: string
+ versions:
+ - name: v1
+ schema:
+ openAPIV3Schema:
+ description: KubeControllerManager provides information to configure an operator
+ to manage kube-controller-manager.
+ properties:
+ apiVersion:
+ description: 'APIVersion defines the versioned schema of this representation
+ of an object. Servers should convert recognized schemas to the latest
+ internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
+ type: string
+ kind:
+ description: 'Kind is a string value representing the REST resource this
+ object represents. Servers may infer this from the endpoint the client
+ submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
+ type: string
+ metadata:
+ type: object
+ spec:
+ description: spec is the specification of the desired behavior of the
+ Kubernetes Controller Manager
+ properties:
+ failedRevisionLimit:
+ description: failedRevisionLimit is the number of failed static pod
+ installer revisions to keep on disk and in the api -1 = unlimited,
+ 0 or unset = 5 (default)
+ format: int32
+ type: integer
+ forceRedeploymentReason:
+ description: forceRedeploymentReason can be used to force the redeployment
+ of the operand by providing a unique string. This provides a mechanism
+ to kick a previously failed deployment and provide a reason why
+ you think it will work this time instead of failing again on the
+ same config.
+ type: string
+ logLevel:
+ default: Normal
+ description: "logLevel is an intent based logging for an overall component.
+ \ It does not give fine grained control, but it is a simple way
+ to manage coarse grained logging choices that operators have to
+ interpret for their operands. \n Valid values are: \"Normal\", \"Debug\",
+ \"Trace\", \"TraceAll\". Defaults to \"Normal\"."
+ enum:
+ - ""
+ - Normal
+ - Debug
+ - Trace
+ - TraceAll
+ type: string
+ managementState:
+ description: managementState indicates whether and how the operator
+ should manage the component
+ pattern: ^(Managed|Force)$
+ type: string
+ observedConfig:
+ description: observedConfig holds a sparse config that controller
+ has observed from the cluster state. It exists in spec because
+ it is an input to the level for the operator
+ nullable: true
type: object
- type: array
- generations:
- description: generations are used to determine when an item needs to
- be reconciled or has changed in a way that needs a reaction.
- items:
- description: GenerationStatus keeps track of the generation for a
- given resource so that decisions about forced updates can be made.
- properties:
- group:
- description: group is the group of the thing you're tracking
- type: string
- hash:
- description: hash is an optional field set for resources without
- generation that are content sensitive like secrets and configmaps
- type: string
- lastGeneration:
- description: lastGeneration is the last generation of the workload
- controller involved
- format: int64
- type: integer
- name:
- description: name is the name of the thing you're tracking
- type: string
- namespace:
- description: namespace is where the thing you're tracking is
- type: string
- resource:
- description: resource is the resource type of the thing you're
- tracking
- type: string
+ x-kubernetes-preserve-unknown-fields: true
+ operatorLogLevel:
+ default: Normal
+ description: "operatorLogLevel is an intent based logging for the
+ operator itself. It does not give fine grained control, but it
+ is a simple way to manage coarse grained logging choices that operators
+ have to interpret for themselves. \n Valid values are: \"Normal\",
+ \"Debug\", \"Trace\", \"TraceAll\". Defaults to \"Normal\"."
+ enum:
+ - ""
+ - Normal
+ - Debug
+ - Trace
+ - TraceAll
+ type: string
+ succeededRevisionLimit:
+ description: succeededRevisionLimit is the number of successful static
+ pod installer revisions to keep on disk and in the api -1 = unlimited,
+ 0 or unset = 5 (default)
+ format: int32
+ type: integer
+ unsupportedConfigOverrides:
+ description: 'unsupportedConfigOverrides holds a sparse config that
+ will override any previously set options. It only needs to be the
+ fields to override it will end up overlaying in the following order:
+ 1. hardcoded defaults 2. observedConfig 3. unsupportedConfigOverrides'
+ nullable: true
type: object
- type: array
- latestAvailableRevision:
- description: latestAvailableRevision is the deploymentID of the most
- recent deployment
- format: int32
- type: integer
- latestAvailableRevisionReason:
- description: latestAvailableRevisionReason describe the detailed reason
- for the most recent deployment
- type: string
- nodeStatuses:
- description: nodeStatuses track the deployment values and errors across
- individual nodes
- items:
- description: NodeStatus provides information about the current state
- of a particular node managed by this operator.
- properties:
- currentRevision:
- description: currentRevision is the generation of the most recently
- successful deployment
- format: int32
- type: integer
- lastFailedRevision:
- description: lastFailedRevision is the generation of the deployment
- we tried and failed to deploy.
- format: int32
- type: integer
- lastFailedRevisionErrors:
- description: lastFailedRevisionErrors is a list of the errors
- during the failed deployment referenced in lastFailedRevision
- items:
+ x-kubernetes-preserve-unknown-fields: true
+ type: object
+ status:
+ description: status is the most recently observed status of the Kubernetes
+ Controller Manager
+ properties:
+ conditions:
+ description: conditions is a list of conditions and their status
+ items:
+ description: OperatorCondition is just the standard condition fields.
+ properties:
+ lastTransitionTime:
+ format: date-time
type: string
- type: array
- nodeName:
- description: nodeName is the name of the node
- type: string
- targetRevision:
- description: targetRevision is the generation of the deployment
- we're trying to apply
- format: int32
- type: integer
- type: object
- type: array
- observedGeneration:
- description: observedGeneration is the last generation change you've
- dealt with
- format: int64
- type: integer
- readyReplicas:
- description: readyReplicas indicates how many replicas are ready and
- at the desired state
- format: int32
- type: integer
- version:
- description: version is the level this availability applies to
- type: string
- type: object
- required:
- - spec
- type: object
- version: v1
+ message:
+ type: string
+ reason:
+ type: string
+ status:
+ type: string
+ type:
+ type: string
+ type: object
+ type: array
+ generations:
+ description: generations are used to determine when an item needs
+ to be reconciled or has changed in a way that needs a reaction.
+ items:
+ description: GenerationStatus keeps track of the generation for
+ a given resource so that decisions about forced updates can be
+ made.
+ properties:
+ group:
+ description: group is the group of the thing you're tracking
+ type: string
+ hash:
+ description: hash is an optional field set for resources without
+ generation that are content sensitive like secrets and configmaps
+ type: string
+ lastGeneration:
+ description: lastGeneration is the last generation of the workload
+ controller involved
+ format: int64
+ type: integer
+ name:
+ description: name is the name of the thing you're tracking
+ type: string
+ namespace:
+ description: namespace is where the thing you're tracking is
+ type: string
+ resource:
+ description: resource is the resource type of the thing you're
+ tracking
+ type: string
+ type: object
+ type: array
+ latestAvailableRevision:
+ description: latestAvailableRevision is the deploymentID of the most
+ recent deployment
+ format: int32
+ type: integer
+ latestAvailableRevisionReason:
+ description: latestAvailableRevisionReason describe the detailed reason
+ for the most recent deployment
+ type: string
+ nodeStatuses:
+ description: nodeStatuses track the deployment values and errors across
+ individual nodes
+ items:
+ description: NodeStatus provides information about the current state
+ of a particular node managed by this operator.
+ properties:
+ currentRevision:
+ description: currentRevision is the generation of the most recently
+ successful deployment
+ format: int32
+ type: integer
+ lastFailedCount:
+ description: lastFailedCount is how often the last failed revision
+ failed.
+ type: integer
+ lastFailedRevision:
+ description: lastFailedRevision is the generation of the deployment
+ we tried and failed to deploy.
+ format: int32
+ type: integer
+ lastFailedRevisionErrors:
+ description: lastFailedRevisionErrors is a list of the errors
+ during the failed deployment referenced in lastFailedRevision
+ items:
+ type: string
+ type: array
+ lastFailedTime:
+ description: lastFailedTime is the time the last failed revision
+ failed the last time.
+ format: date-time
+ type: string
+ nodeName:
+ description: nodeName is the name of the node
+ type: string
+ targetRevision:
+ description: targetRevision is the generation of the deployment
+ we're trying to apply
+ format: int32
+ type: integer
+ type: object
+ type: array
+ observedGeneration:
+ description: observedGeneration is the last generation change you've
+ dealt with
+ format: int64
+ type: integer
+ readyReplicas:
+ description: readyReplicas indicates how many replicas are ready and
+ at the desired state
+ format: int32
+ type: integer
+ version:
+ description: version is the level this availability applies to
+ type: string
+ type: object
+ required:
+ - spec
+ type: object
+ served: true
+ storage: true
+ subresources:
+ status: {}
diff --git a/vendor/github.com/openshift/api/operator/v1/0000_25_kube-controller-manager-operator_01_config.crd.yaml-merge-patch b/vendor/github.com/openshift/api/operator/v1/0000_25_kube-controller-manager-operator_01_config.crd.yaml-merge-patch
deleted file mode 100644
index 5cc312a439f..00000000000
--- a/vendor/github.com/openshift/api/operator/v1/0000_25_kube-controller-manager-operator_01_config.crd.yaml-merge-patch
+++ /dev/null
@@ -1,10 +0,0 @@
-# this file can be removed once we switch to v0.2 of crd generator
-# see: https://github.com/openshift/cluster-kube-scheduler-operator/pull/148
-spec:
- validation:
- openAPIV3Schema:
- properties:
- spec:
- properties:
- managementState:
- pattern: "^(Managed|Force)$"
diff --git a/vendor/github.com/openshift/api/operator/v1/0000_25_kube-controller-manager-operator_01_config.crd.yaml-patch b/vendor/github.com/openshift/api/operator/v1/0000_25_kube-controller-manager-operator_01_config.crd.yaml-patch
new file mode 100644
index 00000000000..8145f00c49b
--- /dev/null
+++ b/vendor/github.com/openshift/api/operator/v1/0000_25_kube-controller-manager-operator_01_config.crd.yaml-patch
@@ -0,0 +1,3 @@
+- op: replace
+ path: /spec/versions/name=v1/schema/openAPIV3Schema/properties/spec/properties/managementState/pattern
+ value: "^(Managed|Force)$"
diff --git a/vendor/github.com/openshift/api/operator/v1/0000_25_kube-scheduler-operator_01_config.crd.yaml b/vendor/github.com/openshift/api/operator/v1/0000_25_kube-scheduler-operator_01_config.crd.yaml
index 4d18f044fd2..ea2329342b6 100644
--- a/vendor/github.com/openshift/api/operator/v1/0000_25_kube-scheduler-operator_01_config.crd.yaml
+++ b/vendor/github.com/openshift/api/operator/v1/0000_25_kube-scheduler-operator_01_config.crd.yaml
@@ -1,6 +1,11 @@
-apiVersion: apiextensions.k8s.io/v1beta1
+apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
+ annotations:
+ api-approved.openshift.io: https://github.com/openshift/api/pull/475
+ include.release.openshift.io/ibm-cloud-managed: "true"
+ include.release.openshift.io/self-managed-high-availability: "true"
+ include.release.openshift.io/single-node-developer: "true"
name: kubeschedulers.operator.openshift.io
spec:
group: operator.openshift.io
@@ -10,189 +15,221 @@ spec:
kind: KubeScheduler
plural: kubeschedulers
singular: kubescheduler
- preserveUnknownFields: false
scope: Cluster
- subresources:
- status: {}
- validation:
- openAPIV3Schema:
- description: KubeScheduler provides information to configure an operator to
- manage scheduler.
- properties:
- apiVersion:
- description: 'APIVersion defines the versioned schema of this representation
- of an object. Servers should convert recognized schemas to the latest
- internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
- type: string
- kind:
- description: 'Kind is a string value representing the REST resource this
- object represents. Servers may infer this from the endpoint the client
- submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
- type: string
- metadata:
- type: object
- spec:
- properties:
- failedRevisionLimit:
- description: failedRevisionLimit is the number of failed static pod
- installer revisions to keep on disk and in the api -1 = unlimited,
- 0 or unset = 5 (default)
- format: int32
- type: integer
- forceRedeploymentReason:
- description: forceRedeploymentReason can be used to force the redeployment
- of the operand by providing a unique string. This provides a mechanism
- to kick a previously failed deployment and provide a reason why you
- think it will work this time instead of failing again on the same
- config.
- type: string
- logLevel:
- description: logLevel is an intent based logging for an overall component. It
- does not give fine grained control, but it is a simple way to manage
- coarse grained logging choices that operators have to interpret for
- their operands.
- type: string
- managementState:
- description: managementState indicates whether and how the operator
- should manage the component
- pattern: ^(Managed|Force)$
- type: string
- observedConfig:
- description: observedConfig holds a sparse config that controller has
- observed from the cluster state. It exists in spec because it is
- an input to the level for the operator
- nullable: true
- type: object
- x-kubernetes-preserve-unknown-fields: true
- operatorLogLevel:
- description: operatorLogLevel is an intent based logging for the operator
- itself. It does not give fine grained control, but it is a simple
- way to manage coarse grained logging choices that operators have to
- interpret for themselves.
- type: string
- succeededRevisionLimit:
- description: succeededRevisionLimit is the number of successful static
- pod installer revisions to keep on disk and in the api -1 = unlimited,
- 0 or unset = 5 (default)
- format: int32
- type: integer
- unsupportedConfigOverrides:
- description: 'unsupportedConfigOverrides holds a sparse config that
- will override any previously set options. It only needs to be the
- fields to override it will end up overlaying in the following order:
- 1. hardcoded defaults 2. observedConfig 3. unsupportedConfigOverrides'
- nullable: true
- type: object
- x-kubernetes-preserve-unknown-fields: true
- type: object
- status:
- properties:
- conditions:
- description: conditions is a list of conditions and their status
- items:
- description: OperatorCondition is just the standard condition fields.
- properties:
- lastTransitionTime:
- format: date-time
- type: string
- message:
- type: string
- reason:
- type: string
- status:
- type: string
- type:
- type: string
+ versions:
+ - name: v1
+ schema:
+ openAPIV3Schema:
+ description: KubeScheduler provides information to configure an operator to
+ manage scheduler.
+ properties:
+ apiVersion:
+ description: 'APIVersion defines the versioned schema of this representation
+ of an object. Servers should convert recognized schemas to the latest
+ internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
+ type: string
+ kind:
+ description: 'Kind is a string value representing the REST resource this
+ object represents. Servers may infer this from the endpoint the client
+ submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
+ type: string
+ metadata:
+ type: object
+ spec:
+ description: spec is the specification of the desired behavior of the
+ Kubernetes Scheduler
+ properties:
+ failedRevisionLimit:
+ description: failedRevisionLimit is the number of failed static pod
+ installer revisions to keep on disk and in the api -1 = unlimited,
+ 0 or unset = 5 (default)
+ format: int32
+ type: integer
+ forceRedeploymentReason:
+ description: forceRedeploymentReason can be used to force the redeployment
+ of the operand by providing a unique string. This provides a mechanism
+ to kick a previously failed deployment and provide a reason why
+ you think it will work this time instead of failing again on the
+ same config.
+ type: string
+ logLevel:
+ default: Normal
+ description: "logLevel is an intent based logging for an overall component.
+ \ It does not give fine grained control, but it is a simple way
+ to manage coarse grained logging choices that operators have to
+ interpret for their operands. \n Valid values are: \"Normal\", \"Debug\",
+ \"Trace\", \"TraceAll\". Defaults to \"Normal\"."
+ enum:
+ - ""
+ - Normal
+ - Debug
+ - Trace
+ - TraceAll
+ type: string
+ managementState:
+ description: managementState indicates whether and how the operator
+ should manage the component
+ pattern: ^(Managed|Force)$
+ type: string
+ observedConfig:
+ description: observedConfig holds a sparse config that controller
+ has observed from the cluster state. It exists in spec because
+ it is an input to the level for the operator
+ nullable: true
type: object
- type: array
- generations:
- description: generations are used to determine when an item needs to
- be reconciled or has changed in a way that needs a reaction.
- items:
- description: GenerationStatus keeps track of the generation for a
- given resource so that decisions about forced updates can be made.
- properties:
- group:
- description: group is the group of the thing you're tracking
- type: string
- hash:
- description: hash is an optional field set for resources without
- generation that are content sensitive like secrets and configmaps
- type: string
- lastGeneration:
- description: lastGeneration is the last generation of the workload
- controller involved
- format: int64
- type: integer
- name:
- description: name is the name of the thing you're tracking
- type: string
- namespace:
- description: namespace is where the thing you're tracking is
- type: string
- resource:
- description: resource is the resource type of the thing you're
- tracking
- type: string
+ x-kubernetes-preserve-unknown-fields: true
+ operatorLogLevel:
+ default: Normal
+ description: "operatorLogLevel is an intent based logging for the
+ operator itself. It does not give fine grained control, but it
+ is a simple way to manage coarse grained logging choices that operators
+ have to interpret for themselves. \n Valid values are: \"Normal\",
+ \"Debug\", \"Trace\", \"TraceAll\". Defaults to \"Normal\"."
+ enum:
+ - ""
+ - Normal
+ - Debug
+ - Trace
+ - TraceAll
+ type: string
+ succeededRevisionLimit:
+ description: succeededRevisionLimit is the number of successful static
+ pod installer revisions to keep on disk and in the api -1 = unlimited,
+ 0 or unset = 5 (default)
+ format: int32
+ type: integer
+ unsupportedConfigOverrides:
+ description: 'unsupportedConfigOverrides holds a sparse config that
+ will override any previously set options. It only needs to be the
+ fields to override it will end up overlaying in the following order:
+ 1. hardcoded defaults 2. observedConfig 3. unsupportedConfigOverrides'
+ nullable: true
type: object
- type: array
- latestAvailableRevision:
- description: latestAvailableRevision is the deploymentID of the most
- recent deployment
- format: int32
- type: integer
- latestAvailableRevisionReason:
- description: latestAvailableRevisionReason describe the detailed reason
- for the most recent deployment
- type: string
- nodeStatuses:
- description: nodeStatuses track the deployment values and errors across
- individual nodes
- items:
- description: NodeStatus provides information about the current state
- of a particular node managed by this operator.
- properties:
- currentRevision:
- description: currentRevision is the generation of the most recently
- successful deployment
- format: int32
- type: integer
- lastFailedRevision:
- description: lastFailedRevision is the generation of the deployment
- we tried and failed to deploy.
- format: int32
- type: integer
- lastFailedRevisionErrors:
- description: lastFailedRevisionErrors is a list of the errors
- during the failed deployment referenced in lastFailedRevision
- items:
+ x-kubernetes-preserve-unknown-fields: true
+ type: object
+ status:
+ description: status is the most recently observed status of the Kubernetes
+ Scheduler
+ properties:
+ conditions:
+ description: conditions is a list of conditions and their status
+ items:
+ description: OperatorCondition is just the standard condition fields.
+ properties:
+ lastTransitionTime:
+ format: date-time
type: string
- type: array
- nodeName:
- description: nodeName is the name of the node
- type: string
- targetRevision:
- description: targetRevision is the generation of the deployment
- we're trying to apply
- format: int32
- type: integer
- type: object
- type: array
- observedGeneration:
- description: observedGeneration is the last generation change you've
- dealt with
- format: int64
- type: integer
- readyReplicas:
- description: readyReplicas indicates how many replicas are ready and
- at the desired state
- format: int32
- type: integer
- version:
- description: version is the level this availability applies to
- type: string
- type: object
- required:
- - spec
- type: object
- version: v1
+ message:
+ type: string
+ reason:
+ type: string
+ status:
+ type: string
+ type:
+ type: string
+ type: object
+ type: array
+ generations:
+ description: generations are used to determine when an item needs
+ to be reconciled or has changed in a way that needs a reaction.
+ items:
+ description: GenerationStatus keeps track of the generation for
+ a given resource so that decisions about forced updates can be
+ made.
+ properties:
+ group:
+ description: group is the group of the thing you're tracking
+ type: string
+ hash:
+ description: hash is an optional field set for resources without
+ generation that are content sensitive like secrets and configmaps
+ type: string
+ lastGeneration:
+ description: lastGeneration is the last generation of the workload
+ controller involved
+ format: int64
+ type: integer
+ name:
+ description: name is the name of the thing you're tracking
+ type: string
+ namespace:
+ description: namespace is where the thing you're tracking is
+ type: string
+ resource:
+ description: resource is the resource type of the thing you're
+ tracking
+ type: string
+ type: object
+ type: array
+ latestAvailableRevision:
+ description: latestAvailableRevision is the deploymentID of the most
+ recent deployment
+ format: int32
+ type: integer
+ latestAvailableRevisionReason:
+ description: latestAvailableRevisionReason describe the detailed reason
+ for the most recent deployment
+ type: string
+ nodeStatuses:
+ description: nodeStatuses track the deployment values and errors across
+ individual nodes
+ items:
+ description: NodeStatus provides information about the current state
+ of a particular node managed by this operator.
+ properties:
+ currentRevision:
+ description: currentRevision is the generation of the most recently
+ successful deployment
+ format: int32
+ type: integer
+ lastFailedCount:
+ description: lastFailedCount is how often the last failed revision
+ failed.
+ type: integer
+ lastFailedRevision:
+ description: lastFailedRevision is the generation of the deployment
+ we tried and failed to deploy.
+ format: int32
+ type: integer
+ lastFailedRevisionErrors:
+ description: lastFailedRevisionErrors is a list of the errors
+ during the failed deployment referenced in lastFailedRevision
+ items:
+ type: string
+ type: array
+ lastFailedTime:
+ description: lastFailedTime is the time the last failed revision
+ failed the last time.
+ format: date-time
+ type: string
+ nodeName:
+ description: nodeName is the name of the node
+ type: string
+ targetRevision:
+ description: targetRevision is the generation of the deployment
+ we're trying to apply
+ format: int32
+ type: integer
+ type: object
+ type: array
+ observedGeneration:
+ description: observedGeneration is the last generation change you've
+ dealt with
+ format: int64
+ type: integer
+ readyReplicas:
+ description: readyReplicas indicates how many replicas are ready and
+ at the desired state
+ format: int32
+ type: integer
+ version:
+ description: version is the level this availability applies to
+ type: string
+ type: object
+ required:
+ - spec
+ type: object
+ served: true
+ storage: true
+ subresources:
+ status: {}
diff --git a/vendor/github.com/openshift/api/operator/v1/0000_25_kube-scheduler-operator_01_config.crd.yaml-merge-patch b/vendor/github.com/openshift/api/operator/v1/0000_25_kube-scheduler-operator_01_config.crd.yaml-merge-patch
deleted file mode 100644
index 5cc312a439f..00000000000
--- a/vendor/github.com/openshift/api/operator/v1/0000_25_kube-scheduler-operator_01_config.crd.yaml-merge-patch
+++ /dev/null
@@ -1,10 +0,0 @@
-# this file can be removed once we switch to v0.2 of crd generator
-# see: https://github.com/openshift/cluster-kube-scheduler-operator/pull/148
-spec:
- validation:
- openAPIV3Schema:
- properties:
- spec:
- properties:
- managementState:
- pattern: "^(Managed|Force)$"
diff --git a/vendor/github.com/openshift/api/operator/v1/0000_25_kube-scheduler-operator_01_config.crd.yaml-patch b/vendor/github.com/openshift/api/operator/v1/0000_25_kube-scheduler-operator_01_config.crd.yaml-patch
new file mode 100644
index 00000000000..8145f00c49b
--- /dev/null
+++ b/vendor/github.com/openshift/api/operator/v1/0000_25_kube-scheduler-operator_01_config.crd.yaml-patch
@@ -0,0 +1,3 @@
+- op: replace
+ path: /spec/versions/name=v1/schema/openAPIV3Schema/properties/spec/properties/managementState/pattern
+ value: "^(Managed|Force)$"
diff --git a/vendor/github.com/openshift/api/operator/v1/0000_30_openshift-apiserver-operator_01_config.crd.yaml b/vendor/github.com/openshift/api/operator/v1/0000_30_openshift-apiserver-operator_01_config.crd.yaml
index 73f645768ac..5c88fb5fdaa 100644
--- a/vendor/github.com/openshift/api/operator/v1/0000_30_openshift-apiserver-operator_01_config.crd.yaml
+++ b/vendor/github.com/openshift/api/operator/v1/0000_30_openshift-apiserver-operator_01_config.crd.yaml
@@ -1,144 +1,141 @@
-apiVersion: apiextensions.k8s.io/v1beta1
+apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
+ annotations:
+ api-approved.openshift.io: https://github.com/openshift/api/pull/475
+ include.release.openshift.io/ibm-cloud-managed: "true"
+ include.release.openshift.io/self-managed-high-availability: "true"
+ include.release.openshift.io/single-node-developer: "true"
name: openshiftapiservers.operator.openshift.io
spec:
- scope: Cluster
- preserveUnknownFields: false
group: operator.openshift.io
- version: v1
names:
+ categories:
+ - coreoperators
kind: OpenShiftAPIServer
plural: openshiftapiservers
singular: openshiftapiserver
- categories:
- - coreoperators
- subresources:
- status: {}
- validation:
- openAPIV3Schema:
- description: OpenShiftAPIServer provides information to configure an operator
- to manage openshift-apiserver.
- type: object
- required:
- - spec
- properties:
- apiVersion:
- description: 'APIVersion defines the versioned schema of this representation
- of an object. Servers should convert recognized schemas to the latest
- internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
- type: string
- kind:
- description: 'Kind is a string value representing the REST resource this
- object represents. Servers may infer this from the endpoint the client
- submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
- type: string
- metadata:
- type: object
- spec:
+ scope: Cluster
+ versions:
+ - name: v1
+ schema:
+ openAPIV3Schema:
+ description: OpenShiftAPIServer provides information to configure an operator to manage openshift-apiserver.
type: object
+ required:
+ - spec
properties:
- logLevel:
- description: logLevel is an intent based logging for an overall component. It
- does not give fine grained control, but it is a simple way to manage
- coarse grained logging choices that operators have to interpret for
- their operands.
+ apiVersion:
+ description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
type: string
- managementState:
- description: managementState indicates whether and how the operator
- should manage the component
+ kind:
+ description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type: string
- pattern: ^(Managed|Unmanaged|Force|Removed)$
- observedConfig:
- description: observedConfig holds a sparse config that controller has
- observed from the cluster state. It exists in spec because it is
- an input to the level for the operator
+ metadata:
type: object
- nullable: true
- x-kubernetes-preserve-unknown-fields: true
- operatorLogLevel:
- description: operatorLogLevel is an intent based logging for the operator
- itself. It does not give fine grained control, but it is a simple
- way to manage coarse grained logging choices that operators have to
- interpret for themselves.
- type: string
- unsupportedConfigOverrides:
- description: 'unsupportedConfigOverrides holds a sparse config that
- will override any previously set options. It only needs to be the
- fields to override it will end up overlaying in the following order:
- 1. hardcoded defaults 2. observedConfig 3. unsupportedConfigOverrides'
+ spec:
+ description: spec is the specification of the desired behavior of the OpenShift API Server.
type: object
- nullable: true
- x-kubernetes-preserve-unknown-fields: true
- status:
- type: object
- properties:
- conditions:
- description: conditions is a list of conditions and their status
- type: array
- items:
- description: OperatorCondition is just the standard condition fields.
- type: object
- properties:
- lastTransitionTime:
- type: string
- format: date-time
- message:
- type: string
- reason:
- type: string
- status:
- type: string
- type:
- type: string
- generations:
- description: generations are used to determine when an item needs to
- be reconciled or has changed in a way that needs a reaction.
- type: array
- items:
- description: GenerationStatus keeps track of the generation for a
- given resource so that decisions about forced updates can be made.
- type: object
- properties:
- group:
- description: group is the group of the thing you're tracking
- type: string
- hash:
- description: hash is an optional field set for resources without
- generation that are content sensitive like secrets and configmaps
- type: string
- lastGeneration:
- description: lastGeneration is the last generation of the workload
- controller involved
- type: integer
- format: int64
- name:
- description: name is the name of the thing you're tracking
- type: string
- namespace:
- description: namespace is where the thing you're tracking is
- type: string
- resource:
- description: resource is the resource type of the thing you're
- tracking
- type: string
- latestAvailableRevision:
- description: latestAvailableRevision is the latest revision used as
- suffix of revisioned secrets like encryption-config. A new revision
- causes a new deployment of pods.
- type: integer
- format: int32
- minimum: 0
- observedGeneration:
- description: observedGeneration is the last generation change you've
- dealt with
- type: integer
- format: int64
- readyReplicas:
- description: readyReplicas indicates how many replicas are ready and
- at the desired state
- type: integer
- format: int32
- version:
- description: version is the level this availability applies to
- type: string
+ properties:
+ logLevel:
+ description: "logLevel is an intent based logging for an overall component. It does not give fine grained control, but it is a simple way to manage coarse grained logging choices that operators have to interpret for their operands. \n Valid values are: \"Normal\", \"Debug\", \"Trace\", \"TraceAll\". Defaults to \"Normal\"."
+ type: string
+ default: Normal
+ enum:
+ - ""
+ - Normal
+ - Debug
+ - Trace
+ - TraceAll
+ managementState:
+ description: managementState indicates whether and how the operator should manage the component
+ type: string
+ pattern: ^(Managed|Unmanaged|Force|Removed)$
+ observedConfig:
+ description: observedConfig holds a sparse config that controller has observed from the cluster state. It exists in spec because it is an input to the level for the operator
+ type: object
+ nullable: true
+ x-kubernetes-preserve-unknown-fields: true
+ operatorLogLevel:
+ description: "operatorLogLevel is an intent based logging for the operator itself. It does not give fine grained control, but it is a simple way to manage coarse grained logging choices that operators have to interpret for themselves. \n Valid values are: \"Normal\", \"Debug\", \"Trace\", \"TraceAll\". Defaults to \"Normal\"."
+ type: string
+ default: Normal
+ enum:
+ - ""
+ - Normal
+ - Debug
+ - Trace
+ - TraceAll
+ unsupportedConfigOverrides:
+ description: 'unsupportedConfigOverrides holds a sparse config that will override any previously set options. It only needs to be the fields to override it will end up overlaying in the following order: 1. hardcoded defaults 2. observedConfig 3. unsupportedConfigOverrides'
+ type: object
+ nullable: true
+ x-kubernetes-preserve-unknown-fields: true
+ status:
+ description: status defines the observed status of the OpenShift API Server.
+ type: object
+ properties:
+ conditions:
+ description: conditions is a list of conditions and their status
+ type: array
+ items:
+ description: OperatorCondition is just the standard condition fields.
+ type: object
+ properties:
+ lastTransitionTime:
+ type: string
+ format: date-time
+ message:
+ type: string
+ reason:
+ type: string
+ status:
+ type: string
+ type:
+ type: string
+ generations:
+ description: generations are used to determine when an item needs to be reconciled or has changed in a way that needs a reaction.
+ type: array
+ items:
+ description: GenerationStatus keeps track of the generation for a given resource so that decisions about forced updates can be made.
+ type: object
+ properties:
+ group:
+ description: group is the group of the thing you're tracking
+ type: string
+ hash:
+ description: hash is an optional field set for resources without generation that are content sensitive like secrets and configmaps
+ type: string
+ lastGeneration:
+ description: lastGeneration is the last generation of the workload controller involved
+ type: integer
+ format: int64
+ name:
+ description: name is the name of the thing you're tracking
+ type: string
+ namespace:
+ description: namespace is where the thing you're tracking is
+ type: string
+ resource:
+ description: resource is the resource type of the thing you're tracking
+ type: string
+ latestAvailableRevision:
+ description: latestAvailableRevision is the latest revision used as suffix of revisioned secrets like encryption-config. A new revision causes a new deployment of pods.
+ type: integer
+ format: int32
+ minimum: 0
+ observedGeneration:
+ description: observedGeneration is the last generation change you've dealt with
+ type: integer
+ format: int64
+ readyReplicas:
+ description: readyReplicas indicates how many replicas are ready and at the desired state
+ type: integer
+ format: int32
+ version:
+ description: version is the level this availability applies to
+ type: string
+ served: true
+ storage: true
+ subresources:
+ status: {}
diff --git a/vendor/github.com/openshift/api/operator/v1/0000_40_cloud-credential-operator_00_config.crd.yaml b/vendor/github.com/openshift/api/operator/v1/0000_40_cloud-credential-operator_00_config.crd.yaml
new file mode 100644
index 00000000000..8fb4d4471e7
--- /dev/null
+++ b/vendor/github.com/openshift/api/operator/v1/0000_40_cloud-credential-operator_00_config.crd.yaml
@@ -0,0 +1,142 @@
+apiVersion: apiextensions.k8s.io/v1
+kind: CustomResourceDefinition
+metadata:
+ annotations:
+ api-approved.openshift.io: https://github.com/openshift/api/pull/692
+ include.release.openshift.io/self-managed-high-availability: "true"
+ include.release.openshift.io/single-node-developer: "true"
+ name: cloudcredentials.operator.openshift.io
+spec:
+ group: operator.openshift.io
+ names:
+ kind: CloudCredential
+ listKind: CloudCredentialList
+ plural: cloudcredentials
+ singular: cloudcredential
+ scope: Cluster
+ versions:
+ - name: v1
+ schema:
+ openAPIV3Schema:
+ description: CloudCredential provides a means to configure an operator to manage CredentialsRequests.
+ type: object
+ required:
+ - spec
+ properties:
+ apiVersion:
+ description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
+ type: string
+ kind:
+ description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
+ type: string
+ metadata:
+ type: object
+ spec:
+ description: CloudCredentialSpec is the specification of the desired behavior of the cloud-credential-operator.
+ type: object
+ properties:
+ credentialsMode:
+ description: 'CredentialsMode allows informing CCO that it should not attempt to dynamically determine the root cloud credentials capabilities, and it should just run in the specified mode. It also allows putting the operator into "manual" mode if desired. Leaving the field in default mode runs CCO so that the cluster''s cloud credentials will be dynamically probed for capabilities (on supported clouds/platforms). Supported modes: AWS/Azure/GCP: "" (Default), "Mint", "Passthrough", "Manual" Others: Do not set value as other platforms only support running in "Passthrough"'
+ type: string
+ enum:
+ - ""
+ - Manual
+ - Mint
+ - Passthrough
+ logLevel:
+ description: "logLevel is an intent based logging for an overall component. It does not give fine grained control, but it is a simple way to manage coarse grained logging choices that operators have to interpret for their operands. \n Valid values are: \"Normal\", \"Debug\", \"Trace\", \"TraceAll\". Defaults to \"Normal\"."
+ type: string
+ default: Normal
+ enum:
+ - ""
+ - Normal
+ - Debug
+ - Trace
+ - TraceAll
+ managementState:
+ description: managementState indicates whether and how the operator should manage the component
+ type: string
+ pattern: ^(Managed|Unmanaged|Force|Removed)$
+ observedConfig:
+ description: observedConfig holds a sparse config that controller has observed from the cluster state. It exists in spec because it is an input to the level for the operator
+ type: object
+ nullable: true
+ x-kubernetes-preserve-unknown-fields: true
+ operatorLogLevel:
+ description: "operatorLogLevel is an intent based logging for the operator itself. It does not give fine grained control, but it is a simple way to manage coarse grained logging choices that operators have to interpret for themselves. \n Valid values are: \"Normal\", \"Debug\", \"Trace\", \"TraceAll\". Defaults to \"Normal\"."
+ type: string
+ default: Normal
+ enum:
+ - ""
+ - Normal
+ - Debug
+ - Trace
+ - TraceAll
+ unsupportedConfigOverrides:
+ description: 'unsupportedConfigOverrides holds a sparse config that will override any previously set options. It only needs to be the fields to override it will end up overlaying in the following order: 1. hardcoded defaults 2. observedConfig 3. unsupportedConfigOverrides'
+ type: object
+ nullable: true
+ x-kubernetes-preserve-unknown-fields: true
+ status:
+ description: CloudCredentialStatus defines the observed status of the cloud-credential-operator.
+ type: object
+ properties:
+ conditions:
+ description: conditions is a list of conditions and their status
+ type: array
+ items:
+ description: OperatorCondition is just the standard condition fields.
+ type: object
+ properties:
+ lastTransitionTime:
+ type: string
+ format: date-time
+ message:
+ type: string
+ reason:
+ type: string
+ status:
+ type: string
+ type:
+ type: string
+ generations:
+ description: generations are used to determine when an item needs to be reconciled or has changed in a way that needs a reaction.
+ type: array
+ items:
+ description: GenerationStatus keeps track of the generation for a given resource so that decisions about forced updates can be made.
+ type: object
+ properties:
+ group:
+ description: group is the group of the thing you're tracking
+ type: string
+ hash:
+ description: hash is an optional field set for resources without generation that are content sensitive like secrets and configmaps
+ type: string
+ lastGeneration:
+ description: lastGeneration is the last generation of the workload controller involved
+ type: integer
+ format: int64
+ name:
+ description: name is the name of the thing you're tracking
+ type: string
+ namespace:
+ description: namespace is where the thing you're tracking is
+ type: string
+ resource:
+ description: resource is the resource type of the thing you're tracking
+ type: string
+ observedGeneration:
+ description: observedGeneration is the last generation change you've dealt with
+ type: integer
+ format: int64
+ readyReplicas:
+ description: readyReplicas indicates how many replicas are ready and at the desired state
+ type: integer
+ format: int32
+ version:
+ description: version is the level this availability applies to
+ type: string
+ served: true
+ storage: true
+ subresources:
+ status: {}
diff --git a/vendor/github.com/openshift/api/operator/v1/0000_40_kube-storage-version-migrator-operator_00_config.crd.yaml b/vendor/github.com/openshift/api/operator/v1/0000_40_kube-storage-version-migrator-operator_00_config.crd.yaml
index 20ce796cf3b..81a74093d7b 100644
--- a/vendor/github.com/openshift/api/operator/v1/0000_40_kube-storage-version-migrator-operator_00_config.crd.yaml
+++ b/vendor/github.com/openshift/api/operator/v1/0000_40_kube-storage-version-migrator-operator_00_config.crd.yaml
@@ -1,7 +1,11 @@
-apiVersion: apiextensions.k8s.io/v1beta1
+apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
- creationTimestamp: null
+ annotations:
+ api-approved.openshift.io: https://github.com/openshift/api/pull/503
+ include.release.openshift.io/ibm-cloud-managed: "true"
+ include.release.openshift.io/self-managed-high-availability: "true"
+ include.release.openshift.io/single-node-developer: "true"
name: kubestorageversionmigrators.operator.openshift.io
spec:
group: operator.openshift.io
@@ -11,137 +15,119 @@ spec:
plural: kubestorageversionmigrators
singular: kubestorageversionmigrator
scope: Cluster
- preserveUnknownFields: false
- subresources:
- status: {}
- version: v1
versions:
- - name: v1
- served: true
- storage: true
- "validation":
- "openAPIV3Schema":
- description: KubeStorageVersionMigrator provides information to configure an
- operator to manage kube-storage-version-migrator.
- type: object
- required:
- - spec
- properties:
- apiVersion:
- description: 'APIVersion defines the versioned schema of this representation
- of an object. Servers should convert recognized schemas to the latest
- internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
- type: string
- kind:
- description: 'Kind is a string value representing the REST resource this
- object represents. Servers may infer this from the endpoint the client
- submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
- type: string
- metadata:
- type: object
- spec:
+ - name: v1
+ schema:
+ openAPIV3Schema:
+ description: KubeStorageVersionMigrator provides information to configure an operator to manage kube-storage-version-migrator.
type: object
+ required:
+ - spec
properties:
- logLevel:
- description: logLevel is an intent based logging for an overall component. It
- does not give fine grained control, but it is a simple way to manage
- coarse grained logging choices that operators have to interpret for
- their operands.
+ apiVersion:
+ description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
type: string
- managementState:
- description: managementState indicates whether and how the operator
- should manage the component
+ kind:
+ description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type: string
- pattern: ^(Managed|Unmanaged|Force|Removed)$
- observedConfig:
- description: observedConfig holds a sparse config that controller has
- observed from the cluster state. It exists in spec because it is
- an input to the level for the operator
+ metadata:
type: object
- nullable: true
- x-kubernetes-preserve-unknown-fields: true
- operatorLogLevel:
- description: operatorLogLevel is an intent based logging for the operator
- itself. It does not give fine grained control, but it is a simple
- way to manage coarse grained logging choices that operators have to
- interpret for themselves.
- type: string
- unsupportedConfigOverrides:
- description: 'unsupportedConfigOverrides holds a sparse config that
- will override any previously set options. It only needs to be the
- fields to override it will end up overlaying in the following order:
- 1. hardcoded defaults 2. observedConfig 3. unsupportedConfigOverrides'
+ spec:
type: object
- nullable: true
- x-kubernetes-preserve-unknown-fields: true
- status:
- type: object
- properties:
- conditions:
- description: conditions is a list of conditions and their status
- type: array
- items:
- description: OperatorCondition is just the standard condition fields.
- type: object
- properties:
- lastTransitionTime:
- type: string
- format: date-time
- message:
- type: string
- reason:
- type: string
- status:
- type: string
- type:
- type: string
- generations:
- description: generations are used to determine when an item needs to
- be reconciled or has changed in a way that needs a reaction.
- type: array
- items:
- description: GenerationStatus keeps track of the generation for a
- given resource so that decisions about forced updates can be made.
- type: object
- properties:
- group:
- description: group is the group of the thing you're tracking
- type: string
- hash:
- description: hash is an optional field set for resources without
- generation that are content sensitive like secrets and configmaps
- type: string
- lastGeneration:
- description: lastGeneration is the last generation of the workload
- controller involved
- type: integer
- format: int64
- name:
- description: name is the name of the thing you're tracking
- type: string
- namespace:
- description: namespace is where the thing you're tracking is
- type: string
- resource:
- description: resource is the resource type of the thing you're
- tracking
- type: string
- observedGeneration:
- description: observedGeneration is the last generation change you've
- dealt with
- type: integer
- format: int64
- readyReplicas:
- description: readyReplicas indicates how many replicas are ready and
- at the desired state
- type: integer
- format: int32
- version:
- description: version is the level this availability applies to
- type: string
-status:
- acceptedNames:
- kind: ""
- plural: ""
- conditions: []
- storedVersions: []
+ properties:
+ logLevel:
+ description: "logLevel is an intent based logging for an overall component. It does not give fine grained control, but it is a simple way to manage coarse grained logging choices that operators have to interpret for their operands. \n Valid values are: \"Normal\", \"Debug\", \"Trace\", \"TraceAll\". Defaults to \"Normal\"."
+ type: string
+ default: Normal
+ enum:
+ - ""
+ - Normal
+ - Debug
+ - Trace
+ - TraceAll
+ managementState:
+ description: managementState indicates whether and how the operator should manage the component
+ type: string
+ pattern: ^(Managed|Unmanaged|Force|Removed)$
+ observedConfig:
+ description: observedConfig holds a sparse config that controller has observed from the cluster state. It exists in spec because it is an input to the level for the operator
+ type: object
+ nullable: true
+ x-kubernetes-preserve-unknown-fields: true
+ operatorLogLevel:
+ description: "operatorLogLevel is an intent based logging for the operator itself. It does not give fine grained control, but it is a simple way to manage coarse grained logging choices that operators have to interpret for themselves. \n Valid values are: \"Normal\", \"Debug\", \"Trace\", \"TraceAll\". Defaults to \"Normal\"."
+ type: string
+ default: Normal
+ enum:
+ - ""
+ - Normal
+ - Debug
+ - Trace
+ - TraceAll
+ unsupportedConfigOverrides:
+ description: 'unsupportedConfigOverrides holds a sparse config that will override any previously set options. It only needs to be the fields to override it will end up overlaying in the following order: 1. hardcoded defaults 2. observedConfig 3. unsupportedConfigOverrides'
+ type: object
+ nullable: true
+ x-kubernetes-preserve-unknown-fields: true
+ status:
+ type: object
+ properties:
+ conditions:
+ description: conditions is a list of conditions and their status
+ type: array
+ items:
+ description: OperatorCondition is just the standard condition fields.
+ type: object
+ properties:
+ lastTransitionTime:
+ type: string
+ format: date-time
+ message:
+ type: string
+ reason:
+ type: string
+ status:
+ type: string
+ type:
+ type: string
+ generations:
+ description: generations are used to determine when an item needs to be reconciled or has changed in a way that needs a reaction.
+ type: array
+ items:
+ description: GenerationStatus keeps track of the generation for a given resource so that decisions about forced updates can be made.
+ type: object
+ properties:
+ group:
+ description: group is the group of the thing you're tracking
+ type: string
+ hash:
+ description: hash is an optional field set for resources without generation that are content sensitive like secrets and configmaps
+ type: string
+ lastGeneration:
+ description: lastGeneration is the last generation of the workload controller involved
+ type: integer
+ format: int64
+ name:
+ description: name is the name of the thing you're tracking
+ type: string
+ namespace:
+ description: namespace is where the thing you're tracking is
+ type: string
+ resource:
+ description: resource is the resource type of the thing you're tracking
+ type: string
+ observedGeneration:
+ description: observedGeneration is the last generation change you've dealt with
+ type: integer
+ format: int64
+ readyReplicas:
+ description: readyReplicas indicates how many replicas are ready and at the desired state
+ type: integer
+ format: int32
+ version:
+ description: version is the level this availability applies to
+ type: string
+ served: true
+ storage: true
+ subresources:
+ status: {}
diff --git a/vendor/github.com/openshift/api/operator/v1/0000_50_cluster-authentication-operator_01_config.crd.yaml b/vendor/github.com/openshift/api/operator/v1/0000_50_cluster-authentication-operator_01_config.crd.yaml
index 7f604fa820f..a056dd6c724 100644
--- a/vendor/github.com/openshift/api/operator/v1/0000_50_cluster-authentication-operator_01_config.crd.yaml
+++ b/vendor/github.com/openshift/api/operator/v1/0000_50_cluster-authentication-operator_01_config.crd.yaml
@@ -1,135 +1,140 @@
-apiVersion: apiextensions.k8s.io/v1beta1
+apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
+ annotations:
+ api-approved.openshift.io: https://github.com/openshift/api/pull/475
+ include.release.openshift.io/self-managed-high-availability: "true"
+ include.release.openshift.io/single-node-developer: "true"
name: authentications.operator.openshift.io
spec:
- scope: Cluster
- preserveUnknownFields: false
group: operator.openshift.io
- version: v1
names:
kind: Authentication
plural: authentications
singular: authentication
- subresources:
- status: {}
- validation:
- openAPIV3Schema:
- description: Authentication provides information to configure an operator to
- manage authentication.
- type: object
- required:
- - spec
- properties:
- apiVersion:
- description: 'APIVersion defines the versioned schema of this representation
- of an object. Servers should convert recognized schemas to the latest
- internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
- type: string
- kind:
- description: 'Kind is a string value representing the REST resource this
- object represents. Servers may infer this from the endpoint the client
- submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
- type: string
- metadata:
- type: object
- spec:
+ scope: Cluster
+ versions:
+ - name: v1
+ schema:
+ openAPIV3Schema:
+ description: Authentication provides information to configure an operator to manage authentication.
type: object
+ required:
+ - spec
properties:
- logLevel:
- description: logLevel is an intent based logging for an overall component. It
- does not give fine grained control, but it is a simple way to manage
- coarse grained logging choices that operators have to interpret for
- their operands.
+ apiVersion:
+ description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
type: string
- managementState:
- description: managementState indicates whether and how the operator
- should manage the component
+ kind:
+ description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type: string
- pattern: ^(Managed|Unmanaged|Force|Removed)$
- observedConfig:
- description: observedConfig holds a sparse config that controller has
- observed from the cluster state. It exists in spec because it is
- an input to the level for the operator
+ metadata:
type: object
- nullable: true
- x-kubernetes-preserve-unknown-fields: true
- operatorLogLevel:
- description: operatorLogLevel is an intent based logging for the operator
- itself. It does not give fine grained control, but it is a simple
- way to manage coarse grained logging choices that operators have to
- interpret for themselves.
- type: string
- unsupportedConfigOverrides:
- description: 'unsupportedConfigOverrides holds a sparse config that
- will override any previously set options. It only needs to be the
- fields to override it will end up overlaying in the following order:
- 1. hardcoded defaults 2. observedConfig 3. unsupportedConfigOverrides'
+ spec:
type: object
- nullable: true
- x-kubernetes-preserve-unknown-fields: true
- status:
- type: object
- properties:
- conditions:
- description: conditions is a list of conditions and their status
- type: array
- items:
- description: OperatorCondition is just the standard condition fields.
- type: object
- properties:
- lastTransitionTime:
- type: string
- format: date-time
- message:
- type: string
- reason:
- type: string
- status:
- type: string
- type:
- type: string
- generations:
- description: generations are used to determine when an item needs to
- be reconciled or has changed in a way that needs a reaction.
- type: array
- items:
- description: GenerationStatus keeps track of the generation for a
- given resource so that decisions about forced updates can be made.
- type: object
- properties:
- group:
- description: group is the group of the thing you're tracking
- type: string
- hash:
- description: hash is an optional field set for resources without
- generation that are content sensitive like secrets and configmaps
- type: string
- lastGeneration:
- description: lastGeneration is the last generation of the workload
- controller involved
- type: integer
- format: int64
- name:
- description: name is the name of the thing you're tracking
- type: string
- namespace:
- description: namespace is where the thing you're tracking is
- type: string
- resource:
- description: resource is the resource type of the thing you're
- tracking
- type: string
- observedGeneration:
- description: observedGeneration is the last generation change you've
- dealt with
- type: integer
- format: int64
- readyReplicas:
- description: readyReplicas indicates how many replicas are ready and
- at the desired state
- type: integer
- format: int32
- version:
- description: version is the level this availability applies to
- type: string
+ properties:
+ logLevel:
+ description: "logLevel is an intent based logging for an overall component. It does not give fine grained control, but it is a simple way to manage coarse grained logging choices that operators have to interpret for their operands. \n Valid values are: \"Normal\", \"Debug\", \"Trace\", \"TraceAll\". Defaults to \"Normal\"."
+ type: string
+ default: Normal
+ enum:
+ - ""
+ - Normal
+ - Debug
+ - Trace
+ - TraceAll
+ managementState:
+ description: managementState indicates whether and how the operator should manage the component
+ type: string
+ pattern: ^(Managed|Unmanaged|Force|Removed)$
+ observedConfig:
+ description: observedConfig holds a sparse config that controller has observed from the cluster state. It exists in spec because it is an input to the level for the operator
+ type: object
+ nullable: true
+ x-kubernetes-preserve-unknown-fields: true
+ operatorLogLevel:
+ description: "operatorLogLevel is an intent based logging for the operator itself. It does not give fine grained control, but it is a simple way to manage coarse grained logging choices that operators have to interpret for themselves. \n Valid values are: \"Normal\", \"Debug\", \"Trace\", \"TraceAll\". Defaults to \"Normal\"."
+ type: string
+ default: Normal
+ enum:
+ - ""
+ - Normal
+ - Debug
+ - Trace
+ - TraceAll
+ unsupportedConfigOverrides:
+ description: 'unsupportedConfigOverrides holds a sparse config that will override any previously set options. It only needs to be the fields to override it will end up overlaying in the following order: 1. hardcoded defaults 2. observedConfig 3. unsupportedConfigOverrides'
+ type: object
+ nullable: true
+ x-kubernetes-preserve-unknown-fields: true
+ status:
+ type: object
+ properties:
+ conditions:
+ description: conditions is a list of conditions and their status
+ type: array
+ items:
+ description: OperatorCondition is just the standard condition fields.
+ type: object
+ properties:
+ lastTransitionTime:
+ type: string
+ format: date-time
+ message:
+ type: string
+ reason:
+ type: string
+ status:
+ type: string
+ type:
+ type: string
+ generations:
+ description: generations are used to determine when an item needs to be reconciled or has changed in a way that needs a reaction.
+ type: array
+ items:
+ description: GenerationStatus keeps track of the generation for a given resource so that decisions about forced updates can be made.
+ type: object
+ properties:
+ group:
+ description: group is the group of the thing you're tracking
+ type: string
+ hash:
+ description: hash is an optional field set for resources without generation that are content sensitive like secrets and configmaps
+ type: string
+ lastGeneration:
+ description: lastGeneration is the last generation of the workload controller involved
+ type: integer
+ format: int64
+ name:
+ description: name is the name of the thing you're tracking
+ type: string
+ namespace:
+ description: namespace is where the thing you're tracking is
+ type: string
+ resource:
+ description: resource is the resource type of the thing you're tracking
+ type: string
+ oauthAPIServer:
+ description: OAuthAPIServer holds status specific only to oauth-apiserver
+ type: object
+ properties:
+ latestAvailableRevision:
+ description: LatestAvailableRevision is the latest revision used as suffix of revisioned secrets like encryption-config. A new revision causes a new deployment of pods.
+ type: integer
+ format: int32
+ minimum: 0
+ observedGeneration:
+ description: observedGeneration is the last generation change you've dealt with
+ type: integer
+ format: int64
+ readyReplicas:
+ description: readyReplicas indicates how many replicas are ready and at the desired state
+ type: integer
+ format: int32
+ version:
+ description: version is the level this availability applies to
+ type: string
+ served: true
+ storage: true
+ subresources:
+ status: {}
diff --git a/vendor/github.com/openshift/api/operator/v1/0000_50_cluster-openshift-controller-manager-operator_02_config.crd.yaml b/vendor/github.com/openshift/api/operator/v1/0000_50_cluster-openshift-controller-manager-operator_02_config.crd.yaml
index 589797bb714..2768201cf26 100644
--- a/vendor/github.com/openshift/api/operator/v1/0000_50_cluster-openshift-controller-manager-operator_02_config.crd.yaml
+++ b/vendor/github.com/openshift/api/operator/v1/0000_50_cluster-openshift-controller-manager-operator_02_config.crd.yaml
@@ -1,137 +1,134 @@
-apiVersion: apiextensions.k8s.io/v1beta1
+apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
+ annotations:
+ api-approved.openshift.io: https://github.com/openshift/api/pull/475
+ include.release.openshift.io/ibm-cloud-managed: "true"
+ include.release.openshift.io/self-managed-high-availability: "true"
+ include.release.openshift.io/single-node-developer: "true"
name: openshiftcontrollermanagers.operator.openshift.io
spec:
- scope: Cluster
- preserveUnknownFields: false
group: operator.openshift.io
- version: v1
names:
+ categories:
+ - coreoperators
kind: OpenShiftControllerManager
plural: openshiftcontrollermanagers
singular: openshiftcontrollermanager
- categories:
- - coreoperators
- subresources:
- status: {}
- validation:
- openAPIV3Schema:
- description: OpenShiftControllerManager provides information to configure an
- operator to manage openshift-controller-manager.
- type: object
- required:
- - spec
- properties:
- apiVersion:
- description: 'APIVersion defines the versioned schema of this representation
- of an object. Servers should convert recognized schemas to the latest
- internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
- type: string
- kind:
- description: 'Kind is a string value representing the REST resource this
- object represents. Servers may infer this from the endpoint the client
- submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
- type: string
- metadata:
- type: object
- spec:
+ scope: Cluster
+ versions:
+ - name: v1
+ schema:
+ openAPIV3Schema:
+ description: OpenShiftControllerManager provides information to configure an operator to manage openshift-controller-manager.
type: object
+ required:
+ - spec
properties:
- logLevel:
- description: logLevel is an intent based logging for an overall component. It
- does not give fine grained control, but it is a simple way to manage
- coarse grained logging choices that operators have to interpret for
- their operands.
+ apiVersion:
+ description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
type: string
- managementState:
- description: managementState indicates whether and how the operator
- should manage the component
+ kind:
+ description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type: string
- pattern: ^(Managed|Unmanaged|Force|Removed)$
- observedConfig:
- description: observedConfig holds a sparse config that controller has
- observed from the cluster state. It exists in spec because it is
- an input to the level for the operator
+ metadata:
type: object
- nullable: true
- x-kubernetes-preserve-unknown-fields: true
- operatorLogLevel:
- description: operatorLogLevel is an intent based logging for the operator
- itself. It does not give fine grained control, but it is a simple
- way to manage coarse grained logging choices that operators have to
- interpret for themselves.
- type: string
- unsupportedConfigOverrides:
- description: 'unsupportedConfigOverrides holds a sparse config that
- will override any previously set options. It only needs to be the
- fields to override it will end up overlaying in the following order:
- 1. hardcoded defaults 2. observedConfig 3. unsupportedConfigOverrides'
+ spec:
type: object
- nullable: true
- x-kubernetes-preserve-unknown-fields: true
- status:
- type: object
- properties:
- conditions:
- description: conditions is a list of conditions and their status
- type: array
- items:
- description: OperatorCondition is just the standard condition fields.
- type: object
- properties:
- lastTransitionTime:
- type: string
- format: date-time
- message:
- type: string
- reason:
- type: string
- status:
- type: string
- type:
- type: string
- generations:
- description: generations are used to determine when an item needs to
- be reconciled or has changed in a way that needs a reaction.
- type: array
- items:
- description: GenerationStatus keeps track of the generation for a
- given resource so that decisions about forced updates can be made.
- type: object
- properties:
- group:
- description: group is the group of the thing you're tracking
- type: string
- hash:
- description: hash is an optional field set for resources without
- generation that are content sensitive like secrets and configmaps
- type: string
- lastGeneration:
- description: lastGeneration is the last generation of the workload
- controller involved
- type: integer
- format: int64
- name:
- description: name is the name of the thing you're tracking
- type: string
- namespace:
- description: namespace is where the thing you're tracking is
- type: string
- resource:
- description: resource is the resource type of the thing you're
- tracking
- type: string
- observedGeneration:
- description: observedGeneration is the last generation change you've
- dealt with
- type: integer
- format: int64
- readyReplicas:
- description: readyReplicas indicates how many replicas are ready and
- at the desired state
- type: integer
- format: int32
- version:
- description: version is the level this availability applies to
- type: string
+ properties:
+ logLevel:
+ description: "logLevel is an intent based logging for an overall component. It does not give fine grained control, but it is a simple way to manage coarse grained logging choices that operators have to interpret for their operands. \n Valid values are: \"Normal\", \"Debug\", \"Trace\", \"TraceAll\". Defaults to \"Normal\"."
+ type: string
+ default: Normal
+ enum:
+ - ""
+ - Normal
+ - Debug
+ - Trace
+ - TraceAll
+ managementState:
+ description: managementState indicates whether and how the operator should manage the component
+ type: string
+ pattern: ^(Managed|Unmanaged|Force|Removed)$
+ observedConfig:
+ description: observedConfig holds a sparse config that controller has observed from the cluster state. It exists in spec because it is an input to the level for the operator
+ type: object
+ nullable: true
+ x-kubernetes-preserve-unknown-fields: true
+ operatorLogLevel:
+ description: "operatorLogLevel is an intent based logging for the operator itself. It does not give fine grained control, but it is a simple way to manage coarse grained logging choices that operators have to interpret for themselves. \n Valid values are: \"Normal\", \"Debug\", \"Trace\", \"TraceAll\". Defaults to \"Normal\"."
+ type: string
+ default: Normal
+ enum:
+ - ""
+ - Normal
+ - Debug
+ - Trace
+ - TraceAll
+ unsupportedConfigOverrides:
+ description: 'unsupportedConfigOverrides holds a sparse config that will override any previously set options. It only needs to be the fields to override it will end up overlaying in the following order: 1. hardcoded defaults 2. observedConfig 3. unsupportedConfigOverrides'
+ type: object
+ nullable: true
+ x-kubernetes-preserve-unknown-fields: true
+ status:
+ type: object
+ properties:
+ conditions:
+ description: conditions is a list of conditions and their status
+ type: array
+ items:
+ description: OperatorCondition is just the standard condition fields.
+ type: object
+ properties:
+ lastTransitionTime:
+ type: string
+ format: date-time
+ message:
+ type: string
+ reason:
+ type: string
+ status:
+ type: string
+ type:
+ type: string
+ generations:
+ description: generations are used to determine when an item needs to be reconciled or has changed in a way that needs a reaction.
+ type: array
+ items:
+ description: GenerationStatus keeps track of the generation for a given resource so that decisions about forced updates can be made.
+ type: object
+ properties:
+ group:
+ description: group is the group of the thing you're tracking
+ type: string
+ hash:
+ description: hash is an optional field set for resources without generation that are content sensitive like secrets and configmaps
+ type: string
+ lastGeneration:
+ description: lastGeneration is the last generation of the workload controller involved
+ type: integer
+ format: int64
+ name:
+ description: name is the name of the thing you're tracking
+ type: string
+ namespace:
+ description: namespace is where the thing you're tracking is
+ type: string
+ resource:
+ description: resource is the resource type of the thing you're tracking
+ type: string
+ observedGeneration:
+ description: observedGeneration is the last generation change you've dealt with
+ type: integer
+ format: int64
+ readyReplicas:
+ description: readyReplicas indicates how many replicas are ready and at the desired state
+ type: integer
+ format: int32
+ version:
+ description: version is the level this availability applies to
+ type: string
+ served: true
+ storage: true
+ subresources:
+ status: {}
diff --git a/vendor/github.com/openshift/api/operator/v1/0000_50_cluster-svcat-apiserver-operator_02_config.crd.yaml b/vendor/github.com/openshift/api/operator/v1/0000_50_cluster-svcat-apiserver-operator_02_config.crd.yaml
deleted file mode 100644
index 98322e98402..00000000000
--- a/vendor/github.com/openshift/api/operator/v1/0000_50_cluster-svcat-apiserver-operator_02_config.crd.yaml
+++ /dev/null
@@ -1,137 +0,0 @@
-apiVersion: apiextensions.k8s.io/v1beta1
-kind: CustomResourceDefinition
-metadata:
- name: servicecatalogapiservers.operator.openshift.io
-spec:
- scope: Cluster
- preserveUnknownFields: false
- group: operator.openshift.io
- version: v1
- names:
- kind: ServiceCatalogAPIServer
- plural: servicecatalogapiservers
- singular: servicecatalogapiserver
- categories:
- - coreoperators
- subresources:
- status: {}
- validation:
- openAPIV3Schema:
- description: ServiceCatalogAPIServer provides information to configure an operator
- to manage Service Catalog API Server
- type: object
- required:
- - spec
- properties:
- apiVersion:
- description: 'APIVersion defines the versioned schema of this representation
- of an object. Servers should convert recognized schemas to the latest
- internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
- type: string
- kind:
- description: 'Kind is a string value representing the REST resource this
- object represents. Servers may infer this from the endpoint the client
- submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
- type: string
- metadata:
- type: object
- spec:
- type: object
- properties:
- logLevel:
- description: logLevel is an intent based logging for an overall component. It
- does not give fine grained control, but it is a simple way to manage
- coarse grained logging choices that operators have to interpret for
- their operands.
- type: string
- managementState:
- description: managementState indicates whether and how the operator
- should manage the component
- type: string
- pattern: ^(Managed|Unmanaged|Force|Removed)$
- observedConfig:
- description: observedConfig holds a sparse config that controller has
- observed from the cluster state. It exists in spec because it is
- an input to the level for the operator
- type: object
- nullable: true
- x-kubernetes-preserve-unknown-fields: true
- operatorLogLevel:
- description: operatorLogLevel is an intent based logging for the operator
- itself. It does not give fine grained control, but it is a simple
- way to manage coarse grained logging choices that operators have to
- interpret for themselves.
- type: string
- unsupportedConfigOverrides:
- description: 'unsupportedConfigOverrides holds a sparse config that
- will override any previously set options. It only needs to be the
- fields to override it will end up overlaying in the following order:
- 1. hardcoded defaults 2. observedConfig 3. unsupportedConfigOverrides'
- type: object
- nullable: true
- x-kubernetes-preserve-unknown-fields: true
- status:
- type: object
- properties:
- conditions:
- description: conditions is a list of conditions and their status
- type: array
- items:
- description: OperatorCondition is just the standard condition fields.
- type: object
- properties:
- lastTransitionTime:
- type: string
- format: date-time
- message:
- type: string
- reason:
- type: string
- status:
- type: string
- type:
- type: string
- generations:
- description: generations are used to determine when an item needs to
- be reconciled or has changed in a way that needs a reaction.
- type: array
- items:
- description: GenerationStatus keeps track of the generation for a
- given resource so that decisions about forced updates can be made.
- type: object
- properties:
- group:
- description: group is the group of the thing you're tracking
- type: string
- hash:
- description: hash is an optional field set for resources without
- generation that are content sensitive like secrets and configmaps
- type: string
- lastGeneration:
- description: lastGeneration is the last generation of the workload
- controller involved
- type: integer
- format: int64
- name:
- description: name is the name of the thing you're tracking
- type: string
- namespace:
- description: namespace is where the thing you're tracking is
- type: string
- resource:
- description: resource is the resource type of the thing you're
- tracking
- type: string
- observedGeneration:
- description: observedGeneration is the last generation change you've
- dealt with
- type: integer
- format: int64
- readyReplicas:
- description: readyReplicas indicates how many replicas are ready and
- at the desired state
- type: integer
- format: int32
- version:
- description: version is the level this availability applies to
- type: string
diff --git a/vendor/github.com/openshift/api/operator/v1/0000_50_cluster-svcat-controller-manager-operator_02_config.crd.yaml b/vendor/github.com/openshift/api/operator/v1/0000_50_cluster-svcat-controller-manager-operator_02_config.crd.yaml
deleted file mode 100644
index 53453298e32..00000000000
--- a/vendor/github.com/openshift/api/operator/v1/0000_50_cluster-svcat-controller-manager-operator_02_config.crd.yaml
+++ /dev/null
@@ -1,137 +0,0 @@
-apiVersion: apiextensions.k8s.io/v1beta1
-kind: CustomResourceDefinition
-metadata:
- name: servicecatalogcontrollermanagers.operator.openshift.io
-spec:
- scope: Cluster
- preserveUnknownFields: false
- group: operator.openshift.io
- version: v1
- names:
- kind: ServiceCatalogControllerManager
- plural: servicecatalogcontrollermanagers
- singular: servicecatalogcontrollermanager
- categories:
- - coreoperators
- subresources:
- status: {}
- validation:
- openAPIV3Schema:
- description: ServiceCatalogControllerManager provides information to configure
- an operator to manage Service Catalog Controller Manager
- type: object
- required:
- - spec
- properties:
- apiVersion:
- description: 'APIVersion defines the versioned schema of this representation
- of an object. Servers should convert recognized schemas to the latest
- internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
- type: string
- kind:
- description: 'Kind is a string value representing the REST resource this
- object represents. Servers may infer this from the endpoint the client
- submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
- type: string
- metadata:
- type: object
- spec:
- type: object
- properties:
- logLevel:
- description: logLevel is an intent based logging for an overall component. It
- does not give fine grained control, but it is a simple way to manage
- coarse grained logging choices that operators have to interpret for
- their operands.
- type: string
- managementState:
- description: managementState indicates whether and how the operator
- should manage the component
- type: string
- pattern: ^(Managed|Unmanaged|Force|Removed)$
- observedConfig:
- description: observedConfig holds a sparse config that controller has
- observed from the cluster state. It exists in spec because it is
- an input to the level for the operator
- type: object
- nullable: true
- x-kubernetes-preserve-unknown-fields: true
- operatorLogLevel:
- description: operatorLogLevel is an intent based logging for the operator
- itself. It does not give fine grained control, but it is a simple
- way to manage coarse grained logging choices that operators have to
- interpret for themselves.
- type: string
- unsupportedConfigOverrides:
- description: 'unsupportedConfigOverrides holds a sparse config that
- will override any previously set options. It only needs to be the
- fields to override it will end up overlaying in the following order:
- 1. hardcoded defaults 2. observedConfig 3. unsupportedConfigOverrides'
- type: object
- nullable: true
- x-kubernetes-preserve-unknown-fields: true
- status:
- type: object
- properties:
- conditions:
- description: conditions is a list of conditions and their status
- type: array
- items:
- description: OperatorCondition is just the standard condition fields.
- type: object
- properties:
- lastTransitionTime:
- type: string
- format: date-time
- message:
- type: string
- reason:
- type: string
- status:
- type: string
- type:
- type: string
- generations:
- description: generations are used to determine when an item needs to
- be reconciled or has changed in a way that needs a reaction.
- type: array
- items:
- description: GenerationStatus keeps track of the generation for a
- given resource so that decisions about forced updates can be made.
- type: object
- properties:
- group:
- description: group is the group of the thing you're tracking
- type: string
- hash:
- description: hash is an optional field set for resources without
- generation that are content sensitive like secrets and configmaps
- type: string
- lastGeneration:
- description: lastGeneration is the last generation of the workload
- controller involved
- type: integer
- format: int64
- name:
- description: name is the name of the thing you're tracking
- type: string
- namespace:
- description: namespace is where the thing you're tracking is
- type: string
- resource:
- description: resource is the resource type of the thing you're
- tracking
- type: string
- observedGeneration:
- description: observedGeneration is the last generation change you've
- dealt with
- type: integer
- format: int64
- readyReplicas:
- description: readyReplicas indicates how many replicas are ready and
- at the desired state
- type: integer
- format: int32
- version:
- description: version is the level this availability applies to
- type: string
diff --git a/vendor/github.com/openshift/api/operator/v1/0000_50_cluster_storage_operator_01_crd.yaml b/vendor/github.com/openshift/api/operator/v1/0000_50_cluster_storage_operator_01_crd.yaml
new file mode 100644
index 00000000000..a265bc2c84b
--- /dev/null
+++ b/vendor/github.com/openshift/api/operator/v1/0000_50_cluster_storage_operator_01_crd.yaml
@@ -0,0 +1,134 @@
+apiVersion: apiextensions.k8s.io/v1
+kind: CustomResourceDefinition
+metadata:
+ annotations:
+ api-approved.openshift.io: https://github.com/openshift/api/pull/670
+ include.release.openshift.io/ibm-cloud-managed: "true"
+ include.release.openshift.io/self-managed-high-availability: "true"
+ include.release.openshift.io/single-node-developer: "true"
+ name: storages.operator.openshift.io
+spec:
+ group: operator.openshift.io
+ names:
+ kind: Storage
+ plural: storages
+ singular: storage
+ scope: Cluster
+ versions:
+ - name: v1
+ schema:
+ openAPIV3Schema:
+ description: Storage provides a means to configure an operator to manage the cluster storage operator. `cluster` is the canonical name.
+ type: object
+ required:
+ - spec
+ properties:
+ apiVersion:
+ description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
+ type: string
+ kind:
+ description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
+ type: string
+ metadata:
+ type: object
+ spec:
+ description: spec holds user settable values for configuration
+ type: object
+ properties:
+ logLevel:
+ description: "logLevel is an intent based logging for an overall component. It does not give fine grained control, but it is a simple way to manage coarse grained logging choices that operators have to interpret for their operands. \n Valid values are: \"Normal\", \"Debug\", \"Trace\", \"TraceAll\". Defaults to \"Normal\"."
+ type: string
+ default: Normal
+ enum:
+ - ""
+ - Normal
+ - Debug
+ - Trace
+ - TraceAll
+ managementState:
+ description: managementState indicates whether and how the operator should manage the component
+ type: string
+ pattern: ^(Managed|Unmanaged|Force|Removed)$
+ observedConfig:
+ description: observedConfig holds a sparse config that controller has observed from the cluster state. It exists in spec because it is an input to the level for the operator
+ type: object
+ nullable: true
+ x-kubernetes-preserve-unknown-fields: true
+ operatorLogLevel:
+ description: "operatorLogLevel is an intent based logging for the operator itself. It does not give fine grained control, but it is a simple way to manage coarse grained logging choices that operators have to interpret for themselves. \n Valid values are: \"Normal\", \"Debug\", \"Trace\", \"TraceAll\". Defaults to \"Normal\"."
+ type: string
+ default: Normal
+ enum:
+ - ""
+ - Normal
+ - Debug
+ - Trace
+ - TraceAll
+ unsupportedConfigOverrides:
+ description: 'unsupportedConfigOverrides holds a sparse config that will override any previously set options. It only needs to be the fields to override it will end up overlaying in the following order: 1. hardcoded defaults 2. observedConfig 3. unsupportedConfigOverrides'
+ type: object
+ nullable: true
+ x-kubernetes-preserve-unknown-fields: true
+ status:
+ description: status holds observed values from the cluster. They may not be overridden.
+ type: object
+ properties:
+ conditions:
+ description: conditions is a list of conditions and their status
+ type: array
+ items:
+ description: OperatorCondition is just the standard condition fields.
+ type: object
+ properties:
+ lastTransitionTime:
+ type: string
+ format: date-time
+ message:
+ type: string
+ reason:
+ type: string
+ status:
+ type: string
+ type:
+ type: string
+ generations:
+ description: generations are used to determine when an item needs to be reconciled or has changed in a way that needs a reaction.
+ type: array
+ items:
+ description: GenerationStatus keeps track of the generation for a given resource so that decisions about forced updates can be made.
+ type: object
+ properties:
+ group:
+ description: group is the group of the thing you're tracking
+ type: string
+ hash:
+ description: hash is an optional field set for resources without generation that are content sensitive like secrets and configmaps
+ type: string
+ lastGeneration:
+ description: lastGeneration is the last generation of the workload controller involved
+ type: integer
+ format: int64
+ name:
+ description: name is the name of the thing you're tracking
+ type: string
+ namespace:
+ description: namespace is where the thing you're tracking is
+ type: string
+ resource:
+ description: resource is the resource type of the thing you're tracking
+ type: string
+ observedGeneration:
+ description: observedGeneration is the last generation change you've dealt with
+ type: integer
+ format: int64
+ readyReplicas:
+ description: readyReplicas indicates how many replicas are ready and at the desired state
+ type: integer
+ format: int32
+ version:
+ description: version is the level this availability applies to
+ type: string
+ served: true
+ storage: true
+ subresources:
+ status: {}
diff --git a/vendor/github.com/openshift/api/operator/v1/0000_50_ingress-operator_00-custom-resource-definition.yaml b/vendor/github.com/openshift/api/operator/v1/0000_50_ingress-operator_00-custom-resource-definition.yaml
deleted file mode 100644
index 9eeb1f6dbcb..00000000000
--- a/vendor/github.com/openshift/api/operator/v1/0000_50_ingress-operator_00-custom-resource-definition.yaml
+++ /dev/null
@@ -1,545 +0,0 @@
-apiVersion: apiextensions.k8s.io/v1beta1
-kind: CustomResourceDefinition
-metadata:
- creationTimestamp: null
- name: ingresscontrollers.operator.openshift.io
-spec:
- group: operator.openshift.io
- names:
- kind: IngressController
- listKind: IngressControllerList
- plural: ingresscontrollers
- singular: ingresscontroller
- scope: ""
- preserveUnknownFields: false
- subresources:
- scale:
- labelSelectorPath: .status.selector
- specReplicasPath: .spec.replicas
- statusReplicasPath: .status.availableReplicas
- status: {}
- validation:
- openAPIV3Schema:
- description: "IngressController describes a managed ingress controller for the
- cluster. The controller can service OpenShift Route and Kubernetes Ingress
- resources. \n When an IngressController is created, a new ingress controller
- deployment is created to allow external traffic to reach the services that
- expose Ingress or Route resources. Updating this resource may lead to disruption
- for public facing network connections as a new ingress controller revision
- may be rolled out. \n https://kubernetes.io/docs/concepts/services-networking/ingress-controllers
- \n Whenever possible, sensible defaults for the platform are used. See each
- field for more details."
- type: object
- properties:
- apiVersion:
- description: 'APIVersion defines the versioned schema of this representation
- of an object. Servers should convert recognized schemas to the latest
- internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
- type: string
- kind:
- description: 'Kind is a string value representing the REST resource this
- object represents. Servers may infer this from the endpoint the client
- submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
- type: string
- metadata:
- type: object
- spec:
- description: spec is the specification of the desired behavior of the IngressController.
- type: object
- properties:
- defaultCertificate:
- description: "defaultCertificate is a reference to a secret containing
- the default certificate served by the ingress controller. When Routes
- don't specify their own certificate, defaultCertificate is used. \n
- The secret must contain the following keys and data: \n tls.crt:
- certificate file contents tls.key: key file contents \n If unset,
- a wildcard certificate is automatically generated and used. The certificate
- is valid for the ingress controller domain (and subdomains) and the
- generated certificate's CA will be automatically integrated with the
- cluster's trust store. \n The in-use certificate (whether generated
- or user-specified) will be automatically integrated with OpenShift's
- built-in OAuth server."
- type: object
- properties:
- name:
- description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind, uid?'
- type: string
- domain:
- description: "domain is a DNS name serviced by the ingress controller
- and is used to configure multiple features: \n * For the LoadBalancerService
- endpoint publishing strategy, domain is used to configure DNS records.
- See endpointPublishingStrategy. \n * When using a generated default
- certificate, the certificate will be valid for domain and its subdomains.
- See defaultCertificate. \n * The value is published to individual
- Route statuses so that end-users know where to target external DNS
- records. \n domain must be unique among all IngressControllers, and
- cannot be updated. \n If empty, defaults to ingress.config.openshift.io/cluster
- .spec.domain."
- type: string
- endpointPublishingStrategy:
- description: "endpointPublishingStrategy is used to publish the ingress
- controller endpoints to other networks, enable load balancer integrations,
- etc. \n If unset, the default is based on infrastructure.config.openshift.io/cluster
- .status.platform: \n AWS: LoadBalancerService (with External
- scope) Azure: LoadBalancerService (with External scope) GCP:
- \ LoadBalancerService (with External scope) Libvirt: HostNetwork
- \n Any other platform types (including None) default to HostNetwork.
- \n endpointPublishingStrategy cannot be updated."
- type: object
- required:
- - type
- properties:
- hostNetwork:
- description: hostNetwork holds parameters for the HostNetwork endpoint
- publishing strategy. Present only if type is HostNetwork.
- type: object
- loadBalancer:
- description: loadBalancer holds parameters for the load balancer.
- Present only if type is LoadBalancerService.
- type: object
- required:
- - scope
- properties:
- scope:
- description: scope indicates the scope at which the load balancer
- is exposed. Possible values are "External" and "Internal".
- type: string
- private:
- description: private holds parameters for the Private endpoint publishing
- strategy. Present only if type is Private.
- type: object
- type:
- description: "type is the publishing strategy to use. Valid values
- are: \n * LoadBalancerService \n Publishes the ingress controller
- using a Kubernetes LoadBalancer Service. \n In this configuration,
- the ingress controller deployment uses container networking. A
- LoadBalancer Service is created to publish the deployment. \n
- See: https://kubernetes.io/docs/concepts/services-networking/service/#loadbalancer
- \n If domain is set, a wildcard DNS record will be managed to
- point at the LoadBalancer Service's external name. DNS records
- are managed only in DNS zones defined by dns.config.openshift.io/cluster
- .spec.publicZone and .spec.privateZone. \n Wildcard DNS management
- is currently supported only on the AWS, Azure, and GCP platforms.
- \n * HostNetwork \n Publishes the ingress controller on node ports
- where the ingress controller is deployed. \n In this configuration,
- the ingress controller deployment uses host networking, bound
- to node ports 80 and 443. The user is responsible for configuring
- an external load balancer to publish the ingress controller via
- the node ports. \n * Private \n Does not publish the ingress controller.
- \n In this configuration, the ingress controller deployment uses
- container networking, and is not explicitly published. The user
- must manually publish the ingress controller."
- type: string
- namespaceSelector:
- description: "namespaceSelector is used to filter the set of namespaces
- serviced by the ingress controller. This is useful for implementing
- shards. \n If unset, the default is no filtering."
- type: object
- properties:
- matchExpressions:
- description: matchExpressions is a list of label selector requirements.
- The requirements are ANDed.
- type: array
- items:
- description: A label selector requirement is a selector that contains
- values, a key, and an operator that relates the key and values.
- type: object
- required:
- - key
- - operator
- properties:
- key:
- description: key is the label key that the selector applies
- to.
- type: string
- operator:
- description: operator represents a key's relationship to a
- set of values. Valid operators are In, NotIn, Exists and
- DoesNotExist.
- type: string
- values:
- description: values is an array of string values. If the operator
- is In or NotIn, the values array must be non-empty. If the
- operator is Exists or DoesNotExist, the values array must
- be empty. This array is replaced during a strategic merge
- patch.
- type: array
- items:
- type: string
- matchLabels:
- description: matchLabels is a map of {key,value} pairs. A single
- {key,value} in the matchLabels map is equivalent to an element
- of matchExpressions, whose key field is "key", the operator is
- "In", and the values array contains only "value". The requirements
- are ANDed.
- type: object
- additionalProperties:
- type: string
- nodePlacement:
- description: "nodePlacement enables explicit control over the scheduling
- of the ingress controller. \n If unset, defaults are used. See NodePlacement
- for more details."
- type: object
- properties:
- nodeSelector:
- description: "nodeSelector is the node selector applied to ingress
- controller deployments. \n If unset, the default is: \n beta.kubernetes.io/os:
- linux node-role.kubernetes.io/worker: '' \n If set, the specified
- selector is used and replaces the default."
- type: object
- properties:
- matchExpressions:
- description: matchExpressions is a list of label selector requirements.
- The requirements are ANDed.
- type: array
- items:
- description: A label selector requirement is a selector that
- contains values, a key, and an operator that relates the
- key and values.
- type: object
- required:
- - key
- - operator
- properties:
- key:
- description: key is the label key that the selector applies
- to.
- type: string
- operator:
- description: operator represents a key's relationship
- to a set of values. Valid operators are In, NotIn, Exists
- and DoesNotExist.
- type: string
- values:
- description: values is an array of string values. If the
- operator is In or NotIn, the values array must be non-empty.
- If the operator is Exists or DoesNotExist, the values
- array must be empty. This array is replaced during a
- strategic merge patch.
- type: array
- items:
- type: string
- matchLabels:
- description: matchLabels is a map of {key,value} pairs. A single
- {key,value} in the matchLabels map is equivalent to an element
- of matchExpressions, whose key field is "key", the operator
- is "In", and the values array contains only "value". The requirements
- are ANDed.
- type: object
- additionalProperties:
- type: string
- tolerations:
- description: "tolerations is a list of tolerations applied to ingress
- controller deployments. \n The default is an empty list. \n See
- https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/"
- type: array
- items:
- description: The pod this Toleration is attached to tolerates
- any taint that matches the triple using the
- matching operator .
- type: object
- properties:
- effect:
- description: Effect indicates the taint effect to match. Empty
- means match all taint effects. When specified, allowed values
- are NoSchedule, PreferNoSchedule and NoExecute.
- type: string
- key:
- description: Key is the taint key that the toleration applies
- to. Empty means match all taint keys. If the key is empty,
- operator must be Exists; this combination means to match
- all values and all keys.
- type: string
- operator:
- description: Operator represents a key's relationship to the
- value. Valid operators are Exists and Equal. Defaults to
- Equal. Exists is equivalent to wildcard for value, so that
- a pod can tolerate all taints of a particular category.
- type: string
- tolerationSeconds:
- description: TolerationSeconds represents the period of time
- the toleration (which must be of effect NoExecute, otherwise
- this field is ignored) tolerates the taint. By default,
- it is not set, which means tolerate the taint forever (do
- not evict). Zero and negative values will be treated as
- 0 (evict immediately) by the system.
- type: integer
- format: int64
- value:
- description: Value is the taint value the toleration matches
- to. If the operator is Exists, the value should be empty,
- otherwise just a regular string.
- type: string
- replicas:
- description: replicas is the desired number of ingress controller replicas.
- If unset, defaults to 2.
- type: integer
- format: int32
- routeSelector:
- description: "routeSelector is used to filter the set of Routes serviced
- by the ingress controller. This is useful for implementing shards.
- \n If unset, the default is no filtering."
- type: object
- properties:
- matchExpressions:
- description: matchExpressions is a list of label selector requirements.
- The requirements are ANDed.
- type: array
- items:
- description: A label selector requirement is a selector that contains
- values, a key, and an operator that relates the key and values.
- type: object
- required:
- - key
- - operator
- properties:
- key:
- description: key is the label key that the selector applies
- to.
- type: string
- operator:
- description: operator represents a key's relationship to a
- set of values. Valid operators are In, NotIn, Exists and
- DoesNotExist.
- type: string
- values:
- description: values is an array of string values. If the operator
- is In or NotIn, the values array must be non-empty. If the
- operator is Exists or DoesNotExist, the values array must
- be empty. This array is replaced during a strategic merge
- patch.
- type: array
- items:
- type: string
- matchLabels:
- description: matchLabels is a map of {key,value} pairs. A single
- {key,value} in the matchLabels map is equivalent to an element
- of matchExpressions, whose key field is "key", the operator is
- "In", and the values array contains only "value". The requirements
- are ANDed.
- type: object
- additionalProperties:
- type: string
- tlsSecurityProfile:
- description: "tlsSecurityProfile specifies settings for TLS connections
- for ingresscontrollers. \n If unset, the default is based on the apiservers.config.openshift.io/cluster
- resource. \n Note that when using the Old, Intermediate, and Modern
- profile types, the effective profile configuration is subject to change
- between releases. For example, given a specification to use the Intermediate
- profile deployed on release X.Y.Z, an upgrade to release X.Y.Z+1 may
- cause a new profile configuration to be applied to the ingress controller,
- resulting in a rollout. \n Note that the minimum TLS version for ingress
- controllers is 1.1, and the maximum TLS version is 1.2. An implication
- of this restriction is that the Modern TLS profile type cannot be
- used because it requires TLS 1.3."
- type: object
- properties:
- custom:
- description: "custom is a user-defined TLS security profile. Be
- extremely careful using a custom profile as invalid configurations
- can be catastrophic. An example custom profile looks like this:
- \n ciphers: - ECDHE-ECDSA-CHACHA20-POLY1305 - ECDHE-RSA-CHACHA20-POLY1305
- \ - ECDHE-RSA-AES128-GCM-SHA256 - ECDHE-ECDSA-AES128-GCM-SHA256
- \ minTLSVersion: TLSv1.1"
- type: object
- properties:
- ciphers:
- description: "ciphers is used to specify the cipher algorithms
- that are negotiated during the TLS handshake. Operators may
- remove entries their operands do not support. For example,
- to use DES-CBC3-SHA (yaml): \n ciphers: - DES-CBC3-SHA"
- type: array
- items:
- type: string
- minTLSVersion:
- description: "minTLSVersion is used to specify the minimal version
- of the TLS protocol that is negotiated during the TLS handshake.
- For example, to use TLS versions 1.1, 1.2 and 1.3 (yaml):
- \n minTLSVersion: TLSv1.1 \n NOTE: currently the highest
- minTLSVersion allowed is VersionTLS12"
- type: string
- nullable: true
- intermediate:
- description: "intermediate is a TLS security profile based on: \n
- https://wiki.mozilla.org/Security/Server_Side_TLS#Intermediate_compatibility_.28recommended.29
- \n and looks like this (yaml): \n ciphers: - TLS_AES_128_GCM_SHA256
- \ - TLS_AES_256_GCM_SHA384 - TLS_CHACHA20_POLY1305_SHA256
- \ - ECDHE-ECDSA-AES128-GCM-SHA256 - ECDHE-RSA-AES128-GCM-SHA256
- \ - ECDHE-ECDSA-AES256-GCM-SHA384 - ECDHE-RSA-AES256-GCM-SHA384
- \ - ECDHE-ECDSA-CHACHA20-POLY1305 - ECDHE-RSA-CHACHA20-POLY1305
- \ - DHE-RSA-AES128-GCM-SHA256 - DHE-RSA-AES256-GCM-SHA384
- \ minTLSVersion: TLSv1.2"
- type: object
- nullable: true
- modern:
- description: "modern is a TLS security profile based on: \n https://wiki.mozilla.org/Security/Server_Side_TLS#Modern_compatibility
- \n and looks like this (yaml): \n ciphers: - TLS_AES_128_GCM_SHA256
- \ - TLS_AES_256_GCM_SHA384 - TLS_CHACHA20_POLY1305_SHA256
- \ minTLSVersion: TLSv1.3 \n NOTE: Currently unsupported."
- type: object
- nullable: true
- old:
- description: "old is a TLS security profile based on: \n https://wiki.mozilla.org/Security/Server_Side_TLS#Old_backward_compatibility
- \n and looks like this (yaml): \n ciphers: - TLS_AES_128_GCM_SHA256
- \ - TLS_AES_256_GCM_SHA384 - TLS_CHACHA20_POLY1305_SHA256
- \ - ECDHE-ECDSA-AES128-GCM-SHA256 - ECDHE-RSA-AES128-GCM-SHA256
- \ - ECDHE-ECDSA-AES256-GCM-SHA384 - ECDHE-RSA-AES256-GCM-SHA384
- \ - ECDHE-ECDSA-CHACHA20-POLY1305 - ECDHE-RSA-CHACHA20-POLY1305
- \ - DHE-RSA-AES128-GCM-SHA256 - DHE-RSA-AES256-GCM-SHA384
- \ - DHE-RSA-CHACHA20-POLY1305 - ECDHE-ECDSA-AES128-SHA256
- \ - ECDHE-RSA-AES128-SHA256 - ECDHE-ECDSA-AES128-SHA -
- ECDHE-RSA-AES128-SHA - ECDHE-ECDSA-AES256-SHA384 - ECDHE-RSA-AES256-SHA384
- \ - ECDHE-ECDSA-AES256-SHA - ECDHE-RSA-AES256-SHA -
- DHE-RSA-AES128-SHA256 - DHE-RSA-AES256-SHA256 - AES128-GCM-SHA256
- \ - AES256-GCM-SHA384 - AES128-SHA256 - AES256-SHA256
- \ - AES128-SHA - AES256-SHA - DES-CBC3-SHA minTLSVersion:
- TLSv1.0"
- type: object
- nullable: true
- type:
- description: "type is one of Old, Intermediate, Modern or Custom.
- Custom provides the ability to specify individual TLS security
- profile parameters. Old, Intermediate and Modern are TLS security
- profiles based on: \n https://wiki.mozilla.org/Security/Server_Side_TLS#Recommended_configurations
- \n The profiles are intent based, so they may change over time
- as new ciphers are developed and existing ciphers are found to
- be insecure. Depending on precisely which ciphers are available
- to a process, the list may be reduced. \n Note that the Modern
- profile is currently not supported because it is not yet well
- adopted by common software libraries."
- type: string
- status:
- description: status is the most recently observed status of the IngressController.
- type: object
- properties:
- availableReplicas:
- description: availableReplicas is number of observed available replicas
- according to the ingress controller deployment.
- type: integer
- format: int32
- conditions:
- description: "conditions is a list of conditions and their status. \n
- Available means the ingress controller deployment is available and
- servicing route and ingress resources (i.e, .status.availableReplicas
- equals .spec.replicas) \n There are additional conditions which indicate
- the status of other ingress controller features and capabilities.
- \n * LoadBalancerManaged - True if the following conditions are
- met: * The endpoint publishing strategy requires a service load
- balancer. - False if any of those conditions are unsatisfied. \n
- \ * LoadBalancerReady - True if the following conditions are met:
- \ * A load balancer is managed. * The load balancer is ready.
- \ - False if any of those conditions are unsatisfied. \n * DNSManaged
- \ - True if the following conditions are met: * The endpoint
- publishing strategy and platform support DNS. * The ingress controller
- domain is set. * dns.config.openshift.io/cluster configures DNS
- zones. - False if any of those conditions are unsatisfied. \n *
- DNSReady - True if the following conditions are met: * DNS is
- managed. * DNS records have been successfully created. - False
- if any of those conditions are unsatisfied."
- type: array
- items:
- description: OperatorCondition is just the standard condition fields.
- type: object
- properties:
- lastTransitionTime:
- type: string
- format: date-time
- message:
- type: string
- reason:
- type: string
- status:
- type: string
- type:
- type: string
- domain:
- description: domain is the actual domain in use.
- type: string
- endpointPublishingStrategy:
- description: endpointPublishingStrategy is the actual strategy in use.
- type: object
- required:
- - type
- properties:
- hostNetwork:
- description: hostNetwork holds parameters for the HostNetwork endpoint
- publishing strategy. Present only if type is HostNetwork.
- type: object
- loadBalancer:
- description: loadBalancer holds parameters for the load balancer.
- Present only if type is LoadBalancerService.
- type: object
- required:
- - scope
- properties:
- scope:
- description: scope indicates the scope at which the load balancer
- is exposed. Possible values are "External" and "Internal".
- type: string
- private:
- description: private holds parameters for the Private endpoint publishing
- strategy. Present only if type is Private.
- type: object
- type:
- description: "type is the publishing strategy to use. Valid values
- are: \n * LoadBalancerService \n Publishes the ingress controller
- using a Kubernetes LoadBalancer Service. \n In this configuration,
- the ingress controller deployment uses container networking. A
- LoadBalancer Service is created to publish the deployment. \n
- See: https://kubernetes.io/docs/concepts/services-networking/service/#loadbalancer
- \n If domain is set, a wildcard DNS record will be managed to
- point at the LoadBalancer Service's external name. DNS records
- are managed only in DNS zones defined by dns.config.openshift.io/cluster
- .spec.publicZone and .spec.privateZone. \n Wildcard DNS management
- is currently supported only on the AWS, Azure, and GCP platforms.
- \n * HostNetwork \n Publishes the ingress controller on node ports
- where the ingress controller is deployed. \n In this configuration,
- the ingress controller deployment uses host networking, bound
- to node ports 80 and 443. The user is responsible for configuring
- an external load balancer to publish the ingress controller via
- the node ports. \n * Private \n Does not publish the ingress controller.
- \n In this configuration, the ingress controller deployment uses
- container networking, and is not explicitly published. The user
- must manually publish the ingress controller."
- type: string
- observedGeneration:
- description: observedGeneration is the most recent generation observed.
- type: integer
- format: int64
- selector:
- description: selector is a label selector, in string format, for ingress
- controller pods corresponding to the IngressController. The number
- of matching pods should equal the value of availableReplicas.
- type: string
- tlsProfile:
- description: tlsProfile is the TLS connection configuration that is
- in effect.
- type: object
- properties:
- ciphers:
- description: "ciphers is used to specify the cipher algorithms that
- are negotiated during the TLS handshake. Operators may remove
- entries their operands do not support. For example, to use DES-CBC3-SHA
- \ (yaml): \n ciphers: - DES-CBC3-SHA"
- type: array
- items:
- type: string
- minTLSVersion:
- description: "minTLSVersion is used to specify the minimal version
- of the TLS protocol that is negotiated during the TLS handshake.
- For example, to use TLS versions 1.1, 1.2 and 1.3 (yaml): \n minTLSVersion:
- TLSv1.1 \n NOTE: currently the highest minTLSVersion allowed is
- VersionTLS12"
- type: string
- version: v1
- versions:
- - name: v1
- served: true
- storage: true
-status:
- acceptedNames:
- kind: ""
- plural: ""
- conditions: []
- storedVersions: []
diff --git a/vendor/github.com/openshift/api/operator/v1/0000_50_ingress-operator_00-ingresscontroller.crd.yaml b/vendor/github.com/openshift/api/operator/v1/0000_50_ingress-operator_00-ingresscontroller.crd.yaml
new file mode 100644
index 00000000000..a34f3452490
--- /dev/null
+++ b/vendor/github.com/openshift/api/operator/v1/0000_50_ingress-operator_00-ingresscontroller.crd.yaml
@@ -0,0 +1,1288 @@
+apiVersion: apiextensions.k8s.io/v1
+kind: CustomResourceDefinition
+metadata:
+ annotations:
+ api-approved.openshift.io: https://github.com/openshift/api/pull/616
+ include.release.openshift.io/ibm-cloud-managed: "true"
+ include.release.openshift.io/self-managed-high-availability: "true"
+ include.release.openshift.io/single-node-developer: "true"
+ name: ingresscontrollers.operator.openshift.io
+spec:
+ group: operator.openshift.io
+ names:
+ kind: IngressController
+ listKind: IngressControllerList
+ plural: ingresscontrollers
+ singular: ingresscontroller
+ scope: Namespaced
+ versions:
+ - name: v1
+ schema:
+ openAPIV3Schema:
+ description: "IngressController describes a managed ingress controller for
+ the cluster. The controller can service OpenShift Route and Kubernetes Ingress
+ resources. \n When an IngressController is created, a new ingress controller
+ deployment is created to allow external traffic to reach the services that
+ expose Ingress or Route resources. Updating this resource may lead to disruption
+ for public facing network connections as a new ingress controller revision
+ may be rolled out. \n https://kubernetes.io/docs/concepts/services-networking/ingress-controllers
+ \n Whenever possible, sensible defaults for the platform are used. See each
+ field for more details."
+ properties:
+ apiVersion:
+ description: 'APIVersion defines the versioned schema of this representation
+ of an object. Servers should convert recognized schemas to the latest
+ internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
+ type: string
+ kind:
+ description: 'Kind is a string value representing the REST resource this
+ object represents. Servers may infer this from the endpoint the client
+ submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
+ type: string
+ metadata:
+ type: object
+ spec:
+ description: spec is the specification of the desired behavior of the
+ IngressController.
+ properties:
+ defaultCertificate:
+ description: "defaultCertificate is a reference to a secret containing
+ the default certificate served by the ingress controller. When Routes
+ don't specify their own certificate, defaultCertificate is used.
+ \n The secret must contain the following keys and data: \n tls.crt:
+ certificate file contents tls.key: key file contents \n If unset,
+ a wildcard certificate is automatically generated and used. The
+ certificate is valid for the ingress controller domain (and subdomains)
+ and the generated certificate's CA will be automatically integrated
+ with the cluster's trust store. \n If a wildcard certificate is
+ used and shared by multiple HTTP/2 enabled routes (which implies
+ ALPN) then clients (i.e., notably browsers) are at liberty to reuse
+ open connections. This means a client can reuse a connection to
+ another route and that is likely to fail. This behaviour is generally
+ known as connection coalescing. \n The in-use certificate (whether
+ generated or user-specified) will be automatically integrated with
+ OpenShift's built-in OAuth server."
+ properties:
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ type: object
+ domain:
+ description: "domain is a DNS name serviced by the ingress controller
+ and is used to configure multiple features: \n * For the LoadBalancerService
+ endpoint publishing strategy, domain is used to configure DNS
+ records. See endpointPublishingStrategy. \n * When using a generated
+ default certificate, the certificate will be valid for domain
+ and its subdomains. See defaultCertificate. \n * The value is published
+ to individual Route statuses so that end-users know where to target
+ external DNS records. \n domain must be unique among all IngressControllers,
+ and cannot be updated. \n If empty, defaults to ingress.config.openshift.io/cluster
+ .spec.domain."
+ type: string
+ endpointPublishingStrategy:
+ description: "endpointPublishingStrategy is used to publish the ingress
+ controller endpoints to other networks, enable load balancer integrations,
+ etc. \n If unset, the default is based on infrastructure.config.openshift.io/cluster
+ .status.platform: \n AWS: LoadBalancerService (with External
+ scope) Azure: LoadBalancerService (with External scope) GCP:
+ \ LoadBalancerService (with External scope) IBMCloud: LoadBalancerService
+ (with External scope) Libvirt: HostNetwork \n Any other platform
+ types (including None) default to HostNetwork. \n endpointPublishingStrategy
+ cannot be updated."
+ properties:
+ hostNetwork:
+ description: hostNetwork holds parameters for the HostNetwork
+ endpoint publishing strategy. Present only if type is HostNetwork.
+ properties:
+ protocol:
+ description: "protocol specifies whether the IngressController
+ expects incoming connections to use plain TCP or whether
+ the IngressController expects PROXY protocol. \n PROXY protocol
+ can be used with load balancers that support it to communicate
+ the source addresses of client connections when forwarding
+ those connections to the IngressController. Using PROXY
+ protocol enables the IngressController to report those source
+ addresses instead of reporting the load balancer's address
+ in HTTP headers and logs. Note that enabling PROXY protocol
+ on the IngressController will cause connections to fail
+ if you are not using a load balancer that uses PROXY protocol
+ to forward connections to the IngressController. See http://www.haproxy.org/download/2.2/doc/proxy-protocol.txt
+ for information about PROXY protocol. \n The following values
+ are valid for this field: \n * The empty string. * \"TCP\".
+ * \"PROXY\". \n The empty string specifies the default,
+ which is TCP without PROXY protocol. Note that the default
+ is subject to change."
+ enum:
+ - ""
+ - TCP
+ - PROXY
+ type: string
+ type: object
+ loadBalancer:
+ description: loadBalancer holds parameters for the load balancer.
+ Present only if type is LoadBalancerService.
+ properties:
+ providerParameters:
+ description: "providerParameters holds desired load balancer
+ information specific to the underlying infrastructure provider.
+ \n If empty, defaults will be applied. See specific providerParameters
+ fields for details about their defaults."
+ properties:
+ aws:
+ description: "aws provides configuration settings that
+ are specific to AWS load balancers. \n If empty, defaults
+ will be applied. See specific aws fields for details
+ about their defaults."
+ properties:
+ classicLoadBalancer:
+ description: classicLoadBalancerParameters holds configuration
+ parameters for an AWS classic load balancer. Present
+ only if type is Classic.
+ type: object
+ networkLoadBalancer:
+ description: networkLoadBalancerParameters holds configuration
+ parameters for an AWS network load balancer. Present
+ only if type is NLB.
+ type: object
+ type:
+ description: "type is the type of AWS load balancer
+ to instantiate for an ingresscontroller. \n Valid
+ values are: \n * \"Classic\": A Classic Load Balancer
+ that makes routing decisions at either the transport
+ layer (TCP/SSL) or the application layer (HTTP/HTTPS).
+ See the following for additional details: \n https://docs.aws.amazon.com/AmazonECS/latest/developerguide/load-balancer-types.html#clb
+ \n * \"NLB\": A Network Load Balancer that makes
+ routing decisions at the transport layer (TCP/SSL).
+ See the following for additional details: \n https://docs.aws.amazon.com/AmazonECS/latest/developerguide/load-balancer-types.html#nlb"
+ enum:
+ - Classic
+ - NLB
+ type: string
+ required:
+ - type
+ type: object
+ gcp:
+ description: "gcp provides configuration settings that
+ are specific to GCP load balancers. \n If empty, defaults
+ will be applied. See specific gcp fields for details
+ about their defaults."
+ properties:
+ clientAccess:
+ description: "clientAccess describes how client access
+ is restricted for internal load balancers. \n Valid
+ values are: * \"Global\": Specifying an internal
+ load balancer with Global client access allows
+ clients from any region within the VPC to communicate
+ with the load balancer. \n https://cloud.google.com/kubernetes-engine/docs/how-to/internal-load-balancing#global_access
+ \n * \"Local\": Specifying an internal load balancer
+ with Local client access means only clients within
+ the same region (and VPC) as the GCP load balancer
+ \ can communicate with the load balancer. Note
+ that this is the default behavior. \n https://cloud.google.com/load-balancing/docs/internal#client_access"
+ enum:
+ - Global
+ - Local
+ type: string
+ type: object
+ type:
+ description: type is the underlying infrastructure provider
+ for the load balancer. Allowed values are "AWS", "Azure",
+ "BareMetal", "GCP", "OpenStack", and "VSphere".
+ enum:
+ - AWS
+ - Azure
+ - BareMetal
+ - GCP
+ - OpenStack
+ - VSphere
+ - IBM
+ type: string
+ required:
+ - type
+ type: object
+ scope:
+ description: scope indicates the scope at which the load balancer
+ is exposed. Possible values are "External" and "Internal".
+ enum:
+ - Internal
+ - External
+ type: string
+ required:
+ - scope
+ type: object
+ nodePort:
+ description: nodePort holds parameters for the NodePortService
+ endpoint publishing strategy. Present only if type is NodePortService.
+ properties:
+ protocol:
+ description: "protocol specifies whether the IngressController
+ expects incoming connections to use plain TCP or whether
+ the IngressController expects PROXY protocol. \n PROXY protocol
+ can be used with load balancers that support it to communicate
+ the source addresses of client connections when forwarding
+ those connections to the IngressController. Using PROXY
+ protocol enables the IngressController to report those source
+ addresses instead of reporting the load balancer's address
+ in HTTP headers and logs. Note that enabling PROXY protocol
+ on the IngressController will cause connections to fail
+ if you are not using a load balancer that uses PROXY protocol
+ to forward connections to the IngressController. See http://www.haproxy.org/download/2.2/doc/proxy-protocol.txt
+ for information about PROXY protocol. \n The following values
+ are valid for this field: \n * The empty string. * \"TCP\".
+ * \"PROXY\". \n The empty string specifies the default,
+ which is TCP without PROXY protocol. Note that the default
+ is subject to change."
+ enum:
+ - ""
+ - TCP
+ - PROXY
+ type: string
+ type: object
+ private:
+ description: private holds parameters for the Private endpoint
+ publishing strategy. Present only if type is Private.
+ type: object
+ type:
+ description: "type is the publishing strategy to use. Valid values
+ are: \n * LoadBalancerService \n Publishes the ingress controller
+ using a Kubernetes LoadBalancer Service. \n In this configuration,
+ the ingress controller deployment uses container networking.
+ A LoadBalancer Service is created to publish the deployment.
+ \n See: https://kubernetes.io/docs/concepts/services-networking/service/#loadbalancer
+ \n If domain is set, a wildcard DNS record will be managed to
+ point at the LoadBalancer Service's external name. DNS records
+ are managed only in DNS zones defined by dns.config.openshift.io/cluster
+ .spec.publicZone and .spec.privateZone. \n Wildcard DNS management
+ is currently supported only on the AWS, Azure, and GCP platforms.
+ \n * HostNetwork \n Publishes the ingress controller on node
+ ports where the ingress controller is deployed. \n In this configuration,
+ the ingress controller deployment uses host networking, bound
+ to node ports 80 and 443. The user is responsible for configuring
+ an external load balancer to publish the ingress controller
+ via the node ports. \n * Private \n Does not publish the ingress
+ controller. \n In this configuration, the ingress controller
+ deployment uses container networking, and is not explicitly
+ published. The user must manually publish the ingress controller.
+ \n * NodePortService \n Publishes the ingress controller using
+ a Kubernetes NodePort Service. \n In this configuration, the
+ ingress controller deployment uses container networking. A NodePort
+ Service is created to publish the deployment. The specific node
+ ports are dynamically allocated by OpenShift; however, to support
+ static port allocations, user changes to the node port field
+ of the managed NodePort Service will preserved."
+ enum:
+ - LoadBalancerService
+ - HostNetwork
+ - Private
+ - NodePortService
+ type: string
+ required:
+ - type
+ type: object
+ httpErrorCodePages:
+ description: httpErrorCodePages specifies a configmap with custom
+ error pages. The administrator must create this configmap in the
+ openshift-config namespace. This configmap should have keys in the
+ format "error-page-.http", where is an
+ HTTP error code. For example, "error-page-503.http" defines an error
+ page for HTTP 503 responses. Currently only error pages for 503
+ and 404 responses can be customized. Each value in the configmap
+ should be the full response, including HTTP headers. Eg- https://raw.githubusercontent.com/openshift/router/fadab45747a9b30cc3f0a4b41ad2871f95827a93/images/router/haproxy/conf/error-page-503.http
+ If this field is empty, the ingress controller uses the default
+ error pages.
+ properties:
+ name:
+ description: name is the metadata.name of the referenced config
+ map
+ type: string
+ required:
+ - name
+ type: object
+ httpHeaders:
+ description: "httpHeaders defines policy for HTTP headers. \n If this
+ field is empty, the default values are used."
+ properties:
+ forwardedHeaderPolicy:
+ description: "forwardedHeaderPolicy specifies when and how the
+ IngressController sets the Forwarded, X-Forwarded-For, X-Forwarded-Host,
+ X-Forwarded-Port, X-Forwarded-Proto, and X-Forwarded-Proto-Version
+ HTTP headers. The value may be one of the following: \n * \"Append\",
+ which specifies that the IngressController appends the headers,
+ preserving existing headers. \n * \"Replace\", which specifies
+ that the IngressController sets the headers, replacing any
+ existing Forwarded or X-Forwarded-* headers. \n * \"IfNone\",
+ which specifies that the IngressController sets the headers
+ if they are not already set. \n * \"Never\", which specifies
+ that the IngressController never sets the headers, preserving
+ any existing headers. \n By default, the policy is \"Append\"."
+ enum:
+ - Append
+ - Replace
+ - IfNone
+ - Never
+ type: string
+ headerNameCaseAdjustments:
+ description: "headerNameCaseAdjustments specifies case adjustments
+ that can be applied to HTTP header names. Each adjustment is
+ specified as an HTTP header name with the desired capitalization.
+ \ For example, specifying \"X-Forwarded-For\" indicates that
+ the \"x-forwarded-for\" HTTP header should be adjusted to have
+ the specified capitalization. \n These adjustments are only
+ applied to cleartext, edge-terminated, and re-encrypt routes,
+ and only when using HTTP/1. \n For request headers, these adjustments
+ are applied only for routes that have the haproxy.router.openshift.io/h1-adjust-case=true
+ annotation. For response headers, these adjustments are applied
+ to all HTTP responses. \n If this field is empty, no request
+ headers are adjusted."
+ items:
+ description: IngressControllerHTTPHeaderNameCaseAdjustment is
+ the name of an HTTP header (for example, "X-Forwarded-For")
+ in the desired capitalization. The value must be a valid
+ HTTP header name as defined in RFC 2616 section 4.2.
+ maxLength: 1024
+ minLength: 0
+ pattern: ^$|^[-!#$%&'*+.0-9A-Z^_`a-z|~]+$
+ type: string
+ nullable: true
+ type: array
+ uniqueId:
+ description: "uniqueId describes configuration for a custom HTTP
+ header that the ingress controller should inject into incoming
+ HTTP requests. Typically, this header is configured to have
+ a value that is unique to the HTTP request. The header can
+ be used by applications or included in access logs to facilitate
+ tracing individual HTTP requests. \n If this field is empty,
+ no such header is injected into requests."
+ properties:
+ format:
+ description: 'format specifies the format for the injected
+ HTTP header''s value. This field has no effect unless name
+ is specified. For the HAProxy-based ingress controller
+ implementation, this format uses the same syntax as the
+ HTTP log format. If the field is empty, the default value
+ is "%{+X}o\\ %ci:%cp_%fi:%fp_%Ts_%rt:%pid"; see the corresponding
+ HAProxy documentation: http://cbonte.github.io/haproxy-dconv/2.0/configuration.html#8.2.3'
+ maxLength: 1024
+ minLength: 0
+ pattern: ^(%(%|(\{[-+]?[QXE](,[-+]?[QXE])*\})?([A-Za-z]+|\[[.0-9A-Z_a-z]+(\([^)]+\))?(,[.0-9A-Z_a-z]+(\([^)]+\))?)*\]))|[^%[:cntrl:]])*$
+ type: string
+ name:
+ description: name specifies the name of the HTTP header (for
+ example, "unique-id") that the ingress controller should
+ inject into HTTP requests. The field's value must be a
+ valid HTTP header name as defined in RFC 2616 section 4.2. If
+ the field is empty, no header is injected.
+ maxLength: 1024
+ minLength: 0
+ pattern: ^$|^[-!#$%&'*+.0-9A-Z^_`a-z|~]+$
+ type: string
+ type: object
+ type: object
+ logging:
+ description: logging defines parameters for what should be logged
+ where. If this field is empty, operational logs are enabled but
+ access logs are disabled.
+ properties:
+ access:
+ description: "access describes how the client requests should
+ be logged. \n If this field is empty, access logging is disabled."
+ properties:
+ destination:
+ description: destination is where access logs go.
+ properties:
+ container:
+ description: container holds parameters for the Container
+ logging destination. Present only if type is Container.
+ type: object
+ syslog:
+ description: syslog holds parameters for a syslog endpoint. Present
+ only if type is Syslog.
+ oneOf:
+ - properties:
+ address:
+ format: ipv4
+ - properties:
+ address:
+ format: ipv6
+ properties:
+ address:
+ description: address is the IP address of the syslog
+ endpoint that receives log messages.
+ type: string
+ facility:
+ description: "facility specifies the syslog facility
+ of log messages. \n If this field is empty, the
+ facility is \"local1\"."
+ enum:
+ - kern
+ - user
+ - mail
+ - daemon
+ - auth
+ - syslog
+ - lpr
+ - news
+ - uucp
+ - cron
+ - auth2
+ - ftp
+ - ntp
+ - audit
+ - alert
+ - cron2
+ - local0
+ - local1
+ - local2
+ - local3
+ - local4
+ - local5
+ - local6
+ - local7
+ type: string
+ port:
+ description: port is the UDP port number of the syslog
+ endpoint that receives log messages.
+ format: int32
+ maximum: 65535
+ minimum: 1
+ type: integer
+ required:
+ - address
+ - port
+ type: object
+ type:
+ description: "type is the type of destination for logs.
+ \ It must be one of the following: \n * Container \n
+ The ingress operator configures the sidecar container
+ named \"logs\" on the ingress controller pod and configures
+ the ingress controller to write logs to the sidecar.
+ \ The logs are then available as container logs. The
+ expectation is that the administrator configures a custom
+ logging solution that reads logs from this sidecar.
+ \ Note that using container logs means that logs may
+ be dropped if the rate of logs exceeds the container
+ runtime's or the custom logging solution's capacity.
+ \n * Syslog \n Logs are sent to a syslog endpoint. The
+ administrator must specify an endpoint that can receive
+ syslog messages. The expectation is that the administrator
+ has configured a custom syslog instance."
+ enum:
+ - Container
+ - Syslog
+ type: string
+ required:
+ - type
+ type: object
+ httpCaptureCookies:
+ description: httpCaptureCookies specifies HTTP cookies that
+ should be captured in access logs. If this field is empty,
+ no cookies are captured.
+ items:
+ description: IngressControllerCaptureHTTPCookie describes
+ an HTTP cookie that should be captured.
+ properties:
+ matchType:
+ description: matchType specifies the type of match to
+ be performed on the cookie name. Allowed values are
+ "Exact" for an exact string match and "Prefix" for
+ a string prefix match. If "Exact" is specified, a
+ name must be specified in the name field. If "Prefix"
+ is provided, a prefix must be specified in the namePrefix
+ field. For example, specifying matchType "Prefix"
+ and namePrefix "foo" will capture a cookie named "foo"
+ or "foobar" but not one named "bar". The first matching
+ cookie is captured.
+ enum:
+ - Exact
+ - Prefix
+ type: string
+ maxLength:
+ description: maxLength specifies a maximum length of
+ the string that will be logged, which includes the
+ cookie name, cookie value, and one-character delimiter. If
+ the log entry exceeds this length, the value will
+ be truncated in the log message. Note that the ingress
+ controller may impose a separate bound on the total
+ length of HTTP headers in a request.
+ maximum: 1024
+ minimum: 1
+ type: integer
+ name:
+ description: name specifies a cookie name. Its value
+ must be a valid HTTP cookie name as defined in RFC
+ 6265 section 4.1.
+ maxLength: 1024
+ minLength: 0
+ pattern: ^[-!#$%&'*+.0-9A-Z^_`a-z|~]*$
+ type: string
+ namePrefix:
+ description: namePrefix specifies a cookie name prefix. Its
+ value must be a valid HTTP cookie name as defined
+ in RFC 6265 section 4.1.
+ maxLength: 1024
+ minLength: 0
+ pattern: ^[-!#$%&'*+.0-9A-Z^_`a-z|~]*$
+ type: string
+ required:
+ - matchType
+ - maxLength
+ type: object
+ maxItems: 1
+ nullable: true
+ type: array
+ httpCaptureHeaders:
+ description: "httpCaptureHeaders defines HTTP headers that
+ should be captured in access logs. If this field is empty,
+ no headers are captured. \n Note that this option only applies
+ to cleartext HTTP connections and to secure HTTP connections
+ for which the ingress controller terminates encryption (that
+ is, edge-terminated or reencrypt connections). Headers
+ cannot be captured for TLS passthrough connections."
+ properties:
+ request:
+ description: "request specifies which HTTP request headers
+ to capture. \n If this field is empty, no request headers
+ are captured."
+ items:
+ description: IngressControllerCaptureHTTPHeader describes
+ an HTTP header that should be captured.
+ properties:
+ maxLength:
+ description: maxLength specifies a maximum length
+ for the header value. If a header value exceeds
+ this length, the value will be truncated in the
+ log message. Note that the ingress controller
+ may impose a separate bound on the total length
+ of HTTP headers in a request.
+ minimum: 1
+ type: integer
+ name:
+ description: name specifies a header name. Its
+ value must be a valid HTTP header name as defined
+ in RFC 2616 section 4.2.
+ pattern: ^[-!#$%&'*+.0-9A-Z^_`a-z|~]+$
+ type: string
+ required:
+ - maxLength
+ - name
+ type: object
+ nullable: true
+ type: array
+ response:
+ description: "response specifies which HTTP response headers
+ to capture. \n If this field is empty, no response headers
+ are captured."
+ items:
+ description: IngressControllerCaptureHTTPHeader describes
+ an HTTP header that should be captured.
+ properties:
+ maxLength:
+ description: maxLength specifies a maximum length
+ for the header value. If a header value exceeds
+ this length, the value will be truncated in the
+ log message. Note that the ingress controller
+ may impose a separate bound on the total length
+ of HTTP headers in a request.
+ minimum: 1
+ type: integer
+ name:
+ description: name specifies a header name. Its
+ value must be a valid HTTP header name as defined
+ in RFC 2616 section 4.2.
+ pattern: ^[-!#$%&'*+.0-9A-Z^_`a-z|~]+$
+ type: string
+ required:
+ - maxLength
+ - name
+ type: object
+ nullable: true
+ type: array
+ type: object
+ httpLogFormat:
+ description: "httpLogFormat specifies the format of the log
+ message for an HTTP request. \n If this field is empty,
+ log messages use the implementation's default HTTP log format.
+ \ For HAProxy's default HTTP log format, see the HAProxy
+ documentation: http://cbonte.github.io/haproxy-dconv/2.0/configuration.html#8.2.3
+ \n Note that this format only applies to cleartext HTTP
+ connections and to secure HTTP connections for which the
+ ingress controller terminates encryption (that is, edge-terminated
+ or reencrypt connections). It does not affect the log format
+ for TLS passthrough connections."
+ type: string
+ required:
+ - destination
+ type: object
+ type: object
+ namespaceSelector:
+ description: "namespaceSelector is used to filter the set of namespaces
+ serviced by the ingress controller. This is useful for implementing
+ shards. \n If unset, the default is no filtering."
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of label selector requirements.
+ The requirements are ANDed.
+ items:
+ description: A label selector requirement is a selector that
+ contains values, a key, and an operator that relates the key
+ and values.
+ properties:
+ key:
+ description: key is the label key that the selector applies
+ to.
+ type: string
+ operator:
+ description: operator represents a key's relationship to
+ a set of values. Valid operators are In, NotIn, Exists
+ and DoesNotExist.
+ type: string
+ values:
+ description: values is an array of string values. If the
+ operator is In or NotIn, the values array must be non-empty.
+ If the operator is Exists or DoesNotExist, the values
+ array must be empty. This array is replaced during a strategic
+ merge patch.
+ items:
+ type: string
+ type: array
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: matchLabels is a map of {key,value} pairs. A single
+ {key,value} in the matchLabels map is equivalent to an element
+ of matchExpressions, whose key field is "key", the operator
+ is "In", and the values array contains only "value". The requirements
+ are ANDed.
+ type: object
+ type: object
+ nodePlacement:
+ description: "nodePlacement enables explicit control over the scheduling
+ of the ingress controller. \n If unset, defaults are used. See NodePlacement
+ for more details."
+ properties:
+ nodeSelector:
+ description: "nodeSelector is the node selector applied to ingress
+ controller deployments. \n If unset, the default is: \n kubernetes.io/os:
+ linux node-role.kubernetes.io/worker: '' \n If set, the specified
+ selector is used and replaces the default."
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of label selector
+ requirements. The requirements are ANDed.
+ items:
+ description: A label selector requirement is a selector
+ that contains values, a key, and an operator that relates
+ the key and values.
+ properties:
+ key:
+ description: key is the label key that the selector
+ applies to.
+ type: string
+ operator:
+ description: operator represents a key's relationship
+ to a set of values. Valid operators are In, NotIn,
+ Exists and DoesNotExist.
+ type: string
+ values:
+ description: values is an array of string values. If
+ the operator is In or NotIn, the values array must
+ be non-empty. If the operator is Exists or DoesNotExist,
+ the values array must be empty. This array is replaced
+ during a strategic merge patch.
+ items:
+ type: string
+ type: array
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: matchLabels is a map of {key,value} pairs. A
+ single {key,value} in the matchLabels map is equivalent
+ to an element of matchExpressions, whose key field is "key",
+ the operator is "In", and the values array contains only
+ "value". The requirements are ANDed.
+ type: object
+ type: object
+ tolerations:
+ description: "tolerations is a list of tolerations applied to
+ ingress controller deployments. \n The default is an empty list.
+ \n See https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/"
+ items:
+ description: The pod this Toleration is attached to tolerates
+ any taint that matches the triple using
+ the matching operator .
+ properties:
+ effect:
+ description: Effect indicates the taint effect to match.
+ Empty means match all taint effects. When specified, allowed
+ values are NoSchedule, PreferNoSchedule and NoExecute.
+ type: string
+ key:
+ description: Key is the taint key that the toleration applies
+ to. Empty means match all taint keys. If the key is empty,
+ operator must be Exists; this combination means to match
+ all values and all keys.
+ type: string
+ operator:
+ description: Operator represents a key's relationship to
+ the value. Valid operators are Exists and Equal. Defaults
+ to Equal. Exists is equivalent to wildcard for value,
+ so that a pod can tolerate all taints of a particular
+ category.
+ type: string
+ tolerationSeconds:
+ description: TolerationSeconds represents the period of
+ time the toleration (which must be of effect NoExecute,
+ otherwise this field is ignored) tolerates the taint.
+ By default, it is not set, which means tolerate the taint
+ forever (do not evict). Zero and negative values will
+ be treated as 0 (evict immediately) by the system.
+ format: int64
+ type: integer
+ value:
+ description: Value is the taint value the toleration matches
+ to. If the operator is Exists, the value should be empty,
+ otherwise just a regular string.
+ type: string
+ type: object
+ type: array
+ type: object
+ replicas:
+ description: replicas is the desired number of ingress controller
+ replicas. If unset, defaults to 2.
+ format: int32
+ type: integer
+ routeAdmission:
+ description: "routeAdmission defines a policy for handling new route
+ claims (for example, to allow or deny claims across namespaces).
+ \n If empty, defaults will be applied. See specific routeAdmission
+ fields for details about their defaults."
+ properties:
+ namespaceOwnership:
+ description: "namespaceOwnership describes how host name claims
+ across namespaces should be handled. \n Value must be one of:
+ \n - Strict: Do not allow routes in different namespaces to
+ claim the same host. \n - InterNamespaceAllowed: Allow routes
+ to claim different paths of the same host name across namespaces.
+ \n If empty, the default is Strict."
+ enum:
+ - InterNamespaceAllowed
+ - Strict
+ type: string
+ wildcardPolicy:
+ description: "wildcardPolicy describes how routes with wildcard
+ policies should be handled for the ingress controller. WildcardPolicy
+ controls use of routes [1] exposed by the ingress controller
+ based on the route's wildcard policy. \n [1] https://github.com/openshift/api/blob/master/route/v1/types.go
+ \n Note: Updating WildcardPolicy from WildcardsAllowed to WildcardsDisallowed
+ will cause admitted routes with a wildcard policy of Subdomain
+ to stop working. These routes must be updated to a wildcard
+ policy of None to be readmitted by the ingress controller. \n
+ WildcardPolicy supports WildcardsAllowed and WildcardsDisallowed
+ values. \n If empty, defaults to \"WildcardsDisallowed\"."
+ enum:
+ - WildcardsAllowed
+ - WildcardsDisallowed
+ type: string
+ type: object
+ routeSelector:
+ description: "routeSelector is used to filter the set of Routes serviced
+ by the ingress controller. This is useful for implementing shards.
+ \n If unset, the default is no filtering."
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of label selector requirements.
+ The requirements are ANDed.
+ items:
+ description: A label selector requirement is a selector that
+ contains values, a key, and an operator that relates the key
+ and values.
+ properties:
+ key:
+ description: key is the label key that the selector applies
+ to.
+ type: string
+ operator:
+ description: operator represents a key's relationship to
+ a set of values. Valid operators are In, NotIn, Exists
+ and DoesNotExist.
+ type: string
+ values:
+ description: values is an array of string values. If the
+ operator is In or NotIn, the values array must be non-empty.
+ If the operator is Exists or DoesNotExist, the values
+ array must be empty. This array is replaced during a strategic
+ merge patch.
+ items:
+ type: string
+ type: array
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: matchLabels is a map of {key,value} pairs. A single
+ {key,value} in the matchLabels map is equivalent to an element
+ of matchExpressions, whose key field is "key", the operator
+ is "In", and the values array contains only "value". The requirements
+ are ANDed.
+ type: object
+ type: object
+ tlsSecurityProfile:
+ description: "tlsSecurityProfile specifies settings for TLS connections
+ for ingresscontrollers. \n If unset, the default is based on the
+ apiservers.config.openshift.io/cluster resource. \n Note that when
+ using the Old, Intermediate, and Modern profile types, the effective
+ profile configuration is subject to change between releases. For
+ example, given a specification to use the Intermediate profile deployed
+ on release X.Y.Z, an upgrade to release X.Y.Z+1 may cause a new
+ profile configuration to be applied to the ingress controller, resulting
+ in a rollout. \n Note that the minimum TLS version for ingress controllers
+ is 1.1, and the maximum TLS version is 1.2. An implication of this
+ restriction is that the Modern TLS profile type cannot be used because
+ it requires TLS 1.3."
+ properties:
+ custom:
+ description: "custom is a user-defined TLS security profile. Be
+ extremely careful using a custom profile as invalid configurations
+ can be catastrophic. An example custom profile looks like this:
+ \n ciphers: - ECDHE-ECDSA-CHACHA20-POLY1305 - ECDHE-RSA-CHACHA20-POLY1305
+ \ - ECDHE-RSA-AES128-GCM-SHA256 - ECDHE-ECDSA-AES128-GCM-SHA256
+ \ minTLSVersion: TLSv1.1"
+ nullable: true
+ properties:
+ ciphers:
+ description: "ciphers is used to specify the cipher algorithms
+ that are negotiated during the TLS handshake. Operators
+ may remove entries their operands do not support. For example,
+ to use DES-CBC3-SHA (yaml): \n ciphers: - DES-CBC3-SHA"
+ items:
+ type: string
+ type: array
+ minTLSVersion:
+ description: "minTLSVersion is used to specify the minimal
+ version of the TLS protocol that is negotiated during the
+ TLS handshake. For example, to use TLS versions 1.1, 1.2
+ and 1.3 (yaml): \n minTLSVersion: TLSv1.1 \n NOTE: currently
+ the highest minTLSVersion allowed is VersionTLS12"
+ enum:
+ - VersionTLS10
+ - VersionTLS11
+ - VersionTLS12
+ - VersionTLS13
+ type: string
+ type: object
+ intermediate:
+ description: "intermediate is a TLS security profile based on:
+ \n https://wiki.mozilla.org/Security/Server_Side_TLS#Intermediate_compatibility_.28recommended.29
+ \n and looks like this (yaml): \n ciphers: - TLS_AES_128_GCM_SHA256
+ \ - TLS_AES_256_GCM_SHA384 - TLS_CHACHA20_POLY1305_SHA256
+ \ - ECDHE-ECDSA-AES128-GCM-SHA256 - ECDHE-RSA-AES128-GCM-SHA256
+ \ - ECDHE-ECDSA-AES256-GCM-SHA384 - ECDHE-RSA-AES256-GCM-SHA384
+ \ - ECDHE-ECDSA-CHACHA20-POLY1305 - ECDHE-RSA-CHACHA20-POLY1305
+ \ - DHE-RSA-AES128-GCM-SHA256 - DHE-RSA-AES256-GCM-SHA384
+ \ minTLSVersion: TLSv1.2"
+ nullable: true
+ type: object
+ modern:
+ description: "modern is a TLS security profile based on: \n https://wiki.mozilla.org/Security/Server_Side_TLS#Modern_compatibility
+ \n and looks like this (yaml): \n ciphers: - TLS_AES_128_GCM_SHA256
+ \ - TLS_AES_256_GCM_SHA384 - TLS_CHACHA20_POLY1305_SHA256
+ \ minTLSVersion: TLSv1.3 \n NOTE: Currently unsupported."
+ nullable: true
+ type: object
+ old:
+ description: "old is a TLS security profile based on: \n https://wiki.mozilla.org/Security/Server_Side_TLS#Old_backward_compatibility
+ \n and looks like this (yaml): \n ciphers: - TLS_AES_128_GCM_SHA256
+ \ - TLS_AES_256_GCM_SHA384 - TLS_CHACHA20_POLY1305_SHA256
+ \ - ECDHE-ECDSA-AES128-GCM-SHA256 - ECDHE-RSA-AES128-GCM-SHA256
+ \ - ECDHE-ECDSA-AES256-GCM-SHA384 - ECDHE-RSA-AES256-GCM-SHA384
+ \ - ECDHE-ECDSA-CHACHA20-POLY1305 - ECDHE-RSA-CHACHA20-POLY1305
+ \ - DHE-RSA-AES128-GCM-SHA256 - DHE-RSA-AES256-GCM-SHA384
+ \ - DHE-RSA-CHACHA20-POLY1305 - ECDHE-ECDSA-AES128-SHA256
+ \ - ECDHE-RSA-AES128-SHA256 - ECDHE-ECDSA-AES128-SHA
+ \ - ECDHE-RSA-AES128-SHA - ECDHE-ECDSA-AES256-SHA384
+ \ - ECDHE-RSA-AES256-SHA384 - ECDHE-ECDSA-AES256-SHA
+ \ - ECDHE-RSA-AES256-SHA - DHE-RSA-AES128-SHA256 -
+ DHE-RSA-AES256-SHA256 - AES128-GCM-SHA256 - AES256-GCM-SHA384
+ \ - AES128-SHA256 - AES256-SHA256 - AES128-SHA -
+ AES256-SHA - DES-CBC3-SHA minTLSVersion: TLSv1.0"
+ nullable: true
+ type: object
+ type:
+ description: "type is one of Old, Intermediate, Modern or Custom.
+ Custom provides the ability to specify individual TLS security
+ profile parameters. Old, Intermediate and Modern are TLS security
+ profiles based on: \n https://wiki.mozilla.org/Security/Server_Side_TLS#Recommended_configurations
+ \n The profiles are intent based, so they may change over time
+ as new ciphers are developed and existing ciphers are found
+ to be insecure. Depending on precisely which ciphers are available
+ to a process, the list may be reduced. \n Note that the Modern
+ profile is currently not supported because it is not yet well
+ adopted by common software libraries."
+ enum:
+ - Old
+ - Intermediate
+ - Modern
+ - Custom
+ type: string
+ type: object
+ tuningOptions:
+ description: "tuningOptions defines parameters for adjusting the performance
+ of ingress controller pods. All fields are optional and will use
+ their respective defaults if not set. See specific tuningOptions
+ fields for more details. \n Setting fields within tuningOptions
+ is generally not recommended. The default values are suitable for
+ most configurations."
+ properties:
+ headerBufferBytes:
+ description: "headerBufferBytes describes how much memory should
+ be reserved (in bytes) for IngressController connection sessions.
+ Note that this value must be at least 16384 if HTTP/2 is enabled
+ for the IngressController (https://tools.ietf.org/html/rfc7540).
+ If this field is empty, the IngressController will use a default
+ value of 32768 bytes. \n Setting this field is generally not
+ recommended as headerBufferBytes values that are too small may
+ break the IngressController and headerBufferBytes values that
+ are too large could cause the IngressController to use significantly
+ more memory than necessary."
+ format: int32
+ minimum: 16384
+ type: integer
+ headerBufferMaxRewriteBytes:
+ description: "headerBufferMaxRewriteBytes describes how much memory
+ should be reserved (in bytes) from headerBufferBytes for HTTP
+ header rewriting and appending for IngressController connection
+ sessions. Note that incoming HTTP requests will be limited to
+ (headerBufferBytes - headerBufferMaxRewriteBytes) bytes, meaning
+ headerBufferBytes must be greater than headerBufferMaxRewriteBytes.
+ If this field is empty, the IngressController will use a default
+ value of 8192 bytes. \n Setting this field is generally not
+ recommended as headerBufferMaxRewriteBytes values that are too
+ small may break the IngressController and headerBufferMaxRewriteBytes
+ values that are too large could cause the IngressController
+ to use significantly more memory than necessary."
+ format: int32
+ minimum: 4096
+ type: integer
+ threadCount:
+ description: "threadCount defines the number of threads created
+ per HAProxy process. Creating more threads allows each ingress
+ controller pod to handle more connections, at the cost of more
+ system resources being used. HAProxy currently supports up to
+ 64 threads. If this field is empty, the IngressController will
+ use the default value. The current default is 4 threads, but
+ this may change in future releases. \n Setting this field is
+ generally not recommended. Increasing the number of HAProxy
+ threads allows ingress controller pods to utilize more CPU time
+ under load, potentially starving other pods if set too high.
+ Reducing the number of threads may cause the ingress controller
+ to perform poorly."
+ format: int32
+ maximum: 64
+ minimum: 1
+ type: integer
+ type: object
+ unsupportedConfigOverrides:
+ description: unsupportedConfigOverrides allows specifying unsupported
+ configuration options. Its use is unsupported.
+ nullable: true
+ type: object
+ x-kubernetes-preserve-unknown-fields: true
+ type: object
+ status:
+ description: status is the most recently observed status of the IngressController.
+ properties:
+ availableReplicas:
+ description: availableReplicas is number of observed available replicas
+ according to the ingress controller deployment.
+ format: int32
+ type: integer
+ conditions:
+ description: "conditions is a list of conditions and their status.
+ \n Available means the ingress controller deployment is available
+ and servicing route and ingress resources (i.e, .status.availableReplicas
+ equals .spec.replicas) \n There are additional conditions which
+ indicate the status of other ingress controller features and capabilities.
+ \n * LoadBalancerManaged - True if the following conditions
+ are met: * The endpoint publishing strategy requires a service
+ load balancer. - False if any of those conditions are unsatisfied.
+ \n * LoadBalancerReady - True if the following conditions are
+ met: * A load balancer is managed. * The load balancer is
+ ready. - False if any of those conditions are unsatisfied. \n
+ \ * DNSManaged - True if the following conditions are met: *
+ The endpoint publishing strategy and platform support DNS. *
+ The ingress controller domain is set. * dns.config.openshift.io/cluster
+ configures DNS zones. - False if any of those conditions are unsatisfied.
+ \n * DNSReady - True if the following conditions are met: *
+ DNS is managed. * DNS records have been successfully created.
+ \ - False if any of those conditions are unsatisfied."
+ items:
+ description: OperatorCondition is just the standard condition fields.
+ properties:
+ lastTransitionTime:
+ format: date-time
+ type: string
+ message:
+ type: string
+ reason:
+ type: string
+ status:
+ type: string
+ type:
+ type: string
+ type: object
+ type: array
+ domain:
+ description: domain is the actual domain in use.
+ type: string
+ endpointPublishingStrategy:
+ description: endpointPublishingStrategy is the actual strategy in
+ use.
+ properties:
+ hostNetwork:
+ description: hostNetwork holds parameters for the HostNetwork
+ endpoint publishing strategy. Present only if type is HostNetwork.
+ properties:
+ protocol:
+ description: "protocol specifies whether the IngressController
+ expects incoming connections to use plain TCP or whether
+ the IngressController expects PROXY protocol. \n PROXY protocol
+ can be used with load balancers that support it to communicate
+ the source addresses of client connections when forwarding
+ those connections to the IngressController. Using PROXY
+ protocol enables the IngressController to report those source
+ addresses instead of reporting the load balancer's address
+ in HTTP headers and logs. Note that enabling PROXY protocol
+ on the IngressController will cause connections to fail
+ if you are not using a load balancer that uses PROXY protocol
+ to forward connections to the IngressController. See http://www.haproxy.org/download/2.2/doc/proxy-protocol.txt
+ for information about PROXY protocol. \n The following values
+ are valid for this field: \n * The empty string. * \"TCP\".
+ * \"PROXY\". \n The empty string specifies the default,
+ which is TCP without PROXY protocol. Note that the default
+ is subject to change."
+ enum:
+ - ""
+ - TCP
+ - PROXY
+ type: string
+ type: object
+ loadBalancer:
+ description: loadBalancer holds parameters for the load balancer.
+ Present only if type is LoadBalancerService.
+ properties:
+ providerParameters:
+ description: "providerParameters holds desired load balancer
+ information specific to the underlying infrastructure provider.
+ \n If empty, defaults will be applied. See specific providerParameters
+ fields for details about their defaults."
+ properties:
+ aws:
+ description: "aws provides configuration settings that
+ are specific to AWS load balancers. \n If empty, defaults
+ will be applied. See specific aws fields for details
+ about their defaults."
+ properties:
+ classicLoadBalancer:
+ description: classicLoadBalancerParameters holds configuration
+ parameters for an AWS classic load balancer. Present
+ only if type is Classic.
+ type: object
+ networkLoadBalancer:
+ description: networkLoadBalancerParameters holds configuration
+ parameters for an AWS network load balancer. Present
+ only if type is NLB.
+ type: object
+ type:
+ description: "type is the type of AWS load balancer
+ to instantiate for an ingresscontroller. \n Valid
+ values are: \n * \"Classic\": A Classic Load Balancer
+ that makes routing decisions at either the transport
+ layer (TCP/SSL) or the application layer (HTTP/HTTPS).
+ See the following for additional details: \n https://docs.aws.amazon.com/AmazonECS/latest/developerguide/load-balancer-types.html#clb
+ \n * \"NLB\": A Network Load Balancer that makes
+ routing decisions at the transport layer (TCP/SSL).
+ See the following for additional details: \n https://docs.aws.amazon.com/AmazonECS/latest/developerguide/load-balancer-types.html#nlb"
+ enum:
+ - Classic
+ - NLB
+ type: string
+ required:
+ - type
+ type: object
+ gcp:
+ description: "gcp provides configuration settings that
+ are specific to GCP load balancers. \n If empty, defaults
+ will be applied. See specific gcp fields for details
+ about their defaults."
+ properties:
+ clientAccess:
+ description: "clientAccess describes how client access
+ is restricted for internal load balancers. \n Valid
+ values are: * \"Global\": Specifying an internal
+ load balancer with Global client access allows
+ clients from any region within the VPC to communicate
+ with the load balancer. \n https://cloud.google.com/kubernetes-engine/docs/how-to/internal-load-balancing#global_access
+ \n * \"Local\": Specifying an internal load balancer
+ with Local client access means only clients within
+ the same region (and VPC) as the GCP load balancer
+ \ can communicate with the load balancer. Note
+ that this is the default behavior. \n https://cloud.google.com/load-balancing/docs/internal#client_access"
+ enum:
+ - Global
+ - Local
+ type: string
+ type: object
+ type:
+ description: type is the underlying infrastructure provider
+ for the load balancer. Allowed values are "AWS", "Azure",
+ "BareMetal", "GCP", "OpenStack", and "VSphere".
+ enum:
+ - AWS
+ - Azure
+ - BareMetal
+ - GCP
+ - OpenStack
+ - VSphere
+ - IBM
+ type: string
+ required:
+ - type
+ type: object
+ scope:
+ description: scope indicates the scope at which the load balancer
+ is exposed. Possible values are "External" and "Internal".
+ enum:
+ - Internal
+ - External
+ type: string
+ required:
+ - scope
+ type: object
+ nodePort:
+ description: nodePort holds parameters for the NodePortService
+ endpoint publishing strategy. Present only if type is NodePortService.
+ properties:
+ protocol:
+ description: "protocol specifies whether the IngressController
+ expects incoming connections to use plain TCP or whether
+ the IngressController expects PROXY protocol. \n PROXY protocol
+ can be used with load balancers that support it to communicate
+ the source addresses of client connections when forwarding
+ those connections to the IngressController. Using PROXY
+ protocol enables the IngressController to report those source
+ addresses instead of reporting the load balancer's address
+ in HTTP headers and logs. Note that enabling PROXY protocol
+ on the IngressController will cause connections to fail
+ if you are not using a load balancer that uses PROXY protocol
+ to forward connections to the IngressController. See http://www.haproxy.org/download/2.2/doc/proxy-protocol.txt
+ for information about PROXY protocol. \n The following values
+ are valid for this field: \n * The empty string. * \"TCP\".
+ * \"PROXY\". \n The empty string specifies the default,
+ which is TCP without PROXY protocol. Note that the default
+ is subject to change."
+ enum:
+ - ""
+ - TCP
+ - PROXY
+ type: string
+ type: object
+ private:
+ description: private holds parameters for the Private endpoint
+ publishing strategy. Present only if type is Private.
+ type: object
+ type:
+ description: "type is the publishing strategy to use. Valid values
+ are: \n * LoadBalancerService \n Publishes the ingress controller
+ using a Kubernetes LoadBalancer Service. \n In this configuration,
+ the ingress controller deployment uses container networking.
+ A LoadBalancer Service is created to publish the deployment.
+ \n See: https://kubernetes.io/docs/concepts/services-networking/service/#loadbalancer
+ \n If domain is set, a wildcard DNS record will be managed to
+ point at the LoadBalancer Service's external name. DNS records
+ are managed only in DNS zones defined by dns.config.openshift.io/cluster
+ .spec.publicZone and .spec.privateZone. \n Wildcard DNS management
+ is currently supported only on the AWS, Azure, and GCP platforms.
+ \n * HostNetwork \n Publishes the ingress controller on node
+ ports where the ingress controller is deployed. \n In this configuration,
+ the ingress controller deployment uses host networking, bound
+ to node ports 80 and 443. The user is responsible for configuring
+ an external load balancer to publish the ingress controller
+ via the node ports. \n * Private \n Does not publish the ingress
+ controller. \n In this configuration, the ingress controller
+ deployment uses container networking, and is not explicitly
+ published. The user must manually publish the ingress controller.
+ \n * NodePortService \n Publishes the ingress controller using
+ a Kubernetes NodePort Service. \n In this configuration, the
+ ingress controller deployment uses container networking. A NodePort
+ Service is created to publish the deployment. The specific node
+ ports are dynamically allocated by OpenShift; however, to support
+ static port allocations, user changes to the node port field
+ of the managed NodePort Service will preserved."
+ enum:
+ - LoadBalancerService
+ - HostNetwork
+ - Private
+ - NodePortService
+ type: string
+ required:
+ - type
+ type: object
+ observedGeneration:
+ description: observedGeneration is the most recent generation observed.
+ format: int64
+ type: integer
+ selector:
+ description: selector is a label selector, in string format, for ingress
+ controller pods corresponding to the IngressController. The number
+ of matching pods should equal the value of availableReplicas.
+ type: string
+ tlsProfile:
+ description: tlsProfile is the TLS connection configuration that is
+ in effect.
+ properties:
+ ciphers:
+ description: "ciphers is used to specify the cipher algorithms
+ that are negotiated during the TLS handshake. Operators may
+ remove entries their operands do not support. For example,
+ to use DES-CBC3-SHA (yaml): \n ciphers: - DES-CBC3-SHA"
+ items:
+ type: string
+ type: array
+ minTLSVersion:
+ description: "minTLSVersion is used to specify the minimal version
+ of the TLS protocol that is negotiated during the TLS handshake.
+ For example, to use TLS versions 1.1, 1.2 and 1.3 (yaml): \n
+ \ minTLSVersion: TLSv1.1 \n NOTE: currently the highest minTLSVersion
+ allowed is VersionTLS12"
+ enum:
+ - VersionTLS10
+ - VersionTLS11
+ - VersionTLS12
+ - VersionTLS13
+ type: string
+ type: object
+ type: object
+ type: object
+ served: true
+ storage: true
+ subresources:
+ scale:
+ labelSelectorPath: .status.selector
+ specReplicasPath: .spec.replicas
+ statusReplicasPath: .status.availableReplicas
+ status: {}
diff --git a/vendor/github.com/openshift/api/operator/v1/0000_50_ingress-operator_00-ingresscontroller.crd.yaml-patch b/vendor/github.com/openshift/api/operator/v1/0000_50_ingress-operator_00-ingresscontroller.crd.yaml-patch
new file mode 100644
index 00000000000..6076c3a31b8
--- /dev/null
+++ b/vendor/github.com/openshift/api/operator/v1/0000_50_ingress-operator_00-ingresscontroller.crd.yaml-patch
@@ -0,0 +1,9 @@
+- op: add
+ path: /spec/versions/name=v1/schema/openAPIV3Schema/properties/spec/properties/logging/properties/access/properties/destination/properties/syslog/oneOf
+ value:
+ - properties:
+ address:
+ format: ipv4
+ - properties:
+ address:
+ format: ipv6
diff --git a/vendor/github.com/openshift/api/operator/v1/0000_50_service-ca-operator_02_crd.yaml b/vendor/github.com/openshift/api/operator/v1/0000_50_service-ca-operator_02_crd.yaml
index c3349ff9706..656b6184e75 100644
--- a/vendor/github.com/openshift/api/operator/v1/0000_50_service-ca-operator_02_crd.yaml
+++ b/vendor/github.com/openshift/api/operator/v1/0000_50_service-ca-operator_02_crd.yaml
@@ -1,138 +1,135 @@
-apiVersion: apiextensions.k8s.io/v1beta1
+apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
+ annotations:
+ api-approved.openshift.io: https://github.com/openshift/api/pull/475
+ include.release.openshift.io/ibm-cloud-managed: "true"
+ include.release.openshift.io/self-managed-high-availability: "true"
+ include.release.openshift.io/single-node-developer: "true"
name: servicecas.operator.openshift.io
spec:
- scope: Cluster
- preserveUnknownFields: false
group: operator.openshift.io
- version: v1
names:
kind: ServiceCA
+ listKind: ServiceCAList
plural: servicecas
singular: serviceca
- subresources:
- status: {}
- validation:
- openAPIV3Schema:
- description: ServiceCA provides information to configure an operator to manage
- the service cert controllers
- type: object
- required:
- - spec
- properties:
- apiVersion:
- description: 'APIVersion defines the versioned schema of this representation
- of an object. Servers should convert recognized schemas to the latest
- internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
- type: string
- kind:
- description: 'Kind is a string value representing the REST resource this
- object represents. Servers may infer this from the endpoint the client
- submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
- type: string
- metadata:
- type: object
- spec:
- description: spec holds user settable values for configuration
+ scope: Cluster
+ versions:
+ - name: v1
+ schema:
+ openAPIV3Schema:
+ description: ServiceCA provides information to configure an operator to manage the service cert controllers
type: object
+ required:
+ - spec
properties:
- logLevel:
- description: logLevel is an intent based logging for an overall component. It
- does not give fine grained control, but it is a simple way to manage
- coarse grained logging choices that operators have to interpret for
- their operands.
+ apiVersion:
+ description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
type: string
- managementState:
- description: managementState indicates whether and how the operator
- should manage the component
+ kind:
+ description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type: string
- pattern: ^(Managed|Unmanaged|Force|Removed)$
- observedConfig:
- description: observedConfig holds a sparse config that controller has
- observed from the cluster state. It exists in spec because it is
- an input to the level for the operator
+ metadata:
type: object
- nullable: true
- x-kubernetes-preserve-unknown-fields: true
- operatorLogLevel:
- description: operatorLogLevel is an intent based logging for the operator
- itself. It does not give fine grained control, but it is a simple
- way to manage coarse grained logging choices that operators have to
- interpret for themselves.
- type: string
- unsupportedConfigOverrides:
- description: 'unsupportedConfigOverrides holds a sparse config that
- will override any previously set options. It only needs to be the
- fields to override it will end up overlaying in the following order:
- 1. hardcoded defaults 2. observedConfig 3. unsupportedConfigOverrides'
+ spec:
+ description: spec holds user settable values for configuration
type: object
- nullable: true
- x-kubernetes-preserve-unknown-fields: true
- status:
- description: status holds observed values from the cluster. They may not
- be overridden.
- type: object
- properties:
- conditions:
- description: conditions is a list of conditions and their status
- type: array
- items:
- description: OperatorCondition is just the standard condition fields.
- type: object
- properties:
- lastTransitionTime:
- type: string
- format: date-time
- message:
- type: string
- reason:
- type: string
- status:
- type: string
- type:
- type: string
- generations:
- description: generations are used to determine when an item needs to
- be reconciled or has changed in a way that needs a reaction.
- type: array
- items:
- description: GenerationStatus keeps track of the generation for a
- given resource so that decisions about forced updates can be made.
- type: object
- properties:
- group:
- description: group is the group of the thing you're tracking
- type: string
- hash:
- description: hash is an optional field set for resources without
- generation that are content sensitive like secrets and configmaps
- type: string
- lastGeneration:
- description: lastGeneration is the last generation of the workload
- controller involved
- type: integer
- format: int64
- name:
- description: name is the name of the thing you're tracking
- type: string
- namespace:
- description: namespace is where the thing you're tracking is
- type: string
- resource:
- description: resource is the resource type of the thing you're
- tracking
- type: string
- observedGeneration:
- description: observedGeneration is the last generation change you've
- dealt with
- type: integer
- format: int64
- readyReplicas:
- description: readyReplicas indicates how many replicas are ready and
- at the desired state
- type: integer
- format: int32
- version:
- description: version is the level this availability applies to
- type: string
+ properties:
+ logLevel:
+ description: "logLevel is an intent based logging for an overall component. It does not give fine grained control, but it is a simple way to manage coarse grained logging choices that operators have to interpret for their operands. \n Valid values are: \"Normal\", \"Debug\", \"Trace\", \"TraceAll\". Defaults to \"Normal\"."
+ type: string
+ default: Normal
+ enum:
+ - ""
+ - Normal
+ - Debug
+ - Trace
+ - TraceAll
+ managementState:
+ description: managementState indicates whether and how the operator should manage the component
+ type: string
+ pattern: ^(Managed|Unmanaged|Force|Removed)$
+ observedConfig:
+ description: observedConfig holds a sparse config that controller has observed from the cluster state. It exists in spec because it is an input to the level for the operator
+ type: object
+ nullable: true
+ x-kubernetes-preserve-unknown-fields: true
+ operatorLogLevel:
+ description: "operatorLogLevel is an intent based logging for the operator itself. It does not give fine grained control, but it is a simple way to manage coarse grained logging choices that operators have to interpret for themselves. \n Valid values are: \"Normal\", \"Debug\", \"Trace\", \"TraceAll\". Defaults to \"Normal\"."
+ type: string
+ default: Normal
+ enum:
+ - ""
+ - Normal
+ - Debug
+ - Trace
+ - TraceAll
+ unsupportedConfigOverrides:
+ description: 'unsupportedConfigOverrides holds a sparse config that will override any previously set options. It only needs to be the fields to override it will end up overlaying in the following order: 1. hardcoded defaults 2. observedConfig 3. unsupportedConfigOverrides'
+ type: object
+ nullable: true
+ x-kubernetes-preserve-unknown-fields: true
+ status:
+ description: status holds observed values from the cluster. They may not be overridden.
+ type: object
+ properties:
+ conditions:
+ description: conditions is a list of conditions and their status
+ type: array
+ items:
+ description: OperatorCondition is just the standard condition fields.
+ type: object
+ properties:
+ lastTransitionTime:
+ type: string
+ format: date-time
+ message:
+ type: string
+ reason:
+ type: string
+ status:
+ type: string
+ type:
+ type: string
+ generations:
+ description: generations are used to determine when an item needs to be reconciled or has changed in a way that needs a reaction.
+ type: array
+ items:
+ description: GenerationStatus keeps track of the generation for a given resource so that decisions about forced updates can be made.
+ type: object
+ properties:
+ group:
+ description: group is the group of the thing you're tracking
+ type: string
+ hash:
+ description: hash is an optional field set for resources without generation that are content sensitive like secrets and configmaps
+ type: string
+ lastGeneration:
+ description: lastGeneration is the last generation of the workload controller involved
+ type: integer
+ format: int64
+ name:
+ description: name is the name of the thing you're tracking
+ type: string
+ namespace:
+ description: namespace is where the thing you're tracking is
+ type: string
+ resource:
+ description: resource is the resource type of the thing you're tracking
+ type: string
+ observedGeneration:
+ description: observedGeneration is the last generation change you've dealt with
+ type: integer
+ format: int64
+ readyReplicas:
+ description: readyReplicas indicates how many replicas are ready and at the desired state
+ type: integer
+ format: int32
+ version:
+ description: version is the level this availability applies to
+ type: string
+ served: true
+ storage: true
+ subresources:
+ status: {}
diff --git a/vendor/github.com/openshift/api/operator/v1/0000_70_cluster-network-operator_01_crd.yaml b/vendor/github.com/openshift/api/operator/v1/0000_70_cluster-network-operator_01_crd.yaml
index 61170cbb937..5918e6dd4b5 100644
--- a/vendor/github.com/openshift/api/operator/v1/0000_70_cluster-network-operator_01_crd.yaml
+++ b/vendor/github.com/openshift/api/operator/v1/0000_70_cluster-network-operator_01_crd.yaml
@@ -1,6 +1,10 @@
-apiVersion: apiextensions.k8s.io/v1beta1
+apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
+ annotations:
+ api-approved.openshift.io: https://github.com/openshift/api/pull/475
+ include.release.openshift.io/self-managed-high-availability: "true"
+ include.release.openshift.io/single-node-developer: "true"
name: networks.operator.openshift.io
spec:
group: operator.openshift.io
@@ -10,362 +14,430 @@ spec:
plural: networks
singular: network
scope: Cluster
- preserveUnknownFields: false
versions:
- - name: v1
- served: true
- storage: true
- validation:
- # Ensure we will be able to deserialize the object into the golang type
- openAPIV3Schema:
- description: Network describes the cluster's desired network configuration.
- It is consumed by the cluster-network-operator.
- type: object
- properties:
- apiVersion:
- description: 'APIVersion defines the versioned schema of this representation
- of an object. Servers should convert recognized schemas to the latest
- internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
- type: string
- kind:
- description: 'Kind is a string value representing the REST resource this
- object represents. Servers may infer this from the endpoint the client
- submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
- type: string
- metadata:
- type: object
- spec:
- description: NetworkSpec is the top-level network configuration object.
+ - name: v1
+ schema:
+ openAPIV3Schema:
+ description: Network describes the cluster's desired network configuration. It is consumed by the cluster-network-operator.
type: object
properties:
- additionalNetworks:
- description: additionalNetworks is a list of extra networks to make
- available to pods when multiple networks are enabled.
- type: array
- items:
- description: AdditionalNetworkDefinition configures an extra network
- that is available but not created by default. Instead, pods must
- request them by name. type must be specified, along with exactly
- one "Config" that matches the type.
- type: object
- properties:
- name:
- description: name is the name of the network. This will be populated
- in the resulting CRD This must be unique.
- type: string
- namespace:
- description: namespace is the namespace of the network. This will
- be populated in the resulting CRD If not given the network will
- be created in the default namespace.
- type: string
- rawCNIConfig:
- description: rawCNIConfig is the raw CNI configuration json to
- create in the NetworkAttachmentDefinition CRD
- type: string
- simpleMacvlanConfig:
- description: SimpleMacvlanConfig configures the macvlan interface
- in case of type:NetworkTypeSimpleMacvlan
+ apiVersion:
+ description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
+ type: string
+ kind:
+ description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
+ type: string
+ metadata:
+ type: object
+ spec:
+ description: NetworkSpec is the top-level network configuration object.
+ type: object
+ properties:
+ additionalNetworks:
+ description: additionalNetworks is a list of extra networks to make available to pods when multiple networks are enabled.
+ type: array
+ items:
+ description: AdditionalNetworkDefinition configures an extra network that is available but not created by default. Instead, pods must request them by name. type must be specified, along with exactly one "Config" that matches the type.
type: object
properties:
- ipamConfig:
- description: IPAMConfig configures IPAM module will be used
- for IP Address Management (IPAM).
+ name:
+ description: name is the name of the network. This will be populated in the resulting CRD This must be unique.
+ type: string
+ namespace:
+ description: namespace is the namespace of the network. This will be populated in the resulting CRD If not given the network will be created in the default namespace.
+ type: string
+ rawCNIConfig:
+ description: rawCNIConfig is the raw CNI configuration json to create in the NetworkAttachmentDefinition CRD
+ type: string
+ simpleMacvlanConfig:
+ description: SimpleMacvlanConfig configures the macvlan interface in case of type:NetworkTypeSimpleMacvlan
type: object
properties:
- staticIPAMConfig:
- description: StaticIPAMConfig configures the static IP
- address in case of type:IPAMTypeStatic
+ ipamConfig:
+ description: IPAMConfig configures IPAM module will be used for IP Address Management (IPAM).
type: object
properties:
- addresses:
- description: Addresses configures IP address for the
- interface
- type: array
- items:
- description: StaticIPAMAddresses provides IP address
- and Gateway for static IPAM addresses
- type: object
- properties:
- address:
- description: Address is the IP address in CIDR
- format
- type: string
- gateway:
- description: Gateway is IP inside of subnet
- to designate as the gateway
- type: string
- dns:
- description: DNS configures DNS for the interface
+ staticIPAMConfig:
+ description: StaticIPAMConfig configures the static IP address in case of type:IPAMTypeStatic
type: object
properties:
- domain:
- description: Domain configures the domainname
- the local domain used for short hostname lookups
- type: string
- nameservers:
- description: Nameservers points DNS servers for
- IP lookup
+ addresses:
+ description: Addresses configures IP address for the interface
type: array
items:
- type: string
- search:
- description: Search configures priority ordered
- search domains for short hostname lookups
+ description: StaticIPAMAddresses provides IP address and Gateway for static IPAM addresses
+ type: object
+ properties:
+ address:
+ description: Address is the IP address in CIDR format
+ type: string
+ gateway:
+ description: Gateway is IP inside of subnet to designate as the gateway
+ type: string
+ dns:
+ description: DNS configures DNS for the interface
+ type: object
+ properties:
+ domain:
+ description: Domain configures the domainname the local domain used for short hostname lookups
+ type: string
+ nameservers:
+ description: Nameservers points DNS servers for IP lookup
+ type: array
+ items:
+ type: string
+ search:
+ description: Search configures priority ordered search domains for short hostname lookups
+ type: array
+ items:
+ type: string
+ routes:
+ description: Routes configures IP routes for the interface
type: array
items:
- type: string
- routes:
- description: Routes configures IP routes for the interface
- type: array
- items:
- description: StaticIPAMRoutes provides Destination/Gateway
- pairs for static IPAM routes
- type: object
- properties:
- destination:
- description: Destination points the IP route
- destination
- type: string
- gateway:
- description: Gateway is the route's next-hop
- IP address If unset, a default gateway is
- assumed (as determined by the CNI plugin).
- type: string
- type:
- description: Type is the type of IPAM module will be used
- for IP Address Management(IPAM). The supported values
- are IPAMTypeDHCP, IPAMTypeStatic
+ description: StaticIPAMRoutes provides Destination/Gateway pairs for static IPAM routes
+ type: object
+ properties:
+ destination:
+ description: Destination points the IP route destination
+ type: string
+ gateway:
+ description: Gateway is the route's next-hop IP address If unset, a default gateway is assumed (as determined by the CNI plugin).
+ type: string
+ type:
+ description: Type is the type of IPAM module will be used for IP Address Management(IPAM). The supported values are IPAMTypeDHCP, IPAMTypeStatic
+ type: string
+ master:
+ description: master is the host interface to create the macvlan interface from. If not specified, it will be default route interface
+ type: string
+ mode:
+ description: 'mode is the macvlan mode: bridge, private, vepa, passthru. The default is bridge'
type: string
- master:
- description: master is the host interface to create the macvlan
- interface from. If not specified, it will be default route
- interface
+ mtu:
+ description: mtu is the mtu to use for the macvlan interface. if unset, host's kernel will select the value.
+ type: integer
+ format: int32
+ minimum: 0
+ type:
+ description: type is the type of network The supported values are NetworkTypeRaw, NetworkTypeSimpleMacvlan
type: string
- mode:
- description: 'mode is the macvlan mode: bridge, private, vepa,
- passthru. The default is bridge'
+ clusterNetwork:
+ description: clusterNetwork is the IP address pool to use for pod IPs. Some network providers, e.g. OpenShift SDN, support multiple ClusterNetworks. Others only support one. This is equivalent to the cluster-cidr.
+ type: array
+ items:
+ description: ClusterNetworkEntry is a subnet from which to allocate PodIPs. A network of size HostPrefix (in CIDR notation) will be allocated when nodes join the cluster. If the HostPrefix field is not used by the plugin, it can be left unset. Not all network providers support multiple ClusterNetworks
+ type: object
+ properties:
+ cidr:
type: string
- mtu:
- description: mtu is the mtu to use for the macvlan interface.
- if unset, host's kernel will select the value.
+ hostPrefix:
type: integer
format: int32
minimum: 0
- type:
- description: type is the type of network The supported values
- are NetworkTypeRaw, NetworkTypeSimpleMacvlan
- type: string
- clusterNetwork:
- description: clusterNetwork is the IP address pool to use for pod IPs.
- Some network providers, e.g. OpenShift SDN, support multiple ClusterNetworks.
- Others only support one. This is equivalent to the cluster-cidr.
- type: array
- items:
- description: ClusterNetworkEntry is a subnet from which to allocate
- PodIPs. A network of size HostPrefix (in CIDR notation) will be
- allocated when nodes join the cluster. Not all network providers
- support multiple ClusterNetworks
- type: object
- properties:
- cidr:
- type: string
- hostPrefix:
- type: integer
- format: int32
- minimum: 0
- defaultNetwork:
- description: defaultNetwork is the "default" network that all pods will
- receive
- type: object
- properties:
- kuryrConfig:
- description: KuryrConfig configures the kuryr plugin
+ defaultNetwork:
+ description: defaultNetwork is the "default" network that all pods will receive
type: object
properties:
- controllerProbesPort:
- description: The port kuryr-controller will listen for readiness
- and liveness requests.
- type: integer
- format: int32
- minimum: 0
- daemonProbesPort:
- description: The port kuryr-daemon will listen for readiness
- and liveness requests.
- type: integer
- format: int32
- minimum: 0
- enablePortPoolsPrepopulation:
- description: enablePortPoolsPrepopulation when true will make
- Kuryr prepopulate each newly created port pool with a minimum
- number of ports. Kuryr uses Neutron port pooling to fight
- the fact that it takes a significant amount of time to create
- one. Instead of creating it when pod is being deployed, Kuryr
- keeps a number of ports ready to be attached to pods. By default
- port prepopulation is disabled.
- type: boolean
- openStackServiceNetwork:
- description: openStackServiceNetwork contains the CIDR of network
- from which to allocate IPs for OpenStack Octavia's Amphora
- VMs. Please note that with Amphora driver Octavia uses two
- IPs from that network for each loadbalancer - one given by
- OpenShift and second for VRRP connections. As the first one
- is managed by OpenShift's and second by Neutron's IPAMs, those
- need to come from different pools. Therefore `openStackServiceNetwork`
- needs to be at least twice the size of `serviceNetwork`, and
- whole `serviceNetwork` must be overlapping with `openStackServiceNetwork`.
- cluster-network-operator will then make sure VRRP IPs are
- taken from the ranges inside `openStackServiceNetwork` that
- are not overlapping with `serviceNetwork`, effectivly preventing
- conflicts. If not set cluster-network-operator will use `serviceNetwork`
- expanded by decrementing the prefix size by 1.
- type: string
- poolBatchPorts:
- description: poolBatchPorts sets a number of ports that should
- be created in a single batch request to extend the port pool.
- The default is 3. For more information about port pools see
- enablePortPoolsPrepopulation setting.
- type: integer
- minimum: 0
- poolMaxPorts:
- description: poolMaxPorts sets a maximum number of free ports
- that are being kept in a port pool. If the number of ports
- exceeds this setting, free ports will get deleted. Setting
- 0 will disable this upper bound, effectively preventing pools
- from shrinking and this is the default value. For more information
- about port pools see enablePortPoolsPrepopulation setting.
- type: integer
- minimum: 0
- poolMinPorts:
- description: poolMinPorts sets a minimum number of free ports
- that should be kept in a port pool. If the number of ports
- is lower than this setting, new ports will get created and
- added to pool. The default is 1. For more information about
- port pools see enablePortPoolsPrepopulation setting.
- type: integer
- minimum: 1
- openshiftSDNConfig:
- description: openShiftSDNConfig configures the openshift-sdn plugin
- type: object
- properties:
- enableUnidling:
- description: enableUnidling controls whether or not the service
- proxy will support idling and unidling of services. By default,
- unidling is enabled.
- type: boolean
- mode:
- description: mode is one of "Multitenant", "Subnet", or "NetworkPolicy"
+ kuryrConfig:
+ description: KuryrConfig configures the kuryr plugin
+ type: object
+ properties:
+ controllerProbesPort:
+ description: The port kuryr-controller will listen for readiness and liveness requests.
+ type: integer
+ format: int32
+ minimum: 0
+ daemonProbesPort:
+ description: The port kuryr-daemon will listen for readiness and liveness requests.
+ type: integer
+ format: int32
+ minimum: 0
+ enablePortPoolsPrepopulation:
+ description: enablePortPoolsPrepopulation when true will make Kuryr prepopulate each newly created port pool with a minimum number of ports. Kuryr uses Neutron port pooling to fight the fact that it takes a significant amount of time to create one. Instead of creating it when pod is being deployed, Kuryr keeps a number of ports ready to be attached to pods. By default port prepopulation is disabled.
+ type: boolean
+ mtu:
+ description: mtu is the MTU that Kuryr should use when creating pod networks in Neutron. The value has to be lower or equal to the MTU of the nodes network and Neutron has to allow creation of tenant networks with such MTU. If unset Pod networks will be created with the same MTU as the nodes network has.
+ type: integer
+ format: int32
+ minimum: 0
+ openStackServiceNetwork:
+ description: openStackServiceNetwork contains the CIDR of network from which to allocate IPs for OpenStack Octavia's Amphora VMs. Please note that with Amphora driver Octavia uses two IPs from that network for each loadbalancer - one given by OpenShift and second for VRRP connections. As the first one is managed by OpenShift's and second by Neutron's IPAMs, those need to come from different pools. Therefore `openStackServiceNetwork` needs to be at least twice the size of `serviceNetwork`, and whole `serviceNetwork` must be overlapping with `openStackServiceNetwork`. cluster-network-operator will then make sure VRRP IPs are taken from the ranges inside `openStackServiceNetwork` that are not overlapping with `serviceNetwork`, effectivly preventing conflicts. If not set cluster-network-operator will use `serviceNetwork` expanded by decrementing the prefix size by 1.
+ type: string
+ poolBatchPorts:
+ description: poolBatchPorts sets a number of ports that should be created in a single batch request to extend the port pool. The default is 3. For more information about port pools see enablePortPoolsPrepopulation setting.
+ type: integer
+ minimum: 0
+ poolMaxPorts:
+ description: poolMaxPorts sets a maximum number of free ports that are being kept in a port pool. If the number of ports exceeds this setting, free ports will get deleted. Setting 0 will disable this upper bound, effectively preventing pools from shrinking and this is the default value. For more information about port pools see enablePortPoolsPrepopulation setting.
+ type: integer
+ minimum: 0
+ poolMinPorts:
+ description: poolMinPorts sets a minimum number of free ports that should be kept in a port pool. If the number of ports is lower than this setting, new ports will get created and added to pool. The default is 1. For more information about port pools see enablePortPoolsPrepopulation setting.
+ type: integer
+ minimum: 1
+ openshiftSDNConfig:
+ description: openShiftSDNConfig configures the openshift-sdn plugin
+ type: object
+ properties:
+ enableUnidling:
+ description: enableUnidling controls whether or not the service proxy will support idling and unidling of services. By default, unidling is enabled.
+ type: boolean
+ mode:
+ description: mode is one of "Multitenant", "Subnet", or "NetworkPolicy"
+ type: string
+ mtu:
+ description: mtu is the mtu to use for the tunnel interface. Defaults to 1450 if unset. This must be 50 bytes smaller than the machine's uplink.
+ type: integer
+ format: int32
+ minimum: 0
+ useExternalOpenvswitch:
+ description: 'useExternalOpenvswitch used to control whether the operator would deploy an OVS DaemonSet itself or expect someone else to start OVS. As of 4.6, OVS is always run as a system service, and this flag is ignored. DEPRECATED: non-functional as of 4.6'
+ type: boolean
+ vxlanPort:
+ description: vxlanPort is the port to use for all vxlan packets. The default is 4789.
+ type: integer
+ format: int32
+ minimum: 0
+ ovnKubernetesConfig:
+ description: oVNKubernetesConfig configures the ovn-kubernetes plugin. This is currently not implemented.
+ type: object
+ properties:
+ genevePort:
+ description: geneve port is the UDP port to be used by geneve encapulation. Default is 6081
+ type: integer
+ format: int32
+ minimum: 1
+ hybridOverlayConfig:
+ description: HybridOverlayConfig configures an additional overlay network for peers that are not using OVN.
+ type: object
+ properties:
+ hybridClusterNetwork:
+ description: HybridClusterNetwork defines a network space given to nodes on an additional overlay network.
+ type: array
+ items:
+ description: ClusterNetworkEntry is a subnet from which to allocate PodIPs. A network of size HostPrefix (in CIDR notation) will be allocated when nodes join the cluster. If the HostPrefix field is not used by the plugin, it can be left unset. Not all network providers support multiple ClusterNetworks
+ type: object
+ properties:
+ cidr:
+ type: string
+ hostPrefix:
+ type: integer
+ format: int32
+ minimum: 0
+ hybridOverlayVXLANPort:
+ description: HybridOverlayVXLANPort defines the VXLAN port number to be used by the additional overlay network. Default is 4789
+ type: integer
+ format: int32
+ ipsecConfig:
+ description: ipsecConfig enables and configures IPsec for pods on the pod network within the cluster.
+ type: object
+ mtu:
+ description: mtu is the MTU to use for the tunnel interface. This must be 100 bytes smaller than the uplink mtu. Default is 1400
+ type: integer
+ format: int32
+ minimum: 0
+ policyAuditConfig:
+ description: policyAuditConfig is the configuration for network policy audit events. If unset, reported defaults are used.
+ type: object
+ properties:
+ destination:
+ description: 'destination is the location for policy log messages. Regardless of this config, persistent logs will always be dumped to the host at /var/log/ovn/ however Additionally syslog output may be configured as follows. Valid values are: - "libc" -> to use the libc syslog() function of the host node''s journdald process - "udp:host:port" -> for sending syslog over UDP - "unix:file" -> for using the UNIX domain socket directly - "null" -> to discard all messages logged to syslog The default is "null"'
+ type: string
+ default: "null"
+ maxFileSize:
+ description: maxFilesSize is the max size an ACL_audit log file is allowed to reach before rotation occurs Units are in MB and the Default is 50MB
+ type: integer
+ format: int32
+ default: 50
+ minimum: 1
+ rateLimit:
+ description: rateLimit is the approximate maximum number of messages to generate per-second per-node. If unset the default of 20 msg/sec is used.
+ type: integer
+ format: int32
+ default: 20
+ minimum: 1
+ syslogFacility:
+ description: syslogFacility the RFC5424 facility for generated messages, e.g. "kern". Default is "local0"
+ type: string
+ default: local0
+ type:
+ description: type is the type of network All NetworkTypes are supported except for NetworkTypeRaw
type: string
- mtu:
- description: mtu is the mtu to use for the tunnel interface.
- Defaults to 1450 if unset. This must be 50 bytes smaller than
- the machine's uplink.
- type: integer
- format: int32
- minimum: 0
- useExternalOpenvswitch:
- description: useExternalOpenvswitch tells the operator not to
- install openvswitch, because it will be provided separately.
- If set, you must provide it yourself.
- type: boolean
- vxlanPort:
- description: vxlanPort is the port to use for all vxlan packets.
- The default is 4789.
- type: integer
- format: int32
- minimum: 0
- ovnKubernetesConfig:
- description: oVNKubernetesConfig configures the ovn-kubernetes plugin.
- This is currently not implemented.
+ deployKubeProxy:
+ description: deployKubeProxy specifies whether or not a standalone kube-proxy should be deployed by the operator. Some network providers include kube-proxy or similar functionality. If unset, the plugin will attempt to select the correct value, which is false when OpenShift SDN and ovn-kubernetes are used and true otherwise.
+ type: boolean
+ disableMultiNetwork:
+ description: disableMultiNetwork specifies whether or not multiple pod network support should be disabled. If unset, this property defaults to 'false' and multiple network support is enabled.
+ type: boolean
+ disableNetworkDiagnostics:
+ description: disableNetworkDiagnostics specifies whether or not PodNetworkConnectivityCheck CRs from a test pod to every node, apiserver and LB should be disabled or not. If unset, this property defaults to 'false' and network diagnostics is enabled. Setting this to 'true' would reduce the additional load of the pods performing the checks.
+ type: boolean
+ default: false
+ exportNetworkFlows:
+ description: exportNetworkFlows enables and configures the export of network flow metadata from the pod network by using protocols NetFlow, SFlow or IPFIX. Currently only supported on OVN-Kubernetes plugin. If unset, flows will not be exported to any collector.
type: object
properties:
- genevePort:
- description: geneve port is the UDP port to be used by geneve
- encapulation. Default is 6081
- type: integer
- format: int32
- minimum: 1
- hybridOverlayConfig:
- description: HybridOverlayConfig configures an additional overlay
- network for peers that are not using OVN.
+ ipfix:
+ description: ipfix defines IPFIX configuration.
type: object
properties:
- hybridClusterNetwork:
- description: HybridClusterNetwork defines a network space
- given to nodes on an additional overlay network.
+ collectors:
+ description: ipfixCollectors is list of strings formatted as ip:port with a maximum of ten items
type: array
+ maxItems: 10
+ minItems: 1
items:
- description: ClusterNetworkEntry is a subnet from which
- to allocate PodIPs. A network of size HostPrefix (in
- CIDR notation) will be allocated when nodes join the
- cluster. Not all network providers support multiple
- ClusterNetworks
- type: object
- properties:
- cidr:
- type: string
- hostPrefix:
- type: integer
- format: int32
- minimum: 0
- mtu:
- description: mtu is the MTU to use for the tunnel interface.
- This must be 100 bytes smaller than the uplink mtu. Default
- is 1400
- type: integer
- format: int32
- minimum: 0
- type:
- description: type is the type of network All NetworkTypes are supported
- except for NetworkTypeRaw
- type: string
- deployKubeProxy:
- description: deployKubeProxy specifies whether or not a standalone kube-proxy
- should be deployed by the operator. Some network providers include
- kube-proxy or similar functionality. If unset, the plugin will attempt
- to select the correct value, which is false when OpenShift SDN and
- ovn-kubernetes are used and true otherwise.
- type: boolean
- disableMultiNetwork:
- description: disableMultiNetwork specifies whether or not multiple pod
- network support should be disabled. If unset, this property defaults
- to 'false' and multiple network support is enabled.
- type: boolean
- kubeProxyConfig:
- description: kubeProxyConfig lets us configure desired proxy configuration.
- If not specified, sensible defaults will be chosen by OpenShift directly.
- Not consumed by all network providers - currently only openshift-sdn.
- type: object
- properties:
- bindAddress:
- description: The address to "bind" on Defaults to 0.0.0.0
+ type: string
+ pattern: ^(([0-9]|[0-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[0-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):([1-9][0-9]{0,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])$
+ netFlow:
+ description: netFlow defines the NetFlow configuration.
+ type: object
+ properties:
+ collectors:
+ description: netFlow defines the NetFlow collectors that will consume the flow data exported from OVS. It is a list of strings formatted as ip:port with a maximum of ten items
+ type: array
+ maxItems: 10
+ minItems: 1
+ items:
+ type: string
+ pattern: ^(([0-9]|[0-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[0-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):([1-9][0-9]{0,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])$
+ sFlow:
+ description: sFlow defines the SFlow configuration.
+ type: object
+ properties:
+ collectors:
+ description: sFlowCollectors is list of strings formatted as ip:port with a maximum of ten items
+ type: array
+ maxItems: 10
+ minItems: 1
+ items:
+ type: string
+ pattern: ^(([0-9]|[0-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[0-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):([1-9][0-9]{0,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])$
+ kubeProxyConfig:
+ description: kubeProxyConfig lets us configure desired proxy configuration. If not specified, sensible defaults will be chosen by OpenShift directly. Not consumed by all network providers - currently only openshift-sdn.
+ type: object
+ properties:
+ bindAddress:
+ description: The address to "bind" on Defaults to 0.0.0.0
+ type: string
+ iptablesSyncPeriod:
+ description: 'An internal kube-proxy parameter. In older releases of OCP, this sometimes needed to be adjusted in large clusters for performance reasons, but this is no longer necessary, and there is no reason to change this from the default value. Default: 30s'
+ type: string
+ proxyArguments:
+ description: Any additional arguments to pass to the kubeproxy process
+ type: object
+ additionalProperties:
+ description: ProxyArgumentList is a list of arguments to pass to the kubeproxy process
+ type: array
+ items:
+ type: string
+ logLevel:
+ description: "logLevel is an intent based logging for an overall component. It does not give fine grained control, but it is a simple way to manage coarse grained logging choices that operators have to interpret for their operands. \n Valid values are: \"Normal\", \"Debug\", \"Trace\", \"TraceAll\". Defaults to \"Normal\"."
type: string
- iptablesSyncPeriod:
- description: 'The period that iptables rules are refreshed. Default:
- 30s'
+ default: Normal
+ enum:
+ - ""
+ - Normal
+ - Debug
+ - Trace
+ - TraceAll
+ managementState:
+ description: managementState indicates whether and how the operator should manage the component
type: string
- proxyArguments:
- description: Any additional arguments to pass to the kubeproxy process
+ pattern: ^(Managed|Unmanaged|Force|Removed)$
+ migration:
+ description: migration enables and configures the cluster network migration. Setting this to the target network type to allow changing the default network. If unset, the operation of changing cluster default network plugin will be rejected.
type: object
- additionalProperties:
- description: ProxyArgumentList is a list of arguments to pass
- to the kubeproxy process
- type: array
- items:
+ properties:
+ networkType:
+ description: networkType is the target type of network migration The supported values are OpenShiftSDN, OVNKubernetes
type: string
- logLevel:
- description: logLevel allows configuring the logging level of the components
- deployed by the operator. Currently only Kuryr SDN is affected by
- this setting. Please note that turning on extensive logging may affect
- performance. The default value is "Normal".
- type: string
- serviceNetwork:
- description: serviceNetwork is the ip address pool to use for Service
- IPs Currently, all existing network providers only support a single
- value here, but this is an array to allow for growth.
- type: array
- items:
- type: string
- status:
- description: NetworkStatus is currently unused. Instead, status is reported
- in the Network.config.openshift.io object.
- type: object
+ observedConfig:
+ description: observedConfig holds a sparse config that controller has observed from the cluster state. It exists in spec because it is an input to the level for the operator
+ type: object
+ nullable: true
+ x-kubernetes-preserve-unknown-fields: true
+ operatorLogLevel:
+ description: "operatorLogLevel is an intent based logging for the operator itself. It does not give fine grained control, but it is a simple way to manage coarse grained logging choices that operators have to interpret for themselves. \n Valid values are: \"Normal\", \"Debug\", \"Trace\", \"TraceAll\". Defaults to \"Normal\"."
+ type: string
+ default: Normal
+ enum:
+ - ""
+ - Normal
+ - Debug
+ - Trace
+ - TraceAll
+ serviceNetwork:
+ description: serviceNetwork is the ip address pool to use for Service IPs Currently, all existing network providers only support a single value here, but this is an array to allow for growth.
+ type: array
+ items:
+ type: string
+ unsupportedConfigOverrides:
+ description: 'unsupportedConfigOverrides holds a sparse config that will override any previously set options. It only needs to be the fields to override it will end up overlaying in the following order: 1. hardcoded defaults 2. observedConfig 3. unsupportedConfigOverrides'
+ type: object
+ nullable: true
+ x-kubernetes-preserve-unknown-fields: true
+ useMultiNetworkPolicy:
+ description: useMultiNetworkPolicy enables a controller which allows for MultiNetworkPolicy objects to be used on additional networks as created by Multus CNI. MultiNetworkPolicy are similar to NetworkPolicy objects, but NetworkPolicy objects only apply to the primary interface. With MultiNetworkPolicy, you can control the traffic that a pod can receive over the secondary interfaces. If unset, this property defaults to 'false' and MultiNetworkPolicy objects are ignored. If 'disableMultiNetwork' is 'true' then the value of this field is ignored.
+ type: boolean
+ status:
+ description: NetworkStatus is detailed operator status, which is distilled up to the Network clusteroperator object.
+ type: object
+ properties:
+ conditions:
+ description: conditions is a list of conditions and their status
+ type: array
+ items:
+ description: OperatorCondition is just the standard condition fields.
+ type: object
+ properties:
+ lastTransitionTime:
+ type: string
+ format: date-time
+ message:
+ type: string
+ reason:
+ type: string
+ status:
+ type: string
+ type:
+ type: string
+ generations:
+ description: generations are used to determine when an item needs to be reconciled or has changed in a way that needs a reaction.
+ type: array
+ items:
+ description: GenerationStatus keeps track of the generation for a given resource so that decisions about forced updates can be made.
+ type: object
+ properties:
+ group:
+ description: group is the group of the thing you're tracking
+ type: string
+ hash:
+ description: hash is an optional field set for resources without generation that are content sensitive like secrets and configmaps
+ type: string
+ lastGeneration:
+ description: lastGeneration is the last generation of the workload controller involved
+ type: integer
+ format: int64
+ name:
+ description: name is the name of the thing you're tracking
+ type: string
+ namespace:
+ description: namespace is where the thing you're tracking is
+ type: string
+ resource:
+ description: resource is the resource type of the thing you're tracking
+ type: string
+ observedGeneration:
+ description: observedGeneration is the last generation change you've dealt with
+ type: integer
+ format: int64
+ readyReplicas:
+ description: readyReplicas indicates how many replicas are ready and at the desired state
+ type: integer
+ format: int32
+ version:
+ description: version is the level this availability applies to
+ type: string
+ served: true
+ storage: true
diff --git a/vendor/github.com/openshift/api/operator/v1/0000_70_console-operator.crd.yaml b/vendor/github.com/openshift/api/operator/v1/0000_70_console-operator.crd.yaml
index e227469c974..e3afdf7d6ca 100644
--- a/vendor/github.com/openshift/api/operator/v1/0000_70_console-operator.crd.yaml
+++ b/vendor/github.com/openshift/api/operator/v1/0000_70_console-operator.crd.yaml
@@ -1,199 +1,275 @@
-apiVersion: apiextensions.k8s.io/v1beta1
+apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
+ annotations:
+ api-approved.openshift.io: https://github.com/openshift/api/pull/486
+ include.release.openshift.io/ibm-cloud-managed: "true"
+ include.release.openshift.io/self-managed-high-availability: "true"
+ include.release.openshift.io/single-node-developer: "true"
name: consoles.operator.openshift.io
spec:
- scope: Cluster
- preserveUnknownFields: false
group: operator.openshift.io
names:
kind: Console
listKind: ConsoleList
plural: consoles
singular: console
- subresources:
- status: {}
+ scope: Cluster
versions:
- - name: v1
- served: true
- storage: true
- validation:
- openAPIV3Schema:
- description: Console provides a means to configure an operator to manage the
- console.
- type: object
- required:
- - spec
- properties:
- apiVersion:
- description: 'APIVersion defines the versioned schema of this representation
- of an object. Servers should convert recognized schemas to the latest
- internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
- type: string
- kind:
- description: 'Kind is a string value representing the REST resource this
- object represents. Servers may infer this from the endpoint the client
- submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
- type: string
- metadata:
- type: object
- spec:
- description: ConsoleSpec is the specification of the desired behavior of
- the Console.
+ - name: v1
+ schema:
+ openAPIV3Schema:
+ description: Console provides a means to configure an operator to manage the console.
type: object
+ required:
+ - spec
properties:
- customization:
- description: customization is used to optionally provide a small set
- of customization options to the web console.
+ apiVersion:
+ description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
+ type: string
+ kind:
+ description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
+ type: string
+ metadata:
+ type: object
+ spec:
+ description: ConsoleSpec is the specification of the desired behavior of the Console.
type: object
properties:
- brand:
- description: brand is the default branding of the web console which
- can be overridden by providing the brand field. There is a limited
- set of specific brand options. This field controls elements of
- the console such as the logo. Invalid value will prevent a console
- rollout.
- type: string
- pattern: ^$|^(ocp|origin|okd|dedicated|online|azure)$
- customLogoFile:
- description: 'customLogoFile replaces the default OpenShift logo
- in the masthead and about dialog. It is a reference to a ConfigMap
- in the openshift-config namespace. This can be created with a
- command like ''oc create configmap custom-logo --from-file=/path/to/file
- -n openshift-config''. Image size must be less than 1 MB due to
- constraints on the ConfigMap size. The ConfigMap key should include
- a file extension so that the console serves the file with the
- correct MIME type. Recommended logo specifications: Dimensions:
- Max height of 68px and max width of 200px SVG format preferred'
+ customization:
+ description: customization is used to optionally provide a small set of customization options to the web console.
type: object
properties:
- key:
- description: Key allows pointing to a specific key/value inside
- of the configmap. This is useful for logical file references.
+ addPage:
+ description: addPage allows customizing actions on the Add page in developer perspective.
+ type: object
+ properties:
+ disabledActions:
+ description: disabledActions is a list of actions that are not shown to users. Each action in the list is represented by its ID.
+ type: array
+ minItems: 1
+ items:
+ type: string
+ brand:
+ description: brand is the default branding of the web console which can be overridden by providing the brand field. There is a limited set of specific brand options. This field controls elements of the console such as the logo. Invalid value will prevent a console rollout.
type: string
- name:
+ pattern: ^$|^(ocp|origin|okd|dedicated|online|azure)$
+ customLogoFile:
+ description: 'customLogoFile replaces the default OpenShift logo in the masthead and about dialog. It is a reference to a ConfigMap in the openshift-config namespace. This can be created with a command like ''oc create configmap custom-logo --from-file=/path/to/file -n openshift-config''. Image size must be less than 1 MB due to constraints on the ConfigMap size. The ConfigMap key should include a file extension so that the console serves the file with the correct MIME type. Recommended logo specifications: Dimensions: Max height of 68px and max width of 200px SVG format preferred'
+ type: object
+ properties:
+ key:
+ description: Key allows pointing to a specific key/value inside of the configmap. This is useful for logical file references.
+ type: string
+ name:
+ type: string
+ customProductName:
+ description: customProductName is the name that will be displayed in page titles, logo alt text, and the about dialog instead of the normal OpenShift product name.
type: string
- customProductName:
- description: customProductName is the name that will be displayed
- in page titles, logo alt text, and the about dialog instead of
- the normal OpenShift product name.
+ developerCatalog:
+ description: developerCatalog allows to configure the shown developer catalog categories.
+ type: object
+ properties:
+ categories:
+ description: categories which are shown in the developer catalog.
+ type: array
+ items:
+ description: DeveloperConsoleCatalogCategory for the developer console catalog.
+ type: object
+ required:
+ - id
+ - label
+ properties:
+ id:
+ description: ID is an identifier used in the URL to enable deep linking in console. ID is required and must have 1-32 URL safe (A-Z, a-z, 0-9, - and _) characters.
+ type: string
+ maxLength: 32
+ minLength: 1
+ pattern: ^[A-Za-z0-9-_]+$
+ label:
+ description: label defines a category display label. It is required and must have 1-64 characters.
+ type: string
+ maxLength: 64
+ minLength: 1
+ subcategories:
+ description: subcategories defines a list of child categories.
+ type: array
+ items:
+ description: DeveloperConsoleCatalogCategoryMeta are the key identifiers of a developer catalog category.
+ type: object
+ required:
+ - id
+ - label
+ properties:
+ id:
+ description: ID is an identifier used in the URL to enable deep linking in console. ID is required and must have 1-32 URL safe (A-Z, a-z, 0-9, - and _) characters.
+ type: string
+ maxLength: 32
+ minLength: 1
+ pattern: ^[A-Za-z0-9-_]+$
+ label:
+ description: label defines a category display label. It is required and must have 1-64 characters.
+ type: string
+ maxLength: 64
+ minLength: 1
+ tags:
+ description: tags is a list of strings that will match the category. A selected category show all items which has at least one overlapping tag between category and item.
+ type: array
+ items:
+ type: string
+ tags:
+ description: tags is a list of strings that will match the category. A selected category show all items which has at least one overlapping tag between category and item.
+ type: array
+ items:
+ type: string
+ documentationBaseURL:
+ description: documentationBaseURL links to external documentation are shown in various sections of the web console. Providing documentationBaseURL will override the default documentation URL. Invalid value will prevent a console rollout.
+ type: string
+ pattern: ^$|^((https):\/\/?)[^\s()<>]+(?:\([\w\d]+\)|([^[:punct:]\s]|\/?))\/$
+ projectAccess:
+ description: projectAccess allows customizing the available list of ClusterRoles in the Developer perspective Project access page which can be used by a project admin to specify roles to other users and restrict access within the project. If set, the list will replace the default ClusterRole options.
+ type: object
+ properties:
+ availableClusterRoles:
+ description: availableClusterRoles is the list of ClusterRole names that are assignable to users through the project access tab.
+ type: array
+ items:
+ type: string
+ quickStarts:
+ description: quickStarts allows customization of available ConsoleQuickStart resources in console.
+ type: object
+ properties:
+ disabled:
+ description: disabled is a list of ConsoleQuickStart resource names that are not shown to users.
+ type: array
+ items:
+ type: string
+ logLevel:
+ description: "logLevel is an intent based logging for an overall component. It does not give fine grained control, but it is a simple way to manage coarse grained logging choices that operators have to interpret for their operands. \n Valid values are: \"Normal\", \"Debug\", \"Trace\", \"TraceAll\". Defaults to \"Normal\"."
type: string
- documentationBaseURL:
- description: documentationBaseURL links to external documentation
- are shown in various sections of the web console. Providing documentationBaseURL
- will override the default documentation URL. Invalid value will
- prevent a console rollout.
+ default: Normal
+ enum:
+ - ""
+ - Normal
+ - Debug
+ - Trace
+ - TraceAll
+ managementState:
+ description: managementState indicates whether and how the operator should manage the component
type: string
- pattern: ^$|^((https):\/\/?)[^\s()<>]+(?:\([\w\d]+\)|([^[:punct:]\s]|\/?))\/$
- logLevel:
- description: logLevel is an intent based logging for an overall component. It
- does not give fine grained control, but it is a simple way to manage
- coarse grained logging choices that operators have to interpret for
- their operands.
- type: string
- managementState:
- description: managementState indicates whether and how the operator
- should manage the component
- type: string
- pattern: ^(Managed|Unmanaged|Force|Removed)$
- observedConfig:
- description: observedConfig holds a sparse config that controller has
- observed from the cluster state. It exists in spec because it is
- an input to the level for the operator
- type: object
- nullable: true
- x-kubernetes-preserve-unknown-fields: true
- operatorLogLevel:
- description: operatorLogLevel is an intent based logging for the operator
- itself. It does not give fine grained control, but it is a simple
- way to manage coarse grained logging choices that operators have to
- interpret for themselves.
- type: string
- providers:
- description: providers contains configuration for using specific service
- providers.
- type: object
- properties:
- statuspage:
- description: statuspage contains ID for statuspage.io page that
- provides status info about.
+ pattern: ^(Managed|Unmanaged|Force|Removed)$
+ observedConfig:
+ description: observedConfig holds a sparse config that controller has observed from the cluster state. It exists in spec because it is an input to the level for the operator
+ type: object
+ nullable: true
+ x-kubernetes-preserve-unknown-fields: true
+ operatorLogLevel:
+ description: "operatorLogLevel is an intent based logging for the operator itself. It does not give fine grained control, but it is a simple way to manage coarse grained logging choices that operators have to interpret for themselves. \n Valid values are: \"Normal\", \"Debug\", \"Trace\", \"TraceAll\". Defaults to \"Normal\"."
+ type: string
+ default: Normal
+ enum:
+ - ""
+ - Normal
+ - Debug
+ - Trace
+ - TraceAll
+ plugins:
+ description: plugins defines a list of enabled console plugin names.
+ type: array
+ items:
+ type: string
+ providers:
+ description: providers contains configuration for using specific service providers.
type: object
properties:
- pageID:
- description: pageID is the unique ID assigned by Statuspage
- for your page. This must be a public page.
+ statuspage:
+ description: statuspage contains ID for statuspage.io page that provides status info about.
+ type: object
+ properties:
+ pageID:
+ description: pageID is the unique ID assigned by Statuspage for your page. This must be a public page.
+ type: string
+ route:
+ description: route contains hostname and secret reference that contains the serving certificate. If a custom route is specified, a new route will be created with the provided hostname, under which console will be available. In case of custom hostname uses the default routing suffix of the cluster, the Secret specification for a serving certificate will not be needed. In case of custom hostname points to an arbitrary domain, manual DNS configurations steps are necessary. The default console route will be maintained to reserve the default hostname for console if the custom route is removed. If not specified, default route will be used. DEPRECATED
+ type: object
+ properties:
+ hostname:
+ description: hostname is the desired custom domain under which console will be available.
type: string
- unsupportedConfigOverrides:
- description: 'unsupportedConfigOverrides holds a sparse config that
- will override any previously set options. It only needs to be the
- fields to override it will end up overlaying in the following order:
- 1. hardcoded defaults 2. observedConfig 3. unsupportedConfigOverrides'
+ secret:
+ description: 'secret points to secret in the openshift-config namespace that contains custom certificate and key and needs to be created manually by the cluster admin. Referenced Secret is required to contain following key value pairs: - "tls.crt" - to specifies custom certificate - "tls.key" - to specifies private key of the custom certificate If the custom hostname uses the default routing suffix of the cluster, the Secret specification for a serving certificate will not be needed.'
+ type: object
+ required:
+ - name
+ properties:
+ name:
+ description: name is the metadata.name of the referenced secret
+ type: string
+ unsupportedConfigOverrides:
+ description: 'unsupportedConfigOverrides holds a sparse config that will override any previously set options. It only needs to be the fields to override it will end up overlaying in the following order: 1. hardcoded defaults 2. observedConfig 3. unsupportedConfigOverrides'
+ type: object
+ nullable: true
+ x-kubernetes-preserve-unknown-fields: true
+ status:
+ description: ConsoleStatus defines the observed status of the Console.
type: object
- nullable: true
- x-kubernetes-preserve-unknown-fields: true
- status:
- description: ConsoleStatus defines the observed status of the Console.
- type: object
- properties:
- conditions:
- description: conditions is a list of conditions and their status
- type: array
- items:
- description: OperatorCondition is just the standard condition fields.
- type: object
- properties:
- lastTransitionTime:
- type: string
- format: date-time
- message:
- type: string
- reason:
- type: string
- status:
- type: string
- type:
- type: string
- generations:
- description: generations are used to determine when an item needs to
- be reconciled or has changed in a way that needs a reaction.
- type: array
- items:
- description: GenerationStatus keeps track of the generation for a
- given resource so that decisions about forced updates can be made.
- type: object
- properties:
- group:
- description: group is the group of the thing you're tracking
- type: string
- hash:
- description: hash is an optional field set for resources without
- generation that are content sensitive like secrets and configmaps
- type: string
- lastGeneration:
- description: lastGeneration is the last generation of the workload
- controller involved
- type: integer
- format: int64
- name:
- description: name is the name of the thing you're tracking
- type: string
- namespace:
- description: namespace is where the thing you're tracking is
- type: string
- resource:
- description: resource is the resource type of the thing you're
- tracking
- type: string
- observedGeneration:
- description: observedGeneration is the last generation change you've
- dealt with
- type: integer
- format: int64
- readyReplicas:
- description: readyReplicas indicates how many replicas are ready and
- at the desired state
- type: integer
- format: int32
- version:
- description: version is the level this availability applies to
- type: string
+ properties:
+ conditions:
+ description: conditions is a list of conditions and their status
+ type: array
+ items:
+ description: OperatorCondition is just the standard condition fields.
+ type: object
+ properties:
+ lastTransitionTime:
+ type: string
+ format: date-time
+ message:
+ type: string
+ reason:
+ type: string
+ status:
+ type: string
+ type:
+ type: string
+ generations:
+ description: generations are used to determine when an item needs to be reconciled or has changed in a way that needs a reaction.
+ type: array
+ items:
+ description: GenerationStatus keeps track of the generation for a given resource so that decisions about forced updates can be made.
+ type: object
+ properties:
+ group:
+ description: group is the group of the thing you're tracking
+ type: string
+ hash:
+ description: hash is an optional field set for resources without generation that are content sensitive like secrets and configmaps
+ type: string
+ lastGeneration:
+ description: lastGeneration is the last generation of the workload controller involved
+ type: integer
+ format: int64
+ name:
+ description: name is the name of the thing you're tracking
+ type: string
+ namespace:
+ description: namespace is where the thing you're tracking is
+ type: string
+ resource:
+ description: resource is the resource type of the thing you're tracking
+ type: string
+ observedGeneration:
+ description: observedGeneration is the last generation change you've dealt with
+ type: integer
+ format: int64
+ readyReplicas:
+ description: readyReplicas indicates how many replicas are ready and at the desired state
+ type: integer
+ format: int32
+ version:
+ description: version is the level this availability applies to
+ type: string
+ served: true
+ storage: true
+ subresources:
+ status: {}
diff --git a/vendor/github.com/openshift/api/operator/v1/0000_70_dns-operator_00-custom-resource-definition.yaml b/vendor/github.com/openshift/api/operator/v1/0000_70_dns-operator_00-custom-resource-definition.yaml
index e553f1f656f..4e7032414dd 100644
--- a/vendor/github.com/openshift/api/operator/v1/0000_70_dns-operator_00-custom-resource-definition.yaml
+++ b/vendor/github.com/openshift/api/operator/v1/0000_70_dns-operator_00-custom-resource-definition.yaml
@@ -1,8 +1,12 @@
-apiVersion: apiextensions.k8s.io/v1beta1
+apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
- creationTimestamp: null
name: dnses.operator.openshift.io
+ annotations:
+ api-approved.openshift.io: https://github.com/openshift/api/pull/475
+ include.release.openshift.io/ibm-cloud-managed: "true"
+ include.release.openshift.io/self-managed-high-availability: "true"
+ include.release.openshift.io/single-node-developer: "true"
spec:
group: operator.openshift.io
names:
@@ -11,132 +15,114 @@ spec:
plural: dnses
singular: dns
scope: Cluster
- preserveUnknownFields: false
- subresources:
- status: {}
- validation:
- openAPIV3Schema:
- description: "DNS manages the CoreDNS component to provide a name resolution
- service for pods and services in the cluster. \n This supports the DNS-based
- service discovery specification: https://github.com/kubernetes/dns/blob/master/docs/specification.md
- \n More details: https://kubernetes.io/docs/tasks/administer-cluster/coredns"
- type: object
- properties:
- apiVersion:
- description: 'APIVersion defines the versioned schema of this representation
- of an object. Servers should convert recognized schemas to the latest
- internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
- type: string
- kind:
- description: 'Kind is a string value representing the REST resource this
- object represents. Servers may infer this from the endpoint the client
- submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
- type: string
- metadata:
- type: object
- spec:
- description: spec is the specification of the desired behavior of the DNS.
+ versions:
+ - name: v1
+ served: true
+ storage: true
+ subresources:
+ status: {}
+ schema:
+ openAPIV3Schema:
+ description: "DNS manages the CoreDNS component to provide a name resolution service for pods and services in the cluster. \n This supports the DNS-based service discovery specification: https://github.com/kubernetes/dns/blob/master/docs/specification.md \n More details: https://kubernetes.io/docs/tasks/administer-cluster/coredns"
type: object
properties:
- servers:
- description: "servers is a list of DNS resolvers that provide name query
- delegation for one or more subdomains outside the scope of the cluster
- domain. If servers consists of more than one Server, longest suffix
- match will be used to determine the Server. \n For example, if there
- are two Servers, one for \"foo.com\" and another for \"a.foo.com\",
- and the name query is for \"www.a.foo.com\", it will be routed to
- the Server with Zone \"a.foo.com\". \n If this field is nil, no servers
- are created."
- type: array
- items:
- description: Server defines the schema for a server that runs per
- instance of CoreDNS.
- type: object
- properties:
- forwardPlugin:
- description: forwardPlugin defines a schema for configuring CoreDNS
- to proxy DNS messages to upstream resolvers.
+ apiVersion:
+ description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
+ type: string
+ kind:
+ description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
+ type: string
+ metadata:
+ type: object
+ spec:
+ description: spec is the specification of the desired behavior of the DNS.
+ type: object
+ properties:
+ nodePlacement:
+ description: "nodePlacement provides explicit control over the scheduling of DNS pods. \n Generally, it is useful to run a DNS pod on every node so that DNS queries are always handled by a local DNS pod instead of going over the network to a DNS pod on another node. However, security policies may require restricting the placement of DNS pods to specific nodes. For example, if a security policy prohibits pods on arbitrary nodes from communicating with the API, a node selector can be specified to restrict DNS pods to nodes that are permitted to communicate with the API. Conversely, if running DNS pods on nodes with a particular taint is desired, a toleration can be specified for that taint. \n If unset, defaults are used. See nodePlacement for more details."
+ type: object
+ properties:
+ nodeSelector:
+ description: "nodeSelector is the node selector applied to DNS pods. \n If empty, the default is used, which is currently the following: \n kubernetes.io/os: linux \n This default is subject to change. \n If set, the specified selector is used and replaces the default."
+ type: object
+ additionalProperties:
+ type: string
+ tolerations:
+ description: "tolerations is a list of tolerations applied to DNS pods. \n If empty, the DNS operator sets a toleration for the \"node-role.kubernetes.io/master\" taint. This default is subject to change. Specifying tolerations without including a toleration for the \"node-role.kubernetes.io/master\" taint may be risky as it could lead to an outage if all worker nodes become unavailable. \n Note that the daemon controller adds some tolerations as well. See https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/"
+ type: array
+ items:
+ description: The pod this Toleration is attached to tolerates any taint that matches the triple using the matching operator .
+ type: object
+ properties:
+ effect:
+ description: Effect indicates the taint effect to match. Empty means match all taint effects. When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute.
+ type: string
+ key:
+ description: Key is the taint key that the toleration applies to. Empty means match all taint keys. If the key is empty, operator must be Exists; this combination means to match all values and all keys.
+ type: string
+ operator:
+ description: Operator represents a key's relationship to the value. Valid operators are Exists and Equal. Defaults to Equal. Exists is equivalent to wildcard for value, so that a pod can tolerate all taints of a particular category.
+ type: string
+ tolerationSeconds:
+ description: TolerationSeconds represents the period of time the toleration (which must be of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, it is not set, which means tolerate the taint forever (do not evict). Zero and negative values will be treated as 0 (evict immediately) by the system.
+ type: integer
+ format: int64
+ value:
+ description: Value is the taint value the toleration matches to. If the operator is Exists, the value should be empty, otherwise just a regular string.
+ type: string
+ servers:
+ description: "servers is a list of DNS resolvers that provide name query delegation for one or more subdomains outside the scope of the cluster domain. If servers consists of more than one Server, longest suffix match will be used to determine the Server. \n For example, if there are two Servers, one for \"foo.com\" and another for \"a.foo.com\", and the name query is for \"www.a.foo.com\", it will be routed to the Server with Zone \"a.foo.com\". \n If this field is nil, no servers are created."
+ type: array
+ items:
+ description: Server defines the schema for a server that runs per instance of CoreDNS.
type: object
properties:
- upstreams:
- description: "upstreams is a list of resolvers to forward
- name queries for subdomains of Zones. Upstreams are randomized
- when more than 1 upstream is specified. Each instance of
- CoreDNS performs health checking of Upstreams. When a healthy
- upstream returns an error during the exchange, another resolver
- is tried from Upstreams. Each upstream is represented by
- an IP address or IP:port if the upstream listens on a port
- other than 53. \n A maximum of 15 upstreams is allowed per
- ForwardPlugin."
+ forwardPlugin:
+ description: forwardPlugin defines a schema for configuring CoreDNS to proxy DNS messages to upstream resolvers.
+ type: object
+ properties:
+ upstreams:
+ description: "upstreams is a list of resolvers to forward name queries for subdomains of Zones. Upstreams are randomized when more than 1 upstream is specified. Each instance of CoreDNS performs health checking of Upstreams. When a healthy upstream returns an error during the exchange, another resolver is tried from Upstreams. Each upstream is represented by an IP address or IP:port if the upstream listens on a port other than 53. \n A maximum of 15 upstreams is allowed per ForwardPlugin."
+ type: array
+ maxItems: 15
+ items:
+ type: string
+ name:
+ description: name is required and specifies a unique name for the server. Name must comply with the Service Name Syntax of rfc6335.
+ type: string
+ zones:
+ description: zones is required and specifies the subdomains that Server is authoritative for. Zones must conform to the rfc1123 definition of a subdomain. Specifying the cluster domain (i.e., "cluster.local") is invalid.
type: array
- maxItems: 15
items:
type: string
- name:
- description: name is required and specifies a unique name for
- the server. Name must comply with the Service Name Syntax of
- rfc6335.
- type: string
- zones:
- description: zones is required and specifies the subdomains that
- Server is authoritative for. Zones must conform to the rfc1123
- definition of a subdomain. Specifying the cluster domain (i.e.,
- "cluster.local") is invalid.
- type: array
- items:
- type: string
- status:
- description: status is the most recently observed status of the DNS.
- type: object
- required:
- - clusterDomain
- - clusterIP
- properties:
- clusterDomain:
- description: "clusterDomain is the local cluster DNS domain suffix for
- DNS services. This will be a subdomain as defined in RFC 1034, section
- 3.5: https://tools.ietf.org/html/rfc1034#section-3.5 Example: \"cluster.local\"
- \n More info: https://kubernetes.io/docs/concepts/services-networking/dns-pod-service"
- type: string
- clusterIP:
- description: "clusterIP is the service IP through which this DNS is
- made available. \n In the case of the default DNS, this will be a
- well known IP that is used as the default nameserver for pods that
- are using the default ClusterFirst DNS policy. \n In general, this
- IP can be specified in a pod's spec.dnsConfig.nameservers list or
- used explicitly when performing name resolution from within the cluster.
- Example: dig foo.com @ \n More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies"
- type: string
- conditions:
- description: "conditions provide information about the state of the
- DNS on the cluster. \n These are the supported DNS conditions: \n
- \ * Available - True if the following conditions are met: *
- DNS controller daemonset is available. - False if any of those conditions
- are unsatisfied."
- type: array
- items:
- description: OperatorCondition is just the standard condition fields.
- type: object
- properties:
- lastTransitionTime:
- type: string
- format: date-time
- message:
- type: string
- reason:
- type: string
- status:
- type: string
- type:
- type: string
- version: v1
- versions:
- - name: v1
- served: true
- storage: true
-status:
- acceptedNames:
- kind: ""
- plural: ""
- conditions: []
- storedVersions: []
+ status:
+ description: status is the most recently observed status of the DNS.
+ type: object
+ required:
+ - clusterDomain
+ - clusterIP
+ properties:
+ clusterDomain:
+ description: "clusterDomain is the local cluster DNS domain suffix for DNS services. This will be a subdomain as defined in RFC 1034, section 3.5: https://tools.ietf.org/html/rfc1034#section-3.5 Example: \"cluster.local\" \n More info: https://kubernetes.io/docs/concepts/services-networking/dns-pod-service"
+ type: string
+ clusterIP:
+ description: "clusterIP is the service IP through which this DNS is made available. \n In the case of the default DNS, this will be a well known IP that is used as the default nameserver for pods that are using the default ClusterFirst DNS policy. \n In general, this IP can be specified in a pod's spec.dnsConfig.nameservers list or used explicitly when performing name resolution from within the cluster. Example: dig foo.com @ \n More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies"
+ type: string
+ conditions:
+ description: "conditions provide information about the state of the DNS on the cluster. \n These are the supported DNS conditions: \n * Available - True if the following conditions are met: * DNS controller daemonset is available. - False if any of those conditions are unsatisfied."
+ type: array
+ items:
+ description: OperatorCondition is just the standard condition fields.
+ type: object
+ properties:
+ lastTransitionTime:
+ type: string
+ format: date-time
+ message:
+ type: string
+ reason:
+ type: string
+ status:
+ type: string
+ type:
+ type: string
diff --git a/vendor/github.com/openshift/api/operator/v1/0000_80_csi_snapshot_controller_operator_01_crd.yaml b/vendor/github.com/openshift/api/operator/v1/0000_80_csi_snapshot_controller_operator_01_crd.yaml
new file mode 100644
index 00000000000..88fa22450c5
--- /dev/null
+++ b/vendor/github.com/openshift/api/operator/v1/0000_80_csi_snapshot_controller_operator_01_crd.yaml
@@ -0,0 +1,134 @@
+apiVersion: apiextensions.k8s.io/v1
+kind: CustomResourceDefinition
+metadata:
+ annotations:
+ api-approved.openshift.io: https://github.com/openshift/api/pull/562
+ include.release.openshift.io/ibm-cloud-managed: "true"
+ include.release.openshift.io/self-managed-high-availability: "true"
+ include.release.openshift.io/single-node-developer: "true"
+ name: csisnapshotcontrollers.operator.openshift.io
+spec:
+ group: operator.openshift.io
+ names:
+ kind: CSISnapshotController
+ plural: csisnapshotcontrollers
+ singular: csisnapshotcontroller
+ scope: Cluster
+ versions:
+ - name: v1
+ schema:
+ openAPIV3Schema:
+ description: CSISnapshotController provides a means to configure an operator to manage the CSI snapshots. `cluster` is the canonical name.
+ type: object
+ required:
+ - spec
+ properties:
+ apiVersion:
+ description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
+ type: string
+ kind:
+ description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
+ type: string
+ metadata:
+ type: object
+ spec:
+ description: spec holds user settable values for configuration
+ type: object
+ properties:
+ logLevel:
+ description: "logLevel is an intent based logging for an overall component. It does not give fine grained control, but it is a simple way to manage coarse grained logging choices that operators have to interpret for their operands. \n Valid values are: \"Normal\", \"Debug\", \"Trace\", \"TraceAll\". Defaults to \"Normal\"."
+ type: string
+ default: Normal
+ enum:
+ - ""
+ - Normal
+ - Debug
+ - Trace
+ - TraceAll
+ managementState:
+ description: managementState indicates whether and how the operator should manage the component
+ type: string
+ pattern: ^(Managed|Unmanaged|Force|Removed)$
+ observedConfig:
+ description: observedConfig holds a sparse config that controller has observed from the cluster state. It exists in spec because it is an input to the level for the operator
+ type: object
+ nullable: true
+ x-kubernetes-preserve-unknown-fields: true
+ operatorLogLevel:
+ description: "operatorLogLevel is an intent based logging for the operator itself. It does not give fine grained control, but it is a simple way to manage coarse grained logging choices that operators have to interpret for themselves. \n Valid values are: \"Normal\", \"Debug\", \"Trace\", \"TraceAll\". Defaults to \"Normal\"."
+ type: string
+ default: Normal
+ enum:
+ - ""
+ - Normal
+ - Debug
+ - Trace
+ - TraceAll
+ unsupportedConfigOverrides:
+ description: 'unsupportedConfigOverrides holds a sparse config that will override any previously set options. It only needs to be the fields to override it will end up overlaying in the following order: 1. hardcoded defaults 2. observedConfig 3. unsupportedConfigOverrides'
+ type: object
+ nullable: true
+ x-kubernetes-preserve-unknown-fields: true
+ status:
+ description: status holds observed values from the cluster. They may not be overridden.
+ type: object
+ properties:
+ conditions:
+ description: conditions is a list of conditions and their status
+ type: array
+ items:
+ description: OperatorCondition is just the standard condition fields.
+ type: object
+ properties:
+ lastTransitionTime:
+ type: string
+ format: date-time
+ message:
+ type: string
+ reason:
+ type: string
+ status:
+ type: string
+ type:
+ type: string
+ generations:
+ description: generations are used to determine when an item needs to be reconciled or has changed in a way that needs a reaction.
+ type: array
+ items:
+ description: GenerationStatus keeps track of the generation for a given resource so that decisions about forced updates can be made.
+ type: object
+ properties:
+ group:
+ description: group is the group of the thing you're tracking
+ type: string
+ hash:
+ description: hash is an optional field set for resources without generation that are content sensitive like secrets and configmaps
+ type: string
+ lastGeneration:
+ description: lastGeneration is the last generation of the workload controller involved
+ type: integer
+ format: int64
+ name:
+ description: name is the name of the thing you're tracking
+ type: string
+ namespace:
+ description: namespace is where the thing you're tracking is
+ type: string
+ resource:
+ description: resource is the resource type of the thing you're tracking
+ type: string
+ observedGeneration:
+ description: observedGeneration is the last generation change you've dealt with
+ type: integer
+ format: int64
+ readyReplicas:
+ description: readyReplicas indicates how many replicas are ready and at the desired state
+ type: integer
+ format: int32
+ version:
+ description: version is the level this availability applies to
+ type: string
+ served: true
+ storage: true
+ subresources:
+ status: {}
diff --git a/vendor/github.com/openshift/api/operator/v1/0000_90_cluster_csi_driver_01_config.crd.yaml b/vendor/github.com/openshift/api/operator/v1/0000_90_cluster_csi_driver_01_config.crd.yaml
new file mode 100644
index 00000000000..21c94a01320
--- /dev/null
+++ b/vendor/github.com/openshift/api/operator/v1/0000_90_cluster_csi_driver_01_config.crd.yaml
@@ -0,0 +1,176 @@
+apiVersion: apiextensions.k8s.io/v1
+kind: CustomResourceDefinition
+metadata:
+ annotations:
+ api-approved.openshift.io: https://github.com/openshift/api/pull/701
+ include.release.openshift.io/ibm-cloud-managed: "true"
+ include.release.openshift.io/self-managed-high-availability: "true"
+ include.release.openshift.io/single-node-developer: "true"
+ name: clustercsidrivers.operator.openshift.io
+spec:
+ group: operator.openshift.io
+ names:
+ kind: ClusterCSIDriver
+ plural: clustercsidrivers
+ singular: clustercsidriver
+ scope: Cluster
+ versions:
+ - name: v1
+ schema:
+ openAPIV3Schema:
+ description: ClusterCSIDriver object allows management and configuration of
+ a CSI driver operator installed by default in OpenShift. Name of the object
+ must be name of the CSI driver it operates. See CSIDriverName type for list
+ of allowed values.
+ properties:
+ apiVersion:
+ description: 'APIVersion defines the versioned schema of this representation
+ of an object. Servers should convert recognized schemas to the latest
+ internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
+ type: string
+ kind:
+ description: 'Kind is a string value representing the REST resource this
+ object represents. Servers may infer this from the endpoint the client
+ submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
+ type: string
+ metadata:
+ properties:
+ name:
+ enum:
+ - ebs.csi.aws.com
+ - disk.csi.azure.com
+ - pd.csi.storage.gke.io
+ - cinder.csi.openstack.org
+ - csi.vsphere.vmware.com
+ - manila.csi.openstack.org
+ - csi.ovirt.org
+ - csi.kubevirt.io
+ type: string
+ type: object
+ spec:
+ description: spec holds user settable values for configuration
+ properties:
+ logLevel:
+ default: Normal
+ description: "logLevel is an intent based logging for an overall component.
+ \ It does not give fine grained control, but it is a simple way
+ to manage coarse grained logging choices that operators have to
+ interpret for their operands. \n Valid values are: \"Normal\", \"Debug\",
+ \"Trace\", \"TraceAll\". Defaults to \"Normal\"."
+ enum:
+ - ""
+ - Normal
+ - Debug
+ - Trace
+ - TraceAll
+ type: string
+ managementState:
+ description: managementState indicates whether and how the operator
+ should manage the component
+ pattern: ^(Managed|Unmanaged|Force|Removed)$
+ type: string
+ observedConfig:
+ description: observedConfig holds a sparse config that controller
+ has observed from the cluster state. It exists in spec because
+ it is an input to the level for the operator
+ nullable: true
+ type: object
+ x-kubernetes-preserve-unknown-fields: true
+ operatorLogLevel:
+ default: Normal
+ description: "operatorLogLevel is an intent based logging for the
+ operator itself. It does not give fine grained control, but it
+ is a simple way to manage coarse grained logging choices that operators
+ have to interpret for themselves. \n Valid values are: \"Normal\",
+ \"Debug\", \"Trace\", \"TraceAll\". Defaults to \"Normal\"."
+ enum:
+ - ""
+ - Normal
+ - Debug
+ - Trace
+ - TraceAll
+ type: string
+ unsupportedConfigOverrides:
+ description: 'unsupportedConfigOverrides holds a sparse config that
+ will override any previously set options. It only needs to be the
+ fields to override it will end up overlaying in the following order:
+ 1. hardcoded defaults 2. observedConfig 3. unsupportedConfigOverrides'
+ nullable: true
+ type: object
+ x-kubernetes-preserve-unknown-fields: true
+ type: object
+ status:
+ description: status holds observed values from the cluster. They may not
+ be overridden.
+ properties:
+ conditions:
+ description: conditions is a list of conditions and their status
+ items:
+ description: OperatorCondition is just the standard condition fields.
+ properties:
+ lastTransitionTime:
+ format: date-time
+ type: string
+ message:
+ type: string
+ reason:
+ type: string
+ status:
+ type: string
+ type:
+ type: string
+ type: object
+ type: array
+ generations:
+ description: generations are used to determine when an item needs
+ to be reconciled or has changed in a way that needs a reaction.
+ items:
+ description: GenerationStatus keeps track of the generation for
+ a given resource so that decisions about forced updates can be
+ made.
+ properties:
+ group:
+ description: group is the group of the thing you're tracking
+ type: string
+ hash:
+ description: hash is an optional field set for resources without
+ generation that are content sensitive like secrets and configmaps
+ type: string
+ lastGeneration:
+ description: lastGeneration is the last generation of the workload
+ controller involved
+ format: int64
+ type: integer
+ name:
+ description: name is the name of the thing you're tracking
+ type: string
+ namespace:
+ description: namespace is where the thing you're tracking is
+ type: string
+ resource:
+ description: resource is the resource type of the thing you're
+ tracking
+ type: string
+ type: object
+ type: array
+ observedGeneration:
+ description: observedGeneration is the last generation change you've
+ dealt with
+ format: int64
+ type: integer
+ readyReplicas:
+ description: readyReplicas indicates how many replicas are ready and
+ at the desired state
+ format: int32
+ type: integer
+ version:
+ description: version is the level this availability applies to
+ type: string
+ type: object
+ required:
+ - spec
+ type: object
+ served: true
+ storage: true
+ subresources:
+ status: {}
diff --git a/vendor/github.com/openshift/api/operator/v1/0000_90_cluster_csi_driver_01_config.crd.yaml-patch b/vendor/github.com/openshift/api/operator/v1/0000_90_cluster_csi_driver_01_config.crd.yaml-patch
new file mode 100644
index 00000000000..dfcaf8b44e9
--- /dev/null
+++ b/vendor/github.com/openshift/api/operator/v1/0000_90_cluster_csi_driver_01_config.crd.yaml-patch
@@ -0,0 +1,14 @@
+- op: add
+ path: /spec/versions/name=v1/schema/openAPIV3Schema/properties/metadata/properties
+ value:
+ name:
+ type: string
+ enum:
+ - ebs.csi.aws.com
+ - disk.csi.azure.com
+ - pd.csi.storage.gke.io
+ - cinder.csi.openstack.org
+ - csi.vsphere.vmware.com
+ - manila.csi.openstack.org
+ - csi.ovirt.org
+ - csi.kubevirt.io
diff --git a/vendor/github.com/openshift/api/operator/v1/register.go b/vendor/github.com/openshift/api/operator/v1/register.go
index ab0b1ffa7f4..71727a824c2 100644
--- a/vendor/github.com/openshift/api/operator/v1/register.go
+++ b/vendor/github.com/openshift/api/operator/v1/register.go
@@ -36,8 +36,14 @@ func addKnownTypes(scheme *runtime.Scheme) error {
&AuthenticationList{},
&DNS{},
&DNSList{},
+ &CloudCredential{},
+ &CloudCredentialList{},
+ &ClusterCSIDriver{},
+ &ClusterCSIDriverList{},
&Console{},
&ConsoleList{},
+ &CSISnapshotController{},
+ &CSISnapshotControllerList{},
&Etcd{},
&EtcdList{},
&KubeAPIServer{},
@@ -62,6 +68,8 @@ func addKnownTypes(scheme *runtime.Scheme) error {
&ServiceCatalogControllerManagerList{},
&IngressController{},
&IngressControllerList{},
+ &Storage{},
+ &StorageList{},
)
return nil
diff --git a/vendor/github.com/openshift/api/operator/v1/types.go b/vendor/github.com/openshift/api/operator/v1/types.go
index faf5a96c165..c4586ad3178 100644
--- a/vendor/github.com/openshift/api/operator/v1/types.go
+++ b/vendor/github.com/openshift/api/operator/v1/types.go
@@ -51,13 +51,21 @@ type OperatorSpec struct {
// logLevel is an intent based logging for an overall component. It does not give fine grained control, but it is a
// simple way to manage coarse grained logging choices that operators have to interpret for their operands.
+ //
+ // Valid values are: "Normal", "Debug", "Trace", "TraceAll".
+ // Defaults to "Normal".
// +optional
- LogLevel LogLevel `json:"logLevel"`
+ // +kubebuilder:default=Normal
+ LogLevel LogLevel `json:"logLevel,omitempty"`
// operatorLogLevel is an intent based logging for the operator itself. It does not give fine grained control, but it is a
// simple way to manage coarse grained logging choices that operators have to interpret for themselves.
+ //
+ // Valid values are: "Normal", "Debug", "Trace", "TraceAll".
+ // Defaults to "Normal".
// +optional
- OperatorLogLevel LogLevel `json:"operatorLogLevel"`
+ // +kubebuilder:default=Normal
+ OperatorLogLevel LogLevel `json:"operatorLogLevel,omitempty"`
// unsupportedConfigOverrides holds a sparse config that will override any previously set options. It only needs to be the fields to override
// it will end up overlaying in the following order:
@@ -77,6 +85,7 @@ type OperatorSpec struct {
ObservedConfig runtime.RawExtension `json:"observedConfig"`
}
+// +kubebuilder:validation:Enum="";Normal;Debug;Trace;TraceAll
type LogLevel string
var (
@@ -206,9 +215,13 @@ type NodeStatus struct {
CurrentRevision int32 `json:"currentRevision"`
// targetRevision is the generation of the deployment we're trying to apply
TargetRevision int32 `json:"targetRevision,omitempty"`
+
// lastFailedRevision is the generation of the deployment we tried and failed to deploy.
LastFailedRevision int32 `json:"lastFailedRevision,omitempty"`
-
+ // lastFailedTime is the time the last failed revision failed the last time.
+ LastFailedTime *metav1.Time `json:"lastFailedTime,omitempty"`
+ // lastFailedCount is how often the last failed revision failed.
+ LastFailedCount int `json:"lastFailedCount,omitempty"`
// lastFailedRevisionErrors is a list of the errors during the failed deployment referenced in lastFailedRevision
LastFailedRevisionErrors []string `json:"lastFailedRevisionErrors,omitempty"`
}
diff --git a/vendor/github.com/openshift/api/operator/v1/types_authentication.go b/vendor/github.com/openshift/api/operator/v1/types_authentication.go
index f27154117a4..61c777cf264 100644
--- a/vendor/github.com/openshift/api/operator/v1/types_authentication.go
+++ b/vendor/github.com/openshift/api/operator/v1/types_authentication.go
@@ -25,9 +25,21 @@ type AuthenticationSpec struct {
}
type AuthenticationStatus struct {
+ // OAuthAPIServer holds status specific only to oauth-apiserver
+ // +optional
+ OAuthAPIServer OAuthAPIServerStatus `json:"oauthAPIServer,omitempty"`
+
OperatorStatus `json:",inline"`
}
+type OAuthAPIServerStatus struct {
+ // LatestAvailableRevision is the latest revision used as suffix of revisioned
+ // secrets like encryption-config. A new revision causes a new deployment of pods.
+ // +optional
+ // +kubebuilder:validation:Minimum=0
+ LatestAvailableRevision int32 `json:"latestAvailableRevision,omitempty"`
+}
+
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// AuthenticationList is a collection of items
diff --git a/vendor/github.com/openshift/api/operator/v1/types_cloudcredential.go b/vendor/github.com/openshift/api/operator/v1/types_cloudcredential.go
new file mode 100644
index 00000000000..8d1806cd6c7
--- /dev/null
+++ b/vendor/github.com/openshift/api/operator/v1/types_cloudcredential.go
@@ -0,0 +1,76 @@
+package v1
+
+import (
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+)
+
+// +genclient
+// +genclient:nonNamespaced
+// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
+
+// CloudCredential provides a means to configure an operator to manage CredentialsRequests.
+type CloudCredential struct {
+ metav1.TypeMeta `json:",inline"`
+ metav1.ObjectMeta `json:"metadata,omitempty"`
+
+ // +kubebuilder:validation:Required
+ // +required
+ Spec CloudCredentialSpec `json:"spec"`
+ // +optional
+ Status CloudCredentialStatus `json:"status"`
+}
+
+// CloudCredentialsMode is the specified mode the cloud-credential-operator
+// should reconcile CredentialsRequest with
+// +kubebuilder:validation:Enum="";Manual;Mint;Passthrough
+type CloudCredentialsMode string
+
+const (
+ // CloudCredentialsModeManual tells cloud-credential-operator to not reconcile any CredentialsRequests
+ // (primarily used for the disconnected VPC use-cases).
+ CloudCredentialsModeManual CloudCredentialsMode = "Manual"
+
+ // CloudCredentialsModeMint tells cloud-credential-operator to reconcile all CredentialsRequests
+ // by minting new users/credentials.
+ CloudCredentialsModeMint CloudCredentialsMode = "Mint"
+
+ // CloudCredentialsModePassthrough tells cloud-credential-operator to reconcile all CredentialsRequests
+ // by copying the cloud-specific secret data.
+ CloudCredentialsModePassthrough CloudCredentialsMode = "Passthrough"
+
+ // CloudCredentialsModeDefault puts CCO into the default mode of operation (per-cloud/platform defaults):
+ // AWS/Azure/GCP: dynamically determine cluster's cloud credential capabilities to affect
+ // processing of CredentialsRequests
+ // All other clouds/platforms (OpenStack, oVirt, vSphere, etc): run in "passthrough" mode
+ CloudCredentialsModeDefault CloudCredentialsMode = ""
+)
+
+// CloudCredentialSpec is the specification of the desired behavior of the cloud-credential-operator.
+type CloudCredentialSpec struct {
+ OperatorSpec `json:",inline"`
+ // CredentialsMode allows informing CCO that it should not attempt to dynamically
+ // determine the root cloud credentials capabilities, and it should just run in
+ // the specified mode.
+ // It also allows putting the operator into "manual" mode if desired.
+ // Leaving the field in default mode runs CCO so that the cluster's cloud credentials
+ // will be dynamically probed for capabilities (on supported clouds/platforms).
+ // Supported modes:
+ // AWS/Azure/GCP: "" (Default), "Mint", "Passthrough", "Manual"
+ // Others: Do not set value as other platforms only support running in "Passthrough"
+ // +optional
+ CredentialsMode CloudCredentialsMode `json:"credentialsMode,omitempty"`
+}
+
+// CloudCredentialStatus defines the observed status of the cloud-credential-operator.
+type CloudCredentialStatus struct {
+ OperatorStatus `json:",inline"`
+}
+
+// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
+
+type CloudCredentialList struct {
+ metav1.TypeMeta `json:",inline"`
+ metav1.ListMeta `json:"metadata"`
+
+ Items []CloudCredential `json:"items"`
+}
diff --git a/vendor/github.com/openshift/api/operator/v1/types_config.go b/vendor/github.com/openshift/api/operator/v1/types_config.go
new file mode 100644
index 00000000000..e073269ffa9
--- /dev/null
+++ b/vendor/github.com/openshift/api/operator/v1/types_config.go
@@ -0,0 +1,43 @@
+package v1
+
+import (
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+)
+
+// +genclient
+// +genclient:nonNamespaced
+// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
+
+// Config provides information to configure the config operator. It handles installation, migration or synchronization of cloud based cluster configurations like AWS or Azure.
+type Config struct {
+ metav1.TypeMeta `json:",inline"`
+ metav1.ObjectMeta `json:"metadata"`
+
+ // spec is the specification of the desired behavior of the Config Operator.
+ // +kubebuilder:validation:Required
+ // +required
+ Spec ConfigSpec `json:"spec"`
+
+ // status defines the observed status of the Config Operator.
+ // +optional
+ Status ConfigStatus `json:"status"`
+}
+
+type ConfigSpec struct {
+ OperatorSpec `json:",inline"`
+}
+
+type ConfigStatus struct {
+ OperatorStatus `json:",inline"`
+}
+
+// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
+
+// ConfigList is a collection of items
+type ConfigList struct {
+ metav1.TypeMeta `json:",inline"`
+ metav1.ListMeta `json:"metadata"`
+
+ // Items contains the items
+ Items []Config `json:"items"`
+}
diff --git a/vendor/github.com/openshift/api/operator/v1/types_console.go b/vendor/github.com/openshift/api/operator/v1/types_console.go
index f766df48f0b..2f6443df70a 100644
--- a/vendor/github.com/openshift/api/operator/v1/types_console.go
+++ b/vendor/github.com/openshift/api/operator/v1/types_console.go
@@ -31,6 +31,37 @@ type ConsoleSpec struct {
Customization ConsoleCustomization `json:"customization"`
// providers contains configuration for using specific service providers.
Providers ConsoleProviders `json:"providers"`
+ // route contains hostname and secret reference that contains the serving certificate.
+ // If a custom route is specified, a new route will be created with the
+ // provided hostname, under which console will be available.
+ // In case of custom hostname uses the default routing suffix of the cluster,
+ // the Secret specification for a serving certificate will not be needed.
+ // In case of custom hostname points to an arbitrary domain, manual DNS configurations steps are necessary.
+ // The default console route will be maintained to reserve the default hostname
+ // for console if the custom route is removed.
+ // If not specified, default route will be used.
+ // DEPRECATED
+ // +optional
+ Route ConsoleConfigRoute `json:"route"`
+ // plugins defines a list of enabled console plugin names.
+ // +optional
+ Plugins []string `json:"plugins,omitempty"`
+}
+
+// ConsoleConfigRoute holds information on external route access to console.
+// DEPRECATED
+type ConsoleConfigRoute struct {
+ // hostname is the desired custom domain under which console will be available.
+ Hostname string `json:"hostname"`
+ // secret points to secret in the openshift-config namespace that contains custom
+ // certificate and key and needs to be created manually by the cluster admin.
+ // Referenced Secret is required to contain following key value pairs:
+ // - "tls.crt" - to specifies custom certificate
+ // - "tls.key" - to specifies private key of the custom certificate
+ // If the custom hostname uses the default routing suffix of the cluster,
+ // the Secret specification for a serving certificate will not be needed.
+ // +optional
+ Secret configv1.SecretNameReference `json:"secret"`
}
// ConsoleStatus defines the observed status of the Console.
@@ -80,6 +111,92 @@ type ConsoleCustomization struct {
// SVG format preferred
// +optional
CustomLogoFile configv1.ConfigMapFileReference `json:"customLogoFile,omitempty"`
+ // developerCatalog allows to configure the shown developer catalog categories.
+ // +kubebuilder:validation:Optional
+ // +optional
+ DeveloperCatalog DeveloperConsoleCatalogCustomization `json:"developerCatalog,omitempty"`
+ // projectAccess allows customizing the available list of ClusterRoles in the Developer perspective
+ // Project access page which can be used by a project admin to specify roles to other users and
+ // restrict access within the project. If set, the list will replace the default ClusterRole options.
+ // +kubebuilder:validation:Optional
+ // +optional
+ ProjectAccess ProjectAccess `json:"projectAccess,omitempty"`
+ // quickStarts allows customization of available ConsoleQuickStart resources in console.
+ // +kubebuilder:validation:Optional
+ // +optional
+ QuickStarts QuickStarts `json:"quickStarts,omitempty"`
+ // addPage allows customizing actions on the Add page in developer perspective.
+ // +kubebuilder:validation:Optional
+ // +optional
+ AddPage AddPage `json:"addPage,omitempty"`
+}
+
+// ProjectAccess contains options for project access roles
+type ProjectAccess struct {
+ // availableClusterRoles is the list of ClusterRole names that are assignable to users
+ // through the project access tab.
+ // +kubebuilder:validation:Optional
+ // +optional
+ AvailableClusterRoles []string `json:"availableClusterRoles,omitempty"`
+}
+
+// DeveloperConsoleCatalogCustomization allow cluster admin to configure developer catalog.
+type DeveloperConsoleCatalogCustomization struct {
+ // categories which are shown in the developer catalog.
+ // +kubebuilder:validation:Optional
+ // +optional
+ Categories []DeveloperConsoleCatalogCategory `json:"categories,omitempty"`
+}
+
+// DeveloperConsoleCatalogCategoryMeta are the key identifiers of a developer catalog category.
+type DeveloperConsoleCatalogCategoryMeta struct {
+ // ID is an identifier used in the URL to enable deep linking in console.
+ // ID is required and must have 1-32 URL safe (A-Z, a-z, 0-9, - and _) characters.
+ // +kubebuilder:validation:Required
+ // +kubebuilder:validation:MinLength=1
+ // +kubebuilder:validation:MaxLength=32
+ // +kubebuilder:validation:Pattern=`^[A-Za-z0-9-_]+$`
+ // +required
+ ID string `json:"id"`
+ // label defines a category display label. It is required and must have 1-64 characters.
+ // +kubebuilder:validation:Required
+ // +kubebuilder:validation:MinLength=1
+ // +kubebuilder:validation:MaxLength=64
+ // +required
+ Label string `json:"label"`
+ // tags is a list of strings that will match the category. A selected category
+ // show all items which has at least one overlapping tag between category and item.
+ // +kubebuilder:validation:Optional
+ // +optional
+ Tags []string `json:"tags,omitempty"`
+}
+
+// DeveloperConsoleCatalogCategory for the developer console catalog.
+type DeveloperConsoleCatalogCategory struct {
+ // defines top level category ID, label and filter tags.
+ DeveloperConsoleCatalogCategoryMeta `json:",inline"`
+ // subcategories defines a list of child categories.
+ // +kubebuilder:validation:Optional
+ // +optional
+ Subcategories []DeveloperConsoleCatalogCategoryMeta `json:"subcategories,omitempty"`
+}
+
+// QuickStarts allow cluster admins to customize available ConsoleQuickStart resources.
+type QuickStarts struct {
+ // disabled is a list of ConsoleQuickStart resource names that are not shown to users.
+ // +kubebuilder:validation:Optional
+ // +optional
+ Disabled []string `json:"disabled,omitempty"`
+}
+
+// AddPage allows customizing actions on the Add page in developer perspective.
+type AddPage struct {
+ // disabledActions is a list of actions that are not shown to users.
+ // Each action in the list is represented by its ID.
+ // +kubebuilder:validation:Optional
+ // +kubebuilder:validation:MinItems=1
+ // +optional
+ DisabledActions []string `json:"disabledActions,omitempty"`
}
// Brand is a specific supported brand within the console.
diff --git a/vendor/github.com/openshift/api/operator/v1/types_csi_cluster_driver.go b/vendor/github.com/openshift/api/operator/v1/types_csi_cluster_driver.go
new file mode 100644
index 00000000000..09413dc7400
--- /dev/null
+++ b/vendor/github.com/openshift/api/operator/v1/types_csi_cluster_driver.go
@@ -0,0 +1,71 @@
+package v1
+
+import (
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+)
+
+// ClusterCSIDriver is used to manage and configure CSI driver installed by default
+// in OpenShift. An example configuration may look like:
+// apiVersion: operator.openshift.io/v1
+// kind: "ClusterCSIDriver"
+// metadata:
+// name: "ebs.csi.aws.com"
+// spec:
+// logLevel: Debug
+
+// +genclient
+// +genclient:nonNamespaced
+// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
+
+// ClusterCSIDriver object allows management and configuration of a CSI driver operator
+// installed by default in OpenShift. Name of the object must be name of the CSI driver
+// it operates. See CSIDriverName type for list of allowed values.
+type ClusterCSIDriver struct {
+ metav1.TypeMeta `json:",inline"`
+ metav1.ObjectMeta `json:"metadata,omitempty"`
+
+ // spec holds user settable values for configuration
+ // +kubebuilder:validation:Required
+ // +required
+ Spec ClusterCSIDriverSpec `json:"spec"`
+
+ // status holds observed values from the cluster. They may not be overridden.
+ // +optional
+ Status ClusterCSIDriverStatus `json:"status"`
+}
+
+// CSIDriverName is the name of the CSI driver
+type CSIDriverName string
+
+// If you are adding a new driver name here, ensure that kubebuilder:validation:Enum is updated above
+// and 0000_90_cluster_csi_driver_01_config.crd.yaml-merge-patch file is also updated with new driver name.
+const (
+ AWSEBSCSIDriver CSIDriverName = "ebs.csi.aws.com"
+ AzureDiskCSIDriver CSIDriverName = "disk.csi.azure.com"
+ GCPPDCSIDriver CSIDriverName = "pd.csi.storage.gke.io"
+ CinderCSIDriver CSIDriverName = "cinder.csi.openstack.org"
+ VSphereCSIDriver CSIDriverName = "csi.vsphere.vmware.com"
+ ManilaCSIDriver CSIDriverName = "manila.csi.openstack.org"
+ OvirtCSIDriver CSIDriverName = "csi.ovirt.org"
+ KubevirtCSIDriver CSIDriverName = "csi.kubevirt.io"
+)
+
+// ClusterCSIDriverSpec is the desired behavior of CSI driver operator
+type ClusterCSIDriverSpec struct {
+ OperatorSpec `json:",inline"`
+}
+
+// ClusterCSIDriverStatus is the observed status of CSI driver operator
+type ClusterCSIDriverStatus struct {
+ OperatorStatus `json:",inline"`
+}
+
+// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
+// +kubebuilder:object:root=true
+
+// ClusterCSIDriverList contains a list of ClusterCSIDriver
+type ClusterCSIDriverList struct {
+ metav1.TypeMeta `json:",inline"`
+ metav1.ListMeta `json:"metadata,omitempty"`
+ Items []ClusterCSIDriver `json:"items"`
+}
diff --git a/vendor/github.com/openshift/api/operator/v1/types_csi_snapshot.go b/vendor/github.com/openshift/api/operator/v1/types_csi_snapshot.go
new file mode 100644
index 00000000000..5b6c06aaff1
--- /dev/null
+++ b/vendor/github.com/openshift/api/operator/v1/types_csi_snapshot.go
@@ -0,0 +1,44 @@
+package v1
+
+import (
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+)
+
+// +genclient
+// +genclient:nonNamespaced
+// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
+
+// CSISnapshotController provides a means to configure an operator to manage the CSI snapshots. `cluster` is the canonical name.
+type CSISnapshotController struct {
+ metav1.TypeMeta `json:",inline"`
+ metav1.ObjectMeta `json:"metadata,omitempty"`
+
+ // spec holds user settable values for configuration
+ // +kubebuilder:validation:Required
+ // +required
+ Spec CSISnapshotControllerSpec `json:"spec"`
+
+ // status holds observed values from the cluster. They may not be overridden.
+ // +optional
+ Status CSISnapshotControllerStatus `json:"status"`
+}
+
+// CSISnapshotControllerSpec is the specification of the desired behavior of the CSISnapshotController operator.
+type CSISnapshotControllerSpec struct {
+ OperatorSpec `json:",inline"`
+}
+
+// CSISnapshotControllerStatus defines the observed status of the CSISnapshotController operator.
+type CSISnapshotControllerStatus struct {
+ OperatorStatus `json:",inline"`
+}
+
+// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
+// +kubebuilder:object:root=true
+
+// CSISnapshotControllerList contains a list of CSISnapshotControllers.
+type CSISnapshotControllerList struct {
+ metav1.TypeMeta `json:",inline"`
+ metav1.ListMeta `json:"metadata,omitempty"`
+ Items []CSISnapshotController `json:"items"`
+}
diff --git a/vendor/github.com/openshift/api/operator/v1/types_dns.go b/vendor/github.com/openshift/api/operator/v1/types_dns.go
index 5bc36146852..0f73dc373b5 100644
--- a/vendor/github.com/openshift/api/operator/v1/types_dns.go
+++ b/vendor/github.com/openshift/api/operator/v1/types_dns.go
@@ -2,6 +2,8 @@ package v1
import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+
+ corev1 "k8s.io/api/core/v1"
)
// +genclient
@@ -42,6 +44,24 @@ type DNSSpec struct {
//
// +optional
Servers []Server `json:"servers,omitempty"`
+
+ // nodePlacement provides explicit control over the scheduling of DNS
+ // pods.
+ //
+ // Generally, it is useful to run a DNS pod on every node so that DNS
+ // queries are always handled by a local DNS pod instead of going over
+ // the network to a DNS pod on another node. However, security policies
+ // may require restricting the placement of DNS pods to specific nodes.
+ // For example, if a security policy prohibits pods on arbitrary nodes
+ // from communicating with the API, a node selector can be specified to
+ // restrict DNS pods to nodes that are permitted to communicate with the
+ // API. Conversely, if running DNS pods on nodes with a particular
+ // taint is desired, a toleration can be specified for that taint.
+ //
+ // If unset, defaults are used. See nodePlacement for more details.
+ //
+ // +optional
+ NodePlacement DNSNodePlacement `json:"nodePlacement,omitempty"`
}
// Server defines the schema for a server that runs per instance of CoreDNS.
@@ -73,6 +93,36 @@ type ForwardPlugin struct {
Upstreams []string `json:"upstreams"`
}
+// DNSNodePlacement describes the node scheduling configuration for DNS pods.
+type DNSNodePlacement struct {
+ // nodeSelector is the node selector applied to DNS pods.
+ //
+ // If empty, the default is used, which is currently the following:
+ //
+ // kubernetes.io/os: linux
+ //
+ // This default is subject to change.
+ //
+ // If set, the specified selector is used and replaces the default.
+ //
+ // +optional
+ NodeSelector map[string]string `json:"nodeSelector,omitempty"`
+
+ // tolerations is a list of tolerations applied to DNS pods.
+ //
+ // If empty, the DNS operator sets a toleration for the
+ // "node-role.kubernetes.io/master" taint. This default is subject to
+ // change. Specifying tolerations without including a toleration for
+ // the "node-role.kubernetes.io/master" taint may be risky as it could
+ // lead to an outage if all worker nodes become unavailable.
+ //
+ // Note that the daemon controller adds some tolerations as well. See
+ // https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/
+ //
+ // +optional
+ Tolerations []corev1.Toleration `json:"tolerations,omitempty"`
+}
+
const (
// Available indicates the DNS controller daemonset is available.
DNSAvailable = "Available"
diff --git a/vendor/github.com/openshift/api/operator/v1/types_etcd.go b/vendor/github.com/openshift/api/operator/v1/types_etcd.go
index 6a2fbdb9acf..106c92b8133 100644
--- a/vendor/github.com/openshift/api/operator/v1/types_etcd.go
+++ b/vendor/github.com/openshift/api/operator/v1/types_etcd.go
@@ -8,7 +8,7 @@ import (
// +genclient:nonNamespaced
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-// Etcd provides information to configure an operator to manage kube-apiserver.
+// Etcd provides information to configure an operator to manage etcd.
type Etcd struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata"`
diff --git a/vendor/github.com/openshift/api/operator/v1/types_ingress.go b/vendor/github.com/openshift/api/operator/v1/types_ingress.go
index cccbeca81c5..126b53cf0d8 100644
--- a/vendor/github.com/openshift/api/operator/v1/types_ingress.go
+++ b/vendor/github.com/openshift/api/operator/v1/types_ingress.go
@@ -2,6 +2,7 @@ package v1
import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/runtime"
corev1 "k8s.io/api/core/v1"
@@ -60,6 +61,17 @@ type IngressControllerSpec struct {
// +optional
Domain string `json:"domain,omitempty"`
+ // httpErrorCodePages specifies a configmap with custom error pages.
+ // The administrator must create this configmap in the openshift-config namespace.
+ // This configmap should have keys in the format "error-page-.http",
+ // where is an HTTP error code.
+ // For example, "error-page-503.http" defines an error page for HTTP 503 responses.
+ // Currently only error pages for 503 and 404 responses can be customized.
+ // Each value in the configmap should be the full response, including HTTP headers.
+ // Eg- https://raw.githubusercontent.com/openshift/router/fadab45747a9b30cc3f0a4b41ad2871f95827a93/images/router/haproxy/conf/error-page-503.http
+ // If this field is empty, the ingress controller uses the default error pages.
+ HttpErrorCodePages configv1.ConfigMapNameReference `json:"httpErrorCodePages,omitempty"`
+
// replicas is the desired number of ingress controller replicas. If unset,
// defaults to 2.
//
@@ -75,6 +87,7 @@ type IngressControllerSpec struct {
// AWS: LoadBalancerService (with External scope)
// Azure: LoadBalancerService (with External scope)
// GCP: LoadBalancerService (with External scope)
+ // IBMCloud: LoadBalancerService (with External scope)
// Libvirt: HostNetwork
//
// Any other platform types (including None) default to HostNetwork.
@@ -98,6 +111,13 @@ type IngressControllerSpec struct {
// the generated certificate's CA will be automatically integrated with the
// cluster's trust store.
//
+ // If a wildcard certificate is used and shared by multiple
+ // HTTP/2 enabled routes (which implies ALPN) then clients
+ // (i.e., notably browsers) are at liberty to reuse open
+ // connections. This means a client can reuse a connection to
+ // another route and that is likely to fail. This behaviour is
+ // generally known as connection coalescing.
+ //
// The in-use certificate (whether generated or user-specified) will be
// automatically integrated with OpenShift's built-in OAuth server.
//
@@ -145,6 +165,48 @@ type IngressControllerSpec struct {
//
// +optional
TLSSecurityProfile *configv1.TLSSecurityProfile `json:"tlsSecurityProfile,omitempty"`
+
+ // routeAdmission defines a policy for handling new route claims (for example,
+ // to allow or deny claims across namespaces).
+ //
+ // If empty, defaults will be applied. See specific routeAdmission fields
+ // for details about their defaults.
+ //
+ // +optional
+ RouteAdmission *RouteAdmissionPolicy `json:"routeAdmission,omitempty"`
+
+ // logging defines parameters for what should be logged where. If this
+ // field is empty, operational logs are enabled but access logs are
+ // disabled.
+ //
+ // +optional
+ Logging *IngressControllerLogging `json:"logging,omitempty"`
+
+ // httpHeaders defines policy for HTTP headers.
+ //
+ // If this field is empty, the default values are used.
+ //
+ // +optional
+ HTTPHeaders *IngressControllerHTTPHeaders `json:"httpHeaders,omitempty"`
+
+ // tuningOptions defines parameters for adjusting the performance of
+ // ingress controller pods. All fields are optional and will use their
+ // respective defaults if not set. See specific tuningOptions fields for
+ // more details.
+ //
+ // Setting fields within tuningOptions is generally not recommended. The
+ // default values are suitable for most configurations.
+ //
+ // +optional
+ TuningOptions IngressControllerTuningOptions `json:"tuningOptions,omitempty"`
+
+ // unsupportedConfigOverrides allows specifying unsupported
+ // configuration options. Its use is unsupported.
+ //
+ // +optional
+ // +nullable
+ // +kubebuilder:pruning:PreserveUnknownFields
+ UnsupportedConfigOverrides runtime.RawExtension `json:"unsupportedConfigOverrides"`
}
// NodePlacement describes node scheduling configuration for an ingress
@@ -155,7 +217,7 @@ type NodePlacement struct {
//
// If unset, the default is:
//
- // beta.kubernetes.io/os: linux
+ // kubernetes.io/os: linux
// node-role.kubernetes.io/worker: ''
//
// If set, the specified selector is used and replaces the default.
@@ -175,6 +237,7 @@ type NodePlacement struct {
}
// EndpointPublishingStrategyType is a way to publish ingress controller endpoints.
+// +kubebuilder:validation:Enum=LoadBalancerService;HostNetwork;Private;NodePortService
type EndpointPublishingStrategyType string
const (
@@ -188,9 +251,13 @@ const (
// Private does not publish the ingress controller.
PrivateStrategyType EndpointPublishingStrategyType = "Private"
+
+ // NodePortService publishes the ingress controller using a Kubernetes NodePort Service.
+ NodePortServiceStrategyType EndpointPublishingStrategyType = "NodePortService"
)
// LoadBalancerScope is the scope at which a load balancer is exposed.
+// +kubebuilder:validation:Enum=Internal;External
type LoadBalancerScope string
var (
@@ -211,11 +278,186 @@ type LoadBalancerStrategy struct {
// +kubebuilder:validation:Required
// +required
Scope LoadBalancerScope `json:"scope"`
+
+ // providerParameters holds desired load balancer information specific to
+ // the underlying infrastructure provider.
+ //
+ // If empty, defaults will be applied. See specific providerParameters
+ // fields for details about their defaults.
+ //
+ // +optional
+ ProviderParameters *ProviderLoadBalancerParameters `json:"providerParameters,omitempty"`
+}
+
+// ProviderLoadBalancerParameters holds desired load balancer information
+// specific to the underlying infrastructure provider.
+// +union
+type ProviderLoadBalancerParameters struct {
+ // type is the underlying infrastructure provider for the load balancer.
+ // Allowed values are "AWS", "Azure", "BareMetal", "GCP", "OpenStack",
+ // and "VSphere".
+ //
+ // +unionDiscriminator
+ // +kubebuilder:validation:Required
+ // +required
+ Type LoadBalancerProviderType `json:"type"`
+
+ // aws provides configuration settings that are specific to AWS
+ // load balancers.
+ //
+ // If empty, defaults will be applied. See specific aws fields for
+ // details about their defaults.
+ //
+ // +optional
+ AWS *AWSLoadBalancerParameters `json:"aws,omitempty"`
+
+ // gcp provides configuration settings that are specific to GCP
+ // load balancers.
+ //
+ // If empty, defaults will be applied. See specific gcp fields for
+ // details about their defaults.
+ //
+ // +optional
+ GCP *GCPLoadBalancerParameters `json:"gcp,omitempty"`
+}
+
+// LoadBalancerProviderType is the underlying infrastructure provider for the
+// load balancer. Allowed values are "AWS", "Azure", "BareMetal", "GCP",
+// "OpenStack", and "VSphere".
+//
+// +kubebuilder:validation:Enum=AWS;Azure;BareMetal;GCP;OpenStack;VSphere;IBM
+type LoadBalancerProviderType string
+
+const (
+ AWSLoadBalancerProvider LoadBalancerProviderType = "AWS"
+ AzureLoadBalancerProvider LoadBalancerProviderType = "Azure"
+ GCPLoadBalancerProvider LoadBalancerProviderType = "GCP"
+ OpenStackLoadBalancerProvider LoadBalancerProviderType = "OpenStack"
+ VSphereLoadBalancerProvider LoadBalancerProviderType = "VSphere"
+ IBMLoadBalancerProvider LoadBalancerProviderType = "IBM"
+ BareMetalLoadBalancerProvider LoadBalancerProviderType = "BareMetal"
+)
+
+// AWSLoadBalancerParameters provides configuration settings that are
+// specific to AWS load balancers.
+// +union
+type AWSLoadBalancerParameters struct {
+ // type is the type of AWS load balancer to instantiate for an ingresscontroller.
+ //
+ // Valid values are:
+ //
+ // * "Classic": A Classic Load Balancer that makes routing decisions at either
+ // the transport layer (TCP/SSL) or the application layer (HTTP/HTTPS). See
+ // the following for additional details:
+ //
+ // https://docs.aws.amazon.com/AmazonECS/latest/developerguide/load-balancer-types.html#clb
+ //
+ // * "NLB": A Network Load Balancer that makes routing decisions at the
+ // transport layer (TCP/SSL). See the following for additional details:
+ //
+ // https://docs.aws.amazon.com/AmazonECS/latest/developerguide/load-balancer-types.html#nlb
+ //
+ // +unionDiscriminator
+ // +kubebuilder:validation:Required
+ // +required
+ Type AWSLoadBalancerType `json:"type"`
+
+ // classicLoadBalancerParameters holds configuration parameters for an AWS
+ // classic load balancer. Present only if type is Classic.
+ //
+ // +optional
+ ClassicLoadBalancerParameters *AWSClassicLoadBalancerParameters `json:"classicLoadBalancer,omitempty"`
+
+ // networkLoadBalancerParameters holds configuration parameters for an AWS
+ // network load balancer. Present only if type is NLB.
+ //
+ // +optional
+ NetworkLoadBalancerParameters *AWSNetworkLoadBalancerParameters `json:"networkLoadBalancer,omitempty"`
+}
+
+// AWSLoadBalancerType is the type of AWS load balancer to instantiate.
+// +kubebuilder:validation:Enum=Classic;NLB
+type AWSLoadBalancerType string
+
+const (
+ AWSClassicLoadBalancer AWSLoadBalancerType = "Classic"
+ AWSNetworkLoadBalancer AWSLoadBalancerType = "NLB"
+)
+
+// GCPLoadBalancerParameters provides configuration settings that are
+// specific to GCP load balancers.
+type GCPLoadBalancerParameters struct {
+ // clientAccess describes how client access is restricted for internal
+ // load balancers.
+ //
+ // Valid values are:
+ // * "Global": Specifying an internal load balancer with Global client access
+ // allows clients from any region within the VPC to communicate with the load
+ // balancer.
+ //
+ // https://cloud.google.com/kubernetes-engine/docs/how-to/internal-load-balancing#global_access
+ //
+ // * "Local": Specifying an internal load balancer with Local client access
+ // means only clients within the same region (and VPC) as the GCP load balancer
+ // can communicate with the load balancer. Note that this is the default behavior.
+ //
+ // https://cloud.google.com/load-balancing/docs/internal#client_access
+ //
+ // +optional
+ ClientAccess GCPClientAccess `json:"clientAccess,omitempty"`
+}
+
+// GCPClientAccess describes how client access is restricted for internal
+// load balancers.
+// +kubebuilder:validation:Enum=Global;Local
+type GCPClientAccess string
+
+const (
+ GCPGlobalAccess GCPClientAccess = "Global"
+ GCPLocalAccess GCPClientAccess = "Local"
+)
+
+// AWSClassicLoadBalancerParameters holds configuration parameters for an
+// AWS Classic load balancer.
+type AWSClassicLoadBalancerParameters struct {
+}
+
+// AWSNetworkLoadBalancerParameters holds configuration parameters for an
+// AWS Network load balancer.
+type AWSNetworkLoadBalancerParameters struct {
}
// HostNetworkStrategy holds parameters for the HostNetwork endpoint publishing
// strategy.
type HostNetworkStrategy struct {
+ // protocol specifies whether the IngressController expects incoming
+ // connections to use plain TCP or whether the IngressController expects
+ // PROXY protocol.
+ //
+ // PROXY protocol can be used with load balancers that support it to
+ // communicate the source addresses of client connections when
+ // forwarding those connections to the IngressController. Using PROXY
+ // protocol enables the IngressController to report those source
+ // addresses instead of reporting the load balancer's address in HTTP
+ // headers and logs. Note that enabling PROXY protocol on the
+ // IngressController will cause connections to fail if you are not using
+ // a load balancer that uses PROXY protocol to forward connections to
+ // the IngressController. See
+ // http://www.haproxy.org/download/2.2/doc/proxy-protocol.txt for
+ // information about PROXY protocol.
+ //
+ // The following values are valid for this field:
+ //
+ // * The empty string.
+ // * "TCP".
+ // * "PROXY".
+ //
+ // The empty string specifies the default, which is TCP without PROXY
+ // protocol. Note that the default is subject to change.
+ //
+ // +kubebuilder:validation:Optional
+ // +optional
+ Protocol IngressControllerProtocol `json:"protocol,omitempty"`
}
// PrivateStrategy holds parameters for the Private endpoint publishing
@@ -223,6 +465,48 @@ type HostNetworkStrategy struct {
type PrivateStrategy struct {
}
+// NodePortStrategy holds parameters for the NodePortService endpoint publishing strategy.
+type NodePortStrategy struct {
+ // protocol specifies whether the IngressController expects incoming
+ // connections to use plain TCP or whether the IngressController expects
+ // PROXY protocol.
+ //
+ // PROXY protocol can be used with load balancers that support it to
+ // communicate the source addresses of client connections when
+ // forwarding those connections to the IngressController. Using PROXY
+ // protocol enables the IngressController to report those source
+ // addresses instead of reporting the load balancer's address in HTTP
+ // headers and logs. Note that enabling PROXY protocol on the
+ // IngressController will cause connections to fail if you are not using
+ // a load balancer that uses PROXY protocol to forward connections to
+ // the IngressController. See
+ // http://www.haproxy.org/download/2.2/doc/proxy-protocol.txt for
+ // information about PROXY protocol.
+ //
+ // The following values are valid for this field:
+ //
+ // * The empty string.
+ // * "TCP".
+ // * "PROXY".
+ //
+ // The empty string specifies the default, which is TCP without PROXY
+ // protocol. Note that the default is subject to change.
+ //
+ // +kubebuilder:validation:Optional
+ // +optional
+ Protocol IngressControllerProtocol `json:"protocol,omitempty"`
+}
+
+// IngressControllerProtocol specifies whether PROXY protocol is enabled or not.
+// +kubebuilder:validation:Enum="";TCP;PROXY
+type IngressControllerProtocol string
+
+const (
+ DefaultProtocol IngressControllerProtocol = ""
+ TCPProtocol IngressControllerProtocol = "TCP"
+ ProxyProtocol IngressControllerProtocol = "PROXY"
+)
+
// EndpointPublishingStrategy is a way to publish the endpoints of an
// IngressController, and represents the type and any additional configuration
// for a specific type.
@@ -264,6 +548,17 @@ type EndpointPublishingStrategy struct {
// In this configuration, the ingress controller deployment uses container
// networking, and is not explicitly published. The user must manually publish
// the ingress controller.
+ //
+ // * NodePortService
+ //
+ // Publishes the ingress controller using a Kubernetes NodePort Service.
+ //
+ // In this configuration, the ingress controller deployment uses container
+ // networking. A NodePort Service is created to publish the deployment. The
+ // specific node ports are dynamically allocated by OpenShift; however, to
+ // support static port allocations, user changes to the node port
+ // field of the managed NodePort Service will preserved.
+ //
// +unionDiscriminator
// +kubebuilder:validation:Required
// +required
@@ -283,6 +578,508 @@ type EndpointPublishingStrategy struct {
// strategy. Present only if type is Private.
// +optional
Private *PrivateStrategy `json:"private,omitempty"`
+
+ // nodePort holds parameters for the NodePortService endpoint publishing strategy.
+ // Present only if type is NodePortService.
+ // +optional
+ NodePort *NodePortStrategy `json:"nodePort,omitempty"`
+}
+
+// RouteAdmissionPolicy is an admission policy for allowing new route claims.
+type RouteAdmissionPolicy struct {
+ // namespaceOwnership describes how host name claims across namespaces should
+ // be handled.
+ //
+ // Value must be one of:
+ //
+ // - Strict: Do not allow routes in different namespaces to claim the same host.
+ //
+ // - InterNamespaceAllowed: Allow routes to claim different paths of the same
+ // host name across namespaces.
+ //
+ // If empty, the default is Strict.
+ // +optional
+ NamespaceOwnership NamespaceOwnershipCheck `json:"namespaceOwnership,omitempty"`
+ // wildcardPolicy describes how routes with wildcard policies should
+ // be handled for the ingress controller. WildcardPolicy controls use
+ // of routes [1] exposed by the ingress controller based on the route's
+ // wildcard policy.
+ //
+ // [1] https://github.com/openshift/api/blob/master/route/v1/types.go
+ //
+ // Note: Updating WildcardPolicy from WildcardsAllowed to WildcardsDisallowed
+ // will cause admitted routes with a wildcard policy of Subdomain to stop
+ // working. These routes must be updated to a wildcard policy of None to be
+ // readmitted by the ingress controller.
+ //
+ // WildcardPolicy supports WildcardsAllowed and WildcardsDisallowed values.
+ //
+ // If empty, defaults to "WildcardsDisallowed".
+ //
+ WildcardPolicy WildcardPolicy `json:"wildcardPolicy,omitempty"`
+}
+
+// WildcardPolicy is a route admission policy component that describes how
+// routes with a wildcard policy should be handled.
+// +kubebuilder:validation:Enum=WildcardsAllowed;WildcardsDisallowed
+type WildcardPolicy string
+
+const (
+ // WildcardPolicyAllowed indicates routes with any wildcard policy are
+ // admitted by the ingress controller.
+ WildcardPolicyAllowed WildcardPolicy = "WildcardsAllowed"
+
+ // WildcardPolicyDisallowed indicates only routes with a wildcard policy
+ // of None are admitted by the ingress controller.
+ WildcardPolicyDisallowed WildcardPolicy = "WildcardsDisallowed"
+)
+
+// NamespaceOwnershipCheck is a route admission policy component that describes
+// how host name claims across namespaces should be handled.
+// +kubebuilder:validation:Enum=InterNamespaceAllowed;Strict
+type NamespaceOwnershipCheck string
+
+const (
+ // InterNamespaceAllowedOwnershipCheck allows routes to claim different paths of the same host name across namespaces.
+ InterNamespaceAllowedOwnershipCheck NamespaceOwnershipCheck = "InterNamespaceAllowed"
+
+ // StrictNamespaceOwnershipCheck does not allow routes to claim the same host name across namespaces.
+ StrictNamespaceOwnershipCheck NamespaceOwnershipCheck = "Strict"
+)
+
+// LoggingDestinationType is a type of destination to which to send log
+// messages.
+//
+// +kubebuilder:validation:Enum=Container;Syslog
+type LoggingDestinationType string
+
+const (
+ // Container sends log messages to a sidecar container.
+ ContainerLoggingDestinationType LoggingDestinationType = "Container"
+
+ // Syslog sends log messages to a syslog endpoint.
+ SyslogLoggingDestinationType LoggingDestinationType = "Syslog"
+
+ // ContainerLoggingSidecarContainerName is the name of the container
+ // with the log output in an ingress controller pod when container
+ // logging is used.
+ ContainerLoggingSidecarContainerName = "logs"
+)
+
+// SyslogLoggingDestinationParameters describes parameters for the Syslog
+// logging destination type.
+type SyslogLoggingDestinationParameters struct {
+ // address is the IP address of the syslog endpoint that receives log
+ // messages.
+ //
+ // +kubebuilder:validation:Required
+ // +required
+ Address string `json:"address"`
+
+ // port is the UDP port number of the syslog endpoint that receives log
+ // messages.
+ //
+ // +kubebuilder:validation:Required
+ // +kubebuilder:validation:Minimum=1
+ // +kubebuilder:validation:Maximum=65535
+ // +required
+ Port uint32 `json:"port"`
+
+ // facility specifies the syslog facility of log messages.
+ //
+ // If this field is empty, the facility is "local1".
+ //
+ // +kubebuilder:validation:Optional
+ // +kubebuilder:validation:Enum=kern;user;mail;daemon;auth;syslog;lpr;news;uucp;cron;auth2;ftp;ntp;audit;alert;cron2;local0;local1;local2;local3;local4;local5;local6;local7
+ // +optional
+ Facility string `json:"facility,omitempty"`
+}
+
+// ContainerLoggingDestinationParameters describes parameters for the Container
+// logging destination type.
+type ContainerLoggingDestinationParameters struct {
+}
+
+// LoggingDestination describes a destination for log messages.
+// +union
+type LoggingDestination struct {
+ // type is the type of destination for logs. It must be one of the
+ // following:
+ //
+ // * Container
+ //
+ // The ingress operator configures the sidecar container named "logs" on
+ // the ingress controller pod and configures the ingress controller to
+ // write logs to the sidecar. The logs are then available as container
+ // logs. The expectation is that the administrator configures a custom
+ // logging solution that reads logs from this sidecar. Note that using
+ // container logs means that logs may be dropped if the rate of logs
+ // exceeds the container runtime's or the custom logging solution's
+ // capacity.
+ //
+ // * Syslog
+ //
+ // Logs are sent to a syslog endpoint. The administrator must specify
+ // an endpoint that can receive syslog messages. The expectation is
+ // that the administrator has configured a custom syslog instance.
+ //
+ // +unionDiscriminator
+ // +kubebuilder:validation:Required
+ // +required
+ Type LoggingDestinationType `json:"type"`
+
+ // syslog holds parameters for a syslog endpoint. Present only if
+ // type is Syslog.
+ //
+ // +optional
+ Syslog *SyslogLoggingDestinationParameters `json:"syslog,omitempty"`
+
+ // container holds parameters for the Container logging destination.
+ // Present only if type is Container.
+ //
+ // +optional
+ Container *ContainerLoggingDestinationParameters `json:"container,omitempty"`
+}
+
+// IngressControllerCaptureHTTPHeader describes an HTTP header that should be
+// captured.
+type IngressControllerCaptureHTTPHeader struct {
+ // name specifies a header name. Its value must be a valid HTTP header
+ // name as defined in RFC 2616 section 4.2.
+ //
+ // +kubebuilder:validation:Required
+ // +kubebuilder:validation:Pattern="^[-!#$%&'*+.0-9A-Z^_`a-z|~]+$"
+ // +required
+ Name string `json:"name"`
+
+ // maxLength specifies a maximum length for the header value. If a
+ // header value exceeds this length, the value will be truncated in the
+ // log message. Note that the ingress controller may impose a separate
+ // bound on the total length of HTTP headers in a request.
+ //
+ // +kubebuilder:validation:Required
+ // +kubebuilder:validation:Minimum=1
+ // +required
+ MaxLength int `json:"maxLength"`
+}
+
+// IngressControllerCaptureHTTPHeaders specifies which HTTP headers the
+// IngressController captures.
+type IngressControllerCaptureHTTPHeaders struct {
+ // request specifies which HTTP request headers to capture.
+ //
+ // If this field is empty, no request headers are captured.
+ //
+ // +nullable
+ // +optional
+ Request []IngressControllerCaptureHTTPHeader `json:"request,omitempty"`
+
+ // response specifies which HTTP response headers to capture.
+ //
+ // If this field is empty, no response headers are captured.
+ //
+ // +nullable
+ // +optional
+ Response []IngressControllerCaptureHTTPHeader `json:"response,omitempty"`
+}
+
+// CookieMatchType indicates the type of matching used against cookie names to
+// select a cookie for capture.
+// +kubebuilder:validation:Enum=Exact;Prefix
+type CookieMatchType string
+
+const (
+ // CookieMatchTypeExact indicates that an exact string match should be
+ // performed.
+ CookieMatchTypeExact CookieMatchType = "Exact"
+ // CookieMatchTypePrefix indicates that a string prefix match should be
+ // performed.
+ CookieMatchTypePrefix CookieMatchType = "Prefix"
+)
+
+// IngressControllerCaptureHTTPCookie describes an HTTP cookie that should be
+// captured.
+type IngressControllerCaptureHTTPCookie struct {
+ IngressControllerCaptureHTTPCookieUnion `json:",inline"`
+
+ // maxLength specifies a maximum length of the string that will be
+ // logged, which includes the cookie name, cookie value, and
+ // one-character delimiter. If the log entry exceeds this length, the
+ // value will be truncated in the log message. Note that the ingress
+ // controller may impose a separate bound on the total length of HTTP
+ // headers in a request.
+ //
+ // +kubebuilder:validation:Required
+ // +kubebuilder:validation:Minimum=1
+ // +kubebuilder:validation:Maximum=1024
+ // +required
+ MaxLength int `json:"maxLength"`
+}
+
+// IngressControllerCaptureHTTPCookieUnion describes optional fields of an HTTP cookie that should be captured.
+// +union
+type IngressControllerCaptureHTTPCookieUnion struct {
+ // matchType specifies the type of match to be performed on the cookie
+ // name. Allowed values are "Exact" for an exact string match and
+ // "Prefix" for a string prefix match. If "Exact" is specified, a name
+ // must be specified in the name field. If "Prefix" is provided, a
+ // prefix must be specified in the namePrefix field. For example,
+ // specifying matchType "Prefix" and namePrefix "foo" will capture a
+ // cookie named "foo" or "foobar" but not one named "bar". The first
+ // matching cookie is captured.
+ //
+ // +unionDiscriminator
+ // +kubebuilder:validation:Required
+ // +required
+ MatchType CookieMatchType `json:"matchType,omitempty"`
+
+ // name specifies a cookie name. Its value must be a valid HTTP cookie
+ // name as defined in RFC 6265 section 4.1.
+ //
+ // +kubebuilder:validation:Pattern="^[-!#$%&'*+.0-9A-Z^_`a-z|~]*$"
+ // +kubebuilder:validation:MinLength=0
+ // +kubebuilder:validation:MaxLength=1024
+ // +optional
+ Name string `json:"name"`
+
+ // namePrefix specifies a cookie name prefix. Its value must be a valid
+ // HTTP cookie name as defined in RFC 6265 section 4.1.
+ //
+ // +kubebuilder:validation:Pattern="^[-!#$%&'*+.0-9A-Z^_`a-z|~]*$"
+ // +kubebuilder:validation:MinLength=0
+ // +kubebuilder:validation:MaxLength=1024
+ // +optional
+ NamePrefix string `json:"namePrefix"`
+}
+
+// AccessLogging describes how client requests should be logged.
+type AccessLogging struct {
+ // destination is where access logs go.
+ //
+ // +kubebuilder:validation:Required
+ // +required
+ Destination LoggingDestination `json:"destination"`
+
+ // httpLogFormat specifies the format of the log message for an HTTP
+ // request.
+ //
+ // If this field is empty, log messages use the implementation's default
+ // HTTP log format. For HAProxy's default HTTP log format, see the
+ // HAProxy documentation:
+ // http://cbonte.github.io/haproxy-dconv/2.0/configuration.html#8.2.3
+ //
+ // Note that this format only applies to cleartext HTTP connections
+ // and to secure HTTP connections for which the ingress controller
+ // terminates encryption (that is, edge-terminated or reencrypt
+ // connections). It does not affect the log format for TLS passthrough
+ // connections.
+ //
+ // +optional
+ HttpLogFormat string `json:"httpLogFormat,omitempty"`
+
+ // httpCaptureHeaders defines HTTP headers that should be captured in
+ // access logs. If this field is empty, no headers are captured.
+ //
+ // Note that this option only applies to cleartext HTTP connections
+ // and to secure HTTP connections for which the ingress controller
+ // terminates encryption (that is, edge-terminated or reencrypt
+ // connections). Headers cannot be captured for TLS passthrough
+ // connections.
+ //
+ // +optional
+ HTTPCaptureHeaders IngressControllerCaptureHTTPHeaders `json:"httpCaptureHeaders,omitempty"`
+
+ // httpCaptureCookies specifies HTTP cookies that should be captured in
+ // access logs. If this field is empty, no cookies are captured.
+ //
+ // +nullable
+ // +optional
+ // +kubebuilder:validation:MaxItems=1
+ HTTPCaptureCookies []IngressControllerCaptureHTTPCookie `json:"httpCaptureCookies,omitempty"`
+}
+
+// IngressControllerLogging describes what should be logged where.
+type IngressControllerLogging struct {
+ // access describes how the client requests should be logged.
+ //
+ // If this field is empty, access logging is disabled.
+ //
+ // +optional
+ Access *AccessLogging `json:"access,omitempty"`
+}
+
+// IngressControllerHTTPHeaderPolicy is a policy for setting HTTP headers.
+//
+// +kubebuilder:validation:Enum=Append;Replace;IfNone;Never
+type IngressControllerHTTPHeaderPolicy string
+
+const (
+ // AppendHTTPHeaderPolicy appends the header, preserving any existing header.
+ AppendHTTPHeaderPolicy IngressControllerHTTPHeaderPolicy = "Append"
+ // ReplaceHTTPHeaderPolicy sets the header, removing any existing header.
+ ReplaceHTTPHeaderPolicy IngressControllerHTTPHeaderPolicy = "Replace"
+ // IfNoneHTTPHeaderPolicy sets the header if it is not already set.
+ IfNoneHTTPHeaderPolicy IngressControllerHTTPHeaderPolicy = "IfNone"
+ // NeverHTTPHeaderPolicy never sets the header, preserving any existing
+ // header.
+ NeverHTTPHeaderPolicy IngressControllerHTTPHeaderPolicy = "Never"
+)
+
+// IngressControllerHTTPUniqueIdHeaderPolicy describes configuration for a
+// unique id header.
+type IngressControllerHTTPUniqueIdHeaderPolicy struct {
+ // name specifies the name of the HTTP header (for example, "unique-id")
+ // that the ingress controller should inject into HTTP requests. The
+ // field's value must be a valid HTTP header name as defined in RFC 2616
+ // section 4.2. If the field is empty, no header is injected.
+ //
+ // +optional
+ // +kubebuilder:validation:Pattern="^$|^[-!#$%&'*+.0-9A-Z^_`a-z|~]+$"
+ // +kubebuilder:validation:MinLength=0
+ // +kubebuilder:validation:MaxLength=1024
+ Name string `json:"name,omitempty"`
+
+ // format specifies the format for the injected HTTP header's value.
+ // This field has no effect unless name is specified. For the
+ // HAProxy-based ingress controller implementation, this format uses the
+ // same syntax as the HTTP log format. If the field is empty, the
+ // default value is "%{+X}o\\ %ci:%cp_%fi:%fp_%Ts_%rt:%pid"; see the
+ // corresponding HAProxy documentation:
+ // http://cbonte.github.io/haproxy-dconv/2.0/configuration.html#8.2.3
+ //
+ // +optional
+ // +kubebuilder:validation:Pattern="^(%(%|(\\{[-+]?[QXE](,[-+]?[QXE])*\\})?([A-Za-z]+|\\[[.0-9A-Z_a-z]+(\\([^)]+\\))?(,[.0-9A-Z_a-z]+(\\([^)]+\\))?)*\\]))|[^%[:cntrl:]])*$"
+ // +kubebuilder:validation:MinLength=0
+ // +kubebuilder:validation:MaxLength=1024
+ Format string `json:"format,omitempty"`
+}
+
+// IngressControllerHTTPHeaderNameCaseAdjustment is the name of an HTTP header
+// (for example, "X-Forwarded-For") in the desired capitalization. The value
+// must be a valid HTTP header name as defined in RFC 2616 section 4.2.
+//
+// +optional
+// +kubebuilder:validation:Pattern="^$|^[-!#$%&'*+.0-9A-Z^_`a-z|~]+$"
+// +kubebuilder:validation:MinLength=0
+// +kubebuilder:validation:MaxLength=1024
+type IngressControllerHTTPHeaderNameCaseAdjustment string
+
+// IngressControllerHTTPHeaders specifies how the IngressController handles
+// certain HTTP headers.
+type IngressControllerHTTPHeaders struct {
+ // forwardedHeaderPolicy specifies when and how the IngressController
+ // sets the Forwarded, X-Forwarded-For, X-Forwarded-Host,
+ // X-Forwarded-Port, X-Forwarded-Proto, and X-Forwarded-Proto-Version
+ // HTTP headers. The value may be one of the following:
+ //
+ // * "Append", which specifies that the IngressController appends the
+ // headers, preserving existing headers.
+ //
+ // * "Replace", which specifies that the IngressController sets the
+ // headers, replacing any existing Forwarded or X-Forwarded-* headers.
+ //
+ // * "IfNone", which specifies that the IngressController sets the
+ // headers if they are not already set.
+ //
+ // * "Never", which specifies that the IngressController never sets the
+ // headers, preserving any existing headers.
+ //
+ // By default, the policy is "Append".
+ //
+ // +optional
+ ForwardedHeaderPolicy IngressControllerHTTPHeaderPolicy `json:"forwardedHeaderPolicy,omitempty"`
+
+ // uniqueId describes configuration for a custom HTTP header that the
+ // ingress controller should inject into incoming HTTP requests.
+ // Typically, this header is configured to have a value that is unique
+ // to the HTTP request. The header can be used by applications or
+ // included in access logs to facilitate tracing individual HTTP
+ // requests.
+ //
+ // If this field is empty, no such header is injected into requests.
+ //
+ // +optional
+ UniqueId IngressControllerHTTPUniqueIdHeaderPolicy `json:"uniqueId,omitempty"`
+
+ // headerNameCaseAdjustments specifies case adjustments that can be
+ // applied to HTTP header names. Each adjustment is specified as an
+ // HTTP header name with the desired capitalization. For example,
+ // specifying "X-Forwarded-For" indicates that the "x-forwarded-for"
+ // HTTP header should be adjusted to have the specified capitalization.
+ //
+ // These adjustments are only applied to cleartext, edge-terminated, and
+ // re-encrypt routes, and only when using HTTP/1.
+ //
+ // For request headers, these adjustments are applied only for routes
+ // that have the haproxy.router.openshift.io/h1-adjust-case=true
+ // annotation. For response headers, these adjustments are applied to
+ // all HTTP responses.
+ //
+ // If this field is empty, no request headers are adjusted.
+ //
+ // +nullable
+ // +optional
+ HeaderNameCaseAdjustments []IngressControllerHTTPHeaderNameCaseAdjustment `json:"headerNameCaseAdjustments,omitempty"`
+}
+
+// IngressControllerTuningOptions specifies options for tuning the performance
+// of ingress controller pods
+type IngressControllerTuningOptions struct {
+ // headerBufferBytes describes how much memory should be reserved
+ // (in bytes) for IngressController connection sessions.
+ // Note that this value must be at least 16384 if HTTP/2 is
+ // enabled for the IngressController (https://tools.ietf.org/html/rfc7540).
+ // If this field is empty, the IngressController will use a default value
+ // of 32768 bytes.
+ //
+ // Setting this field is generally not recommended as headerBufferBytes
+ // values that are too small may break the IngressController and
+ // headerBufferBytes values that are too large could cause the
+ // IngressController to use significantly more memory than necessary.
+ //
+ // +kubebuilder:validation:Optional
+ // +kubebuilder:validation:Minimum=16384
+ // +optional
+ HeaderBufferBytes int32 `json:"headerBufferBytes,omitempty"`
+
+ // headerBufferMaxRewriteBytes describes how much memory should be reserved
+ // (in bytes) from headerBufferBytes for HTTP header rewriting
+ // and appending for IngressController connection sessions.
+ // Note that incoming HTTP requests will be limited to
+ // (headerBufferBytes - headerBufferMaxRewriteBytes) bytes, meaning
+ // headerBufferBytes must be greater than headerBufferMaxRewriteBytes.
+ // If this field is empty, the IngressController will use a default value
+ // of 8192 bytes.
+ //
+ // Setting this field is generally not recommended as
+ // headerBufferMaxRewriteBytes values that are too small may break the
+ // IngressController and headerBufferMaxRewriteBytes values that are too
+ // large could cause the IngressController to use significantly more memory
+ // than necessary.
+ //
+ // +kubebuilder:validation:Optional
+ // +kubebuilder:validation:Minimum=4096
+ // +optional
+ HeaderBufferMaxRewriteBytes int32 `json:"headerBufferMaxRewriteBytes,omitempty"`
+
+ // threadCount defines the number of threads created per HAProxy process.
+ // Creating more threads allows each ingress controller pod to handle more
+ // connections, at the cost of more system resources being used. HAProxy
+ // currently supports up to 64 threads. If this field is empty, the
+ // IngressController will use the default value. The current default is 4
+ // threads, but this may change in future releases.
+ //
+ // Setting this field is generally not recommended. Increasing the number
+ // of HAProxy threads allows ingress controller pods to utilize more CPU
+ // time under load, potentially starving other pods if set too high.
+ // Reducing the number of threads may cause the ingress controller to
+ // perform poorly.
+ //
+ // +kubebuilder:validation:Optional
+ // +kubebuilder:validation:Minimum=1
+ // +kubebuilder:validation:Maximum=64
+ // +optional
+ ThreadCount int32 `json:"threadCount,omitempty"`
}
var (
diff --git a/vendor/github.com/openshift/api/operator/v1/types_kubeapiserver.go b/vendor/github.com/openshift/api/operator/v1/types_kubeapiserver.go
index d2c4ae04d75..cd657c55424 100644
--- a/vendor/github.com/openshift/api/operator/v1/types_kubeapiserver.go
+++ b/vendor/github.com/openshift/api/operator/v1/types_kubeapiserver.go
@@ -13,9 +13,12 @@ type KubeAPIServer struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata"`
+ // spec is the specification of the desired behavior of the Kubernetes API Server
// +kubebuilder:validation:Required
// +required
Spec KubeAPIServerSpec `json:"spec"`
+
+ // status is the most recently observed status of the Kubernetes API Server
// +optional
Status KubeAPIServerStatus `json:"status"`
}
diff --git a/vendor/github.com/openshift/api/operator/v1/types_kubecontrollermanager.go b/vendor/github.com/openshift/api/operator/v1/types_kubecontrollermanager.go
index ee5c66cadb6..c20ae30ccd7 100644
--- a/vendor/github.com/openshift/api/operator/v1/types_kubecontrollermanager.go
+++ b/vendor/github.com/openshift/api/operator/v1/types_kubecontrollermanager.go
@@ -13,9 +13,12 @@ type KubeControllerManager struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata"`
+ // spec is the specification of the desired behavior of the Kubernetes Controller Manager
// +kubebuilder:validation:Required
// +required
Spec KubeControllerManagerSpec `json:"spec"`
+
+ // status is the most recently observed status of the Kubernetes Controller Manager
// +optional
Status KubeControllerManagerStatus `json:"status"`
}
diff --git a/vendor/github.com/openshift/api/operator/v1/types_network.go b/vendor/github.com/openshift/api/operator/v1/types_network.go
index 92f78b5cddb..0a19e3ad21f 100644
--- a/vendor/github.com/openshift/api/operator/v1/types_network.go
+++ b/vendor/github.com/openshift/api/operator/v1/types_network.go
@@ -19,9 +19,10 @@ type Network struct {
Status NetworkStatus `json:"status,omitempty"`
}
-// NetworkStatus is currently unused. Instead, status
-// is reported in the Network.config.openshift.io object.
+// NetworkStatus is detailed operator status, which is distilled
+// up to the Network clusteroperator object.
type NetworkStatus struct {
+ OperatorStatus `json:",inline"`
}
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
@@ -35,6 +36,8 @@ type NetworkList struct {
// NetworkSpec is the top-level network configuration object.
type NetworkSpec struct {
+ OperatorSpec `json:",inline"`
+
// clusterNetwork is the IP address pool to use for pod IPs.
// Some network providers, e.g. OpenShift SDN, support multiple ClusterNetworks.
// Others only support one. This is equivalent to the cluster-cidr.
@@ -57,6 +60,16 @@ type NetworkSpec struct {
// 'false' and multiple network support is enabled.
DisableMultiNetwork *bool `json:"disableMultiNetwork,omitempty"`
+ // useMultiNetworkPolicy enables a controller which allows for
+ // MultiNetworkPolicy objects to be used on additional networks as
+ // created by Multus CNI. MultiNetworkPolicy are similar to NetworkPolicy
+ // objects, but NetworkPolicy objects only apply to the primary interface.
+ // With MultiNetworkPolicy, you can control the traffic that a pod can receive
+ // over the secondary interfaces. If unset, this property defaults to 'false'
+ // and MultiNetworkPolicy objects are ignored. If 'disableMultiNetwork' is
+ // 'true' then the value of this field is ignored.
+ UseMultiNetworkPolicy *bool `json:"useMultiNetworkPolicy,omitempty"`
+
// deployKubeProxy specifies whether or not a standalone kube-proxy should
// be deployed by the operator. Some network providers include kube-proxy
// or similar functionality. If unset, the plugin will attempt to select
@@ -65,26 +78,48 @@ type NetworkSpec struct {
// +optional
DeployKubeProxy *bool `json:"deployKubeProxy,omitempty"`
+ // disableNetworkDiagnostics specifies whether or not PodNetworkConnectivityCheck
+ // CRs from a test pod to every node, apiserver and LB should be disabled or not.
+ // If unset, this property defaults to 'false' and network diagnostics is enabled.
+ // Setting this to 'true' would reduce the additional load of the pods performing the checks.
+ // +optional
+ // +kubebuilder:default:=false
+ DisableNetworkDiagnostics bool `json:"disableNetworkDiagnostics"`
+
// kubeProxyConfig lets us configure desired proxy configuration.
// If not specified, sensible defaults will be chosen by OpenShift directly.
// Not consumed by all network providers - currently only openshift-sdn.
KubeProxyConfig *ProxyConfig `json:"kubeProxyConfig,omitempty"`
- // logLevel allows configuring the logging level of the components deployed
- // by the operator. Currently only Kuryr SDN is affected by this setting.
- // Please note that turning on extensive logging may affect performance.
- // The default value is "Normal".
+ // exportNetworkFlows enables and configures the export of network flow metadata from the pod network
+ // by using protocols NetFlow, SFlow or IPFIX. Currently only supported on OVN-Kubernetes plugin.
+ // If unset, flows will not be exported to any collector.
+ // +optional
+ ExportNetworkFlows *ExportNetworkFlows `json:"exportNetworkFlows,omitempty"`
+
+ // migration enables and configures the cluster network migration.
+ // Setting this to the target network type to allow changing the default network.
+ // If unset, the operation of changing cluster default network plugin will be rejected.
// +optional
- LogLevel LogLevel `json:"logLevel"`
+ Migration *NetworkMigration `json:"migration,omitempty"`
+}
+
+// NetworkMigration represents the cluster network configuration.
+type NetworkMigration struct {
+ // networkType is the target type of network migration
+ // The supported values are OpenShiftSDN, OVNKubernetes
+ NetworkType NetworkType `json:"networkType"`
}
// ClusterNetworkEntry is a subnet from which to allocate PodIPs. A network of size
-// HostPrefix (in CIDR notation) will be allocated when nodes join the cluster.
+// HostPrefix (in CIDR notation) will be allocated when nodes join the cluster. If
+// the HostPrefix field is not used by the plugin, it can be left unset.
// Not all network providers support multiple ClusterNetworks
type ClusterNetworkEntry struct {
CIDR string `json:"cidr"`
// +kubebuilder:validation:Minimum=0
- HostPrefix uint32 `json:"hostPrefix"`
+ // +optional
+ HostPrefix uint32 `json:"hostPrefix,omitempty"`
}
// DefaultNetworkDefinition represents a single network plugin's configuration.
@@ -228,8 +263,10 @@ type OpenShiftSDNConfig struct {
// +optional
MTU *uint32 `json:"mtu,omitempty"`
- // useExternalOpenvswitch tells the operator not to install openvswitch, because
- // it will be provided separately. If set, you must provide it yourself.
+ // useExternalOpenvswitch used to control whether the operator would deploy an OVS
+ // DaemonSet itself or expect someone else to start OVS. As of 4.6, OVS is always
+ // run as a system service, and this flag is ignored.
+ // DEPRECATED: non-functional as of 4.6
// +optional
UseExternalOpenvswitch *bool `json:"useExternalOpenvswitch,omitempty"`
@@ -295,6 +332,14 @@ type KuryrConfig struct {
// +kubebuilder:validation:Minimum=0
// +optional
PoolBatchPorts *uint `json:"poolBatchPorts,omitempty"`
+
+ // mtu is the MTU that Kuryr should use when creating pod networks in Neutron.
+ // The value has to be lower or equal to the MTU of the nodes network and Neutron has
+ // to allow creation of tenant networks with such MTU. If unset Pod networks will be
+ // created with the same MTU as the nodes network has.
+ // +kubebuilder:validation:Minimum=0
+ // +optional
+ MTU *uint32 `json:"mtu,omitempty"`
}
// ovnKubernetesConfig contains the configuration parameters for networks
@@ -315,11 +360,100 @@ type OVNKubernetesConfig struct {
// not using OVN.
// +optional
HybridOverlayConfig *HybridOverlayConfig `json:"hybridOverlayConfig,omitempty"`
+ // ipsecConfig enables and configures IPsec for pods on the pod network within the
+ // cluster.
+ // +optional
+ IPsecConfig *IPsecConfig `json:"ipsecConfig,omitempty"`
+ // policyAuditConfig is the configuration for network policy audit events. If unset,
+ // reported defaults are used.
+ // +optional
+ PolicyAuditConfig *PolicyAuditConfig `json:"policyAuditConfig,omitempty"`
}
type HybridOverlayConfig struct {
// HybridClusterNetwork defines a network space given to nodes on an additional overlay network.
HybridClusterNetwork []ClusterNetworkEntry `json:"hybridClusterNetwork"`
+ // HybridOverlayVXLANPort defines the VXLAN port number to be used by the additional overlay network.
+ // Default is 4789
+ // +optional
+ HybridOverlayVXLANPort *uint32 `json:"hybridOverlayVXLANPort,omitempty"`
+}
+
+type IPsecConfig struct {
+}
+
+type ExportNetworkFlows struct {
+ // netFlow defines the NetFlow configuration.
+ // +optional
+ NetFlow *NetFlowConfig `json:"netFlow,omitempty"`
+ // sFlow defines the SFlow configuration.
+ // +optional
+ SFlow *SFlowConfig `json:"sFlow,omitempty"`
+ // ipfix defines IPFIX configuration.
+ // +optional
+ IPFIX *IPFIXConfig `json:"ipfix,omitempty"`
+}
+
+type NetFlowConfig struct {
+ // netFlow defines the NetFlow collectors that will consume the flow data exported from OVS.
+ // It is a list of strings formatted as ip:port with a maximum of ten items
+ // +kubebuilder:validation:MinItems=1
+ // +kubebuilder:validation:MaxItems=10
+ Collectors []IPPort `json:"collectors,omitempty"`
+}
+
+type SFlowConfig struct {
+ // sFlowCollectors is list of strings formatted as ip:port with a maximum of ten items
+ // +kubebuilder:validation:MinItems=1
+ // +kubebuilder:validation:MaxItems=10
+ Collectors []IPPort `json:"collectors,omitempty"`
+}
+
+type IPFIXConfig struct {
+ // ipfixCollectors is list of strings formatted as ip:port with a maximum of ten items
+ // +kubebuilder:validation:MinItems=1
+ // +kubebuilder:validation:MaxItems=10
+ Collectors []IPPort `json:"collectors,omitempty"`
+}
+
+// +kubebuilder:validation:Pattern=`^(([0-9]|[0-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[0-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):([1-9][0-9]{0,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])$`
+type IPPort string
+
+type PolicyAuditConfig struct {
+ // rateLimit is the approximate maximum number of messages to generate per-second per-node. If
+ // unset the default of 20 msg/sec is used.
+ // +kubebuilder:default=20
+ // +kubebuilder:validation:Minimum=1
+ // +optional
+ RateLimit *uint32 `json:"rateLimit,omitempty"`
+
+ // maxFilesSize is the max size an ACL_audit log file is allowed to reach before rotation occurs
+ // Units are in MB and the Default is 50MB
+ // +kubebuilder:default=50
+ // +kubebuilder:validation:Minimum=1
+ // +optional
+ MaxFileSize *uint32 `json:"maxFileSize,omitempty"`
+
+ // destination is the location for policy log messages.
+ // Regardless of this config, persistent logs will always be dumped to the host
+ // at /var/log/ovn/ however
+ // Additionally syslog output may be configured as follows.
+ // Valid values are:
+ // - "libc" -> to use the libc syslog() function of the host node's journdald process
+ // - "udp:host:port" -> for sending syslog over UDP
+ // - "unix:file" -> for using the UNIX domain socket directly
+ // - "null" -> to discard all messages logged to syslog
+ // The default is "null"
+ // +kubebuilder:default=null
+ // +kubebuilder:pattern='^libc$|^null$|^udp:(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]):([0-9]){0,5}$|^unix:(\/[^\/ ]*)+([^\/\s])$'
+ // +optional
+ Destination string `json:"destination,omitempty"`
+
+ // syslogFacility the RFC5424 facility for generated messages, e.g. "kern". Default is "local0"
+ // +kubebuilder:default=local0
+ // +kubebuilder:Enum=kern;user;mail;daemon;auth;syslog;lpr;news;uucp;clock;ftp;ntp;audit;alert;clock2;local0;local1;local2;local3;local4;local5;local6;local7
+ // +optional
+ SyslogFacility string `json:"syslogFacility,omitempty"`
}
// NetworkType describes the network plugin type to configure
@@ -331,7 +465,9 @@ type ProxyArgumentList []string
// ProxyConfig defines the configuration knobs for kubeproxy
// All of these are optional and have sensible defaults
type ProxyConfig struct {
- // The period that iptables rules are refreshed.
+ // An internal kube-proxy parameter. In older releases of OCP, this sometimes needed to be adjusted
+ // in large clusters for performance reasons, but this is no longer necessary, and there is no reason
+ // to change this from the default value.
// Default: 30s
IptablesSyncPeriod string `json:"iptablesSyncPeriod,omitempty"`
diff --git a/vendor/github.com/openshift/api/operator/v1/types_openshiftapiserver.go b/vendor/github.com/openshift/api/operator/v1/types_openshiftapiserver.go
index 23f5c22cae2..8ab50ed321e 100644
--- a/vendor/github.com/openshift/api/operator/v1/types_openshiftapiserver.go
+++ b/vendor/github.com/openshift/api/operator/v1/types_openshiftapiserver.go
@@ -13,9 +13,12 @@ type OpenShiftAPIServer struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata"`
+ // spec is the specification of the desired behavior of the OpenShift API Server.
// +kubebuilder:validation:Required
// +required
Spec OpenShiftAPIServerSpec `json:"spec"`
+
+ // status defines the observed status of the OpenShift API Server.
// +optional
Status OpenShiftAPIServerStatus `json:"status"`
}
diff --git a/vendor/github.com/openshift/api/operator/v1/types_scheduler.go b/vendor/github.com/openshift/api/operator/v1/types_scheduler.go
index 20d5f759a56..f8a542082c0 100644
--- a/vendor/github.com/openshift/api/operator/v1/types_scheduler.go
+++ b/vendor/github.com/openshift/api/operator/v1/types_scheduler.go
@@ -13,9 +13,12 @@ type KubeScheduler struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata"`
+ // spec is the specification of the desired behavior of the Kubernetes Scheduler
// +kubebuilder:validation:Required
// +required
Spec KubeSchedulerSpec `json:"spec"`
+
+ // status is the most recently observed status of the Kubernetes Scheduler
// +optional
Status KubeSchedulerStatus `json:"status"`
}
diff --git a/vendor/github.com/openshift/api/operator/v1/types_servicecatalogapiserver.go b/vendor/github.com/openshift/api/operator/v1/types_servicecatalogapiserver.go
index 7c1a857bb61..4dc98f4a4d0 100644
--- a/vendor/github.com/openshift/api/operator/v1/types_servicecatalogapiserver.go
+++ b/vendor/github.com/openshift/api/operator/v1/types_servicecatalogapiserver.go
@@ -9,6 +9,7 @@ import (
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// ServiceCatalogAPIServer provides information to configure an operator to manage Service Catalog API Server
+// DEPRECATED: will be removed in 4.6
type ServiceCatalogAPIServer struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
@@ -31,6 +32,7 @@ type ServiceCatalogAPIServerStatus struct {
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// ServiceCatalogAPIServerList is a collection of items
+// DEPRECATED: will be removed in 4.6
type ServiceCatalogAPIServerList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata"`
diff --git a/vendor/github.com/openshift/api/operator/v1/types_servicecatalogcontrollermanager.go b/vendor/github.com/openshift/api/operator/v1/types_servicecatalogcontrollermanager.go
index ac3bf5898c8..f4cc3f6957f 100644
--- a/vendor/github.com/openshift/api/operator/v1/types_servicecatalogcontrollermanager.go
+++ b/vendor/github.com/openshift/api/operator/v1/types_servicecatalogcontrollermanager.go
@@ -9,6 +9,7 @@ import (
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// ServiceCatalogControllerManager provides information to configure an operator to manage Service Catalog Controller Manager
+// DEPRECATED: will be removed in 4.6
type ServiceCatalogControllerManager struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata"`
@@ -31,6 +32,7 @@ type ServiceCatalogControllerManagerStatus struct {
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// ServiceCatalogControllerManagerList is a collection of items
+// DEPRECATED: will be removed in 4.6
type ServiceCatalogControllerManagerList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata"`
diff --git a/vendor/github.com/openshift/api/operator/v1/types_storage.go b/vendor/github.com/openshift/api/operator/v1/types_storage.go
new file mode 100644
index 00000000000..d5d3bd407ea
--- /dev/null
+++ b/vendor/github.com/openshift/api/operator/v1/types_storage.go
@@ -0,0 +1,44 @@
+package v1
+
+import (
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+)
+
+// +genclient
+// +genclient:nonNamespaced
+// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
+
+// Storage provides a means to configure an operator to manage the cluster storage operator. `cluster` is the canonical name.
+type Storage struct {
+ metav1.TypeMeta `json:",inline"`
+ metav1.ObjectMeta `json:"metadata,omitempty"`
+
+ // spec holds user settable values for configuration
+ // +kubebuilder:validation:Required
+ // +required
+ Spec StorageSpec `json:"spec"`
+
+ // status holds observed values from the cluster. They may not be overridden.
+ // +optional
+ Status StorageStatus `json:"status"`
+}
+
+// StorageSpec is the specification of the desired behavior of the cluster storage operator.
+type StorageSpec struct {
+ OperatorSpec `json:",inline"`
+}
+
+// StorageStatus defines the observed status of the cluster storage operator.
+type StorageStatus struct {
+ OperatorStatus `json:",inline"`
+}
+
+// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
+// +kubebuilder:object:root=true
+
+// StorageList contains a list of Storages.
+type StorageList struct {
+ metav1.TypeMeta `json:",inline"`
+ metav1.ListMeta `json:"metadata,omitempty"`
+ Items []Storage `json:"items"`
+}
diff --git a/vendor/github.com/openshift/api/operator/v1/zz_generated.deepcopy.go b/vendor/github.com/openshift/api/operator/v1/zz_generated.deepcopy.go
index 3aa43915217..befbfb16c3b 100644
--- a/vendor/github.com/openshift/api/operator/v1/zz_generated.deepcopy.go
+++ b/vendor/github.com/openshift/api/operator/v1/zz_generated.deepcopy.go
@@ -11,6 +11,108 @@ import (
runtime "k8s.io/apimachinery/pkg/runtime"
)
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *AWSClassicLoadBalancerParameters) DeepCopyInto(out *AWSClassicLoadBalancerParameters) {
+ *out = *in
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AWSClassicLoadBalancerParameters.
+func (in *AWSClassicLoadBalancerParameters) DeepCopy() *AWSClassicLoadBalancerParameters {
+ if in == nil {
+ return nil
+ }
+ out := new(AWSClassicLoadBalancerParameters)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *AWSLoadBalancerParameters) DeepCopyInto(out *AWSLoadBalancerParameters) {
+ *out = *in
+ if in.ClassicLoadBalancerParameters != nil {
+ in, out := &in.ClassicLoadBalancerParameters, &out.ClassicLoadBalancerParameters
+ *out = new(AWSClassicLoadBalancerParameters)
+ **out = **in
+ }
+ if in.NetworkLoadBalancerParameters != nil {
+ in, out := &in.NetworkLoadBalancerParameters, &out.NetworkLoadBalancerParameters
+ *out = new(AWSNetworkLoadBalancerParameters)
+ **out = **in
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AWSLoadBalancerParameters.
+func (in *AWSLoadBalancerParameters) DeepCopy() *AWSLoadBalancerParameters {
+ if in == nil {
+ return nil
+ }
+ out := new(AWSLoadBalancerParameters)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *AWSNetworkLoadBalancerParameters) DeepCopyInto(out *AWSNetworkLoadBalancerParameters) {
+ *out = *in
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AWSNetworkLoadBalancerParameters.
+func (in *AWSNetworkLoadBalancerParameters) DeepCopy() *AWSNetworkLoadBalancerParameters {
+ if in == nil {
+ return nil
+ }
+ out := new(AWSNetworkLoadBalancerParameters)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *AccessLogging) DeepCopyInto(out *AccessLogging) {
+ *out = *in
+ in.Destination.DeepCopyInto(&out.Destination)
+ in.HTTPCaptureHeaders.DeepCopyInto(&out.HTTPCaptureHeaders)
+ if in.HTTPCaptureCookies != nil {
+ in, out := &in.HTTPCaptureCookies, &out.HTTPCaptureCookies
+ *out = make([]IngressControllerCaptureHTTPCookie, len(*in))
+ copy(*out, *in)
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AccessLogging.
+func (in *AccessLogging) DeepCopy() *AccessLogging {
+ if in == nil {
+ return nil
+ }
+ out := new(AccessLogging)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *AddPage) DeepCopyInto(out *AddPage) {
+ *out = *in
+ if in.DisabledActions != nil {
+ in, out := &in.DisabledActions, &out.DisabledActions
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AddPage.
+func (in *AddPage) DeepCopy() *AddPage {
+ if in == nil {
+ return nil
+ }
+ out := new(AddPage)
+ in.DeepCopyInto(out)
+ return out
+}
+
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *AdditionalNetworkDefinition) DeepCopyInto(out *AdditionalNetworkDefinition) {
*out = *in
@@ -113,6 +215,7 @@ func (in *AuthenticationSpec) DeepCopy() *AuthenticationSpec {
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *AuthenticationStatus) DeepCopyInto(out *AuthenticationStatus) {
*out = *in
+ out.OAuthAPIServer = in.OAuthAPIServer
in.OperatorStatus.DeepCopyInto(&out.OperatorStatus)
return
}
@@ -127,6 +230,291 @@ func (in *AuthenticationStatus) DeepCopy() *AuthenticationStatus {
return out
}
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *CSISnapshotController) DeepCopyInto(out *CSISnapshotController) {
+ *out = *in
+ out.TypeMeta = in.TypeMeta
+ in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
+ in.Spec.DeepCopyInto(&out.Spec)
+ in.Status.DeepCopyInto(&out.Status)
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CSISnapshotController.
+func (in *CSISnapshotController) DeepCopy() *CSISnapshotController {
+ if in == nil {
+ return nil
+ }
+ out := new(CSISnapshotController)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
+func (in *CSISnapshotController) DeepCopyObject() runtime.Object {
+ if c := in.DeepCopy(); c != nil {
+ return c
+ }
+ return nil
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *CSISnapshotControllerList) DeepCopyInto(out *CSISnapshotControllerList) {
+ *out = *in
+ out.TypeMeta = in.TypeMeta
+ in.ListMeta.DeepCopyInto(&out.ListMeta)
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]CSISnapshotController, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CSISnapshotControllerList.
+func (in *CSISnapshotControllerList) DeepCopy() *CSISnapshotControllerList {
+ if in == nil {
+ return nil
+ }
+ out := new(CSISnapshotControllerList)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
+func (in *CSISnapshotControllerList) DeepCopyObject() runtime.Object {
+ if c := in.DeepCopy(); c != nil {
+ return c
+ }
+ return nil
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *CSISnapshotControllerSpec) DeepCopyInto(out *CSISnapshotControllerSpec) {
+ *out = *in
+ in.OperatorSpec.DeepCopyInto(&out.OperatorSpec)
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CSISnapshotControllerSpec.
+func (in *CSISnapshotControllerSpec) DeepCopy() *CSISnapshotControllerSpec {
+ if in == nil {
+ return nil
+ }
+ out := new(CSISnapshotControllerSpec)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *CSISnapshotControllerStatus) DeepCopyInto(out *CSISnapshotControllerStatus) {
+ *out = *in
+ in.OperatorStatus.DeepCopyInto(&out.OperatorStatus)
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CSISnapshotControllerStatus.
+func (in *CSISnapshotControllerStatus) DeepCopy() *CSISnapshotControllerStatus {
+ if in == nil {
+ return nil
+ }
+ out := new(CSISnapshotControllerStatus)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *CloudCredential) DeepCopyInto(out *CloudCredential) {
+ *out = *in
+ out.TypeMeta = in.TypeMeta
+ in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
+ in.Spec.DeepCopyInto(&out.Spec)
+ in.Status.DeepCopyInto(&out.Status)
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CloudCredential.
+func (in *CloudCredential) DeepCopy() *CloudCredential {
+ if in == nil {
+ return nil
+ }
+ out := new(CloudCredential)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
+func (in *CloudCredential) DeepCopyObject() runtime.Object {
+ if c := in.DeepCopy(); c != nil {
+ return c
+ }
+ return nil
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *CloudCredentialList) DeepCopyInto(out *CloudCredentialList) {
+ *out = *in
+ out.TypeMeta = in.TypeMeta
+ in.ListMeta.DeepCopyInto(&out.ListMeta)
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]CloudCredential, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CloudCredentialList.
+func (in *CloudCredentialList) DeepCopy() *CloudCredentialList {
+ if in == nil {
+ return nil
+ }
+ out := new(CloudCredentialList)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
+func (in *CloudCredentialList) DeepCopyObject() runtime.Object {
+ if c := in.DeepCopy(); c != nil {
+ return c
+ }
+ return nil
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *CloudCredentialSpec) DeepCopyInto(out *CloudCredentialSpec) {
+ *out = *in
+ in.OperatorSpec.DeepCopyInto(&out.OperatorSpec)
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CloudCredentialSpec.
+func (in *CloudCredentialSpec) DeepCopy() *CloudCredentialSpec {
+ if in == nil {
+ return nil
+ }
+ out := new(CloudCredentialSpec)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *CloudCredentialStatus) DeepCopyInto(out *CloudCredentialStatus) {
+ *out = *in
+ in.OperatorStatus.DeepCopyInto(&out.OperatorStatus)
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CloudCredentialStatus.
+func (in *CloudCredentialStatus) DeepCopy() *CloudCredentialStatus {
+ if in == nil {
+ return nil
+ }
+ out := new(CloudCredentialStatus)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *ClusterCSIDriver) DeepCopyInto(out *ClusterCSIDriver) {
+ *out = *in
+ out.TypeMeta = in.TypeMeta
+ in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
+ in.Spec.DeepCopyInto(&out.Spec)
+ in.Status.DeepCopyInto(&out.Status)
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterCSIDriver.
+func (in *ClusterCSIDriver) DeepCopy() *ClusterCSIDriver {
+ if in == nil {
+ return nil
+ }
+ out := new(ClusterCSIDriver)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
+func (in *ClusterCSIDriver) DeepCopyObject() runtime.Object {
+ if c := in.DeepCopy(); c != nil {
+ return c
+ }
+ return nil
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *ClusterCSIDriverList) DeepCopyInto(out *ClusterCSIDriverList) {
+ *out = *in
+ out.TypeMeta = in.TypeMeta
+ in.ListMeta.DeepCopyInto(&out.ListMeta)
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]ClusterCSIDriver, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterCSIDriverList.
+func (in *ClusterCSIDriverList) DeepCopy() *ClusterCSIDriverList {
+ if in == nil {
+ return nil
+ }
+ out := new(ClusterCSIDriverList)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
+func (in *ClusterCSIDriverList) DeepCopyObject() runtime.Object {
+ if c := in.DeepCopy(); c != nil {
+ return c
+ }
+ return nil
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *ClusterCSIDriverSpec) DeepCopyInto(out *ClusterCSIDriverSpec) {
+ *out = *in
+ in.OperatorSpec.DeepCopyInto(&out.OperatorSpec)
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterCSIDriverSpec.
+func (in *ClusterCSIDriverSpec) DeepCopy() *ClusterCSIDriverSpec {
+ if in == nil {
+ return nil
+ }
+ out := new(ClusterCSIDriverSpec)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *ClusterCSIDriverStatus) DeepCopyInto(out *ClusterCSIDriverStatus) {
+ *out = *in
+ in.OperatorStatus.DeepCopyInto(&out.OperatorStatus)
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterCSIDriverStatus.
+func (in *ClusterCSIDriverStatus) DeepCopy() *ClusterCSIDriverStatus {
+ if in == nil {
+ return nil
+ }
+ out := new(ClusterCSIDriverStatus)
+ in.DeepCopyInto(out)
+ return out
+}
+
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ClusterNetworkEntry) DeepCopyInto(out *ClusterNetworkEntry) {
*out = *in
@@ -143,6 +531,101 @@ func (in *ClusterNetworkEntry) DeepCopy() *ClusterNetworkEntry {
return out
}
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *Config) DeepCopyInto(out *Config) {
+ *out = *in
+ out.TypeMeta = in.TypeMeta
+ in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
+ in.Spec.DeepCopyInto(&out.Spec)
+ in.Status.DeepCopyInto(&out.Status)
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Config.
+func (in *Config) DeepCopy() *Config {
+ if in == nil {
+ return nil
+ }
+ out := new(Config)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
+func (in *Config) DeepCopyObject() runtime.Object {
+ if c := in.DeepCopy(); c != nil {
+ return c
+ }
+ return nil
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *ConfigList) DeepCopyInto(out *ConfigList) {
+ *out = *in
+ out.TypeMeta = in.TypeMeta
+ in.ListMeta.DeepCopyInto(&out.ListMeta)
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]Config, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigList.
+func (in *ConfigList) DeepCopy() *ConfigList {
+ if in == nil {
+ return nil
+ }
+ out := new(ConfigList)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
+func (in *ConfigList) DeepCopyObject() runtime.Object {
+ if c := in.DeepCopy(); c != nil {
+ return c
+ }
+ return nil
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *ConfigSpec) DeepCopyInto(out *ConfigSpec) {
+ *out = *in
+ in.OperatorSpec.DeepCopyInto(&out.OperatorSpec)
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigSpec.
+func (in *ConfigSpec) DeepCopy() *ConfigSpec {
+ if in == nil {
+ return nil
+ }
+ out := new(ConfigSpec)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *ConfigStatus) DeepCopyInto(out *ConfigStatus) {
+ *out = *in
+ in.OperatorStatus.DeepCopyInto(&out.OperatorStatus)
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigStatus.
+func (in *ConfigStatus) DeepCopy() *ConfigStatus {
+ if in == nil {
+ return nil
+ }
+ out := new(ConfigStatus)
+ in.DeepCopyInto(out)
+ return out
+}
+
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *Console) DeepCopyInto(out *Console) {
*out = *in
@@ -171,10 +654,31 @@ func (in *Console) DeepCopyObject() runtime.Object {
return nil
}
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *ConsoleConfigRoute) DeepCopyInto(out *ConsoleConfigRoute) {
+ *out = *in
+ out.Secret = in.Secret
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConsoleConfigRoute.
+func (in *ConsoleConfigRoute) DeepCopy() *ConsoleConfigRoute {
+ if in == nil {
+ return nil
+ }
+ out := new(ConsoleConfigRoute)
+ in.DeepCopyInto(out)
+ return out
+}
+
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ConsoleCustomization) DeepCopyInto(out *ConsoleCustomization) {
*out = *in
out.CustomLogoFile = in.CustomLogoFile
+ in.DeveloperCatalog.DeepCopyInto(&out.DeveloperCatalog)
+ in.ProjectAccess.DeepCopyInto(&out.ProjectAccess)
+ in.QuickStarts.DeepCopyInto(&out.QuickStarts)
+ in.AddPage.DeepCopyInto(&out.AddPage)
return
}
@@ -246,8 +750,14 @@ func (in *ConsoleProviders) DeepCopy() *ConsoleProviders {
func (in *ConsoleSpec) DeepCopyInto(out *ConsoleSpec) {
*out = *in
in.OperatorSpec.DeepCopyInto(&out.OperatorSpec)
- out.Customization = in.Customization
+ in.Customization.DeepCopyInto(&out.Customization)
in.Providers.DeepCopyInto(&out.Providers)
+ out.Route = in.Route
+ if in.Plugins != nil {
+ in, out := &in.Plugins, &out.Plugins
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
return
}
@@ -278,6 +788,22 @@ func (in *ConsoleStatus) DeepCopy() *ConsoleStatus {
return out
}
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *ContainerLoggingDestinationParameters) DeepCopyInto(out *ContainerLoggingDestinationParameters) {
+ *out = *in
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ContainerLoggingDestinationParameters.
+func (in *ContainerLoggingDestinationParameters) DeepCopy() *ContainerLoggingDestinationParameters {
+ if in == nil {
+ return nil
+ }
+ out := new(ContainerLoggingDestinationParameters)
+ in.DeepCopyInto(out)
+ return out
+}
+
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *DNS) DeepCopyInto(out *DNS) {
*out = *in
@@ -321,24 +847,54 @@ func (in *DNSList) DeepCopyInto(out *DNSList) {
return
}
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DNSList.
-func (in *DNSList) DeepCopy() *DNSList {
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DNSList.
+func (in *DNSList) DeepCopy() *DNSList {
+ if in == nil {
+ return nil
+ }
+ out := new(DNSList)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
+func (in *DNSList) DeepCopyObject() runtime.Object {
+ if c := in.DeepCopy(); c != nil {
+ return c
+ }
+ return nil
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *DNSNodePlacement) DeepCopyInto(out *DNSNodePlacement) {
+ *out = *in
+ if in.NodeSelector != nil {
+ in, out := &in.NodeSelector, &out.NodeSelector
+ *out = make(map[string]string, len(*in))
+ for key, val := range *in {
+ (*out)[key] = val
+ }
+ }
+ if in.Tolerations != nil {
+ in, out := &in.Tolerations, &out.Tolerations
+ *out = make([]corev1.Toleration, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DNSNodePlacement.
+func (in *DNSNodePlacement) DeepCopy() *DNSNodePlacement {
if in == nil {
return nil
}
- out := new(DNSList)
+ out := new(DNSNodePlacement)
in.DeepCopyInto(out)
return out
}
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *DNSList) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- }
- return nil
-}
-
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *DNSSpec) DeepCopyInto(out *DNSSpec) {
*out = *in
@@ -349,6 +905,7 @@ func (in *DNSSpec) DeepCopyInto(out *DNSSpec) {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
+ in.NodePlacement.DeepCopyInto(&out.NodePlacement)
return
}
@@ -416,13 +973,81 @@ func (in *DefaultNetworkDefinition) DeepCopy() *DefaultNetworkDefinition {
return out
}
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *DeveloperConsoleCatalogCategory) DeepCopyInto(out *DeveloperConsoleCatalogCategory) {
+ *out = *in
+ in.DeveloperConsoleCatalogCategoryMeta.DeepCopyInto(&out.DeveloperConsoleCatalogCategoryMeta)
+ if in.Subcategories != nil {
+ in, out := &in.Subcategories, &out.Subcategories
+ *out = make([]DeveloperConsoleCatalogCategoryMeta, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeveloperConsoleCatalogCategory.
+func (in *DeveloperConsoleCatalogCategory) DeepCopy() *DeveloperConsoleCatalogCategory {
+ if in == nil {
+ return nil
+ }
+ out := new(DeveloperConsoleCatalogCategory)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *DeveloperConsoleCatalogCategoryMeta) DeepCopyInto(out *DeveloperConsoleCatalogCategoryMeta) {
+ *out = *in
+ if in.Tags != nil {
+ in, out := &in.Tags, &out.Tags
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeveloperConsoleCatalogCategoryMeta.
+func (in *DeveloperConsoleCatalogCategoryMeta) DeepCopy() *DeveloperConsoleCatalogCategoryMeta {
+ if in == nil {
+ return nil
+ }
+ out := new(DeveloperConsoleCatalogCategoryMeta)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *DeveloperConsoleCatalogCustomization) DeepCopyInto(out *DeveloperConsoleCatalogCustomization) {
+ *out = *in
+ if in.Categories != nil {
+ in, out := &in.Categories, &out.Categories
+ *out = make([]DeveloperConsoleCatalogCategory, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeveloperConsoleCatalogCustomization.
+func (in *DeveloperConsoleCatalogCustomization) DeepCopy() *DeveloperConsoleCatalogCustomization {
+ if in == nil {
+ return nil
+ }
+ out := new(DeveloperConsoleCatalogCustomization)
+ in.DeepCopyInto(out)
+ return out
+}
+
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *EndpointPublishingStrategy) DeepCopyInto(out *EndpointPublishingStrategy) {
*out = *in
if in.LoadBalancer != nil {
in, out := &in.LoadBalancer, &out.LoadBalancer
*out = new(LoadBalancerStrategy)
- **out = **in
+ (*in).DeepCopyInto(*out)
}
if in.HostNetwork != nil {
in, out := &in.HostNetwork, &out.HostNetwork
@@ -434,6 +1059,11 @@ func (in *EndpointPublishingStrategy) DeepCopyInto(out *EndpointPublishingStrate
*out = new(PrivateStrategy)
**out = **in
}
+ if in.NodePort != nil {
+ in, out := &in.NodePort, &out.NodePort
+ *out = new(NodePortStrategy)
+ **out = **in
+ }
return
}
@@ -542,6 +1172,37 @@ func (in *EtcdStatus) DeepCopy() *EtcdStatus {
return out
}
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *ExportNetworkFlows) DeepCopyInto(out *ExportNetworkFlows) {
+ *out = *in
+ if in.NetFlow != nil {
+ in, out := &in.NetFlow, &out.NetFlow
+ *out = new(NetFlowConfig)
+ (*in).DeepCopyInto(*out)
+ }
+ if in.SFlow != nil {
+ in, out := &in.SFlow, &out.SFlow
+ *out = new(SFlowConfig)
+ (*in).DeepCopyInto(*out)
+ }
+ if in.IPFIX != nil {
+ in, out := &in.IPFIX, &out.IPFIX
+ *out = new(IPFIXConfig)
+ (*in).DeepCopyInto(*out)
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExportNetworkFlows.
+func (in *ExportNetworkFlows) DeepCopy() *ExportNetworkFlows {
+ if in == nil {
+ return nil
+ }
+ out := new(ExportNetworkFlows)
+ in.DeepCopyInto(out)
+ return out
+}
+
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ForwardPlugin) DeepCopyInto(out *ForwardPlugin) {
*out = *in
@@ -563,6 +1224,22 @@ func (in *ForwardPlugin) DeepCopy() *ForwardPlugin {
return out
}
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *GCPLoadBalancerParameters) DeepCopyInto(out *GCPLoadBalancerParameters) {
+ *out = *in
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GCPLoadBalancerParameters.
+func (in *GCPLoadBalancerParameters) DeepCopy() *GCPLoadBalancerParameters {
+ if in == nil {
+ return nil
+ }
+ out := new(GCPLoadBalancerParameters)
+ in.DeepCopyInto(out)
+ return out
+}
+
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *GenerationStatus) DeepCopyInto(out *GenerationStatus) {
*out = *in
@@ -603,6 +1280,11 @@ func (in *HybridOverlayConfig) DeepCopyInto(out *HybridOverlayConfig) {
*out = make([]ClusterNetworkEntry, len(*in))
copy(*out, *in)
}
+ if in.HybridOverlayVXLANPort != nil {
+ in, out := &in.HybridOverlayVXLANPort, &out.HybridOverlayVXLANPort
+ *out = new(uint32)
+ **out = **in
+ }
return
}
@@ -637,6 +1319,43 @@ func (in *IPAMConfig) DeepCopy() *IPAMConfig {
return out
}
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *IPFIXConfig) DeepCopyInto(out *IPFIXConfig) {
+ *out = *in
+ if in.Collectors != nil {
+ in, out := &in.Collectors, &out.Collectors
+ *out = make([]IPPort, len(*in))
+ copy(*out, *in)
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPFIXConfig.
+func (in *IPFIXConfig) DeepCopy() *IPFIXConfig {
+ if in == nil {
+ return nil
+ }
+ out := new(IPFIXConfig)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *IPsecConfig) DeepCopyInto(out *IPsecConfig) {
+ *out = *in
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPsecConfig.
+func (in *IPsecConfig) DeepCopy() *IPsecConfig {
+ if in == nil {
+ return nil
+ }
+ out := new(IPsecConfig)
+ in.DeepCopyInto(out)
+ return out
+}
+
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *IngressController) DeepCopyInto(out *IngressController) {
*out = *in
@@ -665,6 +1384,119 @@ func (in *IngressController) DeepCopyObject() runtime.Object {
return nil
}
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *IngressControllerCaptureHTTPCookie) DeepCopyInto(out *IngressControllerCaptureHTTPCookie) {
+ *out = *in
+ out.IngressControllerCaptureHTTPCookieUnion = in.IngressControllerCaptureHTTPCookieUnion
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IngressControllerCaptureHTTPCookie.
+func (in *IngressControllerCaptureHTTPCookie) DeepCopy() *IngressControllerCaptureHTTPCookie {
+ if in == nil {
+ return nil
+ }
+ out := new(IngressControllerCaptureHTTPCookie)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *IngressControllerCaptureHTTPCookieUnion) DeepCopyInto(out *IngressControllerCaptureHTTPCookieUnion) {
+ *out = *in
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IngressControllerCaptureHTTPCookieUnion.
+func (in *IngressControllerCaptureHTTPCookieUnion) DeepCopy() *IngressControllerCaptureHTTPCookieUnion {
+ if in == nil {
+ return nil
+ }
+ out := new(IngressControllerCaptureHTTPCookieUnion)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *IngressControllerCaptureHTTPHeader) DeepCopyInto(out *IngressControllerCaptureHTTPHeader) {
+ *out = *in
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IngressControllerCaptureHTTPHeader.
+func (in *IngressControllerCaptureHTTPHeader) DeepCopy() *IngressControllerCaptureHTTPHeader {
+ if in == nil {
+ return nil
+ }
+ out := new(IngressControllerCaptureHTTPHeader)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *IngressControllerCaptureHTTPHeaders) DeepCopyInto(out *IngressControllerCaptureHTTPHeaders) {
+ *out = *in
+ if in.Request != nil {
+ in, out := &in.Request, &out.Request
+ *out = make([]IngressControllerCaptureHTTPHeader, len(*in))
+ copy(*out, *in)
+ }
+ if in.Response != nil {
+ in, out := &in.Response, &out.Response
+ *out = make([]IngressControllerCaptureHTTPHeader, len(*in))
+ copy(*out, *in)
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IngressControllerCaptureHTTPHeaders.
+func (in *IngressControllerCaptureHTTPHeaders) DeepCopy() *IngressControllerCaptureHTTPHeaders {
+ if in == nil {
+ return nil
+ }
+ out := new(IngressControllerCaptureHTTPHeaders)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *IngressControllerHTTPHeaders) DeepCopyInto(out *IngressControllerHTTPHeaders) {
+ *out = *in
+ out.UniqueId = in.UniqueId
+ if in.HeaderNameCaseAdjustments != nil {
+ in, out := &in.HeaderNameCaseAdjustments, &out.HeaderNameCaseAdjustments
+ *out = make([]IngressControllerHTTPHeaderNameCaseAdjustment, len(*in))
+ copy(*out, *in)
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IngressControllerHTTPHeaders.
+func (in *IngressControllerHTTPHeaders) DeepCopy() *IngressControllerHTTPHeaders {
+ if in == nil {
+ return nil
+ }
+ out := new(IngressControllerHTTPHeaders)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *IngressControllerHTTPUniqueIdHeaderPolicy) DeepCopyInto(out *IngressControllerHTTPUniqueIdHeaderPolicy) {
+ *out = *in
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IngressControllerHTTPUniqueIdHeaderPolicy.
+func (in *IngressControllerHTTPUniqueIdHeaderPolicy) DeepCopy() *IngressControllerHTTPUniqueIdHeaderPolicy {
+ if in == nil {
+ return nil
+ }
+ out := new(IngressControllerHTTPUniqueIdHeaderPolicy)
+ in.DeepCopyInto(out)
+ return out
+}
+
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *IngressControllerList) DeepCopyInto(out *IngressControllerList) {
*out = *in
@@ -698,9 +1530,31 @@ func (in *IngressControllerList) DeepCopyObject() runtime.Object {
return nil
}
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *IngressControllerLogging) DeepCopyInto(out *IngressControllerLogging) {
+ *out = *in
+ if in.Access != nil {
+ in, out := &in.Access, &out.Access
+ *out = new(AccessLogging)
+ (*in).DeepCopyInto(*out)
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IngressControllerLogging.
+func (in *IngressControllerLogging) DeepCopy() *IngressControllerLogging {
+ if in == nil {
+ return nil
+ }
+ out := new(IngressControllerLogging)
+ in.DeepCopyInto(out)
+ return out
+}
+
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *IngressControllerSpec) DeepCopyInto(out *IngressControllerSpec) {
*out = *in
+ out.HttpErrorCodePages = in.HttpErrorCodePages
if in.Replicas != nil {
in, out := &in.Replicas, &out.Replicas
*out = new(int32)
@@ -736,6 +1590,23 @@ func (in *IngressControllerSpec) DeepCopyInto(out *IngressControllerSpec) {
*out = new(configv1.TLSSecurityProfile)
(*in).DeepCopyInto(*out)
}
+ if in.RouteAdmission != nil {
+ in, out := &in.RouteAdmission, &out.RouteAdmission
+ *out = new(RouteAdmissionPolicy)
+ **out = **in
+ }
+ if in.Logging != nil {
+ in, out := &in.Logging, &out.Logging
+ *out = new(IngressControllerLogging)
+ (*in).DeepCopyInto(*out)
+ }
+ if in.HTTPHeaders != nil {
+ in, out := &in.HTTPHeaders, &out.HTTPHeaders
+ *out = new(IngressControllerHTTPHeaders)
+ (*in).DeepCopyInto(*out)
+ }
+ out.TuningOptions = in.TuningOptions
+ in.UnsupportedConfigOverrides.DeepCopyInto(&out.UnsupportedConfigOverrides)
return
}
@@ -782,6 +1653,22 @@ func (in *IngressControllerStatus) DeepCopy() *IngressControllerStatus {
return out
}
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *IngressControllerTuningOptions) DeepCopyInto(out *IngressControllerTuningOptions) {
+ *out = *in
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IngressControllerTuningOptions.
+func (in *IngressControllerTuningOptions) DeepCopy() *IngressControllerTuningOptions {
+ if in == nil {
+ return nil
+ }
+ out := new(IngressControllerTuningOptions)
+ in.DeepCopyInto(out)
+ return out
+}
+
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *KubeAPIServer) DeepCopyInto(out *KubeAPIServer) {
*out = *in
@@ -1180,6 +2067,11 @@ func (in *KuryrConfig) DeepCopyInto(out *KuryrConfig) {
*out = new(uint)
**out = **in
}
+ if in.MTU != nil {
+ in, out := &in.MTU, &out.MTU
+ *out = new(uint32)
+ **out = **in
+ }
return
}
@@ -1188,23 +2080,54 @@ func (in *KuryrConfig) DeepCopy() *KuryrConfig {
if in == nil {
return nil
}
- out := new(KuryrConfig)
+ out := new(KuryrConfig)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *LoadBalancerStrategy) DeepCopyInto(out *LoadBalancerStrategy) {
+ *out = *in
+ if in.ProviderParameters != nil {
+ in, out := &in.ProviderParameters, &out.ProviderParameters
+ *out = new(ProviderLoadBalancerParameters)
+ (*in).DeepCopyInto(*out)
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LoadBalancerStrategy.
+func (in *LoadBalancerStrategy) DeepCopy() *LoadBalancerStrategy {
+ if in == nil {
+ return nil
+ }
+ out := new(LoadBalancerStrategy)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *LoadBalancerStrategy) DeepCopyInto(out *LoadBalancerStrategy) {
+func (in *LoggingDestination) DeepCopyInto(out *LoggingDestination) {
*out = *in
+ if in.Syslog != nil {
+ in, out := &in.Syslog, &out.Syslog
+ *out = new(SyslogLoggingDestinationParameters)
+ **out = **in
+ }
+ if in.Container != nil {
+ in, out := &in.Container, &out.Container
+ *out = new(ContainerLoggingDestinationParameters)
+ **out = **in
+ }
return
}
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LoadBalancerStrategy.
-func (in *LoadBalancerStrategy) DeepCopy() *LoadBalancerStrategy {
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LoggingDestination.
+func (in *LoggingDestination) DeepCopy() *LoggingDestination {
if in == nil {
return nil
}
- out := new(LoadBalancerStrategy)
+ out := new(LoggingDestination)
in.DeepCopyInto(out)
return out
}
@@ -1263,13 +2186,34 @@ func (in *MyOperatorResourceStatus) DeepCopy() *MyOperatorResourceStatus {
return out
}
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *NetFlowConfig) DeepCopyInto(out *NetFlowConfig) {
+ *out = *in
+ if in.Collectors != nil {
+ in, out := &in.Collectors, &out.Collectors
+ *out = make([]IPPort, len(*in))
+ copy(*out, *in)
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetFlowConfig.
+func (in *NetFlowConfig) DeepCopy() *NetFlowConfig {
+ if in == nil {
+ return nil
+ }
+ out := new(NetFlowConfig)
+ in.DeepCopyInto(out)
+ return out
+}
+
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *Network) DeepCopyInto(out *Network) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
in.Spec.DeepCopyInto(&out.Spec)
- out.Status = in.Status
+ in.Status.DeepCopyInto(&out.Status)
return
}
@@ -1324,9 +2268,26 @@ func (in *NetworkList) DeepCopyObject() runtime.Object {
return nil
}
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *NetworkMigration) DeepCopyInto(out *NetworkMigration) {
+ *out = *in
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkMigration.
+func (in *NetworkMigration) DeepCopy() *NetworkMigration {
+ if in == nil {
+ return nil
+ }
+ out := new(NetworkMigration)
+ in.DeepCopyInto(out)
+ return out
+}
+
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *NetworkSpec) DeepCopyInto(out *NetworkSpec) {
*out = *in
+ in.OperatorSpec.DeepCopyInto(&out.OperatorSpec)
if in.ClusterNetwork != nil {
in, out := &in.ClusterNetwork, &out.ClusterNetwork
*out = make([]ClusterNetworkEntry, len(*in))
@@ -1350,6 +2311,11 @@ func (in *NetworkSpec) DeepCopyInto(out *NetworkSpec) {
*out = new(bool)
**out = **in
}
+ if in.UseMultiNetworkPolicy != nil {
+ in, out := &in.UseMultiNetworkPolicy, &out.UseMultiNetworkPolicy
+ *out = new(bool)
+ **out = **in
+ }
if in.DeployKubeProxy != nil {
in, out := &in.DeployKubeProxy, &out.DeployKubeProxy
*out = new(bool)
@@ -1360,6 +2326,16 @@ func (in *NetworkSpec) DeepCopyInto(out *NetworkSpec) {
*out = new(ProxyConfig)
(*in).DeepCopyInto(*out)
}
+ if in.ExportNetworkFlows != nil {
+ in, out := &in.ExportNetworkFlows, &out.ExportNetworkFlows
+ *out = new(ExportNetworkFlows)
+ (*in).DeepCopyInto(*out)
+ }
+ if in.Migration != nil {
+ in, out := &in.Migration, &out.Migration
+ *out = new(NetworkMigration)
+ **out = **in
+ }
return
}
@@ -1376,6 +2352,7 @@ func (in *NetworkSpec) DeepCopy() *NetworkSpec {
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *NetworkStatus) DeepCopyInto(out *NetworkStatus) {
*out = *in
+ in.OperatorStatus.DeepCopyInto(&out.OperatorStatus)
return
}
@@ -1417,9 +2394,29 @@ func (in *NodePlacement) DeepCopy() *NodePlacement {
return out
}
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *NodePortStrategy) DeepCopyInto(out *NodePortStrategy) {
+ *out = *in
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodePortStrategy.
+func (in *NodePortStrategy) DeepCopy() *NodePortStrategy {
+ if in == nil {
+ return nil
+ }
+ out := new(NodePortStrategy)
+ in.DeepCopyInto(out)
+ return out
+}
+
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *NodeStatus) DeepCopyInto(out *NodeStatus) {
*out = *in
+ if in.LastFailedTime != nil {
+ in, out := &in.LastFailedTime, &out.LastFailedTime
+ *out = (*in).DeepCopy()
+ }
if in.LastFailedRevisionErrors != nil {
in, out := &in.LastFailedRevisionErrors, &out.LastFailedRevisionErrors
*out = make([]string, len(*in))
@@ -1438,6 +2435,22 @@ func (in *NodeStatus) DeepCopy() *NodeStatus {
return out
}
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *OAuthAPIServerStatus) DeepCopyInto(out *OAuthAPIServerStatus) {
+ *out = *in
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OAuthAPIServerStatus.
+func (in *OAuthAPIServerStatus) DeepCopy() *OAuthAPIServerStatus {
+ if in == nil {
+ return nil
+ }
+ out := new(OAuthAPIServerStatus)
+ in.DeepCopyInto(out)
+ return out
+}
+
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *OVNKubernetesConfig) DeepCopyInto(out *OVNKubernetesConfig) {
*out = *in
@@ -1456,6 +2469,16 @@ func (in *OVNKubernetesConfig) DeepCopyInto(out *OVNKubernetesConfig) {
*out = new(HybridOverlayConfig)
(*in).DeepCopyInto(*out)
}
+ if in.IPsecConfig != nil {
+ in, out := &in.IPsecConfig, &out.IPsecConfig
+ *out = new(IPsecConfig)
+ **out = **in
+ }
+ if in.PolicyAuditConfig != nil {
+ in, out := &in.PolicyAuditConfig, &out.PolicyAuditConfig
+ *out = new(PolicyAuditConfig)
+ (*in).DeepCopyInto(*out)
+ }
return
}
@@ -1758,6 +2781,32 @@ func (in *OperatorStatus) DeepCopy() *OperatorStatus {
return out
}
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *PolicyAuditConfig) DeepCopyInto(out *PolicyAuditConfig) {
+ *out = *in
+ if in.RateLimit != nil {
+ in, out := &in.RateLimit, &out.RateLimit
+ *out = new(uint32)
+ **out = **in
+ }
+ if in.MaxFileSize != nil {
+ in, out := &in.MaxFileSize, &out.MaxFileSize
+ *out = new(uint32)
+ **out = **in
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PolicyAuditConfig.
+func (in *PolicyAuditConfig) DeepCopy() *PolicyAuditConfig {
+ if in == nil {
+ return nil
+ }
+ out := new(PolicyAuditConfig)
+ in.DeepCopyInto(out)
+ return out
+}
+
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *PrivateStrategy) DeepCopyInto(out *PrivateStrategy) {
*out = *in
@@ -1774,6 +2823,53 @@ func (in *PrivateStrategy) DeepCopy() *PrivateStrategy {
return out
}
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *ProjectAccess) DeepCopyInto(out *ProjectAccess) {
+ *out = *in
+ if in.AvailableClusterRoles != nil {
+ in, out := &in.AvailableClusterRoles, &out.AvailableClusterRoles
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectAccess.
+func (in *ProjectAccess) DeepCopy() *ProjectAccess {
+ if in == nil {
+ return nil
+ }
+ out := new(ProjectAccess)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *ProviderLoadBalancerParameters) DeepCopyInto(out *ProviderLoadBalancerParameters) {
+ *out = *in
+ if in.AWS != nil {
+ in, out := &in.AWS, &out.AWS
+ *out = new(AWSLoadBalancerParameters)
+ (*in).DeepCopyInto(*out)
+ }
+ if in.GCP != nil {
+ in, out := &in.GCP, &out.GCP
+ *out = new(GCPLoadBalancerParameters)
+ **out = **in
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProviderLoadBalancerParameters.
+func (in *ProviderLoadBalancerParameters) DeepCopy() *ProviderLoadBalancerParameters {
+ if in == nil {
+ return nil
+ }
+ out := new(ProviderLoadBalancerParameters)
+ in.DeepCopyInto(out)
+ return out
+}
+
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in ProxyArgumentList) DeepCopyInto(out *ProxyArgumentList) {
{
@@ -1825,6 +2921,64 @@ func (in *ProxyConfig) DeepCopy() *ProxyConfig {
return out
}
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *QuickStarts) DeepCopyInto(out *QuickStarts) {
+ *out = *in
+ if in.Disabled != nil {
+ in, out := &in.Disabled, &out.Disabled
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new QuickStarts.
+func (in *QuickStarts) DeepCopy() *QuickStarts {
+ if in == nil {
+ return nil
+ }
+ out := new(QuickStarts)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *RouteAdmissionPolicy) DeepCopyInto(out *RouteAdmissionPolicy) {
+ *out = *in
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RouteAdmissionPolicy.
+func (in *RouteAdmissionPolicy) DeepCopy() *RouteAdmissionPolicy {
+ if in == nil {
+ return nil
+ }
+ out := new(RouteAdmissionPolicy)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *SFlowConfig) DeepCopyInto(out *SFlowConfig) {
+ *out = *in
+ if in.Collectors != nil {
+ in, out := &in.Collectors, &out.Collectors
+ *out = make([]IPPort, len(*in))
+ copy(*out, *in)
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SFlowConfig.
+func (in *SFlowConfig) DeepCopy() *SFlowConfig {
+ if in == nil {
+ return nil
+ }
+ out := new(SFlowConfig)
+ in.DeepCopyInto(out)
+ return out
+}
+
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *Server) DeepCopyInto(out *Server) {
*out = *in
@@ -2298,3 +3452,114 @@ func (in *StatuspageProvider) DeepCopy() *StatuspageProvider {
in.DeepCopyInto(out)
return out
}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *Storage) DeepCopyInto(out *Storage) {
+ *out = *in
+ out.TypeMeta = in.TypeMeta
+ in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
+ in.Spec.DeepCopyInto(&out.Spec)
+ in.Status.DeepCopyInto(&out.Status)
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Storage.
+func (in *Storage) DeepCopy() *Storage {
+ if in == nil {
+ return nil
+ }
+ out := new(Storage)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
+func (in *Storage) DeepCopyObject() runtime.Object {
+ if c := in.DeepCopy(); c != nil {
+ return c
+ }
+ return nil
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *StorageList) DeepCopyInto(out *StorageList) {
+ *out = *in
+ out.TypeMeta = in.TypeMeta
+ in.ListMeta.DeepCopyInto(&out.ListMeta)
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]Storage, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageList.
+func (in *StorageList) DeepCopy() *StorageList {
+ if in == nil {
+ return nil
+ }
+ out := new(StorageList)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
+func (in *StorageList) DeepCopyObject() runtime.Object {
+ if c := in.DeepCopy(); c != nil {
+ return c
+ }
+ return nil
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *StorageSpec) DeepCopyInto(out *StorageSpec) {
+ *out = *in
+ in.OperatorSpec.DeepCopyInto(&out.OperatorSpec)
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageSpec.
+func (in *StorageSpec) DeepCopy() *StorageSpec {
+ if in == nil {
+ return nil
+ }
+ out := new(StorageSpec)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *StorageStatus) DeepCopyInto(out *StorageStatus) {
+ *out = *in
+ in.OperatorStatus.DeepCopyInto(&out.OperatorStatus)
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageStatus.
+func (in *StorageStatus) DeepCopy() *StorageStatus {
+ if in == nil {
+ return nil
+ }
+ out := new(StorageStatus)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *SyslogLoggingDestinationParameters) DeepCopyInto(out *SyslogLoggingDestinationParameters) {
+ *out = *in
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SyslogLoggingDestinationParameters.
+func (in *SyslogLoggingDestinationParameters) DeepCopy() *SyslogLoggingDestinationParameters {
+ if in == nil {
+ return nil
+ }
+ out := new(SyslogLoggingDestinationParameters)
+ in.DeepCopyInto(out)
+ return out
+}
diff --git a/vendor/github.com/openshift/api/operator/v1/zz_generated.swagger_doc_generated.go b/vendor/github.com/openshift/api/operator/v1/zz_generated.swagger_doc_generated.go
index 2a2bbfc59a4..c1109833c1c 100644
--- a/vendor/github.com/openshift/api/operator/v1/zz_generated.swagger_doc_generated.go
+++ b/vendor/github.com/openshift/api/operator/v1/zz_generated.swagger_doc_generated.go
@@ -39,6 +39,8 @@ var map_NodeStatus = map[string]string{
"currentRevision": "currentRevision is the generation of the most recently successful deployment",
"targetRevision": "targetRevision is the generation of the deployment we're trying to apply",
"lastFailedRevision": "lastFailedRevision is the generation of the deployment we tried and failed to deploy.",
+ "lastFailedTime": "lastFailedTime is the time the last failed revision failed the last time.",
+ "lastFailedCount": "lastFailedCount is how often the last failed revision failed.",
"lastFailedRevisionErrors": "lastFailedRevisionErrors is a list of the errors during the failed deployment referenced in lastFailedRevision",
}
@@ -57,8 +59,8 @@ func (OperatorCondition) SwaggerDoc() map[string]string {
var map_OperatorSpec = map[string]string{
"": "OperatorSpec contains common fields operators need. It is intended to be anonymous included inside of the Spec struct for your particular operator.",
"managementState": "managementState indicates whether and how the operator should manage the component",
- "logLevel": "logLevel is an intent based logging for an overall component. It does not give fine grained control, but it is a simple way to manage coarse grained logging choices that operators have to interpret for their operands.",
- "operatorLogLevel": "operatorLogLevel is an intent based logging for the operator itself. It does not give fine grained control, but it is a simple way to manage coarse grained logging choices that operators have to interpret for themselves.",
+ "logLevel": "logLevel is an intent based logging for an overall component. It does not give fine grained control, but it is a simple way to manage coarse grained logging choices that operators have to interpret for their operands.\n\nValid values are: \"Normal\", \"Debug\", \"Trace\", \"TraceAll\". Defaults to \"Normal\".",
+ "operatorLogLevel": "operatorLogLevel is an intent based logging for the operator itself. It does not give fine grained control, but it is a simple way to manage coarse grained logging choices that operators have to interpret for themselves.\n\nValid values are: \"Normal\", \"Debug\", \"Trace\", \"TraceAll\". Defaults to \"Normal\".",
"unsupportedConfigOverrides": "unsupportedConfigOverrides holds a sparse config that will override any previously set options. It only needs to be the fields to override it will end up overlaying in the following order: 1. hardcoded defaults 2. observedConfig 3. unsupportedConfigOverrides",
"observedConfig": "observedConfig holds a sparse config that controller has observed from the cluster state. It exists in spec because it is an input to the level for the operator",
}
@@ -117,6 +119,75 @@ func (AuthenticationList) SwaggerDoc() map[string]string {
return map_AuthenticationList
}
+var map_AuthenticationStatus = map[string]string{
+ "oauthAPIServer": "OAuthAPIServer holds status specific only to oauth-apiserver",
+}
+
+func (AuthenticationStatus) SwaggerDoc() map[string]string {
+ return map_AuthenticationStatus
+}
+
+var map_OAuthAPIServerStatus = map[string]string{
+ "latestAvailableRevision": "LatestAvailableRevision is the latest revision used as suffix of revisioned secrets like encryption-config. A new revision causes a new deployment of pods.",
+}
+
+func (OAuthAPIServerStatus) SwaggerDoc() map[string]string {
+ return map_OAuthAPIServerStatus
+}
+
+var map_CloudCredential = map[string]string{
+ "": "CloudCredential provides a means to configure an operator to manage CredentialsRequests.",
+}
+
+func (CloudCredential) SwaggerDoc() map[string]string {
+ return map_CloudCredential
+}
+
+var map_CloudCredentialSpec = map[string]string{
+ "": "CloudCredentialSpec is the specification of the desired behavior of the cloud-credential-operator.",
+ "credentialsMode": "CredentialsMode allows informing CCO that it should not attempt to dynamically determine the root cloud credentials capabilities, and it should just run in the specified mode. It also allows putting the operator into \"manual\" mode if desired. Leaving the field in default mode runs CCO so that the cluster's cloud credentials will be dynamically probed for capabilities (on supported clouds/platforms). Supported modes:\n AWS/Azure/GCP: \"\" (Default), \"Mint\", \"Passthrough\", \"Manual\"\n Others: Do not set value as other platforms only support running in \"Passthrough\"",
+}
+
+func (CloudCredentialSpec) SwaggerDoc() map[string]string {
+ return map_CloudCredentialSpec
+}
+
+var map_CloudCredentialStatus = map[string]string{
+ "": "CloudCredentialStatus defines the observed status of the cloud-credential-operator.",
+}
+
+func (CloudCredentialStatus) SwaggerDoc() map[string]string {
+ return map_CloudCredentialStatus
+}
+
+var map_Config = map[string]string{
+ "": "Config provides information to configure the config operator. It handles installation, migration or synchronization of cloud based cluster configurations like AWS or Azure.",
+ "spec": "spec is the specification of the desired behavior of the Config Operator.",
+ "status": "status defines the observed status of the Config Operator.",
+}
+
+func (Config) SwaggerDoc() map[string]string {
+ return map_Config
+}
+
+var map_ConfigList = map[string]string{
+ "": "ConfigList is a collection of items",
+ "items": "Items contains the items",
+}
+
+func (ConfigList) SwaggerDoc() map[string]string {
+ return map_ConfigList
+}
+
+var map_AddPage = map[string]string{
+ "": "AddPage allows customizing actions on the Add page in developer perspective.",
+ "disabledActions": "disabledActions is a list of actions that are not shown to users. Each action in the list is represented by its ID.",
+}
+
+func (AddPage) SwaggerDoc() map[string]string {
+ return map_AddPage
+}
+
var map_Console = map[string]string{
"": "Console provides a means to configure an operator to manage the console.",
}
@@ -125,12 +196,26 @@ func (Console) SwaggerDoc() map[string]string {
return map_Console
}
+var map_ConsoleConfigRoute = map[string]string{
+ "": "ConsoleConfigRoute holds information on external route access to console. DEPRECATED",
+ "hostname": "hostname is the desired custom domain under which console will be available.",
+ "secret": "secret points to secret in the openshift-config namespace that contains custom certificate and key and needs to be created manually by the cluster admin. Referenced Secret is required to contain following key value pairs: - \"tls.crt\" - to specifies custom certificate - \"tls.key\" - to specifies private key of the custom certificate If the custom hostname uses the default routing suffix of the cluster, the Secret specification for a serving certificate will not be needed.",
+}
+
+func (ConsoleConfigRoute) SwaggerDoc() map[string]string {
+ return map_ConsoleConfigRoute
+}
+
var map_ConsoleCustomization = map[string]string{
"": "ConsoleCustomization defines a list of optional configuration for the console UI.",
"brand": "brand is the default branding of the web console which can be overridden by providing the brand field. There is a limited set of specific brand options. This field controls elements of the console such as the logo. Invalid value will prevent a console rollout.",
"documentationBaseURL": "documentationBaseURL links to external documentation are shown in various sections of the web console. Providing documentationBaseURL will override the default documentation URL. Invalid value will prevent a console rollout.",
"customProductName": "customProductName is the name that will be displayed in page titles, logo alt text, and the about dialog instead of the normal OpenShift product name.",
"customLogoFile": "customLogoFile replaces the default OpenShift logo in the masthead and about dialog. It is a reference to a ConfigMap in the openshift-config namespace. This can be created with a command like 'oc create configmap custom-logo --from-file=/path/to/file -n openshift-config'. Image size must be less than 1 MB due to constraints on the ConfigMap size. The ConfigMap key should include a file extension so that the console serves the file with the correct MIME type. Recommended logo specifications: Dimensions: Max height of 68px and max width of 200px SVG format preferred",
+ "developerCatalog": "developerCatalog allows to configure the shown developer catalog categories.",
+ "projectAccess": "projectAccess allows customizing the available list of ClusterRoles in the Developer perspective Project access page which can be used by a project admin to specify roles to other users and restrict access within the project. If set, the list will replace the default ClusterRole options.",
+ "quickStarts": "quickStarts allows customization of available ConsoleQuickStart resources in console.",
+ "addPage": "addPage allows customizing actions on the Add page in developer perspective.",
}
func (ConsoleCustomization) SwaggerDoc() map[string]string {
@@ -150,6 +235,8 @@ var map_ConsoleSpec = map[string]string{
"": "ConsoleSpec is the specification of the desired behavior of the Console.",
"customization": "customization is used to optionally provide a small set of customization options to the web console.",
"providers": "providers contains configuration for using specific service providers.",
+ "route": "route contains hostname and secret reference that contains the serving certificate. If a custom route is specified, a new route will be created with the provided hostname, under which console will be available. In case of custom hostname uses the default routing suffix of the cluster, the Secret specification for a serving certificate will not be needed. In case of custom hostname points to an arbitrary domain, manual DNS configurations steps are necessary. The default console route will be maintained to reserve the default hostname for console if the custom route is removed. If not specified, default route will be used. DEPRECATED",
+ "plugins": "plugins defines a list of enabled console plugin names.",
}
func (ConsoleSpec) SwaggerDoc() map[string]string {
@@ -164,6 +251,53 @@ func (ConsoleStatus) SwaggerDoc() map[string]string {
return map_ConsoleStatus
}
+var map_DeveloperConsoleCatalogCategory = map[string]string{
+ "": "DeveloperConsoleCatalogCategory for the developer console catalog.",
+ "subcategories": "subcategories defines a list of child categories.",
+}
+
+func (DeveloperConsoleCatalogCategory) SwaggerDoc() map[string]string {
+ return map_DeveloperConsoleCatalogCategory
+}
+
+var map_DeveloperConsoleCatalogCategoryMeta = map[string]string{
+ "": "DeveloperConsoleCatalogCategoryMeta are the key identifiers of a developer catalog category.",
+ "id": "ID is an identifier used in the URL to enable deep linking in console. ID is required and must have 1-32 URL safe (A-Z, a-z, 0-9, - and _) characters.",
+ "label": "label defines a category display label. It is required and must have 1-64 characters.",
+ "tags": "tags is a list of strings that will match the category. A selected category show all items which has at least one overlapping tag between category and item.",
+}
+
+func (DeveloperConsoleCatalogCategoryMeta) SwaggerDoc() map[string]string {
+ return map_DeveloperConsoleCatalogCategoryMeta
+}
+
+var map_DeveloperConsoleCatalogCustomization = map[string]string{
+ "": "DeveloperConsoleCatalogCustomization allow cluster admin to configure developer catalog.",
+ "categories": "categories which are shown in the developer catalog.",
+}
+
+func (DeveloperConsoleCatalogCustomization) SwaggerDoc() map[string]string {
+ return map_DeveloperConsoleCatalogCustomization
+}
+
+var map_ProjectAccess = map[string]string{
+ "": "ProjectAccess contains options for project access roles",
+ "availableClusterRoles": "availableClusterRoles is the list of ClusterRole names that are assignable to users through the project access tab.",
+}
+
+func (ProjectAccess) SwaggerDoc() map[string]string {
+ return map_ProjectAccess
+}
+
+var map_QuickStarts = map[string]string{
+ "": "QuickStarts allow cluster admins to customize available ConsoleQuickStart resources.",
+ "disabled": "disabled is a list of ConsoleQuickStart resource names that are not shown to users.",
+}
+
+func (QuickStarts) SwaggerDoc() map[string]string {
+ return map_QuickStarts
+}
+
var map_StatuspageProvider = map[string]string{
"": "StatuspageProvider provides identity for statuspage account.",
"pageID": "pageID is the unique ID assigned by Statuspage for your page. This must be a public page.",
@@ -173,6 +307,74 @@ func (StatuspageProvider) SwaggerDoc() map[string]string {
return map_StatuspageProvider
}
+var map_ClusterCSIDriver = map[string]string{
+ "": "ClusterCSIDriver object allows management and configuration of a CSI driver operator installed by default in OpenShift. Name of the object must be name of the CSI driver it operates. See CSIDriverName type for list of allowed values.",
+ "spec": "spec holds user settable values for configuration",
+ "status": "status holds observed values from the cluster. They may not be overridden.",
+}
+
+func (ClusterCSIDriver) SwaggerDoc() map[string]string {
+ return map_ClusterCSIDriver
+}
+
+var map_ClusterCSIDriverList = map[string]string{
+ "": "ClusterCSIDriverList contains a list of ClusterCSIDriver",
+}
+
+func (ClusterCSIDriverList) SwaggerDoc() map[string]string {
+ return map_ClusterCSIDriverList
+}
+
+var map_ClusterCSIDriverSpec = map[string]string{
+ "": "ClusterCSIDriverSpec is the desired behavior of CSI driver operator",
+}
+
+func (ClusterCSIDriverSpec) SwaggerDoc() map[string]string {
+ return map_ClusterCSIDriverSpec
+}
+
+var map_ClusterCSIDriverStatus = map[string]string{
+ "": "ClusterCSIDriverStatus is the observed status of CSI driver operator",
+}
+
+func (ClusterCSIDriverStatus) SwaggerDoc() map[string]string {
+ return map_ClusterCSIDriverStatus
+}
+
+var map_CSISnapshotController = map[string]string{
+ "": "CSISnapshotController provides a means to configure an operator to manage the CSI snapshots. `cluster` is the canonical name.",
+ "spec": "spec holds user settable values for configuration",
+ "status": "status holds observed values from the cluster. They may not be overridden.",
+}
+
+func (CSISnapshotController) SwaggerDoc() map[string]string {
+ return map_CSISnapshotController
+}
+
+var map_CSISnapshotControllerList = map[string]string{
+ "": "CSISnapshotControllerList contains a list of CSISnapshotControllers.",
+}
+
+func (CSISnapshotControllerList) SwaggerDoc() map[string]string {
+ return map_CSISnapshotControllerList
+}
+
+var map_CSISnapshotControllerSpec = map[string]string{
+ "": "CSISnapshotControllerSpec is the specification of the desired behavior of the CSISnapshotController operator.",
+}
+
+func (CSISnapshotControllerSpec) SwaggerDoc() map[string]string {
+ return map_CSISnapshotControllerSpec
+}
+
+var map_CSISnapshotControllerStatus = map[string]string{
+ "": "CSISnapshotControllerStatus defines the observed status of the CSISnapshotController operator.",
+}
+
+func (CSISnapshotControllerStatus) SwaggerDoc() map[string]string {
+ return map_CSISnapshotControllerStatus
+}
+
var map_DNS = map[string]string{
"": "DNS manages the CoreDNS component to provide a name resolution service for pods and services in the cluster.\n\nThis supports the DNS-based service discovery specification: https://github.com/kubernetes/dns/blob/master/docs/specification.md\n\nMore details: https://kubernetes.io/docs/tasks/administer-cluster/coredns",
"spec": "spec is the specification of the desired behavior of the DNS.",
@@ -191,9 +393,20 @@ func (DNSList) SwaggerDoc() map[string]string {
return map_DNSList
}
+var map_DNSNodePlacement = map[string]string{
+ "": "DNSNodePlacement describes the node scheduling configuration for DNS pods.",
+ "nodeSelector": "nodeSelector is the node selector applied to DNS pods.\n\nIf empty, the default is used, which is currently the following:\n\n kubernetes.io/os: linux\n\nThis default is subject to change.\n\nIf set, the specified selector is used and replaces the default.",
+ "tolerations": "tolerations is a list of tolerations applied to DNS pods.\n\nIf empty, the DNS operator sets a toleration for the \"node-role.kubernetes.io/master\" taint. This default is subject to change. Specifying tolerations without including a toleration for the \"node-role.kubernetes.io/master\" taint may be risky as it could lead to an outage if all worker nodes become unavailable.\n\nNote that the daemon controller adds some tolerations as well. See https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/",
+}
+
+func (DNSNodePlacement) SwaggerDoc() map[string]string {
+ return map_DNSNodePlacement
+}
+
var map_DNSSpec = map[string]string{
- "": "DNSSpec is the specification of the desired behavior of the DNS.",
- "servers": "servers is a list of DNS resolvers that provide name query delegation for one or more subdomains outside the scope of the cluster domain. If servers consists of more than one Server, longest suffix match will be used to determine the Server.\n\nFor example, if there are two Servers, one for \"foo.com\" and another for \"a.foo.com\", and the name query is for \"www.a.foo.com\", it will be routed to the Server with Zone \"a.foo.com\".\n\nIf this field is nil, no servers are created.",
+ "": "DNSSpec is the specification of the desired behavior of the DNS.",
+ "servers": "servers is a list of DNS resolvers that provide name query delegation for one or more subdomains outside the scope of the cluster domain. If servers consists of more than one Server, longest suffix match will be used to determine the Server.\n\nFor example, if there are two Servers, one for \"foo.com\" and another for \"a.foo.com\", and the name query is for \"www.a.foo.com\", it will be routed to the Server with Zone \"a.foo.com\".\n\nIf this field is nil, no servers are created.",
+ "nodePlacement": "nodePlacement provides explicit control over the scheduling of DNS pods.\n\nGenerally, it is useful to run a DNS pod on every node so that DNS queries are always handled by a local DNS pod instead of going over the network to a DNS pod on another node. However, security policies may require restricting the placement of DNS pods to specific nodes. For example, if a security policy prohibits pods on arbitrary nodes from communicating with the API, a node selector can be specified to restrict DNS pods to nodes that are permitted to communicate with the API. Conversely, if running DNS pods on nodes with a particular taint is desired, a toleration can be specified for that taint.\n\nIf unset, defaults are used. See nodePlacement for more details.",
}
func (DNSSpec) SwaggerDoc() map[string]string {
@@ -232,7 +445,7 @@ func (Server) SwaggerDoc() map[string]string {
}
var map_Etcd = map[string]string{
- "": "Etcd provides information to configure an operator to manage kube-apiserver.",
+ "": "Etcd provides information to configure an operator to manage etcd.",
}
func (Etcd) SwaggerDoc() map[string]string {
@@ -248,20 +461,78 @@ func (EtcdList) SwaggerDoc() map[string]string {
return map_EtcdList
}
+var map_AWSClassicLoadBalancerParameters = map[string]string{
+ "": "AWSClassicLoadBalancerParameters holds configuration parameters for an AWS Classic load balancer.",
+}
+
+func (AWSClassicLoadBalancerParameters) SwaggerDoc() map[string]string {
+ return map_AWSClassicLoadBalancerParameters
+}
+
+var map_AWSLoadBalancerParameters = map[string]string{
+ "": "AWSLoadBalancerParameters provides configuration settings that are specific to AWS load balancers.",
+ "type": "type is the type of AWS load balancer to instantiate for an ingresscontroller.\n\nValid values are:\n\n* \"Classic\": A Classic Load Balancer that makes routing decisions at either\n the transport layer (TCP/SSL) or the application layer (HTTP/HTTPS). See\n the following for additional details:\n\n https://docs.aws.amazon.com/AmazonECS/latest/developerguide/load-balancer-types.html#clb\n\n* \"NLB\": A Network Load Balancer that makes routing decisions at the\n transport layer (TCP/SSL). See the following for additional details:\n\n https://docs.aws.amazon.com/AmazonECS/latest/developerguide/load-balancer-types.html#nlb",
+ "classicLoadBalancer": "classicLoadBalancerParameters holds configuration parameters for an AWS classic load balancer. Present only if type is Classic.",
+ "networkLoadBalancer": "networkLoadBalancerParameters holds configuration parameters for an AWS network load balancer. Present only if type is NLB.",
+}
+
+func (AWSLoadBalancerParameters) SwaggerDoc() map[string]string {
+ return map_AWSLoadBalancerParameters
+}
+
+var map_AWSNetworkLoadBalancerParameters = map[string]string{
+ "": "AWSNetworkLoadBalancerParameters holds configuration parameters for an AWS Network load balancer.",
+}
+
+func (AWSNetworkLoadBalancerParameters) SwaggerDoc() map[string]string {
+ return map_AWSNetworkLoadBalancerParameters
+}
+
+var map_AccessLogging = map[string]string{
+ "": "AccessLogging describes how client requests should be logged.",
+ "destination": "destination is where access logs go.",
+ "httpLogFormat": "httpLogFormat specifies the format of the log message for an HTTP request.\n\nIf this field is empty, log messages use the implementation's default HTTP log format. For HAProxy's default HTTP log format, see the HAProxy documentation: http://cbonte.github.io/haproxy-dconv/2.0/configuration.html#8.2.3\n\nNote that this format only applies to cleartext HTTP connections and to secure HTTP connections for which the ingress controller terminates encryption (that is, edge-terminated or reencrypt connections). It does not affect the log format for TLS passthrough connections.",
+ "httpCaptureHeaders": "httpCaptureHeaders defines HTTP headers that should be captured in access logs. If this field is empty, no headers are captured.\n\nNote that this option only applies to cleartext HTTP connections and to secure HTTP connections for which the ingress controller terminates encryption (that is, edge-terminated or reencrypt connections). Headers cannot be captured for TLS passthrough connections.",
+ "httpCaptureCookies": "httpCaptureCookies specifies HTTP cookies that should be captured in access logs. If this field is empty, no cookies are captured.",
+}
+
+func (AccessLogging) SwaggerDoc() map[string]string {
+ return map_AccessLogging
+}
+
+var map_ContainerLoggingDestinationParameters = map[string]string{
+ "": "ContainerLoggingDestinationParameters describes parameters for the Container logging destination type.",
+}
+
+func (ContainerLoggingDestinationParameters) SwaggerDoc() map[string]string {
+ return map_ContainerLoggingDestinationParameters
+}
+
var map_EndpointPublishingStrategy = map[string]string{
"": "EndpointPublishingStrategy is a way to publish the endpoints of an IngressController, and represents the type and any additional configuration for a specific type.",
- "type": "type is the publishing strategy to use. Valid values are:\n\n* LoadBalancerService\n\nPublishes the ingress controller using a Kubernetes LoadBalancer Service.\n\nIn this configuration, the ingress controller deployment uses container networking. A LoadBalancer Service is created to publish the deployment.\n\nSee: https://kubernetes.io/docs/concepts/services-networking/service/#loadbalancer\n\nIf domain is set, a wildcard DNS record will be managed to point at the LoadBalancer Service's external name. DNS records are managed only in DNS zones defined by dns.config.openshift.io/cluster .spec.publicZone and .spec.privateZone.\n\nWildcard DNS management is currently supported only on the AWS, Azure, and GCP platforms.\n\n* HostNetwork\n\nPublishes the ingress controller on node ports where the ingress controller is deployed.\n\nIn this configuration, the ingress controller deployment uses host networking, bound to node ports 80 and 443. The user is responsible for configuring an external load balancer to publish the ingress controller via the node ports.\n\n* Private\n\nDoes not publish the ingress controller.\n\nIn this configuration, the ingress controller deployment uses container networking, and is not explicitly published. The user must manually publish the ingress controller.",
+ "type": "type is the publishing strategy to use. Valid values are:\n\n* LoadBalancerService\n\nPublishes the ingress controller using a Kubernetes LoadBalancer Service.\n\nIn this configuration, the ingress controller deployment uses container networking. A LoadBalancer Service is created to publish the deployment.\n\nSee: https://kubernetes.io/docs/concepts/services-networking/service/#loadbalancer\n\nIf domain is set, a wildcard DNS record will be managed to point at the LoadBalancer Service's external name. DNS records are managed only in DNS zones defined by dns.config.openshift.io/cluster .spec.publicZone and .spec.privateZone.\n\nWildcard DNS management is currently supported only on the AWS, Azure, and GCP platforms.\n\n* HostNetwork\n\nPublishes the ingress controller on node ports where the ingress controller is deployed.\n\nIn this configuration, the ingress controller deployment uses host networking, bound to node ports 80 and 443. The user is responsible for configuring an external load balancer to publish the ingress controller via the node ports.\n\n* Private\n\nDoes not publish the ingress controller.\n\nIn this configuration, the ingress controller deployment uses container networking, and is not explicitly published. The user must manually publish the ingress controller.\n\n* NodePortService\n\nPublishes the ingress controller using a Kubernetes NodePort Service.\n\nIn this configuration, the ingress controller deployment uses container networking. A NodePort Service is created to publish the deployment. The specific node ports are dynamically allocated by OpenShift; however, to support static port allocations, user changes to the node port field of the managed NodePort Service will preserved.",
"loadBalancer": "loadBalancer holds parameters for the load balancer. Present only if type is LoadBalancerService.",
"hostNetwork": "hostNetwork holds parameters for the HostNetwork endpoint publishing strategy. Present only if type is HostNetwork.",
"private": "private holds parameters for the Private endpoint publishing strategy. Present only if type is Private.",
+ "nodePort": "nodePort holds parameters for the NodePortService endpoint publishing strategy. Present only if type is NodePortService.",
}
func (EndpointPublishingStrategy) SwaggerDoc() map[string]string {
return map_EndpointPublishingStrategy
}
+var map_GCPLoadBalancerParameters = map[string]string{
+ "": "GCPLoadBalancerParameters provides configuration settings that are specific to GCP load balancers.",
+ "clientAccess": "clientAccess describes how client access is restricted for internal load balancers.\n\nValid values are: * \"Global\": Specifying an internal load balancer with Global client access\n allows clients from any region within the VPC to communicate with the load\n balancer.\n\n https://cloud.google.com/kubernetes-engine/docs/how-to/internal-load-balancing#global_access\n\n* \"Local\": Specifying an internal load balancer with Local client access\n means only clients within the same region (and VPC) as the GCP load balancer\n can communicate with the load balancer. Note that this is the default behavior.\n\n https://cloud.google.com/load-balancing/docs/internal#client_access",
+}
+
+func (GCPLoadBalancerParameters) SwaggerDoc() map[string]string {
+ return map_GCPLoadBalancerParameters
+}
+
var map_HostNetworkStrategy = map[string]string{
- "": "HostNetworkStrategy holds parameters for the HostNetwork endpoint publishing strategy.",
+ "": "HostNetworkStrategy holds parameters for the HostNetwork endpoint publishing strategy.",
+ "protocol": "protocol specifies whether the IngressController expects incoming connections to use plain TCP or whether the IngressController expects PROXY protocol.\n\nPROXY protocol can be used with load balancers that support it to communicate the source addresses of client connections when forwarding those connections to the IngressController. Using PROXY protocol enables the IngressController to report those source addresses instead of reporting the load balancer's address in HTTP headers and logs. Note that enabling PROXY protocol on the IngressController will cause connections to fail if you are not using a load balancer that uses PROXY protocol to forward connections to the IngressController. See http://www.haproxy.org/download/2.2/doc/proxy-protocol.txt for information about PROXY protocol.\n\nThe following values are valid for this field:\n\n* The empty string. * \"TCP\". * \"PROXY\".\n\nThe empty string specifies the default, which is TCP without PROXY protocol. Note that the default is subject to change.",
}
func (HostNetworkStrategy) SwaggerDoc() map[string]string {
@@ -278,6 +549,67 @@ func (IngressController) SwaggerDoc() map[string]string {
return map_IngressController
}
+var map_IngressControllerCaptureHTTPCookie = map[string]string{
+ "": "IngressControllerCaptureHTTPCookie describes an HTTP cookie that should be captured.",
+ "maxLength": "maxLength specifies a maximum length of the string that will be logged, which includes the cookie name, cookie value, and one-character delimiter. If the log entry exceeds this length, the value will be truncated in the log message. Note that the ingress controller may impose a separate bound on the total length of HTTP headers in a request.",
+}
+
+func (IngressControllerCaptureHTTPCookie) SwaggerDoc() map[string]string {
+ return map_IngressControllerCaptureHTTPCookie
+}
+
+var map_IngressControllerCaptureHTTPCookieUnion = map[string]string{
+ "": "IngressControllerCaptureHTTPCookieUnion describes optional fields of an HTTP cookie that should be captured.",
+ "matchType": "matchType specifies the type of match to be performed on the cookie name. Allowed values are \"Exact\" for an exact string match and \"Prefix\" for a string prefix match. If \"Exact\" is specified, a name must be specified in the name field. If \"Prefix\" is provided, a prefix must be specified in the namePrefix field. For example, specifying matchType \"Prefix\" and namePrefix \"foo\" will capture a cookie named \"foo\" or \"foobar\" but not one named \"bar\". The first matching cookie is captured.",
+ "name": "name specifies a cookie name. Its value must be a valid HTTP cookie name as defined in RFC 6265 section 4.1.",
+ "namePrefix": "namePrefix specifies a cookie name prefix. Its value must be a valid HTTP cookie name as defined in RFC 6265 section 4.1.",
+}
+
+func (IngressControllerCaptureHTTPCookieUnion) SwaggerDoc() map[string]string {
+ return map_IngressControllerCaptureHTTPCookieUnion
+}
+
+var map_IngressControllerCaptureHTTPHeader = map[string]string{
+ "": "IngressControllerCaptureHTTPHeader describes an HTTP header that should be captured.",
+ "name": "name specifies a header name. Its value must be a valid HTTP header name as defined in RFC 2616 section 4.2.",
+ "maxLength": "maxLength specifies a maximum length for the header value. If a header value exceeds this length, the value will be truncated in the log message. Note that the ingress controller may impose a separate bound on the total length of HTTP headers in a request.",
+}
+
+func (IngressControllerCaptureHTTPHeader) SwaggerDoc() map[string]string {
+ return map_IngressControllerCaptureHTTPHeader
+}
+
+var map_IngressControllerCaptureHTTPHeaders = map[string]string{
+ "": "IngressControllerCaptureHTTPHeaders specifies which HTTP headers the IngressController captures.",
+ "request": "request specifies which HTTP request headers to capture.\n\nIf this field is empty, no request headers are captured.",
+ "response": "response specifies which HTTP response headers to capture.\n\nIf this field is empty, no response headers are captured.",
+}
+
+func (IngressControllerCaptureHTTPHeaders) SwaggerDoc() map[string]string {
+ return map_IngressControllerCaptureHTTPHeaders
+}
+
+var map_IngressControllerHTTPHeaders = map[string]string{
+ "": "IngressControllerHTTPHeaders specifies how the IngressController handles certain HTTP headers.",
+ "forwardedHeaderPolicy": "forwardedHeaderPolicy specifies when and how the IngressController sets the Forwarded, X-Forwarded-For, X-Forwarded-Host, X-Forwarded-Port, X-Forwarded-Proto, and X-Forwarded-Proto-Version HTTP headers. The value may be one of the following:\n\n* \"Append\", which specifies that the IngressController appends the\n headers, preserving existing headers.\n\n* \"Replace\", which specifies that the IngressController sets the\n headers, replacing any existing Forwarded or X-Forwarded-* headers.\n\n* \"IfNone\", which specifies that the IngressController sets the\n headers if they are not already set.\n\n* \"Never\", which specifies that the IngressController never sets the\n headers, preserving any existing headers.\n\nBy default, the policy is \"Append\".",
+ "uniqueId": "uniqueId describes configuration for a custom HTTP header that the ingress controller should inject into incoming HTTP requests. Typically, this header is configured to have a value that is unique to the HTTP request. The header can be used by applications or included in access logs to facilitate tracing individual HTTP requests.\n\nIf this field is empty, no such header is injected into requests.",
+ "headerNameCaseAdjustments": "headerNameCaseAdjustments specifies case adjustments that can be applied to HTTP header names. Each adjustment is specified as an HTTP header name with the desired capitalization. For example, specifying \"X-Forwarded-For\" indicates that the \"x-forwarded-for\" HTTP header should be adjusted to have the specified capitalization.\n\nThese adjustments are only applied to cleartext, edge-terminated, and re-encrypt routes, and only when using HTTP/1.\n\nFor request headers, these adjustments are applied only for routes that have the haproxy.router.openshift.io/h1-adjust-case=true annotation. For response headers, these adjustments are applied to all HTTP responses.\n\nIf this field is empty, no request headers are adjusted.",
+}
+
+func (IngressControllerHTTPHeaders) SwaggerDoc() map[string]string {
+ return map_IngressControllerHTTPHeaders
+}
+
+var map_IngressControllerHTTPUniqueIdHeaderPolicy = map[string]string{
+ "": "IngressControllerHTTPUniqueIdHeaderPolicy describes configuration for a unique id header.",
+ "name": "name specifies the name of the HTTP header (for example, \"unique-id\") that the ingress controller should inject into HTTP requests. The field's value must be a valid HTTP header name as defined in RFC 2616 section 4.2. If the field is empty, no header is injected.",
+ "format": "format specifies the format for the injected HTTP header's value. This field has no effect unless name is specified. For the HAProxy-based ingress controller implementation, this format uses the same syntax as the HTTP log format. If the field is empty, the default value is \"%{+X}o\\ %ci:%cp_%fi:%fp_%Ts_%rt:%pid\"; see the corresponding HAProxy documentation: http://cbonte.github.io/haproxy-dconv/2.0/configuration.html#8.2.3",
+}
+
+func (IngressControllerHTTPUniqueIdHeaderPolicy) SwaggerDoc() map[string]string {
+ return map_IngressControllerHTTPUniqueIdHeaderPolicy
+}
+
var map_IngressControllerList = map[string]string{
"": "IngressControllerList contains a list of IngressControllers.",
}
@@ -286,16 +618,31 @@ func (IngressControllerList) SwaggerDoc() map[string]string {
return map_IngressControllerList
}
+var map_IngressControllerLogging = map[string]string{
+ "": "IngressControllerLogging describes what should be logged where.",
+ "access": "access describes how the client requests should be logged.\n\nIf this field is empty, access logging is disabled.",
+}
+
+func (IngressControllerLogging) SwaggerDoc() map[string]string {
+ return map_IngressControllerLogging
+}
+
var map_IngressControllerSpec = map[string]string{
"": "IngressControllerSpec is the specification of the desired behavior of the IngressController.",
"domain": "domain is a DNS name serviced by the ingress controller and is used to configure multiple features:\n\n* For the LoadBalancerService endpoint publishing strategy, domain is\n used to configure DNS records. See endpointPublishingStrategy.\n\n* When using a generated default certificate, the certificate will be valid\n for domain and its subdomains. See defaultCertificate.\n\n* The value is published to individual Route statuses so that end-users\n know where to target external DNS records.\n\ndomain must be unique among all IngressControllers, and cannot be updated.\n\nIf empty, defaults to ingress.config.openshift.io/cluster .spec.domain.",
+ "httpErrorCodePages": "httpErrorCodePages specifies a configmap with custom error pages. The administrator must create this configmap in the openshift-config namespace. This configmap should have keys in the format \"error-page-.http\", where is an HTTP error code. For example, \"error-page-503.http\" defines an error page for HTTP 503 responses. Currently only error pages for 503 and 404 responses can be customized. Each value in the configmap should be the full response, including HTTP headers. Eg- https://raw.githubusercontent.com/openshift/router/fadab45747a9b30cc3f0a4b41ad2871f95827a93/images/router/haproxy/conf/error-page-503.http If this field is empty, the ingress controller uses the default error pages.",
"replicas": "replicas is the desired number of ingress controller replicas. If unset, defaults to 2.",
- "endpointPublishingStrategy": "endpointPublishingStrategy is used to publish the ingress controller endpoints to other networks, enable load balancer integrations, etc.\n\nIf unset, the default is based on infrastructure.config.openshift.io/cluster .status.platform:\n\n AWS: LoadBalancerService (with External scope)\n Azure: LoadBalancerService (with External scope)\n GCP: LoadBalancerService (with External scope)\n Libvirt: HostNetwork\n\nAny other platform types (including None) default to HostNetwork.\n\nendpointPublishingStrategy cannot be updated.",
- "defaultCertificate": "defaultCertificate is a reference to a secret containing the default certificate served by the ingress controller. When Routes don't specify their own certificate, defaultCertificate is used.\n\nThe secret must contain the following keys and data:\n\n tls.crt: certificate file contents\n tls.key: key file contents\n\nIf unset, a wildcard certificate is automatically generated and used. The certificate is valid for the ingress controller domain (and subdomains) and the generated certificate's CA will be automatically integrated with the cluster's trust store.\n\nThe in-use certificate (whether generated or user-specified) will be automatically integrated with OpenShift's built-in OAuth server.",
+ "endpointPublishingStrategy": "endpointPublishingStrategy is used to publish the ingress controller endpoints to other networks, enable load balancer integrations, etc.\n\nIf unset, the default is based on infrastructure.config.openshift.io/cluster .status.platform:\n\n AWS: LoadBalancerService (with External scope)\n Azure: LoadBalancerService (with External scope)\n GCP: LoadBalancerService (with External scope)\n IBMCloud: LoadBalancerService (with External scope)\n Libvirt: HostNetwork\n\nAny other platform types (including None) default to HostNetwork.\n\nendpointPublishingStrategy cannot be updated.",
+ "defaultCertificate": "defaultCertificate is a reference to a secret containing the default certificate served by the ingress controller. When Routes don't specify their own certificate, defaultCertificate is used.\n\nThe secret must contain the following keys and data:\n\n tls.crt: certificate file contents\n tls.key: key file contents\n\nIf unset, a wildcard certificate is automatically generated and used. The certificate is valid for the ingress controller domain (and subdomains) and the generated certificate's CA will be automatically integrated with the cluster's trust store.\n\nIf a wildcard certificate is used and shared by multiple HTTP/2 enabled routes (which implies ALPN) then clients (i.e., notably browsers) are at liberty to reuse open connections. This means a client can reuse a connection to another route and that is likely to fail. This behaviour is generally known as connection coalescing.\n\nThe in-use certificate (whether generated or user-specified) will be automatically integrated with OpenShift's built-in OAuth server.",
"namespaceSelector": "namespaceSelector is used to filter the set of namespaces serviced by the ingress controller. This is useful for implementing shards.\n\nIf unset, the default is no filtering.",
"routeSelector": "routeSelector is used to filter the set of Routes serviced by the ingress controller. This is useful for implementing shards.\n\nIf unset, the default is no filtering.",
"nodePlacement": "nodePlacement enables explicit control over the scheduling of the ingress controller.\n\nIf unset, defaults are used. See NodePlacement for more details.",
"tlsSecurityProfile": "tlsSecurityProfile specifies settings for TLS connections for ingresscontrollers.\n\nIf unset, the default is based on the apiservers.config.openshift.io/cluster resource.\n\nNote that when using the Old, Intermediate, and Modern profile types, the effective profile configuration is subject to change between releases. For example, given a specification to use the Intermediate profile deployed on release X.Y.Z, an upgrade to release X.Y.Z+1 may cause a new profile configuration to be applied to the ingress controller, resulting in a rollout.\n\nNote that the minimum TLS version for ingress controllers is 1.1, and the maximum TLS version is 1.2. An implication of this restriction is that the Modern TLS profile type cannot be used because it requires TLS 1.3.",
+ "routeAdmission": "routeAdmission defines a policy for handling new route claims (for example, to allow or deny claims across namespaces).\n\nIf empty, defaults will be applied. See specific routeAdmission fields for details about their defaults.",
+ "logging": "logging defines parameters for what should be logged where. If this field is empty, operational logs are enabled but access logs are disabled.",
+ "httpHeaders": "httpHeaders defines policy for HTTP headers.\n\nIf this field is empty, the default values are used.",
+ "tuningOptions": "tuningOptions defines parameters for adjusting the performance of ingress controller pods. All fields are optional and will use their respective defaults if not set. See specific tuningOptions fields for more details.\n\nSetting fields within tuningOptions is generally not recommended. The default values are suitable for most configurations.",
+ "unsupportedConfigOverrides": "unsupportedConfigOverrides allows specifying unsupported configuration options. Its use is unsupported.",
}
func (IngressControllerSpec) SwaggerDoc() map[string]string {
@@ -317,18 +664,41 @@ func (IngressControllerStatus) SwaggerDoc() map[string]string {
return map_IngressControllerStatus
}
+var map_IngressControllerTuningOptions = map[string]string{
+ "": "IngressControllerTuningOptions specifies options for tuning the performance of ingress controller pods",
+ "headerBufferBytes": "headerBufferBytes describes how much memory should be reserved (in bytes) for IngressController connection sessions. Note that this value must be at least 16384 if HTTP/2 is enabled for the IngressController (https://tools.ietf.org/html/rfc7540). If this field is empty, the IngressController will use a default value of 32768 bytes.\n\nSetting this field is generally not recommended as headerBufferBytes values that are too small may break the IngressController and headerBufferBytes values that are too large could cause the IngressController to use significantly more memory than necessary.",
+ "headerBufferMaxRewriteBytes": "headerBufferMaxRewriteBytes describes how much memory should be reserved (in bytes) from headerBufferBytes for HTTP header rewriting and appending for IngressController connection sessions. Note that incoming HTTP requests will be limited to (headerBufferBytes - headerBufferMaxRewriteBytes) bytes, meaning headerBufferBytes must be greater than headerBufferMaxRewriteBytes. If this field is empty, the IngressController will use a default value of 8192 bytes.\n\nSetting this field is generally not recommended as headerBufferMaxRewriteBytes values that are too small may break the IngressController and headerBufferMaxRewriteBytes values that are too large could cause the IngressController to use significantly more memory than necessary.",
+ "threadCount": "threadCount defines the number of threads created per HAProxy process. Creating more threads allows each ingress controller pod to handle more connections, at the cost of more system resources being used. HAProxy currently supports up to 64 threads. If this field is empty, the IngressController will use the default value. The current default is 4 threads, but this may change in future releases.\n\nSetting this field is generally not recommended. Increasing the number of HAProxy threads allows ingress controller pods to utilize more CPU time under load, potentially starving other pods if set too high. Reducing the number of threads may cause the ingress controller to perform poorly.",
+}
+
+func (IngressControllerTuningOptions) SwaggerDoc() map[string]string {
+ return map_IngressControllerTuningOptions
+}
+
var map_LoadBalancerStrategy = map[string]string{
- "": "LoadBalancerStrategy holds parameters for a load balancer.",
- "scope": "scope indicates the scope at which the load balancer is exposed. Possible values are \"External\" and \"Internal\".",
+ "": "LoadBalancerStrategy holds parameters for a load balancer.",
+ "scope": "scope indicates the scope at which the load balancer is exposed. Possible values are \"External\" and \"Internal\".",
+ "providerParameters": "providerParameters holds desired load balancer information specific to the underlying infrastructure provider.\n\nIf empty, defaults will be applied. See specific providerParameters fields for details about their defaults.",
}
func (LoadBalancerStrategy) SwaggerDoc() map[string]string {
return map_LoadBalancerStrategy
}
+var map_LoggingDestination = map[string]string{
+ "": "LoggingDestination describes a destination for log messages.",
+ "type": "type is the type of destination for logs. It must be one of the following:\n\n* Container\n\nThe ingress operator configures the sidecar container named \"logs\" on the ingress controller pod and configures the ingress controller to write logs to the sidecar. The logs are then available as container logs. The expectation is that the administrator configures a custom logging solution that reads logs from this sidecar. Note that using container logs means that logs may be dropped if the rate of logs exceeds the container runtime's or the custom logging solution's capacity.\n\n* Syslog\n\nLogs are sent to a syslog endpoint. The administrator must specify an endpoint that can receive syslog messages. The expectation is that the administrator has configured a custom syslog instance.",
+ "syslog": "syslog holds parameters for a syslog endpoint. Present only if type is Syslog.",
+ "container": "container holds parameters for the Container logging destination. Present only if type is Container.",
+}
+
+func (LoggingDestination) SwaggerDoc() map[string]string {
+ return map_LoggingDestination
+}
+
var map_NodePlacement = map[string]string{
"": "NodePlacement describes node scheduling configuration for an ingress controller.",
- "nodeSelector": "nodeSelector is the node selector applied to ingress controller deployments.\n\nIf unset, the default is:\n\n beta.kubernetes.io/os: linux\n node-role.kubernetes.io/worker: ''\n\nIf set, the specified selector is used and replaces the default.",
+ "nodeSelector": "nodeSelector is the node selector applied to ingress controller deployments.\n\nIf unset, the default is:\n\n kubernetes.io/os: linux\n node-role.kubernetes.io/worker: ''\n\nIf set, the specified selector is used and replaces the default.",
"tolerations": "tolerations is a list of tolerations applied to ingress controller deployments.\n\nThe default is an empty list.\n\nSee https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/",
}
@@ -336,6 +706,15 @@ func (NodePlacement) SwaggerDoc() map[string]string {
return map_NodePlacement
}
+var map_NodePortStrategy = map[string]string{
+ "": "NodePortStrategy holds parameters for the NodePortService endpoint publishing strategy.",
+ "protocol": "protocol specifies whether the IngressController expects incoming connections to use plain TCP or whether the IngressController expects PROXY protocol.\n\nPROXY protocol can be used with load balancers that support it to communicate the source addresses of client connections when forwarding those connections to the IngressController. Using PROXY protocol enables the IngressController to report those source addresses instead of reporting the load balancer's address in HTTP headers and logs. Note that enabling PROXY protocol on the IngressController will cause connections to fail if you are not using a load balancer that uses PROXY protocol to forward connections to the IngressController. See http://www.haproxy.org/download/2.2/doc/proxy-protocol.txt for information about PROXY protocol.\n\nThe following values are valid for this field:\n\n* The empty string. * \"TCP\". * \"PROXY\".\n\nThe empty string specifies the default, which is TCP without PROXY protocol. Note that the default is subject to change.",
+}
+
+func (NodePortStrategy) SwaggerDoc() map[string]string {
+ return map_NodePortStrategy
+}
+
var map_PrivateStrategy = map[string]string{
"": "PrivateStrategy holds parameters for the Private endpoint publishing strategy.",
}
@@ -344,8 +723,42 @@ func (PrivateStrategy) SwaggerDoc() map[string]string {
return map_PrivateStrategy
}
+var map_ProviderLoadBalancerParameters = map[string]string{
+ "": "ProviderLoadBalancerParameters holds desired load balancer information specific to the underlying infrastructure provider.",
+ "type": "type is the underlying infrastructure provider for the load balancer. Allowed values are \"AWS\", \"Azure\", \"BareMetal\", \"GCP\", \"OpenStack\", and \"VSphere\".",
+ "aws": "aws provides configuration settings that are specific to AWS load balancers.\n\nIf empty, defaults will be applied. See specific aws fields for details about their defaults.",
+ "gcp": "gcp provides configuration settings that are specific to GCP load balancers.\n\nIf empty, defaults will be applied. See specific gcp fields for details about their defaults.",
+}
+
+func (ProviderLoadBalancerParameters) SwaggerDoc() map[string]string {
+ return map_ProviderLoadBalancerParameters
+}
+
+var map_RouteAdmissionPolicy = map[string]string{
+ "": "RouteAdmissionPolicy is an admission policy for allowing new route claims.",
+ "namespaceOwnership": "namespaceOwnership describes how host name claims across namespaces should be handled.\n\nValue must be one of:\n\n- Strict: Do not allow routes in different namespaces to claim the same host.\n\n- InterNamespaceAllowed: Allow routes to claim different paths of the same\n host name across namespaces.\n\nIf empty, the default is Strict.",
+ "wildcardPolicy": "wildcardPolicy describes how routes with wildcard policies should be handled for the ingress controller. WildcardPolicy controls use of routes [1] exposed by the ingress controller based on the route's wildcard policy.\n\n[1] https://github.com/openshift/api/blob/master/route/v1/types.go\n\nNote: Updating WildcardPolicy from WildcardsAllowed to WildcardsDisallowed will cause admitted routes with a wildcard policy of Subdomain to stop working. These routes must be updated to a wildcard policy of None to be readmitted by the ingress controller.\n\nWildcardPolicy supports WildcardsAllowed and WildcardsDisallowed values.\n\nIf empty, defaults to \"WildcardsDisallowed\".",
+}
+
+func (RouteAdmissionPolicy) SwaggerDoc() map[string]string {
+ return map_RouteAdmissionPolicy
+}
+
+var map_SyslogLoggingDestinationParameters = map[string]string{
+ "": "SyslogLoggingDestinationParameters describes parameters for the Syslog logging destination type.",
+ "address": "address is the IP address of the syslog endpoint that receives log messages.",
+ "port": "port is the UDP port number of the syslog endpoint that receives log messages.",
+ "facility": "facility specifies the syslog facility of log messages.\n\nIf this field is empty, the facility is \"local1\".",
+}
+
+func (SyslogLoggingDestinationParameters) SwaggerDoc() map[string]string {
+ return map_SyslogLoggingDestinationParameters
+}
+
var map_KubeAPIServer = map[string]string{
- "": "KubeAPIServer provides information to configure an operator to manage kube-apiserver.",
+ "": "KubeAPIServer provides information to configure an operator to manage kube-apiserver.",
+ "spec": "spec is the specification of the desired behavior of the Kubernetes API Server",
+ "status": "status is the most recently observed status of the Kubernetes API Server",
}
func (KubeAPIServer) SwaggerDoc() map[string]string {
@@ -362,7 +775,9 @@ func (KubeAPIServerList) SwaggerDoc() map[string]string {
}
var map_KubeControllerManager = map[string]string{
- "": "KubeControllerManager provides information to configure an operator to manage kube-controller-manager.",
+ "": "KubeControllerManager provides information to configure an operator to manage kube-controller-manager.",
+ "spec": "spec is the specification of the desired behavior of the Kubernetes Controller Manager",
+ "status": "status is the most recently observed status of the Kubernetes Controller Manager",
}
func (KubeControllerManager) SwaggerDoc() map[string]string {
@@ -409,7 +824,7 @@ func (AdditionalNetworkDefinition) SwaggerDoc() map[string]string {
}
var map_ClusterNetworkEntry = map[string]string{
- "": "ClusterNetworkEntry is a subnet from which to allocate PodIPs. A network of size HostPrefix (in CIDR notation) will be allocated when nodes join the cluster. Not all network providers support multiple ClusterNetworks",
+ "": "ClusterNetworkEntry is a subnet from which to allocate PodIPs. A network of size HostPrefix (in CIDR notation) will be allocated when nodes join the cluster. If the HostPrefix field is not used by the plugin, it can be left unset. Not all network providers support multiple ClusterNetworks",
}
func (ClusterNetworkEntry) SwaggerDoc() map[string]string {
@@ -428,8 +843,19 @@ func (DefaultNetworkDefinition) SwaggerDoc() map[string]string {
return map_DefaultNetworkDefinition
}
+var map_ExportNetworkFlows = map[string]string{
+ "netFlow": "netFlow defines the NetFlow configuration.",
+ "sFlow": "sFlow defines the SFlow configuration.",
+ "ipfix": "ipfix defines IPFIX configuration.",
+}
+
+func (ExportNetworkFlows) SwaggerDoc() map[string]string {
+ return map_ExportNetworkFlows
+}
+
var map_HybridOverlayConfig = map[string]string{
- "hybridClusterNetwork": "HybridClusterNetwork defines a network space given to nodes on an additional overlay network.",
+ "hybridClusterNetwork": "HybridClusterNetwork defines a network space given to nodes on an additional overlay network.",
+ "hybridOverlayVXLANPort": "HybridOverlayVXLANPort defines the VXLAN port number to be used by the additional overlay network. Default is 4789",
}
func (HybridOverlayConfig) SwaggerDoc() map[string]string {
@@ -446,6 +872,14 @@ func (IPAMConfig) SwaggerDoc() map[string]string {
return map_IPAMConfig
}
+var map_IPFIXConfig = map[string]string{
+ "collectors": "ipfixCollectors is list of strings formatted as ip:port with a maximum of ten items",
+}
+
+func (IPFIXConfig) SwaggerDoc() map[string]string {
+ return map_IPFIXConfig
+}
+
var map_KuryrConfig = map[string]string{
"": "KuryrConfig configures the Kuryr-Kubernetes SDN",
"daemonProbesPort": "The port kuryr-daemon will listen for readiness and liveness requests.",
@@ -455,12 +889,21 @@ var map_KuryrConfig = map[string]string{
"poolMaxPorts": "poolMaxPorts sets a maximum number of free ports that are being kept in a port pool. If the number of ports exceeds this setting, free ports will get deleted. Setting 0 will disable this upper bound, effectively preventing pools from shrinking and this is the default value. For more information about port pools see enablePortPoolsPrepopulation setting.",
"poolMinPorts": "poolMinPorts sets a minimum number of free ports that should be kept in a port pool. If the number of ports is lower than this setting, new ports will get created and added to pool. The default is 1. For more information about port pools see enablePortPoolsPrepopulation setting.",
"poolBatchPorts": "poolBatchPorts sets a number of ports that should be created in a single batch request to extend the port pool. The default is 3. For more information about port pools see enablePortPoolsPrepopulation setting.",
+ "mtu": "mtu is the MTU that Kuryr should use when creating pod networks in Neutron. The value has to be lower or equal to the MTU of the nodes network and Neutron has to allow creation of tenant networks with such MTU. If unset Pod networks will be created with the same MTU as the nodes network has.",
}
func (KuryrConfig) SwaggerDoc() map[string]string {
return map_KuryrConfig
}
+var map_NetFlowConfig = map[string]string{
+ "collectors": "netFlow defines the NetFlow collectors that will consume the flow data exported from OVS. It is a list of strings formatted as ip:port with a maximum of ten items",
+}
+
+func (NetFlowConfig) SwaggerDoc() map[string]string {
+ return map_NetFlowConfig
+}
+
var map_Network = map[string]string{
"": "Network describes the cluster's desired network configuration. It is consumed by the cluster-network-operator.",
}
@@ -477,16 +920,28 @@ func (NetworkList) SwaggerDoc() map[string]string {
return map_NetworkList
}
+var map_NetworkMigration = map[string]string{
+ "": "NetworkMigration represents the cluster network configuration.",
+ "networkType": "networkType is the target type of network migration The supported values are OpenShiftSDN, OVNKubernetes",
+}
+
+func (NetworkMigration) SwaggerDoc() map[string]string {
+ return map_NetworkMigration
+}
+
var map_NetworkSpec = map[string]string{
- "": "NetworkSpec is the top-level network configuration object.",
- "clusterNetwork": "clusterNetwork is the IP address pool to use for pod IPs. Some network providers, e.g. OpenShift SDN, support multiple ClusterNetworks. Others only support one. This is equivalent to the cluster-cidr.",
- "serviceNetwork": "serviceNetwork is the ip address pool to use for Service IPs Currently, all existing network providers only support a single value here, but this is an array to allow for growth.",
- "defaultNetwork": "defaultNetwork is the \"default\" network that all pods will receive",
- "additionalNetworks": "additionalNetworks is a list of extra networks to make available to pods when multiple networks are enabled.",
- "disableMultiNetwork": "disableMultiNetwork specifies whether or not multiple pod network support should be disabled. If unset, this property defaults to 'false' and multiple network support is enabled.",
- "deployKubeProxy": "deployKubeProxy specifies whether or not a standalone kube-proxy should be deployed by the operator. Some network providers include kube-proxy or similar functionality. If unset, the plugin will attempt to select the correct value, which is false when OpenShift SDN and ovn-kubernetes are used and true otherwise.",
- "kubeProxyConfig": "kubeProxyConfig lets us configure desired proxy configuration. If not specified, sensible defaults will be chosen by OpenShift directly. Not consumed by all network providers - currently only openshift-sdn.",
- "logLevel": "logLevel allows configuring the logging level of the components deployed by the operator. Currently only Kuryr SDN is affected by this setting. Please note that turning on extensive logging may affect performance. The default value is \"Normal\".",
+ "": "NetworkSpec is the top-level network configuration object.",
+ "clusterNetwork": "clusterNetwork is the IP address pool to use for pod IPs. Some network providers, e.g. OpenShift SDN, support multiple ClusterNetworks. Others only support one. This is equivalent to the cluster-cidr.",
+ "serviceNetwork": "serviceNetwork is the ip address pool to use for Service IPs Currently, all existing network providers only support a single value here, but this is an array to allow for growth.",
+ "defaultNetwork": "defaultNetwork is the \"default\" network that all pods will receive",
+ "additionalNetworks": "additionalNetworks is a list of extra networks to make available to pods when multiple networks are enabled.",
+ "disableMultiNetwork": "disableMultiNetwork specifies whether or not multiple pod network support should be disabled. If unset, this property defaults to 'false' and multiple network support is enabled.",
+ "useMultiNetworkPolicy": "useMultiNetworkPolicy enables a controller which allows for MultiNetworkPolicy objects to be used on additional networks as created by Multus CNI. MultiNetworkPolicy are similar to NetworkPolicy objects, but NetworkPolicy objects only apply to the primary interface. With MultiNetworkPolicy, you can control the traffic that a pod can receive over the secondary interfaces. If unset, this property defaults to 'false' and MultiNetworkPolicy objects are ignored. If 'disableMultiNetwork' is 'true' then the value of this field is ignored.",
+ "deployKubeProxy": "deployKubeProxy specifies whether or not a standalone kube-proxy should be deployed by the operator. Some network providers include kube-proxy or similar functionality. If unset, the plugin will attempt to select the correct value, which is false when OpenShift SDN and ovn-kubernetes are used and true otherwise.",
+ "disableNetworkDiagnostics": "disableNetworkDiagnostics specifies whether or not PodNetworkConnectivityCheck CRs from a test pod to every node, apiserver and LB should be disabled or not. If unset, this property defaults to 'false' and network diagnostics is enabled. Setting this to 'true' would reduce the additional load of the pods performing the checks.",
+ "kubeProxyConfig": "kubeProxyConfig lets us configure desired proxy configuration. If not specified, sensible defaults will be chosen by OpenShift directly. Not consumed by all network providers - currently only openshift-sdn.",
+ "exportNetworkFlows": "exportNetworkFlows enables and configures the export of network flow metadata from the pod network by using protocols NetFlow, SFlow or IPFIX. Currently only supported on OVN-Kubernetes plugin. If unset, flows will not be exported to any collector.",
+ "migration": "migration enables and configures the cluster network migration. Setting this to the target network type to allow changing the default network. If unset, the operation of changing cluster default network plugin will be rejected.",
}
func (NetworkSpec) SwaggerDoc() map[string]string {
@@ -494,7 +949,7 @@ func (NetworkSpec) SwaggerDoc() map[string]string {
}
var map_NetworkStatus = map[string]string{
- "": "NetworkStatus is currently unused. Instead, status is reported in the Network.config.openshift.io object.",
+ "": "NetworkStatus is detailed operator status, which is distilled up to the Network clusteroperator object.",
}
func (NetworkStatus) SwaggerDoc() map[string]string {
@@ -506,6 +961,8 @@ var map_OVNKubernetesConfig = map[string]string{
"mtu": "mtu is the MTU to use for the tunnel interface. This must be 100 bytes smaller than the uplink mtu. Default is 1400",
"genevePort": "geneve port is the UDP port to be used by geneve encapulation. Default is 6081",
"hybridOverlayConfig": "HybridOverlayConfig configures an additional overlay network for peers that are not using OVN.",
+ "ipsecConfig": "ipsecConfig enables and configures IPsec for pods on the pod network within the cluster.",
+ "policyAuditConfig": "policyAuditConfig is the configuration for network policy audit events. If unset, reported defaults are used.",
}
func (OVNKubernetesConfig) SwaggerDoc() map[string]string {
@@ -517,7 +974,7 @@ var map_OpenShiftSDNConfig = map[string]string{
"mode": "mode is one of \"Multitenant\", \"Subnet\", or \"NetworkPolicy\"",
"vxlanPort": "vxlanPort is the port to use for all vxlan packets. The default is 4789.",
"mtu": "mtu is the mtu to use for the tunnel interface. Defaults to 1450 if unset. This must be 50 bytes smaller than the machine's uplink.",
- "useExternalOpenvswitch": "useExternalOpenvswitch tells the operator not to install openvswitch, because it will be provided separately. If set, you must provide it yourself.",
+ "useExternalOpenvswitch": "useExternalOpenvswitch used to control whether the operator would deploy an OVS DaemonSet itself or expect someone else to start OVS. As of 4.6, OVS is always run as a system service, and this flag is ignored. DEPRECATED: non-functional as of 4.6",
"enableUnidling": "enableUnidling controls whether or not the service proxy will support idling and unidling of services. By default, unidling is enabled.",
}
@@ -525,9 +982,20 @@ func (OpenShiftSDNConfig) SwaggerDoc() map[string]string {
return map_OpenShiftSDNConfig
}
+var map_PolicyAuditConfig = map[string]string{
+ "rateLimit": "rateLimit is the approximate maximum number of messages to generate per-second per-node. If unset the default of 20 msg/sec is used.",
+ "maxFileSize": "maxFilesSize is the max size an ACL_audit log file is allowed to reach before rotation occurs Units are in MB and the Default is 50MB",
+ "destination": "destination is the location for policy log messages. Regardless of this config, persistent logs will always be dumped to the host at /var/log/ovn/ however Additionally syslog output may be configured as follows. Valid values are: - \"libc\" -> to use the libc syslog() function of the host node's journdald process - \"udp:host:port\" -> for sending syslog over UDP - \"unix:file\" -> for using the UNIX domain socket directly - \"null\" -> to discard all messages logged to syslog The default is \"null\"",
+ "syslogFacility": "syslogFacility the RFC5424 facility for generated messages, e.g. \"kern\". Default is \"local0\"",
+}
+
+func (PolicyAuditConfig) SwaggerDoc() map[string]string {
+ return map_PolicyAuditConfig
+}
+
var map_ProxyConfig = map[string]string{
"": "ProxyConfig defines the configuration knobs for kubeproxy All of these are optional and have sensible defaults",
- "iptablesSyncPeriod": "The period that iptables rules are refreshed. Default: 30s",
+ "iptablesSyncPeriod": "An internal kube-proxy parameter. In older releases of OCP, this sometimes needed to be adjusted in large clusters for performance reasons, but this is no longer necessary, and there is no reason to change this from the default value. Default: 30s",
"bindAddress": "The address to \"bind\" on Defaults to 0.0.0.0",
"proxyArguments": "Any additional arguments to pass to the kubeproxy process",
}
@@ -536,6 +1004,14 @@ func (ProxyConfig) SwaggerDoc() map[string]string {
return map_ProxyConfig
}
+var map_SFlowConfig = map[string]string{
+ "collectors": "sFlowCollectors is list of strings formatted as ip:port with a maximum of ten items",
+}
+
+func (SFlowConfig) SwaggerDoc() map[string]string {
+ return map_SFlowConfig
+}
+
var map_SimpleMacvlanConfig = map[string]string{
"": "SimpleMacvlanConfig contains configurations for macvlan interface.",
"master": "master is the host interface to create the macvlan interface from. If not specified, it will be default route interface",
@@ -591,7 +1067,9 @@ func (StaticIPAMRoutes) SwaggerDoc() map[string]string {
}
var map_OpenShiftAPIServer = map[string]string{
- "": "OpenShiftAPIServer provides information to configure an operator to manage openshift-apiserver.",
+ "": "OpenShiftAPIServer provides information to configure an operator to manage openshift-apiserver.",
+ "spec": "spec is the specification of the desired behavior of the OpenShift API Server.",
+ "status": "status defines the observed status of the OpenShift API Server.",
}
func (OpenShiftAPIServer) SwaggerDoc() map[string]string {
@@ -633,7 +1111,9 @@ func (OpenShiftControllerManagerList) SwaggerDoc() map[string]string {
}
var map_KubeScheduler = map[string]string{
- "": "KubeScheduler provides information to configure an operator to manage scheduler.",
+ "": "KubeScheduler provides information to configure an operator to manage scheduler.",
+ "spec": "spec is the specification of the desired behavior of the Kubernetes Scheduler",
+ "status": "status is the most recently observed status of the Kubernetes Scheduler",
}
func (KubeScheduler) SwaggerDoc() map[string]string {
@@ -669,7 +1149,7 @@ func (ServiceCAList) SwaggerDoc() map[string]string {
}
var map_ServiceCatalogAPIServer = map[string]string{
- "": "ServiceCatalogAPIServer provides information to configure an operator to manage Service Catalog API Server",
+ "": "ServiceCatalogAPIServer provides information to configure an operator to manage Service Catalog API Server DEPRECATED: will be removed in 4.6",
}
func (ServiceCatalogAPIServer) SwaggerDoc() map[string]string {
@@ -677,7 +1157,7 @@ func (ServiceCatalogAPIServer) SwaggerDoc() map[string]string {
}
var map_ServiceCatalogAPIServerList = map[string]string{
- "": "ServiceCatalogAPIServerList is a collection of items",
+ "": "ServiceCatalogAPIServerList is a collection of items DEPRECATED: will be removed in 4.6",
"items": "Items contains the items",
}
@@ -686,7 +1166,7 @@ func (ServiceCatalogAPIServerList) SwaggerDoc() map[string]string {
}
var map_ServiceCatalogControllerManager = map[string]string{
- "": "ServiceCatalogControllerManager provides information to configure an operator to manage Service Catalog Controller Manager",
+ "": "ServiceCatalogControllerManager provides information to configure an operator to manage Service Catalog Controller Manager DEPRECATED: will be removed in 4.6",
}
func (ServiceCatalogControllerManager) SwaggerDoc() map[string]string {
@@ -694,7 +1174,7 @@ func (ServiceCatalogControllerManager) SwaggerDoc() map[string]string {
}
var map_ServiceCatalogControllerManagerList = map[string]string{
- "": "ServiceCatalogControllerManagerList is a collection of items",
+ "": "ServiceCatalogControllerManagerList is a collection of items DEPRECATED: will be removed in 4.6",
"items": "Items contains the items",
}
@@ -702,4 +1182,38 @@ func (ServiceCatalogControllerManagerList) SwaggerDoc() map[string]string {
return map_ServiceCatalogControllerManagerList
}
+var map_Storage = map[string]string{
+ "": "Storage provides a means to configure an operator to manage the cluster storage operator. `cluster` is the canonical name.",
+ "spec": "spec holds user settable values for configuration",
+ "status": "status holds observed values from the cluster. They may not be overridden.",
+}
+
+func (Storage) SwaggerDoc() map[string]string {
+ return map_Storage
+}
+
+var map_StorageList = map[string]string{
+ "": "StorageList contains a list of Storages.",
+}
+
+func (StorageList) SwaggerDoc() map[string]string {
+ return map_StorageList
+}
+
+var map_StorageSpec = map[string]string{
+ "": "StorageSpec is the specification of the desired behavior of the cluster storage operator.",
+}
+
+func (StorageSpec) SwaggerDoc() map[string]string {
+ return map_StorageSpec
+}
+
+var map_StorageStatus = map[string]string{
+ "": "StorageStatus defines the observed status of the cluster storage operator.",
+}
+
+func (StorageStatus) SwaggerDoc() map[string]string {
+ return map_StorageStatus
+}
+
// AUTO-GENERATED FUNCTIONS END HERE
diff --git a/vendor/github.com/openshift/api/route/v1/generated.pb.go b/vendor/github.com/openshift/api/route/v1/generated.pb.go
index 38543a90fdc..3eba70d0d14 100644
--- a/vendor/github.com/openshift/api/route/v1/generated.pb.go
+++ b/vendor/github.com/openshift/api/route/v1/generated.pb.go
@@ -28,7 +28,7 @@ var _ = math.Inf
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
-const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
+const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
func (m *Route) Reset() { *m = Route{} }
func (*Route) ProtoMessage() {}
@@ -1391,10 +1391,7 @@ func (m *Route) Unmarshal(dAtA []byte) error {
if err != nil {
return err
}
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) < 0 {
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > l {
@@ -1606,10 +1603,7 @@ func (m *RouteIngress) Unmarshal(dAtA []byte) error {
if err != nil {
return err
}
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) < 0 {
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > l {
@@ -1823,10 +1817,7 @@ func (m *RouteIngressCondition) Unmarshal(dAtA []byte) error {
if err != nil {
return err
}
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) < 0 {
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > l {
@@ -1943,10 +1934,7 @@ func (m *RouteList) Unmarshal(dAtA []byte) error {
if err != nil {
return err
}
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) < 0 {
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > l {
@@ -2029,10 +2017,7 @@ func (m *RoutePort) Unmarshal(dAtA []byte) error {
if err != nil {
return err
}
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) < 0 {
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > l {
@@ -2349,10 +2334,7 @@ func (m *RouteSpec) Unmarshal(dAtA []byte) error {
if err != nil {
return err
}
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) < 0 {
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > l {
@@ -2436,10 +2418,7 @@ func (m *RouteStatus) Unmarshal(dAtA []byte) error {
if err != nil {
return err
}
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) < 0 {
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > l {
@@ -2573,10 +2552,7 @@ func (m *RouteTargetReference) Unmarshal(dAtA []byte) error {
if err != nil {
return err
}
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) < 0 {
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > l {
@@ -2690,10 +2666,7 @@ func (m *RouterShard) Unmarshal(dAtA []byte) error {
if err != nil {
return err
}
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) < 0 {
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > l {
@@ -2935,10 +2908,7 @@ func (m *TLSConfig) Unmarshal(dAtA []byte) error {
if err != nil {
return err
}
- if skippy < 0 {
- return ErrInvalidLengthGenerated
- }
- if (iNdEx + skippy) < 0 {
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > l {
@@ -2956,6 +2926,7 @@ func (m *TLSConfig) Unmarshal(dAtA []byte) error {
func skipGenerated(dAtA []byte) (n int, err error) {
l := len(dAtA)
iNdEx := 0
+ depth := 0
for iNdEx < l {
var wire uint64
for shift := uint(0); ; shift += 7 {
@@ -2987,10 +2958,8 @@ func skipGenerated(dAtA []byte) (n int, err error) {
break
}
}
- return iNdEx, nil
case 1:
iNdEx += 8
- return iNdEx, nil
case 2:
var length int
for shift := uint(0); ; shift += 7 {
@@ -3011,55 +2980,30 @@ func skipGenerated(dAtA []byte) (n int, err error) {
return 0, ErrInvalidLengthGenerated
}
iNdEx += length
- if iNdEx < 0 {
- return 0, ErrInvalidLengthGenerated
- }
- return iNdEx, nil
case 3:
- for {
- var innerWire uint64
- var start int = iNdEx
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowGenerated
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- innerWire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- innerWireType := int(innerWire & 0x7)
- if innerWireType == 4 {
- break
- }
- next, err := skipGenerated(dAtA[start:])
- if err != nil {
- return 0, err
- }
- iNdEx = start + next
- if iNdEx < 0 {
- return 0, ErrInvalidLengthGenerated
- }
- }
- return iNdEx, nil
+ depth++
case 4:
- return iNdEx, nil
+ if depth == 0 {
+ return 0, ErrUnexpectedEndOfGroupGenerated
+ }
+ depth--
case 5:
iNdEx += 4
- return iNdEx, nil
default:
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
}
+ if iNdEx < 0 {
+ return 0, ErrInvalidLengthGenerated
+ }
+ if depth == 0 {
+ return iNdEx, nil
+ }
}
- panic("unreachable")
+ return 0, io.ErrUnexpectedEOF
}
var (
- ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling")
- ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow")
+ ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling")
+ ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow")
+ ErrUnexpectedEndOfGroupGenerated = fmt.Errorf("proto: unexpected end of group")
)
diff --git a/vendor/github.com/openshift/api/route/v1/generated.proto b/vendor/github.com/openshift/api/route/v1/generated.proto
index 5ede72545ec..42031b3463c 100644
--- a/vendor/github.com/openshift/api/route/v1/generated.proto
+++ b/vendor/github.com/openshift/api/route/v1/generated.proto
@@ -1,7 +1,7 @@
// This file was autogenerated by go-to-protobuf. Do not edit it manually!
-syntax = 'proto2';
+syntax = "proto2";
package github.com.openshift.api.route.v1;
@@ -30,6 +30,14 @@ option go_package = "v1";
// return information to clients about the names and states of the route under each router.
// If a client chooses a duplicate name, for instance, the route status conditions are used
// to indicate the route cannot be chosen.
+//
+// To enable HTTP/2 ALPN on a route it requires a custom
+// (non-wildcard) certificate. This prevents connection coalescing by
+// clients, notably web browsers. We do not support HTTP/2 ALPN on
+// routes that use the default certificate because of the risk of
+// connection re-use/coalescing. Routes that do not have their own
+// custom certificate will not be HTTP/2 ALPN-enabled on either the
+// frontend or the backend.
message Route {
optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
@@ -37,6 +45,7 @@ message Route {
optional RouteSpec spec = 2;
// status is the current state of the route
+ // +optional
optional RouteStatus status = 3;
}
@@ -117,6 +126,7 @@ message RouteSpec {
// If not specified a route name will typically be automatically
// chosen.
// Must follow DNS952 subdomain conventions.
+ // +optional
optional string host = 1;
// subdomain is a DNS subdomain that is requested within the ingress controller's
@@ -181,6 +191,7 @@ message RouteTargetReference {
// weight as an integer between 0 and 256, default 100, that specifies the target's relative weight
// against other target reference objects. 0 suppresses requests to this backend.
+ // +optional
optional int32 weight = 3;
}
@@ -201,6 +212,10 @@ message RouterShard {
// TLSConfig defines config used to secure a route and provide termination
message TLSConfig {
// termination indicates termination type.
+ //
+ // * edge - TLS termination is done by the router and http is used to communicate with the backend (default)
+ // * passthrough - Traffic is sent straight to the destination without the router providing TLS termination
+ // * reencrypt - TLS termination is done by the router and https is used to communicate with the backend
optional string termination = 1;
// certificate provides certificate contents
diff --git a/vendor/github.com/openshift/api/route/v1/types.go b/vendor/github.com/openshift/api/route/v1/types.go
index 296b947abca..0931bdecc74 100644
--- a/vendor/github.com/openshift/api/route/v1/types.go
+++ b/vendor/github.com/openshift/api/route/v1/types.go
@@ -26,6 +26,14 @@ import (
// return information to clients about the names and states of the route under each router.
// If a client chooses a duplicate name, for instance, the route status conditions are used
// to indicate the route cannot be chosen.
+//
+// To enable HTTP/2 ALPN on a route it requires a custom
+// (non-wildcard) certificate. This prevents connection coalescing by
+// clients, notably web browsers. We do not support HTTP/2 ALPN on
+// routes that use the default certificate because of the risk of
+// connection re-use/coalescing. Routes that do not have their own
+// custom certificate will not be HTTP/2 ALPN-enabled on either the
+// frontend or the backend.
type Route struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
@@ -33,7 +41,8 @@ type Route struct {
// spec is the desired state of the route
Spec RouteSpec `json:"spec" protobuf:"bytes,2,opt,name=spec"`
// status is the current state of the route
- Status RouteStatus `json:"status" protobuf:"bytes,3,opt,name=status"`
+ // +optional
+ Status RouteStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
}
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
@@ -67,7 +76,8 @@ type RouteSpec struct {
// If not specified a route name will typically be automatically
// chosen.
// Must follow DNS952 subdomain conventions.
- Host string `json:"host" protobuf:"bytes,1,opt,name=host"`
+ // +optional
+ Host string `json:"host,omitempty" protobuf:"bytes,1,opt,name=host"`
// subdomain is a DNS subdomain that is requested within the ingress controller's
// domain (as a subdomain). If host is set this field is ignored. An ingress
// controller may choose to ignore this suggested name, in which case the controller
@@ -121,6 +131,7 @@ type RouteTargetReference struct {
// weight as an integer between 0 and 256, default 100, that specifies the target's relative weight
// against other target reference objects. 0 suppresses requests to this backend.
+ // +optional
Weight *int32 `json:"weight" protobuf:"varint,3,opt,name=weight"`
}
@@ -138,7 +149,7 @@ type RouteStatus struct {
// ingress describes the places where the route may be exposed. The list of
// ingress points may contain duplicate Host or RouterName values. Routes
// are considered live once they are `Ready`
- Ingress []RouteIngress `json:"ingress" protobuf:"bytes,1,rep,name=ingress"`
+ Ingress []RouteIngress `json:"ingress,omitempty" protobuf:"bytes,1,rep,name=ingress"`
}
// RouteIngress holds information about the places where a route is exposed.
@@ -201,6 +212,10 @@ type RouterShard struct {
// TLSConfig defines config used to secure a route and provide termination
type TLSConfig struct {
// termination indicates termination type.
+ //
+ // * edge - TLS termination is done by the router and http is used to communicate with the backend (default)
+ // * passthrough - Traffic is sent straight to the destination without the router providing TLS termination
+ // * reencrypt - TLS termination is done by the router and https is used to communicate with the backend
Termination TLSTerminationType `json:"termination" protobuf:"bytes,1,opt,name=termination,casttype=TLSTerminationType"`
// certificate provides certificate contents
@@ -267,3 +282,32 @@ const (
// Note that this will not match acme.test only *.acme.test
WildcardPolicySubdomain WildcardPolicyType = "Subdomain"
)
+
+// Route Annotations
+const (
+ // AllowNonDNSCompliantHostAnnotation indicates that the host name in a route
+ // configuration is not required to follow strict DNS compliance.
+ // Unless the annotation is set to true, the route host name must have
+ // at least two labels, with each label no more than 63 characters from the set of
+ // alphanumeric characters, '-' or '.', and must start and end with an alphanumeric
+ // character. A trailing dot is allowed. The total host name length must be no more
+ // than 253 characters.
+ //
+ // When the annotation is set to true, the host name must pass a smaller set of
+ // requirements, i.e.: character set as described above, and total host name
+ // length must be no more than 253 characters.
+ //
+ // NOTE: use of this annotation may validate routes that cannot be admitted and will
+ // not function. The annotation is provided to allow a custom scenario, e.g. a custom
+ // ingress controller that relies on the route API, but for some customized purpose
+ // needs to use routes with invalid hosts.
+ AllowNonDNSCompliantHostAnnotation = "route.openshift.io/allow-non-dns-compliant-host"
+)
+
+// Ingress-to-route controller
+const (
+ // IngressToRouteIngressClassControllerName is the name of the
+ // controller that translates ingresses into routes. This value is
+ // intended to be used for the spec.controller field of ingressclasses.
+ IngressToRouteIngressClassControllerName = "openshift.io/ingress-to-route"
+)
diff --git a/vendor/github.com/openshift/api/route/v1/zz_generated.swagger_doc_generated.go b/vendor/github.com/openshift/api/route/v1/zz_generated.swagger_doc_generated.go
index c0fc24b6530..83b92816b4b 100644
--- a/vendor/github.com/openshift/api/route/v1/zz_generated.swagger_doc_generated.go
+++ b/vendor/github.com/openshift/api/route/v1/zz_generated.swagger_doc_generated.go
@@ -12,7 +12,7 @@ package v1
// AUTO-GENERATED FUNCTIONS START HERE
var map_Route = map[string]string{
- "": "A route allows developers to expose services through an HTTP(S) aware load balancing and proxy layer via a public DNS entry. The route may further specify TLS options and a certificate, or specify a public CNAME that the router should also accept for HTTP and HTTPS traffic. An administrator typically configures their router to be visible outside the cluster firewall, and may also add additional security, caching, or traffic controls on the service content. Routers usually talk directly to the service endpoints.\n\nOnce a route is created, the `host` field may not be changed. Generally, routers use the oldest route with a given host when resolving conflicts.\n\nRouters are subject to additional customization and may support additional controls via the annotations field.\n\nBecause administrators may configure multiple routers, the route status field is used to return information to clients about the names and states of the route under each router. If a client chooses a duplicate name, for instance, the route status conditions are used to indicate the route cannot be chosen.",
+ "": "A route allows developers to expose services through an HTTP(S) aware load balancing and proxy layer via a public DNS entry. The route may further specify TLS options and a certificate, or specify a public CNAME that the router should also accept for HTTP and HTTPS traffic. An administrator typically configures their router to be visible outside the cluster firewall, and may also add additional security, caching, or traffic controls on the service content. Routers usually talk directly to the service endpoints.\n\nOnce a route is created, the `host` field may not be changed. Generally, routers use the oldest route with a given host when resolving conflicts.\n\nRouters are subject to additional customization and may support additional controls via the annotations field.\n\nBecause administrators may configure multiple routers, the route status field is used to return information to clients about the names and states of the route under each router. If a client chooses a duplicate name, for instance, the route status conditions are used to indicate the route cannot be chosen.\n\nTo enable HTTP/2 ALPN on a route it requires a custom (non-wildcard) certificate. This prevents connection coalescing by clients, notably web browsers. We do not support HTTP/2 ALPN on routes that use the default certificate because of the risk of connection re-use/coalescing. Routes that do not have their own custom certificate will not be HTTP/2 ALPN-enabled on either the frontend or the backend.",
"spec": "spec is the desired state of the route",
"status": "status is the current state of the route",
}
@@ -113,7 +113,7 @@ func (RouterShard) SwaggerDoc() map[string]string {
var map_TLSConfig = map[string]string{
"": "TLSConfig defines config used to secure a route and provide termination",
- "termination": "termination indicates termination type.",
+ "termination": "termination indicates termination type.\n\n* edge - TLS termination is done by the router and http is used to communicate with the backend (default) * passthrough - Traffic is sent straight to the destination without the router providing TLS termination * reencrypt - TLS termination is done by the router and https is used to communicate with the backend",
"certificate": "certificate provides certificate contents",
"key": "key provides key file contents",
"caCertificate": "caCertificate provides the cert authority certificate contents",
diff --git a/vendor/github.com/openshift/cluster-api-provider-ovirt/pkg/apis/ovirtprovider/v1beta1/register.go b/vendor/github.com/openshift/cluster-api-provider-ovirt/pkg/apis/ovirtprovider/v1beta1/register.go
index 84c7783b132..dbeebf0422a 100644
--- a/vendor/github.com/openshift/cluster-api-provider-ovirt/pkg/apis/ovirtprovider/v1beta1/register.go
+++ b/vendor/github.com/openshift/cluster-api-provider-ovirt/pkg/apis/ovirtprovider/v1beta1/register.go
@@ -31,7 +31,7 @@ import (
"k8s.io/klog"
"sigs.k8s.io/yaml"
- machinev1 "github.com/openshift/cluster-api/pkg/apis/machine/v1beta1"
+ machinev1 "github.com/openshift/machine-api-operator/pkg/apis/machine/v1beta1"
"sigs.k8s.io/controller-runtime/pkg/scheme"
)
@@ -45,7 +45,6 @@ var (
SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion}
)
-
// MachineSpecFromProviderSpec
func MachineSpecFromProviderSpec(providerSpec machinev1.ProviderSpec) (*OvirtMachineProviderSpec, error) {
if providerSpec.Value == nil {
@@ -122,4 +121,3 @@ func ProviderStatusFromRawExtension(rawExtension *runtime.RawExtension) (*OvirtM
klog.V(5).Infof("Got provider Status from raw extension: %+v", providerStatus)
return providerStatus, nil
}
-
diff --git a/vendor/github.com/openshift/cluster-api-provider-ovirt/pkg/apis/ovirtprovider/v1beta1/types.go b/vendor/github.com/openshift/cluster-api-provider-ovirt/pkg/apis/ovirtprovider/v1beta1/types.go
index df1c1f2d8e6..d75fe9058f6 100644
--- a/vendor/github.com/openshift/cluster-api-provider-ovirt/pkg/apis/ovirtprovider/v1beta1/types.go
+++ b/vendor/github.com/openshift/cluster-api-provider-ovirt/pkg/apis/ovirtprovider/v1beta1/types.go
@@ -72,6 +72,19 @@ type OvirtMachineProviderSpec struct {
// All network interfaces from the template are discarded and new ones will
// be created, unless the list is empty or nil
NetworkInterfaces []*NetworkInterface `json:"network_interfaces,omitempty"`
+
+ // VMAffinityGroup contains the name of the OpenShift cluster affinity groups
+ // It will be used to add the newly created machine to the affinity groups
+ AffinityGroupsNames []string `json:"affinity_groups_names,omitempty"`
+
+ // AutoPinningPolicy defines the policy to automatically set the CPU
+ // and NUMA including pinning to the host for the instance.
+ // One of "none, resize_and_pin"
+ AutoPinningPolicy string `json:"auto_pinning_policy,omitempty"`
+
+ // Hugepages is the size of a VM's hugepages to use in KiBs.
+ // Only 2048 and 1048576 supported.
+ Hugepages int32 `json:"hugepages,omitempty"`
}
// CPU defines the VM cpu, made of (Sockets * Cores * Threads)
diff --git a/vendor/github.com/openshift/cluster-api-provider-ovirt/pkg/apis/ovirtprovider/v1beta1/zz_generated.deepcopy.go b/vendor/github.com/openshift/cluster-api-provider-ovirt/pkg/apis/ovirtprovider/v1beta1/zz_generated.deepcopy.go
index 6b3ad9ac351..5bc835b6cc1 100644
--- a/vendor/github.com/openshift/cluster-api-provider-ovirt/pkg/apis/ovirtprovider/v1beta1/zz_generated.deepcopy.go
+++ b/vendor/github.com/openshift/cluster-api-provider-ovirt/pkg/apis/ovirtprovider/v1beta1/zz_generated.deepcopy.go
@@ -44,6 +44,21 @@ func (in *Disk) DeepCopy() *Disk {
return out
}
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *NetworkInterface) DeepCopyInto(out *NetworkInterface) {
+ *out = *in
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkInterface.
+func (in *NetworkInterface) DeepCopy() *NetworkInterface {
+ if in == nil {
+ return nil
+ }
+ out := new(NetworkInterface)
+ in.DeepCopyInto(out)
+ return out
+}
+
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *OvirtClusterProviderSpec) DeepCopyInto(out *OvirtClusterProviderSpec) {
*out = *in
@@ -146,6 +161,17 @@ func (in *OvirtMachineProviderSpec) DeepCopyInto(out *OvirtMachineProviderSpec)
*out = new(Disk)
**out = **in
}
+ if in.NetworkInterfaces != nil {
+ in, out := &in.NetworkInterfaces, &out.NetworkInterfaces
+ *out = make([]*NetworkInterface, len(*in))
+ for i := range *in {
+ if (*in)[i] != nil {
+ in, out := &(*in)[i], &(*out)[i]
+ *out = new(NetworkInterface)
+ **out = **in
+ }
+ }
+ }
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OvirtMachineProviderSpec.
diff --git a/vendor/github.com/openshift/cluster-api/pkg/apis/machine/common/consts.go b/vendor/github.com/openshift/cluster-api/pkg/apis/machine/common/consts.go
deleted file mode 100644
index dfa87062d97..00000000000
--- a/vendor/github.com/openshift/cluster-api/pkg/apis/machine/common/consts.go
+++ /dev/null
@@ -1,121 +0,0 @@
-/*
-Copyright 2018 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 common
-
-// Constants aren't automatically generated for unversioned packages.
-// Instead share the same constant for all versioned packages
-type MachineStatusError string
-
-const (
- // Represents that the combination of configuration in the MachineSpec
- // is not supported by this cluster. This is not a transient error, but
- // indicates a state that must be fixed before progress can be made.
- //
- // Example: the ProviderSpec specifies an instance type that doesn't exist,
- InvalidConfigurationMachineError MachineStatusError = "InvalidConfiguration"
-
- // This indicates that the MachineSpec has been updated in a way that
- // is not supported for reconciliation on this cluster. The spec may be
- // completely valid from a configuration standpoint, but the controller
- // does not support changing the real world state to match the new
- // spec.
- //
- // Example: the responsible controller is not capable of changing the
- // container runtime from docker to rkt.
- UnsupportedChangeMachineError MachineStatusError = "UnsupportedChange"
-
- // This generally refers to exceeding one's quota in a cloud provider,
- // or running out of physical machines in an on-premise environment.
- InsufficientResourcesMachineError MachineStatusError = "InsufficientResources"
-
- // There was an error while trying to create a Node to match this
- // Machine. This may indicate a transient problem that will be fixed
- // automatically with time, such as a service outage, or a terminal
- // error during creation that doesn't match a more specific
- // MachineStatusError value.
- //
- // Example: timeout trying to connect to GCE.
- CreateMachineError MachineStatusError = "CreateError"
-
- // There was an error while trying to update a Node that this
- // Machine represents. This may indicate a transient problem that will be
- // fixed automatically with time, such as a service outage,
- //
- // Example: error updating load balancers
- UpdateMachineError MachineStatusError = "UpdateError"
-
- // An error was encountered while trying to delete the Node that this
- // Machine represents. This could be a transient or terminal error, but
- // will only be observable if the provider's Machine controller has
- // added a finalizer to the object to more gracefully handle deletions.
- //
- // Example: cannot resolve EC2 IP address.
- DeleteMachineError MachineStatusError = "DeleteError"
-
- // This error indicates that the machine did not join the cluster
- // as a new node within the expected timeframe after instance
- // creation at the provider succeeded
- //
- // Example use case: A controller that deletes Machines which do
- // not result in a Node joining the cluster within a given timeout
- // and that are managed by a MachineSet
- JoinClusterTimeoutMachineError = "JoinClusterTimeoutError"
-)
-
-type ClusterStatusError string
-
-const (
- // InvalidConfigurationClusterError indicates that the cluster
- // configuration is invalid.
- InvalidConfigurationClusterError ClusterStatusError = "InvalidConfiguration"
-
- // UnsupportedChangeClusterError indicates that the cluster
- // spec has been updated in an unsupported way. That cannot be
- // reconciled.
- UnsupportedChangeClusterError ClusterStatusError = "UnsupportedChange"
-
- // CreateClusterError indicates that an error was encountered
- // when trying to create the cluster.
- CreateClusterError ClusterStatusError = "CreateError"
-
- // UpdateClusterError indicates that an error was encountered
- // when trying to update the cluster.
- UpdateClusterError ClusterStatusError = "UpdateError"
-
- // DeleteClusterError indicates that an error was encountered
- // when trying to delete the cluster.
- DeleteClusterError ClusterStatusError = "DeleteError"
-)
-
-type MachineSetStatusError string
-
-const (
- // Represents that the combination of configuration in the MachineTemplateSpec
- // is not supported by this cluster. This is not a transient error, but
- // indicates a state that must be fixed before progress can be made.
- //
- // Example: the ProviderSpec specifies an instance type that doesn't exist.
- InvalidConfigurationMachineSetError MachineSetStatusError = "InvalidConfiguration"
-)
-
-type MachineDeploymentStrategyType string
-
-const (
- // Replace the old MachineSet by new one using rolling update
- // i.e. gradually scale down the old MachineSet and scale up the new one.
- RollingUpdateMachineDeploymentStrategyType MachineDeploymentStrategyType = "RollingUpdate"
-)
diff --git a/vendor/github.com/openshift/cluster-api/pkg/apis/machine/common/plugins.go b/vendor/github.com/openshift/cluster-api/pkg/apis/machine/common/plugins.go
deleted file mode 100644
index 8c2083d88c0..00000000000
--- a/vendor/github.com/openshift/cluster-api/pkg/apis/machine/common/plugins.go
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
-Copyright 2018 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 common
-
-import (
- "sync"
-
- "github.com/pkg/errors"
- "k8s.io/klog"
-)
-
-var (
- providersMutex sync.Mutex
- providers = make(map[string]interface{})
-)
-
-// RegisterClusterProvisioner registers a ClusterProvisioner by name. This
-// is expected to happen during app startup.
-func RegisterClusterProvisioner(name string, provisioner interface{}) {
- providersMutex.Lock()
- defer providersMutex.Unlock()
- if _, found := providers[name]; found {
- klog.Fatalf("Cluster provisioner %q was registered twice", name)
- }
- klog.V(1).Infof("Registered cluster provisioner %q", name)
- providers[name] = provisioner
-}
-
-func ClusterProvisioner(name string) (interface{}, error) {
- providersMutex.Lock()
- defer providersMutex.Unlock()
- provisioner, found := providers[name]
- if !found {
- return nil, errors.Errorf("unable to find provisioner for %s", name)
- }
- return provisioner, nil
-}
diff --git a/vendor/github.com/openshift/cluster-api/pkg/apis/machine/v1beta1/common_types.go b/vendor/github.com/openshift/cluster-api/pkg/apis/machine/v1beta1/common_types.go
deleted file mode 100644
index 5ee990c9f21..00000000000
--- a/vendor/github.com/openshift/cluster-api/pkg/apis/machine/v1beta1/common_types.go
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
-Copyright 2018 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 v1beta1
-
-import (
- "k8s.io/apimachinery/pkg/runtime"
-)
-
-// ProviderSpec defines the configuration to use during node creation.
-type ProviderSpec struct {
-
- // No more than one of the following may be specified.
-
- // Value is an inlined, serialized representation of the resource
- // configuration. It is recommended that providers maintain their own
- // versioned API types that should be serialized/deserialized from this
- // field, akin to component config.
- // +optional
- Value *runtime.RawExtension `json:"value,omitempty"`
-}
diff --git a/vendor/github.com/openshift/cluster-api/pkg/apis/machine/v1beta1/defaults.go b/vendor/github.com/openshift/cluster-api/pkg/apis/machine/v1beta1/defaults.go
deleted file mode 100644
index 354cfa3f6ea..00000000000
--- a/vendor/github.com/openshift/cluster-api/pkg/apis/machine/v1beta1/defaults.go
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
-Copyright 2018 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 v1beta1
-
-import (
- "github.com/openshift/cluster-api/pkg/apis/machine/common"
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- "k8s.io/apimachinery/pkg/util/intstr"
-)
-
-// PopulateDefaultsMachineDeployment fills in default field values
-// Currently it is called after reading objects, but it could be called in an admission webhook also
-func PopulateDefaultsMachineDeployment(d *MachineDeployment) {
- if d.Spec.Replicas == nil {
- d.Spec.Replicas = new(int32)
- *d.Spec.Replicas = 1
- }
-
- if d.Spec.MinReadySeconds == nil {
- d.Spec.MinReadySeconds = new(int32)
- *d.Spec.MinReadySeconds = 0
- }
-
- if d.Spec.RevisionHistoryLimit == nil {
- d.Spec.RevisionHistoryLimit = new(int32)
- *d.Spec.RevisionHistoryLimit = 1
- }
-
- if d.Spec.ProgressDeadlineSeconds == nil {
- d.Spec.ProgressDeadlineSeconds = new(int32)
- *d.Spec.ProgressDeadlineSeconds = 600
- }
-
- if d.Spec.Strategy == nil {
- d.Spec.Strategy = &MachineDeploymentStrategy{}
- }
-
- if d.Spec.Strategy.Type == "" {
- d.Spec.Strategy.Type = common.RollingUpdateMachineDeploymentStrategyType
- }
-
- // Default RollingUpdate strategy only if strategy type is RollingUpdate.
- if d.Spec.Strategy.Type == common.RollingUpdateMachineDeploymentStrategyType {
- if d.Spec.Strategy.RollingUpdate == nil {
- d.Spec.Strategy.RollingUpdate = &MachineRollingUpdateDeployment{}
- }
- if d.Spec.Strategy.RollingUpdate.MaxSurge == nil {
- ios1 := intstr.FromInt(1)
- d.Spec.Strategy.RollingUpdate.MaxSurge = &ios1
- }
- if d.Spec.Strategy.RollingUpdate.MaxUnavailable == nil {
- ios0 := intstr.FromInt(0)
- d.Spec.Strategy.RollingUpdate.MaxUnavailable = &ios0
- }
- }
-
- if len(d.Namespace) == 0 {
- d.Namespace = metav1.NamespaceDefault
- }
-}
diff --git a/vendor/github.com/openshift/cluster-api/pkg/apis/machine/v1beta1/doc.go b/vendor/github.com/openshift/cluster-api/pkg/apis/machine/v1beta1/doc.go
deleted file mode 100644
index 349faed081f..00000000000
--- a/vendor/github.com/openshift/cluster-api/pkg/apis/machine/v1beta1/doc.go
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
-Copyright 2018 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 v1beta1 contains API Schema definitions for the machine v1beta1 API group
-// +k8s:openapi-gen=true
-// +k8s:deepcopy-gen=package,register
-// +k8s:conversion-gen=github.com/openshift/cluster-api/pkg/apis/machine
-// +k8s:defaulter-gen=TypeMeta
-// +groupName=machine.openshift.io
-package v1beta1
diff --git a/vendor/github.com/openshift/cluster-api/pkg/apis/machine/v1beta1/machine_types.go b/vendor/github.com/openshift/cluster-api/pkg/apis/machine/v1beta1/machine_types.go
deleted file mode 100644
index a2e94a217bd..00000000000
--- a/vendor/github.com/openshift/cluster-api/pkg/apis/machine/v1beta1/machine_types.go
+++ /dev/null
@@ -1,225 +0,0 @@
-/*
-Copyright 2018 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 v1beta1
-
-import (
- "fmt"
-
- corev1 "k8s.io/api/core/v1"
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- "k8s.io/apimachinery/pkg/runtime"
- "k8s.io/apimachinery/pkg/util/validation/field"
-
- "github.com/openshift/cluster-api/pkg/apis/machine/common"
-)
-
-const (
- // MachineFinalizer is set on PrepareForCreate callback.
- MachineFinalizer = "machine.machine.openshift.io"
-
- // MachineClusterLabelName is the label set on machines linked to a cluster.
- MachineClusterLabelName = "cluster.k8s.io/cluster-name"
-
- // MachineClusterIDLabel is the label that a machine must have to identify the
- // cluster to which it belongs.
- MachineClusterIDLabel = "machine.openshift.io/cluster-api-cluster"
-)
-
-// +genclient
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-
-/// [Machine]
-// Machine is the Schema for the machines API
-// +k8s:openapi-gen=true
-// +kubebuilder:subresource:status
-// +kubebuilder:printcolumn:name="Phase",type="string",JSONPath=".status.phase",description="Phase of machine"
-// +kubebuilder:printcolumn:name="Type",type="string",JSONPath=".metadata.labels['machine\\.openshift\\.io/instance-type']",description="Type of instance"
-// +kubebuilder:printcolumn:name="Region",type="string",JSONPath=".metadata.labels['machine\\.openshift\\.io/region']",description="Region associated with machine"
-// +kubebuilder:printcolumn:name="Zone",type="string",JSONPath=".metadata.labels['machine\\.openshift\\.io/zone']",description="Zone associated with machine"
-// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description="Machine age"
-// +kubebuilder:printcolumn:name="Node",type="string",JSONPath=".status.nodeRef.name",description="Node associated with machine",priority=1
-// +kubebuilder:printcolumn:name="ProviderID",type="string",JSONPath=".spec.providerID",description="Provider ID of machine created in cloud provider",priority=1
-// +kubebuilder:printcolumn:name="State",type="string",JSONPath=".metadata.annotations['machine\\.openshift\\.io/instance-state']",description="State of instance",priority=1
-type Machine struct {
- metav1.TypeMeta `json:",inline"`
- metav1.ObjectMeta `json:"metadata,omitempty"`
-
- Spec MachineSpec `json:"spec,omitempty"`
- Status MachineStatus `json:"status,omitempty"`
-}
-
-/// [Machine]
-
-/// [MachineSpec]
-// MachineSpec defines the desired state of Machine
-type MachineSpec struct {
- // ObjectMeta will autopopulate the Node created. Use this to
- // indicate what labels, annotations, name prefix, etc., should be used
- // when creating the Node.
- // +optional
- metav1.ObjectMeta `json:"metadata,omitempty"`
-
- // The list of the taints to be applied to the corresponding Node in additive
- // manner. This list will not overwrite any other taints added to the Node on
- // an ongoing basis by other entities. These taints should be actively reconciled
- // e.g. if you ask the machine controller to apply a taint and then manually remove
- // the taint the machine controller will put it back) but not have the machine controller
- // remove any taints
- // +optional
- Taints []corev1.Taint `json:"taints,omitempty"`
-
- // ProviderSpec details Provider-specific configuration to use during node creation.
- // +optional
- ProviderSpec ProviderSpec `json:"providerSpec"`
-
- // ProviderID is the identification ID of the machine provided by the provider.
- // This field must match the provider ID as seen on the node object corresponding to this machine.
- // This field is required by higher level consumers of cluster-api. Example use case is cluster autoscaler
- // with cluster-api as provider. Clean-up logic in the autoscaler compares machines to nodes to find out
- // machines at provider which could not get registered as Kubernetes nodes. With cluster-api as a
- // generic out-of-tree provider for autoscaler, this field is required by autoscaler to be
- // able to have a provider view of the list of machines. Another list of nodes is queried from the k8s apiserver
- // and then a comparison is done to find out unregistered machines and are marked for delete.
- // This field will be set by the actuators and consumed by higher level entities like autoscaler that will
- // be interfacing with cluster-api as generic provider.
- // +optional
- ProviderID *string `json:"providerID,omitempty"`
-}
-
-/// [MachineSpec]
-
-/// [MachineStatus]
-// MachineStatus defines the observed state of Machine
-type MachineStatus struct {
- // NodeRef will point to the corresponding Node if it exists.
- // +optional
- NodeRef *corev1.ObjectReference `json:"nodeRef,omitempty"`
-
- // LastUpdated identifies when this status was last observed.
- // +optional
- LastUpdated *metav1.Time `json:"lastUpdated,omitempty"`
-
- // ErrorReason will be set in the event that there is a terminal problem
- // reconciling the Machine and will contain a succinct value suitable
- // for machine interpretation.
- //
- // This field should not be set for transitive errors that a controller
- // faces that are expected to be fixed automatically over
- // time (like service outages), but instead indicate that something is
- // fundamentally wrong with the Machine's spec or the configuration of
- // the controller, and that manual intervention is required. Examples
- // of terminal errors would be invalid combinations of settings in the
- // spec, values that are unsupported by the controller, or the
- // responsible controller itself being critically misconfigured.
- //
- // Any transient errors that occur during the reconciliation of Machines
- // can be added as events to the Machine object and/or logged in the
- // controller's output.
- // +optional
- ErrorReason *common.MachineStatusError `json:"errorReason,omitempty"`
-
- // ErrorMessage will be set in the event that there is a terminal problem
- // reconciling the Machine and will contain a more verbose string suitable
- // for logging and human consumption.
- //
- // This field should not be set for transitive errors that a controller
- // faces that are expected to be fixed automatically over
- // time (like service outages), but instead indicate that something is
- // fundamentally wrong with the Machine's spec or the configuration of
- // the controller, and that manual intervention is required. Examples
- // of terminal errors would be invalid combinations of settings in the
- // spec, values that are unsupported by the controller, or the
- // responsible controller itself being critically misconfigured.
- //
- // Any transient errors that occur during the reconciliation of Machines
- // can be added as events to the Machine object and/or logged in the
- // controller's output.
- // +optional
- ErrorMessage *string `json:"errorMessage,omitempty"`
-
- // ProviderStatus details a Provider-specific status.
- // It is recommended that providers maintain their
- // own versioned API types that should be
- // serialized/deserialized from this field.
- // +optional
- ProviderStatus *runtime.RawExtension `json:"providerStatus,omitempty"`
-
- // Addresses is a list of addresses assigned to the machine. Queried from cloud provider, if available.
- // +optional
- Addresses []corev1.NodeAddress `json:"addresses,omitempty"`
-
- // LastOperation describes the last-operation performed by the machine-controller.
- // This API should be useful as a history in terms of the latest operation performed on the
- // specific machine. It should also convey the state of the latest-operation for example if
- // it is still on-going, failed or completed successfully.
- // +optional
- LastOperation *LastOperation `json:"lastOperation,omitempty"`
-
- // Phase represents the current phase of machine actuation.
- // E.g. Pending, Running, Terminating, Failed etc.
- // +optional
- Phase *string `json:"phase,omitempty"`
-}
-
-// LastOperation represents the detail of the last performed operation on the MachineObject.
-type LastOperation struct {
- // Description is the human-readable description of the last operation.
- Description *string `json:"description,omitempty"`
-
- // LastUpdated is the timestamp at which LastOperation API was last-updated.
- LastUpdated *metav1.Time `json:"lastUpdated,omitempty"`
-
- // State is the current status of the last performed operation.
- // E.g. Processing, Failed, Successful etc
- State *string `json:"state,omitempty"`
-
- // Type is the type of operation which was last performed.
- // E.g. Create, Delete, Update etc
- Type *string `json:"type,omitempty"`
-}
-
-/// [MachineVersionInfo]
-
-func (m *Machine) Validate() field.ErrorList {
- errors := field.ErrorList{}
-
- // validate spec.labels
- fldPath := field.NewPath("spec")
- if m.Labels[MachineClusterIDLabel] == "" {
- errors = append(errors, field.Invalid(fldPath.Child("labels"), m.Labels, fmt.Sprintf("missing %v label.", MachineClusterIDLabel)))
- }
-
- // validate provider config is set
- if m.Spec.ProviderSpec.Value == nil {
- errors = append(errors, field.Invalid(fldPath.Child("spec").Child("providerspec"), m.Spec.ProviderSpec, "value field must be set"))
- }
-
- return errors
-}
-
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-
-// MachineList contains a list of Machine
-type MachineList struct {
- metav1.TypeMeta `json:",inline"`
- metav1.ListMeta `json:"metadata,omitempty"`
- Items []Machine `json:"items"`
-}
-
-func init() {
- SchemeBuilder.Register(&Machine{}, &MachineList{})
-}
diff --git a/vendor/github.com/openshift/cluster-api/pkg/apis/machine/v1beta1/machineclass_types.go b/vendor/github.com/openshift/cluster-api/pkg/apis/machine/v1beta1/machineclass_types.go
deleted file mode 100644
index 85a1ea37d0e..00000000000
--- a/vendor/github.com/openshift/cluster-api/pkg/apis/machine/v1beta1/machineclass_types.go
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
-Copyright 2018 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 v1beta1
-
-import (
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- "k8s.io/apimachinery/pkg/runtime"
-)
-
-// +genclient
-// +genclient:noStatus
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-
-/// [MachineClass]
-// MachineClass can be used to templatize and re-use provider configuration
-// across multiple Machines / MachineSets / MachineDeployments.
-// +k8s:openapi-gen=true
-// +resource:path=machineclasses
-type MachineClass struct {
- metav1.TypeMeta `json:",inline"`
- // +optional
- metav1.ObjectMeta `json:"metadata,omitempty"`
-
- // The total capacity available on this machine type (cpu/memory/disk).
- //
- // WARNING: It is up to the creator of the MachineClass to ensure that
- // this field is consistent with the underlying machine that will
- // be provisioned when this class is used, to inform higher level
- // automation (e.g. the cluster autoscaler).
- // TODO(hardikdr) Add allocatable field once requirements are clear from autoscaler-clusterapi // integration topic.
- // Capacity corev1.ResourceList `json:"capacity"`
-
- // How much capacity is actually allocatable on this machine.
- // Must be equal to or less than the capacity, and when less
- // indicates the resources reserved for system overhead.
- //
- // WARNING: It is up to the creator of the MachineClass to ensure that
- // this field is consistent with the underlying machine that will
- // be provisioned when this class is used, to inform higher level
- // automation (e.g. the cluster autoscaler).
- // TODO(hardikdr) Add allocatable field once requirements are clear from autoscaler-clusterapi // integration topic.
- // Allocatable corev1.ResourceList `json:"allocatable"`
-
- // Provider-specific configuration to use during node creation.
- ProviderSpec runtime.RawExtension `json:"providerSpec"`
-
- // TODO: should this use an api.ObjectReference to a 'MachineTemplate' instead?
- // A link to the MachineTemplate that will be used to create provider
- // specific configuration for Machines of this class.
- // MachineTemplate corev1.ObjectReference `json:machineTemplate`
-}
-
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-
-// MachineClassList contains a list of MachineClasses
-type MachineClassList struct {
- metav1.TypeMeta `json:",inline"`
- metav1.ListMeta `json:"metadata,omitempty"`
- Items []MachineClass `json:"items"`
-}
-
-func init() {
- SchemeBuilder.Register(&MachineClass{}, &MachineClassList{})
-}
diff --git a/vendor/github.com/openshift/cluster-api/pkg/apis/machine/v1beta1/machinedeployment_types.go b/vendor/github.com/openshift/cluster-api/pkg/apis/machine/v1beta1/machinedeployment_types.go
deleted file mode 100644
index 8e892ecc07f..00000000000
--- a/vendor/github.com/openshift/cluster-api/pkg/apis/machine/v1beta1/machinedeployment_types.go
+++ /dev/null
@@ -1,194 +0,0 @@
-/*
-Copyright 2018 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 v1beta1
-
-import (
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- "k8s.io/apimachinery/pkg/util/intstr"
-
- "github.com/openshift/cluster-api/pkg/apis/machine/common"
-)
-
-/// [MachineDeploymentSpec]
-// MachineDeploymentSpec defines the desired state of MachineDeployment
-type MachineDeploymentSpec struct {
- // Number of desired machines. Defaults to 1.
- // This is a pointer to distinguish between explicit zero and not specified.
- Replicas *int32 `json:"replicas,omitempty"`
-
- // Label selector for machines. Existing MachineSets whose machines are
- // selected by this will be the ones affected by this deployment.
- // It must match the machine template's labels.
- Selector metav1.LabelSelector `json:"selector"`
-
- // Template describes the machines that will be created.
- Template MachineTemplateSpec `json:"template"`
-
- // The deployment strategy to use to replace existing machines with
- // new ones.
- // +optional
- Strategy *MachineDeploymentStrategy `json:"strategy,omitempty"`
-
- // Minimum number of seconds for which a newly created machine should
- // be ready.
- // Defaults to 0 (machine will be considered available as soon as it
- // is ready)
- // +optional
- MinReadySeconds *int32 `json:"minReadySeconds,omitempty"`
-
- // The number of old MachineSets to retain to allow rollback.
- // This is a pointer to distinguish between explicit zero and not specified.
- // Defaults to 1.
- // +optional
- RevisionHistoryLimit *int32 `json:"revisionHistoryLimit,omitempty"`
-
- // Indicates that the deployment is paused.
- // +optional
- Paused bool `json:"paused,omitempty"`
-
- // The maximum time in seconds for a deployment to make progress before it
- // is considered to be failed. The deployment controller will continue to
- // process failed deployments and a condition with a ProgressDeadlineExceeded
- // reason will be surfaced in the deployment status. Note that progress will
- // not be estimated during the time a deployment is paused. Defaults to 600s.
- ProgressDeadlineSeconds *int32 `json:"progressDeadlineSeconds,omitempty"`
-}
-
-/// [MachineDeploymentSpec]
-
-/// [MachineDeploymentStrategy]
-// MachineDeploymentStrategy describes how to replace existing machines
-// with new ones.
-type MachineDeploymentStrategy struct {
- // Type of deployment. Currently the only supported strategy is
- // "RollingUpdate".
- // Default is RollingUpdate.
- // +optional
- Type common.MachineDeploymentStrategyType `json:"type,omitempty"`
-
- // Rolling update config params. Present only if
- // MachineDeploymentStrategyType = RollingUpdate.
- // +optional
- RollingUpdate *MachineRollingUpdateDeployment `json:"rollingUpdate,omitempty"`
-}
-
-/// [MachineDeploymentStrategy]
-
-/// [MachineRollingUpdateDeployment]
-// Spec to control the desired behavior of rolling update.
-type MachineRollingUpdateDeployment struct {
- // The maximum number of machines that can be unavailable during the update.
- // Value can be an absolute number (ex: 5) or a percentage of desired
- // machines (ex: 10%).
- // Absolute number is calculated from percentage by rounding down.
- // This can not be 0 if MaxSurge is 0.
- // Defaults to 0.
- // Example: when this is set to 30%, the old MachineSet can be scaled
- // down to 70% of desired machines immediately when the rolling update
- // starts. Once new machines are ready, old MachineSet can be scaled
- // down further, followed by scaling up the new MachineSet, ensuring
- // that the total number of machines available at all times
- // during the update is at least 70% of desired machines.
- // +optional
- MaxUnavailable *intstr.IntOrString `json:"maxUnavailable,omitempty" protobuf:"bytes,1,opt,name=maxUnavailable"`
-
- // The maximum number of machines that can be scheduled above the
- // desired number of machines.
- // Value can be an absolute number (ex: 5) or a percentage of
- // desired machines (ex: 10%).
- // This can not be 0 if MaxUnavailable is 0.
- // Absolute number is calculated from percentage by rounding up.
- // Defaults to 1.
- // Example: when this is set to 30%, the new MachineSet can be scaled
- // up immediately when the rolling update starts, such that the total
- // number of old and new machines do not exceed 130% of desired
- // machines. Once old machines have been killed, new MachineSet can
- // be scaled up further, ensuring that total number of machines running
- // at any time during the update is at most 130% of desired machines.
- // +optional
- MaxSurge *intstr.IntOrString `json:"maxSurge,omitempty" protobuf:"bytes,2,opt,name=maxSurge"`
-}
-
-/// [MachineRollingUpdateDeployment]
-
-/// [MachineDeploymentStatus]
-// MachineDeploymentStatus defines the observed state of MachineDeployment
-type MachineDeploymentStatus struct {
- // The generation observed by the deployment controller.
- // +optional
- ObservedGeneration int64 `json:"observedGeneration,omitempty" protobuf:"varint,1,opt,name=observedGeneration"`
-
- // Total number of non-terminated machines targeted by this deployment
- // (their labels match the selector).
- // +optional
- Replicas int32 `json:"replicas,omitempty" protobuf:"varint,2,opt,name=replicas"`
-
- // Total number of non-terminated machines targeted by this deployment
- // that have the desired template spec.
- // +optional
- UpdatedReplicas int32 `json:"updatedReplicas,omitempty" protobuf:"varint,3,opt,name=updatedReplicas"`
-
- // Total number of ready machines targeted by this deployment.
- // +optional
- ReadyReplicas int32 `json:"readyReplicas,omitempty" protobuf:"varint,7,opt,name=readyReplicas"`
-
- // Total number of available machines (ready for at least minReadySeconds)
- // targeted by this deployment.
- // +optional
- AvailableReplicas int32 `json:"availableReplicas,omitempty" protobuf:"varint,4,opt,name=availableReplicas"`
-
- // Total number of unavailable machines targeted by this deployment.
- // This is the total number of machines that are still required for
- // the deployment to have 100% available capacity. They may either
- // be machines that are running but not yet available or machines
- // that still have not been created.
- // +optional
- UnavailableReplicas int32 `json:"unavailableReplicas,omitempty" protobuf:"varint,5,opt,name=unavailableReplicas"`
-}
-
-/// [MachineDeploymentStatus]
-
-// +genclient
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-
-/// [MachineDeployment]
-// MachineDeployment is the Schema for the machinedeployments API
-// +k8s:openapi-gen=true
-// +kubebuilder:subresource:status
-// +kubebuilder:subresource:scale:specpath=.spec.replicas,statuspath=.status.replicas,selectorpath=.status.labelSelector
-type MachineDeployment struct {
- metav1.TypeMeta `json:",inline"`
- metav1.ObjectMeta `json:"metadata,omitempty"`
-
- Spec MachineDeploymentSpec `json:"spec,omitempty"`
- Status MachineDeploymentStatus `json:"status,omitempty"`
-}
-
-/// [MachineDeployment]
-
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-
-// MachineDeploymentList contains a list of MachineDeployment
-type MachineDeploymentList struct {
- metav1.TypeMeta `json:",inline"`
- metav1.ListMeta `json:"metadata,omitempty"`
- Items []MachineDeployment `json:"items"`
-}
-
-func init() {
- SchemeBuilder.Register(&MachineDeployment{}, &MachineDeploymentList{})
-}
diff --git a/vendor/github.com/openshift/cluster-api/pkg/apis/machine/v1beta1/machineset_types.go b/vendor/github.com/openshift/cluster-api/pkg/apis/machine/v1beta1/machineset_types.go
deleted file mode 100644
index 065aa5932dc..00000000000
--- a/vendor/github.com/openshift/cluster-api/pkg/apis/machine/v1beta1/machineset_types.go
+++ /dev/null
@@ -1,227 +0,0 @@
-/*
-Copyright 2018 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 v1beta1
-
-import (
- "log"
-
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- metav1validation "k8s.io/apimachinery/pkg/apis/meta/v1/validation"
-
- "github.com/openshift/cluster-api/pkg/apis/machine/common"
- "k8s.io/apimachinery/pkg/labels"
- "k8s.io/apimachinery/pkg/util/validation/field"
-)
-
-// +genclient
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-
-/// [MachineSet]
-// MachineSet ensures that a specified number of machines replicas are running at any given time.
-// +k8s:openapi-gen=true
-// +kubebuilder:subresource:status
-// +kubebuilder:subresource:scale:specpath=.spec.replicas,statuspath=.status.replicas,selectorpath=.status.labelSelector
-// +kubebuilder:printcolumn:name="Desired",type="integer",JSONPath=".spec.replicas",description="Desired Replicas"
-// +kubebuilder:printcolumn:name="Current",type="integer",JSONPath=".status.replicas",description="Current Replicas"
-// +kubebuilder:printcolumn:name="Ready",type="integer",JSONPath=".status.readyReplicas",description="Ready Replicas"
-// +kubebuilder:printcolumn:name="Available",type="string",JSONPath=".status.availableReplicas",description="Observed number of available replicas"
-// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description="Machineset age"
-type MachineSet struct {
- metav1.TypeMeta `json:",inline"`
- metav1.ObjectMeta `json:"metadata,omitempty"`
-
- Spec MachineSetSpec `json:"spec,omitempty"`
- Status MachineSetStatus `json:"status,omitempty"`
-}
-
-/// [MachineSet]
-
-/// [MachineSetSpec]
-// MachineSetSpec defines the desired state of MachineSet
-type MachineSetSpec struct {
- // Replicas is the number of desired replicas.
- // This is a pointer to distinguish between explicit zero and unspecified.
- // Defaults to 1.
- // +optional
- Replicas *int32 `json:"replicas,omitempty"`
-
- // MinReadySeconds is the minimum number of seconds for which a newly created machine should be ready.
- // Defaults to 0 (machine will be considered available as soon as it is ready)
- // +optional
- MinReadySeconds int32 `json:"minReadySeconds,omitempty"`
-
- // DeletePolicy defines the policy used to identify nodes to delete when downscaling.
- // Defaults to "Random". Valid values are "Random, "Newest", "Oldest"
- // +kubebuilder:validation:Enum=Random;Newest;Oldest
- DeletePolicy string `json:"deletePolicy,omitempty"`
-
- // Selector is a label query over machines that should match the replica count.
- // Label keys and values that must match in order to be controlled by this MachineSet.
- // It must match the machine template's labels.
- // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
- Selector metav1.LabelSelector `json:"selector"`
-
- // Template is the object that describes the machine that will be created if
- // insufficient replicas are detected.
- // +optional
- Template MachineTemplateSpec `json:"template,omitempty"`
-}
-
-// MachineSetDeletePolicy defines how priority is assigned to nodes to delete when
-// downscaling a MachineSet. Defaults to "Random".
-type MachineSetDeletePolicy string
-
-const (
- // RandomMachineSetDeletePolicy prioritizes both Machines that have the annotation
- // "cluster.k8s.io/delete-machine=yes" and Machines that are unhealthy
- // (Status.ErrorReason or Status.ErrorMessage are set to a non-empty value).
- // Finally, it picks Machines at random to delete.
- RandomMachineSetDeletePolicy MachineSetDeletePolicy = "Random"
-
- // NewestMachineSetDeletePolicy prioritizes both Machines that have the annotation
- // "cluster.k8s.io/delete-machine=yes" and Machines that are unhealthy
- // (Status.ErrorReason or Status.ErrorMessage are set to a non-empty value).
- // It then prioritizes the newest Machines for deletion based on the Machine's CreationTimestamp.
- NewestMachineSetDeletePolicy MachineSetDeletePolicy = "Newest"
-
- // OldestMachineSetDeletePolicy prioritizes both Machines that have the annotation
- // "cluster.k8s.io/delete-machine=yes" and Machines that are unhealthy
- // (Status.ErrorReason or Status.ErrorMessage are set to a non-empty value).
- // It then prioritizes the oldest Machines for deletion based on the Machine's CreationTimestamp.
- OldestMachineSetDeletePolicy MachineSetDeletePolicy = "Oldest"
-)
-
-/// [MachineSetSpec] // doxygen marker
-
-/// [MachineTemplateSpec] // doxygen marker
-// MachineTemplateSpec describes the data needed to create a Machine from a template
-type MachineTemplateSpec struct {
- // Standard object's metadata.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
- // +optional
- metav1.ObjectMeta `json:"metadata,omitempty"`
-
- // Specification of the desired behavior of the machine.
- // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
- // +optional
- Spec MachineSpec `json:"spec,omitempty"`
-}
-
-/// [MachineTemplateSpec]
-
-/// [MachineSetStatus]
-// MachineSetStatus defines the observed state of MachineSet
-type MachineSetStatus struct {
- // Replicas is the most recently observed number of replicas.
- Replicas int32 `json:"replicas"`
-
- // The number of replicas that have labels matching the labels of the machine template of the MachineSet.
- // +optional
- FullyLabeledReplicas int32 `json:"fullyLabeledReplicas,omitempty"`
-
- // The number of ready replicas for this MachineSet. A machine is considered ready when the node has been created and is "Ready".
- // +optional
- ReadyReplicas int32 `json:"readyReplicas,omitempty"`
-
- // The number of available replicas (ready for at least minReadySeconds) for this MachineSet.
- // +optional
- AvailableReplicas int32 `json:"availableReplicas,omitempty"`
-
- // ObservedGeneration reflects the generation of the most recently observed MachineSet.
- // +optional
- ObservedGeneration int64 `json:"observedGeneration,omitempty"`
-
- // In the event that there is a terminal problem reconciling the
- // replicas, both ErrorReason and ErrorMessage will be set. ErrorReason
- // will be populated with a succinct value suitable for machine
- // interpretation, while ErrorMessage will contain a more verbose
- // string suitable for logging and human consumption.
- //
- // These fields should not be set for transitive errors that a
- // controller faces that are expected to be fixed automatically over
- // time (like service outages), but instead indicate that something is
- // fundamentally wrong with the MachineTemplate's spec or the configuration of
- // the machine controller, and that manual intervention is required. Examples
- // of terminal errors would be invalid combinations of settings in the
- // spec, values that are unsupported by the machine controller, or the
- // responsible machine controller itself being critically misconfigured.
- //
- // Any transient errors that occur during the reconciliation of Machines
- // can be added as events to the MachineSet object and/or logged in the
- // controller's output.
- // +optional
- ErrorReason *common.MachineSetStatusError `json:"errorReason,omitempty"`
- // +optional
- ErrorMessage *string `json:"errorMessage,omitempty"`
-}
-
-/// [MachineSetStatus]
-
-func (m *MachineSet) Validate() field.ErrorList {
- errors := field.ErrorList{}
-
- // validate spec.selector and spec.template.labels
- fldPath := field.NewPath("spec")
- errors = append(errors, metav1validation.ValidateLabelSelector(&m.Spec.Selector, fldPath.Child("selector"))...)
- if len(m.Spec.Selector.MatchLabels)+len(m.Spec.Selector.MatchExpressions) == 0 {
- errors = append(errors, field.Invalid(fldPath.Child("selector"), m.Spec.Selector, "empty selector is not valid for MachineSet."))
- }
- selector, err := metav1.LabelSelectorAsSelector(&m.Spec.Selector)
- if err != nil {
- errors = append(errors, field.Invalid(fldPath.Child("selector"), m.Spec.Selector, "invalid label selector."))
- } else {
- labels := labels.Set(m.Spec.Template.Labels)
- if !selector.Matches(labels) {
- errors = append(errors, field.Invalid(fldPath.Child("template", "metadata", "labels"), m.Spec.Template.Labels, "`selector` does not match template `labels`"))
- }
- }
-
- return errors
-}
-
-// DefaultingFunction sets default MachineSet field values
-func (m *MachineSet) Default() {
- log.Printf("Defaulting fields for MachineSet %s\n", m.Name)
-
- if m.Spec.Replicas == nil {
- m.Spec.Replicas = new(int32)
- *m.Spec.Replicas = 1
- }
-
- if len(m.Namespace) == 0 {
- m.Namespace = metav1.NamespaceDefault
- }
-
- if m.Spec.DeletePolicy == "" {
- randomPolicy := string(RandomMachineSetDeletePolicy)
- log.Printf("Defaulting to %s\n", randomPolicy)
- m.Spec.DeletePolicy = randomPolicy
- }
-}
-
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-
-// MachineSetList contains a list of MachineSet
-type MachineSetList struct {
- metav1.TypeMeta `json:",inline"`
- metav1.ListMeta `json:"metadata,omitempty"`
- Items []MachineSet `json:"items"`
-}
-
-func init() {
- SchemeBuilder.Register(&MachineSet{}, &MachineSetList{})
-}
diff --git a/vendor/github.com/openshift/cluster-api/pkg/apis/machine/v1beta1/register.go b/vendor/github.com/openshift/cluster-api/pkg/apis/machine/v1beta1/register.go
deleted file mode 100644
index 9c23897ab90..00000000000
--- a/vendor/github.com/openshift/cluster-api/pkg/apis/machine/v1beta1/register.go
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
-Copyright 2018 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.
-*/
-
-// NOTE: Boilerplate only. Ignore this file.
-
-// Package v1beta1 contains API Schema definitions for the machine v1beta1 API group
-// +k8s:openapi-gen=true
-// +k8s:deepcopy-gen=package,register
-// +k8s:conversion-gen=github.com/openshift/cluster-api/pkg/apis/machine
-// +k8s:defaulter-gen=TypeMeta
-// +groupName=machine.openshift.io
-package v1beta1
-
-import (
- "k8s.io/apimachinery/pkg/runtime/schema"
- "sigs.k8s.io/controller-runtime/pkg/scheme"
-)
-
-var (
- // SchemeGroupVersion is group version used to register these objects.
- SchemeGroupVersion = schema.GroupVersion{Group: "machine.openshift.io", Version: "v1beta1"}
-
- // SchemeBuilder is used to add go types to the GroupVersionKind scheme.
- SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion}
-
- // AddToScheme adds registered types to the builder.
- // Required by pkg/client/...
- // TODO(pwittrock): Remove this after removing pkg/client/...
- AddToScheme = SchemeBuilder.AddToScheme
-)
-
-// Required by pkg/client/listers/...
-// TODO(pwittrock): Remove this after removing pkg/client/...
-func Resource(resource string) schema.GroupResource {
- return SchemeGroupVersion.WithResource(resource).GroupResource()
-}
diff --git a/vendor/github.com/openshift/cluster-api/pkg/apis/machine/v1beta1/zz_generated.deepcopy.go b/vendor/github.com/openshift/cluster-api/pkg/apis/machine/v1beta1/zz_generated.deepcopy.go
deleted file mode 100644
index 7efadb3df96..00000000000
--- a/vendor/github.com/openshift/cluster-api/pkg/apis/machine/v1beta1/zz_generated.deepcopy.go
+++ /dev/null
@@ -1,585 +0,0 @@
-// +build !ignore_autogenerated
-
-/*
-Copyright 2018 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.
-*/
-
-// Code generated by main. DO NOT EDIT.
-
-package v1beta1
-
-import (
- common "github.com/openshift/cluster-api/pkg/apis/machine/common"
- v1 "k8s.io/api/core/v1"
- runtime "k8s.io/apimachinery/pkg/runtime"
- intstr "k8s.io/apimachinery/pkg/util/intstr"
-)
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *LastOperation) DeepCopyInto(out *LastOperation) {
- *out = *in
- if in.Description != nil {
- in, out := &in.Description, &out.Description
- *out = new(string)
- **out = **in
- }
- if in.LastUpdated != nil {
- in, out := &in.LastUpdated, &out.LastUpdated
- *out = (*in).DeepCopy()
- }
- if in.State != nil {
- in, out := &in.State, &out.State
- *out = new(string)
- **out = **in
- }
- if in.Type != nil {
- in, out := &in.Type, &out.Type
- *out = new(string)
- **out = **in
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LastOperation.
-func (in *LastOperation) DeepCopy() *LastOperation {
- if in == nil {
- return nil
- }
- out := new(LastOperation)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *Machine) DeepCopyInto(out *Machine) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
- in.Spec.DeepCopyInto(&out.Spec)
- in.Status.DeepCopyInto(&out.Status)
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Machine.
-func (in *Machine) DeepCopy() *Machine {
- if in == nil {
- return nil
- }
- out := new(Machine)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *Machine) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- }
- return nil
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *MachineClass) DeepCopyInto(out *MachineClass) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
- in.ProviderSpec.DeepCopyInto(&out.ProviderSpec)
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineClass.
-func (in *MachineClass) DeepCopy() *MachineClass {
- if in == nil {
- return nil
- }
- out := new(MachineClass)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *MachineClass) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- }
- return nil
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *MachineClassList) DeepCopyInto(out *MachineClassList) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- in.ListMeta.DeepCopyInto(&out.ListMeta)
- if in.Items != nil {
- in, out := &in.Items, &out.Items
- *out = make([]MachineClass, len(*in))
- for i := range *in {
- (*in)[i].DeepCopyInto(&(*out)[i])
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineClassList.
-func (in *MachineClassList) DeepCopy() *MachineClassList {
- if in == nil {
- return nil
- }
- out := new(MachineClassList)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *MachineClassList) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- }
- return nil
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *MachineDeployment) DeepCopyInto(out *MachineDeployment) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
- in.Spec.DeepCopyInto(&out.Spec)
- out.Status = in.Status
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineDeployment.
-func (in *MachineDeployment) DeepCopy() *MachineDeployment {
- if in == nil {
- return nil
- }
- out := new(MachineDeployment)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *MachineDeployment) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- }
- return nil
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *MachineDeploymentList) DeepCopyInto(out *MachineDeploymentList) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- in.ListMeta.DeepCopyInto(&out.ListMeta)
- if in.Items != nil {
- in, out := &in.Items, &out.Items
- *out = make([]MachineDeployment, len(*in))
- for i := range *in {
- (*in)[i].DeepCopyInto(&(*out)[i])
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineDeploymentList.
-func (in *MachineDeploymentList) DeepCopy() *MachineDeploymentList {
- if in == nil {
- return nil
- }
- out := new(MachineDeploymentList)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *MachineDeploymentList) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- }
- return nil
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *MachineDeploymentSpec) DeepCopyInto(out *MachineDeploymentSpec) {
- *out = *in
- if in.Replicas != nil {
- in, out := &in.Replicas, &out.Replicas
- *out = new(int32)
- **out = **in
- }
- in.Selector.DeepCopyInto(&out.Selector)
- in.Template.DeepCopyInto(&out.Template)
- if in.Strategy != nil {
- in, out := &in.Strategy, &out.Strategy
- *out = new(MachineDeploymentStrategy)
- (*in).DeepCopyInto(*out)
- }
- if in.MinReadySeconds != nil {
- in, out := &in.MinReadySeconds, &out.MinReadySeconds
- *out = new(int32)
- **out = **in
- }
- if in.RevisionHistoryLimit != nil {
- in, out := &in.RevisionHistoryLimit, &out.RevisionHistoryLimit
- *out = new(int32)
- **out = **in
- }
- if in.ProgressDeadlineSeconds != nil {
- in, out := &in.ProgressDeadlineSeconds, &out.ProgressDeadlineSeconds
- *out = new(int32)
- **out = **in
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineDeploymentSpec.
-func (in *MachineDeploymentSpec) DeepCopy() *MachineDeploymentSpec {
- if in == nil {
- return nil
- }
- out := new(MachineDeploymentSpec)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *MachineDeploymentStatus) DeepCopyInto(out *MachineDeploymentStatus) {
- *out = *in
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineDeploymentStatus.
-func (in *MachineDeploymentStatus) DeepCopy() *MachineDeploymentStatus {
- if in == nil {
- return nil
- }
- out := new(MachineDeploymentStatus)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *MachineDeploymentStrategy) DeepCopyInto(out *MachineDeploymentStrategy) {
- *out = *in
- if in.RollingUpdate != nil {
- in, out := &in.RollingUpdate, &out.RollingUpdate
- *out = new(MachineRollingUpdateDeployment)
- (*in).DeepCopyInto(*out)
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineDeploymentStrategy.
-func (in *MachineDeploymentStrategy) DeepCopy() *MachineDeploymentStrategy {
- if in == nil {
- return nil
- }
- out := new(MachineDeploymentStrategy)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *MachineList) DeepCopyInto(out *MachineList) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- in.ListMeta.DeepCopyInto(&out.ListMeta)
- if in.Items != nil {
- in, out := &in.Items, &out.Items
- *out = make([]Machine, len(*in))
- for i := range *in {
- (*in)[i].DeepCopyInto(&(*out)[i])
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineList.
-func (in *MachineList) DeepCopy() *MachineList {
- if in == nil {
- return nil
- }
- out := new(MachineList)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *MachineList) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- }
- return nil
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *MachineRollingUpdateDeployment) DeepCopyInto(out *MachineRollingUpdateDeployment) {
- *out = *in
- if in.MaxUnavailable != nil {
- in, out := &in.MaxUnavailable, &out.MaxUnavailable
- *out = new(intstr.IntOrString)
- **out = **in
- }
- if in.MaxSurge != nil {
- in, out := &in.MaxSurge, &out.MaxSurge
- *out = new(intstr.IntOrString)
- **out = **in
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineRollingUpdateDeployment.
-func (in *MachineRollingUpdateDeployment) DeepCopy() *MachineRollingUpdateDeployment {
- if in == nil {
- return nil
- }
- out := new(MachineRollingUpdateDeployment)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *MachineSet) DeepCopyInto(out *MachineSet) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
- in.Spec.DeepCopyInto(&out.Spec)
- in.Status.DeepCopyInto(&out.Status)
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineSet.
-func (in *MachineSet) DeepCopy() *MachineSet {
- if in == nil {
- return nil
- }
- out := new(MachineSet)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *MachineSet) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- }
- return nil
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *MachineSetList) DeepCopyInto(out *MachineSetList) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- in.ListMeta.DeepCopyInto(&out.ListMeta)
- if in.Items != nil {
- in, out := &in.Items, &out.Items
- *out = make([]MachineSet, len(*in))
- for i := range *in {
- (*in)[i].DeepCopyInto(&(*out)[i])
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineSetList.
-func (in *MachineSetList) DeepCopy() *MachineSetList {
- if in == nil {
- return nil
- }
- out := new(MachineSetList)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *MachineSetList) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- }
- return nil
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *MachineSetSpec) DeepCopyInto(out *MachineSetSpec) {
- *out = *in
- if in.Replicas != nil {
- in, out := &in.Replicas, &out.Replicas
- *out = new(int32)
- **out = **in
- }
- in.Selector.DeepCopyInto(&out.Selector)
- in.Template.DeepCopyInto(&out.Template)
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineSetSpec.
-func (in *MachineSetSpec) DeepCopy() *MachineSetSpec {
- if in == nil {
- return nil
- }
- out := new(MachineSetSpec)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *MachineSetStatus) DeepCopyInto(out *MachineSetStatus) {
- *out = *in
- if in.ErrorReason != nil {
- in, out := &in.ErrorReason, &out.ErrorReason
- *out = new(common.MachineSetStatusError)
- **out = **in
- }
- if in.ErrorMessage != nil {
- in, out := &in.ErrorMessage, &out.ErrorMessage
- *out = new(string)
- **out = **in
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineSetStatus.
-func (in *MachineSetStatus) DeepCopy() *MachineSetStatus {
- if in == nil {
- return nil
- }
- out := new(MachineSetStatus)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *MachineSpec) DeepCopyInto(out *MachineSpec) {
- *out = *in
- in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
- if in.Taints != nil {
- in, out := &in.Taints, &out.Taints
- *out = make([]v1.Taint, len(*in))
- for i := range *in {
- (*in)[i].DeepCopyInto(&(*out)[i])
- }
- }
- in.ProviderSpec.DeepCopyInto(&out.ProviderSpec)
- if in.ProviderID != nil {
- in, out := &in.ProviderID, &out.ProviderID
- *out = new(string)
- **out = **in
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineSpec.
-func (in *MachineSpec) DeepCopy() *MachineSpec {
- if in == nil {
- return nil
- }
- out := new(MachineSpec)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *MachineStatus) DeepCopyInto(out *MachineStatus) {
- *out = *in
- if in.NodeRef != nil {
- in, out := &in.NodeRef, &out.NodeRef
- *out = new(v1.ObjectReference)
- **out = **in
- }
- if in.LastUpdated != nil {
- in, out := &in.LastUpdated, &out.LastUpdated
- *out = (*in).DeepCopy()
- }
- if in.ErrorReason != nil {
- in, out := &in.ErrorReason, &out.ErrorReason
- *out = new(common.MachineStatusError)
- **out = **in
- }
- if in.ErrorMessage != nil {
- in, out := &in.ErrorMessage, &out.ErrorMessage
- *out = new(string)
- **out = **in
- }
- if in.ProviderStatus != nil {
- in, out := &in.ProviderStatus, &out.ProviderStatus
- *out = new(runtime.RawExtension)
- (*in).DeepCopyInto(*out)
- }
- if in.Addresses != nil {
- in, out := &in.Addresses, &out.Addresses
- *out = make([]v1.NodeAddress, len(*in))
- copy(*out, *in)
- }
- if in.LastOperation != nil {
- in, out := &in.LastOperation, &out.LastOperation
- *out = new(LastOperation)
- (*in).DeepCopyInto(*out)
- }
- if in.Phase != nil {
- in, out := &in.Phase, &out.Phase
- *out = new(string)
- **out = **in
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineStatus.
-func (in *MachineStatus) DeepCopy() *MachineStatus {
- if in == nil {
- return nil
- }
- out := new(MachineStatus)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *MachineTemplateSpec) DeepCopyInto(out *MachineTemplateSpec) {
- *out = *in
- in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
- in.Spec.DeepCopyInto(&out.Spec)
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineTemplateSpec.
-func (in *MachineTemplateSpec) DeepCopy() *MachineTemplateSpec {
- if in == nil {
- return nil
- }
- out := new(MachineTemplateSpec)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *ProviderSpec) DeepCopyInto(out *ProviderSpec) {
- *out = *in
- if in.Value != nil {
- in, out := &in.Value, &out.Value
- *out = new(runtime.RawExtension)
- (*in).DeepCopyInto(*out)
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProviderSpec.
-func (in *ProviderSpec) DeepCopy() *ProviderSpec {
- if in == nil {
- return nil
- }
- out := new(ProviderSpec)
- in.DeepCopyInto(out)
- return out
-}
diff --git a/vendor/github.com/openshift/installer/pkg/asset/installconfig/aws/basedomain.go b/vendor/github.com/openshift/installer/pkg/asset/installconfig/aws/basedomain.go
index 484c0c217f7..322b9818d43 100644
--- a/vendor/github.com/openshift/installer/pkg/asset/installconfig/aws/basedomain.go
+++ b/vendor/github.com/openshift/installer/pkg/asset/installconfig/aws/basedomain.go
@@ -5,13 +5,14 @@ import (
"sort"
"strings"
+ survey "github.com/AlecAivazis/survey/v2"
+ "github.com/AlecAivazis/survey/v2/core"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/awserr"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/route53"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
- survey "gopkg.in/AlecAivazis/survey.v1"
)
// IsForbidden returns true if and only if the input error is an HTTP
@@ -57,18 +58,22 @@ func GetBaseDomain() (string, error) {
}
var domain string
- if err := survey.AskOne(&survey.Select{
- Message: "Base Domain",
- Help: "The base domain of the cluster. All DNS records will be sub-domains of this base and will also include the cluster name.\n\nIf you don't see you intended base-domain listed, create a new public Route53 hosted zone and rerun the installer.",
- Options: publicZones,
- }, &domain, func(ans interface{}) error {
- choice := ans.(string)
- i := sort.SearchStrings(publicZones, choice)
- if i == len(publicZones) || publicZones[i] != choice {
- return errors.Errorf("invalid base domain %q", choice)
- }
- return nil
- }); err != nil {
+ if err := survey.AskOne(
+ &survey.Select{
+ Message: "Base Domain",
+ Help: "The base domain of the cluster. All DNS records will be sub-domains of this base and will also include the cluster name.\n\nIf you don't see you intended base-domain listed, create a new public Route53 hosted zone and rerun the installer.",
+ Options: publicZones,
+ },
+ &domain,
+ survey.WithValidator(func(ans interface{}) error {
+ choice := ans.(core.OptionAnswer).Value
+ i := sort.SearchStrings(publicZones, choice)
+ if i == len(publicZones) || publicZones[i] != choice {
+ return errors.Errorf("invalid base domain %q", choice)
+ }
+ return nil
+ }),
+ ); err != nil {
return "", errors.Wrap(err, "failed UserInput")
}
diff --git a/vendor/github.com/openshift/installer/pkg/asset/installconfig/aws/permissions.go b/vendor/github.com/openshift/installer/pkg/asset/installconfig/aws/permissions.go
index b6f90cb125d..492828709d7 100644
--- a/vendor/github.com/openshift/installer/pkg/asset/installconfig/aws/permissions.go
+++ b/vendor/github.com/openshift/installer/pkg/asset/installconfig/aws/permissions.go
@@ -28,14 +28,16 @@ const (
// PermissionDeleteSharedNetworking is a set of permissions required when the installer destroys resources from a shared-network cluster.
PermissionDeleteSharedNetworking PermissionGroup = "delete-shared-networking"
+
+ // PermissionDeleteSharedInstanceRole is a set of permissions required when the installer destroys resources from a
+ // cluster with user-supplied IAM roles for instances.
+ PermissionDeleteSharedInstanceRole PermissionGroup = "delete-shared-instance-role"
)
var permissions = map[PermissionGroup][]string{
// Base set of permissions required for cluster creation
PermissionCreateBase: {
// EC2 related perms
- "ec2:AllocateAddress",
- "ec2:AssociateAddress",
"ec2:AuthorizeSecurityGroupEgress",
"ec2:AuthorizeSecurityGroupIngress",
"ec2:CopyImage",
@@ -75,7 +77,6 @@ var permissions = map[PermissionGroup][]string{
"ec2:GetEbsDefaultKmsKeyId",
"ec2:ModifyInstanceAttribute",
"ec2:ModifyNetworkInterfaceAttribute",
- "ec2:ReleaseAddress",
"ec2:RevokeSecurityGroupEgress",
"ec2:RevokeSecurityGroupIngress",
"ec2:RunInstances",
@@ -176,11 +177,13 @@ var permissions = map[PermissionGroup][]string{
PermissionDeleteBase: {
"autoscaling:DescribeAutoScalingGroups",
"ec2:DeleteNetworkInterface",
+ "ec2:DeleteTags",
"ec2:DeleteVolume",
"elasticloadbalancing:DeleteTargetGroup",
"elasticloadbalancing:DescribeTargetGroups",
"iam:DeleteAccessKey",
"iam:DeleteUser",
+ "iam:ListAttachedRolePolicies",
"iam:ListInstanceProfiles",
"iam:ListRolePolicies",
"iam:ListUserPolicies",
@@ -190,7 +193,9 @@ var permissions = map[PermissionGroup][]string{
},
// Permissions required for creating network resources
PermissionCreateNetworking: {
+ "ec2:AllocateAddress",
"ec2:AssociateDhcpOptions",
+ "ec2:AssociateAddress",
"ec2:AssociateRouteTable",
"ec2:AttachInternetGateway",
"ec2:CreateDhcpOptions",
@@ -216,12 +221,17 @@ var permissions = map[PermissionGroup][]string{
"ec2:DeleteVpcEndpoints",
"ec2:DetachInternetGateway",
"ec2:DisassociateRouteTable",
+ "ec2:ReleaseAddress",
"ec2:ReplaceRouteTableAssociation",
},
// Permissions required for deleting a cluster with shared network resources
PermissionDeleteSharedNetworking: {
"tag:UnTagResources",
},
+ // Permissions required for deleting a cluster with shared instance roles
+ PermissionDeleteSharedInstanceRole: {
+ "iam:UntagRole",
+ },
}
// ValidateCreds will try to create an AWS session, and also verify that the current credentials
diff --git a/vendor/github.com/openshift/installer/pkg/asset/installconfig/aws/platform.go b/vendor/github.com/openshift/installer/pkg/asset/installconfig/aws/platform.go
index 78ffa8f3114..4a9bf8e7667 100644
--- a/vendor/github.com/openshift/installer/pkg/asset/installconfig/aws/platform.go
+++ b/vendor/github.com/openshift/installer/pkg/asset/installconfig/aws/platform.go
@@ -5,28 +5,37 @@ import (
"sort"
"strings"
+ survey "github.com/AlecAivazis/survey/v2"
+ "github.com/AlecAivazis/survey/v2/core"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
- survey "gopkg.in/AlecAivazis/survey.v1"
"github.com/openshift/installer/pkg/types/aws"
+ "github.com/openshift/installer/pkg/version"
)
// Platform collects AWS-specific configuration.
func Platform() (*aws.Platform, error) {
- regions := knownRegions()
+ architecture := version.DefaultArch()
+ regions := knownRegions(architecture)
longRegions := make([]string, 0, len(regions))
shortRegions := make([]string, 0, len(regions))
for id, location := range regions {
longRegions = append(longRegions, fmt.Sprintf("%s (%s)", id, location))
shortRegions = append(shortRegions, id)
}
- regionTransform := survey.TransformString(func(s string) string {
- return strings.SplitN(s, " ", 2)[0]
- })
+ var regionTransform survey.Transformer = func(ans interface{}) interface{} {
+ switch v := ans.(type) {
+ case core.OptionAnswer:
+ return core.OptionAnswer{Value: strings.SplitN(v.Value, " ", 2)[0], Index: v.Index}
+ case string:
+ return strings.SplitN(v, " ", 2)[0]
+ }
+ return ""
+ }
defaultRegion := "us-east-1"
- if !IsKnownRegion(defaultRegion) {
+ if !IsKnownRegion(defaultRegion, architecture) {
panic(fmt.Sprintf("installer bug: invalid default AWS region %q", defaultRegion))
}
@@ -37,7 +46,7 @@ func Platform() (*aws.Platform, error) {
defaultRegionPointer := ssn.Config.Region
if defaultRegionPointer != nil && *defaultRegionPointer != "" {
- if IsKnownRegion(*defaultRegionPointer) {
+ if IsKnownRegion(*defaultRegionPointer, architecture) {
defaultRegion = *defaultRegionPointer
} else {
logrus.Warnf("Unrecognized AWS region %q, defaulting to %s", *defaultRegionPointer, defaultRegion)
@@ -57,7 +66,7 @@ func Platform() (*aws.Platform, error) {
Options: longRegions,
},
Validate: survey.ComposeValidators(survey.Required, func(ans interface{}) error {
- choice := regionTransform(ans).(string)
+ choice := regionTransform(ans).(core.OptionAnswer).Value
i := sort.SearchStrings(shortRegions, choice)
if i == len(shortRegions) || shortRegions[i] != choice {
return errors.Errorf("invalid region %q", choice)
diff --git a/vendor/github.com/openshift/installer/pkg/asset/installconfig/aws/regions.go b/vendor/github.com/openshift/installer/pkg/asset/installconfig/aws/regions.go
index b9a866bc8dd..c00ad313a30 100644
--- a/vendor/github.com/openshift/installer/pkg/asset/installconfig/aws/regions.go
+++ b/vendor/github.com/openshift/installer/pkg/asset/installconfig/aws/regions.go
@@ -5,13 +5,17 @@ import (
"k8s.io/apimachinery/pkg/util/sets"
"github.com/openshift/installer/pkg/rhcos"
+ "github.com/openshift/installer/pkg/types"
)
// knownRegions is a list of AWS regions that the installer recognizes.
// This is subset of AWS regions and the regions where RHEL CoreOS images are published.
// The result is a map of region identifier to region description
-func knownRegions() map[string]string {
- required := sets.NewString(rhcos.AMIRegions...)
+func knownRegions(architecture types.Architecture) map[string]string {
+ required := sets.NewString(rhcos.AMIRegionsX86_64...)
+ if architecture == types.ArchitectureARM64 {
+ required = sets.NewString(rhcos.AMIRegionsAARCH64...)
+ }
regions := make(map[string]string)
for _, partition := range endpoints.DefaultPartitions() {
@@ -27,8 +31,8 @@ func knownRegions() map[string]string {
// IsKnownRegion return true is a specified region is Known to the installer.
// A known region is subset of AWS regions and the regions where RHEL CoreOS images are published.
-func IsKnownRegion(region string) bool {
- if _, ok := knownRegions()[region]; ok {
+func IsKnownRegion(region string, architecture types.Architecture) bool {
+ if _, ok := knownRegions(architecture)[region]; ok {
return true
}
return false
diff --git a/vendor/github.com/openshift/installer/pkg/asset/installconfig/aws/session.go b/vendor/github.com/openshift/installer/pkg/asset/installconfig/aws/session.go
index 299f2144200..92a94a09da8 100644
--- a/vendor/github.com/openshift/installer/pkg/asset/installconfig/aws/session.go
+++ b/vendor/github.com/openshift/installer/pkg/asset/installconfig/aws/session.go
@@ -1,11 +1,15 @@
package aws
import (
+ "fmt"
"os"
"path/filepath"
+ "strings"
"sync"
+ survey "github.com/AlecAivazis/survey/v2"
"github.com/aws/aws-sdk-go/aws"
+ "github.com/aws/aws-sdk-go/aws/awserr"
"github.com/aws/aws-sdk-go/aws/credentials"
"github.com/aws/aws-sdk-go/aws/defaults"
"github.com/aws/aws-sdk-go/aws/endpoints"
@@ -13,22 +17,17 @@ import (
"github.com/aws/aws-sdk-go/aws/session"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
- survey "gopkg.in/AlecAivazis/survey.v1"
ini "gopkg.in/ini.v1"
typesaws "github.com/openshift/installer/pkg/types/aws"
"github.com/openshift/installer/pkg/version"
)
-const (
- sharedCredentialsProviderName = "SharedCredentialsProvider"
- envProviderName = "EnvProvider"
-)
-
var (
onceLoggers = map[string]*sync.Once{
- sharedCredentialsProviderName: new(sync.Once),
- envProviderName: new(sync.Once),
+ credentials.SharedCredsProviderName: new(sync.Once),
+ credentials.EnvProviderName: new(sync.Once),
+ "credentialsFromSession": new(sync.Once),
}
)
@@ -60,48 +59,111 @@ func GetSession() (*session.Session, error) { return GetSessionWithOptions() }
// and, if no creds are found, asks for them and stores them on disk in a config file
func GetSessionWithOptions(optFuncs ...SessionOptions) (*session.Session, error) {
options := session.Options{
+ Config: aws.Config{MaxRetries: aws.Int(0)},
SharedConfigState: session.SharedConfigEnable,
}
for _, optFunc := range optFuncs {
optFunc(&options)
}
+ _, err := getCredentials(options)
+ if err != nil && errCodeEquals(err, "NoCredentialProviders") {
+ if err = getUserCredentials(); err != nil {
+ return nil, err
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+
ssn := session.Must(session.NewSessionWithOptions(options))
+ ssn = ssn.Copy(&aws.Config{MaxRetries: aws.Int(25)})
+ ssn.Handlers.Build.PushBackNamed(request.NamedHandler{
+ Name: "openshiftInstaller.OpenshiftInstallerUserAgentHandler",
+ Fn: request.MakeAddToUserAgentHandler("OpenShift/4.x Installer", version.Raw),
+ })
+ return ssn, nil
+}
+func getCredentials(options session.Options) (*credentials.Credentials, error) {
sharedCredentialsProvider := &credentials.SharedCredentialsProvider{}
- ssn.Config.Credentials = credentials.NewChainCredentials([]credentials.Provider{
+ providers := []credentials.Provider{
&credentials.EnvProvider{},
sharedCredentialsProvider,
- })
+ }
- creds, err := ssn.Config.Credentials.Get()
- if err == nil {
- switch creds.ProviderName {
- case sharedCredentialsProviderName:
- onceLoggers[sharedCredentialsProviderName].Do(func() {
- logrus.Infof("Credentials loaded from the %q profile in file %q", sharedCredentialsProvider.Profile, sharedCredentialsProvider.Filename)
- })
- case envProviderName:
- onceLoggers[envProviderName].Do(func() {
- logrus.Info("Credentials loaded from default AWS environment variables")
- })
- }
+ creds := credentials.NewChainCredentials(providers)
+ credsValue, err := creds.Get()
+ if err != nil && errCodeEquals(err, "NoCredentialProviders") {
+ // getCredentialsFromSession returns credentials derived from a session. A
+ // session uses the AWS SDK Go chain of providers so may use a provider (e.g.,
+ // STS) which provides temporary credentials.
+ return getCredentialsFromSession(options)
}
- if err == credentials.ErrNoValidProvidersFoundInChain {
- err = getCredentials()
- if err != nil {
- return nil, err
+ if err != nil {
+ return nil, errors.Wrap(err, "error loading credentials for AWS Provider")
+ }
+
+ // log the source of credential provider.
+ switch credsValue.ProviderName {
+ case credentials.SharedCredsProviderName:
+ onceLoggers[credentials.SharedCredsProviderName].Do(func() {
+ logrus.Infof("Credentials loaded from the %q profile in file %q", sharedCredentialsProvider.Profile, sharedCredentialsProvider.Filename)
+ })
+ case credentials.EnvProviderName:
+ onceLoggers[credentials.EnvProviderName].Do(func() {
+ logrus.Info("Credentials loaded from default AWS environment variables")
+ })
+ }
+ return creds, nil
+}
+
+func getCredentialsFromSession(options session.Options) (*credentials.Credentials, error) {
+ sess, err := session.NewSessionWithOptions(options)
+ if err != nil {
+ if errCodeEquals(err, "NoCredentialProviders") {
+ return nil, errors.Wrap(err, "failed to get credentials from session")
}
+ return nil, errors.Wrap(err, "error creating AWS session")
}
- ssn = ssn.Copy(&aws.Config{MaxRetries: aws.Int(25)})
- ssn.Handlers.Build.PushBackNamed(request.NamedHandler{
- Name: "openshiftInstaller.OpenshiftInstallerUserAgentHandler",
- Fn: request.MakeAddToUserAgentHandler("OpenShift/4.x Installer", version.Raw),
+ creds := sess.Config.Credentials
+
+ credsValue, err := sess.Config.Credentials.Get()
+ if err != nil {
+ return nil, err
+ }
+ onceLoggers["credentialsFromSession"].Do(func() {
+ logrus.Infof("Credentials loaded from the AWS config using %q provider", credsValue.ProviderName)
})
- return ssn, nil
+
+ return creds, nil
+}
+
+// IsStaticCredentials returns whether the credentials value provider are
+// static credentials safe for installer to transfer to cluster for use as-is.
+func IsStaticCredentials(credsValue credentials.Value) bool {
+ switch credsValue.ProviderName {
+ case credentials.EnvProviderName, credentials.StaticProviderName, credentials.SharedCredsProviderName, session.EnvProviderName:
+ return credsValue.SessionToken == ""
+ }
+ if strings.HasPrefix(credsValue.ProviderName, "SharedConfigCredentials") {
+ return credsValue.SessionToken == ""
+ }
+ return false
}
-func getCredentials() error {
+// errCodeEquals returns true if the error matches all these conditions:
+// * err is of type awserr.Error
+// * Error.Code() equals code
+func errCodeEquals(err error, code string) bool {
+ var awsErr awserr.Error
+ if errors.As(err, &awsErr) {
+ return awsErr.Code() == code
+ }
+ return false
+}
+
+func getUserCredentials() error {
var keyID string
err := survey.Ask([]*survey.Question{
{
@@ -129,6 +191,9 @@ func getCredentials() error {
}
path := defaults.SharedCredentialsFilename()
+ if env := os.Getenv("AWS_SHARED_CREDENTIALS_FILE"); env != "" {
+ path = env
+ }
logrus.Infof("Writing AWS credentials to %q (https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-files.html)", path)
err = os.MkdirAll(filepath.Dir(path), 0700)
if err != nil {
@@ -137,12 +202,11 @@ func getCredentials() error {
creds, err := ini.Load(path)
if err != nil {
- if os.IsNotExist(err) {
- creds = ini.Empty()
- creds.Section("").Comment = "https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-files.html"
- } else {
- return err
+ if !os.IsNotExist(err) {
+ return errors.Wrap(err, fmt.Sprintf("failed to load credentials file %s", path))
}
+ creds = ini.Empty()
+ creds.Section("").Comment = "https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-files.html"
}
profile := os.Getenv("AWS_PROFILE")
diff --git a/vendor/github.com/openshift/installer/pkg/asset/installconfig/aws/validation.go b/vendor/github.com/openshift/installer/pkg/asset/installconfig/aws/validation.go
index 0e7af45a079..1d9a6d82bfd 100644
--- a/vendor/github.com/openshift/installer/pkg/asset/installconfig/aws/validation.go
+++ b/vendor/github.com/openshift/installer/pkg/asset/installconfig/aws/validation.go
@@ -4,16 +4,23 @@ import (
"context"
"fmt"
"net"
+ "net/url"
"sort"
+ "strings"
+ "github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/endpoints"
+ "github.com/aws/aws-sdk-go/aws/session"
+ "github.com/aws/aws-sdk-go/service/route53"
"github.com/pkg/errors"
utilerrors "k8s.io/apimachinery/pkg/util/errors"
"k8s.io/apimachinery/pkg/util/sets"
"k8s.io/apimachinery/pkg/util/validation/field"
+ "github.com/openshift/installer/pkg/rhcos"
"github.com/openshift/installer/pkg/types"
awstypes "github.com/openshift/installer/pkg/types/aws"
+ awsvalidation "github.com/openshift/installer/pkg/types/aws/validation"
)
type resourceRequirements struct {
@@ -38,6 +45,7 @@ func Validate(ctx context.Context, meta *Metadata, config *types.InstallConfig)
if config.Platform.AWS == nil {
return errors.New(field.Required(field.NewPath("platform", "aws"), "AWS validation requires an AWS platform configuration").Error())
}
+ allErrs = append(allErrs, validateAMI(ctx, config)...)
allErrs = append(allErrs, validatePlatform(ctx, meta, field.NewPath("platform", "aws"), config.Platform.AWS, config.Networking, config.Publish)...)
if config.ControlPlane != nil && config.ControlPlane.Platform.AWS != nil {
@@ -55,22 +63,78 @@ func Validate(ctx context.Context, meta *Metadata, config *types.InstallConfig)
func validatePlatform(ctx context.Context, meta *Metadata, fldPath *field.Path, platform *awstypes.Platform, networking *types.Networking, publish types.PublishingStrategy) field.ErrorList {
allErrs := field.ErrorList{}
- if !isAWSSDKRegion(platform.Region) && platform.AMIID == "" {
- allErrs = append(allErrs, field.Required(fldPath.Child("amiID"), "AMI must be provided"))
+ allErrs = append(allErrs, validateServiceEndpoints(fldPath.Child("serviceEndpoints"), platform.Region, platform.ServiceEndpoints)...)
+
+ // Fail fast when service endpoints are invalid to avoid long timeouts.
+ if len(allErrs) > 0 {
+ return allErrs
}
if len(platform.Subnets) > 0 {
allErrs = append(allErrs, validateSubnets(ctx, meta, fldPath.Child("subnets"), platform.Subnets, networking, publish)...)
}
- if err := validateServiceEndpoints(fldPath.Child("serviceEndpoints"), platform.Region, platform.ServiceEndpoints); err != nil {
- allErrs = append(allErrs, field.Invalid(fldPath.Child("serviceEndpoints"), platform.ServiceEndpoints, err.Error()))
- }
if platform.DefaultMachinePlatform != nil {
allErrs = append(allErrs, validateMachinePool(ctx, meta, fldPath.Child("defaultMachinePlatform"), platform, platform.DefaultMachinePlatform, controlPlaneReq)...)
}
return allErrs
}
+func validateAMI(ctx context.Context, config *types.InstallConfig) field.ErrorList {
+ // accept AMI from the rhcos stream metadata
+ switch config.ControlPlane.Architecture {
+ case types.ArchitectureAMD64:
+ if sets.NewString(rhcos.AMIRegionsX86_64...).Has(config.Platform.AWS.Region) {
+ return nil
+ }
+ case types.ArchitectureARM64:
+ if sets.NewString(rhcos.AMIRegionsAARCH64...).Has(config.Platform.AWS.Region) {
+ return nil
+ }
+ default:
+ return field.ErrorList{field.NotSupported(field.NewPath("controlPlane", "architecture"), config.ControlPlane.Architecture, awsvalidation.ValidArchitectureValues)}
+ }
+
+ // accept AMI specified at the platform level
+ if config.Platform.AWS.AMIID != "" {
+ return nil
+ }
+
+ // accept AMI specified for the default machine platform
+ if config.Platform.AWS.DefaultMachinePlatform != nil {
+ if config.Platform.AWS.DefaultMachinePlatform.AMIID != "" {
+ return nil
+ }
+ }
+
+ // accept AMIs specified specifically for each machine pool
+ controlPlaneHasAMISpecified := false
+ if config.ControlPlane != nil && config.ControlPlane.Platform.AWS != nil {
+ controlPlaneHasAMISpecified = config.ControlPlane.Platform.AWS.AMIID != ""
+ }
+ computesHaveAMISpecified := true
+ for _, c := range config.Compute {
+ if c.Replicas != nil && *c.Replicas == 0 {
+ continue
+ }
+ if c.Platform.AWS == nil || c.Platform.AWS.AMIID == "" {
+ computesHaveAMISpecified = false
+ }
+ }
+ if controlPlaneHasAMISpecified && computesHaveAMISpecified {
+ return nil
+ }
+
+ // accept AMI that can be copied from us-east-1 if the region is in the standard AWS partition
+ if partition, partitionFound := endpoints.PartitionForRegion(endpoints.DefaultPartitions(), config.Platform.AWS.Region); partitionFound {
+ if partition.ID() == endpoints.AwsPartitionID {
+ return nil
+ }
+ }
+
+ // fail validation since we do not have an AMI to use
+ return field.ErrorList{field.Required(field.NewPath("platform", "aws", "amiID"), "AMI must be provided")}
+}
+
func validateSubnets(ctx context.Context, meta *Metadata, fldPath *field.Path, subnets []string, networking *types.Networking, publish types.PublishingStrategy) field.ErrorList {
allErrs := field.ErrorList{}
privateSubnets, err := meta.PrivateSubnets(ctx)
@@ -210,9 +274,32 @@ func validateDuplicateSubnetZones(fldPath *field.Path, subnets map[string]Subnet
return allErrs
}
-func validateServiceEndpoints(fldPath *field.Path, region string, services []awstypes.ServiceEndpoint) error {
- if isAWSSDKRegion(region) {
- return nil
+func validateServiceEndpoints(fldPath *field.Path, region string, services []awstypes.ServiceEndpoint) field.ErrorList {
+ allErrs := field.ErrorList{}
+ // For each provided service endpoint, verify we can resolve and connect with net.Dial.
+ for id, service := range services {
+ // Ignore e2e.local from unit tests.
+ if service.URL == "e2e.local" {
+ continue
+ }
+ URL, err := url.Parse(service.URL)
+ if err != nil {
+ allErrs = append(allErrs, field.Invalid(fldPath.Index(id).Child("url"), service.URL, err.Error()))
+ continue
+ }
+ port := URL.Port()
+ if port == "" {
+ port = "https"
+ }
+ conn, err := net.Dial("tcp", net.JoinHostPort(URL.Hostname(), port))
+ if err != nil {
+ allErrs = append(allErrs, field.Invalid(fldPath.Index(id).Child("url"), service.URL, err.Error()))
+ continue
+ }
+ conn.Close()
+ }
+ if _, partitionFound := endpoints.PartitionForRegion(endpoints.DefaultPartitions(), region); partitionFound {
+ return allErrs
}
resolver := newAWSResolver(region, services)
@@ -223,18 +310,11 @@ func validateServiceEndpoints(fldPath *field.Path, region string, services []aws
errs = append(errs, errors.Wrapf(err, "failed to find endpoint for service %q", service))
}
}
- return utilerrors.NewAggregate(errs)
-}
-
-func isAWSSDKRegion(region string) bool {
- for _, partition := range endpoints.DefaultPartitions() {
- for _, partitionRegion := range partition.Regions() {
- if region == partitionRegion.ID() {
- return true
- }
- }
+ if err := utilerrors.NewAggregate(errs); err != nil {
+ allErrs = append(allErrs, field.Invalid(fldPath, services, err.Error()))
}
- return false
+
+ return allErrs
}
var requiredServices = []string{
@@ -246,3 +326,101 @@ var requiredServices = []string{
"sts",
"tagging",
}
+
+// ValidateForProvisioning validates if the install config is valid for provisioning the cluster.
+func ValidateForProvisioning(session *session.Session, ic *types.InstallConfig, metadata *Metadata) error {
+ allErrs := field.ErrorList{}
+ allErrs = append(allErrs, validateExistingHostedZone(session, ic, metadata)...)
+ return allErrs.ToAggregate()
+}
+
+func validateExistingHostedZone(session *session.Session, ic *types.InstallConfig, metadata *Metadata) field.ErrorList {
+ if ic.AWS.HostedZone == "" {
+ return nil
+ }
+
+ // validate that the hosted zone exists
+ hostedZonePath := field.NewPath("aws", "hostedZone")
+ client := route53.New(session)
+ zone, err := client.GetHostedZone(&route53.GetHostedZoneInput{Id: aws.String(ic.AWS.HostedZone)})
+ if err != nil {
+ return field.ErrorList{
+ field.Invalid(hostedZonePath, ic.AWS.HostedZone, "cannot find hosted zone"),
+ }
+ }
+
+ allErrs := field.ErrorList{}
+
+ // validate that the hosted zone is associated with the VPC containing the existing subnets for the cluster
+ vpcID, err := metadata.VPC(context.TODO())
+ if err == nil {
+ if !isHostedZoneAssociatedWithVPC(zone, vpcID) {
+ allErrs = append(allErrs, field.Invalid(hostedZonePath, ic.AWS.HostedZone, "hosted zone is not associated with the VPC"))
+ }
+ } else {
+ allErrs = append(allErrs, field.Invalid(hostedZonePath, ic.AWS.HostedZone, "no VPC found"))
+ }
+
+ dottedClusterDomain := ic.ClusterDomain() + "."
+
+ // validate that the domain of the hosted zone is the cluster domain or a parent of the cluster domain
+ if !isHostedZoneDomainParentOfClusterDomain(zone.HostedZone, dottedClusterDomain) {
+ allErrs = append(allErrs, field.Invalid(hostedZonePath, ic.AWS.HostedZone,
+ fmt.Sprintf("hosted zone domain %q is not a parent of the cluster domain %q", *zone.HostedZone.Name, dottedClusterDomain)))
+ }
+
+ // validate that the hosted zone does not already have any record sets for the cluster domain
+ var problematicRecords []string
+ if err := client.ListResourceRecordSetsPages(
+ &route53.ListResourceRecordSetsInput{HostedZoneId: zone.HostedZone.Id},
+ func(out *route53.ListResourceRecordSetsOutput, lastPage bool) bool {
+ for _, recordSet := range out.ResourceRecordSets {
+ name := aws.StringValue(recordSet.Name)
+ // skip record sets that are not sub-domains of the cluster domain. Such record sets may exist for
+ // hosted zones that are used for other clusters or other purposes.
+ if !strings.HasSuffix(name, dottedClusterDomain) {
+ continue
+ }
+ // skip record sets that are the cluster domain. Record sets for the cluster domain are fine. If the
+ // hosted zone has the name of the cluster domain, then there will be NS and SOA record sets for the
+ // cluster domain.
+ if len(name) == len(dottedClusterDomain) {
+ continue
+ }
+ problematicRecords = append(problematicRecords, fmt.Sprintf("%s (%s)", name, aws.StringValue(recordSet.Type)))
+ }
+ return !lastPage
+ },
+ ); err != nil {
+ allErrs = append(allErrs, field.InternalError(hostedZonePath,
+ errors.Wrapf(err, "could not list record sets for hosted zone %q", ic.AWS.HostedZone)))
+ }
+ if len(problematicRecords) > 0 {
+ detail := fmt.Sprintf(
+ "hosted zone already has record sets for the domain of the cluster: [%s]",
+ strings.Join(problematicRecords, ", "),
+ )
+ allErrs = append(allErrs, field.Invalid(hostedZonePath, ic.AWS.HostedZone, detail))
+ }
+
+ return allErrs
+}
+
+func isHostedZoneAssociatedWithVPC(hostedZone *route53.GetHostedZoneOutput, vpcID string) bool {
+ if vpcID == "" {
+ return false
+ }
+ for _, vpc := range hostedZone.VPCs {
+ if aws.StringValue(vpc.VPCId) == vpcID {
+ return true
+ }
+ }
+ return false
+}
+
+func isHostedZoneDomainParentOfClusterDomain(hostedZone *route53.HostedZone, dottedClusterDomain string) bool {
+ if *hostedZone.Name == dottedClusterDomain {
+ return true
+ }
+ return strings.HasSuffix(dottedClusterDomain, "."+*hostedZone.Name)
+}
diff --git a/vendor/github.com/openshift/installer/pkg/asset/installconfig/azure/azure.go b/vendor/github.com/openshift/installer/pkg/asset/installconfig/azure/azure.go
index be33b4e9c0c..0af690468d7 100644
--- a/vendor/github.com/openshift/installer/pkg/asset/installconfig/azure/azure.go
+++ b/vendor/github.com/openshift/installer/pkg/asset/installconfig/azure/azure.go
@@ -6,12 +6,12 @@ import (
"sort"
"strings"
+ survey "github.com/AlecAivazis/survey/v2"
+ "github.com/AlecAivazis/survey/v2/core"
"github.com/Azure/go-autorest/autorest/to"
+ "github.com/pkg/errors"
"github.com/openshift/installer/pkg/types/azure"
-
- "github.com/pkg/errors"
- survey "gopkg.in/AlecAivazis/survey.v1"
)
const (
@@ -22,7 +22,7 @@ const (
func Platform() (*azure.Platform, error) {
// Create client using public cloud because install config has not been generated yet.
const cloudName = azure.PublicCloud
- ssn, err := GetSession(cloudName)
+ ssn, err := GetSession(cloudName, "")
if err != nil {
return nil, err
}
@@ -51,9 +51,15 @@ func Platform() (*azure.Platform, error) {
}
}
- regionTransform := survey.TransformString(func(s string) string {
- return strings.SplitN(s, " ", 2)[0]
- })
+ var regionTransform survey.Transformer = func(ans interface{}) interface{} {
+ switch v := ans.(type) {
+ case core.OptionAnswer:
+ return core.OptionAnswer{Value: strings.SplitN(v.Value, " ", 2)[0], Index: v.Index}
+ case string:
+ return strings.SplitN(v, " ", 2)[0]
+ }
+ return ""
+ }
_, ok := regions[defaultRegion]
if !ok {
@@ -73,7 +79,7 @@ func Platform() (*azure.Platform, error) {
Options: longRegions,
},
Validate: survey.ComposeValidators(survey.Required, func(ans interface{}) error {
- choice := regionTransform(ans).(string)
+ choice := regionTransform(ans).(core.OptionAnswer).Value
i := sort.SearchStrings(shortRegions, choice)
if i == len(shortRegions) || shortRegions[i] != choice {
return errors.Errorf("invalid region %q", choice)
diff --git a/vendor/github.com/openshift/installer/pkg/asset/installconfig/azure/client.go b/vendor/github.com/openshift/installer/pkg/asset/installconfig/azure/client.go
index 281c4607b62..fd752d97904 100644
--- a/vendor/github.com/openshift/installer/pkg/asset/installconfig/azure/client.go
+++ b/vendor/github.com/openshift/installer/pkg/asset/installconfig/azure/client.go
@@ -5,10 +5,10 @@ import (
"strings"
"time"
- azsku "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute"
- aznetwork "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network"
- azres "github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-05-01/resources"
- azsubs "github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-06-01/subscriptions"
+ azsku "github.com/Azure/azure-sdk-for-go/profiles/2018-03-01/compute/mgmt/compute"
+ aznetwork "github.com/Azure/azure-sdk-for-go/profiles/2018-03-01/network/mgmt/network"
+ azres "github.com/Azure/azure-sdk-for-go/profiles/2018-03-01/resources/mgmt/resources"
+ azsubs "github.com/Azure/azure-sdk-for-go/profiles/2018-03-01/resources/mgmt/subscriptions"
"github.com/Azure/go-autorest/autorest/to"
"github.com/pkg/errors"
)
diff --git a/vendor/github.com/openshift/installer/pkg/asset/installconfig/azure/dns.go b/vendor/github.com/openshift/installer/pkg/asset/installconfig/azure/dns.go
index e3bc16f6a52..73fcbbd7be8 100644
--- a/vendor/github.com/openshift/installer/pkg/asset/installconfig/azure/dns.go
+++ b/vendor/github.com/openshift/installer/pkg/asset/installconfig/azure/dns.go
@@ -5,10 +5,10 @@ import (
"fmt"
"time"
- azdns "github.com/Azure/azure-sdk-for-go/profiles/latest/dns/mgmt/dns"
+ survey "github.com/AlecAivazis/survey/v2"
+ azdns "github.com/Azure/azure-sdk-for-go/profiles/2018-03-01/dns/mgmt/dns"
"github.com/Azure/go-autorest/autorest/to"
"github.com/pkg/errors"
- survey "gopkg.in/AlecAivazis/survey.v1"
)
//DNSConfig exposes functions to choose the DNS settings
diff --git a/vendor/github.com/openshift/installer/pkg/asset/installconfig/azure/metadata.go b/vendor/github.com/openshift/installer/pkg/asset/installconfig/azure/metadata.go
index ec9e47fa417..a553ec0b5b8 100644
--- a/vendor/github.com/openshift/installer/pkg/asset/installconfig/azure/metadata.go
+++ b/vendor/github.com/openshift/installer/pkg/asset/installconfig/azure/metadata.go
@@ -19,12 +19,34 @@ type Metadata struct {
// CloudName indicates the Azure cloud environment (e.g. public, gov't).
CloudName typesazure.CloudEnvironment `json:"cloudName,omitempty"`
+ // ARMEndpoint indicates the resource management API endpoint used by AzureStack.
+ ARMEndpoint string `json:"armEndpoint,omitempty"`
+
+ // Credentials hold prepopulated Azure credentials.
+ // At the moment the installer doesn't use it and reads credentials
+ // from the file system, but external consumers of the package can
+ // provide credentials. This is useful when we run the installer
+ // as a service (Azure Red Hat OpenShift, for example): in this case
+ // we do not want to rely on the filesystem or user input as we
+ // serve multiple users with different credentials via a web server.
+ Credentials *Credentials `json:"credentials,omitempty"`
+
mutex sync.Mutex
}
// NewMetadata initializes a new Metadata object.
-func NewMetadata(cloudName typesazure.CloudEnvironment) *Metadata {
- return &Metadata{CloudName: cloudName}
+func NewMetadata(cloudName typesazure.CloudEnvironment, armEndpoint string) *Metadata {
+ return NewMetadataWithCredentials(cloudName, armEndpoint, nil)
+}
+
+// NewMetadataWithCredentials initializes a new Metadata object
+// with prepopulated Azure credentials.
+func NewMetadataWithCredentials(cloudName typesazure.CloudEnvironment, armEndpoint string, credentials *Credentials) *Metadata {
+ return &Metadata{
+ CloudName: cloudName,
+ ARMEndpoint: armEndpoint,
+ Credentials: credentials,
+ }
}
// Session holds an Azure session which can be used for Azure API calls
@@ -39,7 +61,7 @@ func (m *Metadata) Session() (*Session, error) {
func (m *Metadata) unlockedSession() (*Session, error) {
if m.session == nil {
var err error
- m.session, err = GetSession(m.CloudName)
+ m.session, err = GetSessionWithCredentials(m.CloudName, m.ARMEndpoint, m.Credentials)
if err != nil {
return nil, errors.Wrap(err, "creating Azure session")
}
diff --git a/vendor/github.com/openshift/installer/pkg/asset/installconfig/azure/session.go b/vendor/github.com/openshift/installer/pkg/asset/installconfig/azure/session.go
index 4673abb63b1..0a1d6d2b8ff 100644
--- a/vendor/github.com/openshift/installer/pkg/asset/installconfig/azure/session.go
+++ b/vendor/github.com/openshift/installer/pkg/asset/installconfig/azure/session.go
@@ -7,12 +7,12 @@ import (
"path/filepath"
"sync"
+ "github.com/AlecAivazis/survey/v2"
"github.com/Azure/go-autorest/autorest"
azureenv "github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/azure/auth"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
- "gopkg.in/AlecAivazis/survey.v1"
"github.com/openshift/installer/pkg/types/azure"
)
@@ -42,23 +42,48 @@ type Credentials struct {
// GetSession returns an azure session by using credentials found in ~/.azure/osServicePrincipal.json
// and, if no creds are found, asks for them and stores them on disk in a config file
-func GetSession(cloudName azure.CloudEnvironment) (*Session, error) {
- authFile := defaultAuthFilePath
- if f := os.Getenv(azureAuthEnv); len(f) > 0 {
- authFile = f
+func GetSession(cloudName azure.CloudEnvironment, armEndpoint string) (*Session, error) {
+ return GetSessionWithCredentials(cloudName, armEndpoint, nil)
+}
+
+// GetSessionWithCredentials returns an Azure session by using prepopulated credentials.
+// If there are no prepopulated credentials it falls back to reading credentials from file system
+// or from user input.
+func GetSessionWithCredentials(cloudName azure.CloudEnvironment, armEndpoint string, credentials *Credentials) (*Session, error) {
+ var cloudEnv azureenv.Environment
+ var err error
+ switch cloudName {
+ case azure.StackCloud:
+ cloudEnv, err = azureenv.EnvironmentFromURL(armEndpoint)
+ default:
+ cloudEnv, err = azureenv.EnvironmentFromName(string(cloudName))
+ }
+ if err != nil {
+ return nil, errors.Wrapf(err, "failed to get Azure environment for the %q cloud", cloudName)
}
- return newSessionFromFile(authFile, cloudName)
+
+ if credentials == nil {
+ credentials, err = credentialsFromFileOrUser(&cloudEnv)
+ if err != nil {
+ return nil, err
+ }
+ }
+
+ return newSessionFromCredentials(cloudEnv, credentials)
}
-func newSessionFromFile(authFilePath string, cloudName azure.CloudEnvironment) (*Session, error) {
+// credentialsFromFileOrUser returns credentials found
+// in ~/.azure/osServicePrincipal.json and, if no creds are found,
+// asks for them and stores them on disk in a config file
+func credentialsFromFileOrUser(cloudEnv *azureenv.Environment) (*Credentials, error) {
+ authFilePath := defaultAuthFilePath
+ if f := os.Getenv(azureAuthEnv); len(f) > 0 {
+ authFilePath = f
+ }
// NewAuthorizerFromFileWithResource uses `auth.GetSettingsFromFile`, which uses the `azureAuthEnv` to fetch the auth credentials.
// therefore setting the local env here to authFilePath allows NewAuthorizerFromFileWithResource to load credentials.
os.Setenv(azureAuthEnv, authFilePath)
- env, err := azureenv.EnvironmentFromName(string(cloudName))
- if err != nil {
- return nil, errors.Wrapf(err, "failed to get Azure environment for the %q cloud", cloudName)
- }
- _, err = auth.NewAuthorizerFromFileWithResource(env.ResourceManagerEndpoint)
+ _, err := auth.NewAuthorizerFromFileWithResource(cloudEnv.ResourceManagerEndpoint)
if err != nil {
logrus.Debug("Could not get an azure authorizer from file. Asking user to provide authentication info")
credentials, err := askForCredentials()
@@ -77,8 +102,6 @@ func newSessionFromFile(authFilePath string, cloudName azure.CloudEnvironment) (
return nil, errors.Wrap(err, "failed to get settings from file")
}
- authSettings.Values[auth.ActiveDirectoryEndpoint] = env.ActiveDirectoryEndpoint
-
credentials, err := getCredentials(authSettings)
if err != nil {
return nil, errors.Wrap(err, "failed to map authsettings to credentials")
@@ -91,22 +114,7 @@ func newSessionFromFile(authFilePath string, cloudName azure.CloudEnvironment) (
logrus.Infof("Credentials loaded from file %q", authFilePath)
})
- authorizer, err := authSettings.ClientCredentialsAuthorizerWithResource(env.ResourceManagerEndpoint)
- if err != nil {
- return nil, errors.Wrap(err, "failed to get client credentials authorizer from saved azure auth settings")
- }
-
- graphAuthorizer, err := authSettings.ClientCredentialsAuthorizerWithResource(env.GraphEndpoint)
- if err != nil {
- return nil, errors.Wrap(err, "failed to get GraphEndpoint authorizer from saved azure auth settings")
- }
-
- return &Session{
- GraphAuthorizer: graphAuthorizer,
- Authorizer: authorizer,
- Credentials: *credentials,
- Environment: env,
- }, nil
+ return credentials, nil
}
func getCredentials(fs auth.FileSettings) (*Credentials, error) {
@@ -196,6 +204,10 @@ func askForCredentials() (*Credentials, error) {
func saveCredentials(credentials Credentials, filePath string) error {
jsonCreds, err := json.Marshal(credentials)
+ if err != nil {
+ return err
+ }
+
err = os.MkdirAll(filepath.Dir(filePath), 0700)
if err != nil {
return err
@@ -203,3 +215,29 @@ func saveCredentials(credentials Credentials, filePath string) error {
return ioutil.WriteFile(filePath, jsonCreds, 0600)
}
+
+func newSessionFromCredentials(cloudEnv azureenv.Environment, credentials *Credentials) (*Session, error) {
+ c := &auth.ClientCredentialsConfig{
+ TenantID: credentials.TenantID,
+ ClientID: credentials.ClientID,
+ ClientSecret: credentials.ClientSecret,
+ AADEndpoint: cloudEnv.ActiveDirectoryEndpoint,
+ }
+ c.Resource = cloudEnv.TokenAudience
+ authorizer, err := c.Authorizer()
+ if err != nil {
+ return nil, errors.Wrap(err, "failed to get client credentials authorizer")
+ }
+
+ c.Resource = cloudEnv.GraphEndpoint
+ graphAuthorizer, err := c.Authorizer()
+ if err != nil {
+ return nil, errors.Wrap(err, "failed to get GraphEndpoint authorizer")
+ }
+ return &Session{
+ GraphAuthorizer: graphAuthorizer,
+ Authorizer: authorizer,
+ Credentials: *credentials,
+ Environment: cloudEnv,
+ }, nil
+}
diff --git a/vendor/github.com/openshift/installer/pkg/asset/installconfig/azure/validation.go b/vendor/github.com/openshift/installer/pkg/asset/installconfig/azure/validation.go
index e42bf732564..337c4900213 100644
--- a/vendor/github.com/openshift/installer/pkg/asset/installconfig/azure/validation.go
+++ b/vendor/github.com/openshift/installer/pkg/asset/installconfig/azure/validation.go
@@ -8,14 +8,15 @@ import (
"strconv"
"strings"
- azdns "github.com/Azure/azure-sdk-for-go/profiles/latest/dns/mgmt/dns"
- aznetwork "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-12-01/network"
+ azdns "github.com/Azure/azure-sdk-for-go/profiles/2018-03-01/dns/mgmt/dns"
+ aznetwork "github.com/Azure/azure-sdk-for-go/profiles/2018-03-01/network/mgmt/network"
"github.com/Azure/go-autorest/autorest/to"
"github.com/pkg/errors"
"k8s.io/apimachinery/pkg/util/validation/field"
"github.com/openshift/installer/pkg/types"
aztypes "github.com/openshift/installer/pkg/types/azure"
+ "github.com/openshift/installer/pkg/types/azure/defaults"
)
type resourceRequirements struct {
@@ -44,7 +45,7 @@ func Validate(client API, ic *types.InstallConfig) error {
}
// ValidateInstanceType ensures the instance type has sufficient Vcpu and Memory.
-func ValidateInstanceType(client API, fieldPath *field.Path, region, instanceType string, req resourceRequirements) field.ErrorList {
+func ValidateInstanceType(client API, fieldPath *field.Path, region, instanceType string, diskType string, req resourceRequirements) field.ErrorList {
allErrs := field.ErrorList{}
typeMeta, err := client.GetVirtualMachineSku(context.TODO(), instanceType, region)
@@ -77,6 +78,11 @@ func ValidateInstanceType(client API, fieldPath *field.Path, region, instanceTyp
errMsg := fmt.Sprintf("instance type does not meet minimum resource requirements of %d GB Memory", req.minimumMemory)
allErrs = append(allErrs, field.Invalid(fieldPath.Child("type"), instanceType, errMsg))
}
+ } else if diskType == "Premium_LRS" && strings.EqualFold(*capability.Name, "PremiumIO") {
+ if strings.EqualFold(*capability.Value, "False") {
+ errMsg := fmt.Sprintf("PremiumIO not supported for instance type %s", instanceType)
+ allErrs = append(allErrs, field.Invalid(fieldPath.Child("osDisk", "diskType"), diskType, errMsg))
+ }
}
}
@@ -87,25 +93,49 @@ func ValidateInstanceType(client API, fieldPath *field.Path, region, instanceTyp
func validateInstanceTypes(client API, ic *types.InstallConfig) field.ErrorList {
allErrs := field.ErrorList{}
- // Default requirements need to be sufficient to support Control Plane instances.
- defaultInstanceReq := controlPlaneReq
-
- if ic.ControlPlane != nil && ic.ControlPlane.Platform.Azure != nil && ic.ControlPlane.Platform.Azure.InstanceType != "" {
- // Default requirements can be relaxed when the controlPlane type is set explicitly.
- defaultInstanceReq = computeReq
+ defaultDiskType := aztypes.DefaultDiskType
+ defaultInstanceType := ""
- allErrs = append(allErrs, ValidateInstanceType(client, field.NewPath("controlPlane", "platform", "azure"), ic.Azure.Region, ic.ControlPlane.Platform.Azure.InstanceType, controlPlaneReq)...)
+ if ic.Platform.Azure.DefaultMachinePlatform != nil && ic.Platform.Azure.DefaultMachinePlatform.OSDisk.DiskType != "" {
+ defaultDiskType = ic.Platform.Azure.DefaultMachinePlatform.OSDisk.DiskType
}
-
if ic.Platform.Azure.DefaultMachinePlatform != nil && ic.Platform.Azure.DefaultMachinePlatform.InstanceType != "" {
- allErrs = append(allErrs, ValidateInstanceType(client, field.NewPath("platform", "azure", "defaultMachinePlatform"), ic.Azure.Region, ic.Platform.Azure.DefaultMachinePlatform.InstanceType, defaultInstanceReq)...)
+ defaultInstanceType = ic.Platform.Azure.DefaultMachinePlatform.InstanceType
+ }
+
+ if ic.ControlPlane != nil && ic.ControlPlane.Platform.Azure != nil {
+ diskType := ic.ControlPlane.Platform.Azure.OSDisk.DiskType
+ instanceType := ic.ControlPlane.Platform.Azure.InstanceType
+
+ if diskType == "" {
+ diskType = defaultDiskType
+ }
+ if instanceType == "" {
+ instanceType = defaultInstanceType
+ }
+ if instanceType == "" {
+ instanceType = defaults.ControlPlaneInstanceType(ic.Azure.CloudName, ic.Azure.Region)
+ }
+ allErrs = append(allErrs, ValidateInstanceType(client, field.NewPath("controlPlane", "platform", "azure"), ic.Azure.Region, instanceType, diskType, controlPlaneReq)...)
}
for idx, compute := range ic.Compute {
fieldPath := field.NewPath("compute").Index(idx)
- if compute.Platform.Azure != nil && compute.Platform.Azure.InstanceType != "" {
+ if compute.Platform.Azure != nil {
+ diskType := compute.Platform.Azure.OSDisk.DiskType
+ instanceType := compute.Platform.Azure.InstanceType
+
+ if diskType == "" {
+ diskType = defaultDiskType
+ }
+ if instanceType == "" {
+ instanceType = defaultInstanceType
+ }
+ if instanceType == "" {
+ instanceType = defaults.ComputeInstanceType(ic.Azure.CloudName, ic.Azure.Region)
+ }
allErrs = append(allErrs, ValidateInstanceType(client, fieldPath.Child("platform", "azure"),
- ic.Azure.Region, compute.Platform.Azure.InstanceType, computeReq)...)
+ ic.Azure.Region, instanceType, diskType, computeReq)...)
}
}
diff --git a/vendor/github.com/openshift/installer/pkg/asset/installconfig/gcp/dns.go b/vendor/github.com/openshift/installer/pkg/asset/installconfig/gcp/dns.go
index 19e1c14b9a6..ce40f49b790 100644
--- a/vendor/github.com/openshift/installer/pkg/asset/installconfig/gcp/dns.go
+++ b/vendor/github.com/openshift/installer/pkg/asset/installconfig/gcp/dns.go
@@ -5,10 +5,11 @@ import (
"sort"
"time"
+ survey "github.com/AlecAivazis/survey/v2"
+ "github.com/AlecAivazis/survey/v2/core"
"github.com/pkg/errors"
dns "google.golang.org/api/dns/v1"
"google.golang.org/api/googleapi"
- survey "gopkg.in/AlecAivazis/survey.v1"
)
// GetPublicZone returns a DNS managed zone from the provided project which matches the baseDomain
@@ -47,18 +48,22 @@ func GetBaseDomain(project string) (string, error) {
sort.Strings(publicZones)
var domain string
- if err := survey.AskOne(&survey.Select{
- Message: "Base Domain",
- Help: "The base domain of the cluster. All DNS records will be sub-domains of this base and will also include the cluster name.\n\nIf you don't see you intended base-domain listed, create a new public hosted zone and rerun the installer.",
- Options: publicZones,
- }, &domain, func(ans interface{}) error {
- choice := ans.(string)
- i := sort.SearchStrings(publicZones, choice)
- if i == len(publicZones) || publicZones[i] != choice {
- return errors.Errorf("invalid base domain %q", choice)
- }
- return nil
- }); err != nil {
+ if err := survey.AskOne(
+ &survey.Select{
+ Message: "Base Domain",
+ Help: "The base domain of the cluster. All DNS records will be sub-domains of this base and will also include the cluster name.\n\nIf you don't see you intended base-domain listed, create a new public hosted zone and rerun the installer.",
+ Options: publicZones,
+ },
+ &domain,
+ survey.WithValidator(func(ans interface{}) error {
+ choice := ans.(core.OptionAnswer).Value
+ i := sort.SearchStrings(publicZones, choice)
+ if i == len(publicZones) || publicZones[i] != choice {
+ return errors.Errorf("invalid base domain %q", choice)
+ }
+ return nil
+ }),
+ ); err != nil {
return "", errors.Wrap(err, "failed UserInput")
}
diff --git a/vendor/github.com/openshift/installer/pkg/asset/installconfig/gcp/gcp.go b/vendor/github.com/openshift/installer/pkg/asset/installconfig/gcp/gcp.go
index d7c8407c4c4..24c07559c48 100644
--- a/vendor/github.com/openshift/installer/pkg/asset/installconfig/gcp/gcp.go
+++ b/vendor/github.com/openshift/installer/pkg/asset/installconfig/gcp/gcp.go
@@ -7,11 +7,12 @@ import (
"strings"
"time"
- "gopkg.in/AlecAivazis/survey.v1"
+ "github.com/AlecAivazis/survey/v2"
+ "github.com/AlecAivazis/survey/v2/core"
+ "github.com/pkg/errors"
"github.com/openshift/installer/pkg/types/gcp"
"github.com/openshift/installer/pkg/types/gcp/validation"
- "github.com/pkg/errors"
)
// Platform collects GCP-specific configuration.
@@ -88,9 +89,15 @@ func selectRegion(project string) (string, error) {
longRegions = append(longRegions, fmt.Sprintf("%s (%s)", id, location))
shortRegions = append(shortRegions, id)
}
- regionTransform := survey.TransformString(func(s string) string {
- return strings.SplitN(s, " ", 2)[0]
- })
+ var regionTransform survey.Transformer = func(ans interface{}) interface{} {
+ switch v := ans.(type) {
+ case core.OptionAnswer:
+ return core.OptionAnswer{Value: strings.SplitN(v.Value, " ", 2)[0], Index: v.Index}
+ case string:
+ return strings.SplitN(v, " ", 2)[0]
+ }
+ return ""
+ }
sort.Strings(longRegions)
sort.Strings(shortRegions)
@@ -106,7 +113,7 @@ func selectRegion(project string) (string, error) {
Options: longRegions,
},
Validate: survey.ComposeValidators(survey.Required, func(ans interface{}) error {
- choice := regionTransform(ans).(string)
+ choice := regionTransform(ans).(core.OptionAnswer).Value
i := sort.SearchStrings(shortRegions, choice)
if i == len(shortRegions) || shortRegions[i] != choice {
return errors.Errorf("invalid region %q", choice)
diff --git a/vendor/github.com/openshift/installer/pkg/asset/installconfig/gcp/session.go b/vendor/github.com/openshift/installer/pkg/asset/installconfig/gcp/session.go
index 7ea0c8c2723..38585edc45e 100644
--- a/vendor/github.com/openshift/installer/pkg/asset/installconfig/gcp/session.go
+++ b/vendor/github.com/openshift/installer/pkg/asset/installconfig/gcp/session.go
@@ -9,11 +9,11 @@ import (
"strings"
"sync"
+ "github.com/AlecAivazis/survey/v2"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
googleoauth "golang.org/x/oauth2/google"
compute "google.golang.org/api/compute/v1"
- "gopkg.in/AlecAivazis/survey.v1"
)
var (
diff --git a/vendor/github.com/openshift/installer/pkg/asset/installconfig/gcp/validation.go b/vendor/github.com/openshift/installer/pkg/asset/installconfig/gcp/validation.go
index 080b25747cb..c0986731fed 100644
--- a/vendor/github.com/openshift/installer/pkg/asset/installconfig/gcp/validation.go
+++ b/vendor/github.com/openshift/installer/pkg/asset/installconfig/gcp/validation.go
@@ -15,6 +15,7 @@ import (
"k8s.io/apimachinery/pkg/util/validation/field"
"github.com/openshift/installer/pkg/types"
+ "github.com/openshift/installer/pkg/validate"
)
type resourceRequirements struct {
@@ -36,6 +37,10 @@ var computeReq = resourceRequirements{
func Validate(client API, ic *types.InstallConfig) error {
allErrs := field.ErrorList{}
+ if err := validate.GCPClusterName(ic.ObjectMeta.Name); err != nil {
+ allErrs = append(allErrs, field.Invalid(field.NewPath("clusterName"), ic.ObjectMeta.Name, err.Error()))
+ }
+
allErrs = append(allErrs, validateProject(client, ic, field.NewPath("platform").Child("gcp"))...)
allErrs = append(allErrs, validateNetworks(client, ic, field.NewPath("platform").Child("gcp"))...)
allErrs = append(allErrs, validateInstanceTypes(client, ic)...)
diff --git a/vendor/github.com/openshift/installer/pkg/asset/installconfig/ovirt/client.go b/vendor/github.com/openshift/installer/pkg/asset/installconfig/ovirt/client.go
index 37cac010be6..1da3fa07b83 100644
--- a/vendor/github.com/openshift/installer/pkg/asset/installconfig/ovirt/client.go
+++ b/vendor/github.com/openshift/installer/pkg/asset/installconfig/ovirt/client.go
@@ -69,3 +69,30 @@ func FetchVNICProfileByClusterNetwork(con *ovirtsdk.Connection, clusterID string
}
return nil, fmt.Errorf("there are no vNic profiles for the given cluster ID %s and network name %s", clusterID, networkName)
}
+
+// GetClusterName returns the name of the ovirt cluster with the specified Cluster ID
+func GetClusterName(con *ovirtsdk.Connection, clusterID string) (string, error) {
+ clusterResponse, err := con.SystemService().ClustersService().ClusterService(clusterID).Get().Send()
+ if err != nil {
+ return "", fmt.Errorf("failed to fetch cluster %s (%w)", clusterID, err)
+ }
+ cluster, ok := clusterResponse.Cluster()
+ if !ok {
+ return "", fmt.Errorf("failed to find cluster with id %s", clusterID)
+ }
+ return cluster.MustName(), nil
+}
+
+// FindHostsInCluster returns a list of the hosts that exists in the specified cluster
+func FindHostsInCluster(con *ovirtsdk.Connection, cName string) ([]*ovirtsdk.Host, error) {
+ res, err := con.SystemService().HostsService().
+ List().Search(fmt.Sprintf("cluster=%s", cName)).Send()
+ if err != nil {
+ return nil, fmt.Errorf("failed to fetch hosts for cluster %s (%w)", cName, err)
+ }
+ hosts, ok := res.Hosts()
+ if !ok {
+ return nil, fmt.Errorf("failed to find hosts in cluster %s", cName)
+ }
+ return hosts.Slice(), nil
+}
diff --git a/vendor/github.com/openshift/installer/pkg/asset/installconfig/ovirt/cluster.go b/vendor/github.com/openshift/installer/pkg/asset/installconfig/ovirt/cluster.go
index e8918d8d2bb..128657c9887 100644
--- a/vendor/github.com/openshift/installer/pkg/asset/installconfig/ovirt/cluster.go
+++ b/vendor/github.com/openshift/installer/pkg/asset/installconfig/ovirt/cluster.go
@@ -4,10 +4,11 @@ import (
"fmt"
"sort"
+ "github.com/AlecAivazis/survey/v2"
+ "github.com/AlecAivazis/survey/v2/core"
ovirtsdk4 "github.com/ovirt/go-ovirt"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
- "gopkg.in/AlecAivazis/survey.v1"
"github.com/openshift/installer/pkg/types/ovirt"
)
@@ -38,14 +39,15 @@ func askCluster(c *ovirtsdk4.Connection, p *ovirt.Platform) (string, error) {
clusterNames = append(clusterNames, cluster.MustName())
}
}
- if err := survey.AskOne(&survey.Select{
- Message: "Cluster",
- Help: "The Cluster where the VMs will be created.",
- Options: clusterNames,
- },
+ if err := survey.AskOne(
+ &survey.Select{
+ Message: "Cluster",
+ Help: "The Cluster where the VMs will be created.",
+ Options: clusterNames,
+ },
&clusterName,
- func(ans interface{}) error {
- choice := ans.(string)
+ survey.WithValidator(func(ans interface{}) error {
+ choice := ans.(core.OptionAnswer).Value
sort.Strings(clusterNames)
i := sort.SearchStrings(clusterNames, choice)
if i == len(clusterNames) || clusterNames[i] != choice {
@@ -57,7 +59,8 @@ func askCluster(c *ovirtsdk4.Connection, p *ovirt.Platform) (string, error) {
}
p.ClusterID = cl.MustId()
return nil
- }); err != nil {
+ }),
+ ); err != nil {
return clusterName, errors.Wrap(err, "failed UserInput")
}
return clusterName, nil
diff --git a/vendor/github.com/openshift/installer/pkg/asset/installconfig/ovirt/credentials.go b/vendor/github.com/openshift/installer/pkg/asset/installconfig/ovirt/credentials.go
index c95ecc8ceb5..23296f12d97 100644
--- a/vendor/github.com/openshift/installer/pkg/asset/installconfig/ovirt/credentials.go
+++ b/vendor/github.com/openshift/installer/pkg/asset/installconfig/ovirt/credentials.go
@@ -12,9 +12,9 @@ import (
"strconv"
"strings"
+ "github.com/AlecAivazis/survey/v2"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
- "gopkg.in/AlecAivazis/survey.v1"
)
var errHTTPNotFound = errors.New("http response 404")
@@ -108,37 +108,27 @@ func (c *clientHTTP) checkURLResponse() error {
return nil
}
-// askPassword will ask the password to connect to Engine API.
+// askPassword will ask the password to connect to the Engine API.
// The password provided will be added in the Config struct.
// If an error happens, it will ask again username for users.
func askPassword(c *Config) error {
- origPwdTpl := survey.PasswordQuestionTemplate
- survey.PasswordQuestionTemplate = `
-{{- if .ShowHelp }}{{- color "cyan"}}{{ HelpIcon }} {{ .Help }}{{color "reset"}}{{"\n"}}{{end}}
-{{- color "green+hb"}}{{ QuestionIcon }} {{color "reset"}}
-{{- color "default+hb"}}{{ .Message }} {{color "reset"}}
-{{- if and .Help (not .ShowHelp)}}{{color "cyan"}}[Press Ctrl+C to switch username, {{ HelpInputRune }} for help]{{color "reset"}} {{end}}`
-
err := survey.Ask([]*survey.Question{
{
Prompt: &survey.Password{
Message: "Engine password",
- Help: "Password for the choosen username",
+ Help: "Password for the chosen username, Press Ctrl+C to change username",
},
Validate: survey.ComposeValidators(survey.Required, authenticated(c)),
},
}, &c.Password)
- survey.PasswordQuestionTemplate = origPwdTpl
-
if err != nil {
return err
}
-
return nil
}
-// askUsername will ask username to connect to Engine API.
+// askUsername will ask username to connect to the Engine API.
// The username provided will be added in the Config struct.
// Returns Config and error if failure.
func askUsername(c *Config) error {
@@ -146,7 +136,7 @@ func askUsername(c *Config) error {
{
Prompt: &survey.Input{
Message: "Engine username",
- Help: "The username to connect to Engine API",
+ Help: "The username to connect to the Engine API",
Default: "admin@internal",
},
Validate: survey.ComposeValidators(survey.Required),
@@ -168,7 +158,9 @@ func askQuestionTrueOrFalse(question string, helpMessage string) (bool, error) {
Message: question,
Help: helpMessage,
},
- &value, survey.Required)
+ &value,
+ survey.WithValidator(survey.Required),
+ )
if err != nil {
return value, err
}
@@ -219,6 +211,7 @@ func showPEM(pemFilePath string) error {
cert, err := x509.ParseCertificate(block.Bytes)
if err != nil {
+ logrus.Debugf("Failed to read the cert: %s", err)
return errors.Wrapf(err, "failed to read the cert: %s", pemFilePath)
}
@@ -241,12 +234,14 @@ func showPEM(pemFilePath string) error {
// or in case of failure returns error
func askPEMFile() (string, error) {
bundlePEM := ""
- err := survey.AskOne(&survey.Multiline{
- Message: "Certificate bundle",
- Help: "The certificate bundle to installer be able to communicate with oVirt API",
- },
+ err := survey.AskOne(
+ &survey.Multiline{
+ Message: "Certificate bundle",
+ Help: "The certificate bundle to installer be able to communicate with oVirt API",
+ },
&bundlePEM,
- survey.ComposeValidators(survey.Required))
+ survey.WithValidator(survey.Required),
+ )
if err != nil {
return bundlePEM, err
}
@@ -326,8 +321,8 @@ func engineSetup() (Config, error) {
engineConfig.Insecure = true
} else {
answer, err := askQuestionTrueOrFalse(
- "Would you like to use the above certificate to connect to Engine? ",
- "Certificate to connecto with Engine. Make sure this cert CA is trusted locally.")
+ "Would you like to use the above certificate to connect to the Engine? ",
+ "Certificate to connect to the Engine. Make sure this cert CA is trusted locally.")
if err != nil {
return engineConfig, err
}
@@ -343,7 +338,7 @@ func engineSetup() (Config, error) {
} else {
answer, err = askQuestionTrueOrFalse(
"Would you like to import another PEM bundle?",
- "Users are able to use it's own PEM bundle to connect to Engine API")
+ "You can use your own PEM bundle to connect to the Engine API")
if err != nil {
return engineConfig, err
}
diff --git a/vendor/github.com/openshift/installer/pkg/asset/installconfig/ovirt/network.go b/vendor/github.com/openshift/installer/pkg/asset/installconfig/ovirt/network.go
index 491fed111c6..ae9ce3cb893 100644
--- a/vendor/github.com/openshift/installer/pkg/asset/installconfig/ovirt/network.go
+++ b/vendor/github.com/openshift/installer/pkg/asset/installconfig/ovirt/network.go
@@ -4,9 +4,10 @@ import (
"fmt"
"sort"
+ "github.com/AlecAivazis/survey/v2"
+ "github.com/AlecAivazis/survey/v2/core"
ovirtsdk4 "github.com/ovirt/go-ovirt"
"github.com/pkg/errors"
- "gopkg.in/AlecAivazis/survey.v1"
"github.com/openshift/installer/pkg/types/ovirt"
)
@@ -29,14 +30,15 @@ func askNetwork(c *ovirtsdk4.Connection, p *ovirt.Platform) error {
networkByNames[network.MustName()] = network
networkNames = append(networkNames, network.MustName())
}
- if err := survey.AskOne(&survey.Select{
- Message: "Network",
- Help: "The Engine network of the deployed VMs. 'ovirtmgmt' is the default network. It is recommended to use a dedicated network for each OpenShift cluster.",
- Options: networkNames,
- },
+ if err := survey.AskOne(
+ &survey.Select{
+ Message: "Network",
+ Help: "The Engine network of the deployed VMs. 'ovirtmgmt' is the default network. It is recommended to use a dedicated network for each OpenShift cluster.",
+ Options: networkNames,
+ },
&networkName,
- func(ans interface{}) error {
- choice := ans.(string)
+ survey.WithValidator(func(ans interface{}) error {
+ choice := ans.(core.OptionAnswer).Value
sort.Strings(networkNames)
i := sort.SearchStrings(networkNames, choice)
if i == len(networkNames) || networkNames[i] != choice {
@@ -48,7 +50,8 @@ func askNetwork(c *ovirtsdk4.Connection, p *ovirt.Platform) error {
}
p.NetworkName = network.MustName()
return nil
- }); err != nil {
+ }),
+ ); err != nil {
return errors.Wrap(err, "failed UserInput")
}
return nil
@@ -74,14 +77,15 @@ func askVNICProfileID(c *ovirtsdk4.Connection, p *ovirt.Platform) error {
}
// we have multiple vnic profile for the selected network
- if err := survey.AskOne(&survey.Select{
- Message: "VNIC Profile",
- Help: "The Engine VNIC profile of the VMs.",
- Options: profileNames,
- },
+ if err := survey.AskOne(
+ &survey.Select{
+ Message: "VNIC Profile",
+ Help: "The Engine VNIC profile of the VMs.",
+ Options: profileNames,
+ },
&profileID,
- func(ans interface{}) error {
- choice := ans.(string)
+ survey.WithValidator(func(ans interface{}) error {
+ choice := ans.(core.OptionAnswer).Value
sort.Strings(profileNames)
i := sort.SearchStrings(profileNames, choice)
if i == len(profileNames) || profileNames[i] != choice {
@@ -93,7 +97,8 @@ func askVNICProfileID(c *ovirtsdk4.Connection, p *ovirt.Platform) error {
}
p.VNICProfileID = profile.MustId()
return nil
- }); err != nil {
+ }),
+ ); err != nil {
return errors.Wrap(err, "failed UserInput")
}
return nil
diff --git a/vendor/github.com/openshift/installer/pkg/asset/installconfig/ovirt/ovirt.go b/vendor/github.com/openshift/installer/pkg/asset/installconfig/ovirt/ovirt.go
index 47ba7ee8631..c365e4fc6cc 100644
--- a/vendor/github.com/openshift/installer/pkg/asset/installconfig/ovirt/ovirt.go
+++ b/vendor/github.com/openshift/installer/pkg/asset/installconfig/ovirt/ovirt.go
@@ -1,10 +1,10 @@
package ovirt
import (
+ "github.com/AlecAivazis/survey/v2"
ovirtsdk4 "github.com/ovirt/go-ovirt"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
- "gopkg.in/AlecAivazis/survey.v1"
"github.com/openshift/installer/pkg/types/ovirt"
)
diff --git a/vendor/github.com/openshift/installer/pkg/asset/installconfig/ovirt/storage.go b/vendor/github.com/openshift/installer/pkg/asset/installconfig/ovirt/storage.go
index faec96ad4e2..8d3ed099ed8 100644
--- a/vendor/github.com/openshift/installer/pkg/asset/installconfig/ovirt/storage.go
+++ b/vendor/github.com/openshift/installer/pkg/asset/installconfig/ovirt/storage.go
@@ -4,9 +4,10 @@ import (
"fmt"
"sort"
+ "github.com/AlecAivazis/survey/v2"
+ "github.com/AlecAivazis/survey/v2/core"
ovirtsdk4 "github.com/ovirt/go-ovirt"
"github.com/pkg/errors"
- "gopkg.in/AlecAivazis/survey.v1"
"github.com/openshift/installer/pkg/types/ovirt"
)
@@ -29,14 +30,15 @@ func askStorage(c *ovirtsdk4.Connection, p *ovirt.Platform, clusterName string)
domainsForCluster[domain.MustName()] = domain
domainNames = append(domainNames, domain.MustName())
}
- if err := survey.AskOne(&survey.Select{
- Message: "Storage domain",
- Help: "The storage domain will be used to create the disks of all the cluster nodes.",
- Options: domainNames,
- },
+ if err := survey.AskOne(
+ &survey.Select{
+ Message: "Storage domain",
+ Help: "The storage domain will be used to create the disks of all the cluster nodes.",
+ Options: domainNames,
+ },
&storageDomainName,
- func(ans interface{}) error {
- choice := ans.(string)
+ survey.WithValidator(func(ans interface{}) error {
+ choice := ans.(core.OptionAnswer).Value
sort.Strings(domainNames)
i := sort.SearchStrings(domainNames, choice)
if i == len(domainNames) || domainNames[i] != choice {
@@ -48,7 +50,8 @@ func askStorage(c *ovirtsdk4.Connection, p *ovirt.Platform, clusterName string)
}
p.StorageDomainID = domain.MustId()
return nil
- }); err != nil {
+ }),
+ ); err != nil {
return errors.Wrap(err, "failed UserInput")
}
return nil
diff --git a/vendor/github.com/openshift/installer/pkg/asset/installconfig/ovirt/validation.go b/vendor/github.com/openshift/installer/pkg/asset/installconfig/ovirt/validation.go
index 504d64ce03d..57096a168af 100644
--- a/vendor/github.com/openshift/installer/pkg/asset/installconfig/ovirt/validation.go
+++ b/vendor/github.com/openshift/installer/pkg/asset/installconfig/ovirt/validation.go
@@ -3,9 +3,10 @@ package ovirt
import (
"fmt"
+ "github.com/AlecAivazis/survey/v2"
ovirtsdk "github.com/ovirt/go-ovirt"
"github.com/pkg/errors"
- "gopkg.in/AlecAivazis/survey.v1"
+ "github.com/sirupsen/logrus"
"k8s.io/apimachinery/pkg/util/validation/field"
"github.com/openshift/installer/pkg/types"
@@ -39,30 +40,84 @@ func Validate(ic *types.InstallConfig) error {
allErrs,
field.Invalid(ovirtPlatformPath.Child("vnicProfileID"), ic.Ovirt.VNICProfileID, err.Error()))
}
-
if ic.ControlPlane != nil && ic.ControlPlane.Platform.Ovirt != nil {
allErrs = append(
allErrs,
- validateMachinePool(con, field.NewPath("controlPlane", "platform", "ovirt"), ic.ControlPlane.Platform.Ovirt)...)
+ validateMachinePool(con, field.NewPath("controlPlane", "platform", "ovirt"), ic.ControlPlane.Platform.Ovirt, *ic.Ovirt)...)
}
for idx, compute := range ic.Compute {
fldPath := field.NewPath("compute").Index(idx)
if compute.Platform.Ovirt != nil {
allErrs = append(
allErrs,
- validateMachinePool(con, fldPath.Child("platform", "ovirt"), compute.Platform.Ovirt)...)
+ validateMachinePool(con, fldPath.Child("platform", "ovirt"), compute.Platform.Ovirt, *ic.Ovirt)...)
}
}
return allErrs.ToAggregate()
}
-func validateMachinePool(con *ovirtsdk.Connection, child *field.Path, pool *ovirt.MachinePool) field.ErrorList {
+func validateMachinePool(con *ovirtsdk.Connection, child *field.Path, pool *ovirt.MachinePool, platform ovirt.Platform) field.ErrorList {
allErrs := field.ErrorList{}
allErrs = append(allErrs, validateInstanceTypeID(con, child, pool)...)
+ allErrs = append(allErrs, validateMachineAffinityGroups(con, child, pool, platform)...)
+
return allErrs
}
+// validateExistingAffinityGroup checks that there is no affinity group with the same name in the cluster
+func validateExistingAffinityGroup(con *ovirtsdk.Connection, platform ovirt.Platform) error {
+ res, err := con.SystemService().ClustersService().
+ ClusterService(platform.ClusterID).AffinityGroupsService().List().Send()
+ if err != nil {
+ return errors.Errorf("failed listing affinity groups for cluster %v", platform.ClusterID)
+ }
+ for _, ag := range res.MustGroups().Slice() {
+ for _, agNew := range platform.AffinityGroups {
+ if ag.MustName() == agNew.Name {
+ return errors.Errorf(
+ "affinity group %v already exist in cluster %v", agNew.Name, platform.ClusterID)
+ }
+ }
+ }
+ return nil
+}
+
+func validateClusterResources(con *ovirtsdk.Connection, ic *types.InstallConfig) error {
+ mAgReplicas := make(map[string]int)
+ for _, agn := range ic.ControlPlane.Platform.Ovirt.AffinityGroupsNames {
+ mAgReplicas[agn] = mAgReplicas[agn] + int(*ic.ControlPlane.Replicas)
+ }
+ for _, compute := range ic.Compute {
+ for _, agn := range compute.Platform.Ovirt.AffinityGroupsNames {
+ mAgReplicas[agn] = mAgReplicas[agn] + int(*compute.Replicas)
+ }
+ }
+
+ clusterName, err := GetClusterName(con, ic.Ovirt.ClusterID)
+ if err != nil {
+ return err
+ }
+ hosts, err := FindHostsInCluster(con, clusterName)
+ if err != nil {
+ return err
+ }
+ for _, ag := range ic.Ovirt.AffinityGroups {
+ if _, found := mAgReplicas[ag.Name]; found {
+ if len(hosts) < mAgReplicas[ag.Name] {
+ msg := fmt.Sprintf("Affinity Group %v cannot be fulfilled, oVirt cluster doesn't"+
+ "have enough hosts: found %v hosts but %v replicas assigned to affinity group",
+ ag.Name, len(hosts), mAgReplicas[ag.Name])
+ if ag.Enforcing {
+ return fmt.Errorf(msg, ag)
+ }
+ logrus.Warning(msg)
+ }
+ }
+ }
+ return nil
+}
+
func validateInstanceTypeID(con *ovirtsdk.Connection, child *field.Path, machinePool *ovirt.MachinePool) field.ErrorList {
allErrs := field.ErrorList{}
if machinePool.InstanceTypeID != "" {
@@ -74,6 +129,41 @@ func validateInstanceTypeID(con *ovirtsdk.Connection, child *field.Path, machine
return allErrs
}
+// validateMachineAffinityGroups checks that the affinity groups on the machine object exist in the oVirt cluster
+// or created by the installer.
+func validateMachineAffinityGroups(con *ovirtsdk.Connection, child *field.Path, machinePool *ovirt.MachinePool, platform ovirt.Platform) field.ErrorList {
+ allErrs := field.ErrorList{}
+ existingAG := make(map[string]int)
+
+ res, err := con.SystemService().ClustersService().
+ ClusterService(platform.ClusterID).AffinityGroupsService().List().Send()
+ if err != nil {
+ return append(
+ allErrs,
+ field.InternalError(
+ child,
+ errors.Errorf("failed listing affinity groups for cluster %v", platform.ClusterID)))
+ }
+ for _, ag := range res.MustGroups().Slice() {
+ existingAG[ag.MustName()] = 0
+ }
+ // add affinity groups the installer creates
+ for _, ag := range platform.AffinityGroups {
+ existingAG[ag.Name] = 0
+ }
+ for _, ag := range machinePool.AffinityGroupsNames {
+ if _, ok := existingAG[ag]; !ok {
+ allErrs = append(
+ allErrs,
+ field.Invalid(
+ child.Child("affinityGroupsNames"), ag,
+ fmt.Sprintf(
+ "Affinity Group %v doesn't exist in oVirt cluster or created by the installer", ag)))
+ }
+ }
+ return allErrs
+}
+
// authenticated takes an ovirt platform and validates
// its connection to the API by establishing
// the connection and authenticating successfully.
@@ -98,11 +188,10 @@ func authenticated(c *Config) survey.Validator {
err = connection.Test()
if err != nil {
- return errors.Errorf("failed to connect to Engine platform %s", err)
+ return errors.Errorf("failed to connect to the Engine platform %s", err)
}
return nil
}
-
}
// validate the provided vnic profile exists and belongs the the cluster network
@@ -126,3 +215,19 @@ func validateVNICProfile(platform ovirt.Platform, con *ovirtsdk.Connection) erro
}
return nil
}
+
+// ValidateForProvisioning validates that the install config is valid for provisioning the cluster.
+func ValidateForProvisioning(ic *types.InstallConfig) error {
+ con, err := NewConnection()
+ if err != nil {
+ return err
+ }
+ defer con.Close()
+ if err := validateClusterResources(con, ic); err != nil {
+ return err
+ }
+ if err := validateExistingAffinityGroup(con, *ic.Ovirt); err != nil {
+ return err
+ }
+ return nil
+}
diff --git a/vendor/github.com/openshift/installer/pkg/asset/machines/aws/instance_types.go b/vendor/github.com/openshift/installer/pkg/asset/machines/aws/instance_types.go
index 2f8fa28d034..3e4570bb509 100644
--- a/vendor/github.com/openshift/installer/pkg/asset/machines/aws/instance_types.go
+++ b/vendor/github.com/openshift/installer/pkg/asset/machines/aws/instance_types.go
@@ -4,6 +4,7 @@ import (
"context"
"github.com/aws/aws-sdk-go/aws"
+ "github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/ec2"
"github.com/pkg/errors"
"k8s.io/apimachinery/pkg/util/sets"
@@ -23,7 +24,41 @@ func PreferredInstanceType(ctx context.Context, meta *awsconfig.Metadata, types
return types[0], err
}
- client := ec2.New(sess, aws.NewConfig().WithRegion(meta.Region))
+ found, err := getInstanceTypeZoneInfo(ctx, sess, meta.Region, types, zones)
+ if err != nil {
+ return types[0], err
+ }
+
+ for _, t := range types {
+ if found[t].HasAll(zones...) {
+ return t, nil
+ }
+ }
+
+ return types[0], errors.New("no instance type found for the zone constraint")
+}
+
+// FilterZonesBasedOnInstanceType return a filtered list of zones where the particular instance type is available. This is mainly necessary for ARM, where the instance type m6g is not
+// available in all availability zones.
+func FilterZonesBasedOnInstanceType(ctx context.Context, meta *awsconfig.Metadata, instanceType string, zones []string) ([]string, error) {
+ sess, err := meta.Session(ctx)
+ if err != nil {
+ return zones, err
+ }
+
+ types := []string{instanceType}
+ found, err := getInstanceTypeZoneInfo(ctx, sess, meta.Region, types, zones)
+ if err != nil {
+ return zones, err
+ }
+
+ return found[instanceType].Intersection(sets.NewString(zones...)).List(), nil
+}
+
+func getInstanceTypeZoneInfo(ctx context.Context, session *session.Session, region string, types []string, zones []string) (map[string]sets.String, error) {
+ found := map[string]sets.String{}
+
+ client := ec2.New(session, aws.NewConfig().WithRegion(region))
resp, err := client.DescribeInstanceTypeOfferingsWithContext(ctx, &ec2.DescribeInstanceTypeOfferingsInput{
Filters: []*ec2.Filter{
{
@@ -38,17 +73,17 @@ func PreferredInstanceType(ctx context.Context, meta *awsconfig.Metadata, types
LocationType: aws.String("availability-zone"),
})
if err != nil {
- return types[0], err
+ return found, err
}
- reqZones := sets.NewString(zones...)
- found := map[string][]string{}
+
+ // iterate through the offerings and create a map of instance type keys to location values
for _, offering := range resp.InstanceTypeOfferings {
- found[aws.StringValue(offering.InstanceType)] = append(found[aws.StringValue(offering.InstanceType)], aws.StringValue(offering.Location))
- }
- for _, t := range types {
- if reqZones.Difference(sets.NewString(found[t]...)).Len() == 0 {
- return t, nil
+ f, ok := found[aws.StringValue(offering.InstanceType)]
+ if !ok {
+ f = sets.NewString()
+ found[aws.StringValue(offering.InstanceType)] = f
}
+ f.Insert(aws.StringValue(offering.Location))
}
- return types[0], errors.New("no instance type found for the zone constraint")
+ return found, nil
}
diff --git a/vendor/github.com/openshift/installer/pkg/asset/machines/azure/machines.go b/vendor/github.com/openshift/installer/pkg/asset/machines/azure/machines.go
index aa77a61a664..234b9ded6f9 100644
--- a/vendor/github.com/openshift/installer/pkg/asset/machines/azure/machines.go
+++ b/vendor/github.com/openshift/installer/pkg/asset/machines/azure/machines.go
@@ -101,6 +101,11 @@ func provider(platform *azure.Platform, mpool *azure.MachinePool, osImage string
publicLB = ""
}
+ managedIdentity := fmt.Sprintf("%s-identity", clusterID)
+ if platform.IsARO() || platform.CloudName == azure.StackCloud {
+ managedIdentity = ""
+ }
+
return &azureprovider.AzureMachineProviderSpec{
TypeMeta: metav1.TypeMeta{
APIVersion: "azureproviderconfig.openshift.io/v1beta1",
@@ -122,7 +127,7 @@ func provider(platform *azure.Platform, mpool *azure.MachinePool, osImage string
},
Zone: az,
Subnet: subnet,
- ManagedIdentity: fmt.Sprintf("%s-identity", clusterID),
+ ManagedIdentity: managedIdentity,
Vnet: virtualNetwork,
ResourceGroup: rg,
NetworkResourceGroup: networkResourceGroup,
diff --git a/vendor/github.com/openshift/installer/pkg/asset/machines/openstack/machines.go b/vendor/github.com/openshift/installer/pkg/asset/machines/openstack/machines.go
index 29a90c12164..3016dd2872c 100644
--- a/vendor/github.com/openshift/installer/pkg/asset/machines/openstack/machines.go
+++ b/vendor/github.com/openshift/installer/pkg/asset/machines/openstack/machines.go
@@ -46,6 +46,11 @@ func Machines(clusterID string, config *types.InstallConfig, pool *types.Machine
return nil, err
}
+ volumeAZs := openstackdefaults.DefaultRootVolumeAZ()
+ if mpool.RootVolume != nil && len(mpool.RootVolume.Zones) != 0 {
+ volumeAZs = mpool.RootVolume.Zones
+ }
+
total := int64(1)
if pool.Replicas != nil {
total = *pool.Replicas
@@ -66,6 +71,7 @@ func Machines(clusterID string, config *types.InstallConfig, pool *types.Machine
role,
userDataSecret,
trunkSupport,
+ volumeAZs[int(idx)%len(volumeAZs)],
)
if err != nil {
return nil, err
@@ -105,7 +111,7 @@ func Machines(clusterID string, config *types.InstallConfig, pool *types.Machine
return machines, nil
}
-func generateProvider(clusterID string, platform *openstack.Platform, mpool *openstack.MachinePool, osImage string, az string, role, userDataSecret string, trunkSupport bool) (*openstackprovider.OpenstackProviderSpec, error) {
+func generateProvider(clusterID string, platform *openstack.Platform, mpool *openstack.MachinePool, osImage string, az string, role, userDataSecret string, trunkSupport bool, rootVolumeAZ string) (*openstackprovider.OpenstackProviderSpec, error) {
var networks []openstackprovider.NetworkParam
if platform.MachinesSubnet != "" {
networks = []openstackprovider.NetworkParam{{
@@ -169,6 +175,7 @@ func generateProvider(clusterID string, platform *openstack.Platform, mpool *ope
SourceType: "image",
SourceUUID: osImage,
VolumeType: mpool.RootVolume.Type,
+ Zone: rootVolumeAZ,
}
} else {
spec.Image = osImage
diff --git a/vendor/github.com/openshift/installer/pkg/asset/machines/openstack/machinesets.go b/vendor/github.com/openshift/installer/pkg/asset/machines/openstack/machinesets.go
index c7d5e0edbb9..a6f7a8cd625 100644
--- a/vendor/github.com/openshift/installer/pkg/asset/machines/openstack/machinesets.go
+++ b/vendor/github.com/openshift/installer/pkg/asset/machines/openstack/machinesets.go
@@ -11,6 +11,7 @@ import (
"github.com/openshift/installer/pkg/types"
"github.com/openshift/installer/pkg/types/openstack"
+ openstackdefaults "github.com/openshift/installer/pkg/types/openstack/defaults"
)
// MachineSets returns a list of machinesets for a machinepool.
@@ -28,6 +29,11 @@ func MachineSets(clusterID string, config *types.InstallConfig, pool *types.Mach
return nil, err
}
+ volumeAZs := openstackdefaults.DefaultRootVolumeAZ()
+ if mpool.RootVolume != nil && len(mpool.RootVolume.Zones) != 0 {
+ volumeAZs = mpool.RootVolume.Zones
+ }
+
total := int32(0)
if pool.Replicas != nil {
total = int32(*pool.Replicas)
@@ -41,7 +47,7 @@ func MachineSets(clusterID string, config *types.InstallConfig, pool *types.Mach
if int32(idx) < total%numOfAZs {
replicas++
}
- provider, err := generateProvider(clusterID, platform, mpool, osImage, az, role, userDataSecret, trunkSupport)
+ provider, err := generateProvider(clusterID, platform, mpool, osImage, az, role, userDataSecret, trunkSupport, volumeAZs[idx%len(volumeAZs)])
if err != nil {
return nil, err
}
diff --git a/vendor/github.com/openshift/installer/pkg/asset/machines/ovirt/machines.go b/vendor/github.com/openshift/installer/pkg/asset/machines/ovirt/machines.go
index a370f7702fa..c7d18f54636 100644
--- a/vendor/github.com/openshift/installer/pkg/asset/machines/ovirt/machines.go
+++ b/vendor/github.com/openshift/installer/pkg/asset/machines/ovirt/machines.go
@@ -4,6 +4,7 @@ package ovirt
import (
"fmt"
+ ovirtprovider "github.com/openshift/cluster-api-provider-ovirt/pkg/apis/ovirtprovider/v1beta1"
machineapi "github.com/openshift/machine-api-operator/pkg/apis/machine/v1beta1"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
@@ -11,8 +12,6 @@ import (
"github.com/openshift/installer/pkg/types"
"github.com/openshift/installer/pkg/types/ovirt"
-
- ovirtprovider "github.com/openshift/cluster-api-provider-ovirt/pkg/apis/ovirtprovider/v1beta1"
)
// Machines returns a list of machines for a machinepool.
@@ -29,7 +28,7 @@ func Machines(clusterID string, config *types.InstallConfig, pool *types.Machine
if pool.Replicas != nil {
total = *pool.Replicas
}
- provider := provider(platform, pool, userDataSecret, osImage)
+ provider := provider(platform, pool, userDataSecret, clusterID, osImage)
var machines []machineapi.Machine
for idx := int64(0); idx < total; idx++ {
machine := machineapi.Machine{
@@ -59,7 +58,7 @@ func Machines(clusterID string, config *types.InstallConfig, pool *types.Machine
return machines, nil
}
-func provider(platform *ovirt.Platform, pool *types.MachinePool, userDataSecret string, osImage string) *ovirtprovider.OvirtMachineProviderSpec {
+func provider(platform *ovirt.Platform, pool *types.MachinePool, userDataSecret string, clusterID string, osImage string) *ovirtprovider.OvirtMachineProviderSpec {
spec := ovirtprovider.OvirtMachineProviderSpec{
TypeMeta: metav1.TypeMeta{
APIVersion: "ovirtproviderconfig.machine.openshift.io/v1beta1",
@@ -72,7 +71,23 @@ func provider(platform *ovirt.Platform, pool *types.MachinePool, userDataSecret
InstanceTypeId: pool.Platform.Ovirt.InstanceTypeID,
MemoryMB: pool.Platform.Ovirt.MemoryMB,
VMType: string(pool.Platform.Ovirt.VMType),
+ AutoPinningPolicy: string(pool.Platform.Ovirt.AutoPinningPolicy),
+ Hugepages: int32(pool.Platform.Ovirt.Hugepages),
+ }
+ uniqueNewAG := make(map[string]ovirt.AffinityGroup)
+ for _, ag := range platform.AffinityGroups {
+ uniqueNewAG[ag.Name] = ag
+ }
+ ags := make([]string, len(pool.Platform.Ovirt.AffinityGroupsNames))
+ for i, agName := range pool.Platform.Ovirt.AffinityGroupsNames {
+ if _, ok := uniqueNewAG[agName]; ok {
+ // add the cluster name only if the affinity group is created by the installer
+ ags[i] = clusterID + "-" + agName
+ } else {
+ ags[i] = agName
+ }
}
+ spec.AffinityGroupsNames = ags
if pool.Platform.Ovirt.CPU != nil {
spec.CPU = &ovirtprovider.CPU{
Cores: pool.Platform.Ovirt.CPU.Cores,
diff --git a/vendor/github.com/openshift/installer/pkg/asset/machines/ovirt/machinesets.go b/vendor/github.com/openshift/installer/pkg/asset/machines/ovirt/machinesets.go
index d8c13f203b4..17f3aeffb38 100644
--- a/vendor/github.com/openshift/installer/pkg/asset/machines/ovirt/machinesets.go
+++ b/vendor/github.com/openshift/installer/pkg/asset/machines/ovirt/machinesets.go
@@ -30,8 +30,8 @@ func MachineSets(clusterID string, config *types.InstallConfig, pool *types.Mach
total = *pool.Replicas
}
- provider := provider(platform, pool, userDataSecret, osImage)
- name := fmt.Sprintf("%s-%s-%d", clusterID, pool.Name, 0)
+ provider := provider(platform, pool, userDataSecret, clusterID, osImage)
+ name := fmt.Sprintf("%s-%s", clusterID, pool.Name)
mset := &machineapi.MachineSet{
TypeMeta: metav1.TypeMeta{
APIVersion: "machine.openshift.io/v1beta1",
diff --git a/vendor/github.com/openshift/installer/pkg/destroy/aws/aws.go b/vendor/github.com/openshift/installer/pkg/destroy/aws/aws.go
index 11a3bc765b3..d54f3c99eab 100644
--- a/vendor/github.com/openshift/installer/pkg/destroy/aws/aws.go
+++ b/vendor/github.com/openshift/installer/pkg/destroy/aws/aws.go
@@ -13,6 +13,7 @@ import (
"github.com/aws/aws-sdk-go/aws/request"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/ec2"
+ "github.com/aws/aws-sdk-go/service/efs"
"github.com/aws/aws-sdk-go/service/elb"
"github.com/aws/aws-sdk-go/service/elbv2"
"github.com/aws/aws-sdk-go/service/iam"
@@ -59,10 +60,11 @@ type ClusterUninstaller struct {
// }
//
// will match resources with (a:b and c:d) or d:e.
- Filters []Filter // filter(s) we will be searching for
- Logger logrus.FieldLogger
- Region string
- ClusterID string
+ Filters []Filter // filter(s) we will be searching for
+ Logger logrus.FieldLogger
+ Region string
+ ClusterID string
+ ClusterDomain string
// Session is the AWS session to be used for deletion. If nil, a
// new session will be created based on the usual credential
@@ -86,11 +88,12 @@ func New(logger logrus.FieldLogger, metadata *types.ClusterMetadata) (providers.
}
return &ClusterUninstaller{
- Filters: filters,
- Region: region,
- Logger: logger,
- ClusterID: metadata.InfraID,
- Session: session,
+ Filters: filters,
+ Region: region,
+ Logger: logger,
+ ClusterID: metadata.InfraID,
+ ClusterDomain: metadata.AWS.ClusterDomain,
+ Session: session,
}, nil
}
@@ -138,10 +141,7 @@ func (o *ClusterUninstaller) RunWithContext(ctx context.Context) ([]string, erro
switch o.Region {
case endpoints.CnNorth1RegionID, endpoints.CnNorthwest1RegionID:
- if o.Region != endpoints.CnNorthwest1RegionID {
- tagClients = append(tagClients,
- resourcegroupstaggingapi.New(awsSession, aws.NewConfig().WithRegion(endpoints.CnNorthwest1RegionID)))
- }
+ break
case endpoints.UsGovEast1RegionID, endpoints.UsGovWest1RegionID:
if o.Region != endpoints.UsGovWest1RegionID {
tagClients = append(tagClients,
@@ -183,19 +183,25 @@ func (o *ClusterUninstaller) RunWithContext(ctx context.Context) ([]string, erro
// running on the cluster creating new resources while we are attempting to delete resources, which could leak
// the new resources.
ec2Client := ec2.New(awsSession)
+ lastTerminateTime := time.Now()
err = wait.PollImmediateUntil(
time.Second*10,
func() (done bool, err error) {
- instancesToDelete, err := o.findEC2Instances(ctx, ec2Client, deleted)
+ instancesRunning, instancesNotTerminated, err := o.findEC2Instances(ctx, ec2Client, deleted)
if err != nil {
o.Logger.WithError(err).Info("error while finding EC2 instances to delete")
if err := ctx.Err(); err != nil {
return false, err
}
}
- if len(instancesToDelete) == 0 && err == nil {
+ if len(instancesNotTerminated) == 0 && len(instancesRunning) == 0 && err == nil {
return true, nil
}
+ instancesToDelete := instancesRunning
+ if time.Since(lastTerminateTime) > 10*time.Minute {
+ instancesToDelete = instancesNotTerminated
+ lastTerminateTime = time.Now()
+ }
newlyDeleted, err := o.deleteResources(ctx, awsSession, instancesToDelete, tracker)
// Delete from the resources-to-delete set so that the current state of the resources to delete can be
// returned if the context is completed.
@@ -248,7 +254,7 @@ func (o *ClusterUninstaller) RunWithContext(ctx context.Context) ([]string, erro
return resourcesToDelete.UnsortedList(), err
}
- err = removeSharedTags(ctx, tagClients, o.Filters, o.Logger)
+ err = o.removeSharedTags(ctx, awsSession, tagClients, tracker)
if err != nil {
return nil, err
}
@@ -257,18 +263,21 @@ func (o *ClusterUninstaller) RunWithContext(ctx context.Context) ([]string, erro
}
// findEC2Instances returns the EC2 instances with tags that satisfy the filters.
+// returns two lists, first one is the list of all resources that are not terminated and are not in shutdown
+// stage and the second list is the list of resources that are not terminated.
// deleted - the resources that have already been deleted. Any resources specified in this set will be ignored.
-func (o *ClusterUninstaller) findEC2Instances(ctx context.Context, ec2Client *ec2.EC2, deleted sets.String) ([]string, error) {
+func (o *ClusterUninstaller) findEC2Instances(ctx context.Context, ec2Client *ec2.EC2, deleted sets.String) ([]string, []string, error) {
if ec2Client.Config.Region == nil {
- return nil, errors.New("EC2 client does not have region configured")
+ return nil, nil, errors.New("EC2 client does not have region configured")
}
partition, ok := endpoints.PartitionForRegion(endpoints.DefaultPartitions(), *ec2Client.Config.Region)
if !ok {
- return nil, errors.Errorf("no partition found for region %q", *ec2Client.Config.Region)
+ return nil, nil, errors.Errorf("no partition found for region %q", *ec2Client.Config.Region)
}
- var resources []string
+ var resourcesRunning []string
+ var resourcesNotTerminated []string
for _, filter := range o.Filters {
o.Logger.Debugf("search for instances by tag matching %#+v", filter)
instanceFilters := make([]*ec2.Filter, 0, len(filter))
@@ -299,9 +308,12 @@ func (o *ClusterUninstaller) findEC2Instances(ctx context.Context, ec2Client *ec
instanceLogger.Info("Terminated")
deleted.Insert(arn)
}
- } else {
- resources = append(resources, arn)
+ continue
+ }
+ if *instance.State.Name != "shutting-down" {
+ resourcesRunning = append(resourcesRunning, arn)
}
+ resourcesNotTerminated = append(resourcesNotTerminated, arn)
}
}
return !lastPage
@@ -310,10 +322,10 @@ func (o *ClusterUninstaller) findEC2Instances(ctx context.Context, ec2Client *ec
if err != nil {
err = errors.Wrap(err, "get ec2 instances")
o.Logger.Info(err)
- return resources, err
+ return resourcesRunning, resourcesNotTerminated, err
}
}
- return resources, nil
+ return resourcesRunning, resourcesNotTerminated, nil
}
// findResourcesToDelete returns the resources that should be deleted.
@@ -415,7 +427,7 @@ func (o *ClusterUninstaller) findResourcesByTag(
// deleted - the resources that have already been deleted. Any resources specified in this set will be ignored.
func (o *ClusterUninstaller) findIAMRoles(ctx context.Context, search *iamRoleSearch, deleted sets.String) (sets.String, error) {
o.Logger.Debug("search for IAM roles")
- resources, err := search.arns(ctx)
+ resources, _, err := search.find(ctx)
if err != nil {
o.Logger.Info(err)
return nil, err
@@ -517,12 +529,11 @@ type iamRoleSearch struct {
unmatched map[string]struct{}
}
-func (search *iamRoleSearch) arns(ctx context.Context) ([]string, error) {
+func (search *iamRoleSearch) find(ctx context.Context) (arns []string, names []string, returnErr error) {
if search.unmatched == nil {
search.unmatched = map[string]struct{}{}
}
- arns := []string{}
var lastError error
err := search.client.ListRolesPagesWithContext(
ctx,
@@ -552,6 +563,7 @@ func (search *iamRoleSearch) arns(ctx context.Context) ([]string, error) {
}
if tagMatch(search.filters, tags) {
arns = append(arns, *role.Arn)
+ names = append(names, *role.RoleName)
} else {
search.unmatched[*role.Arn] = exists
}
@@ -563,9 +575,9 @@ func (search *iamRoleSearch) arns(ctx context.Context) ([]string, error) {
)
if lastError != nil {
- return arns, lastError
+ return arns, names, lastError
}
- return arns, err
+ return arns, names, err
}
type iamUserSearch struct {
@@ -626,9 +638,9 @@ func (search *iamUserSearch) arns(ctx context.Context) ([]string, error) {
return arns, err
}
-// getSharedHostedZone will find the ID of the non-Terraform-managed public route53 zone given the
+// getPublicHostedZone will find the ID of the non-Terraform-managed public route53 zone given the
// Terraform-managed zone's privateID.
-func getSharedHostedZone(ctx context.Context, client *route53.Route53, privateID string, logger logrus.FieldLogger) (string, error) {
+func getPublicHostedZone(ctx context.Context, client *route53.Route53, privateID string, logger logrus.FieldLogger) (string, error) {
response, err := client.GetHostedZoneWithContext(ctx, &route53.GetHostedZoneInput{
Id: aws.String(privateID),
})
@@ -640,33 +652,32 @@ func getSharedHostedZone(ctx context.Context, client *route53.Route53, privateID
if response.HostedZone.Config != nil && response.HostedZone.Config.PrivateZone != nil {
if !*response.HostedZone.Config.PrivateZone {
- return "", errors.Errorf("getSharedHostedZone requires a private ID, but was passed the public %s", privateID)
+ return "", errors.Errorf("getPublicHostedZone requires a private ID, but was passed the public %s", privateID)
}
} else {
logger.WithField("hosted zone", privateName).Warn("could not determine whether hosted zone is private")
}
- domain := privateName
- parents := []string{domain}
- for {
- idx := strings.Index(domain, ".")
- if idx == -1 {
- break
- }
- if len(domain[idx+1:]) > 0 {
- parents = append(parents, domain[idx+1:])
- }
- domain = domain[idx+1:]
- }
+ return findAncestorPublicRoute53(ctx, client, privateName, logger)
+}
- for _, p := range parents {
- sZone, err := findPublicRoute53(ctx, client, p, logger)
+// findAncestorPublicRoute53 finds a public route53 zone with the closest ancestor or match to dnsName.
+// It returns "", when no public route53 zone could be found.
+func findAncestorPublicRoute53(ctx context.Context, client *route53.Route53, dnsName string, logger logrus.FieldLogger) (string, error) {
+ for len(dnsName) > 0 {
+ sZone, err := findPublicRoute53(ctx, client, dnsName, logger)
if err != nil {
return "", err
}
if sZone != "" {
return sZone, nil
}
+
+ idx := strings.Index(dnsName, ".")
+ if idx == -1 {
+ break
+ }
+ dnsName = dnsName[idx+1:]
}
return "", nil
}
@@ -720,6 +731,8 @@ func deleteARN(ctx context.Context, session *session.Session, arn arn.ARN, logge
return deleteRoute53(ctx, session, arn, logger)
case "s3":
return deleteS3(ctx, session, arn, logger)
+ case "elasticfilesystem":
+ return deleteElasticFileSystem(ctx, session, arn, logger)
default:
return errors.Errorf("unrecognized ARN service %s (%s)", arn.Service, arn)
}
@@ -810,7 +823,7 @@ func deleteEC2Image(ctx context.Context, client *ec2.EC2, id string, logger logr
Tags: image.Tags,
})
if err != nil {
- err = errors.Wrapf(err, "tagging snapshots for %s", id)
+ return errors.Wrapf(err, "tagging snapshots for %s", id)
}
}
}
@@ -867,8 +880,8 @@ func terminateEC2Instance(ctx context.Context, ec2Client *ec2.EC2, iamClient *ia
}
func terminateEC2InstanceByInstance(ctx context.Context, ec2Client *ec2.EC2, iamClient *iam.IAM, instance *ec2.Instance, logger logrus.FieldLogger) error {
- // Skip 'shutting-down' and 'terminated' instances since they take a while to get cleaned up
- if instance.State == nil || *instance.State.Name == "shutting-down" || *instance.State.Name == "terminated" {
+ // Ignore instances that are already terminated
+ if instance.State == nil || *instance.State.Name == "terminated" {
return nil
}
@@ -1816,7 +1829,7 @@ func deleteRoute53(ctx context.Context, session *session.Session, arn arn.ARN, l
client := route53.New(session)
- sharedZoneID, err := getSharedHostedZone(ctx, client, id, logger)
+ publicZoneID, err := getPublicHostedZone(ctx, client, id, logger)
if err != nil {
// In some cases AWS may return the zone in the list of tagged resources despite the fact
// it no longer exists.
@@ -1830,15 +1843,15 @@ func deleteRoute53(ctx context.Context, session *session.Session, arn arn.ARN, l
return fmt.Sprintf("%s %s", *recordSet.Type, *recordSet.Name)
}
- sharedEntries := map[string]*route53.ResourceRecordSet{}
- if len(sharedZoneID) != 0 {
+ publicEntries := map[string]*route53.ResourceRecordSet{}
+ if len(publicZoneID) != 0 {
err = client.ListResourceRecordSetsPagesWithContext(
ctx,
- &route53.ListResourceRecordSetsInput{HostedZoneId: aws.String(sharedZoneID)},
+ &route53.ListResourceRecordSetsInput{HostedZoneId: aws.String(publicZoneID)},
func(results *route53.ListResourceRecordSetsOutput, lastPage bool) bool {
for _, recordSet := range results.ResourceRecordSets {
key := recordSetKey(recordSet)
- sharedEntries[key] = recordSet
+ publicEntries[key] = recordSet
}
return !lastPage
@@ -1862,14 +1875,17 @@ func deleteRoute53(ctx context.Context, session *session.Session, arn arn.ARN, l
continue
}
key := recordSetKey(recordSet)
- if sharedEntry, ok := sharedEntries[key]; ok {
- err := deleteRoute53RecordSet(ctx, client, sharedZoneID, sharedEntry, logger.WithField("public zone", sharedZoneID))
+ if publicEntry, ok := publicEntries[key]; ok {
+ err := deleteRoute53RecordSet(ctx, client, publicZoneID, publicEntry, logger.WithField("public zone", publicZoneID))
if err != nil {
if lastError != nil {
logger.Debug(lastError)
}
- lastError = errors.Wrapf(err, "deleting public zone %s", sharedZoneID)
+ lastError = errors.Wrapf(err, "deleting record set %#v from public zone %s", publicEntry, publicZoneID)
}
+ // do not delete the record set in the private zone if the delete failed in the public zone;
+ // otherwise the record set in the public zone will get leaked
+ continue
}
err = deleteRoute53RecordSet(ctx, client, id, recordSet, logger)
@@ -2011,85 +2027,132 @@ func isBucketNotFound(err interface{}) bool {
return false
}
-func removeSharedTags(ctx context.Context, tagClients []*resourcegroupstaggingapi.ResourceGroupsTaggingAPI, filters []Filter, logger logrus.FieldLogger) error {
- for _, filter := range filters {
- for key, value := range filter {
- if strings.HasPrefix(key, "kubernetes.io/cluster/") {
- if value == "owned" {
- if err := removeSharedTag(ctx, tagClients, key, logger); err != nil {
- return err
- }
- } else {
- logger.Warnf("Ignoring non-owned cluster key %s: %s for shared-tag removal", key, value)
- }
- }
- }
+func deleteElasticFileSystem(ctx context.Context, session *session.Session, arn arn.ARN, logger logrus.FieldLogger) error {
+ client := efs.New(session)
+
+ resourceType, id, err := splitSlash("resource", arn.Resource)
+ if err != nil {
+ return err
}
- return nil
+ switch resourceType {
+ case "file-system":
+ return deleteFileSystem(ctx, client, id, logger)
+ case "access-point":
+ return deleteAccessPoint(ctx, client, id, logger)
+ default:
+ return errors.Errorf("unrecognized elastic file system resource type %s", resourceType)
+ }
}
-func removeSharedTag(ctx context.Context, tagClients []*resourcegroupstaggingapi.ResourceGroupsTaggingAPI, key string, logger logrus.FieldLogger) error {
- request := &resourcegroupstaggingapi.UntagResourcesInput{
- TagKeys: []*string{aws.String(key)},
- }
-
- removed := map[string]struct{}{}
- tagClients = append([]*resourcegroupstaggingapi.ResourceGroupsTaggingAPI(nil), tagClients...)
- for len(tagClients) > 0 {
- nextTagClients := tagClients[:0]
- for _, tagClient := range tagClients {
- logger.Debugf("Search for and remove tags in %s matching %s: shared", *tagClient.Config.Region, key)
- arns := []string{}
- err := tagClient.GetResourcesPagesWithContext(
- ctx,
- &resourcegroupstaggingapi.GetResourcesInput{TagFilters: []*resourcegroupstaggingapi.TagFilter{{
- Key: aws.String(key),
- Values: []*string{aws.String("shared")},
- }}},
- func(results *resourcegroupstaggingapi.GetResourcesOutput, lastPage bool) bool {
- for _, resource := range results.ResourceTagMappingList {
- arn := *resource.ResourceARN
- if _, ok := removed[arn]; !ok {
- arns = append(arns, arn)
- }
- }
+func deleteFileSystem(ctx context.Context, client *efs.EFS, fsid string, logger logrus.FieldLogger) error {
+ logger = logger.WithField("Elastic FileSystem ID", fsid)
- return !lastPage
- },
- )
- if err != nil {
- err = errors.Wrap(err, "get tagged resources")
- logger.Info(err)
- nextTagClients = append(nextTagClients, tagClient)
- continue
- }
- if len(arns) == 0 {
- logger.Debugf("No matches in %s for %s: shared, removing client", *tagClient.Config.Region, key)
- continue
- }
- nextTagClients = append(nextTagClients, tagClient)
+ // Delete all MountTargets + AccessPoints under given FS ID
+ mountTargetIDs, err := getMountTargets(ctx, client, fsid)
+ if err != nil {
+ return err
+ }
+ for _, mt := range mountTargetIDs {
+ err := deleteMountTarget(ctx, client, mt, logger)
+ if err != nil {
+ return err
+ }
+ }
+ accessPointIDs, err := getAccessPoints(ctx, client, fsid)
+ if err != nil {
+ return err
+ }
+ for _, ap := range accessPointIDs {
+ err := deleteAccessPoint(ctx, client, ap, logger)
+ if err != nil {
+ return err
+ }
+ }
- for i := 0; i < len(arns); i += 20 {
- request.ResourceARNList = make([]*string, 0, 20)
- for j := 0; i+j < len(arns) && j < 20; j++ {
- request.ResourceARNList = append(request.ResourceARNList, aws.String(arns[i+j]))
- }
- _, err = tagClient.UntagResourcesWithContext(ctx, request)
- if err != nil {
- err = errors.Wrap(err, "untag shared resources")
- logger.Info(err)
+ _, err = client.DeleteFileSystemWithContext(ctx, &efs.DeleteFileSystemInput{FileSystemId: aws.String(fsid)})
+ if err != nil {
+ if err.(awserr.Error).Code() == efs.ErrCodeFileSystemNotFound {
+ return nil
+ }
+ return err
+ }
+
+ logger.Info("Deleted")
+ return nil
+}
+
+func getAccessPoints(ctx context.Context, client *efs.EFS, apID string) ([]string, error) {
+ var accessPointIDs []string
+ err := client.DescribeAccessPointsPagesWithContext(
+ ctx,
+ &efs.DescribeAccessPointsInput{FileSystemId: aws.String(apID)},
+ func(page *efs.DescribeAccessPointsOutput, lastPage bool) bool {
+ for _, ap := range page.AccessPoints {
+ apName := ap.AccessPointId
+ if apName == nil {
continue
}
- for j := 0; i+j < len(arns) && j < 20; j++ {
- arn := arns[i+j]
- logger.WithField("arn", arn).Infof("Removed tag %s: shared", key)
- removed[arn] = exists
- }
+ accessPointIDs = append(accessPointIDs, *apName)
}
+ return !lastPage
+
+ },
+ )
+ if err != nil {
+ return nil, err
+ }
+ return accessPointIDs, nil
+}
+
+func getMountTargets(ctx context.Context, client *efs.EFS, fsid string) ([]string, error) {
+ var mountTargetIDs []string
+ // There is no DescribeMountTargetsPagesWithContext.
+ // Number of Mount Targets should be equal to nr. of subnets that can access the volume, i.e. relatively small.
+ rsp, err := client.DescribeMountTargetsWithContext(
+ ctx,
+ &efs.DescribeMountTargetsInput{FileSystemId: aws.String(fsid)},
+ )
+ if err != nil {
+ return nil, err
+ }
+
+ for _, mt := range rsp.MountTargets {
+ mtName := mt.MountTargetId
+ if mtName == nil {
+ continue
}
- tagClients = nextTagClients
+ mountTargetIDs = append(mountTargetIDs, *mtName)
}
+ return mountTargetIDs, nil
+}
+
+func deleteAccessPoint(ctx context.Context, client *efs.EFS, id string, logger logrus.FieldLogger) error {
+ logger = logger.WithField("AccessPoint ID", id)
+ _, err := client.DeleteAccessPointWithContext(ctx, &efs.DeleteAccessPointInput{AccessPointId: aws.String(id)})
+ if err != nil {
+ if err.(awserr.Error).Code() == efs.ErrCodeAccessPointNotFound {
+ return nil
+ }
+
+ return err
+ }
+
+ logger.Info("Deleted")
+ return nil
+}
+
+func deleteMountTarget(ctx context.Context, client *efs.EFS, id string, logger logrus.FieldLogger) error {
+ logger = logger.WithField("Mount Target ID", id)
+ _, err := client.DeleteMountTargetWithContext(ctx, &efs.DeleteMountTargetInput{MountTargetId: aws.String(id)})
+ if err != nil {
+ if err.(awserr.Error).Code() == efs.ErrCodeMountTargetNotFound {
+ return nil
+ }
+ return err
+ }
+
+ logger.Info("Deleted")
return nil
}
diff --git a/vendor/github.com/openshift/installer/pkg/destroy/aws/shared.go b/vendor/github.com/openshift/installer/pkg/destroy/aws/shared.go
new file mode 100644
index 00000000000..520a2178de5
--- /dev/null
+++ b/vendor/github.com/openshift/installer/pkg/destroy/aws/shared.go
@@ -0,0 +1,282 @@
+package aws
+
+import (
+ "context"
+ "fmt"
+ "strings"
+ "time"
+
+ "github.com/aws/aws-sdk-go/aws"
+ "github.com/aws/aws-sdk-go/aws/arn"
+ "github.com/aws/aws-sdk-go/aws/session"
+ "github.com/aws/aws-sdk-go/service/iam"
+ "github.com/aws/aws-sdk-go/service/resourcegroupstaggingapi"
+ "github.com/aws/aws-sdk-go/service/route53"
+ "github.com/pkg/errors"
+ "github.com/sirupsen/logrus"
+ "k8s.io/apimachinery/pkg/util/wait"
+)
+
+func (o *ClusterUninstaller) removeSharedTags(
+ ctx context.Context,
+ session *session.Session,
+ tagClients []*resourcegroupstaggingapi.ResourceGroupsTaggingAPI,
+ tracker *errorTracker,
+) error {
+ for _, key := range o.clusterOwnedKeys() {
+ if err := o.removeSharedTag(ctx, session, tagClients, key, tracker); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func (o *ClusterUninstaller) clusterOwnedKeys() []string {
+ var keys []string
+ for _, filter := range o.Filters {
+ for key, value := range filter {
+ if !strings.HasPrefix(key, "kubernetes.io/cluster/") {
+ continue
+ }
+ if value != "owned" {
+ o.Logger.Warnf("Ignoring non-owned cluster key %s: %s for shared-tag removal", key, value)
+ }
+ keys = append(keys, key)
+ }
+ }
+ return keys
+}
+
+func (o *ClusterUninstaller) removeSharedTag(ctx context.Context, session *session.Session, tagClients []*resourcegroupstaggingapi.ResourceGroupsTaggingAPI, key string, tracker *errorTracker) error {
+ const sharedValue = "shared"
+
+ request := &resourcegroupstaggingapi.UntagResourcesInput{
+ TagKeys: []*string{aws.String(key)},
+ }
+
+ removed := map[string]struct{}{}
+ tagClients = append([]*resourcegroupstaggingapi.ResourceGroupsTaggingAPI(nil), tagClients...)
+ for len(tagClients) > 0 {
+ nextTagClients := tagClients[:0]
+ for _, tagClient := range tagClients {
+ o.Logger.Debugf("Search for and remove tags in %s matching %s: shared", *tagClient.Config.Region, key)
+ var arns []string
+ err := tagClient.GetResourcesPagesWithContext(
+ ctx,
+ &resourcegroupstaggingapi.GetResourcesInput{TagFilters: []*resourcegroupstaggingapi.TagFilter{{
+ Key: aws.String(key),
+ Values: []*string{aws.String(sharedValue)},
+ }}},
+ func(results *resourcegroupstaggingapi.GetResourcesOutput, lastPage bool) bool {
+ for _, resource := range results.ResourceTagMappingList {
+ arnString := aws.StringValue(resource.ResourceARN)
+ logger := o.Logger.WithField("arn", arnString)
+ parsedARN, err := arn.Parse(arnString)
+ if err != nil {
+ logger.WithError(err).Debug("could not parse ARN")
+ continue
+ }
+ if _, ok := removed[arnString]; !ok {
+ if err := o.cleanSharedARN(ctx, session, parsedARN, logger); err != nil {
+ tracker.suppressWarning(arnString, err, logger)
+ if err := ctx.Err(); err != nil {
+ return false
+ }
+ continue
+ }
+ arns = append(arns, arnString)
+ }
+ }
+
+ return !lastPage
+ },
+ )
+ if err != nil {
+ err = errors.Wrap(err, "get tagged resources")
+ o.Logger.Info(err)
+ nextTagClients = append(nextTagClients, tagClient)
+ continue
+ }
+ if len(arns) == 0 {
+ o.Logger.Debugf("No matches in %s for %s: shared, removing client", *tagClient.Config.Region, key)
+ continue
+ }
+ nextTagClients = append(nextTagClients, tagClient)
+
+ for i := 0; i < len(arns); i += 20 {
+ request.ResourceARNList = make([]*string, 0, 20)
+ for j := 0; i+j < len(arns) && j < 20; j++ {
+ request.ResourceARNList = append(request.ResourceARNList, aws.String(arns[i+j]))
+ }
+ result, err := tagClient.UntagResourcesWithContext(ctx, request)
+ if err != nil {
+ err = errors.Wrap(err, "untag shared resources")
+ o.Logger.Info(err)
+ continue
+ }
+ for _, arn := range request.ResourceARNList {
+ if info, failed := result.FailedResourcesMap[*arn]; failed {
+ o.Logger.WithField("arn", *arn).Infof("Failed to remove tag %s: shared; error=%s", key, *info.ErrorMessage)
+ continue
+ }
+ o.Logger.WithField("arn", *arn).Infof("Removed tag %s: shared", key)
+ removed[*arn] = exists
+ }
+ }
+ }
+ tagClients = nextTagClients
+ }
+
+ iamClient := iam.New(session)
+ iamRoleSearch := &iamRoleSearch{
+ client: iamClient,
+ filters: []Filter{{key: sharedValue}},
+ logger: o.Logger,
+ }
+ o.Logger.Debugf("Search for and remove shared tags for IAM roles matching %s: shared", key)
+ if err := wait.PollImmediateUntil(
+ time.Second*10,
+ func() (bool, error) {
+ _, sharedRoles, err := iamRoleSearch.find(ctx)
+ if err != nil {
+ o.Logger.Infof("Could not search for shared IAM roles: %v", err)
+ return false, nil
+ }
+ done := true
+ for _, role := range sharedRoles {
+ o.Logger.Debugf("Removing the shared tag from the %q IAM role", role)
+ input := &iam.UntagRoleInput{
+ RoleName: &role,
+ TagKeys: []*string{&key},
+ }
+ if _, err := iamClient.UntagRoleWithContext(ctx, input); err != nil {
+ done = false
+ o.Logger.Infof("Could not remove the shared tag from the %q IAM role: %v", role, err)
+ }
+ }
+ return done, nil
+ },
+ ctx.Done(),
+ ); err != nil {
+ return errors.Wrap(err, "problem removing shared tags from IAM roles")
+ }
+
+ return nil
+}
+
+func (o *ClusterUninstaller) cleanSharedARN(ctx context.Context, session *session.Session, arn arn.ARN, logger logrus.FieldLogger) error {
+ switch service := arn.Service; service {
+ case "route53":
+ return o.cleanSharedRoute53(ctx, session, arn, logger)
+ default:
+ logger.Debugf("Nothing to clean for shared %s resource", service)
+ return nil
+ }
+}
+
+func (o *ClusterUninstaller) cleanSharedRoute53(ctx context.Context, session *session.Session, arn arn.ARN, logger logrus.FieldLogger) error {
+ client := route53.New(session)
+
+ resourceType, id, err := splitSlash("resource", arn.Resource)
+ if err != nil {
+ return err
+ }
+ logger = logger.WithField("id", id)
+
+ switch resourceType {
+ case "hostedzone":
+ return o.cleanSharedHostedZone(ctx, client, id, logger)
+ default:
+ logger.Debugf("Nothing to clean for shared %s resource", resourceType)
+ return nil
+ }
+}
+
+func (o *ClusterUninstaller) cleanSharedHostedZone(ctx context.Context, client *route53.Route53, id string, logger logrus.FieldLogger) error {
+ if o.ClusterDomain == "" {
+ logger.Debug("No cluster domain specified in metadata; cannot clean the shared hosted zone")
+ return nil
+ }
+ dottedClusterDomain := o.ClusterDomain + "."
+
+ publicZoneID, err := findAncestorPublicRoute53(ctx, client, dottedClusterDomain, logger)
+ if err != nil {
+ return err
+ }
+
+ var lastError error
+ err = client.ListResourceRecordSetsPagesWithContext(
+ ctx,
+ &route53.ListResourceRecordSetsInput{HostedZoneId: aws.String(id)},
+ func(results *route53.ListResourceRecordSetsOutput, lastPage bool) bool {
+ for _, recordSet := range results.ResourceRecordSets {
+ // skip record sets that are not part of the cluster
+ name := aws.StringValue(recordSet.Name)
+ if !strings.HasSuffix(name, dottedClusterDomain) {
+ continue
+ }
+ if len(name) == len(dottedClusterDomain) {
+ continue
+ }
+ recordSetLogger := logger.WithField(
+ "recordset",
+ fmt.Sprintf("%s (%s)", aws.StringValue(recordSet.Name), aws.StringValue(recordSet.Type)),
+ )
+ // delete any matching record sets in the public hosted zone
+ if publicZoneID != "" {
+ if err := deleteMatchingRecordSetInPublicZone(ctx, client, publicZoneID, recordSet, logger); err != nil {
+ if lastError != nil {
+ logger.Debug(lastError)
+ }
+ lastError = errors.Wrapf(err, "deleting record set matching %#v from public zone %s", recordSet, publicZoneID)
+ // do not delete the record set in the private zone if the delete failed in the public zone;
+ // otherwise the record set in the public zone will get leaked
+ continue
+ }
+ recordSetLogger.Debug("Deleted from public zone")
+ }
+ // delete the record set
+ if err := deleteRoute53RecordSet(ctx, client, id, recordSet, logger); err != nil {
+ if lastError != nil {
+ logger.Debug(lastError)
+ }
+ lastError = errors.Wrapf(err, "deleting record set %#v from zone %s", recordSet, id)
+ }
+ recordSetLogger.Debug("Deleted")
+ }
+ return !lastPage
+ },
+ )
+
+ if lastError != nil {
+ return lastError
+ }
+ if err != nil {
+ return err
+ }
+
+ logger.Info("Cleaned record sets from hosted zone")
+ return nil
+}
+
+func deleteMatchingRecordSetInPublicZone(ctx context.Context, client *route53.Route53, zoneID string, recordSet *route53.ResourceRecordSet, logger logrus.FieldLogger) error {
+ in := &route53.ListResourceRecordSetsInput{
+ HostedZoneId: aws.String(zoneID),
+ MaxItems: aws.String("1"),
+ StartRecordName: recordSet.Name,
+ StartRecordType: recordSet.Type,
+ }
+ out, err := client.ListResourceRecordSetsWithContext(ctx, in)
+ if err != nil {
+ return err
+ }
+ if len(out.ResourceRecordSets) == 0 {
+ return nil
+ }
+ matchingRecordSet := out.ResourceRecordSets[0]
+ if aws.StringValue(matchingRecordSet.Name) != aws.StringValue(recordSet.Name) ||
+ aws.StringValue(matchingRecordSet.Type) != aws.StringValue(recordSet.Type) {
+ return nil
+ }
+ return deleteRoute53RecordSet(ctx, client, zoneID, matchingRecordSet, logger)
+}
diff --git a/vendor/github.com/openshift/installer/pkg/destroy/azure/azure.go b/vendor/github.com/openshift/installer/pkg/destroy/azure/azure.go
index c777d76833f..3a79b255662 100644
--- a/vendor/github.com/openshift/installer/pkg/destroy/azure/azure.go
+++ b/vendor/github.com/openshift/installer/pkg/destroy/azure/azure.go
@@ -8,6 +8,7 @@ import (
"strings"
"time"
+ azurestackdns "github.com/Azure/azure-sdk-for-go/profiles/2018-03-01/dns/mgmt/dns"
"github.com/Azure/azure-sdk-for-go/services/graphrbac/1.6/graphrbac"
"github.com/Azure/azure-sdk-for-go/services/preview/dns/mgmt/2018-03-01-preview/dns"
"github.com/Azure/azure-sdk-for-go/services/privatedns/mgmt/2018-09-01/privatedns"
@@ -35,8 +36,10 @@ type ClusterUninstaller struct {
Authorizer autorest.Authorizer
Environment azureenv.Environment
- InfraID string
- ResourceGroupName string
+ InfraID string
+ ResourceGroupName string
+ ClusterName string
+ BaseDomainResourceGroupName string
Logger logrus.FieldLogger
@@ -78,7 +81,7 @@ func New(logger logrus.FieldLogger, metadata *types.ClusterMetadata) (providers.
if cloudName == "" {
cloudName = azure.PublicCloud
}
- session, err := azuresession.GetSession(cloudName)
+ session, err := azuresession.GetSession(cloudName, metadata.Azure.ARMEndpoint)
if err != nil {
return nil, err
}
@@ -89,14 +92,16 @@ func New(logger logrus.FieldLogger, metadata *types.ClusterMetadata) (providers.
}
return &ClusterUninstaller{
- SubscriptionID: session.Credentials.SubscriptionID,
- TenantID: session.Credentials.TenantID,
- GraphAuthorizer: session.GraphAuthorizer,
- Authorizer: session.Authorizer,
- Environment: session.Environment,
- InfraID: metadata.InfraID,
- ResourceGroupName: group,
- Logger: logger,
+ SubscriptionID: session.Credentials.SubscriptionID,
+ TenantID: session.Credentials.TenantID,
+ GraphAuthorizer: session.GraphAuthorizer,
+ Authorizer: session.Authorizer,
+ Environment: session.Environment,
+ InfraID: metadata.InfraID,
+ ResourceGroupName: group,
+ Logger: logger,
+ BaseDomainResourceGroupName: metadata.Azure.BaseDomainResourceGroupName,
+ ClusterName: metadata.ClusterName,
}, nil
}
@@ -116,7 +121,11 @@ func (o *ClusterUninstaller) Run() error {
waitCtx,
func(ctx context.Context) {
o.Logger.Debugf("deleting public records")
- err = deletePublicRecords(ctx, o.zonesClient, o.recordsClient, o.privateZonesClient, o.privateRecordSetsClient, o.Logger, o.ResourceGroupName)
+ if o.Environment.Name == azure.StackCloud.Name() {
+ err = deleteAzureStackPublicRecords(ctx, o)
+ } else {
+ err = deletePublicRecords(ctx, o.zonesClient, o.recordsClient, o.privateZonesClient, o.privateRecordSetsClient, o.Logger, o.ResourceGroupName)
+ }
if err != nil {
o.Logger.Debug(err)
if isAuthError(err) {
@@ -151,6 +160,9 @@ func (o *ClusterUninstaller) Run() error {
if isAuthError(err) {
cancel()
errs = append(errs, errors.Wrap(err, "unable to authenticate when deleting resource group"))
+ } else if isResourceGroupBlockedError(err) {
+ cancel()
+ errs = append(errs, errors.Wrap(err, "unable to delete resource group, resources in the group are in use by others"))
}
return
}
@@ -196,6 +208,73 @@ func (o *ClusterUninstaller) Run() error {
return utilerrors.NewAggregate(errs)
}
+func deleteAzureStackPublicRecords(ctx context.Context, o *ClusterUninstaller) error {
+ ctx, cancel := context.WithTimeout(ctx, 10*time.Minute)
+ defer cancel()
+
+ logger := o.Logger
+ rgName := o.BaseDomainResourceGroupName
+
+ dnsClient := azurestackdns.NewZonesClientWithBaseURI(o.Environment.ResourceManagerEndpoint, o.SubscriptionID)
+ dnsClient.Authorizer = o.Authorizer
+
+ recordsClient := azurestackdns.NewRecordSetsClientWithBaseURI(o.Environment.ResourceManagerEndpoint, o.SubscriptionID)
+ recordsClient.Authorizer = o.Authorizer
+ clusterName := o.ClusterName
+
+ var errs []error
+
+ zonesPage, err := dnsClient.ListByResourceGroup(ctx, rgName, to.Int32Ptr(100))
+ logger.Debug(err)
+ if err != nil {
+ if zonesPage.Response().IsHTTPStatus(http.StatusNotFound) {
+ logger.Debug("already deleted the AzureStack zones")
+ return utilerrors.NewAggregate(errs)
+ }
+ errs = append(errs, errors.Wrap(err, "failed to list dns zone"))
+ if isAuthError(err) {
+ return err
+ }
+ }
+
+ allZones := sets.NewString()
+ for ; zonesPage.NotDone(); err = zonesPage.NextWithContext(ctx) {
+ if err != nil {
+ errs = append(errs, errors.Wrap(err, "failed to advance to next dns zone"))
+ continue
+ }
+ for _, zone := range zonesPage.Values() {
+ allZones.Insert(to.String(zone.Name))
+ }
+ }
+
+ clusterTag := fmt.Sprintf("kubernetes.io_cluster.%s", clusterName)
+ for _, zone := range allZones.List() {
+ for recordPages, err := recordsClient.ListByDNSZone(ctx, rgName, zone, to.Int32Ptr(100), ""); recordPages.NotDone(); err = recordPages.NextWithContext(ctx) {
+ if err != nil {
+ return err
+ }
+ for _, record := range recordPages.Values() {
+ metadata := to.StringMap(record.Metadata)
+ _, found := metadata[clusterTag]
+ if found {
+ resp, err := recordsClient.Delete(ctx, rgName, zone, to.String(record.Name), toAzureStackRecordType(to.String(record.Type)), "")
+ if err != nil {
+ if wasNotFound(resp.Response) {
+ logger.WithField("record", to.String(record.Name)).Debug("already deleted")
+ continue
+ }
+ return errors.Wrapf(err, "failed to delete record %s in zone %s", to.String(record.Name), zone)
+ }
+ logger.WithField("record", to.String(record.Name)).Info("deleted")
+ }
+ }
+ }
+ }
+
+ return utilerrors.NewAggregate(errs)
+}
+
func deletePublicRecords(ctx context.Context, dnsClient dns.ZonesClient, recordsClient dns.RecordSetsClient, privateDNSClient privatedns.PrivateZonesClient, privateRecordsClient privatedns.RecordSetsClient, logger logrus.FieldLogger, rgName string) error {
ctx, cancel := context.WithTimeout(ctx, 10*time.Minute)
defer cancel()
@@ -377,6 +456,10 @@ func toRecordType(t string) dns.RecordType {
return dns.RecordType(strings.TrimPrefix(t, "Microsoft.Network/dnszones/"))
}
+func toAzureStackRecordType(t string) azurestackdns.RecordType {
+ return azurestackdns.RecordType(strings.TrimPrefix(t, "Microsoft.Network/dnszones/"))
+}
+
func deleteResourceGroup(ctx context.Context, client resources.GroupsClient, logger logrus.FieldLogger, name string) error {
logger = logger.WithField("resource group", name)
ctx, cancel := context.WithTimeout(ctx, 30*time.Minute)
@@ -425,6 +508,24 @@ func isAuthError(err error) bool {
return false
}
+func isResourceGroupBlockedError(err error) bool {
+ if err == nil {
+ return false
+ }
+
+ var dErr autorest.DetailedError
+ if errors.As(err, &dErr) {
+ switch statusCode := dErr.StatusCode.(type) {
+ case int:
+ if statusCode == 409 {
+ return true
+ }
+ }
+ }
+
+ return false
+}
+
func deleteApplicationRegistrations(ctx context.Context, appClient graphrbac.ApplicationsClient, spClient graphrbac.ServicePrincipalsClient, logger logrus.FieldLogger, infraID string) error {
errorList := []error{}
diff --git a/vendor/github.com/openshift/installer/pkg/destroy/gcp/disk.go b/vendor/github.com/openshift/installer/pkg/destroy/gcp/disk.go
index a8a7ed4aa69..efe4ea29849 100644
--- a/vendor/github.com/openshift/installer/pkg/destroy/gcp/disk.go
+++ b/vendor/github.com/openshift/installer/pkg/destroy/gcp/disk.go
@@ -10,7 +10,7 @@ import (
)
func (o *ClusterUninstaller) listDisks() ([]cloudResource, error) {
- return o.listDisksWithFilter("items/*/disks(name,zone),nextPageToken", o.clusterIDFilter(), nil)
+ return o.listDisksWithFilter("items/*/disks(name,zone),nextPageToken", o.clusterLabelOrClusterIDFilter(), nil)
}
// listDisksWithFilter lists disks in the project that satisfy the filter criteria.
diff --git a/vendor/github.com/openshift/installer/pkg/destroy/gcp/gcp.go b/vendor/github.com/openshift/installer/pkg/destroy/gcp/gcp.go
index d9cd454e609..78cb9dff8e4 100644
--- a/vendor/github.com/openshift/installer/pkg/destroy/gcp/gcp.go
+++ b/vendor/github.com/openshift/installer/pkg/destroy/gcp/gcp.go
@@ -114,6 +114,10 @@ func (o *ClusterUninstaller) Run() error {
time.Second*10,
o.destroyCluster,
)
+ if err != nil {
+ return errors.Wrap(err, "failed to destroy cluster")
+ }
+
return nil
}
@@ -177,11 +181,15 @@ func (o *ClusterUninstaller) isClusterResource(name string) bool {
}
func (o *ClusterUninstaller) clusterIDFilter() string {
- return fmt.Sprintf("name eq \"%s-.*\"", o.ClusterID)
+ return fmt.Sprintf("name : \"%s-*\"", o.ClusterID)
}
func (o *ClusterUninstaller) clusterLabelFilter() string {
- return fmt.Sprintf("labels.kubernetes-io-cluster-%s eq \"owned\"", o.ClusterID)
+ return fmt.Sprintf("labels.kubernetes-io-cluster-%s = \"owned\"", o.ClusterID)
+}
+
+func (o *ClusterUninstaller) clusterLabelOrClusterIDFilter() string {
+ return fmt.Sprintf("(%s) OR (%s)", o.clusterIDFilter(), o.clusterLabelFilter())
}
func isNoOp(err error) bool {
diff --git a/vendor/github.com/openshift/installer/pkg/destroy/openstack/openstack.go b/vendor/github.com/openshift/installer/pkg/destroy/openstack/openstack.go
index f3d5734255b..c47fa1c595e 100644
--- a/vendor/github.com/openshift/installer/pkg/destroy/openstack/openstack.go
+++ b/vendor/github.com/openshift/installer/pkg/destroy/openstack/openstack.go
@@ -9,6 +9,7 @@ import (
openstackdefaults "github.com/openshift/installer/pkg/types/openstack/defaults"
"github.com/gophercloud/gophercloud"
+ "github.com/gophercloud/gophercloud/openstack/blockstorage/v3/snapshots"
"github.com/gophercloud/gophercloud/openstack/blockstorage/v3/volumes"
"github.com/gophercloud/gophercloud/openstack/compute/v2/extensions/servergroups"
"github.com/gophercloud/gophercloud/openstack/compute/v2/servers"
@@ -26,6 +27,8 @@ import (
"github.com/gophercloud/gophercloud/openstack/networking/v2/subnets"
"github.com/gophercloud/gophercloud/openstack/objectstorage/v1/containers"
"github.com/gophercloud/gophercloud/openstack/objectstorage/v1/objects"
+ "github.com/gophercloud/gophercloud/openstack/sharedfilesystems/v2/shares"
+ sharesnapshots "github.com/gophercloud/gophercloud/openstack/sharedfilesystems/v2/snapshots"
"github.com/gophercloud/gophercloud/pagination"
"github.com/gophercloud/utils/openstack/clientconfig"
"github.com/pkg/errors"
@@ -35,6 +38,8 @@ import (
)
const (
+ cinderCSIClusterIDKey = "cinder.csi.openstack.org/cluster"
+ manilaCSIClusterIDKey = "manila.csi.openstack.org/cluster"
minOctaviaVersionWithTagSupport = "v2.5"
)
@@ -84,26 +89,27 @@ func (o *ClusterUninstaller) Run() error {
// deleteFuncs contains the functions that will be launched as
// goroutines.
deleteFuncs := map[string]deleteFunc{
- "deleteServers": deleteServers,
- "deleteServerGroups": deleteServerGroups,
- "deleteTrunks": deleteTrunks,
- "deleteLoadBalancers": deleteLoadBalancers,
- "deletePorts": deletePorts,
- "deleteSecurityGroups": deleteSecurityGroups,
- "deleteRouters": deleteRouters,
- "deleteSubnets": deleteSubnets,
- "deleteSubnetPools": deleteSubnetPools,
- "deleteNetworks": deleteNetworks,
- "deleteContainers": deleteContainers,
- "deleteVolumes": deleteVolumes,
- "deleteFloatingIPs": deleteFloatingIPs,
- "deleteImages": deleteImages,
+ "deleteServers": deleteServers,
+ "deleteServerGroups": deleteServerGroups,
+ "deleteTrunks": deleteTrunks,
+ "deleteLoadBalancers": deleteLoadBalancers,
+ "deletePorts": deletePorts,
+ "deleteSecurityGroups": deleteSecurityGroups,
+ "clearRoutersInterfaces": clearRoutersInferfaces,
+ "deleteSubnets": deleteSubnets,
+ "deleteSubnetPools": deleteSubnetPools,
+ "deleteNetworks": deleteNetworks,
+ "deleteContainers": deleteContainers,
+ "deleteVolumes": deleteVolumes,
+ "deleteShares": deleteShares,
+ "deleteFloatingIPs": deleteFloatingIPs,
+ "deleteImages": deleteImages,
}
returnChannel := make(chan string)
opts := openstackdefaults.DefaultClientOpts(o.Cloud)
- err := cleanRouterRunner(opts, o.Filter, o.Logger)
+ err := cleanCustomRouterRunner(opts, o.Filter, o.Logger)
if err != nil {
return err
}
@@ -119,6 +125,14 @@ func (o *ClusterUninstaller) Run() error {
o.Logger.Debugf("goroutine %v complete", res)
}
+ // we want to remove routers as the last thing as it requires detaching the
+ // FIPs and that will cause it impossible to track which FIPs are tied to
+ // LBs being deleted.
+ err = deleteRouterRunner(opts, o.Filter, o.Logger)
+ if err != nil {
+ return err
+ }
+
// we need to untag the custom network if it was provided by the user
err = untagRunner(opts, o.InfraID, o.Logger)
if err != nil {
@@ -223,6 +237,8 @@ func deleteServers(opts *clientconfig.ClientOpts, filter Filter, logger logrus.F
}
filteredServers := filterObjects(serverObjects, filter)
+ numberToDelete := len(filteredServers)
+ numberDeleted := 0
for _, server := range filteredServers {
logger.Debugf("Deleting Server %q", server.ID)
err = servers.Delete(conn, server.ID).ExtractErr()
@@ -230,13 +246,15 @@ func deleteServers(opts *clientconfig.ClientOpts, filter Filter, logger logrus.F
// Ignore the error if the server cannot be found and return with an appropriate message if it's another type of error
var gerr gophercloud.ErrDefault404
if !errors.As(err, &gerr) {
+ // Just log the error and move on to the next server
logger.Errorf("Deleting server %q failed: %v", server.ID, err)
- return false, nil
+ continue
}
logger.Debugf("Cannot find server %q. It's probably already been deleted.", server.ID)
}
+ numberDeleted++
}
- return len(filteredServers) == 0, nil
+ return numberDeleted == numberToDelete, nil
}
func deleteServerGroups(opts *clientconfig.ClientOpts, filter Filter, logger logrus.FieldLogger) (bool, error) {
@@ -259,7 +277,7 @@ func deleteServerGroups(opts *clientconfig.ClientOpts, filter Filter, logger log
return false, nil
}
- allPages, err := servergroups.List(conn).AllPages()
+ allPages, err := servergroups.List(conn, nil).AllPages()
if err != nil {
logger.Error(err)
return false, nil
@@ -278,6 +296,8 @@ func deleteServerGroups(opts *clientconfig.ClientOpts, filter Filter, logger log
}
}
+ numberToDelete := len(filteredGroups)
+ numberDeleted := 0
for _, serverGroup := range filteredGroups {
logger.Debugf("Deleting Server Group %q", serverGroup.ID)
if err = servergroups.Delete(conn, serverGroup.ID).ExtractErr(); err != nil {
@@ -286,13 +306,15 @@ func deleteServerGroups(opts *clientconfig.ClientOpts, filter Filter, logger log
// type of error
var gerr gophercloud.ErrDefault404
if !errors.As(err, &gerr) {
+ // Just log the error and move on to the next server group
logger.Errorf("Deleting server group %q failed: %v", serverGroup.ID, err)
- return false, nil
+ continue
}
logger.Debugf("Cannot find server group %q. It's probably already been deleted.", serverGroup.ID)
}
+ numberDeleted++
}
- return len(filteredGroups) == 0, nil
+ return numberDeleted == numberToDelete, nil
}
func deletePorts(opts *clientconfig.ClientOpts, filter Filter, logger logrus.FieldLogger) (bool, error) {
@@ -320,6 +342,8 @@ func deletePorts(opts *clientconfig.ClientOpts, filter Filter, logger logrus.Fie
logger.Error(err)
return false, nil
}
+ numberToDelete := len(allPorts)
+ numberDeleted := 0
for _, port := range allPorts {
listOpts := floatingips.ListOpts{
PortID: port.ID,
@@ -343,8 +367,9 @@ func deletePorts(opts *clientconfig.ClientOpts, filter Filter, logger logrus.Fie
// Ignore the error if the floating ip cannot be found and return with an appropriate message if it's another type of error
var gerr gophercloud.ErrDefault404
if !errors.As(err, &gerr) {
+ // Just log the error and move on to the next port
logger.Errorf("While deleting port %q, the update of the floating IP %q failed with error: %v", port.ID, fip.ID, err)
- return false, nil
+ continue
}
logger.Debugf("Cannot find floating ip %q. It's probably already been deleted.", fip.ID)
}
@@ -354,11 +379,15 @@ func deletePorts(opts *clientconfig.ClientOpts, filter Filter, logger logrus.Fie
err = ports.Delete(conn, port.ID).ExtractErr()
if err != nil {
// This can fail when port is still in use so return/retry
+ // Just log the error and move on to the next port
logger.Debugf("Deleting Port %q failed with error: %v", port.ID, err)
- return false, nil
+ // Try to delete associated trunk
+ deleteAssociatedTrunk(conn, logger, port.ID)
+ continue
}
+ numberDeleted++
}
- return len(allPorts) == 0, nil
+ return numberDeleted == numberToDelete, nil
}
func deleteSecurityGroups(opts *clientconfig.ClientOpts, filter Filter, logger logrus.FieldLogger) (bool, error) {
@@ -386,6 +415,8 @@ func deleteSecurityGroups(opts *clientconfig.ClientOpts, filter Filter, logger l
logger.Error(err)
return false, nil
}
+ numberToDelete := len(allGroups)
+ numberDeleted := 0
for _, group := range allGroups {
logger.Debugf("Deleting Security Group: %q", group.ID)
err = sg.Delete(conn, group.ID).ExtractErr()
@@ -394,60 +425,78 @@ func deleteSecurityGroups(opts *clientconfig.ClientOpts, filter Filter, logger l
var gerr gophercloud.ErrDefault404
if !errors.As(err, &gerr) {
// This can fail when sg is still in use by servers
+ // Just log the error and move on to the next security group
logger.Debugf("Deleting Security Group %q failed with error: %v", group.ID, err)
- return false, nil
+ continue
}
logger.Debugf("Cannot find security group %q. It's probably already been deleted.", group.ID)
}
+ numberDeleted++
}
- return len(allGroups) == 0, nil
+ return numberDeleted == numberToDelete, nil
}
-func updateFips(routerID string, opts *clientconfig.ClientOpts, filter Filter, logger logrus.FieldLogger) error {
- // If a user provisioned floating ip was used, it needs to be dissociated
- // Any floating Ip's associated with routers that are going to be deleted will be dissociated
+func updateFips(allFIPs []floatingips.FloatingIP, opts *clientconfig.ClientOpts, filter Filter, logger logrus.FieldLogger) error {
conn, err := clientconfig.NewServiceClient("network", opts)
if err != nil {
return err
}
- fipOpts := floatingips.ListOpts{
- RouterID: routerID,
+ for _, fip := range allFIPs {
+ _, err := floatingips.Update(conn, fip.ID, floatingips.UpdateOpts{}).Extract()
+ if err != nil {
+ // Ignore the error if the resource cannot be found and return with an appropriate message if it's another type of error
+ var gerr gophercloud.ErrDefault404
+ if !errors.As(err, &gerr) {
+ logger.Errorf("Updating floating IP %q for Router failed: %v", fip.ID, err)
+ return err
+ }
+ logger.Debugf("Cannot find floating ip %q. It's probably already been deleted.", fip.ID)
+ }
}
+ return nil
+}
- fipPages, err := floatingips.List(conn, fipOpts).AllPages()
+// deletePortFIPs looks up FIPs associated to the port and attempts to delete them
+func deletePortFIPs(portID string, opts *clientconfig.ClientOpts, logger logrus.FieldLogger) error {
+ conn, err := clientconfig.NewServiceClient("network", opts)
if err != nil {
return err
}
- allFIPs, err := floatingips.ExtractFloatingIPs(fipPages)
+ fipPages, err := floatingips.List(conn, floatingips.ListOpts{PortID: portID}).AllPages()
+
+ if err != nil {
+ logger.Error(err)
+ return err
+ }
+
+ fips, err := floatingips.ExtractFloatingIPs(fipPages)
if err != nil {
+ logger.Error(err)
return err
}
- for _, fip := range allFIPs {
- _, err := floatingips.Update(conn, fip.ID, floatingips.UpdateOpts{}).Extract()
+ for _, fip := range fips {
+ logger.Debugf("Deleting FIP %q", fip.ID)
+ err = floatingips.Delete(conn, fip.ID).ExtractErr()
if err != nil {
- // Ignore the error if the resource cannot be found and return with an appropriate message if it's another type of error
+ // Ignore the error if the FIP cannot be found
var gerr gophercloud.ErrDefault404
if !errors.As(err, &gerr) {
- logger.Errorf("Updating floating IP %q for Router %q failed: %v", fip.ID, routerID, err)
+ logger.Errorf("Deleting FIP %q failed: %v", fip.ID, err)
return err
}
- logger.Debugf("Cannot find floating ip %q. It's probably already been deleted.", fip.ID)
+ logger.Debugf("Cannot find FIP %q. It's probably already been deleted.", fip.ID)
}
}
return nil
}
-func deleteRouters(opts *clientconfig.ClientOpts, filter Filter, logger logrus.FieldLogger) (bool, error) {
- logger.Debug("Deleting openstack routers")
- defer logger.Debugf("Exiting deleting openstack routers")
-
+func getRouters(opts *clientconfig.ClientOpts, filter Filter, logger logrus.FieldLogger) ([]routers.Router, error) {
conn, err := clientconfig.NewServiceClient("network", opts)
if err != nil {
- logger.Error(err)
- return false, nil
+ return nil, err
}
tags := filterTags(filter)
listOpts := routers.ListOpts{
@@ -455,22 +504,90 @@ func deleteRouters(opts *clientconfig.ClientOpts, filter Filter, logger logrus.F
}
allPages, err := routers.List(conn, listOpts).AllPages()
+ if err != nil {
+ return nil, err
+ }
+
+ allRouters, err := routers.ExtractRouters(allPages)
+ if err != nil {
+ return nil, err
+ }
+ return allRouters, nil
+}
+
+func clearRoutersInferfaces(opts *clientconfig.ClientOpts, filter Filter, logger logrus.FieldLogger) (bool, error) {
+ logger.Debug("Clearing openstack routers interfaces")
+ defer logger.Debugf("Exiting clearing openstack routers interfaces")
+
+ conn, err := clientconfig.NewServiceClient("network", opts)
+ if err != nil {
+ return false, err
+ }
+
+ allRouters, err := getRouters(opts, filter, logger)
if err != nil {
logger.Error(err)
return false, nil
}
- allRouters, err := routers.ExtractRouters(allPages)
+ numberToClear := len(allRouters)
+ numberCleared := 0
+ for _, router := range allRouters {
+ removed, err := removeRouterInterfaces(conn, filter, router, logger)
+ if err != nil {
+ logger.Debug(err)
+ continue
+ }
+ if !removed {
+ continue
+ }
+
+ numberCleared++
+ }
+ return numberCleared == numberToClear, nil
+}
+
+func deleteRouters(opts *clientconfig.ClientOpts, filter Filter, logger logrus.FieldLogger) (bool, error) {
+ logger.Debug("Deleting openstack routers")
+ defer logger.Debugf("Exiting deleting openstack routers")
+
+ conn, err := clientconfig.NewServiceClient("network", opts)
if err != nil {
logger.Error(err)
return false, nil
}
+
+ allRouters, err := getRouters(opts, filter, logger)
+ if err != nil {
+ logger.Error(err)
+ return false, nil
+ }
+
+ numberToDelete := len(allRouters)
+ numberDeleted := 0
for _, router := range allRouters {
- err = updateFips(router.ID, opts, filter, logger)
+ fipOpts := floatingips.ListOpts{
+ RouterID: router.ID,
+ }
+
+ fipPages, err := floatingips.List(conn, fipOpts).AllPages()
+ if err != nil {
+ logger.Error(err)
+ return false, nil
+ }
+
+ allFIPs, err := floatingips.ExtractFloatingIPs(fipPages)
if err != nil {
logger.Error(err)
return false, nil
}
+ // If a user provisioned floating ip was used, it needs to be dissociated
+ // Any floating Ip's associated with routers that are going to be deleted will be dissociated
+ err = updateFips(allFIPs, opts, filter, logger)
+ if err != nil {
+ logger.Error(err)
+ continue
+ }
// Clean Gateway interface
updateOpts := routers.UpdateOpts{
GatewayInfo: &routers.GatewayInfo{},
@@ -481,24 +598,21 @@ func deleteRouters(opts *clientconfig.ClientOpts, filter Filter, logger logrus.F
logger.Error(err)
}
- _, err = removeRouterInterfaces(conn, filter, router.ID, logger)
- if err != nil {
- return false, nil
- }
-
logger.Debugf("Deleting Router %q", router.ID)
err = routers.Delete(conn, router.ID).ExtractErr()
if err != nil {
// Ignore the error if the router cannot be found and return with an appropriate message if it's another type of error
var gerr gophercloud.ErrDefault404
if !errors.As(err, &gerr) {
+ // Just log the error and move on to the next router
logger.Errorf("Deleting router %q failed: %v", router.ID, err)
- return false, nil
+ continue
}
logger.Debugf("Cannot find router %q. It's probably already been deleted.", router.ID)
}
+ numberDeleted++
}
- return len(allRouters) == 0, nil
+ return numberDeleted == numberToDelete, nil
}
func deleteCustomRouterInterfaces(opts *clientconfig.ClientOpts, filter Filter, logger logrus.FieldLogger) (bool, error) {
@@ -576,23 +690,40 @@ func deleteCustomRouterInterfaces(opts *clientconfig.ClientOpts, filter Filter,
}
// Discover router by interface from the primary Network
- routerID, err := getRouterByPort(conn, allPrimayNetworkPorts)
+ router, err := getRouterByPort(conn, allPrimayNetworkPorts)
if err != nil {
logger.Debug(err)
return false, nil
}
- if routerID == "" {
+ if router.ID == "" {
return true, nil
}
- // disassociate any fips linked to the router
- err = updateFips(routerID, opts, filter, logger)
+ fipOpts := floatingips.ListOpts{
+ RouterID: router.ID,
+ Tags: strings.Join(tags, ","),
+ }
+
+ fipPages, err := floatingips.List(conn, fipOpts).AllPages()
+ if err != nil {
+ logger.Error(err)
+ return false, nil
+ }
+
+ allFIPs, err := floatingips.ExtractFloatingIPs(fipPages)
+ if err != nil {
+ logger.Error(err)
+ return false, nil
+ }
+
+ // disassociate any fips created by Kuryr linked to the router
+ err = updateFips(allFIPs, opts, filter, logger)
if err != nil {
logger.Error(err)
return false, nil
}
- removed, err := removeRouterInterfaces(conn, filter, routerID, logger)
+ removed, err := removeRouterInterfaces(conn, filter, router, logger)
if err != nil {
logger.Debug(err)
return false, nil
@@ -600,10 +731,10 @@ func deleteCustomRouterInterfaces(opts *clientconfig.ClientOpts, filter Filter,
return removed, nil
}
-func removeRouterInterfaces(client *gophercloud.ServiceClient, filter Filter, routerID string, logger logrus.FieldLogger) (bool, error) {
+func removeRouterInterfaces(client *gophercloud.ServiceClient, filter Filter, router routers.Router, logger logrus.FieldLogger) (bool, error) {
// Get router interface ports
portListOpts := ports.ListOpts{
- DeviceID: routerID,
+ DeviceID: router.ID,
}
allPagesPort, err := ports.List(client, portListOpts).AllPages()
if err != nil {
@@ -632,13 +763,18 @@ func removeRouterInterfaces(client *gophercloud.ServiceClient, filter Filter, ro
return false, errors.Wrap(err, "failed to extract subnets list")
}
+ clusterTag := "openshiftClusterID=" + filter["openshiftClusterID"]
+ clusterRouter := isClusterRouter(clusterTag, router.Tags)
+
var customInterfaces []ports.Port
// map to keep track of whethere interface for subnet was already removed
removedSubnets := make(map[string]bool)
for _, port := range allPorts {
for _, IP := range port.FixedIPs {
- // Skip removal if interface is not handled by the Cluster
- if !isClusterSubnet(allSubnets, IP.SubnetID) {
+
+ // Skip removal if Router was not created by CNO or installer and
+ // interface is not handled by the Cluster
+ if !clusterRouter && !isClusterSubnet(allSubnets, IP.SubnetID) {
customInterfaces = append(customInterfaces, port)
continue
}
@@ -646,16 +782,16 @@ func removeRouterInterfaces(client *gophercloud.ServiceClient, filter Filter, ro
removeOpts := routers.RemoveInterfaceOpts{
SubnetID: IP.SubnetID,
}
- logger.Debugf("Removing Subnet %q from Router %q", IP.SubnetID, routerID)
- _, err := routers.RemoveInterface(client, routerID, removeOpts).Extract()
+ logger.Debugf("Removing Subnet %q from Router %q", IP.SubnetID, router.ID)
+ _, err := routers.RemoveInterface(client, router.ID, removeOpts).Extract()
if err != nil {
var gerr gophercloud.ErrDefault404
if !errors.As(err, &gerr) {
// This can fail when subnet is still in use
- logger.Debugf("Removing Subnet %q from Router %q failed: %v", IP.SubnetID, routerID, err)
+ logger.Debugf("Removing Subnet %q from Router %q failed: %v", IP.SubnetID, router.ID, err)
return false, nil
}
- logger.Debugf("Cannot find subnet %q. It's probably already been removed from router %q.", IP.SubnetID, routerID)
+ logger.Debugf("Cannot find subnet %q. It's probably already been removed from router %q.", IP.SubnetID, router.ID)
}
removedSubnets[IP.SubnetID] = true
}
@@ -665,25 +801,35 @@ func removeRouterInterfaces(client *gophercloud.ServiceClient, filter Filter, ro
return len(allPorts) == len(customInterfaces), nil
}
-func getRouterByPort(client *gophercloud.ServiceClient, allPorts []ports.Port) (string, error) {
+func isClusterRouter(clusterTag string, tags []string) bool {
+ for _, tag := range tags {
+ if clusterTag == tag {
+ return true
+ }
+ }
+ return false
+}
+
+func getRouterByPort(client *gophercloud.ServiceClient, allPorts []ports.Port) (routers.Router, error) {
+ empty := routers.Router{}
for _, port := range allPorts {
if port.DeviceID != "" {
page, err := routers.List(client, routers.ListOpts{ID: port.DeviceID}).AllPages()
if err != nil {
- return "", errors.Wrap(err, "failed to get router list")
+ return empty, errors.Wrap(err, "failed to get router list")
}
routerList, err := routers.ExtractRouters(page)
if err != nil {
- return "", errors.Wrap(err, "failed to extract routers list")
+ return empty, errors.Wrap(err, "failed to extract routers list")
}
if len(routerList) == 1 {
- return routerList[0].ID, nil
+ return routerList[0], nil
}
}
}
- return "", nil
+ return empty, nil
}
func deleteLeftoverLoadBalancers(opts *clientconfig.ClientOpts, logger logrus.FieldLogger, networkID string) {
@@ -722,14 +868,23 @@ func deleteLeftoverLoadBalancers(opts *clientconfig.ClientOpts, logger logrus.Fi
continue
}
logger.Debugf("Deleting LoadBalancer %q", loadbalancer.ID)
+
+ // Cascade delete of an LB won't remove the associated FIP, we have to do it ourselves.
+ err := deletePortFIPs(loadbalancer.VipPortID, opts, logger)
+ if err != nil {
+ // Go to the next LB, but do not delete current one or we'll lose reference to the FIP that failed deletion.
+ continue
+ }
+
err = loadbalancers.Delete(conn, loadbalancer.ID, deleteOpts).ExtractErr()
if err != nil {
// Ignore the error if the load balancer cannot be found
var gerr gophercloud.ErrDefault404
if !errors.As(err, &gerr) {
// This can fail when the load balancer is still in use so return/retry
+ // Just log the error and move on to the next LB
logger.Debugf("Deleting load balancer %q failed: %v", loadbalancer.ID, err)
- return
+ continue
}
logger.Debugf("Cannot find load balancer %q. It's probably already been deleted.", loadbalancer.ID)
}
@@ -771,6 +926,9 @@ func deleteSubnets(opts *clientconfig.ClientOpts, filter Filter, logger logrus.F
logger.Error(err)
return false, nil
}
+
+ numberToDelete := len(allSubnets)
+ numberDeleted := 0
for _, subnet := range allSubnets {
logger.Debugf("Deleting Subnet: %q", subnet.ID)
err = subnets.Delete(conn, subnet.ID).ExtractErr()
@@ -779,13 +937,15 @@ func deleteSubnets(opts *clientconfig.ClientOpts, filter Filter, logger logrus.F
var gerr gophercloud.ErrDefault404
if !errors.As(err, &gerr) {
// This can fail when subnet is still in use
+ // Just log the error and move on to the next subnet
logger.Debugf("Deleting Subnet %q failed: %v", subnet.ID, err)
- return false, nil
+ continue
}
logger.Debugf("Cannot find subnet %q. It's probably already been deleted.", subnet.ID)
}
+ numberDeleted++
}
- return len(allSubnets) == 0, nil
+ return numberDeleted == numberToDelete, nil
}
func deleteNetworks(opts *clientconfig.ClientOpts, filter Filter, logger logrus.FieldLogger) (bool, error) {
@@ -813,6 +973,8 @@ func deleteNetworks(opts *clientconfig.ClientOpts, filter Filter, logger logrus.
logger.Error(err)
return false, nil
}
+ numberToDelete := len(allNetworks)
+ numberDeleted := 0
for _, network := range allNetworks {
logger.Debugf("Deleting network: %q", network.ID)
err = networks.Delete(conn, network.ID).ExtractErr()
@@ -821,15 +983,17 @@ func deleteNetworks(opts *clientconfig.ClientOpts, filter Filter, logger logrus.
var gerr gophercloud.ErrDefault404
if !errors.As(err, &gerr) {
// This can fail when network is still in use
+ // Just log the error and move on to the next port
logger.Debugf("Deleting Network %q failed: %v", network.ID, err)
// Try to delete eventual leftover load balancers
deleteLeftoverLoadBalancers(opts, logger, network.ID)
- return false, nil
+ continue
}
logger.Debugf("Cannot find network %q. It's probably already been deleted.", network.ID)
}
+ numberDeleted++
}
- return len(allNetworks) == 0, nil
+ return numberDeleted == numberToDelete, nil
}
func deleteContainers(opts *clientconfig.ClientOpts, filter Filter, logger logrus.FieldLogger) (bool, error) {
@@ -976,6 +1140,8 @@ func deleteTrunks(opts *clientconfig.ClientOpts, filter Filter, logger logrus.Fi
logger.Error(err)
return false, nil
}
+ numberToDelete := len(allTrunks)
+ numberDeleted := 0
for _, trunk := range allTrunks {
logger.Debugf("Deleting Trunk %q", trunk.ID)
err = trunks.Delete(conn, trunk.ID).ExtractErr()
@@ -984,13 +1150,56 @@ func deleteTrunks(opts *clientconfig.ClientOpts, filter Filter, logger logrus.Fi
var gerr gophercloud.ErrDefault404
if !errors.As(err, &gerr) {
// This can fail when the trunk is still in use so return/retry
+ // Just log the error and move on to the next trunk
logger.Debugf("Deleting Trunk %q failed: %v", trunk.ID, err)
- return false, nil
+ continue
}
logger.Debugf("Cannot find trunk %q. It's probably already been deleted.", trunk.ID)
}
+ numberDeleted++
}
- return len(allTrunks) == 0, nil
+ return numberDeleted == numberToDelete, nil
+}
+
+func deleteAssociatedTrunk(conn *gophercloud.ServiceClient, logger logrus.FieldLogger, portID string) {
+ logger.Debug("Deleting associated trunk")
+ defer logger.Debugf("Exiting deleting associated trunk")
+
+ listOpts := trunks.ListOpts{
+ PortID: portID,
+ }
+ allPages, err := trunks.List(conn, listOpts).AllPages()
+ if err != nil {
+ var gerr gophercloud.ErrDefault404
+ if errors.As(err, &gerr) {
+ logger.Debug("Skip trunk deletion because the cloud doesn't support trunk ports")
+ return
+ }
+ logger.Error(err)
+ return
+ }
+
+ allTrunks, err := trunks.ExtractTrunks(allPages)
+ if err != nil {
+ logger.Error(err)
+ return
+ }
+ for _, trunk := range allTrunks {
+ logger.Debugf("Deleting Trunk %q", trunk.ID)
+ err = trunks.Delete(conn, trunk.ID).ExtractErr()
+ if err != nil {
+ // Ignore the error if the trunk cannot be found
+ var gerr gophercloud.ErrDefault404
+ if !errors.As(err, &gerr) {
+ // This can fail when the trunk is still in use so return/retry
+ // Just log the error and move on to the next trunk
+ logger.Debugf("Deleting Trunk %q failed: %v", trunk.ID, err)
+ continue
+ }
+ logger.Debugf("Cannot find trunk %q. It's probably already been deleted.", trunk.ID)
+ }
+ }
+ return
}
func deleteLoadBalancers(opts *clientconfig.ClientOpts, filter Filter, logger logrus.FieldLogger) (bool, error) {
@@ -1068,6 +1277,8 @@ func deleteLoadBalancers(opts *clientconfig.ClientOpts, filter Filter, logger lo
deleteOpts := loadbalancers.DeleteOpts{
Cascade: true,
}
+ numberToDelete := len(allLoadBalancers)
+ numberDeleted := 0
for _, loadbalancer := range allLoadBalancers {
logger.Debugf("Deleting LoadBalancer %q", loadbalancer.ID)
err = loadbalancers.Delete(conn, loadbalancer.ID, deleteOpts).ExtractErr()
@@ -1076,14 +1287,16 @@ func deleteLoadBalancers(opts *clientconfig.ClientOpts, filter Filter, logger lo
var gerr gophercloud.ErrDefault404
if !errors.As(err, &gerr) {
// This can fail when the load balancer is still in use so return/retry
+ // Just log the error and move on to the next port
logger.Debugf("Deleting load balancer %q failed: %v", loadbalancer.ID, err)
- return false, nil
+ continue
}
logger.Debugf("Cannot find load balancer %q. It's probably already been deleted.", loadbalancer.ID)
}
+ numberDeleted++
}
- return len(allLoadBalancers) == 0, nil
+ return numberDeleted == numberToDelete, nil
}
func deleteSubnetPools(opts *clientconfig.ClientOpts, filter Filter, logger logrus.FieldLogger) (bool, error) {
@@ -1111,6 +1324,8 @@ func deleteSubnetPools(opts *clientconfig.ClientOpts, filter Filter, logger logr
logger.Error(err)
return false, nil
}
+ numberToDelete := len(allSubnetPools)
+ numberDeleted := 0
for _, subnetPool := range allSubnetPools {
logger.Debugf("Deleting Subnet Pool %q", subnetPool.ID)
err = subnetpools.Delete(conn, subnetPool.ID).ExtractErr()
@@ -1118,20 +1333,21 @@ func deleteSubnetPools(opts *clientconfig.ClientOpts, filter Filter, logger logr
// Ignore the error if the subnet pool cannot be found
var gerr gophercloud.ErrDefault404
if !errors.As(err, &gerr) {
+ // Just log the error and move on to the next subnet pool
logger.Debugf("Deleting subnet pool %q failed: %v", subnetPool.ID, err)
- return false, nil
+ continue
}
logger.Debugf("Cannot find subnet pool %q. It's probably already been deleted.", subnetPool.ID)
}
+ numberDeleted++
}
- return len(allSubnetPools) == 0, nil
+ return numberDeleted == numberToDelete, nil
}
func deleteVolumes(opts *clientconfig.ClientOpts, filter Filter, logger logrus.FieldLogger) (bool, error) {
logger.Debug("Deleting OpenStack volumes")
defer logger.Debugf("Exiting deleting OpenStack volumes")
- // We need to delete all volumes that have names with the cluster ID as a prefix
var clusterID string
for k, v := range filter {
if strings.ToLower(k) == "openshiftclusterid" {
@@ -1162,30 +1378,198 @@ func deleteVolumes(opts *clientconfig.ClientOpts, filter Filter, logger logrus.F
volumeIDs := []string{}
for _, volume := range allVolumes {
+ // First, we need to delete all volumes that have names with the cluster ID as a prefix.
+ // They are created by the in-tree Cinder provisioner.
if strings.HasPrefix(volume.Name, clusterID) {
volumeIDs = append(volumeIDs, volume.ID)
}
+ // Second, we need to delete volumes created by the CSI driver. They contain their cluster ID
+ // in the metadata.
+ if val, ok := volume.Metadata[cinderCSIClusterIDKey]; ok && val == clusterID {
+ volumeIDs = append(volumeIDs, volume.ID)
+ }
}
deleteOpts := volumes.DeleteOpts{
Cascade: false,
}
+ numberToDelete := len(volumeIDs)
+ numberDeleted := 0
for _, volumeID := range volumeIDs {
+ deleted, err := deleteSnapshots(conn, volumeID, logger)
+ if !deleted || err != nil {
+ // Move on to the next volume
+ continue
+ }
+
logger.Debugf("Deleting volume %q", volumeID)
err = volumes.Delete(conn, volumeID, deleteOpts).ExtractErr()
if err != nil {
- // Ignore the error if the server cannot be found
+ // Ignore the error if the volume cannot be found
var gerr gophercloud.ErrDefault404
if !errors.As(err, &gerr) {
+ // Just log the error and move on to the next volume
logger.Debugf("Deleting volume %q failed: %v", volumeID, err)
- return false, nil
+ continue
}
logger.Debugf("Cannot find volume %q. It's probably already been deleted.", volumeID)
}
+ numberDeleted++
}
- return true, nil
+ return numberDeleted == numberToDelete, nil
+}
+
+func deleteSnapshots(conn *gophercloud.ServiceClient, volumeID string, logger logrus.FieldLogger) (bool, error) {
+ logger.Debugf("Deleting OpenStack snapshots for volume %v", volumeID)
+ defer logger.Debugf("Exiting deleting OpenStack snapshots for volume %v", volumeID)
+
+ listOpts := snapshots.ListOpts{
+ VolumeID: volumeID,
+ }
+
+ allPages, err := snapshots.List(conn, listOpts).AllPages()
+ if err != nil {
+ logger.Error(err)
+ return false, nil
+ }
+
+ allSnapshots, err := snapshots.ExtractSnapshots(allPages)
+ if err != nil {
+ logger.Error(err)
+ return false, nil
+ }
+
+ numberToDelete := len(allSnapshots)
+ numberDeleted := 0
+ for _, snapshot := range allSnapshots {
+ logger.Debugf("Deleting volume snapshot %q", snapshot.ID)
+ err = snapshots.Delete(conn, snapshot.ID).ExtractErr()
+ if err != nil {
+ // Ignore the error if the volume snapshot cannot be found
+ var gerr gophercloud.ErrDefault404
+ if !errors.As(err, &gerr) {
+ // Just log the error and move on to the next volume snapshot
+ logger.Debugf("Deleting volume snapshot %q failed: %v", snapshot.ID, err)
+ continue
+ }
+ logger.Debugf("Cannot find volume snapshot %q. It's probably already been deleted.", snapshot.ID)
+ }
+ numberDeleted++
+ }
+
+ return numberDeleted == numberToDelete, nil
+}
+
+func deleteShares(opts *clientconfig.ClientOpts, filter Filter, logger logrus.FieldLogger) (bool, error) {
+ logger.Debug("Deleting OpenStack shares")
+ defer logger.Debugf("Exiting deleting OpenStack shares")
+
+ var clusterID string
+ for k, v := range filter {
+ if strings.ToLower(k) == "openshiftclusterid" {
+ clusterID = v
+ break
+ }
+ }
+
+ conn, err := clientconfig.NewServiceClient("sharev2", opts)
+ if err != nil {
+ // Ignore the error if Manila is not available in the cloud
+ var gerr *gophercloud.ErrEndpointNotFound
+ if errors.As(err, &gerr) {
+ logger.Debug("Skip share deletion because Manila endpoint is not found")
+ return true, nil
+ }
+ logger.Error(err)
+ return false, nil
+ }
+
+ listOpts := shares.ListOpts{
+ Metadata: map[string]string{manilaCSIClusterIDKey: clusterID},
+ }
+
+ allPages, err := shares.ListDetail(conn, listOpts).AllPages()
+ if err != nil {
+ logger.Error(err)
+ return false, nil
+ }
+
+ allShares, err := shares.ExtractShares(allPages)
+ if err != nil {
+ logger.Error(err)
+ return false, nil
+ }
+
+ numberToDelete := len(allShares)
+ numberDeleted := 0
+ for _, share := range allShares {
+ deleted, err := deleteShareSnapshots(conn, share.ID, logger)
+ if err != nil {
+ return false, err
+ }
+ if !deleted {
+ return false, nil
+ }
+
+ logger.Debugf("Deleting share %q", share.ID)
+ err = shares.Delete(conn, share.ID).ExtractErr()
+ if err != nil {
+ // Ignore the error if the share cannot be found
+ var gerr gophercloud.ErrDefault404
+ if !errors.As(err, &gerr) {
+ // Just log the error and move on to the next share
+ logger.Debugf("Deleting share %q failed: %v", share.ID, err)
+ continue
+ }
+ logger.Debugf("Cannot find share %q. It's probably already been deleted.", share.ID)
+ }
+ numberDeleted++
+ }
+
+ return numberDeleted == numberToDelete, nil
+}
+
+func deleteShareSnapshots(conn *gophercloud.ServiceClient, shareID string, logger logrus.FieldLogger) (bool, error) {
+ logger.Debugf("Deleting OpenStack snapshots for share %v", shareID)
+ defer logger.Debugf("Exiting deleting OpenStack snapshots for share %v", shareID)
+
+ listOpts := sharesnapshots.ListOpts{
+ ShareID: shareID,
+ }
+
+ allPages, err := sharesnapshots.ListDetail(conn, listOpts).AllPages()
+ if err != nil {
+ logger.Error(err)
+ return false, nil
+ }
+
+ allSnapshots, err := sharesnapshots.ExtractSnapshots(allPages)
+ if err != nil {
+ logger.Error(err)
+ return false, nil
+ }
+
+ numberToDelete := len(allSnapshots)
+ numberDeleted := 0
+ for _, snapshot := range allSnapshots {
+ logger.Debugf("Deleting share snapshot %q", snapshot.ID)
+ err = sharesnapshots.Delete(conn, snapshot.ID).ExtractErr()
+ if err != nil {
+ // Ignore the error if the share snapshot cannot be found
+ var gerr gophercloud.ErrDefault404
+ if !errors.As(err, &gerr) {
+ // Just log the error and move on to the next share snapshot
+ logger.Debugf("Deleting share snapshot %q failed: %v", snapshot.ID, err)
+ continue
+ }
+ logger.Debugf("Cannot find share snapshot %q. It's probably already been deleted.", snapshot.ID)
+ }
+ numberDeleted++
+ }
+
+ return numberDeleted == numberToDelete, nil
}
func deleteFloatingIPs(opts *clientconfig.ClientOpts, filter Filter, logger logrus.FieldLogger) (bool, error) {
@@ -1213,6 +1597,9 @@ func deleteFloatingIPs(opts *clientconfig.ClientOpts, filter Filter, logger logr
logger.Error(err)
return false, nil
}
+
+ numberToDelete := len(allFloatingIPs)
+ numberDeleted := 0
for _, floatingIP := range allFloatingIPs {
logger.Debugf("Deleting Floating IP %q", floatingIP.ID)
err = floatingips.Delete(conn, floatingIP.ID).ExtractErr()
@@ -1220,13 +1607,15 @@ func deleteFloatingIPs(opts *clientconfig.ClientOpts, filter Filter, logger logr
// Ignore the error if the floating ip cannot be found
var gerr gophercloud.ErrDefault404
if !errors.As(err, &gerr) {
+ // Just log the error and move on to the next floating IP
logger.Debugf("Deleting floating ip %q failed: %v", floatingIP.ID, err)
- return false, nil
+ continue
}
logger.Debugf("Cannot find floating ip %q. It's probably already been deleted.", floatingIP.ID)
}
+ numberDeleted++
}
- return len(allFloatingIPs) == 0, nil
+ return numberDeleted == numberToDelete, nil
}
func deleteImages(opts *clientconfig.ClientOpts, filter Filter, logger logrus.FieldLogger) (bool, error) {
@@ -1255,16 +1644,20 @@ func deleteImages(opts *clientconfig.ClientOpts, filter Filter, logger logrus.Fi
return false, nil
}
+ numberToDelete := len(allImages)
+ numberDeleted := 0
for _, image := range allImages {
logger.Debugf("Deleting image: %+v", image.ID)
err := images.Delete(conn, image.ID).ExtractErr()
if err != nil {
// This can fail if the image is still in use by other VMs
+ // Just log the error and move on to the next image
logger.Debugf("Deleting Image failed: %v", err)
- return false, nil
+ continue
}
+ numberDeleted++
}
- return true, nil
+ return numberDeleted == numberToDelete, nil
}
func untagRunner(opts *clientconfig.ClientOpts, infraID string, logger logrus.FieldLogger) error {
@@ -1286,7 +1679,7 @@ func untagRunner(opts *clientconfig.ClientOpts, infraID string, logger logrus.Fi
return nil
}
-func cleanRouterRunner(opts *clientconfig.ClientOpts, filter Filter, logger logrus.FieldLogger) error {
+func cleanCustomRouterRunner(opts *clientconfig.ClientOpts, filter Filter, logger logrus.FieldLogger) error {
backoffSettings := wait.Backoff{
Duration: time.Second * 15,
Factor: 1.3,
@@ -1306,6 +1699,26 @@ func cleanRouterRunner(opts *clientconfig.ClientOpts, filter Filter, logger logr
return nil
}
+func deleteRouterRunner(opts *clientconfig.ClientOpts, filter Filter, logger logrus.FieldLogger) error {
+ backoffSettings := wait.Backoff{
+ Duration: time.Second * 15,
+ Factor: 1.3,
+ Steps: 25,
+ }
+
+ err := wait.ExponentialBackoff(backoffSettings, func() (bool, error) {
+ return deleteRouters(opts, filter, logger)
+ })
+ if err != nil {
+ if err == wait.ErrWaitTimeout {
+ return err
+ }
+ return errors.Errorf("Unrecoverable error: %v", err)
+ }
+
+ return nil
+}
+
// untagNetwork removes the tag from the primary cluster network based on unfra id
func untagPrimaryNetwork(opts *clientconfig.ClientOpts, infraID string, logger logrus.FieldLogger) (bool, error) {
networkTag := infraID + "-primaryClusterNetwork"
diff --git a/vendor/github.com/openshift/installer/pkg/destroy/ovirt/destroyer.go b/vendor/github.com/openshift/installer/pkg/destroy/ovirt/destroyer.go
index 01354b45721..839a971244f 100644
--- a/vendor/github.com/openshift/installer/pkg/destroy/ovirt/destroyer.go
+++ b/vendor/github.com/openshift/installer/pkg/destroy/ovirt/destroyer.go
@@ -2,6 +2,7 @@ package ovirt
import (
"fmt"
+ "strings"
"sync"
"time"
@@ -43,6 +44,9 @@ func (uninstaller *ClusterUninstaller) Run() error {
if err := uninstaller.removeTemplate(con); err != nil {
uninstaller.Logger.Errorf("Failed to remove template: %s", err)
}
+ if err := uninstaller.removeAffinityGroups(con); err != nil {
+ uninstaller.Logger.Errorf("Failed to removing Affinity Groups: %s", err)
+ }
return nil
}
@@ -144,6 +148,25 @@ func (uninstaller *ClusterUninstaller) removeTemplate(con *ovirtsdk.Connection)
return nil
}
+func (uninstaller *ClusterUninstaller) removeAffinityGroups(con *ovirtsdk.Connection) error {
+ cID := uninstaller.Metadata.Ovirt.ClusterID
+ affinityGroupService := con.SystemService().ClustersService().ClusterService(cID).AffinityGroupsService()
+ res, err := affinityGroupService.List().Send()
+ if err != nil {
+ return err
+ }
+ for _, ag := range res.MustGroups().Slice() {
+ if strings.HasPrefix(ag.MustName(), fmt.Sprintf("%s-", uninstaller.Metadata.InfraID)) {
+ uninstaller.Logger.Infof("Removing AffinityGroup %s", ag.MustName())
+ _, err := affinityGroupService.GroupService(ag.MustId()).Remove().Send()
+ if err != nil {
+ uninstaller.Logger.Errorf("failed to remove AffinityGroup: %s", err)
+ }
+ }
+ }
+ return nil
+}
+
// New returns oVirt Uninstaller from ClusterMetadata.
func New(logger logrus.FieldLogger, metadata *types.ClusterMetadata) (providers.Destroyer, error) {
return &ClusterUninstaller{
diff --git a/vendor/github.com/openshift/installer/pkg/destroy/vsphere/vsphere.go b/vendor/github.com/openshift/installer/pkg/destroy/vsphere/vsphere.go
index 5bb2588e6f9..1466ce01d50 100644
--- a/vendor/github.com/openshift/installer/pkg/destroy/vsphere/vsphere.go
+++ b/vendor/github.com/openshift/installer/pkg/destroy/vsphere/vsphere.go
@@ -2,12 +2,15 @@ package vsphere
import (
"context"
+ "fmt"
"time"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
"github.com/vmware/govmomi/object"
+ "github.com/vmware/govmomi/pbm"
+ pbmtypes "github.com/vmware/govmomi/pbm/types"
"github.com/vmware/govmomi/property"
"github.com/vmware/govmomi/vapi/rest"
"github.com/vmware/govmomi/vapi/tags"
@@ -130,6 +133,51 @@ func getAttachedObjectsOnTag(ctx context.Context, client *rest.Client, tagName s
return attached, nil
}
+func deleteStoragePolicy(ctx context.Context, client *vim25.Client, infraID string, logger logrus.FieldLogger) error {
+ ctx, cancel := context.WithTimeout(ctx, time.Minute*30)
+ defer cancel()
+
+ rtype := pbmtypes.PbmProfileResourceType{
+ ResourceType: string(pbmtypes.PbmProfileResourceTypeEnumSTORAGE),
+ }
+
+ category := pbmtypes.PbmProfileCategoryEnumREQUIREMENT
+
+ pbmClient, err := pbm.NewClient(ctx, client)
+ if err != nil {
+ return err
+ }
+
+ ids, err := pbmClient.QueryProfile(ctx, rtype, string(category))
+ if err != nil {
+ return err
+ }
+
+ profiles, err := pbmClient.RetrieveContent(ctx, ids)
+ if err != nil {
+ return err
+ }
+ policyName := fmt.Sprintf("openshift-storage-policy-%s", infraID)
+ policyLogger := logger.WithField("StoragePolicy", policyName)
+
+ matchingProfileIds := []pbmtypes.PbmProfileId{}
+ for _, p := range profiles {
+ if p.GetPbmProfile().Name == policyName {
+ profileID := p.GetPbmProfile().ProfileId
+ matchingProfileIds = append(matchingProfileIds, profileID)
+ }
+ }
+ if len(matchingProfileIds) > 0 {
+ _, err = pbmClient.DeleteProfile(ctx, matchingProfileIds)
+ if err != nil {
+ return err
+ }
+ policyLogger.Info("Destroyed")
+
+ }
+ return nil
+}
+
func deleteTag(ctx context.Context, client *rest.Client, tagID string) error {
tagManager := tags.NewManager(client)
tag, err := tagManager.GetTag(ctx, tagID)
@@ -212,6 +260,11 @@ func (o *ClusterUninstaller) Run() error {
o.Logger.Debug("No managed Folder found")
}
+ err = deleteStoragePolicy(context.TODO(), o.Client, o.InfraID, o.Logger)
+ if err != nil {
+ return errors.Errorf("error deleting storage policy: %v", err)
+ }
+
o.Logger.Debug("Delete tag")
tagLogger := o.Logger.WithField("Tag", o.InfraID)
if err = deleteTag(context.TODO(), o.RestClient, o.InfraID); err != nil {
diff --git a/vendor/github.com/openshift/installer/pkg/rhcos/ami.go b/vendor/github.com/openshift/installer/pkg/rhcos/ami.go
deleted file mode 100644
index 04cb15db911..00000000000
--- a/vendor/github.com/openshift/installer/pkg/rhcos/ami.go
+++ /dev/null
@@ -1,26 +0,0 @@
-//go:generate go run ami_regions_generate.go rhcos ../../data/data/rhcos-amd64.json ami_regions.go
-
-package rhcos
-
-import (
- "context"
-
- "github.com/pkg/errors"
-
- "github.com/openshift/installer/pkg/types"
-)
-
-// AMI fetches the HVM AMI ID of the Red Hat Enterprise Linux CoreOS release.
-func AMI(ctx context.Context, arch types.Architecture, region string) (string, error) {
- meta, err := fetchRHCOSBuild(ctx, arch)
- if err != nil {
- return "", errors.Wrap(err, "failed to fetch RHCOS metadata")
- }
-
- ami, ok := meta.AMIs[region]
- if !ok {
- return "", errors.Errorf("no RHCOS AMIs found in %s", region)
- }
-
- return ami.HVM, nil
-}
diff --git a/vendor/github.com/openshift/installer/pkg/rhcos/ami_regions_aarch64.go b/vendor/github.com/openshift/installer/pkg/rhcos/ami_regions_aarch64.go
new file mode 100644
index 00000000000..e5b4f8f01a2
--- /dev/null
+++ b/vendor/github.com/openshift/installer/pkg/rhcos/ami_regions_aarch64.go
@@ -0,0 +1,23 @@
+// Code generated by ami_regions_generate.go; DO NOT EDIT.
+
+package rhcos
+
+// AMIRegionsAARCH64 is a list of regions where the RHEL CoreOS is published for architecture AARCH64.
+var AMIRegionsAARCH64 = []string{
+ "ap-east-1",
+ "ap-northeast-1",
+ "ap-northeast-2",
+ "ap-south-1",
+ "ap-southeast-1",
+ "ap-southeast-2",
+ "ca-central-1",
+ "eu-central-1",
+ "eu-south-1",
+ "eu-west-1",
+ "eu-west-2",
+ "sa-east-1",
+ "us-east-1",
+ "us-east-2",
+ "us-west-1",
+ "us-west-2",
+}
diff --git a/vendor/github.com/openshift/installer/pkg/rhcos/ami_regions_generate.go b/vendor/github.com/openshift/installer/pkg/rhcos/ami_regions_generate.go
index f42cd1cf67b..0a3d6e1816b 100644
--- a/vendor/github.com/openshift/installer/pkg/rhcos/ami_regions_generate.go
+++ b/vendor/github.com/openshift/installer/pkg/rhcos/ami_regions_generate.go
@@ -11,12 +11,13 @@ import (
"os"
"path/filepath"
"sort"
+ "strings"
"text/template"
)
func main() {
- if len(os.Args) != 4 {
- log.Fatalln("exactly 4 arguments must be provided")
+ if len(os.Args) != 5 {
+ log.Fatalln("exactly 5 arguments must be provided")
}
argsWithoutProg := os.Args[1:]
@@ -32,6 +33,9 @@ func main() {
log.Fatalln("failed to load absolute path for the source")
}
+ architecture := argsWithoutProg[3]
+ log.Println("architecture: ", architecture)
+
srcData, err := ioutil.ReadFile(srcPath)
if err != nil {
log.Fatalln(err)
@@ -42,18 +46,24 @@ func main() {
log.Fatalln(fmt.Errorf("failed to unmarshal source: %v", err))
}
- regions := make([]string, 0, len(m.AMIs))
- for region := range m.AMIs {
- regions = append(regions, region)
+ var regions []string
+ for arch, images := range m.Architectures {
+ if arch == architecture {
+ regions = make([]string, 0, len(images.Images.AWS.Regions))
+ for region := range images.Images.AWS.Regions {
+ regions = append(regions, region)
+ }
+ }
}
sort.Strings(regions)
tinput := struct {
- Pkg string
- Regions []string
- }{Pkg: pkg, Regions: regions}
+ Architecture string
+ Pkg string
+ Regions []string
+ }{Architecture: strings.ToUpper(architecture), Pkg: pkg, Regions: regions}
- t := template.Must(template.New("ami_regions").Parse(tmpl))
+ t := template.Must(template.New(fmt.Sprintf("ami_regions_%s", architecture)).Parse(tmpl))
buf := &bytes.Buffer{}
if err := t.Execute(buf, tinput); err != nil {
log.Fatalln(fmt.Errorf("failed to execute the template: %v", err))
@@ -64,18 +74,26 @@ func main() {
}
}
+// use the rhco-stream.json to get AMIs per arch
type metadata struct {
- AMIs map[string]struct {
- HVM string `json:"hvm"`
- } `json:"amis"`
+ Architectures map[string]struct {
+ Images struct {
+ AWS struct {
+ Regions map[string]struct {
+ Release string `json:"release"`
+ Image string `json:"image"`
+ } `json:"regions"`
+ } `json:"aws"`
+ } `json:"images"`
+ } `json:"architectures"`
}
var tmpl = `// Code generated by ami_regions_generate.go; DO NOT EDIT.
package {{ .Pkg }}
-// AMIRegoins is a list of regions where the RHEL CoreOS is published.
-var AMIRegions = []string{
+// AMIRegions{{ .Architecture }} is a list of regions where the RHEL CoreOS is published for architecture {{ .Architecture }}.
+var AMIRegions{{ .Architecture }} = []string{
{{- range $region := .Regions}}
"{{ $region }}",
{{- end}}
diff --git a/vendor/github.com/openshift/installer/pkg/rhcos/ami_regions.go b/vendor/github.com/openshift/installer/pkg/rhcos/ami_regions_x86_64.go
similarity index 71%
rename from vendor/github.com/openshift/installer/pkg/rhcos/ami_regions.go
rename to vendor/github.com/openshift/installer/pkg/rhcos/ami_regions_x86_64.go
index 25c10088129..ae88b0e6523 100644
--- a/vendor/github.com/openshift/installer/pkg/rhcos/ami_regions.go
+++ b/vendor/github.com/openshift/installer/pkg/rhcos/ami_regions_x86_64.go
@@ -2,12 +2,13 @@
package rhcos
-// AMIRegoins is a list of regions where the RHEL CoreOS is published.
-var AMIRegions = []string{
+// AMIRegionsX86_64 is a list of regions where the RHEL CoreOS is published for architecture X86_64.
+var AMIRegionsX86_64 = []string{
"af-south-1",
"ap-east-1",
"ap-northeast-1",
"ap-northeast-2",
+ "ap-northeast-3",
"ap-south-1",
"ap-southeast-1",
"ap-southeast-2",
diff --git a/vendor/github.com/openshift/installer/pkg/rhcos/azure.go b/vendor/github.com/openshift/installer/pkg/rhcos/azure.go
deleted file mode 100644
index 14e8fc30bb2..00000000000
--- a/vendor/github.com/openshift/installer/pkg/rhcos/azure.go
+++ /dev/null
@@ -1,24 +0,0 @@
-package rhcos
-
-import (
- "context"
-
- "github.com/pkg/errors"
-
- "github.com/openshift/installer/pkg/types"
-)
-
-// VHD fetches the URL of the public Azure storage bucket containing the RHCOS image
-func VHD(ctx context.Context, arch types.Architecture) (string, error) {
- meta, err := fetchRHCOSBuild(ctx, arch)
- if err != nil {
- return "", errors.Wrap(err, "failed to fetch RHCOS metadata")
- }
-
- url := meta.Azure.URL
- if url == "" {
- return "", errors.New("no RHCOS Azure URL found")
- }
-
- return url, nil
-}
diff --git a/vendor/github.com/openshift/installer/pkg/rhcos/builds.go b/vendor/github.com/openshift/installer/pkg/rhcos/builds.go
index 76d0b64415f..5dcd1c5eb88 100644
--- a/vendor/github.com/openshift/installer/pkg/rhcos/builds.go
+++ b/vendor/github.com/openshift/installer/pkg/rhcos/builds.go
@@ -1,3 +1,7 @@
+// package rhcos contains APIs for interacting with the RHEL (or Fedora) CoreOS
+// bootimages embedded as stream metadata JSON with the installer
+// For more information, see docs/dev/pinned-coreos.md
+
package rhcos
import (
@@ -5,69 +9,80 @@ import (
"encoding/json"
"fmt"
"io/ioutil"
- "os"
+ "net/url"
+ "github.com/coreos/stream-metadata-go/stream"
"github.com/openshift/installer/data"
"github.com/pkg/errors"
-
- "github.com/openshift/installer/pkg/types"
)
-var (
- errInvalidArch = fmt.Errorf("no build metadata for given architecture")
-)
-
-type metadata struct {
- AMIs map[string]struct {
- HVM string `json:"hvm"`
- } `json:"amis"`
- Azure struct {
- Image string `json:"image"`
- URL string `json:"url"`
+// FetchRawCoreOSStream returns the raw stream metadata for the
+// bootimages embedded in the installer.
+func FetchRawCoreOSStream(ctx context.Context) ([]byte, error) {
+ file, err := data.Assets.Open(getStreamFileName())
+ if err != nil {
+ return nil, errors.Wrapf(err, "failed to read embedded CoreOS stream metadata")
}
- GCP struct {
- Image string `json:"image"`
- Project string `json:"project"`
- URL string `json:"url"`
+ defer file.Close()
+
+ body, err := ioutil.ReadAll(file)
+ if err != nil {
+ return nil, errors.Wrap(err, "failed to read CoreOS stream metadata")
}
- BaseURI string `json:"baseURI"`
- Images struct {
- QEMU struct {
- Path string `json:"path"`
- SHA256 string `json:"sha256"`
- UncompressedSHA256 string `json:"uncompressed-sha256"`
- } `json:"qemu"`
- OpenStack struct {
- Path string `json:"path"`
- SHA256 string `json:"sha256"`
- UncompressedSHA256 string `json:"uncompressed-sha256"`
- } `json:"openstack"`
- VMware struct {
- Path string `json:"path"`
- SHA256 string `json:"sha256"`
- } `json:"vmware"`
- } `json:"images"`
- OSTreeVersion string `json:"ostree-version"`
+ return body, nil
}
-func fetchRHCOSBuild(ctx context.Context, arch types.Architecture) (*metadata, error) {
- file, err := data.Assets.Open(fmt.Sprintf("rhcos-%s.json", arch))
+// FetchCoreOSBuild returns the pinned version of RHEL/Fedora CoreOS used
+// by the installer to provision the bootstrap node and control plane currently.
+// For more information, see e.g. https://github.com/openshift/enhancements/pull/201
+func FetchCoreOSBuild(ctx context.Context) (*stream.Stream, error) {
+ body, err := FetchRawCoreOSStream(ctx)
if err != nil {
return nil, err
}
- defer file.Close()
-
- body, err := ioutil.ReadAll(file)
- if os.IsNotExist(err) {
- return nil, errInvalidArch
- } else if err != nil {
- return nil, err
+ var st stream.Stream
+ if err := json.Unmarshal(body, &st); err != nil {
+ return nil, errors.Wrap(err, "failed to parse CoreOS stream metadata")
}
+ return &st, nil
+}
- var meta *metadata
- if err := json.Unmarshal(body, &meta); err != nil {
- return meta, errors.Wrap(err, "failed to parse RHCOS build metadata")
+// FormatURLWithIntegrity squashes an artifact into a URL string
+// with the uncompressed sha256 as a query parameter. This is necessary
+// currently because various parts of the installer pass around this
+// reference as a string, and it's also exposed to users via install-config overrides.
+func FormatURLWithIntegrity(artifact *stream.Artifact) (string, error) {
+ u, err := url.Parse(artifact.Location)
+ if err != nil {
+ return "", fmt.Errorf("failed to parse artifact URL: %v", err)
}
+ q := u.Query()
+ q.Set("sha256", artifact.UncompressedSha256)
+ u.RawQuery = q.Encode()
+ return u.String(), nil
+}
- return meta, nil
+// FindArtifactURL returns a single "disk" artifact type; this
+// mainly abstracts over e.g. `qcow2.xz` and `qcow2.gz`. (FCOS uses
+// xz, RHCOS uses gzip right now)
+//
+// Use this function only for cases where there's a single artifact type, such
+// as `qemu` and `openstack`.
+//
+// Some platforms have multiple artifact types; for example, `metal` has an ISO
+// as well as PXE files. This function will error in such a case.
+func FindArtifactURL(artifacts stream.PlatformArtifacts) (string, error) {
+ var artifact *stream.Artifact
+ for _, v := range artifacts.Formats {
+ if v.Disk != nil {
+ if artifact != nil {
+ return "", fmt.Errorf("multiple \"disk\" artifacts found")
+ }
+ artifact = v.Disk
+ }
+ }
+ if artifact != nil {
+ return FormatURLWithIntegrity(artifact)
+ }
+ return "", fmt.Errorf("no \"disk\" artifact found")
}
diff --git a/vendor/github.com/openshift/installer/pkg/rhcos/gcp.go b/vendor/github.com/openshift/installer/pkg/rhcos/gcp.go
deleted file mode 100644
index 96dbbf27833..00000000000
--- a/vendor/github.com/openshift/installer/pkg/rhcos/gcp.go
+++ /dev/null
@@ -1,30 +0,0 @@
-package rhcos
-
-import (
- "context"
- "fmt"
-
- "github.com/pkg/errors"
-
- "github.com/openshift/installer/pkg/types"
-)
-
-// GCP fetches the URL of the public RHCOS image
-func GCP(ctx context.Context, arch types.Architecture) (string, error) {
- meta, err := fetchRHCOSBuild(ctx, arch)
- if err != nil {
- return "", errors.Wrap(err, "failed to fetch RHCOS metadata")
- }
-
- return fmt.Sprintf("projects/%s/global/images/%s", meta.GCP.Project, meta.GCP.Image), nil
-}
-
-// GCPRaw fetches the URL of the public GCP storage bucket containing the RHCOS image
-func GCPRaw(ctx context.Context, arch types.Architecture) (string, error) {
- meta, err := fetchRHCOSBuild(ctx, arch)
- if err != nil {
- return "", errors.Wrap(err, "failed to fetch RHCOS metadata")
- }
-
- return meta.GCP.URL, nil
-}
diff --git a/vendor/github.com/openshift/installer/pkg/rhcos/openstack.go b/vendor/github.com/openshift/installer/pkg/rhcos/openstack.go
index 7f25ac7d815..574ed125a9c 100644
--- a/vendor/github.com/openshift/installer/pkg/rhcos/openstack.go
+++ b/vendor/github.com/openshift/installer/pkg/rhcos/openstack.go
@@ -1,48 +1,9 @@
package rhcos
import (
- "context"
"net/url"
-
- "github.com/pkg/errors"
-
- "github.com/openshift/installer/pkg/types"
)
-// OpenStack fetches the URL of the Red Hat Enterprise Linux CoreOS release,
-// for the openstack platform
-func OpenStack(ctx context.Context, arch types.Architecture) (string, error) {
- meta, err := fetchRHCOSBuild(ctx, arch)
- if err != nil {
- return "", errors.Wrap(err, "failed to fetch RHCOS metadata")
- }
-
- base, err := url.Parse(meta.BaseURI)
- if err != nil {
- return "", err
- }
-
- relOpenStack, err := url.Parse(meta.Images.OpenStack.Path)
- if err != nil {
- return "", err
- }
-
- baseURL := base.ResolveReference(relOpenStack).String()
-
- // Attach sha256 checksum to the URL. Always provide the
- // uncompressed SHA256; the cache will take care of
- // uncompressing before checksumming.
- baseURL += "?sha256=" + meta.Images.OpenStack.UncompressedSHA256
-
- // Check that we have generated a valid URL
- _, err = url.ParseRequestURI(baseURL)
- if err != nil {
- return "", err
- }
-
- return baseURL, nil
-}
-
// GenerateOpenStackImageName returns Glance image name for instances.
func GenerateOpenStackImageName(rhcosImage, infraID string) (imageName string, isURL bool) {
// Here we check whether rhcosImage is a URL or not. If this is the first case, it means that Glance image
diff --git a/vendor/github.com/openshift/installer/pkg/rhcos/qemu.go b/vendor/github.com/openshift/installer/pkg/rhcos/qemu.go
deleted file mode 100644
index f0c0026cc80..00000000000
--- a/vendor/github.com/openshift/installer/pkg/rhcos/qemu.go
+++ /dev/null
@@ -1,43 +0,0 @@
-package rhcos
-
-import (
- "context"
- "net/url"
-
- "github.com/pkg/errors"
-
- "github.com/openshift/installer/pkg/types"
-)
-
-// QEMU fetches the URL of the Red Hat Enterprise Linux CoreOS release.
-func QEMU(ctx context.Context, arch types.Architecture) (string, error) {
- meta, err := fetchRHCOSBuild(ctx, arch)
- if err != nil {
- return "", errors.Wrap(err, "failed to fetch RHCOS metadata")
- }
-
- base, err := url.Parse(meta.BaseURI)
- if err != nil {
- return "", err
- }
-
- relQEMU, err := url.Parse(meta.Images.QEMU.Path)
- if err != nil {
- return "", err
- }
-
- baseURL := base.ResolveReference(relQEMU).String()
-
- // Attach sha256 checksum to the URL. Always provide the
- // uncompressed SHA256; the cache will take care of
- // uncompressing before checksumming.
- baseURL += "?sha256=" + meta.Images.QEMU.UncompressedSHA256
-
- // Check that we have generated a valid URL
- _, err = url.ParseRequestURI(baseURL)
- if err != nil {
- return "", err
- }
-
- return baseURL, nil
-}
diff --git a/vendor/github.com/openshift/installer/pkg/rhcos/stream.go b/vendor/github.com/openshift/installer/pkg/rhcos/stream.go
new file mode 100644
index 00000000000..59027f2faf8
--- /dev/null
+++ b/vendor/github.com/openshift/installer/pkg/rhcos/stream.go
@@ -0,0 +1,7 @@
+// +build !okd
+
+package rhcos
+
+func getStreamFileName() string {
+ return "rhcos-stream.json"
+}
diff --git a/vendor/github.com/openshift/installer/pkg/rhcos/stream_okd.go b/vendor/github.com/openshift/installer/pkg/rhcos/stream_okd.go
new file mode 100644
index 00000000000..690c57620b9
--- /dev/null
+++ b/vendor/github.com/openshift/installer/pkg/rhcos/stream_okd.go
@@ -0,0 +1,7 @@
+// +build okd
+
+package rhcos
+
+func getStreamFileName() string {
+ return "fcos-stream.json"
+}
diff --git a/vendor/github.com/openshift/installer/pkg/rhcos/vmware.go b/vendor/github.com/openshift/installer/pkg/rhcos/vmware.go
deleted file mode 100644
index d3b1a368f3f..00000000000
--- a/vendor/github.com/openshift/installer/pkg/rhcos/vmware.go
+++ /dev/null
@@ -1,43 +0,0 @@
-package rhcos
-
-import (
- "context"
- "net/url"
-
- "github.com/pkg/errors"
-
- "github.com/openshift/installer/pkg/types"
-)
-
-// VMware fetches the URL of the Red Hat Enterprise Linux CoreOS release.
-func VMware(ctx context.Context, arch types.Architecture) (string, error) {
- meta, err := fetchRHCOSBuild(ctx, arch)
- if err != nil {
- return "", errors.Wrap(err, "failed to fetch RHCOS metadata")
- }
-
- base, err := url.Parse(meta.BaseURI)
- if err != nil {
- return "", err
- }
-
- image, err := url.Parse(meta.Images.VMware.Path)
- if err != nil {
- return "", err
- }
-
- baseURL := base.ResolveReference(image).String()
-
- // Attach sha256 checksum to the URL. Always provide the
- // uncompressed SHA256; the cache will take care of
- // uncompressing before checksumming.
- baseURL += "?sha256=" + meta.Images.VMware.SHA256
-
- // Check that we have generated a valid URL
- _, err = url.ParseRequestURI(baseURL)
- if err != nil {
- return "", err
- }
-
- return baseURL, nil
-}
diff --git a/vendor/github.com/openshift/installer/pkg/types/aws/machinepool.go b/vendor/github.com/openshift/installer/pkg/types/aws/machinepool.go
index 353e44f173c..ef597a67bbf 100644
--- a/vendor/github.com/openshift/installer/pkg/types/aws/machinepool.go
+++ b/vendor/github.com/openshift/installer/pkg/types/aws/machinepool.go
@@ -24,6 +24,11 @@ type MachinePool struct {
//
// +optional
EC2RootVolume `json:"rootVolume"`
+
+ // IAMRole is the name of the IAM Role to use for the instance profile of the machine.
+ // Leave unset to have the installer create the IAM Role on your behalf.
+ // +optional
+ IAMRole string `json:"iamRole,omitempty"`
}
// Set sets the values from `required` to `a`.
@@ -56,6 +61,10 @@ func (a *MachinePool) Set(required *MachinePool) {
if required.EC2RootVolume.KMSKeyARN != "" {
a.EC2RootVolume.KMSKeyARN = required.EC2RootVolume.KMSKeyARN
}
+
+ if required.IAMRole != "" {
+ a.IAMRole = required.IAMRole
+ }
}
// EC2RootVolume defines the storage for an ec2 instance.
diff --git a/vendor/github.com/openshift/installer/pkg/types/aws/metadata.go b/vendor/github.com/openshift/installer/pkg/types/aws/metadata.go
index 300077f037f..609c48baaee 100644
--- a/vendor/github.com/openshift/installer/pkg/types/aws/metadata.go
+++ b/vendor/github.com/openshift/installer/pkg/types/aws/metadata.go
@@ -15,4 +15,7 @@ type Metadata struct {
// resource matches the map if all of the key/value pairs are in its
// tags. A resource matches Identifier if it matches any of the maps.
Identifier []map[string]string `json:"identifier"`
+
+ // ClusterDomain is the domain for the cluster.
+ ClusterDomain string `json:"clusterDomain"`
}
diff --git a/vendor/github.com/openshift/installer/pkg/types/aws/platform.go b/vendor/github.com/openshift/installer/pkg/types/aws/platform.go
index b29aaaddbb9..9a6d682d386 100644
--- a/vendor/github.com/openshift/installer/pkg/types/aws/platform.go
+++ b/vendor/github.com/openshift/installer/pkg/types/aws/platform.go
@@ -26,6 +26,15 @@ type Platform struct {
// +optional
Subnets []string `json:"subnets,omitempty"`
+ // HostedZone is the ID of an existing hosted zone into which to add DNS
+ // records for the cluster's internal API. An existing hosted zone can
+ // only be used when also using existing subnets. The hosted zone must be
+ // associated with the VPC containing the subnets.
+ // Leave the hosted zone unset to have the installer create the hosted zone
+ // on your behalf.
+ // +optional
+ HostedZone string `json:"hostedZone,omitempty"`
+
// UserTags additional keys and values that the installer will add
// as tags to all resources that it creates. Resources created by the
// cluster itself may not include these tags.
@@ -43,6 +52,12 @@ type Platform struct {
// platform configuration.
// +optional
DefaultMachinePlatform *MachinePool `json:"defaultMachinePlatform,omitempty"`
+
+ // ExperimentalPropagateUserTags is an experimental flag that directs in-cluster
+ // operators to include the specified user tags in the tags of the AWS resources
+ // that the operators create.
+ // +optional
+ ExperimentalPropagateUserTag bool `json:"experimentalPropagateUserTags,omitempty"`
}
// ServiceEndpoint store the configuration for services to
diff --git a/vendor/github.com/openshift/installer/pkg/types/aws/validation/machinepool.go b/vendor/github.com/openshift/installer/pkg/types/aws/validation/machinepool.go
new file mode 100644
index 00000000000..6d989a954d4
--- /dev/null
+++ b/vendor/github.com/openshift/installer/pkg/types/aws/validation/machinepool.go
@@ -0,0 +1,72 @@
+package validation
+
+import (
+ "fmt"
+ "strings"
+
+ "k8s.io/apimachinery/pkg/util/sets"
+ "k8s.io/apimachinery/pkg/util/validation/field"
+
+ "github.com/openshift/installer/pkg/types"
+ "github.com/openshift/installer/pkg/types/aws"
+)
+
+var (
+ validArchitectures = map[types.Architecture]bool{
+ types.ArchitectureAMD64: true,
+ types.ArchitectureARM64: true,
+ }
+
+ // ValidArchitectureValues lists the supported arches for AWS
+ ValidArchitectureValues = func() []string {
+ v := make([]string, 0, len(validArchitectures))
+ for m := range validArchitectures {
+ v = append(v, string(m))
+ }
+ return v
+ }()
+)
+
+// ValidateMachinePool checks that the specified machine pool is valid.
+func ValidateMachinePool(platform *aws.Platform, p *aws.MachinePool, fldPath *field.Path) field.ErrorList {
+ allErrs := field.ErrorList{}
+ for i, zone := range p.Zones {
+ if !strings.HasPrefix(zone, platform.Region) {
+ allErrs = append(allErrs, field.Invalid(fldPath.Child("zones").Index(i), zone, fmt.Sprintf("Zone not in configured region (%s)", platform.Region)))
+ }
+ }
+
+ if p.IOPS < 0 {
+ allErrs = append(allErrs, field.Invalid(fldPath.Child("iops"), p.IOPS, "Storage IOPS must be positive"))
+ }
+ if p.Size < 0 {
+ allErrs = append(allErrs, field.Invalid(fldPath.Child("size"), p.Size, "Storage size must be positive"))
+ }
+ return allErrs
+}
+
+// ValidateAMIID check the AMI ID is set for a machine pool.
+func ValidateAMIID(platform *aws.Platform, p *aws.MachinePool, fldPath *field.Path) field.ErrorList {
+ allErrs := field.ErrorList{}
+ pool := &aws.MachinePool{AMIID: platform.AMIID}
+ pool.Set(platform.DefaultMachinePlatform)
+ pool.Set(p)
+
+ // regions is a list of regions for which the user should set AMI ID as copying the AMI to these regions
+ // is known to not be supported.
+ regions := sets.NewString("us-gov-west-1", "us-gov-east-1", "us-iso-east-1", "cn-north-1", "cn-northwest-1")
+ if pool.AMIID == "" && regions.Has(platform.Region) {
+ allErrs = append(allErrs, field.Required(fldPath, fmt.Sprintf("AMI ID must be provided for regions %s", strings.Join(regions.List(), ", "))))
+ }
+ return allErrs
+}
+
+// ValidateMachinePoolArchitecture checks that a valid architecture is set for a machine pool.
+func ValidateMachinePoolArchitecture(pool *types.MachinePool, fldPath *field.Path) field.ErrorList {
+ allErrs := field.ErrorList{}
+
+ if !validArchitectures[pool.Architecture] {
+ allErrs = append(allErrs, field.NotSupported(fldPath, pool.Architecture, ValidArchitectureValues))
+ }
+ return allErrs
+}
diff --git a/vendor/github.com/openshift/installer/pkg/types/aws/validation/platform.go b/vendor/github.com/openshift/installer/pkg/types/aws/validation/platform.go
new file mode 100644
index 00000000000..0a9a53d7442
--- /dev/null
+++ b/vendor/github.com/openshift/installer/pkg/types/aws/validation/platform.go
@@ -0,0 +1,149 @@
+package validation
+
+import (
+ "fmt"
+ "net/url"
+ "regexp"
+ "strings"
+
+ "k8s.io/apimachinery/pkg/util/validation/field"
+
+ "github.com/openshift/installer/pkg/types/aws"
+)
+
+// tagRegex is used to check that the keys and values of a tag contain only valid characters.
+var tagRegex = regexp.MustCompile(`^[0-9A-Za-z_.:/=+-@]*$`)
+
+// kubernetesNamespaceRegex is used to check that a tag key is not in the kubernetes.io namespace.
+var kubernetesNamespaceRegex = regexp.MustCompile(`^([^/]*\.)?kubernetes.io/`)
+
+// openshiftNamespaceRegex is used to check that a tag key is not in the openshift.io namespace.
+var openshiftNamespaceRegex = regexp.MustCompile(`^([^/]*\.)?openshift.io/`)
+
+// ValidatePlatform checks that the specified platform is valid.
+func ValidatePlatform(p *aws.Platform, fldPath *field.Path) field.ErrorList {
+ allErrs := field.ErrorList{}
+
+ if p.Region == "" {
+ allErrs = append(allErrs, field.Required(fldPath.Child("region"), "region must be specified"))
+ }
+
+ if p.HostedZone != "" {
+ if len(p.Subnets) == 0 {
+ allErrs = append(allErrs, field.Invalid(fldPath.Child("hostedZone"), p.HostedZone, "may not use an existing hosted zone when not using existing subnets"))
+ }
+ }
+
+ allErrs = append(allErrs, validateServiceEndpoints(p.ServiceEndpoints, fldPath.Child("serviceEndpoints"))...)
+ allErrs = append(allErrs, validateUserTags(p.UserTags, p.ExperimentalPropagateUserTag, fldPath.Child("userTags"))...)
+
+ if p.DefaultMachinePlatform != nil {
+ allErrs = append(allErrs, ValidateMachinePool(p, p.DefaultMachinePlatform, fldPath.Child("defaultMachinePlatform"))...)
+ }
+ return allErrs
+}
+
+func validateUserTags(tags map[string]string, propagatingTags bool, fldPath *field.Path) field.ErrorList {
+ allErrs := field.ErrorList{}
+ if len(tags) == 0 {
+ return allErrs
+ }
+ if len(tags) > 8 {
+ allErrs = append(allErrs, field.Invalid(fldPath, len(tags), "number of user tags cannot be more than 8"))
+ }
+ for key, value := range tags {
+ if strings.EqualFold(key, "Name") {
+ allErrs = append(allErrs, field.Invalid(fldPath.Key(key), tags[key], "Name key is not allowed for user defined tags"))
+ }
+ if propagatingTags {
+ if err := validateTag(key, value); err != nil {
+ allErrs = append(allErrs, field.Invalid(fldPath.Key(key), value, err.Error()))
+ }
+ } else {
+ if strings.HasPrefix(key, "kubernetes.io/cluster/") {
+ allErrs = append(allErrs, field.Invalid(fldPath.Key(key), tags[key], "Keys with prefix 'kubernetes.io/cluster/' are not allowed for user defined tags"))
+ }
+ }
+ }
+ return allErrs
+}
+
+// validateTag checks the following things to ensure that the tag is acceptable as an additional tag.
+// * The key and value contain only valid characters.
+// * The key is not empty and at most 128 characters.
+// * The value is not empty and at most 256 characters. Note that, while many AWS services accept empty tag values,
+// the additional tags may be applied to resources in services that do not accept empty tag values. Consequently,
+// OpenShift cannot accept empty tag values.
+// * The key is not in the kubernetes.io namespace.
+// * The key is not in the openshift.io namespace.
+func validateTag(key, value string) error {
+ if !tagRegex.MatchString(key) {
+ return fmt.Errorf("key contains invalid characters")
+ }
+ if !tagRegex.MatchString(value) {
+ return fmt.Errorf("value contains invalid characters")
+ }
+ if len(key) == 0 {
+ return fmt.Errorf("key is empty")
+ }
+ if len(key) > 128 {
+ return fmt.Errorf("key is too long")
+ }
+ if len(value) == 0 {
+ return fmt.Errorf("value is empty")
+ }
+ if len(value) > 256 {
+ return fmt.Errorf("value is too long")
+ }
+ if kubernetesNamespaceRegex.MatchString(key) {
+ return fmt.Errorf("key is in the kubernetes.io namespace")
+ }
+ if openshiftNamespaceRegex.MatchString(key) {
+ return fmt.Errorf("key is in the openshift.io namespace")
+ }
+ return nil
+}
+
+func validateServiceEndpoints(endpoints []aws.ServiceEndpoint, fldPath *field.Path) field.ErrorList {
+ allErrs := field.ErrorList{}
+ tracker := map[string]int{}
+ for idx, e := range endpoints {
+ fldp := fldPath.Index(idx)
+ if eidx, ok := tracker[e.Name]; ok {
+ allErrs = append(allErrs, field.Invalid(fldp.Child("name"), e.Name, fmt.Sprintf("duplicate service endpoint not allowed for %s, service endpoint already defined at %s", e.Name, fldPath.Index(eidx))))
+ } else {
+ tracker[e.Name] = idx
+ }
+
+ if err := validateServiceURL(e.URL); err != nil {
+ allErrs = append(allErrs, field.Invalid(fldp.Child("url"), e.URL, err.Error()))
+ }
+ }
+ return allErrs
+}
+
+var schemeRE = regexp.MustCompile("^([^:]+)://")
+
+func validateServiceURL(uri string) error {
+ endpoint := uri
+ if !schemeRE.MatchString(endpoint) {
+ scheme := "https"
+ endpoint = fmt.Sprintf("%s://%s", scheme, endpoint)
+ }
+
+ u, err := url.Parse(endpoint)
+ if err != nil {
+ return err
+ }
+ if u.Hostname() == "" {
+ return fmt.Errorf("host cannot be empty, empty host provided")
+ }
+ if s := u.Scheme; s != "https" {
+ return fmt.Errorf("invalid scheme %s, only https allowed", s)
+ }
+ if r := u.RequestURI(); r != "/" {
+ return fmt.Errorf("no path or request parameters must be provided, %q was provided", r)
+ }
+
+ return nil
+}
diff --git a/vendor/github.com/openshift/installer/pkg/types/azure/defaults/machines.go b/vendor/github.com/openshift/installer/pkg/types/azure/defaults/machines.go
new file mode 100644
index 00000000000..797818d5090
--- /dev/null
+++ b/vendor/github.com/openshift/installer/pkg/types/azure/defaults/machines.go
@@ -0,0 +1,51 @@
+package defaults
+
+import (
+ "fmt"
+
+ "github.com/openshift/installer/pkg/types/azure"
+)
+
+// BootstrapInstanceType sets the defaults for bootstrap instances.
+// Minimum requirements are 4 CPU's, 16GiB of ram, and 120GiB storage.
+// D4s v3 gives us 4 CPU's, 16GiB ram and 32GiB of temporary storage.
+// DS4_v2 gives us 8 CPUs, 28GiB ram, and 56GiB of temporary storage.
+func BootstrapInstanceType(cloud azure.CloudEnvironment, region string) string {
+ instanceClass := getInstanceClass(region)
+ size := "D4s_v3"
+ if cloud == azure.StackCloud {
+ size = "DS4_v2"
+ }
+ return instanceType(instanceClass, size)
+}
+
+// ControlPlaneInstanceType sets the defaults for control plane instances.
+// Minimum requirements are 4 CPU's, 16GiB of ram, and 120GiB storage.
+// D8s v3 gives us 8 CPU's, 32GiB ram and 64GiB of temporary storage
+// This extra bump is done to prevent etcd from overloading
+// DS4_v2 gives us 8 CPUs, 28GiB ram, and 56GiB of temporary storage.
+func ControlPlaneInstanceType(cloud azure.CloudEnvironment, region string) string {
+ instanceClass := getInstanceClass(region)
+ size := "D4s_v3"
+ if cloud == azure.StackCloud {
+ size = "DS4_v2"
+ }
+ return instanceType(instanceClass, size)
+}
+
+// ComputeInstanceType sets the defaults for compute instances.
+// Minimum requirements are 2 CPU's, 8GiB of ram, and 120GiB storage.
+// D4s v3 gives us 2 CPU's, 8GiB ram and 16GiB of temporary storage
+// DS3_v2 gives us 4 CPUs, 14GiB ram, and 28GiB of temporary storage.
+func ComputeInstanceType(cloud azure.CloudEnvironment, region string) string {
+ instanceClass := getInstanceClass(region)
+ size := "D4s_v3"
+ if cloud == azure.StackCloud {
+ size = "DS4_v2"
+ }
+ return instanceType(instanceClass, size)
+}
+
+func instanceType(class, size string) string {
+ return fmt.Sprintf("%s_%s", class, size)
+}
diff --git a/vendor/github.com/openshift/installer/pkg/types/azure/defaults/platform.go b/vendor/github.com/openshift/installer/pkg/types/azure/defaults/platform.go
new file mode 100644
index 00000000000..09f121774af
--- /dev/null
+++ b/vendor/github.com/openshift/installer/pkg/types/azure/defaults/platform.go
@@ -0,0 +1,29 @@
+package defaults
+
+import (
+ "github.com/openshift/installer/pkg/types/azure"
+)
+
+var (
+ // Overrides
+ defaultMachineClass = map[string]string{}
+)
+
+// SetPlatformDefaults sets the defaults for the platform.
+func SetPlatformDefaults(p *azure.Platform) {
+ if p.CloudName == "" {
+ p.CloudName = azure.PublicCloud
+ }
+ if p.OutboundType == "" {
+ p.OutboundType = azure.LoadbalancerOutboundType
+ }
+}
+
+// getInstanceClass returns the instance "class" we should use for a given region.
+func getInstanceClass(region string) string {
+ if class, ok := defaultMachineClass[region]; ok {
+ return class
+ }
+
+ return "Standard"
+}
diff --git a/vendor/github.com/openshift/installer/pkg/types/azure/machinepool.go b/vendor/github.com/openshift/installer/pkg/types/azure/machinepool.go
index e97753eb047..1f1997790da 100644
--- a/vendor/github.com/openshift/installer/pkg/types/azure/machinepool.go
+++ b/vendor/github.com/openshift/installer/pkg/types/azure/machinepool.go
@@ -36,6 +36,9 @@ type OSDisk struct {
DiskType string `json:"diskType"`
}
+// DefaultDiskType holds the default Azure disk type used by the VMs.
+const DefaultDiskType string = "Premium_LRS"
+
// Set sets the values from `required` to `a`.
func (a *MachinePool) Set(required *MachinePool) {
if required == nil || a == nil {
diff --git a/vendor/github.com/openshift/installer/pkg/types/azure/metadata.go b/vendor/github.com/openshift/installer/pkg/types/azure/metadata.go
index 3d55cf7eb7b..e4695c30d8b 100644
--- a/vendor/github.com/openshift/installer/pkg/types/azure/metadata.go
+++ b/vendor/github.com/openshift/installer/pkg/types/azure/metadata.go
@@ -2,7 +2,10 @@ package azure
// Metadata contains Azure metadata (e.g. for uninstalling the cluster).
type Metadata struct {
- CloudName CloudEnvironment `json:"cloudName"`
- Region string `json:"region"`
- ResourceGroupName string `json:"resourceGroupName"`
+ ARMEndpoint string `json:"armEndpoint"`
+ CloudName CloudEnvironment `json:"cloudName"`
+ Region string `json:"region"`
+ ResourceGroupName string `json:"resourceGroupName"`
+ ClusterName string `json:"clusterName"`
+ BaseDomainResourceGroupName string `json:"baseDomainResourceGroupName"`
}
diff --git a/vendor/github.com/openshift/installer/pkg/types/azure/platform.go b/vendor/github.com/openshift/installer/pkg/types/azure/platform.go
index f919d111db0..8575411f542 100644
--- a/vendor/github.com/openshift/installer/pkg/types/azure/platform.go
+++ b/vendor/github.com/openshift/installer/pkg/types/azure/platform.go
@@ -5,6 +5,9 @@ import (
"strings"
)
+// aro is a setting to enable aro-only modifications
+var aro bool
+
// OutboundType is a strategy for how egress from cluster is achieved.
// +kubebuilder:validation:Enum="";Loadbalancer;UserDefinedRouting
type OutboundType string
@@ -25,6 +28,9 @@ type Platform struct {
// Region specifies the Azure region where the cluster will be created.
Region string `json:"region"`
+ // ARMEndpoint is the endpoint for the Azure API when installing on Azure Stack.
+ ARMEndpoint string `json:"armEndpoint,omitempty"`
+
// BaseDomainResourceGroupName specifies the resource group where the Azure DNS zone for the base domain is found.
BaseDomainResourceGroupName string `json:"baseDomainResourceGroupName,omitempty"`
@@ -67,7 +73,7 @@ type Platform struct {
OutboundType OutboundType `json:"outboundType"`
// ResourceGroupName is the name of an already existing resource group where the cluster should be installed.
- // This resource group should only be used for this specific cluster and the cluster components will assume assume
+ // This resource group should only be used for this specific cluster and the cluster components will assume
// ownership of all resources in the resource group. Destroying the cluster using installer will delete this
// resource group.
// This resource group must be empty with no other resources when trying to use it for creating a cluster.
@@ -78,7 +84,7 @@ type Platform struct {
}
// CloudEnvironment is the name of the Azure cloud environment
-// +kubebuilder:validation:Enum="";AzurePublicCloud;AzureUSGovernmentCloud;AzureChinaCloud;AzureGermanCloud
+// +kubebuilder:validation:Enum="";AzurePublicCloud;AzureUSGovernmentCloud;AzureChinaCloud;AzureGermanCloud;AzureStackCloud
type CloudEnvironment string
const (
@@ -93,6 +99,9 @@ const (
// GermanCloud is the Azure cloud environment used in Germany.
GermanCloud CloudEnvironment = "AzureGermanCloud"
+
+ // StackCloud is the Azure cloud environment used at the edge and on premises.
+ StackCloud CloudEnvironment = "AzureStackCloud"
)
// Name returns name that Azure uses for the cloud environment.
@@ -115,3 +124,8 @@ func (p *Platform) ClusterResourceGroupName(infraID string) string {
}
return fmt.Sprintf("%s-rg", infraID)
}
+
+// IsARO returns true if ARO-only modifications are enabled
+func (p *Platform) IsARO() bool {
+ return aro
+}
diff --git a/vendor/github.com/openshift/installer/pkg/types/azure/platform_aro.go b/vendor/github.com/openshift/installer/pkg/types/azure/platform_aro.go
new file mode 100644
index 00000000000..f97a4e76054
--- /dev/null
+++ b/vendor/github.com/openshift/installer/pkg/types/azure/platform_aro.go
@@ -0,0 +1,7 @@
+// +build aro
+
+package azure
+
+func init() {
+ aro = true
+}
diff --git a/vendor/github.com/openshift/installer/pkg/types/baremetal/platform.go b/vendor/github.com/openshift/installer/pkg/types/baremetal/platform.go
index 3f2557dad69..56d1396043f 100644
--- a/vendor/github.com/openshift/installer/pkg/types/baremetal/platform.go
+++ b/vendor/github.com/openshift/installer/pkg/types/baremetal/platform.go
@@ -12,15 +12,17 @@ type BMC struct {
DisableCertificateVerification bool `json:"disableCertificateVerification"`
}
-// BootMode puts the server in legacy (BIOS) or UEFI mode for
-// booting. The default is UEFI.
-// +kubebuilder:validation:Enum=UEFI;legacy
+// BootMode puts the server in legacy (BIOS), UEFI secure boot or UEFI mode for
+// booting. Secure boot is only enabled during the final instance boot.
+// The default is UEFI.
+// +kubebuilder:validation:Enum="";UEFI;UEFISecureBoot;legacy
type BootMode string
// Allowed boot mode from metal3
const (
- UEFI BootMode = "UEFI"
- Legacy BootMode = "legacy"
+ UEFI BootMode = "UEFI"
+ UEFISecureBoot BootMode = "UEFISecureBoot"
+ Legacy BootMode = "legacy"
)
// Host stores all the configuration data for a baremetal host.
@@ -115,6 +117,7 @@ type Platform struct {
// ProvisioningNetworkInterface is the name of the network interface on a control plane
// baremetal host that is connected to the provisioning network.
+ // +optional
ProvisioningNetworkInterface string `json:"provisioningNetworkInterface"`
// ProvisioningNetworkCIDR defines the network to use for provisioning.
diff --git a/vendor/github.com/openshift/installer/pkg/types/baremetal/rootdevice.go b/vendor/github.com/openshift/installer/pkg/types/baremetal/rootdevice.go
index 2de14cd1551..4e9e984ff31 100644
--- a/vendor/github.com/openshift/installer/pkg/types/baremetal/rootdevice.go
+++ b/vendor/github.com/openshift/installer/pkg/types/baremetal/rootdevice.go
@@ -6,7 +6,7 @@ package baremetal
import (
"fmt"
- "github.com/metal3-io/baremetal-operator/pkg/apis/metal3/v1alpha1"
+ "github.com/metal3-io/baremetal-operator/apis/metal3.io/v1alpha1"
)
// RootDeviceHints holds the hints for specifying the storage location
diff --git a/vendor/github.com/openshift/installer/pkg/types/clustermetadata.go b/vendor/github.com/openshift/installer/pkg/types/clustermetadata.go
index 9f2dcbaea79..5fa3bb1b20c 100644
--- a/vendor/github.com/openshift/installer/pkg/types/clustermetadata.go
+++ b/vendor/github.com/openshift/installer/pkg/types/clustermetadata.go
@@ -5,6 +5,7 @@ import (
"github.com/openshift/installer/pkg/types/azure"
"github.com/openshift/installer/pkg/types/baremetal"
"github.com/openshift/installer/pkg/types/gcp"
+ "github.com/openshift/installer/pkg/types/ibmcloud"
"github.com/openshift/installer/pkg/types/kubevirt"
"github.com/openshift/installer/pkg/types/libvirt"
"github.com/openshift/installer/pkg/types/openstack"
@@ -31,6 +32,7 @@ type ClusterPlatformMetadata struct {
Libvirt *libvirt.Metadata `json:"libvirt,omitempty"`
Azure *azure.Metadata `json:"azure,omitempty"`
GCP *gcp.Metadata `json:"gcp,omitempty"`
+ IBMCloud *ibmcloud.Metadata `json:"ibmcloud,omitempty"`
BareMetal *baremetal.Metadata `json:"baremetal,omitempty"`
Ovirt *ovirt.Metadata `json:"ovirt,omitempty"`
VSphere *vsphere.Metadata `json:"vsphere,omitempty"`
@@ -59,6 +61,9 @@ func (cpm *ClusterPlatformMetadata) Platform() string {
if cpm.GCP != nil {
return gcp.Name
}
+ if cpm.IBMCloud != nil {
+ return ibmcloud.Name
+ }
if cpm.BareMetal != nil {
return "baremetal"
}
diff --git a/vendor/github.com/openshift/installer/pkg/types/gcp/validation/platform.go b/vendor/github.com/openshift/installer/pkg/types/gcp/validation/platform.go
index 2f0f7d0bf0a..6513307190a 100644
--- a/vendor/github.com/openshift/installer/pkg/types/gcp/validation/platform.go
+++ b/vendor/github.com/openshift/installer/pkg/types/gcp/validation/platform.go
@@ -27,6 +27,7 @@ var (
"asia-southeast1": "Jurong West, Singapore",
"asia-southeast2": "Jakarta, Indonesia",
"australia-southeast1": "Sydney, Australia",
+ "europe-central2": "Warsaw, Poland",
"europe-north1": "Hamina, Finland",
"europe-west1": "St. Ghislain, Belgium",
"europe-west2": "London, England, UK",
@@ -37,7 +38,7 @@ var (
"southamerica-east1": "São Paulo, Brazil",
"us-central1": "Council Bluffs, Iowa, USA",
"us-east1": "Moncks Corner, South Carolina, USA",
- "us-east4": "Ashburn, Northern Virginia, USA",
+ "us-east4": "Ashburn, Virginia, USA",
"us-west1": "The Dalles, Oregon, USA",
"us-west2": "Los Angeles, California, USA",
"us-west3": "Salt Lake City, Utah, USA",
diff --git a/vendor/github.com/openshift/installer/pkg/types/ibmcloud/OWNERS b/vendor/github.com/openshift/installer/pkg/types/ibmcloud/OWNERS
new file mode 100644
index 00000000000..d21edb362ba
--- /dev/null
+++ b/vendor/github.com/openshift/installer/pkg/types/ibmcloud/OWNERS
@@ -0,0 +1,7 @@
+# See the OWNERS docs: https://git.k8s.io/community/contributors/guide/owners.md
+# This file just uses aliases defined in OWNERS_ALIASES.
+
+approvers:
+ - ibmcloud-approvers
+reviewers:
+ - ibmcloud-reviewers
\ No newline at end of file
diff --git a/vendor/github.com/openshift/installer/pkg/types/ibmcloud/doc.go b/vendor/github.com/openshift/installer/pkg/types/ibmcloud/doc.go
new file mode 100644
index 00000000000..fd470986ff7
--- /dev/null
+++ b/vendor/github.com/openshift/installer/pkg/types/ibmcloud/doc.go
@@ -0,0 +1,6 @@
+// Package ibmcloud contains IBM Cloud-specific structures for installer
+// configuration and management.
+package ibmcloud
+
+// Name is name for the ibmcloud platform.
+const Name string = "ibmcloud"
diff --git a/vendor/github.com/openshift/installer/pkg/types/ibmcloud/machinepool.go b/vendor/github.com/openshift/installer/pkg/types/ibmcloud/machinepool.go
new file mode 100644
index 00000000000..8c829f7b23a
--- /dev/null
+++ b/vendor/github.com/openshift/installer/pkg/types/ibmcloud/machinepool.go
@@ -0,0 +1,48 @@
+package ibmcloud
+
+// MachinePool stores the configuration for a machine pool installed on IBM Cloud.
+type MachinePool struct {
+ // InstanceType is the VSI machine profile.
+ InstanceType string `json:"type,omitempty"`
+
+ // Zones is the list of availability zones used for machines in the pool.
+ // +optional
+ Zones []string `json:"zones,omitempty"`
+
+ // BootVolume is the configuration for the machine's boot volume.
+ // +optional
+ BootVolume *BootVolume `json:"bootVolume,omitempty"`
+}
+
+// BootVolume stores the configuration for an individual machine's boot volume.
+type BootVolume struct {
+ // EncryptionKey is the CRN referencing a Key Protect or Hyper Protect
+ // Crypto Services key to use for volume encryption. If not specified, a
+ // provider managed encryption key will be used.
+ // +optional
+ EncryptionKey string `json:"encryptionKey,omitempty"`
+}
+
+// Set sets the values from `required` to `a`.
+func (a *MachinePool) Set(required *MachinePool) {
+ if required == nil || a == nil {
+ return
+ }
+
+ if required.InstanceType != "" {
+ a.InstanceType = required.InstanceType
+ }
+
+ if len(required.Zones) > 0 {
+ a.Zones = required.Zones
+ }
+
+ if required.BootVolume != nil {
+ if a.BootVolume == nil {
+ a.BootVolume = &BootVolume{}
+ }
+ if required.BootVolume.EncryptionKey != "" {
+ a.BootVolume.EncryptionKey = required.BootVolume.EncryptionKey
+ }
+ }
+}
diff --git a/vendor/github.com/openshift/installer/pkg/types/ibmcloud/metadata.go b/vendor/github.com/openshift/installer/pkg/types/ibmcloud/metadata.go
new file mode 100644
index 00000000000..1ebd49ad61a
--- /dev/null
+++ b/vendor/github.com/openshift/installer/pkg/types/ibmcloud/metadata.go
@@ -0,0 +1,12 @@
+package ibmcloud
+
+// Metadata contains IBM Cloud metadata (e.g. for uninstalling the cluster).
+type Metadata struct {
+ AccountID string `json:"accountID"`
+ BaseDomain string `json:"baseDomain"`
+ CISInstanceCRN string `json:"cisInstanceCRN"`
+ Region string `json:"region,omitempty"`
+ ResourceGroupName string `json:"resourceGroupName,omitempty"`
+ VPC string `json:"vpc,omitempty"`
+ Subnets []string `json:"subnets,omitempty"`
+}
diff --git a/vendor/github.com/openshift/installer/pkg/types/ibmcloud/platform.go b/vendor/github.com/openshift/installer/pkg/types/ibmcloud/platform.go
new file mode 100644
index 00000000000..33de12af7a4
--- /dev/null
+++ b/vendor/github.com/openshift/installer/pkg/types/ibmcloud/platform.go
@@ -0,0 +1,48 @@
+package ibmcloud
+
+// Platform stores all the global configuration that all machinesets use.
+type Platform struct {
+ // Region specifies the IBM Cloud region where the cluster will be
+ // created.
+ Region string `json:"region"`
+
+ // ResourceGroupName is the name of an already existing resource group where the
+ // cluster should be installed. This resource group should only be used for
+ // this specific cluster and the cluster components will assume ownership of
+ // all resources in the resource group. Destroying the cluster using installer
+ // will delete this resource group.
+ //
+ // This resource group must be empty with no other resources when trying to
+ // use it for creating a cluster. If empty, a new resource group will be created
+ // for the cluster.
+ // +optional
+ ResourceGroupName string `json:"resourceGroupName,omitempty"`
+
+ // VPCResourceGroupName specifies the resource group containing an existing
+ // VPC. This must be defined if `VPC` is defined.
+ // +optional
+ VPCResourceGroupName string `json:"vpcResourceGroupName,omitempty"`
+
+ // DefaultMachinePlatform is the default configuration used when installing
+ // on IBM Cloud for machine pools which do not define their own platform
+ // configuration.
+ // +optional
+ DefaultMachinePlatform *MachinePool `json:"defaultMachinePlatform,omitempty"`
+
+ // VPC is the ID of an existing VPC network. Leave unset and the installer
+ // will create a new VPC network on your behalf.
+ VPC string `json:"vpc,omitempty"`
+
+ // Subnets is a list of existing subnet IDs. Leave unset and the installer
+ // will create new subnets in the VPC network on your behalf.
+ // +optional
+ Subnets []string `json:"subnets,omitempty"`
+}
+
+// ClusterResourceGroupName returns the name of the resource group for the cluster.
+func (p *Platform) ClusterResourceGroupName(infraID string) string {
+ if len(p.ResourceGroupName) > 0 {
+ return p.ResourceGroupName
+ }
+ return infraID
+}
diff --git a/vendor/github.com/openshift/installer/pkg/types/installconfig.go b/vendor/github.com/openshift/installer/pkg/types/installconfig.go
index e3dadb4c30c..00bb8e294ad 100644
--- a/vendor/github.com/openshift/installer/pkg/types/installconfig.go
+++ b/vendor/github.com/openshift/installer/pkg/types/installconfig.go
@@ -9,6 +9,7 @@ import (
"github.com/openshift/installer/pkg/types/azure"
"github.com/openshift/installer/pkg/types/baremetal"
"github.com/openshift/installer/pkg/types/gcp"
+ "github.com/openshift/installer/pkg/types/ibmcloud"
"github.com/openshift/installer/pkg/types/kubevirt"
"github.com/openshift/installer/pkg/types/libvirt"
"github.com/openshift/installer/pkg/types/none"
@@ -22,7 +23,8 @@ const (
// InstallConfigVersion is the version supported by this package.
// If you bump this, you must also update the list of convertable values in
// pkg/types/conversion/installconfig.go
- InstallConfigVersion = "v1"
+ InstallConfigVersion = "v1"
+ workerMachinePoolName = "worker"
)
var (
@@ -42,9 +44,13 @@ var (
// to the user in the interactive wizard.
HiddenPlatformNames = []string{
baremetal.Name,
+ ibmcloud.Name,
kubevirt.Name,
none.Name,
}
+
+ // OKD is a setting to enable community-only modifications
+ OKD = false
)
// PublishingStrategy is a strategy for how various endpoints for the cluster are exposed.
@@ -138,9 +144,15 @@ type InstallConfig struct {
// field must not be set.
// AWS: "Mint", "Passthrough", "Manual"
// Azure: "Mint", "Passthrough", "Manual"
+ // AzureStack: "Manual"
// GCP: "Mint", "Passthrough", "Manual"
+ // IBMCloud: "Manual"
// +optional
CredentialsMode CredentialsMode `json:"credentialsMode,omitempty"`
+
+ // BootstrapInPlace is the configuration for installing a single node
+ // with bootstrap in place installation.
+ BootstrapInPlace *BootstrapInPlace `json:"bootstrapInPlace,omitempty"`
}
// ClusterDomain returns the DNS domain that all records for a cluster must belong to.
@@ -148,6 +160,11 @@ func (c *InstallConfig) ClusterDomain() string {
return fmt.Sprintf("%s.%s", c.ObjectMeta.Name, strings.TrimSuffix(c.BaseDomain, "."))
}
+// IsOKD returns true if community-only modifications are enabled
+func (c *InstallConfig) IsOKD() bool {
+ return OKD
+}
+
// Platform is the configuration for the specific platform upon which to perform
// the installation. Only one of the platform configuration should be set.
type Platform struct {
@@ -167,6 +184,10 @@ type Platform struct {
// +optional
GCP *gcp.Platform `json:"gcp,omitempty"`
+ // IBMCloud is the configuration used when installing on IBM Cloud.
+ // +optional
+ IBMCloud *ibmcloud.Platform `json:"ibmcloud,omitempty"`
+
// Libvirt is the configuration used when installing on libvirt.
// +optional
Libvirt *libvirt.Platform `json:"libvirt,omitempty"`
@@ -207,6 +228,8 @@ func (p *Platform) Name() string {
return baremetal.Name
case p.GCP != nil:
return gcp.Name
+ case p.IBMCloud != nil:
+ return ibmcloud.Name
case p.Libvirt != nil:
return libvirt.Name
case p.None != nil:
@@ -341,3 +364,20 @@ const (
// cloud credentials for each CredentialsRequest.
PassthroughCredentialsMode CredentialsMode = "Passthrough"
)
+
+// BootstrapInPlace defines the configuration for bootstrap-in-place installation
+type BootstrapInPlace struct {
+ // InstallationDisk is the target disk drive for coreos-installer
+ InstallationDisk string `json:"installationDisk"`
+}
+
+// WorkerMachinePool retrieves the worker MachinePool from InstallConfig.Compute
+func (c *InstallConfig) WorkerMachinePool() *MachinePool {
+ for _, machinePool := range c.Compute {
+ if machinePool.Name == workerMachinePoolName {
+ return &machinePool
+ }
+ }
+
+ return nil
+}
diff --git a/vendor/github.com/openshift/installer/pkg/types/installconfig_ibmcloud.go b/vendor/github.com/openshift/installer/pkg/types/installconfig_ibmcloud.go
new file mode 100644
index 00000000000..baf8537c299
--- /dev/null
+++ b/vendor/github.com/openshift/installer/pkg/types/installconfig_ibmcloud.go
@@ -0,0 +1,14 @@
+// +build ibmcloud
+
+package types
+
+import (
+ "sort"
+
+ "github.com/openshift/installer/pkg/types/ibmcloud"
+)
+
+func init() {
+ PlatformNames = append(PlatformNames, ibmcloud.Name)
+ sort.Strings(PlatformNames)
+}
diff --git a/vendor/github.com/openshift/installer/pkg/types/installconfig_okd.go b/vendor/github.com/openshift/installer/pkg/types/installconfig_okd.go
new file mode 100644
index 00000000000..b2113c91695
--- /dev/null
+++ b/vendor/github.com/openshift/installer/pkg/types/installconfig_okd.go
@@ -0,0 +1,7 @@
+// +build okd
+
+package types
+
+func init() {
+ OKD = true
+}
diff --git a/vendor/github.com/openshift/installer/pkg/types/libvirt/platform.go b/vendor/github.com/openshift/installer/pkg/types/libvirt/platform.go
index 8f532fc609a..ffe6d7a6116 100644
--- a/vendor/github.com/openshift/installer/pkg/types/libvirt/platform.go
+++ b/vendor/github.com/openshift/installer/pkg/types/libvirt/platform.go
@@ -33,4 +33,25 @@ type Network struct {
// +kubebuilder:default="tt0"
// +optional
IfName string `json:"if,omitempty"`
+
+ // DnsmasqOptions is the dnsmasq options to be used when installing on
+ // libvirt.
+ //
+ // +optional
+ DnsmasqOptions []DnsmasqOption `json:"dnsmasqOptions,omitempty"`
+}
+
+// DnsmasqOption contains the name and value of the option to configure in the
+// libvirt network.
+type DnsmasqOption struct {
+ // The dnsmasq option name. A full list of options and an explanation for
+ // each can be found in /etc/dnsmasq.conf
+ //
+ // +optional
+ Name string `json:"name,omitempty"`
+
+ // The value that is being set for the particular option.
+ //
+ // +optional
+ Value string `json:"value,omitempty"`
}
diff --git a/vendor/github.com/openshift/installer/pkg/types/machinepools.go b/vendor/github.com/openshift/installer/pkg/types/machinepools.go
index 30d162f5e38..683981a20a8 100644
--- a/vendor/github.com/openshift/installer/pkg/types/machinepools.go
+++ b/vendor/github.com/openshift/installer/pkg/types/machinepools.go
@@ -5,6 +5,7 @@ import (
"github.com/openshift/installer/pkg/types/azure"
"github.com/openshift/installer/pkg/types/baremetal"
"github.com/openshift/installer/pkg/types/gcp"
+ "github.com/openshift/installer/pkg/types/ibmcloud"
"github.com/openshift/installer/pkg/types/kubevirt"
"github.com/openshift/installer/pkg/types/libvirt"
"github.com/openshift/installer/pkg/types/openstack"
@@ -34,6 +35,8 @@ const (
ArchitectureS390X = "s390x"
// ArchitecturePPC64LE indicates ppc64 little endian (Power PC)
ArchitecturePPC64LE = "ppc64le"
+ // ArchitectureARM64 indicates arm (aarch64) systems
+ ArchitectureARM64 = "arm64"
)
// MachinePool is a pool of machines to be installed.
@@ -80,6 +83,9 @@ type MachinePoolPlatform struct {
// GCP is the configuration used when installing on GCP
GCP *gcp.MachinePool `json:"gcp,omitempty"`
+ // IBMCloud is the configuration used when installing on IBM Cloud.
+ IBMCloud *ibmcloud.MachinePool `json:"ibmcloud,omitempty"`
+
// Libvirt is the configuration used when installing on libvirt.
Libvirt *libvirt.MachinePool `json:"libvirt,omitempty"`
@@ -111,6 +117,8 @@ func (p *MachinePoolPlatform) Name() string {
return baremetal.Name
case p.GCP != nil:
return gcp.Name
+ case p.IBMCloud != nil:
+ return ibmcloud.Name
case p.Libvirt != nil:
return libvirt.Name
case p.OpenStack != nil:
diff --git a/vendor/github.com/openshift/installer/pkg/types/openstack/defaults/machinepool.go b/vendor/github.com/openshift/installer/pkg/types/openstack/defaults/machinepool.go
new file mode 100644
index 00000000000..c48e50140b7
--- /dev/null
+++ b/vendor/github.com/openshift/installer/pkg/types/openstack/defaults/machinepool.go
@@ -0,0 +1,6 @@
+package defaults
+
+// DefaultRootVolumeAZ returns the default value for Root Volume availability zones.
+func DefaultRootVolumeAZ() []string {
+ return []string{""}
+}
diff --git a/vendor/github.com/openshift/installer/pkg/types/openstack/machinepool.go b/vendor/github.com/openshift/installer/pkg/types/openstack/machinepool.go
index 248b18f53e4..2d46a7d9e49 100644
--- a/vendor/github.com/openshift/installer/pkg/types/openstack/machinepool.go
+++ b/vendor/github.com/openshift/installer/pkg/types/openstack/machinepool.go
@@ -23,6 +23,10 @@ type MachinePool struct {
// +optional
AdditionalSecurityGroupIDs []string `json:"additionalSecurityGroupIDs,omitempty"`
+ // ServerGroupPolicy will be used to create the Server Group that will contain all the machines of this MachinePool.
+ // Defaults to "soft-anti-affinity".
+ ServerGroupPolicy ServerGroupPolicy `json:"serverGroupPolicy,omitempty"`
+
// Zones is the list of availability zones where the instances should be deployed.
// If no zones are provided, all instances will be deployed on OpenStack Nova default availability zone
// +optional
@@ -45,6 +49,9 @@ func (o *MachinePool) Set(required *MachinePool) {
}
o.RootVolume.Size = required.RootVolume.Size
o.RootVolume.Type = required.RootVolume.Type
+ if len(required.RootVolume.Zones) > 0 {
+ o.RootVolume.Zones = required.RootVolume.Zones
+ }
}
if required.AdditionalNetworkIDs != nil {
@@ -55,6 +62,10 @@ func (o *MachinePool) Set(required *MachinePool) {
o.AdditionalSecurityGroupIDs = append(required.AdditionalSecurityGroupIDs[:0:0], required.AdditionalSecurityGroupIDs...)
}
+ if required.ServerGroupPolicy != "" {
+ o.ServerGroupPolicy = required.ServerGroupPolicy
+ }
+
if len(required.Zones) > 0 {
o.Zones = required.Zones
}
@@ -68,4 +79,9 @@ type RootVolume struct {
// Type defines the type of the volume.
// Required
Type string `json:"type"`
+
+ // Zones is the list of availability zones where the root volumes should be deployed.
+ // If no zones are provided, all instances will be deployed on OpenStack Cinder default availability zone
+ // +optional
+ Zones []string `json:"zones,omitempty"`
}
diff --git a/vendor/github.com/openshift/installer/pkg/types/openstack/servergrouppolicy.go b/vendor/github.com/openshift/installer/pkg/types/openstack/servergrouppolicy.go
new file mode 100644
index 00000000000..23f4b3e05c5
--- /dev/null
+++ b/vendor/github.com/openshift/installer/pkg/types/openstack/servergrouppolicy.go
@@ -0,0 +1,24 @@
+package openstack
+
+const (
+ // SGPolicyUnset represents the default empty string for the ServerGroupPolicy field of the MachinePool.
+ SGPolicyUnset ServerGroupPolicy = ""
+
+ // SGPolicyAffinity represents the "affinity" ServerGroupPolicy field of the MachinePool.
+ SGPolicyAffinity ServerGroupPolicy = "affinity"
+
+ // SGPolicySoftAffinity represents the "soft-affinity" ServerGroupPolicy field of the MachinePool.
+ SGPolicySoftAffinity ServerGroupPolicy = "soft-affinity"
+
+ // SGPolicyAntiAffinity represents the "anti-affinity" ServerGroupPolicy field of the MachinePool.
+ SGPolicyAntiAffinity ServerGroupPolicy = "anti-affinity"
+
+ // SGPolicySoftAntiAffinity represents the "soft-anti-affinity" ServerGroupPolicy field of the MachinePool.
+ SGPolicySoftAntiAffinity ServerGroupPolicy = "soft-anti-affinity"
+)
+
+// ServerGroupPolicy is the policy to be applied to an OpenStack Server Group.
+//
+// +kubebuilder:validation:Enum="";affinity;soft-affinity;anti-affinity;soft-anti-affinity
+// +optional
+type ServerGroupPolicy string
diff --git a/vendor/github.com/openshift/installer/pkg/types/ovirt/machinepool.go b/vendor/github.com/openshift/installer/pkg/types/ovirt/machinepool.go
index 16a87aef450..535956d691e 100644
--- a/vendor/github.com/openshift/installer/pkg/types/ovirt/machinepool.go
+++ b/vendor/github.com/openshift/installer/pkg/types/ovirt/machinepool.go
@@ -24,6 +24,21 @@ type MachinePool struct {
// +kubebuilder:validation:Enum="";desktop;server;high_performance
// +optional
VMType VMType `json:"vmType,omitempty"`
+
+ // AffinityGroupsNames contains a list of oVirt affinity group names that the newly created machines will join.
+ // The affinity groups should exist on the oVirt cluster or created by the OpenShift installer.
+ // +optional
+ AffinityGroupsNames []string `json:"affinityGroupsNames"`
+
+ // AutoPinningPolicy defines the policy to automatically set the CPU
+ // and NUMA including pinning to the host for the instance.
+ // When the field is omitted the default will be "none".
+ // +optional
+ AutoPinningPolicy AutoPinningPolicy `json:"autoPinningPolicy,omitempty"`
+
+ // Hugepages is the size of a VM's hugepages to use in KiBs.
+ // +optional
+ Hugepages Hugepages `json:"hugepages,omitempty"`
}
// Disk defines a VM disk
@@ -65,6 +80,35 @@ const (
VMTypeHighPerformance VMType = "high_performance"
)
+// AutoPinningPolicy defines the policy to automatically set the CPU
+// and NUMA including pinning to the host for the instance.
+// +kubebuilder:validation:Enum=none;resize_and_pin
+type AutoPinningPolicy string
+
+const (
+ // AutoPinningNone - will mean to do nothing, leaving the VM configuration
+ // as is.
+ AutoPinningNone AutoPinningPolicy = "none"
+ // AutoPinningResizeAndPin - will override the CPU and NUMA topology to fit the host,
+ // including pinning them to get maximal performance.
+ AutoPinningResizeAndPin AutoPinningPolicy = "resize_and_pin"
+)
+
+// Hugepages is the size of a VM's hugepages to use in KiBs.
+// The VM will consume its memory from the host using the host
+// hugepages.
+// In order to run the VM, the host should have enough hugepages
+// with the specific size.
+// +kubebuilder:validation:Enum=2048;1048576
+type Hugepages int32
+
+const (
+ // Hugepages2MB for using 2MB hugepages.
+ Hugepages2MB Hugepages = 2048
+ // Hugepages1GB for using 1GB hugepages.
+ Hugepages1GB Hugepages = 1048576
+)
+
// Set sets the values from `required` to `p`.
func (p *MachinePool) Set(required *MachinePool) {
if required == nil || p == nil {
@@ -90,4 +134,16 @@ func (p *MachinePool) Set(required *MachinePool) {
if required.OSDisk != nil {
p.OSDisk = required.OSDisk
}
+
+ if len(required.AffinityGroupsNames) > 0 {
+ p.AffinityGroupsNames = required.AffinityGroupsNames
+ }
+
+ if required.AutoPinningPolicy != "" {
+ p.AutoPinningPolicy = required.AutoPinningPolicy
+ }
+
+ if required.Hugepages > 0 {
+ p.Hugepages = required.Hugepages
+ }
}
diff --git a/vendor/github.com/openshift/installer/pkg/types/ovirt/platform.go b/vendor/github.com/openshift/installer/pkg/types/ovirt/platform.go
index 7ce7997d377..06b869344ff 100644
--- a/vendor/github.com/openshift/installer/pkg/types/ovirt/platform.go
+++ b/vendor/github.com/openshift/installer/pkg/types/ovirt/platform.go
@@ -33,4 +33,22 @@ type Platform struct {
// Default will set the image field to the latest RHCOS image.
// +optional
DefaultMachinePlatform *MachinePool `json:"defaultMachinePlatform,omitempty"`
+
+ // AffinityGroups contains the RHV affinity groups that the installer will create.
+ // +optional
+ AffinityGroups []AffinityGroup `json:"affinityGroups"`
+}
+
+// AffinityGroup defines the affinity group that the installer will create
+type AffinityGroup struct {
+ // Name name of the affinity group
+ Name string `json:"name"`
+ // Priority of the affinity group, needs to be between 1 (lowest) - 5 (highest)
+ Priority int `json:"priority"`
+ // Description of the affinity group
+ // +optional
+ Description string `json:"description,omitempty"`
+ // Enforcing whether to create a hard affinity rule, default is false
+ // +optional
+ Enforcing bool `json:"enforcing"`
}
diff --git a/vendor/github.com/openshift/installer/pkg/types/ovirt/validation/machinepool.go b/vendor/github.com/openshift/installer/pkg/types/ovirt/validation/machinepool.go
index 7075edff49b..889cb34d4b5 100644
--- a/vendor/github.com/openshift/installer/pkg/types/ovirt/validation/machinepool.go
+++ b/vendor/github.com/openshift/installer/pkg/types/ovirt/validation/machinepool.go
@@ -48,6 +48,18 @@ func ValidateMachinePool(p *ovirt.MachinePool, fldPath *field.Path) field.ErrorL
}
}
+ if p.AutoPinningPolicy != "" && !ValidAutoPinningPolicy(p.AutoPinningPolicy) {
+ allErrs = append(allErrs, field.NotSupported(fldPath.Child("autoPinningPolicy"), p.AutoPinningPolicy,
+ []string{string(ovirt.AutoPinningNone), string(ovirt.AutoPinningResizeAndPin)}))
+ }
+
+ if p.Hugepages > 0 {
+ if p.Hugepages != 2048 && p.Hugepages != 1048576 {
+ allErrs = append(allErrs, field.NotSupported(fldPath.Child("hugepages"), p.Hugepages,
+ []string{string(ovirt.Hugepages2MB), string(ovirt.Hugepages1GB)}))
+ }
+ }
+
return allErrs
}
@@ -69,3 +81,21 @@ func supportedVMTypes() []ovirt.VMType {
ovirt.VMTypeHighPerformance,
}
}
+
+// ValidAutoPinningPolicy returns true if the AutoPinningPolicy is supported.
+func ValidAutoPinningPolicy(autoPinningPolicy ovirt.AutoPinningPolicy) bool {
+ for _, v := range supportedAutoPinningPolicies() {
+ if autoPinningPolicy == v {
+ return true
+ }
+ }
+ return false
+}
+
+// supportedAutoPinningPolicies returns a slice of all supported AutoPinningPolicy.
+func supportedAutoPinningPolicies() []ovirt.AutoPinningPolicy {
+ return []ovirt.AutoPinningPolicy{
+ ovirt.AutoPinningNone,
+ ovirt.AutoPinningResizeAndPin,
+ }
+}
diff --git a/vendor/github.com/openshift/installer/pkg/types/ovirt/validation/platform.go b/vendor/github.com/openshift/installer/pkg/types/ovirt/validation/platform.go
index cab32c9c9a3..8417450ed3e 100644
--- a/vendor/github.com/openshift/installer/pkg/types/ovirt/validation/platform.go
+++ b/vendor/github.com/openshift/installer/pkg/types/ovirt/validation/platform.go
@@ -1,6 +1,8 @@
package validation
import (
+ "fmt"
+ "github.com/pkg/errors"
"k8s.io/apimachinery/pkg/util/validation/field"
"github.com/openshift/installer/pkg/types/ovirt"
@@ -27,8 +29,56 @@ func ValidatePlatform(p *ovirt.Platform, fldPath *field.Path) field.ErrorList {
allErrs = append(allErrs, field.Invalid(fldPath.Child("vnicProfileID"), p.IngressVIP, err.Error()))
}
}
+ if p.AffinityGroups != nil {
+ allErrs = append(allErrs, validateAffinityGroupFields(p, fldPath.Child("affinityGroups"))...)
+ allErrs = append(allErrs, validateAffinityGroupDuplicate(p.AffinityGroups)...)
+ }
if p.DefaultMachinePlatform != nil {
allErrs = append(allErrs, ValidateMachinePool(p.DefaultMachinePlatform, fldPath.Child("defaultMachinePlatform"))...)
}
return allErrs
}
+
+func validateAffinityGroupFields(platform *ovirt.Platform, fldPath *field.Path) field.ErrorList {
+ allErrs := field.ErrorList{}
+ for _, ag := range platform.AffinityGroups {
+ if ag.Name == "" {
+ allErrs = append(
+ allErrs,
+ field.Required(fldPath,
+ fmt.Sprintf("Invalid affinity group %v: name must be not empty", ag.Name)))
+ }
+ if ag.Priority < 0 || ag.Priority > 5 {
+ allErrs = append(
+ allErrs,
+ field.Invalid(fldPath, ag,
+ fmt.Sprintf(
+ "Invalid affinity group %v: priority value must be between 0-5 found priority %v",
+ ag.Name,
+ ag.Priority)))
+ }
+ }
+ return allErrs
+}
+
+// validateAffinityGroupDuplicate checks that there is no duplicated affinity group with different fields
+func validateAffinityGroupDuplicate(agList []ovirt.AffinityGroup) field.ErrorList {
+ allErrs := field.ErrorList{}
+ for i, ag1 := range agList {
+ for _, ag2 := range agList[i+1:] {
+ if ag1.Name == ag2.Name {
+ if ag1.Priority != ag2.Priority ||
+ ag1.Description != ag2.Description ||
+ ag1.Enforcing != ag2.Enforcing {
+ allErrs = append(
+ allErrs,
+ &field.Error{
+ Type: field.ErrorTypeDuplicate,
+ BadValue: errors.Errorf("Error validating affinity groups: found same "+
+ "affinity group defined twice with different fields %v anf %v", ag1, ag2)})
+ }
+ }
+ }
+ }
+ return allErrs
+}
diff --git a/vendor/github.com/openshift/installer/pkg/validate/validate.go b/vendor/github.com/openshift/installer/pkg/validate/validate.go
index acc1a9234f5..7e17fdbc308 100644
--- a/vendor/github.com/openshift/installer/pkg/validate/validate.go
+++ b/vendor/github.com/openshift/installer/pkg/validate/validate.go
@@ -115,6 +115,17 @@ func ClusterName1035(v string) error {
return ClusterName(v)
}
+// GCPClusterName checks if the provided cluster name has words similar to the word 'google'
+// since resources with that name are not allowed in GCP.
+func GCPClusterName(v string) error {
+ reStartsWith := regexp.MustCompile("^goog")
+ reContains := regexp.MustCompile(".*g[o0]{2}gle.*")
+ if reStartsWith.MatchString(v) || reContains.MatchString(v) {
+ return errors.New("cluster name must not start with \"goog\" or contain variations of \"google\"")
+ }
+ return nil
+}
+
// ClusterNameMaxLength validates if the string provided length is
// greater than maxlen argument.
func ClusterNameMaxLength(v string, maxlen int) error {
@@ -148,6 +159,27 @@ func SubnetCIDR(cidr *net.IPNet) error {
return nil
}
+// ServiceSubnetCIDR checks if the given IP net is a valid CIDR for the Kubernetes service network
+func ServiceSubnetCIDR(cidr *net.IPNet) error {
+ if cidr.IP.IsUnspecified() {
+ return errors.New("address must be specified")
+ }
+ nip := cidr.IP.Mask(cidr.Mask)
+ if nip.String() != cidr.IP.String() {
+ return fmt.Errorf("invalid network address. got %s, expecting %s", cidr.String(), (&net.IPNet{IP: nip, Mask: cidr.Mask}).String())
+ }
+ maskLen, addrLen := cidr.Mask.Size()
+ if addrLen == 32 && maskLen < 12 {
+ return fmt.Errorf("subnet size for IPv4 service network must be /12 or greater (/16 is recommended)")
+ } else if addrLen == 128 && maskLen < 108 {
+ // Kubernetes allows any length greater than 108 (and so do we, for
+ // backward compat), but for various reasons there is no point in
+ // using any value other than 112.
+ return fmt.Errorf("subnet size for IPv6 service network should be /112")
+ }
+ return nil
+}
+
// DoCIDRsOverlap returns true if one of the CIDRs is a subset of the other.
func DoCIDRsOverlap(acidr, bcidr *net.IPNet) bool {
return acidr.Contains(bcidr.IP) || bcidr.Contains(acidr.IP)
@@ -238,3 +270,16 @@ func UUID(val string) error {
_, err := uuid.Parse(val)
return err
}
+
+// Host validates that a given string is a valid URI host.
+func Host(v string) error {
+ proxyIP := net.ParseIP(v)
+ if proxyIP != nil {
+ return nil
+ }
+ re := regexp.MustCompile("^[a-z]")
+ if !re.MatchString(v) {
+ return errors.New("domain name must begin with a lower-case letter")
+ }
+ return validateSubdomain(v)
+}
diff --git a/vendor/github.com/openshift/installer/pkg/version/version.go b/vendor/github.com/openshift/installer/pkg/version/version.go
index 00d3c173c24..1e6e50a7ddb 100644
--- a/vendor/github.com/openshift/installer/pkg/version/version.go
+++ b/vendor/github.com/openshift/installer/pkg/version/version.go
@@ -4,6 +4,8 @@ package version
import (
"fmt"
"strings"
+
+ "github.com/openshift/installer/pkg/types"
)
// This file handles correctly identifying the default release version, which is expected to be
@@ -26,6 +28,12 @@ var (
// Set in hack/build.sh.
Commit = ""
+ // defaultArch is the payload architecture for which the installer was built,
+ // which even on Linux may not be the same as the architecture of the
+ // installer binary itself.
+ // Set in hack/build.sh.
+ defaultArch = "amd64"
+
// defaultReleaseInfoPadded may be replaced in the binary with Release Metadata: Version that overrides defaultVersion as
// a null-terminated string within the allowed character length. This allows a distributor to override the payload
// location without having to rebuild the source.
@@ -62,3 +70,8 @@ func Version() (string, error) {
}
return releaseName, nil
}
+
+// DefaultArch returns the default release architecture
+func DefaultArch() types.Architecture {
+ return types.Architecture(defaultArch)
+}
diff --git a/vendor/github.com/openshift/library-go/pkg/operator/resource/resourcemerge/admissionregistration.go b/vendor/github.com/openshift/library-go/pkg/operator/resource/resourcemerge/admissionregistration.go
new file mode 100644
index 00000000000..2fcfd13949e
--- /dev/null
+++ b/vendor/github.com/openshift/library-go/pkg/operator/resource/resourcemerge/admissionregistration.go
@@ -0,0 +1,51 @@
+package resourcemerge
+
+import (
+ operatorsv1 "github.com/openshift/api/operator/v1"
+ admissionregistrationv1 "k8s.io/api/admissionregistration/v1"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+)
+
+// ExpectedMutatingWebhooksConfiguration returns last applied generation for MutatingWebhookConfiguration resource registered in operator
+func ExpectedMutatingWebhooksConfiguration(name string, previousGenerations []operatorsv1.GenerationStatus) int64 {
+ generation := GenerationFor(previousGenerations, schema.GroupResource{Group: admissionregistrationv1.SchemeGroupVersion.Group, Resource: "mutatingwebhookconfigurations"}, "", name)
+ if generation != nil {
+ return generation.LastGeneration
+ }
+ return -1
+}
+
+// SetMutatingWebhooksConfigurationGeneration updates operator generation status list with last applied generation for provided MutatingWebhookConfiguration resource
+func SetMutatingWebhooksConfigurationGeneration(generations *[]operatorsv1.GenerationStatus, actual *admissionregistrationv1.MutatingWebhookConfiguration) {
+ if actual == nil {
+ return
+ }
+ SetGeneration(generations, operatorsv1.GenerationStatus{
+ Group: admissionregistrationv1.SchemeGroupVersion.Group,
+ Resource: "mutatingwebhookconfigurations",
+ Name: actual.Name,
+ LastGeneration: actual.ObjectMeta.Generation,
+ })
+}
+
+// ExpectedValidatingWebhooksConfiguration returns last applied generation for ValidatingWebhookConfiguration resource registered in operator
+func ExpectedValidatingWebhooksConfiguration(name string, previousGenerations []operatorsv1.GenerationStatus) int64 {
+ generation := GenerationFor(previousGenerations, schema.GroupResource{Group: admissionregistrationv1.SchemeGroupVersion.Group, Resource: "validatingwebhookconfigurations"}, "", name)
+ if generation != nil {
+ return generation.LastGeneration
+ }
+ return -1
+}
+
+// SetValidatingWebhooksConfigurationGeneration updates operator generation status list with last applied generation for provided ValidatingWebhookConfiguration resource
+func SetValidatingWebhooksConfigurationGeneration(generations *[]operatorsv1.GenerationStatus, actual *admissionregistrationv1.ValidatingWebhookConfiguration) {
+ if actual == nil {
+ return
+ }
+ SetGeneration(generations, operatorsv1.GenerationStatus{
+ Group: admissionregistrationv1.SchemeGroupVersion.Group,
+ Resource: "validatingwebhookconfigurations",
+ Name: actual.Name,
+ LastGeneration: actual.ObjectMeta.Generation,
+ })
+}
diff --git a/vendor/github.com/openshift/library-go/pkg/operator/resource/resourcemerge/object_merger.go b/vendor/github.com/openshift/library-go/pkg/operator/resource/resourcemerge/object_merger.go
index 0f2cae8fb4b..5aee7879c9c 100644
--- a/vendor/github.com/openshift/library-go/pkg/operator/resource/resourcemerge/object_merger.go
+++ b/vendor/github.com/openshift/library-go/pkg/operator/resource/resourcemerge/object_merger.go
@@ -140,15 +140,27 @@ func MergeMap(modified *bool, existing *map[string]string, required map[string]s
*existing = map[string]string{}
}
for k, v := range required {
- if existingV, ok := (*existing)[k]; !ok || v != existingV {
- *modified = true
- // if "required" map contains a key with "-" as suffix, remove that
- // key from the existing map instead of replacing the value
- if strings.HasSuffix(k, "-") {
- delete(*existing, strings.TrimRight(k, "-"))
- } else {
- (*existing)[k] = v
+ actualKey := k
+ removeKey := false
+
+ // if "required" map contains a key with "-" as suffix, remove that
+ // key from the existing map instead of replacing the value
+ if strings.HasSuffix(k, "-") {
+ removeKey = true
+ actualKey = strings.TrimRight(k, "-")
+ }
+
+ if existingV, ok := (*existing)[actualKey]; removeKey {
+ if !ok {
+ continue
}
+ // value found -> it should be removed
+ delete(*existing, actualKey)
+ *modified = true
+
+ } else if !ok || v != existingV {
+ *modified = true
+ (*existing)[actualKey] = v
}
}
}
diff --git a/vendor/github.com/openshift/library-go/pkg/operator/resource/resourceread/admission.go b/vendor/github.com/openshift/library-go/pkg/operator/resource/resourceread/admission.go
new file mode 100644
index 00000000000..7c69478ea6c
--- /dev/null
+++ b/vendor/github.com/openshift/library-go/pkg/operator/resource/resourceread/admission.go
@@ -0,0 +1,35 @@
+package resourceread
+
+import (
+ admissionv1 "k8s.io/api/admissionregistration/v1"
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/runtime/serializer"
+ utilruntime "k8s.io/apimachinery/pkg/util/runtime"
+)
+
+var (
+ admissionScheme = runtime.NewScheme()
+ admissionCodecs = serializer.NewCodecFactory(admissionScheme)
+)
+
+func init() {
+ utilruntime.Must(admissionv1.AddToScheme(admissionScheme))
+}
+
+func ReadValidatingWebhookConfigurationV1OrDie(objBytes []byte) *admissionv1.ValidatingWebhookConfiguration {
+ requiredObj, err := runtime.Decode(admissionCodecs.UniversalDecoder(admissionv1.SchemeGroupVersion), objBytes)
+ if err != nil {
+ panic(err)
+ }
+
+ return requiredObj.(*admissionv1.ValidatingWebhookConfiguration)
+}
+
+func ReadMutatingWebhookConfigurationV1OrDie(objBytes []byte) *admissionv1.MutatingWebhookConfiguration {
+ requiredObj, err := runtime.Decode(admissionCodecs.UniversalDecoder(admissionv1.SchemeGroupVersion), objBytes)
+ if err != nil {
+ panic(err)
+ }
+
+ return requiredObj.(*admissionv1.MutatingWebhookConfiguration)
+}
diff --git a/vendor/github.com/openshift/library-go/pkg/operator/resource/resourceread/route.go b/vendor/github.com/openshift/library-go/pkg/operator/resource/resourceread/route.go
new file mode 100644
index 00000000000..08e125892be
--- /dev/null
+++ b/vendor/github.com/openshift/library-go/pkg/operator/resource/resourceread/route.go
@@ -0,0 +1,26 @@
+package resourceread
+
+import (
+ routev1 "github.com/openshift/api/route/v1"
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/runtime/serializer"
+)
+
+var (
+ routeScheme = runtime.NewScheme()
+ routeCodecs = serializer.NewCodecFactory(routeScheme)
+)
+
+func init() {
+ if err := routev1.AddToScheme(routeScheme); err != nil {
+ panic(err)
+ }
+}
+
+func ReadRouteV1OrDie(objBytes []byte) *routev1.Route {
+ requiredObj, err := runtime.Decode(routeCodecs.UniversalDecoder(routev1.SchemeGroupVersion), objBytes)
+ if err != nil {
+ panic(err)
+ }
+ return requiredObj.(*routev1.Route)
+}
diff --git a/vendor/github.com/openshift/library-go/pkg/operator/resource/resourceread/storage.go b/vendor/github.com/openshift/library-go/pkg/operator/resource/resourceread/storage.go
index 0a4c290e5b6..6a7d51ee7b3 100644
--- a/vendor/github.com/openshift/library-go/pkg/operator/resource/resourceread/storage.go
+++ b/vendor/github.com/openshift/library-go/pkg/operator/resource/resourceread/storage.go
@@ -33,3 +33,11 @@ func ReadCSIDriverV1Beta1OrDie(objBytes []byte) *storagev1beta1.CSIDriver {
}
return requiredObj.(*storagev1beta1.CSIDriver)
}
+
+func ReadCSIDriverV1OrDie(objBytes []byte) *storagev1.CSIDriver {
+ requiredObj, err := runtime.Decode(storageCodecs.UniversalDecoder(storagev1.SchemeGroupVersion), objBytes)
+ if err != nil {
+ panic(err)
+ }
+ return requiredObj.(*storagev1.CSIDriver)
+}
diff --git a/vendor/github.com/openshift/library-go/pkg/operator/resource/resourceread/credentialsrequest.go b/vendor/github.com/openshift/library-go/pkg/operator/resource/resourceread/unstructured.go
similarity index 76%
rename from vendor/github.com/openshift/library-go/pkg/operator/resource/resourceread/credentialsrequest.go
rename to vendor/github.com/openshift/library-go/pkg/operator/resource/resourceread/unstructured.go
index 76bc6823d92..bf6bfb01051 100644
--- a/vendor/github.com/openshift/library-go/pkg/operator/resource/resourceread/credentialsrequest.go
+++ b/vendor/github.com/openshift/library-go/pkg/operator/resource/resourceread/unstructured.go
@@ -6,6 +6,10 @@ import (
)
func ReadCredentialRequestsOrDie(objBytes []byte) *unstructured.Unstructured {
+ return ReadUnstructuredOrDie(objBytes)
+}
+
+func ReadUnstructuredOrDie(objBytes []byte) *unstructured.Unstructured {
udi, _, err := scheme.Codecs.UniversalDecoder().Decode(objBytes, nil, &unstructured.Unstructured{})
if err != nil {
panic(err)
diff --git a/vendor/github.com/openshift/library-go/pkg/verify/verify.go b/vendor/github.com/openshift/library-go/pkg/verify/verify.go
index c858326b94f..a06e4ea83bc 100644
--- a/vendor/github.com/openshift/library-go/pkg/verify/verify.go
+++ b/vendor/github.com/openshift/library-go/pkg/verify/verify.go
@@ -68,7 +68,7 @@ var Reject Interface = rejectVerifier{}
const maxSignatureSearch = 10
// validReleaseDigest is a verification rule to filter clearly invalid digests.
-var validReleaseDigest = regexp.MustCompile(`^[a-zA-Z0-9:]+$`)
+var validReleaseDigest = regexp.MustCompile(`^[a-z0-9]+(?:[.+_-][a-z0-9]+)*:[a-zA-Z0-9=_-]+$`)
// releaseVerifier implements a signature intersection operation on a provided release
// digest - all verifiers must have at least one valid signature attesting the release
@@ -158,7 +158,7 @@ func (v *releaseVerifier) Verify(ctx context.Context, releaseDigest string) erro
return fmt.Errorf("release images that are not accessed via digest cannot be verified")
}
if !validReleaseDigest.MatchString(releaseDigest) {
- return fmt.Errorf("the provided release image digest contains prohibited characters")
+ return fmt.Errorf("the provided release image digest has an invalid format: %q", releaseDigest)
}
if v.hasVerified(releaseDigest) {
diff --git a/vendor/github.com/openshift/machine-api-operator/pkg/apis/machine/v1beta1/condition_consts.go b/vendor/github.com/openshift/machine-api-operator/pkg/apis/machine/v1beta1/condition_consts.go
new file mode 100644
index 00000000000..9b579de3fb3
--- /dev/null
+++ b/vendor/github.com/openshift/machine-api-operator/pkg/apis/machine/v1beta1/condition_consts.go
@@ -0,0 +1,57 @@
+/*
+Copyright 2020 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 v1beta1
+
+// Conditions and condition Reasons for the MachineHealthCheck object
+const (
+ // RemediationAllowedCondition is set on MachineHealthChecks to show the status of whether the MachineHealthCheck is
+ // allowed to remediate any Machines or whether it is blocked from remediating any further.
+ RemediationAllowedCondition ConditionType = "RemediationAllowed"
+
+ // TooManyUnhealthy is the reason used when too many Machines are unhealthy and the MachineHealthCheck is blocked
+ // from making any further remediations.
+ TooManyUnhealthyReason = "TooManyUnhealthy"
+
+ // ExternalRemediationTemplateAvailable is set on machinehealthchecks when MachineHealthCheck controller uses external remediation.
+ // ExternalRemediationTemplateAvailable is set to false if external remediation template is not found.
+ ExternalRemediationTemplateAvailable ConditionType = "ExternalRemediationTemplateAvailable"
+
+ // ExternalRemediationTemplateNotFound is the reason used when a machine health check fails to find external remediation template.
+ ExternalRemediationTemplateNotFound = "ExternalRemediationTemplateNotFound"
+
+ // ExternalRemediationRequestAvailable is set on machinehealthchecks when MachineHealthCheck controller uses external remediation.
+ // ExternalRemediationRequestAvailable is set to false if creating external remediation request fails.
+ ExternalRemediationRequestAvailable ConditionType = "ExternalRemediationRequestAvailable"
+
+ // ExternalRemediationRequestCreationFailed is the reason used when a machine health check fails to create external remediation request.
+ ExternalRemediationRequestCreationFailed = "ExternalRemediationRequestCreationFailed"
+)
+
+const (
+ // InstanceExistsCondition is set on the Machine to show whether a virtual mahcine has been created by the cloud provider.
+ InstanceExistsCondition ConditionType = "InstanceExists"
+
+ // ErrorCheckingProviderReason is the reason used when the exist operation fails.
+ // This would normally be because we cannot contact the provider.
+ ErrorCheckingProviderReason = "ErrorCheckingProvider"
+
+ // InstanceMissingReason is the reason used when the machine was provisioned, but the instance has gone missing.
+ InstanceMissingReason = "InstanceMissing"
+
+ // InstanceNotCreatedReason is the reason used when the machine has not yet been provisioned.
+ InstanceNotCreatedReason = "InstanceNotCreated"
+)
diff --git a/vendor/github.com/openshift/machine-api-operator/pkg/apis/machine/v1beta1/condition_types.go b/vendor/github.com/openshift/machine-api-operator/pkg/apis/machine/v1beta1/condition_types.go
new file mode 100644
index 00000000000..d95da5377d4
--- /dev/null
+++ b/vendor/github.com/openshift/machine-api-operator/pkg/apis/machine/v1beta1/condition_types.go
@@ -0,0 +1,81 @@
+/*
+Copyright 2020 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 v1beta1
+
+import (
+ corev1 "k8s.io/api/core/v1"
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+)
+
+// ConditionSeverity expresses the severity of a Condition Type failing.
+type ConditionSeverity string
+
+const (
+ // ConditionSeverityError specifies that a condition with `Status=False` is an error.
+ ConditionSeverityError ConditionSeverity = "Error"
+
+ // ConditionSeverityWarning specifies that a condition with `Status=False` is a warning.
+ ConditionSeverityWarning ConditionSeverity = "Warning"
+
+ // ConditionSeverityInfo specifies that a condition with `Status=False` is informative.
+ ConditionSeverityInfo ConditionSeverity = "Info"
+
+ // ConditionSeverityNone should apply only to conditions with `Status=True`.
+ ConditionSeverityNone ConditionSeverity = ""
+)
+
+// ConditionType is a valid value for Condition.Type.
+type ConditionType string
+
+// Condition defines an observation of a Machine API resource operational state.
+type Condition struct {
+ // Type of condition in CamelCase or in foo.example.com/CamelCase.
+ // Many .condition.type values are consistent across resources like Available, but because arbitrary conditions
+ // can be useful (see .node.status.conditions), the ability to deconflict is important.
+ // +required
+ Type ConditionType `json:"type"`
+
+ // Status of the condition, one of True, False, Unknown.
+ // +required
+ Status corev1.ConditionStatus `json:"status"`
+
+ // Severity provides an explicit classification of Reason code, so the users or machines can immediately
+ // understand the current situation and act accordingly.
+ // The Severity field MUST be set only when Status=False.
+ // +optional
+ Severity ConditionSeverity `json:"severity,omitempty"`
+
+ // Last time the condition transitioned from one status to another.
+ // This should be when the underlying condition changed. If that is not known, then using the time when
+ // the API field changed is acceptable.
+ // +required
+ LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"`
+
+ // The reason for the condition's last transition in CamelCase.
+ // The specific API may choose whether or not this field is considered a guaranteed API.
+ // This field may not be empty.
+ // +optional
+ Reason string `json:"reason,omitempty"`
+
+ // A human readable message indicating details about the transition.
+ // This field may be empty.
+ // +optional
+ Message string `json:"message,omitempty"`
+}
+
+// Conditions provide observations of the operational state of a Machine API resource.
+type Conditions []Condition
diff --git a/vendor/github.com/openshift/machine-api-operator/pkg/apis/machine/v1beta1/consts.go b/vendor/github.com/openshift/machine-api-operator/pkg/apis/machine/v1beta1/consts.go
index 363716809a5..982cfa2280f 100644
--- a/vendor/github.com/openshift/machine-api-operator/pkg/apis/machine/v1beta1/consts.go
+++ b/vendor/github.com/openshift/machine-api-operator/pkg/apis/machine/v1beta1/consts.go
@@ -66,6 +66,18 @@ const (
// Example: cannot resolve EC2 IP address.
DeleteMachineError MachineStatusError = "DeleteError"
+ // TemplateClonedFromGroupKindAnnotation is the infrastructure machine
+ // annotation that stores the group-kind of the infrastructure template resource
+ // that was cloned for the machine. This annotation is set only during cloning a
+ // template. Older/adopted machines will not have this annotation.
+ TemplateClonedFromGroupKindAnnotation = "machine.openshift.io/cloned-from-groupkind"
+
+ // TemplateClonedFromNameAnnotation is the infrastructure machine annotation that
+ // stores the name of the infrastructure template resource
+ // that was cloned for the machine. This annotation is set only during cloning a
+ // template. Older/adopted machines will not have this annotation.
+ TemplateClonedFromNameAnnotation = "machine.openshift.io/cloned-from-name"
+
// This error indicates that the machine did not join the cluster
// as a new node within the expected timeframe after instance
// creation at the provider succeeded
diff --git a/vendor/github.com/openshift/machine-api-operator/pkg/apis/machine/v1beta1/machine_types.go b/vendor/github.com/openshift/machine-api-operator/pkg/apis/machine/v1beta1/machine_types.go
index ff690375605..a38c8909cfd 100644
--- a/vendor/github.com/openshift/machine-api-operator/pkg/apis/machine/v1beta1/machine_types.go
+++ b/vendor/github.com/openshift/machine-api-operator/pkg/apis/machine/v1beta1/machine_types.go
@@ -40,7 +40,6 @@ const (
// +genclient
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-/// [Machine]
// Machine is the Schema for the machines API
// +k8s:openapi-gen=true
// +kubebuilder:subresource:status
@@ -60,9 +59,14 @@ type Machine struct {
Status MachineStatus `json:"status,omitempty"`
}
-/// [Machine]
+func (m *Machine) GetConditions() Conditions {
+ return m.Status.Conditions
+}
+
+func (m *Machine) SetConditions(conditions Conditions) {
+ m.Status.Conditions = conditions
+}
-/// [MachineSpec]
// MachineSpec defines the desired state of Machine
type MachineSpec struct {
// ObjectMeta will autopopulate the Node created. Use this to
@@ -98,9 +102,6 @@ type MachineSpec struct {
ProviderID *string `json:"providerID,omitempty"`
}
-/// [MachineSpec]
-
-/// [MachineStatus]
// MachineStatus defines the observed state of Machine
type MachineStatus struct {
// NodeRef will point to the corresponding Node if it exists.
@@ -172,6 +173,9 @@ type MachineStatus struct {
// One of: Failed, Provisioning, Provisioned, Running, Deleting
// +optional
Phase *string `json:"phase,omitempty"`
+
+ // Conditions defines the current state of the Machine
+ Conditions Conditions `json:"conditions,omitempty"`
}
// LastOperation represents the detail of the last performed operation on the MachineObject.
@@ -191,8 +195,6 @@ type LastOperation struct {
Type *string `json:"type,omitempty"`
}
-/// [MachineVersionInfo]
-
func (m *Machine) Validate() field.ErrorList {
errors := field.ErrorList{}
diff --git a/vendor/github.com/openshift/machine-api-operator/pkg/apis/machine/v1beta1/machine_webhook.go b/vendor/github.com/openshift/machine-api-operator/pkg/apis/machine/v1beta1/machine_webhook.go
index 9afc4e6e01e..4257b9cecc4 100644
--- a/vendor/github.com/openshift/machine-api-operator/pkg/apis/machine/v1beta1/machine_webhook.go
+++ b/vendor/github.com/openshift/machine-api-operator/pkg/apis/machine/v1beta1/machine_webhook.go
@@ -14,6 +14,7 @@ import (
vsphere "github.com/openshift/machine-api-operator/pkg/apis/vsphereprovider/v1beta1"
admissionregistrationv1 "k8s.io/api/admissionregistration/v1"
corev1 "k8s.io/api/core/v1"
+ apierrors "k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
utilerrors "k8s.io/apimachinery/pkg/util/errors"
@@ -24,6 +25,7 @@ import (
aws "sigs.k8s.io/cluster-api-provider-aws/pkg/apis/awsprovider/v1beta1"
azure "sigs.k8s.io/cluster-api-provider-azure/pkg/apis/azureprovider/v1beta1"
ctrl "sigs.k8s.io/controller-runtime"
+ "sigs.k8s.io/controller-runtime/pkg/client"
"sigs.k8s.io/controller-runtime/pkg/webhook/admission"
yaml "sigs.k8s.io/yaml"
)
@@ -91,10 +93,9 @@ const (
defaultGCPCredentialsSecret = "gcp-cloud-credentials"
defaultGCPDiskSizeGb = 128
defaultGCPDiskType = "pd-standard"
- // https://releases-art-rhcos.svc.ci.openshift.org/art/storage/releases/rhcos-4.6/46.82.202007212240-0/x86_64/meta.json
- // https://github.com/openshift/installer/pull/3808
- // https://github.com/openshift/installer/blob/d75bf7ad98124b901ae7e22b5595e0392ed6ea3c/data/data/rhcos.json
- defaultGCPDiskImage = "projects/rhcos-cloud/global/images/rhcos-46-82-202007212240-0-gcp-x86-64"
+ // https://releases-art-rhcos.svc.ci.openshift.org/art/storage/releases/rhcos-4.8/48.83.202103122318-0/x86_64/meta.json
+ // https://github.com/openshift/installer/blob/796a99049d3b7489b6c08ec5bd7c7983731afbcf/data/data/rhcos.json#L90-L94
+ defaultGCPDiskImage = "projects/rhcos-cloud/global/images/rhcos-48-83-202103221318-0-gcp-x86-64"
// vSphere Defaults
defaultVSphereCredentialsSecret = "vsphere-cloud-credentials"
@@ -112,6 +113,47 @@ var (
webhookSideEffects = admissionregistrationv1.SideEffectClassNone
)
+func secretExists(c client.Client, name, namespace string) (bool, error) {
+ key := client.ObjectKey{
+ Name: name,
+ Namespace: namespace,
+ }
+ obj := &corev1.Secret{}
+
+ if err := c.Get(context.Background(), key, obj); err != nil {
+ if apierrors.IsNotFound(err) {
+ return false, nil
+ }
+ return false, err
+ }
+ return true, nil
+}
+
+func credentialsSecretExists(c client.Client, name, namespace string) []string {
+ secretExists, err := secretExists(c, name, namespace)
+ if err != nil {
+ return []string{
+ field.Invalid(
+ field.NewPath("providerSpec", "credentialsSecret"),
+ name,
+ fmt.Sprintf("failed to get credentialsSecret: %v", err),
+ ).Error(),
+ }
+ }
+
+ if !secretExists {
+ return []string{
+ field.Invalid(
+ field.NewPath("providerSpec", "credentialsSecret"),
+ name,
+ "not found. Expected CredentialsSecret to exist",
+ ).Error(),
+ }
+ }
+
+ return []string{}
+}
+
func getInfra() (*osconfigv1.Infrastructure, error) {
cfg, err := ctrl.GetConfig()
if err != nil {
@@ -149,7 +191,9 @@ type machineAdmissionFn func(m *Machine, config *admissionConfig) (bool, []strin
type admissionConfig struct {
clusterID string
+ platformStatus *osconfigv1.PlatformStatus
dnsDisconnected bool
+ client client.Client
}
type admissionHandler struct {
@@ -179,7 +223,7 @@ type machineDefaulterHandler struct {
}
// NewValidator returns a new machineValidatorHandler.
-func NewMachineValidator() (*machineValidatorHandler, error) {
+func NewMachineValidator(client client.Client) (*machineValidatorHandler, error) {
infra, err := getInfra()
if err != nil {
return nil, err
@@ -190,13 +234,15 @@ func NewMachineValidator() (*machineValidatorHandler, error) {
return nil, err
}
- return createMachineValidator(infra, dns), nil
+ return createMachineValidator(infra, client, dns), nil
}
-func createMachineValidator(infra *osconfigv1.Infrastructure, dns *osconfigv1.DNS) *machineValidatorHandler {
+func createMachineValidator(infra *osconfigv1.Infrastructure, client client.Client, dns *osconfigv1.DNS) *machineValidatorHandler {
admissionConfig := &admissionConfig{
dnsDisconnected: dns.Spec.PublicZone == nil,
clusterID: infra.Status.InfrastructureName,
+ platformStatus: infra.Status.PlatformStatus,
+ client: client,
}
return &machineValidatorHandler{
admissionHandler: &admissionHandler{
@@ -295,7 +341,7 @@ func MachineValidatingWebhook() admissionregistrationv1.ValidatingWebhook {
Port: pointer.Int32Ptr(defaultWebhookServicePort),
}
return admissionregistrationv1.ValidatingWebhook{
- AdmissionReviewVersions: []string{"v1beta1"},
+ AdmissionReviewVersions: []string{"v1"},
Name: "validation.machine.machine.openshift.io",
FailurePolicy: &webhookFailurePolicy,
SideEffects: &webhookSideEffects,
@@ -327,7 +373,7 @@ func MachineSetValidatingWebhook() admissionregistrationv1.ValidatingWebhook {
Port: pointer.Int32Ptr(defaultWebhookServicePort),
}
return admissionregistrationv1.ValidatingWebhook{
- AdmissionReviewVersions: []string{"v1beta1"},
+ AdmissionReviewVersions: []string{"v1"},
Name: "validation.machineset.machine.openshift.io",
FailurePolicy: &webhookFailurePolicy,
SideEffects: &webhookSideEffects,
@@ -380,7 +426,7 @@ func MachineMutatingWebhook() admissionregistrationv1.MutatingWebhook {
Port: pointer.Int32Ptr(defaultWebhookServicePort),
}
return admissionregistrationv1.MutatingWebhook{
- AdmissionReviewVersions: []string{"v1beta1"},
+ AdmissionReviewVersions: []string{"v1"},
Name: "default.machine.machine.openshift.io",
FailurePolicy: &webhookFailurePolicy,
SideEffects: &webhookSideEffects,
@@ -411,7 +457,7 @@ func MachineSetMutatingWebhook() admissionregistrationv1.MutatingWebhook {
Port: pointer.Int32Ptr(defaultWebhookServicePort),
}
return admissionregistrationv1.MutatingWebhook{
- AdmissionReviewVersions: []string{"v1beta1"},
+ AdmissionReviewVersions: []string{"v1"},
Name: "default.machineset.machine.openshift.io",
FailurePolicy: &webhookFailurePolicy,
SideEffects: &webhookSideEffects,
@@ -433,11 +479,6 @@ func MachineSetMutatingWebhook() admissionregistrationv1.MutatingWebhook {
}
}
-func responseWithWarnings(response admission.Response, warnings []string) admission.Response {
- response.AdmissionResponse.Warnings = warnings
- return response
-}
-
// Handle handles HTTP requests for admission webhook servers.
func (h *machineValidatorHandler) Handle(ctx context.Context, req admission.Request) admission.Response {
m := &Machine{}
@@ -450,10 +491,10 @@ func (h *machineValidatorHandler) Handle(ctx context.Context, req admission.Requ
ok, warnings, errs := h.webhookOperations(m, h.admissionConfig)
if !ok {
- return responseWithWarnings(admission.Denied(errs.Error()), warnings)
+ return admission.Denied(errs.Error()).WithWarnings(warnings...)
}
- return responseWithWarnings(admission.Allowed("Machine valid"), warnings)
+ return admission.Allowed("Machine valid").WithWarnings(warnings...)
}
// Handle handles HTTP requests for admission webhook servers.
@@ -479,14 +520,14 @@ func (h *machineDefaulterHandler) Handle(ctx context.Context, req admission.Requ
ok, warnings, errs := h.webhookOperations(m, h.admissionConfig)
if !ok {
- return responseWithWarnings(admission.Denied(errs.Error()), warnings)
+ return admission.Denied(errs.Error()).WithWarnings(warnings...)
}
marshaledMachine, err := json.Marshal(m)
if err != nil {
- return responseWithWarnings(admission.Errored(http.StatusInternalServerError, err), warnings)
+ return admission.Errored(http.StatusInternalServerError, err).WithWarnings(warnings...)
}
- return responseWithWarnings(admission.PatchResponseFromRaw(req.Object.Raw, marshaledMachine), warnings)
+ return admission.PatchResponseFromRaw(req.Object.Raw, marshaledMachine).WithWarnings(warnings...)
}
type awsDefaulter struct {
@@ -603,6 +644,8 @@ func validateAWS(m *Machine, config *admissionConfig) (bool, []string, utilerror
"expected providerSpec.credentialsSecret to be populated",
),
)
+ } else {
+ warnings = append(warnings, credentialsSecretExists(config.client, providerSpec.CredentialsSecret.Name, m.GetNamespace())...)
}
if providerSpec.Subnet.ARN == nil && providerSpec.Subnet.ID == nil && providerSpec.Subnet.Filters == nil {
@@ -611,10 +654,15 @@ func validateAWS(m *Machine, config *admissionConfig) (bool, []string, utilerror
"providerSpec.subnet: No subnet has been provided. Instances may be created in an unexpected subnet and may not join the cluster.",
)
}
+
+ if providerSpec.IAMInstanceProfile == nil {
+ warnings = append(warnings, "providerSpec.iamInstanceProfile: no IAM instance profile provided: nodes may be unable to join the cluster")
+ }
+
// TODO(alberto): Validate providerSpec.BlockDevices.
// https://github.com/openshift/cluster-api-provider-aws/pull/299#discussion_r433920532
- switch providerSpec.Tenancy {
+ switch providerSpec.Placement.Tenancy {
case "", aws.DefaultTenancy, aws.DedicatedTenancy, aws.HostTenancy:
// Do nothing, valid values
default:
@@ -622,7 +670,7 @@ func validateAWS(m *Machine, config *admissionConfig) (bool, []string, utilerror
errs,
field.Invalid(
field.NewPath("providerSpec", "tenancy"),
- providerSpec.Tenancy,
+ providerSpec.Placement.Tenancy,
fmt.Sprintf("Invalid providerSpec.tenancy, the only allowed options are: %s, %s, %s", aws.DefaultTenancy, aws.DedicatedTenancy, aws.HostTenancy),
),
)
@@ -735,12 +783,19 @@ func validateAzure(m *Machine, config *admissionConfig) (bool, []string, utilerr
if providerSpec.CredentialsSecret.Name == "" {
errs = append(errs, field.Required(field.NewPath("providerSpec", "credentialsSecret", "name"), "name must be provided"))
}
+ if providerSpec.CredentialsSecret.Name != "" && providerSpec.CredentialsSecret.Namespace != "" {
+ warnings = append(warnings, credentialsSecretExists(config.client, providerSpec.CredentialsSecret.Name, providerSpec.CredentialsSecret.Namespace)...)
+ }
}
if providerSpec.OSDisk.DiskSizeGB <= 0 || providerSpec.OSDisk.DiskSizeGB >= azureMaxDiskSizeGB {
errs = append(errs, field.Invalid(field.NewPath("providerSpec", "osDisk", "diskSizeGB"), providerSpec.OSDisk.DiskSizeGB, "diskSizeGB must be greater than zero and less than 32768"))
}
+ if isAzureGovCloud(config.platformStatus) && providerSpec.SpotVMOptions != nil {
+ warnings = append(warnings, "spot VMs may not be supported when using GovCloud region")
+ }
+
if len(errs) > 0 {
return false, warnings, utilerrors.NewAggregate(errs)
}
@@ -897,6 +952,8 @@ func validateGCP(m *Machine, config *admissionConfig) (bool, []string, utilerror
} else {
if providerSpec.CredentialsSecret.Name == "" {
errs = append(errs, field.Required(field.NewPath("providerSpec", "credentialsSecret", "name"), "name must be provided"))
+ } else {
+ warnings = append(warnings, credentialsSecretExists(config.client, providerSpec.CredentialsSecret.Name, m.GetNamespace())...)
}
}
@@ -1029,13 +1086,13 @@ func validateVSphere(m *Machine, config *admissionConfig) (bool, []string, utile
errs = append(errs, validateVSphereNetwork(providerSpec.Network, field.NewPath("providerSpec", "network"))...)
if providerSpec.NumCPUs < minVSphereCPU {
- warnings = append(warnings, fmt.Sprintf("providerSpec.numCPUs: %d is less than the minimum value (%d): the minimum value will be used instead", providerSpec.NumCPUs, minVSphereCPU))
+ warnings = append(warnings, fmt.Sprintf("providerSpec.numCPUs: %d is missing or less than the minimum value (%d): nodes may not boot correctly", providerSpec.NumCPUs, minVSphereCPU))
}
if providerSpec.MemoryMiB < minVSphereMemoryMiB {
- warnings = append(warnings, fmt.Sprintf("providerSpec.memoryMiB: %d is less than the recommended minimum value (%d): nodes may not boot correctly", providerSpec.MemoryMiB, minVSphereMemoryMiB))
+ warnings = append(warnings, fmt.Sprintf("providerSpec.memoryMiB: %d is missing or less than the recommended minimum value (%d): nodes may not boot correctly", providerSpec.MemoryMiB, minVSphereMemoryMiB))
}
if providerSpec.DiskGiB < minVSphereDiskGiB {
- warnings = append(warnings, fmt.Sprintf("providerSpec.diskGiB: %d is less than the recommended minimum (%d): nodes may fail to start if disk size is too low", providerSpec.DiskGiB, minVSphereDiskGiB))
+ warnings = append(warnings, fmt.Sprintf("providerSpec.diskGiB: %d is missing or less than the recommended minimum (%d): nodes may fail to start if disk size is too low", providerSpec.DiskGiB, minVSphereDiskGiB))
}
if providerSpec.UserDataSecret == nil {
@@ -1051,6 +1108,8 @@ func validateVSphere(m *Machine, config *admissionConfig) (bool, []string, utile
} else {
if providerSpec.CredentialsSecret.Name == "" {
errs = append(errs, field.Required(field.NewPath("providerSpec", "credentialsSecret", "name"), "name must be provided"))
+ } else {
+ warnings = append(warnings, credentialsSecretExists(config.client, providerSpec.CredentialsSecret.Name, m.GetNamespace())...)
}
}
@@ -1099,3 +1158,8 @@ func validateVSphereNetwork(network vsphere.NetworkSpec, parentPath *field.Path)
return errs
}
+
+func isAzureGovCloud(platformStatus *osconfigv1.PlatformStatus) bool {
+ return platformStatus != nil && platformStatus.Azure != nil &&
+ platformStatus.Azure.CloudName != osconfigv1.AzurePublicCloud
+}
diff --git a/vendor/github.com/openshift/machine-api-operator/pkg/apis/machine/v1beta1/machinehealthcheck_types.go b/vendor/github.com/openshift/machine-api-operator/pkg/apis/machine/v1beta1/machinehealthcheck_types.go
index f06c85a78c3..28bfe29c35f 100644
--- a/vendor/github.com/openshift/machine-api-operator/pkg/apis/machine/v1beta1/machinehealthcheck_types.go
+++ b/vendor/github.com/openshift/machine-api-operator/pkg/apis/machine/v1beta1/machinehealthcheck_types.go
@@ -30,6 +30,14 @@ type MachineHealthCheck struct {
Status MachineHealthCheckStatus `json:"status,omitempty"`
}
+func (m *MachineHealthCheck) GetConditions() Conditions {
+ return m.Status.Conditions
+}
+
+func (m *MachineHealthCheck) SetConditions(conditions Conditions) {
+ m.Status.Conditions = conditions
+}
+
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// MachineHealthCheckList contains a list of MachineHealthCheck
@@ -72,6 +80,15 @@ type MachineHealthCheckSpec struct {
// +kubebuilder:validation:Pattern="^([0-9]+(\\.[0-9]+)?(ns|us|µs|ms|s|m|h))+$"
// +kubebuilder:validation:Type:=string
NodeStartupTimeout metav1.Duration `json:"nodeStartupTimeout,omitempty"`
+
+ // RemediationTemplate is a reference to a remediation template
+ // provided by an infrastructure provider.
+ //
+ // This field is completely optional, when filled, the MachineHealthCheck controller
+ // creates a new object from the template referenced and hands off remediation of the machine to
+ // a controller that lives outside of Machine API Operator.
+ // +optional
+ RemediationTemplate *corev1.ObjectReference `json:"remediationTemplate,omitempty"`
}
// UnhealthyCondition represents a Node condition type and value with a timeout
@@ -103,4 +120,13 @@ type MachineHealthCheckStatus struct {
// total number of machines counted by this machine health check
// +kubebuilder:validation:Minimum=0
CurrentHealthy *int `json:"currentHealthy" protobuf:"varint,4,opt,name=currentHealthy"`
+
+ // RemediationsAllowed is the number of further remediations allowed by this machine health check before
+ // maxUnhealthy short circuiting will be applied
+ // +kubebuilder:validation:Minimum=0
+ // +optional
+ RemediationsAllowed int32 `json:"remediationsAllowed"`
+
+ // Conditions defines the current state of the MachineHealthCheck
+ Conditions Conditions `json:"conditions,omitempty"`
}
diff --git a/vendor/github.com/openshift/machine-api-operator/pkg/apis/machine/v1beta1/machineset_types.go b/vendor/github.com/openshift/machine-api-operator/pkg/apis/machine/v1beta1/machineset_types.go
index f2c3c7e184a..2dd562b4eb7 100644
--- a/vendor/github.com/openshift/machine-api-operator/pkg/apis/machine/v1beta1/machineset_types.go
+++ b/vendor/github.com/openshift/machine-api-operator/pkg/apis/machine/v1beta1/machineset_types.go
@@ -29,7 +29,6 @@ import (
// +genclient
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-/// [MachineSet]
// MachineSet ensures that a specified number of machines replicas are running at any given time.
// +k8s:openapi-gen=true
// +kubebuilder:subresource:status
@@ -47,9 +46,6 @@ type MachineSet struct {
Status MachineSetStatus `json:"status,omitempty"`
}
-/// [MachineSet]
-
-/// [MachineSetSpec]
// MachineSetSpec defines the desired state of MachineSet
type MachineSetSpec struct {
// Replicas is the number of desired replicas.
@@ -104,9 +100,6 @@ const (
OldestMachineSetDeletePolicy MachineSetDeletePolicy = "Oldest"
)
-/// [MachineSetSpec] // doxygen marker
-
-/// [MachineTemplateSpec] // doxygen marker
// MachineTemplateSpec describes the data needed to create a Machine from a template
type MachineTemplateSpec struct {
// Standard object's metadata.
@@ -120,9 +113,6 @@ type MachineTemplateSpec struct {
Spec MachineSpec `json:"spec,omitempty"`
}
-/// [MachineTemplateSpec]
-
-/// [MachineSetStatus]
// MachineSetStatus defines the observed state of MachineSet
type MachineSetStatus struct {
// Replicas is the most recently observed number of replicas.
@@ -168,8 +158,6 @@ type MachineSetStatus struct {
ErrorMessage *string `json:"errorMessage,omitempty"`
}
-/// [MachineSetStatus]
-
func (m *MachineSet) Validate() field.ErrorList {
errors := field.ErrorList{}
diff --git a/vendor/github.com/openshift/machine-api-operator/pkg/apis/machine/v1beta1/machineset_webhook.go b/vendor/github.com/openshift/machine-api-operator/pkg/apis/machine/v1beta1/machineset_webhook.go
index fba62af71a2..7d71ed54133 100644
--- a/vendor/github.com/openshift/machine-api-operator/pkg/apis/machine/v1beta1/machineset_webhook.go
+++ b/vendor/github.com/openshift/machine-api-operator/pkg/apis/machine/v1beta1/machineset_webhook.go
@@ -6,8 +6,10 @@ import (
"net/http"
osconfigv1 "github.com/openshift/api/config/v1"
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
utilerrors "k8s.io/apimachinery/pkg/util/errors"
"k8s.io/klog/v2"
+ "sigs.k8s.io/controller-runtime/pkg/client"
"sigs.k8s.io/controller-runtime/pkg/webhook/admission"
)
@@ -26,20 +28,30 @@ type machineSetDefaulterHandler struct {
}
// NewMachineSetValidator returns a new machineSetValidatorHandler.
-func NewMachineSetValidator() (*machineSetValidatorHandler, error) {
+func NewMachineSetValidator(client client.Client) (*machineSetValidatorHandler, error) {
infra, err := getInfra()
if err != nil {
return nil, err
}
- return createMachineSetValidator(infra.Status.PlatformStatus.Type, infra.Status.InfrastructureName), nil
+ dns, err := getDNS()
+ if err != nil {
+ return nil, err
+ }
+
+ return createMachineSetValidator(infra, client, dns), nil
}
-func createMachineSetValidator(platform osconfigv1.PlatformType, clusterID string) *machineSetValidatorHandler {
+func createMachineSetValidator(infra *osconfigv1.Infrastructure, client client.Client, dns *osconfigv1.DNS) *machineSetValidatorHandler {
+ admissionConfig := &admissionConfig{
+ dnsDisconnected: dns.Spec.PublicZone == nil,
+ clusterID: infra.Status.InfrastructureName,
+ client: client,
+ }
return &machineSetValidatorHandler{
admissionHandler: &admissionHandler{
- admissionConfig: &admissionConfig{clusterID: clusterID},
- webhookOperations: getMachineValidatorOperation(platform),
+ admissionConfig: admissionConfig,
+ webhookOperations: getMachineValidatorOperation(infra.Status.PlatformStatus.Type),
},
}
}
@@ -75,10 +87,10 @@ func (h *machineSetValidatorHandler) Handle(ctx context.Context, req admission.R
ok, warnings, errs := h.validateMachineSet(ms)
if !ok {
- return responseWithWarnings(admission.Denied(errs.Error()), warnings)
+ return admission.Denied(errs.Error()).WithWarnings(warnings...)
}
- return responseWithWarnings(admission.Allowed("MachineSet valid"), warnings)
+ return admission.Allowed("MachineSet valid").WithWarnings(warnings...)
}
// Handle handles HTTP requests for admission webhook servers.
@@ -93,21 +105,26 @@ func (h *machineSetDefaulterHandler) Handle(ctx context.Context, req admission.R
ok, warnings, errs := h.defaultMachineSet(ms)
if !ok {
- return responseWithWarnings(admission.Denied(errs.Error()), warnings)
+ return admission.Denied(errs.Error()).WithWarnings(warnings...)
}
marshaledMachineSet, err := json.Marshal(ms)
if err != nil {
- return responseWithWarnings(admission.Errored(http.StatusInternalServerError, err), warnings)
+ return admission.Errored(http.StatusInternalServerError, err).WithWarnings(warnings...)
}
- return responseWithWarnings(admission.PatchResponseFromRaw(req.Object.Raw, marshaledMachineSet), warnings)
+ return admission.PatchResponseFromRaw(req.Object.Raw, marshaledMachineSet).WithWarnings(warnings...)
}
func (h *machineSetValidatorHandler) validateMachineSet(ms *MachineSet) (bool, []string, utilerrors.Aggregate) {
var errs []error
// Create a Machine from the MachineSet and validate the Machine template
- m := &Machine{Spec: ms.Spec.Template.Spec}
+ m := &Machine{
+ ObjectMeta: metav1.ObjectMeta{
+ Namespace: ms.GetNamespace(),
+ },
+ Spec: ms.Spec.Template.Spec,
+ }
ok, warnings, err := h.webhookOperations(m, h.admissionConfig)
if !ok {
errs = append(errs, err.Errors()...)
diff --git a/vendor/github.com/openshift/machine-api-operator/pkg/apis/machine/v1beta1/zz_generated.deepcopy.go b/vendor/github.com/openshift/machine-api-operator/pkg/apis/machine/v1beta1/zz_generated.deepcopy.go
index 7a79e549b3e..7b85b787509 100644
--- a/vendor/github.com/openshift/machine-api-operator/pkg/apis/machine/v1beta1/zz_generated.deepcopy.go
+++ b/vendor/github.com/openshift/machine-api-operator/pkg/apis/machine/v1beta1/zz_generated.deepcopy.go
@@ -28,6 +28,43 @@ import (
"k8s.io/apimachinery/pkg/util/intstr"
)
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *Condition) DeepCopyInto(out *Condition) {
+ *out = *in
+ in.LastTransitionTime.DeepCopyInto(&out.LastTransitionTime)
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Condition.
+func (in *Condition) DeepCopy() *Condition {
+ if in == nil {
+ return nil
+ }
+ out := new(Condition)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in Conditions) DeepCopyInto(out *Conditions) {
+ {
+ in := &in
+ *out = make(Conditions, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Conditions.
+func (in Conditions) DeepCopy() Conditions {
+ if in == nil {
+ return nil
+ }
+ out := new(Conditions)
+ in.DeepCopyInto(out)
+ return *out
+}
+
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *LastOperation) DeepCopyInto(out *LastOperation) {
*out = *in
@@ -163,6 +200,11 @@ func (in *MachineHealthCheckSpec) DeepCopyInto(out *MachineHealthCheckSpec) {
**out = **in
}
out.NodeStartupTimeout = in.NodeStartupTimeout
+ if in.RemediationTemplate != nil {
+ in, out := &in.RemediationTemplate, &out.RemediationTemplate
+ *out = new(corev1.ObjectReference)
+ **out = **in
+ }
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineHealthCheckSpec.
@@ -188,6 +230,13 @@ func (in *MachineHealthCheckStatus) DeepCopyInto(out *MachineHealthCheckStatus)
*out = new(int)
**out = **in
}
+ if in.Conditions != nil {
+ in, out := &in.Conditions, &out.Conditions
+ *out = make(Conditions, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineHealthCheckStatus.
@@ -409,6 +458,13 @@ func (in *MachineStatus) DeepCopyInto(out *MachineStatus) {
*out = new(string)
**out = **in
}
+ if in.Conditions != nil {
+ in, out := &in.Conditions, &out.Conditions
+ *out = make(Conditions, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineStatus.
diff --git a/vendor/github.com/ovirt/go-ovirt/CHANGES.adoc b/vendor/github.com/ovirt/go-ovirt/CHANGES.adoc
index 469fcdd9ea2..57f93c68a60 100644
--- a/vendor/github.com/ovirt/go-ovirt/CHANGES.adoc
+++ b/vendor/github.com/ovirt/go-ovirt/CHANGES.adoc
@@ -2,6 +2,14 @@
This document describes the relevant changes between releases of the SDK.
+== 4.4.4 / Mar 04 2021
+
+Update to model 4.4.25
+
+Bug Fixes:
+
+* None
+
== 4.4.3 / Jan 11 2021
Update to model 4.4.22 and metamodel 1.3.4
diff --git a/vendor/github.com/ovirt/go-ovirt/readers.go b/vendor/github.com/ovirt/go-ovirt/readers.go
index be699a5550f..ff521e4fcf4 100644
--- a/vendor/github.com/ovirt/go-ovirt/readers.go
+++ b/vendor/github.com/ovirt/go-ovirt/readers.go
@@ -3574,6 +3574,13 @@ func XMLClusterReadOne(reader *XMLReader, start *xml.StartElement, expectedTag s
return nil, err
}
builder.FencingPolicy(v)
+ case "fips_mode":
+ vp, err := XMLFipsModeReadOne(reader, &t)
+ v := *vp
+ if err != nil {
+ return nil, err
+ }
+ builder.FipsMode(v)
case "firewall_type":
vp, err := XMLFirewallTypeReadOne(reader, &t)
v := *vp
@@ -15220,6 +15227,13 @@ func XMLImageTransferReadOne(reader *XMLReader, start *xml.StartElement, expecte
return nil, err
}
builder.Snapshot(v)
+ case "timeout_policy":
+ vp, err := XMLImageTransferTimeoutPolicyReadOne(reader, &t)
+ v := *vp
+ if err != nil {
+ return nil, err
+ }
+ builder.TimeoutPolicy(v)
case "transfer_url":
v, err := reader.ReadString(&t)
if err != nil {
@@ -15917,6 +15931,12 @@ func XMLInstanceTypeReadOne(reader *XMLReader, start *xml.StartElement, expected
return nil, err
}
builder.VirtioScsi(v)
+ case "virtio_scsi_multi_queues_enabled":
+ v, err := reader.ReadBool(&t)
+ if err != nil {
+ return nil, err
+ }
+ builder.VirtioScsiMultiQueuesEnabled(v)
case "vm":
v, err := XMLVmReadOne(reader, &t, "vm")
if err != nil {
@@ -27439,8 +27459,8 @@ func XMLSchedulingPolicyReadMany(reader *XMLReader, start *xml.StartElement) (*S
return &result, nil
}
-func XMLSeLinuxReadOne(reader *XMLReader, start *xml.StartElement, expectedTag string) (*SeLinux, error) {
- builder := NewSeLinuxBuilder()
+func XMLSchedulingPolicyUnitReadOne(reader *XMLReader, start *xml.StartElement, expectedTag string) (*SchedulingPolicyUnit, error) {
+ builder := NewSchedulingPolicyUnitBuilder()
if start == nil {
st, err := reader.FindStartElement()
if err != nil {
@@ -27452,11 +27472,22 @@ func XMLSeLinuxReadOne(reader *XMLReader, start *xml.StartElement, expectedTag s
start = st
}
if expectedTag == "" {
- expectedTag = "se_linux"
+ expectedTag = "scheduling_policy_unit"
}
if start.Name.Local != expectedTag {
return nil, XMLTagNotMatchError{start.Name.Local, expectedTag}
}
+ // Process the attributes
+ for _, attr := range start.Attr {
+ name := attr.Name.Local
+ value := attr.Value
+ switch name {
+ case "id":
+ builder.Id(value)
+ case "href":
+ builder.Href(value)
+ }
+ }
var links []Link
depth := 1
for depth > 0 {
@@ -27471,13 +27502,49 @@ func XMLSeLinuxReadOne(reader *XMLReader, start *xml.StartElement, expectedTag s
switch t := t.(type) {
case xml.StartElement:
switch t.Name.Local {
- case "mode":
- vp, err := XMLSeLinuxModeReadOne(reader, &t)
+ case "comment":
+ v, err := reader.ReadString(&t)
+ if err != nil {
+ return nil, err
+ }
+ builder.Comment(v)
+ case "description":
+ v, err := reader.ReadString(&t)
+ if err != nil {
+ return nil, err
+ }
+ builder.Description(v)
+ case "enabled":
+ v, err := reader.ReadBool(&t)
+ if err != nil {
+ return nil, err
+ }
+ builder.Enabled(v)
+ case "internal":
+ v, err := reader.ReadBool(&t)
+ if err != nil {
+ return nil, err
+ }
+ builder.Internal(v)
+ case "name":
+ v, err := reader.ReadString(&t)
+ if err != nil {
+ return nil, err
+ }
+ builder.Name(v)
+ case "properties":
+ v, err := XMLPropertyReadMany(reader, &t)
+ if err != nil {
+ return nil, err
+ }
+ builder.Properties(v)
+ case "type":
+ vp, err := XMLPolicyUnitTypeReadOne(reader, &t)
v := *vp
if err != nil {
return nil, err
}
- builder.Mode(v)
+ builder.Type(v)
case "link":
var rel, href string
for _, attr := range t.Attr {
@@ -27513,7 +27580,7 @@ func XMLSeLinuxReadOne(reader *XMLReader, start *xml.StartElement, expectedTag s
return one, nil
}
-func XMLSeLinuxReadMany(reader *XMLReader, start *xml.StartElement) (*SeLinuxSlice, error) {
+func XMLSchedulingPolicyUnitReadMany(reader *XMLReader, start *xml.StartElement) (*SchedulingPolicyUnitSlice, error) {
if start == nil {
st, err := reader.FindStartElement()
if err != nil {
@@ -27524,7 +27591,7 @@ func XMLSeLinuxReadMany(reader *XMLReader, start *xml.StartElement) (*SeLinuxSli
}
start = st
}
- var result SeLinuxSlice
+ var result SchedulingPolicyUnitSlice
depth := 1
for depth > 0 {
t, err := reader.Next()
@@ -27538,8 +27605,8 @@ func XMLSeLinuxReadMany(reader *XMLReader, start *xml.StartElement) (*SeLinuxSli
switch t := t.(type) {
case xml.StartElement:
switch t.Name.Local {
- case "se_linux":
- one, err := XMLSeLinuxReadOne(reader, &t, "se_linux")
+ case "scheduling_policy_unit":
+ one, err := XMLSchedulingPolicyUnitReadOne(reader, &t, "scheduling_policy_unit")
if err != nil {
return nil, err
}
@@ -27556,8 +27623,8 @@ func XMLSeLinuxReadMany(reader *XMLReader, start *xml.StartElement) (*SeLinuxSli
return &result, nil
}
-func XMLSchedulingPolicyUnitReadOne(reader *XMLReader, start *xml.StartElement, expectedTag string) (*SchedulingPolicyUnit, error) {
- builder := NewSchedulingPolicyUnitBuilder()
+func XMLSeLinuxReadOne(reader *XMLReader, start *xml.StartElement, expectedTag string) (*SeLinux, error) {
+ builder := NewSeLinuxBuilder()
if start == nil {
st, err := reader.FindStartElement()
if err != nil {
@@ -27569,22 +27636,11 @@ func XMLSchedulingPolicyUnitReadOne(reader *XMLReader, start *xml.StartElement,
start = st
}
if expectedTag == "" {
- expectedTag = "scheduling_policy_unit"
+ expectedTag = "se_linux"
}
if start.Name.Local != expectedTag {
return nil, XMLTagNotMatchError{start.Name.Local, expectedTag}
}
- // Process the attributes
- for _, attr := range start.Attr {
- name := attr.Name.Local
- value := attr.Value
- switch name {
- case "id":
- builder.Id(value)
- case "href":
- builder.Href(value)
- }
- }
var links []Link
depth := 1
for depth > 0 {
@@ -27599,49 +27655,13 @@ func XMLSchedulingPolicyUnitReadOne(reader *XMLReader, start *xml.StartElement,
switch t := t.(type) {
case xml.StartElement:
switch t.Name.Local {
- case "comment":
- v, err := reader.ReadString(&t)
- if err != nil {
- return nil, err
- }
- builder.Comment(v)
- case "description":
- v, err := reader.ReadString(&t)
- if err != nil {
- return nil, err
- }
- builder.Description(v)
- case "enabled":
- v, err := reader.ReadBool(&t)
- if err != nil {
- return nil, err
- }
- builder.Enabled(v)
- case "internal":
- v, err := reader.ReadBool(&t)
- if err != nil {
- return nil, err
- }
- builder.Internal(v)
- case "name":
- v, err := reader.ReadString(&t)
- if err != nil {
- return nil, err
- }
- builder.Name(v)
- case "properties":
- v, err := XMLPropertyReadMany(reader, &t)
- if err != nil {
- return nil, err
- }
- builder.Properties(v)
- case "type":
- vp, err := XMLPolicyUnitTypeReadOne(reader, &t)
+ case "mode":
+ vp, err := XMLSeLinuxModeReadOne(reader, &t)
v := *vp
if err != nil {
return nil, err
}
- builder.Type(v)
+ builder.Mode(v)
case "link":
var rel, href string
for _, attr := range t.Attr {
@@ -27677,7 +27697,7 @@ func XMLSchedulingPolicyUnitReadOne(reader *XMLReader, start *xml.StartElement,
return one, nil
}
-func XMLSchedulingPolicyUnitReadMany(reader *XMLReader, start *xml.StartElement) (*SchedulingPolicyUnitSlice, error) {
+func XMLSeLinuxReadMany(reader *XMLReader, start *xml.StartElement) (*SeLinuxSlice, error) {
if start == nil {
st, err := reader.FindStartElement()
if err != nil {
@@ -27688,7 +27708,7 @@ func XMLSchedulingPolicyUnitReadMany(reader *XMLReader, start *xml.StartElement)
}
start = st
}
- var result SchedulingPolicyUnitSlice
+ var result SeLinuxSlice
depth := 1
for depth > 0 {
t, err := reader.Next()
@@ -27702,8 +27722,8 @@ func XMLSchedulingPolicyUnitReadMany(reader *XMLReader, start *xml.StartElement)
switch t := t.(type) {
case xml.StartElement:
switch t.Name.Local {
- case "scheduling_policy_unit":
- one, err := XMLSchedulingPolicyUnitReadOne(reader, &t, "scheduling_policy_unit")
+ case "se_linux":
+ one, err := XMLSeLinuxReadOne(reader, &t, "se_linux")
if err != nil {
return nil, err
}
@@ -28809,6 +28829,12 @@ func XMLSnapshotReadOne(reader *XMLReader, start *xml.StartElement, expectedTag
return nil, err
}
builder.VirtioScsi(v)
+ case "virtio_scsi_multi_queues_enabled":
+ v, err := reader.ReadBool(&t)
+ if err != nil {
+ return nil, err
+ }
+ builder.VirtioScsiMultiQueuesEnabled(v)
case "vm":
v, err := XMLVmReadOne(reader, &t, "vm")
if err != nil {
@@ -29320,6 +29346,12 @@ func XMLSshReadOne(reader *XMLReader, start *xml.StartElement, expectedTag strin
return nil, err
}
builder.Port(v)
+ case "public_key":
+ v, err := reader.ReadString(&t)
+ if err != nil {
+ return nil, err
+ }
+ builder.PublicKey(v)
case "user":
v, err := XMLUserReadOne(reader, &t, "user")
if err != nil {
@@ -31799,6 +31831,12 @@ func XMLTemplateReadOne(reader *XMLReader, start *xml.StartElement, expectedTag
return nil, err
}
builder.VirtioScsi(v)
+ case "virtio_scsi_multi_queues_enabled":
+ v, err := reader.ReadBool(&t)
+ if err != nil {
+ return nil, err
+ }
+ builder.VirtioScsiMultiQueuesEnabled(v)
case "vm":
v, err := XMLVmReadOne(reader, &t, "vm")
if err != nil {
@@ -32795,6 +32833,12 @@ func XMLUserReadOne(reader *XMLReader, start *xml.StartElement, expectedTag stri
return nil, err
}
builder.Namespace(v)
+ case "options":
+ v, err := XMLUserOptionReadMany(reader, &t)
+ if err != nil {
+ return nil, err
+ }
+ builder.Options(v)
case "password":
v, err := reader.ReadString(&t)
if err != nil {
@@ -32878,6 +32922,11 @@ func XMLUserReadOne(reader *XMLReader, start *xml.StartElement, expectedTag stri
one.groups = new(GroupSlice)
}
one.groups.href = link.href
+ case "options":
+ if one.options == nil {
+ one.options = new(UserOptionSlice)
+ }
+ one.options.href = link.href
case "permissions":
if one.permissions == nil {
one.permissions = new(PermissionSlice)
@@ -32946,6 +32995,157 @@ func XMLUserReadMany(reader *XMLReader, start *xml.StartElement) (*UserSlice, er
return &result, nil
}
+func XMLUserOptionReadOne(reader *XMLReader, start *xml.StartElement, expectedTag string) (*UserOption, error) {
+ builder := NewUserOptionBuilder()
+ if start == nil {
+ st, err := reader.FindStartElement()
+ if err != nil {
+ if err == io.EOF {
+ return nil, nil
+ }
+ return nil, err
+ }
+ start = st
+ }
+ if expectedTag == "" {
+ expectedTag = "user_option"
+ }
+ if start.Name.Local != expectedTag {
+ return nil, XMLTagNotMatchError{start.Name.Local, expectedTag}
+ }
+ // Process the attributes
+ for _, attr := range start.Attr {
+ name := attr.Name.Local
+ value := attr.Value
+ switch name {
+ case "id":
+ builder.Id(value)
+ case "href":
+ builder.Href(value)
+ }
+ }
+ var links []Link
+ depth := 1
+ for depth > 0 {
+ t, err := reader.Next()
+ if err != nil {
+ if err == io.EOF {
+ break
+ }
+ return nil, err
+ }
+ t = xml.CopyToken(t)
+ switch t := t.(type) {
+ case xml.StartElement:
+ switch t.Name.Local {
+ case "comment":
+ v, err := reader.ReadString(&t)
+ if err != nil {
+ return nil, err
+ }
+ builder.Comment(v)
+ case "content":
+ v, err := reader.ReadString(&t)
+ if err != nil {
+ return nil, err
+ }
+ builder.Content(v)
+ case "description":
+ v, err := reader.ReadString(&t)
+ if err != nil {
+ return nil, err
+ }
+ builder.Description(v)
+ case "name":
+ v, err := reader.ReadString(&t)
+ if err != nil {
+ return nil, err
+ }
+ builder.Name(v)
+ case "user":
+ v, err := XMLUserReadOne(reader, &t, "user")
+ if err != nil {
+ return nil, err
+ }
+ builder.User(v)
+ case "link":
+ var rel, href string
+ for _, attr := range t.Attr {
+ name := attr.Name.Local
+ value := attr.Value
+ switch name {
+ case "href":
+ href = value
+ case "rel":
+ rel = value
+ }
+ }
+ if rel != "" && href != "" {
+ links = append(links, Link{&href, &rel})
+ }
+ // just has attributes, so must skip manually
+ reader.Skip()
+ default:
+ reader.Skip()
+ }
+ case xml.EndElement:
+ depth--
+ }
+ }
+ one, err := builder.Build()
+ if err != nil {
+ return nil, err
+ }
+ for _, link := range links {
+ switch *link.rel {
+ } // end of switch
+ } // end of for-links
+ return one, nil
+}
+
+func XMLUserOptionReadMany(reader *XMLReader, start *xml.StartElement) (*UserOptionSlice, error) {
+ if start == nil {
+ st, err := reader.FindStartElement()
+ if err != nil {
+ if err == io.EOF {
+ return nil, nil
+ }
+ return nil, err
+ }
+ start = st
+ }
+ var result UserOptionSlice
+ depth := 1
+ for depth > 0 {
+ t, err := reader.Next()
+ if err != nil {
+ if err == io.EOF {
+ break
+ }
+ return nil, err
+ }
+ t = xml.CopyToken(t)
+ switch t := t.(type) {
+ case xml.StartElement:
+ switch t.Name.Local {
+ case "user_option":
+ one, err := XMLUserOptionReadOne(reader, &t, "user_option")
+ if err != nil {
+ return nil, err
+ }
+ if one != nil {
+ result.slice = append(result.slice, one)
+ }
+ default:
+ reader.Skip()
+ }
+ case xml.EndElement:
+ depth--
+ }
+ }
+ return &result, nil
+}
+
func XMLValueReadOne(reader *XMLReader, start *xml.StartElement, expectedTag string) (*Value, error) {
builder := NewValueBuilder()
if start == nil {
@@ -34429,6 +34629,12 @@ func XMLVmReadOne(reader *XMLReader, start *xml.StartElement, expectedTag string
return nil, err
}
builder.VirtioScsi(v)
+ case "virtio_scsi_multi_queues_enabled":
+ v, err := reader.ReadBool(&t)
+ if err != nil {
+ return nil, err
+ }
+ builder.VirtioScsiMultiQueuesEnabled(v)
case "vm_pool":
v, err := XMLVmPoolReadOne(reader, &t, "vm_pool")
if err != nil {
@@ -34919,6 +35125,12 @@ func XMLVmBaseReadOne(reader *XMLReader, start *xml.StartElement, expectedTag st
return nil, err
}
builder.VirtioScsi(v)
+ case "virtio_scsi_multi_queues_enabled":
+ v, err := reader.ReadBool(&t)
+ if err != nil {
+ return nil, err
+ }
+ builder.VirtioScsiMultiQueuesEnabled(v)
case "link":
var rel, href string
for _, attr := range t.Attr {
@@ -36991,6 +37203,12 @@ func XMLActionReadOne(reader *XMLReader, start *xml.StartElement, expectedTag st
return nil, err
}
builder.Name(v)
+ case "optimize_cpu_settings":
+ v, err := reader.ReadBool(&t)
+ if err != nil {
+ return nil, err
+ }
+ builder.OptimizeCpuSettings(v)
case "option":
v, err := XMLOptionReadOne(reader, &t, "option")
if err != nil {
@@ -39046,6 +39264,62 @@ func XMLFenceTypeReadMany(reader *XMLReader, start *xml.StartElement) ([]FenceTy
return results, nil
}
+func XMLFipsModeReadOne(reader *XMLReader, start *xml.StartElement) (*FipsMode, error) {
+ if start == nil {
+ st, err := reader.FindStartElement()
+ if err != nil {
+ if err == io.EOF {
+ return nil, nil
+ }
+ return nil, err
+ }
+ start = st
+ }
+ s, err := reader.ReadString(start)
+ if err != nil {
+ return nil, err
+ }
+ result := new(FipsMode)
+ *result = FipsMode(s)
+ return result, nil
+}
+
+func XMLFipsModeReadMany(reader *XMLReader, start *xml.StartElement) ([]FipsMode, error) {
+ if start == nil {
+ st, err := reader.FindStartElement()
+ if err != nil {
+ if err == io.EOF {
+ return nil, nil
+ }
+ return nil, err
+ }
+ start = st
+ }
+ var results []FipsMode
+ depth := 1
+ for depth > 0 {
+ t, err := reader.Next()
+ if err != nil {
+ if err == io.EOF {
+ break
+ }
+ return nil, err
+ }
+ t = xml.CopyToken(t)
+ switch t := t.(type) {
+ case xml.StartElement:
+ one, err := reader.ReadString(&t)
+ if err != nil {
+ return nil, err
+ }
+ results = append(results, FipsMode(one))
+ case xml.EndElement:
+ depth--
+ }
+ }
+ return results, nil
+}
+
func XMLFirewallTypeReadOne(reader *XMLReader, start *xml.StartElement) (*FirewallType, error) {
if start == nil {
st, err := reader.FindStartElement()
@@ -39774,6 +40048,62 @@ func XMLImageTransferPhaseReadMany(reader *XMLReader, start *xml.StartElement) (
return results, nil
}
+func XMLImageTransferTimeoutPolicyReadOne(reader *XMLReader, start *xml.StartElement) (*ImageTransferTimeoutPolicy, error) {
+ if start == nil {
+ st, err := reader.FindStartElement()
+ if err != nil {
+ if err == io.EOF {
+ return nil, nil
+ }
+ return nil, err
+ }
+ start = st
+ }
+ s, err := reader.ReadString(start)
+ if err != nil {
+ return nil, err
+ }
+ result := new(ImageTransferTimeoutPolicy)
+ *result = ImageTransferTimeoutPolicy(s)
+ return result, nil
+}
+
+func XMLImageTransferTimeoutPolicyReadMany(reader *XMLReader, start *xml.StartElement) ([]ImageTransferTimeoutPolicy, error) {
+ if start == nil {
+ st, err := reader.FindStartElement()
+ if err != nil {
+ if err == io.EOF {
+ return nil, nil
+ }
+ return nil, err
+ }
+ start = st
+ }
+ var results []ImageTransferTimeoutPolicy
+ depth := 1
+ for depth > 0 {
+ t, err := reader.Next()
+ if err != nil {
+ if err == io.EOF {
+ break
+ }
+ return nil, err
+ }
+ t = xml.CopyToken(t)
+ switch t := t.(type) {
+ case xml.StartElement:
+ one, err := reader.ReadString(&t)
+ if err != nil {
+ return nil, err
+ }
+ results = append(results, ImageTransferTimeoutPolicy(one))
+ case xml.EndElement:
+ depth--
+ }
+ }
+ return results, nil
+}
+
func XMLInheritableBooleanReadOne(reader *XMLReader, start *xml.StartElement) (*InheritableBoolean, error) {
if start == nil {
st, err := reader.FindStartElement()
diff --git a/vendor/github.com/ovirt/go-ovirt/services.go b/vendor/github.com/ovirt/go-ovirt/services.go
index 7b03235aea6..96782bfa8e8 100644
--- a/vendor/github.com/ovirt/go-ovirt/services.go
+++ b/vendor/github.com/ovirt/go-ovirt/services.go
@@ -34332,6 +34332,7 @@ type HostServiceApproveRequest struct {
async *bool
cluster *Cluster
host *Host
+ reboot *bool
}
func (p *HostServiceApproveRequest) Header(key, value string) *HostServiceApproveRequest {
@@ -34370,6 +34371,11 @@ func (p *HostServiceApproveRequest) Host(host *Host) *HostServiceApproveRequest
return p
}
+func (p *HostServiceApproveRequest) Reboot(reboot bool) *HostServiceApproveRequest {
+ p.reboot = &reboot
+ return p
+}
+
func (p *HostServiceApproveRequest) Send() (*HostServiceApproveResponse, error) {
rawURL := fmt.Sprintf("%s%s/approve", p.HostService.connection.URL(), p.HostService.path)
actionBuilder := NewActionBuilder()
@@ -34381,6 +34387,9 @@ func (p *HostServiceApproveRequest) Send() (*HostServiceApproveResponse, error)
}
actionBuilder.Cluster(p.cluster)
actionBuilder.Host(p.host)
+ if p.reboot != nil {
+ actionBuilder.Reboot(*p.reboot)
+ }
action, err := actionBuilder.Build()
if err != nil {
return nil, err
@@ -35697,6 +35706,7 @@ type HostServiceInstallRequest struct {
deployHostedEngine *bool
host *Host
image *string
+ reboot *bool
rootPassword *string
ssh *Ssh
undeployHostedEngine *bool
@@ -35743,6 +35753,11 @@ func (p *HostServiceInstallRequest) Image(image string) *HostServiceInstallReque
return p
}
+func (p *HostServiceInstallRequest) Reboot(reboot bool) *HostServiceInstallRequest {
+ p.reboot = &reboot
+ return p
+}
+
func (p *HostServiceInstallRequest) RootPassword(rootPassword string) *HostServiceInstallRequest {
p.rootPassword = &rootPassword
return p
@@ -35774,6 +35789,9 @@ func (p *HostServiceInstallRequest) Send() (*HostServiceInstallResponse, error)
if p.image != nil {
actionBuilder.Image(*p.image)
}
+ if p.reboot != nil {
+ actionBuilder.Reboot(*p.reboot)
+ }
if p.rootPassword != nil {
actionBuilder.RootPassword(*p.rootPassword)
}
@@ -36678,8 +36696,8 @@ func (p *HostService) Remove() *HostServiceRemoveRequest {
// bond0
//
//
-// static
//
+// static
//
// 192.168.122.10
// 255.255.255.0
@@ -37076,8 +37094,8 @@ func (p *HostServiceSetupNetworksRequest) MustSend() *HostServiceSetupNetworksRe
// bond0
//
//
-// static
//
+// static
//
// 192.168.122.10
// 255.255.255.0
@@ -37237,8 +37255,8 @@ type HostServiceSetupNetworksResponse struct {
// bond0
//
//
-// static
//
+// static
//
// 192.168.122.10
// 255.255.255.0
@@ -38124,6 +38142,7 @@ type HostServiceApproveUsingRootPasswordRequest struct {
async *bool
cluster *Cluster
host *Host
+ reboot *bool
}
func (p *HostServiceApproveUsingRootPasswordRequest) Header(key, value string) *HostServiceApproveUsingRootPasswordRequest {
@@ -38162,6 +38181,11 @@ func (p *HostServiceApproveUsingRootPasswordRequest) Host(host *Host) *HostServi
return p
}
+func (p *HostServiceApproveUsingRootPasswordRequest) Reboot(reboot bool) *HostServiceApproveUsingRootPasswordRequest {
+ p.reboot = &reboot
+ return p
+}
+
func (p *HostServiceApproveUsingRootPasswordRequest) Send() (*HostServiceApproveUsingRootPasswordResponse, error) {
rawURL := fmt.Sprintf("%s%s/usingrootpassword", p.HostService.connection.URL(), p.HostService.path)
actionBuilder := NewActionBuilder()
@@ -38173,6 +38197,9 @@ func (p *HostServiceApproveUsingRootPasswordRequest) Send() (*HostServiceApprove
}
actionBuilder.Cluster(p.cluster)
actionBuilder.Host(p.host)
+ if p.reboot != nil {
+ actionBuilder.Reboot(*p.reboot)
+ }
action, err := actionBuilder.Build()
if err != nil {
return nil, err
@@ -38271,6 +38298,7 @@ type HostServiceInstallUsingRootPasswordRequest struct {
deployHostedEngine *bool
host *Host
image *string
+ reboot *bool
rootPassword *string
ssh *Ssh
undeployHostedEngine *bool
@@ -38317,6 +38345,11 @@ func (p *HostServiceInstallUsingRootPasswordRequest) Image(image string) *HostSe
return p
}
+func (p *HostServiceInstallUsingRootPasswordRequest) Reboot(reboot bool) *HostServiceInstallUsingRootPasswordRequest {
+ p.reboot = &reboot
+ return p
+}
+
func (p *HostServiceInstallUsingRootPasswordRequest) RootPassword(rootPassword string) *HostServiceInstallUsingRootPasswordRequest {
p.rootPassword = &rootPassword
return p
@@ -38348,6 +38381,9 @@ func (p *HostServiceInstallUsingRootPasswordRequest) Send() (*HostServiceInstall
if p.image != nil {
actionBuilder.Image(*p.image)
}
+ if p.reboot != nil {
+ actionBuilder.Reboot(*p.reboot)
+ }
if p.rootPassword != nil {
actionBuilder.RootPassword(*p.rootPassword)
}
@@ -38603,6 +38639,7 @@ type HostServiceApproveUsingSshRequest struct {
async *bool
cluster *Cluster
host *Host
+ reboot *bool
}
func (p *HostServiceApproveUsingSshRequest) Header(key, value string) *HostServiceApproveUsingSshRequest {
@@ -38641,6 +38678,11 @@ func (p *HostServiceApproveUsingSshRequest) Host(host *Host) *HostServiceApprove
return p
}
+func (p *HostServiceApproveUsingSshRequest) Reboot(reboot bool) *HostServiceApproveUsingSshRequest {
+ p.reboot = &reboot
+ return p
+}
+
func (p *HostServiceApproveUsingSshRequest) Send() (*HostServiceApproveUsingSshResponse, error) {
rawURL := fmt.Sprintf("%s%s/usingssh", p.HostService.connection.URL(), p.HostService.path)
actionBuilder := NewActionBuilder()
@@ -38652,6 +38694,9 @@ func (p *HostServiceApproveUsingSshRequest) Send() (*HostServiceApproveUsingSshR
}
actionBuilder.Cluster(p.cluster)
actionBuilder.Host(p.host)
+ if p.reboot != nil {
+ actionBuilder.Reboot(*p.reboot)
+ }
action, err := actionBuilder.Build()
if err != nil {
return nil, err
@@ -38754,6 +38799,7 @@ type HostServiceInstallUsingSshRequest struct {
deployHostedEngine *bool
host *Host
image *string
+ reboot *bool
rootPassword *string
ssh *Ssh
undeployHostedEngine *bool
@@ -38800,6 +38846,11 @@ func (p *HostServiceInstallUsingSshRequest) Image(image string) *HostServiceInst
return p
}
+func (p *HostServiceInstallUsingSshRequest) Reboot(reboot bool) *HostServiceInstallUsingSshRequest {
+ p.reboot = &reboot
+ return p
+}
+
func (p *HostServiceInstallUsingSshRequest) RootPassword(rootPassword string) *HostServiceInstallUsingSshRequest {
p.rootPassword = &rootPassword
return p
@@ -38831,6 +38882,9 @@ func (p *HostServiceInstallUsingSshRequest) Send() (*HostServiceInstallUsingSshR
if p.image != nil {
actionBuilder.Image(*p.image)
}
+ if p.reboot != nil {
+ actionBuilder.Reboot(*p.reboot)
+ }
if p.rootPassword != nil {
actionBuilder.RootPassword(*p.rootPassword)
}
@@ -39592,6 +39646,7 @@ type HostsServiceAddRequest struct {
activate *bool
deployHostedEngine *bool
host *Host
+ reboot *bool
undeployHostedEngine *bool
}
@@ -39626,6 +39681,11 @@ func (p *HostsServiceAddRequest) Host(host *Host) *HostsServiceAddRequest {
return p
}
+func (p *HostsServiceAddRequest) Reboot(reboot bool) *HostsServiceAddRequest {
+ p.reboot = &reboot
+ return p
+}
+
func (p *HostsServiceAddRequest) UndeployHostedEngine(undeployHostedEngine bool) *HostsServiceAddRequest {
p.undeployHostedEngine = &undeployHostedEngine
return p
@@ -39642,6 +39702,10 @@ func (p *HostsServiceAddRequest) Send() (*HostsServiceAddResponse, error) {
values["deploy_hosted_engine"] = []string{fmt.Sprintf("%v", *p.deployHostedEngine)}
}
+ if p.reboot != nil {
+ values["reboot"] = []string{fmt.Sprintf("%v", *p.reboot)}
+ }
+
if p.undeployHostedEngine != nil {
values["undeploy_hosted_engine"] = []string{fmt.Sprintf("%v", *p.undeployHostedEngine)}
}
@@ -40128,6 +40192,7 @@ type HostsServiceAddUsingRootPasswordRequest struct {
activate *bool
deployHostedEngine *bool
host *Host
+ reboot *bool
undeployHostedEngine *bool
}
@@ -40162,6 +40227,11 @@ func (p *HostsServiceAddUsingRootPasswordRequest) Host(host *Host) *HostsService
return p
}
+func (p *HostsServiceAddUsingRootPasswordRequest) Reboot(reboot bool) *HostsServiceAddUsingRootPasswordRequest {
+ p.reboot = &reboot
+ return p
+}
+
func (p *HostsServiceAddUsingRootPasswordRequest) UndeployHostedEngine(undeployHostedEngine bool) *HostsServiceAddUsingRootPasswordRequest {
p.undeployHostedEngine = &undeployHostedEngine
return p
@@ -40177,6 +40247,9 @@ func (p *HostsServiceAddUsingRootPasswordRequest) Send() (*HostsServiceAddUsingR
actionBuilder.DeployHostedEngine(*p.deployHostedEngine)
}
actionBuilder.Host(p.host)
+ if p.reboot != nil {
+ actionBuilder.Reboot(*p.reboot)
+ }
if p.undeployHostedEngine != nil {
actionBuilder.UndeployHostedEngine(*p.undeployHostedEngine)
}
@@ -40284,7 +40357,7 @@ func (p *HostsService) AddUsingRootPassword() *HostsServiceAddUsingRootPasswordR
}
//
-// Add a new host to the system providing the ssh password or fingerprint.
+// Add a new host to the system providing the ssh password, fingerprint or public key.
//
type HostsServiceAddUsingSshRequest struct {
HostsService *HostsService
@@ -40293,6 +40366,7 @@ type HostsServiceAddUsingSshRequest struct {
activate *bool
deployHostedEngine *bool
host *Host
+ reboot *bool
undeployHostedEngine *bool
}
@@ -40327,6 +40401,11 @@ func (p *HostsServiceAddUsingSshRequest) Host(host *Host) *HostsServiceAddUsingS
return p
}
+func (p *HostsServiceAddUsingSshRequest) Reboot(reboot bool) *HostsServiceAddUsingSshRequest {
+ p.reboot = &reboot
+ return p
+}
+
func (p *HostsServiceAddUsingSshRequest) UndeployHostedEngine(undeployHostedEngine bool) *HostsServiceAddUsingSshRequest {
p.undeployHostedEngine = &undeployHostedEngine
return p
@@ -40342,6 +40421,9 @@ func (p *HostsServiceAddUsingSshRequest) Send() (*HostsServiceAddUsingSshRespons
actionBuilder.DeployHostedEngine(*p.deployHostedEngine)
}
actionBuilder.Host(p.host)
+ if p.reboot != nil {
+ actionBuilder.Reboot(*p.reboot)
+ }
if p.undeployHostedEngine != nil {
actionBuilder.UndeployHostedEngine(*p.undeployHostedEngine)
}
@@ -40421,7 +40503,7 @@ func (p *HostsServiceAddUsingSshRequest) MustSend() *HostsServiceAddUsingSshResp
}
//
-// Add a new host to the system providing the ssh password or fingerprint.
+// Add a new host to the system providing the ssh password, fingerprint or public key.
//
type HostsServiceAddUsingSshResponse struct {
host *Host
@@ -40442,7 +40524,7 @@ func (p *HostsServiceAddUsingSshResponse) MustHost() *Host {
}
//
-// Add a new host to the system providing the ssh password or fingerprint.
+// Add a new host to the system providing the ssh password, fingerprint or public key.
//
func (p *HostsService) AddUsingSsh() *HostsServiceAddUsingSshRequest {
return &HostsServiceAddUsingSshRequest{HostsService: p}
@@ -96679,6 +96761,175 @@ func NewVmService(connection *Connection, path string) *VmService {
return &result
}
+//
+// Apply an automatic CPU and NUMA configuration on the VM.
+// An example for a request:
+// [source]
+// ----
+// POST /ovirt-engine/api/vms/123/autopincpuandnumanodes
+// ----
+// With a request body like this:
+// [source,xml]
+// ----
+//
+// true
+//
+// ----
+//
+type VmServiceAutoPinCpuAndNumaNodesRequest struct {
+ VmService *VmService
+ header map[string]string
+ query map[string]string
+ async *bool
+ optimizeCpuSettings *bool
+}
+
+func (p *VmServiceAutoPinCpuAndNumaNodesRequest) Header(key, value string) *VmServiceAutoPinCpuAndNumaNodesRequest {
+ if p.header == nil {
+ p.header = make(map[string]string)
+ }
+ p.header[key] = value
+ return p
+}
+
+func (p *VmServiceAutoPinCpuAndNumaNodesRequest) Query(key, value string) *VmServiceAutoPinCpuAndNumaNodesRequest {
+ if p.query == nil {
+ p.query = make(map[string]string)
+ }
+ p.query[key] = value
+ return p
+}
+
+func (p *VmServiceAutoPinCpuAndNumaNodesRequest) Async(async bool) *VmServiceAutoPinCpuAndNumaNodesRequest {
+ p.async = &async
+ return p
+}
+
+func (p *VmServiceAutoPinCpuAndNumaNodesRequest) OptimizeCpuSettings(optimizeCpuSettings bool) *VmServiceAutoPinCpuAndNumaNodesRequest {
+ p.optimizeCpuSettings = &optimizeCpuSettings
+ return p
+}
+
+func (p *VmServiceAutoPinCpuAndNumaNodesRequest) Send() (*VmServiceAutoPinCpuAndNumaNodesResponse, error) {
+ rawURL := fmt.Sprintf("%s%s/autopincpuandnumanodes", p.VmService.connection.URL(), p.VmService.path)
+ actionBuilder := NewActionBuilder()
+ if p.async != nil {
+ actionBuilder.Async(*p.async)
+ }
+ if p.optimizeCpuSettings != nil {
+ actionBuilder.OptimizeCpuSettings(*p.optimizeCpuSettings)
+ }
+ action, err := actionBuilder.Build()
+ if err != nil {
+ return nil, err
+ }
+ values := make(url.Values)
+ if p.query != nil {
+ for k, v := range p.query {
+ values[k] = []string{v}
+ }
+ }
+ if len(values) > 0 {
+ rawURL = fmt.Sprintf("%s?%s", rawURL, values.Encode())
+ }
+ var body bytes.Buffer
+ writer := NewXMLWriter(&body)
+ err = XMLActionWriteOne(writer, action, "")
+ writer.Flush()
+ req, err := http.NewRequest("POST", rawURL, &body)
+ if err != nil {
+ return nil, err
+ }
+
+ for hk, hv := range p.VmService.connection.headers {
+ req.Header.Add(hk, hv)
+ }
+
+ if p.header != nil {
+ for hk, hv := range p.header {
+ req.Header.Add(hk, hv)
+ }
+ }
+
+ req.Header.Add("User-Agent", fmt.Sprintf("GoSDK/%s", SDK_VERSION))
+ req.Header.Add("Version", "4")
+ req.Header.Add("Content-Type", "application/xml")
+ req.Header.Add("Accept", "application/xml")
+ // get OAuth access token
+ token, err := p.VmService.connection.authenticate()
+ if err != nil {
+ return nil, err
+ }
+ req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", token))
+ // Send the request and wait for the response
+ resp, err := p.VmService.connection.client.Do(req)
+ if err != nil {
+ return nil, err
+ }
+ defer resp.Body.Close()
+ if p.VmService.connection.logFunc != nil {
+ dumpReq, err := httputil.DumpRequestOut(req, true)
+ if err != nil {
+ return nil, err
+ }
+ dumpResp, err := httputil.DumpResponse(resp, true)
+ if err != nil {
+ return nil, err
+ }
+ p.VmService.connection.logFunc("<<<<<>>>>>\n", string(dumpReq), string(dumpResp))
+ }
+ _, errCheckAction := CheckAction(resp)
+ if errCheckAction != nil {
+ return nil, errCheckAction
+ }
+ return new(VmServiceAutoPinCpuAndNumaNodesResponse), nil
+}
+
+func (p *VmServiceAutoPinCpuAndNumaNodesRequest) MustSend() *VmServiceAutoPinCpuAndNumaNodesResponse {
+ if v, err := p.Send(); err != nil {
+ panic(err)
+ } else {
+ return v
+ }
+}
+
+//
+// Apply an automatic CPU and NUMA configuration on the VM.
+// An example for a request:
+// [source]
+// ----
+// POST /ovirt-engine/api/vms/123/autopincpuandnumanodes
+// ----
+// With a request body like this:
+// [source,xml]
+// ----
+//
+// true
+//
+// ----
+//
+type VmServiceAutoPinCpuAndNumaNodesResponse struct {
+}
+
+//
+// Apply an automatic CPU and NUMA configuration on the VM.
+// An example for a request:
+// [source]
+// ----
+// POST /ovirt-engine/api/vms/123/autopincpuandnumanodes
+// ----
+// With a request body like this:
+// [source,xml]
+// ----
+//
+// true
+//
+// ----
+//
+func (p *VmService) AutoPinCpuAndNumaNodes() *VmServiceAutoPinCpuAndNumaNodesRequest {
+ return &VmServiceAutoPinCpuAndNumaNodesRequest{VmService: p}
+}
+
//
// This operation stops any migration of a virtual machine to another physical host.
// [source]
@@ -98572,12 +98823,25 @@ func (p *VmService) PreviewSnapshot() *VmServicePreviewSnapshotRequest {
// ----
//
// ----
+// To reboot the VM even if a backup is running for it,
+// the action should include the 'force' element.
+// For example, to force reboot virtual machine `123`:
+// ----
+// POST /ovirt-engine/api/vms/123/reboot
+// ----
+// [source,xml]
+// ----
+//
+// true
+//
+// ----
//
type VmServiceRebootRequest struct {
VmService *VmService
header map[string]string
query map[string]string
async *bool
+ force *bool
}
func (p *VmServiceRebootRequest) Header(key, value string) *VmServiceRebootRequest {
@@ -98601,12 +98865,20 @@ func (p *VmServiceRebootRequest) Async(async bool) *VmServiceRebootRequest {
return p
}
+func (p *VmServiceRebootRequest) Force(force bool) *VmServiceRebootRequest {
+ p.force = &force
+ return p
+}
+
func (p *VmServiceRebootRequest) Send() (*VmServiceRebootResponse, error) {
rawURL := fmt.Sprintf("%s%s/reboot", p.VmService.connection.URL(), p.VmService.path)
actionBuilder := NewActionBuilder()
if p.async != nil {
actionBuilder.Async(*p.async)
}
+ if p.force != nil {
+ actionBuilder.Force(*p.force)
+ }
action, err := actionBuilder.Build()
if err != nil {
return nil, err
@@ -98694,6 +98966,18 @@ func (p *VmServiceRebootRequest) MustSend() *VmServiceRebootResponse {
// ----
//
// ----
+// To reboot the VM even if a backup is running for it,
+// the action should include the 'force' element.
+// For example, to force reboot virtual machine `123`:
+// ----
+// POST /ovirt-engine/api/vms/123/reboot
+// ----
+// [source,xml]
+// ----
+//
+// true
+//
+// ----
//
type VmServiceRebootResponse struct {
}
@@ -98711,6 +98995,18 @@ type VmServiceRebootResponse struct {
// ----
//
// ----
+// To reboot the VM even if a backup is running for it,
+// the action should include the 'force' element.
+// For example, to force reboot virtual machine `123`:
+// ----
+// POST /ovirt-engine/api/vms/123/reboot
+// ----
+// [source,xml]
+// ----
+//
+// true
+//
+// ----
//
func (p *VmService) Reboot() *VmServiceRebootRequest {
return &VmServiceRebootRequest{VmService: p}
@@ -99004,12 +99300,25 @@ func (p *VmService) ReorderMacAddresses() *VmServiceReorderMacAddressesRequest {
// ----
//
// ----
+// To shutdown the VM even if a backup is running for it,
+// the action should include the 'force' element.
+// For example, to force shutdown virtual machine `123`:
+// ----
+// POST /ovirt-engine/api/vms/123/shutdown
+// ----
+// [source,xml]
+// ----
+//
+// true
+//
+// ----
//
type VmServiceShutdownRequest struct {
VmService *VmService
header map[string]string
query map[string]string
async *bool
+ force *bool
reason *string
}
@@ -99034,6 +99343,11 @@ func (p *VmServiceShutdownRequest) Async(async bool) *VmServiceShutdownRequest {
return p
}
+func (p *VmServiceShutdownRequest) Force(force bool) *VmServiceShutdownRequest {
+ p.force = &force
+ return p
+}
+
func (p *VmServiceShutdownRequest) Reason(reason string) *VmServiceShutdownRequest {
p.reason = &reason
return p
@@ -99045,6 +99359,9 @@ func (p *VmServiceShutdownRequest) Send() (*VmServiceShutdownResponse, error) {
if p.async != nil {
actionBuilder.Async(*p.async)
}
+ if p.force != nil {
+ actionBuilder.Force(*p.force)
+ }
if p.reason != nil {
actionBuilder.Reason(*p.reason)
}
@@ -99135,6 +99452,18 @@ func (p *VmServiceShutdownRequest) MustSend() *VmServiceShutdownResponse {
// ----
//
// ----
+// To shutdown the VM even if a backup is running for it,
+// the action should include the 'force' element.
+// For example, to force shutdown virtual machine `123`:
+// ----
+// POST /ovirt-engine/api/vms/123/shutdown
+// ----
+// [source,xml]
+// ----
+//
+// true
+//
+// ----
//
type VmServiceShutdownResponse struct {
}
@@ -99152,6 +99481,18 @@ type VmServiceShutdownResponse struct {
// ----
//
// ----
+// To shutdown the VM even if a backup is running for it,
+// the action should include the 'force' element.
+// For example, to force shutdown virtual machine `123`:
+// ----
+// POST /ovirt-engine/api/vms/123/shutdown
+// ----
+// [source,xml]
+// ----
+//
+// true
+//
+// ----
//
func (p *VmService) Shutdown() *VmServiceShutdownRequest {
return &VmServiceShutdownRequest{VmService: p}
@@ -99407,12 +99748,25 @@ func (p *VmService) Start() *VmServiceStartRequest {
// ----
//
// ----
+// To stop the VM even if a backup is running for it,
+// the action should include the 'force' element.
+// For example, to force stop virtual machine `123`:
+// ----
+// POST /ovirt-engine/api/vms/123/stop
+// ----
+// [source,xml]
+// ----
+//
+// true
+//
+// ----
//
type VmServiceStopRequest struct {
VmService *VmService
header map[string]string
query map[string]string
async *bool
+ force *bool
reason *string
}
@@ -99437,6 +99791,11 @@ func (p *VmServiceStopRequest) Async(async bool) *VmServiceStopRequest {
return p
}
+func (p *VmServiceStopRequest) Force(force bool) *VmServiceStopRequest {
+ p.force = &force
+ return p
+}
+
func (p *VmServiceStopRequest) Reason(reason string) *VmServiceStopRequest {
p.reason = &reason
return p
@@ -99448,6 +99807,9 @@ func (p *VmServiceStopRequest) Send() (*VmServiceStopResponse, error) {
if p.async != nil {
actionBuilder.Async(*p.async)
}
+ if p.force != nil {
+ actionBuilder.Force(*p.force)
+ }
if p.reason != nil {
actionBuilder.Reason(*p.reason)
}
@@ -99538,6 +99900,18 @@ func (p *VmServiceStopRequest) MustSend() *VmServiceStopResponse {
// ----
//
// ----
+// To stop the VM even if a backup is running for it,
+// the action should include the 'force' element.
+// For example, to force stop virtual machine `123`:
+// ----
+// POST /ovirt-engine/api/vms/123/stop
+// ----
+// [source,xml]
+// ----
+//
+// true
+//
+// ----
//
type VmServiceStopResponse struct {
}
@@ -99555,6 +99929,18 @@ type VmServiceStopResponse struct {
// ----
//
// ----
+// To stop the VM even if a backup is running for it,
+// the action should include the 'force' element.
+// For example, to force stop virtual machine `123`:
+// ----
+// POST /ovirt-engine/api/vms/123/stop
+// ----
+// [source,xml]
+// ----
+//
+// true
+//
+// ----
//
func (p *VmService) Stop() *VmServiceStopRequest {
return &VmServiceStopRequest{VmService: p}
@@ -108427,6 +108813,931 @@ func (op *SshPublicKeysService) String() string {
return fmt.Sprintf("SshPublicKeysService:%s", op.path)
}
+//
+//
+type UserOptionService struct {
+ BaseService
+}
+
+func NewUserOptionService(connection *Connection, path string) *UserOptionService {
+ var result UserOptionService
+ result.connection = connection
+ result.path = path
+ return &result
+}
+
+//
+// Returns a user profile property of type JSON.
+// Example request(for user with identifier `123` and option with identifier `456`):
+// [source]
+// ----
+// GET /ovirt-engine/api/users/123/options/456
+// ----
+// The result will be the following XML document:
+// [source,xml]
+// ----
+//
+// SomeName
+// ["any", "JSON"]
+//
+//
+// ----
+//
+type UserOptionServiceGetRequest struct {
+ UserOptionService *UserOptionService
+ header map[string]string
+ query map[string]string
+}
+
+func (p *UserOptionServiceGetRequest) Header(key, value string) *UserOptionServiceGetRequest {
+ if p.header == nil {
+ p.header = make(map[string]string)
+ }
+ p.header[key] = value
+ return p
+}
+
+func (p *UserOptionServiceGetRequest) Query(key, value string) *UserOptionServiceGetRequest {
+ if p.query == nil {
+ p.query = make(map[string]string)
+ }
+ p.query[key] = value
+ return p
+}
+
+func (p *UserOptionServiceGetRequest) Send() (*UserOptionServiceGetResponse, error) {
+ rawURL := fmt.Sprintf("%s%s", p.UserOptionService.connection.URL(), p.UserOptionService.path)
+ values := make(url.Values)
+ if p.query != nil {
+ for k, v := range p.query {
+ values[k] = []string{v}
+ }
+ }
+ if len(values) > 0 {
+ rawURL = fmt.Sprintf("%s?%s", rawURL, values.Encode())
+ }
+ req, err := http.NewRequest("GET", rawURL, nil)
+ if err != nil {
+ return nil, err
+ }
+
+ for hk, hv := range p.UserOptionService.connection.headers {
+ req.Header.Add(hk, hv)
+ }
+
+ if p.header != nil {
+ for hk, hv := range p.header {
+ req.Header.Add(hk, hv)
+ }
+ }
+
+ req.Header.Add("User-Agent", fmt.Sprintf("GoSDK/%s", SDK_VERSION))
+ req.Header.Add("Version", "4")
+ req.Header.Add("Content-Type", "application/xml")
+ req.Header.Add("Accept", "application/xml")
+ // get OAuth access token
+ token, err := p.UserOptionService.connection.authenticate()
+ if err != nil {
+ return nil, err
+ }
+ req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", token))
+ // Send the request and wait for the response
+ resp, err := p.UserOptionService.connection.client.Do(req)
+ if err != nil {
+ return nil, err
+ }
+ defer resp.Body.Close()
+ if p.UserOptionService.connection.logFunc != nil {
+ dumpReq, err := httputil.DumpRequestOut(req, true)
+ if err != nil {
+ return nil, err
+ }
+ dumpResp, err := httputil.DumpResponse(resp, true)
+ if err != nil {
+ return nil, err
+ }
+ p.UserOptionService.connection.logFunc("<<<<<>>>>>\n", string(dumpReq), string(dumpResp))
+ }
+ if !Contains(resp.StatusCode, []int{200}) {
+ return nil, CheckFault(resp)
+ }
+ respBodyBytes, errReadBody := ioutil.ReadAll(resp.Body)
+ if errReadBody != nil {
+ return nil, errReadBody
+ }
+ reader := NewXMLReader(respBodyBytes)
+ result, err := XMLUserOptionReadOne(reader, nil, "")
+ if err != nil {
+ return nil, err
+ }
+ return &UserOptionServiceGetResponse{option: result}, nil
+}
+
+func (p *UserOptionServiceGetRequest) MustSend() *UserOptionServiceGetResponse {
+ if v, err := p.Send(); err != nil {
+ panic(err)
+ } else {
+ return v
+ }
+}
+
+//
+// Returns a user profile property of type JSON.
+// Example request(for user with identifier `123` and option with identifier `456`):
+// [source]
+// ----
+// GET /ovirt-engine/api/users/123/options/456
+// ----
+// The result will be the following XML document:
+// [source,xml]
+// ----
+//
+// SomeName
+// ["any", "JSON"]
+//
+//
+// ----
+//
+type UserOptionServiceGetResponse struct {
+ option *UserOption
+}
+
+func (p *UserOptionServiceGetResponse) Option() (*UserOption, bool) {
+ if p.option != nil {
+ return p.option, true
+ }
+ return nil, false
+}
+
+func (p *UserOptionServiceGetResponse) MustOption() *UserOption {
+ if p.option == nil {
+ panic("option in response does not exist")
+ }
+ return p.option
+}
+
+//
+// Returns a user profile property of type JSON.
+// Example request(for user with identifier `123` and option with identifier `456`):
+// [source]
+// ----
+// GET /ovirt-engine/api/users/123/options/456
+// ----
+// The result will be the following XML document:
+// [source,xml]
+// ----
+//
+// SomeName
+// ["any", "JSON"]
+//
+//
+// ----
+//
+func (p *UserOptionService) Get() *UserOptionServiceGetRequest {
+ return &UserOptionServiceGetRequest{UserOptionService: p}
+}
+
+//
+// Deletes an existing property of type JSON.
+// Example request(for user with identifier `123` and option with identifier `456`):
+// [source]
+// ----
+// DELETE /ovirt-engine/api/users/123/options/456
+// ----
+//
+type UserOptionServiceRemoveRequest struct {
+ UserOptionService *UserOptionService
+ header map[string]string
+ query map[string]string
+}
+
+func (p *UserOptionServiceRemoveRequest) Header(key, value string) *UserOptionServiceRemoveRequest {
+ if p.header == nil {
+ p.header = make(map[string]string)
+ }
+ p.header[key] = value
+ return p
+}
+
+func (p *UserOptionServiceRemoveRequest) Query(key, value string) *UserOptionServiceRemoveRequest {
+ if p.query == nil {
+ p.query = make(map[string]string)
+ }
+ p.query[key] = value
+ return p
+}
+
+func (p *UserOptionServiceRemoveRequest) Send() (*UserOptionServiceRemoveResponse, error) {
+ rawURL := fmt.Sprintf("%s%s", p.UserOptionService.connection.URL(), p.UserOptionService.path)
+ values := make(url.Values)
+ if p.query != nil {
+ for k, v := range p.query {
+ values[k] = []string{v}
+ }
+ }
+ if len(values) > 0 {
+ rawURL = fmt.Sprintf("%s?%s", rawURL, values.Encode())
+ }
+ req, err := http.NewRequest("DELETE", rawURL, nil)
+ if err != nil {
+ return nil, err
+ }
+
+ for hk, hv := range p.UserOptionService.connection.headers {
+ req.Header.Add(hk, hv)
+ }
+
+ if p.header != nil {
+ for hk, hv := range p.header {
+ req.Header.Add(hk, hv)
+ }
+ }
+
+ req.Header.Add("User-Agent", fmt.Sprintf("GoSDK/%s", SDK_VERSION))
+ req.Header.Add("Version", "4")
+ req.Header.Add("Content-Type", "application/xml")
+ req.Header.Add("Accept", "application/xml")
+ // get OAuth access token
+ token, err := p.UserOptionService.connection.authenticate()
+ if err != nil {
+ return nil, err
+ }
+ req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", token))
+ // Send the request and wait for the response
+ resp, err := p.UserOptionService.connection.client.Do(req)
+ if err != nil {
+ return nil, err
+ }
+ defer resp.Body.Close()
+ if p.UserOptionService.connection.logFunc != nil {
+ dumpReq, err := httputil.DumpRequestOut(req, true)
+ if err != nil {
+ return nil, err
+ }
+ dumpResp, err := httputil.DumpResponse(resp, true)
+ if err != nil {
+ return nil, err
+ }
+ p.UserOptionService.connection.logFunc("<<<<<>>>>>\n", string(dumpReq), string(dumpResp))
+ }
+ if !Contains(resp.StatusCode, []int{200}) {
+ return nil, CheckFault(resp)
+ }
+ _, errReadBody := ioutil.ReadAll(resp.Body)
+ if errReadBody != nil {
+ return nil, errReadBody
+ }
+ return new(UserOptionServiceRemoveResponse), nil
+}
+
+func (p *UserOptionServiceRemoveRequest) MustSend() *UserOptionServiceRemoveResponse {
+ if v, err := p.Send(); err != nil {
+ panic(err)
+ } else {
+ return v
+ }
+}
+
+//
+// Deletes an existing property of type JSON.
+// Example request(for user with identifier `123` and option with identifier `456`):
+// [source]
+// ----
+// DELETE /ovirt-engine/api/users/123/options/456
+// ----
+//
+type UserOptionServiceRemoveResponse struct {
+}
+
+//
+// Deletes an existing property of type JSON.
+// Example request(for user with identifier `123` and option with identifier `456`):
+// [source]
+// ----
+// DELETE /ovirt-engine/api/users/123/options/456
+// ----
+//
+func (p *UserOptionService) Remove() *UserOptionServiceRemoveRequest {
+ return &UserOptionServiceRemoveRequest{UserOptionService: p}
+}
+
+//
+// Replaces an existing property of type JSON with a new one.
+// Example request(for user with identifier `123` and option with identifier `456`):
+// [source]
+// ----
+// PUT /ovirt-engine/api/users/123/options/456
+// ----
+// Payload:
+// [source,xml]
+// ----
+//
+// SomeName
+// {"new" : "JSON"}
+//
+// ----
+// The result will be the following XML document:
+// [source,xml]
+// ----
+//
+// SomeName
+// {"new" : "JSON"}
+//
+//
+// ----
+//
+type UserOptionServiceUpdateRequest struct {
+ UserOptionService *UserOptionService
+ header map[string]string
+ query map[string]string
+ option *UserOption
+}
+
+func (p *UserOptionServiceUpdateRequest) Header(key, value string) *UserOptionServiceUpdateRequest {
+ if p.header == nil {
+ p.header = make(map[string]string)
+ }
+ p.header[key] = value
+ return p
+}
+
+func (p *UserOptionServiceUpdateRequest) Query(key, value string) *UserOptionServiceUpdateRequest {
+ if p.query == nil {
+ p.query = make(map[string]string)
+ }
+ p.query[key] = value
+ return p
+}
+
+func (p *UserOptionServiceUpdateRequest) Option(option *UserOption) *UserOptionServiceUpdateRequest {
+ p.option = option
+ return p
+}
+
+func (p *UserOptionServiceUpdateRequest) Send() (*UserOptionServiceUpdateResponse, error) {
+ rawURL := fmt.Sprintf("%s%s", p.UserOptionService.connection.URL(), p.UserOptionService.path)
+ values := make(url.Values)
+ if p.query != nil {
+ for k, v := range p.query {
+ values[k] = []string{v}
+ }
+ }
+ if len(values) > 0 {
+ rawURL = fmt.Sprintf("%s?%s", rawURL, values.Encode())
+ }
+ var body bytes.Buffer
+ writer := NewXMLWriter(&body)
+ err := XMLUserOptionWriteOne(writer, p.option, "")
+ if err != nil {
+ return nil, err
+ }
+ writer.Flush()
+ req, err := http.NewRequest("PUT", rawURL, &body)
+ if err != nil {
+ return nil, err
+ }
+
+ for hk, hv := range p.UserOptionService.connection.headers {
+ req.Header.Add(hk, hv)
+ }
+
+ if p.header != nil {
+ for hk, hv := range p.header {
+ req.Header.Add(hk, hv)
+ }
+ }
+
+ req.Header.Add("User-Agent", fmt.Sprintf("GoSDK/%s", SDK_VERSION))
+ req.Header.Add("Version", "4")
+ req.Header.Add("Content-Type", "application/xml")
+ req.Header.Add("Accept", "application/xml")
+ // get OAuth access token
+ token, err := p.UserOptionService.connection.authenticate()
+ if err != nil {
+ return nil, err
+ }
+ req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", token))
+ // Send the request and wait for the response
+ resp, err := p.UserOptionService.connection.client.Do(req)
+ if err != nil {
+ return nil, err
+ }
+ defer resp.Body.Close()
+ if p.UserOptionService.connection.logFunc != nil {
+ dumpReq, err := httputil.DumpRequestOut(req, true)
+ if err != nil {
+ return nil, err
+ }
+ dumpResp, err := httputil.DumpResponse(resp, true)
+ if err != nil {
+ return nil, err
+ }
+ p.UserOptionService.connection.logFunc("<<<<<>>>>>\n", string(dumpReq), string(dumpResp))
+ }
+ if !Contains(resp.StatusCode, []int{200}) {
+ return nil, CheckFault(resp)
+ }
+ respBodyBytes, errReadBody := ioutil.ReadAll(resp.Body)
+ if errReadBody != nil {
+ return nil, errReadBody
+ }
+ reader := NewXMLReader(respBodyBytes)
+ result, err := XMLUserOptionReadOne(reader, nil, "")
+ if err != nil {
+ return nil, err
+ }
+ return &UserOptionServiceUpdateResponse{option: result}, nil
+}
+
+func (p *UserOptionServiceUpdateRequest) MustSend() *UserOptionServiceUpdateResponse {
+ if v, err := p.Send(); err != nil {
+ panic(err)
+ } else {
+ return v
+ }
+}
+
+//
+// Replaces an existing property of type JSON with a new one.
+// Example request(for user with identifier `123` and option with identifier `456`):
+// [source]
+// ----
+// PUT /ovirt-engine/api/users/123/options/456
+// ----
+// Payload:
+// [source,xml]
+// ----
+//
+// SomeName
+// {"new" : "JSON"}
+//
+// ----
+// The result will be the following XML document:
+// [source,xml]
+// ----
+//
+// SomeName
+// {"new" : "JSON"}
+//
+//
+// ----
+//
+type UserOptionServiceUpdateResponse struct {
+ option *UserOption
+}
+
+func (p *UserOptionServiceUpdateResponse) Option() (*UserOption, bool) {
+ if p.option != nil {
+ return p.option, true
+ }
+ return nil, false
+}
+
+func (p *UserOptionServiceUpdateResponse) MustOption() *UserOption {
+ if p.option == nil {
+ panic("option in response does not exist")
+ }
+ return p.option
+}
+
+//
+// Replaces an existing property of type JSON with a new one.
+// Example request(for user with identifier `123` and option with identifier `456`):
+// [source]
+// ----
+// PUT /ovirt-engine/api/users/123/options/456
+// ----
+// Payload:
+// [source,xml]
+// ----
+//
+// SomeName
+// {"new" : "JSON"}
+//
+// ----
+// The result will be the following XML document:
+// [source,xml]
+// ----
+//
+// SomeName
+// {"new" : "JSON"}
+//
+//
+// ----
+//
+func (p *UserOptionService) Update() *UserOptionServiceUpdateRequest {
+ return &UserOptionServiceUpdateRequest{UserOptionService: p}
+}
+
+//
+// Service locator method, returns individual service on which the URI is dispatched.
+//
+func (op *UserOptionService) Service(path string) (Service, error) {
+ if path == "" {
+ return op, nil
+ }
+ return nil, fmt.Errorf("The path <%s> doesn't correspond to any service", path)
+}
+
+func (op *UserOptionService) String() string {
+ return fmt.Sprintf("UserOptionService:%s", op.path)
+}
+
+//
+//
+type UserOptionsService struct {
+ BaseService
+}
+
+func NewUserOptionsService(connection *Connection, path string) *UserOptionsService {
+ var result UserOptionsService
+ result.connection = connection
+ result.path = path
+ return &result
+}
+
+//
+// Adds a new user profile property of type JSON.
+// Example request(for user with identifier `123`):
+// [source]
+// ----
+// POST /ovirt-engine/api/users/123/options
+// ----
+// Payload:
+// [source,xml]
+// ----
+//
+// SomeName
+// ["any", "JSON"]
+//
+// ----
+//
+type UserOptionsServiceAddRequest struct {
+ UserOptionsService *UserOptionsService
+ header map[string]string
+ query map[string]string
+ option *UserOption
+}
+
+func (p *UserOptionsServiceAddRequest) Header(key, value string) *UserOptionsServiceAddRequest {
+ if p.header == nil {
+ p.header = make(map[string]string)
+ }
+ p.header[key] = value
+ return p
+}
+
+func (p *UserOptionsServiceAddRequest) Query(key, value string) *UserOptionsServiceAddRequest {
+ if p.query == nil {
+ p.query = make(map[string]string)
+ }
+ p.query[key] = value
+ return p
+}
+
+func (p *UserOptionsServiceAddRequest) Option(option *UserOption) *UserOptionsServiceAddRequest {
+ p.option = option
+ return p
+}
+
+func (p *UserOptionsServiceAddRequest) Send() (*UserOptionsServiceAddResponse, error) {
+ rawURL := fmt.Sprintf("%s%s", p.UserOptionsService.connection.URL(), p.UserOptionsService.path)
+ values := make(url.Values)
+ if p.query != nil {
+ for k, v := range p.query {
+ values[k] = []string{v}
+ }
+ }
+ if len(values) > 0 {
+ rawURL = fmt.Sprintf("%s?%s", rawURL, values.Encode())
+ }
+ var body bytes.Buffer
+ writer := NewXMLWriter(&body)
+ err := XMLUserOptionWriteOne(writer, p.option, "")
+ if err != nil {
+ return nil, err
+ }
+ writer.Flush()
+ req, err := http.NewRequest("POST", rawURL, &body)
+ if err != nil {
+ return nil, err
+ }
+
+ for hk, hv := range p.UserOptionsService.connection.headers {
+ req.Header.Add(hk, hv)
+ }
+
+ if p.header != nil {
+ for hk, hv := range p.header {
+ req.Header.Add(hk, hv)
+ }
+ }
+
+ req.Header.Add("User-Agent", fmt.Sprintf("GoSDK/%s", SDK_VERSION))
+ req.Header.Add("Version", "4")
+ req.Header.Add("Content-Type", "application/xml")
+ req.Header.Add("Accept", "application/xml")
+ // get OAuth access token
+ token, err := p.UserOptionsService.connection.authenticate()
+ if err != nil {
+ return nil, err
+ }
+ req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", token))
+ // Send the request and wait for the response
+ resp, err := p.UserOptionsService.connection.client.Do(req)
+ if err != nil {
+ return nil, err
+ }
+ defer resp.Body.Close()
+ if p.UserOptionsService.connection.logFunc != nil {
+ dumpReq, err := httputil.DumpRequestOut(req, true)
+ if err != nil {
+ return nil, err
+ }
+ dumpResp, err := httputil.DumpResponse(resp, true)
+ if err != nil {
+ return nil, err
+ }
+ p.UserOptionsService.connection.logFunc("<<<<<>>>>>\n", string(dumpReq), string(dumpResp))
+ }
+ if !Contains(resp.StatusCode, []int{200, 201, 202}) {
+ return nil, CheckFault(resp)
+ }
+ respBodyBytes, errReadBody := ioutil.ReadAll(resp.Body)
+ if errReadBody != nil {
+ return nil, errReadBody
+ }
+ reader := NewXMLReader(respBodyBytes)
+ result, err := XMLUserOptionReadOne(reader, nil, "")
+ if err != nil {
+ return nil, err
+ }
+ return &UserOptionsServiceAddResponse{option: result}, nil
+}
+
+func (p *UserOptionsServiceAddRequest) MustSend() *UserOptionsServiceAddResponse {
+ if v, err := p.Send(); err != nil {
+ panic(err)
+ } else {
+ return v
+ }
+}
+
+//
+// Adds a new user profile property of type JSON.
+// Example request(for user with identifier `123`):
+// [source]
+// ----
+// POST /ovirt-engine/api/users/123/options
+// ----
+// Payload:
+// [source,xml]
+// ----
+//
+// SomeName
+// ["any", "JSON"]
+//
+// ----
+//
+type UserOptionsServiceAddResponse struct {
+ option *UserOption
+}
+
+func (p *UserOptionsServiceAddResponse) Option() (*UserOption, bool) {
+ if p.option != nil {
+ return p.option, true
+ }
+ return nil, false
+}
+
+func (p *UserOptionsServiceAddResponse) MustOption() *UserOption {
+ if p.option == nil {
+ panic("option in response does not exist")
+ }
+ return p.option
+}
+
+//
+// Adds a new user profile property of type JSON.
+// Example request(for user with identifier `123`):
+// [source]
+// ----
+// POST /ovirt-engine/api/users/123/options
+// ----
+// Payload:
+// [source,xml]
+// ----
+//
+// SomeName
+// ["any", "JSON"]
+//
+// ----
+//
+func (p *UserOptionsService) Add() *UserOptionsServiceAddRequest {
+ return &UserOptionsServiceAddRequest{UserOptionsService: p}
+}
+
+//
+// Returns a list of user profile properties of type JSON.
+// Example request(for user with identifier `123`):
+// [source]
+// ----
+// GET /ovirt-engine/api/users/123/options
+// ----
+// The result will be the following XML document:
+// [source,xml]
+// ----
+//
+//
+// SomeName
+// ["any", "JSON"]
+//
+//
+//
+// ----
+//
+type UserOptionsServiceListRequest struct {
+ UserOptionsService *UserOptionsService
+ header map[string]string
+ query map[string]string
+}
+
+func (p *UserOptionsServiceListRequest) Header(key, value string) *UserOptionsServiceListRequest {
+ if p.header == nil {
+ p.header = make(map[string]string)
+ }
+ p.header[key] = value
+ return p
+}
+
+func (p *UserOptionsServiceListRequest) Query(key, value string) *UserOptionsServiceListRequest {
+ if p.query == nil {
+ p.query = make(map[string]string)
+ }
+ p.query[key] = value
+ return p
+}
+
+func (p *UserOptionsServiceListRequest) Send() (*UserOptionsServiceListResponse, error) {
+ rawURL := fmt.Sprintf("%s%s", p.UserOptionsService.connection.URL(), p.UserOptionsService.path)
+ values := make(url.Values)
+ if p.query != nil {
+ for k, v := range p.query {
+ values[k] = []string{v}
+ }
+ }
+ if len(values) > 0 {
+ rawURL = fmt.Sprintf("%s?%s", rawURL, values.Encode())
+ }
+ req, err := http.NewRequest("GET", rawURL, nil)
+ if err != nil {
+ return nil, err
+ }
+
+ for hk, hv := range p.UserOptionsService.connection.headers {
+ req.Header.Add(hk, hv)
+ }
+
+ if p.header != nil {
+ for hk, hv := range p.header {
+ req.Header.Add(hk, hv)
+ }
+ }
+
+ req.Header.Add("User-Agent", fmt.Sprintf("GoSDK/%s", SDK_VERSION))
+ req.Header.Add("Version", "4")
+ req.Header.Add("Content-Type", "application/xml")
+ req.Header.Add("Accept", "application/xml")
+ // get OAuth access token
+ token, err := p.UserOptionsService.connection.authenticate()
+ if err != nil {
+ return nil, err
+ }
+ req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", token))
+ // Send the request and wait for the response
+ resp, err := p.UserOptionsService.connection.client.Do(req)
+ if err != nil {
+ return nil, err
+ }
+ defer resp.Body.Close()
+ if p.UserOptionsService.connection.logFunc != nil {
+ dumpReq, err := httputil.DumpRequestOut(req, true)
+ if err != nil {
+ return nil, err
+ }
+ dumpResp, err := httputil.DumpResponse(resp, true)
+ if err != nil {
+ return nil, err
+ }
+ p.UserOptionsService.connection.logFunc("<<<<<>>>>>\n", string(dumpReq), string(dumpResp))
+ }
+ if !Contains(resp.StatusCode, []int{200}) {
+ return nil, CheckFault(resp)
+ }
+ respBodyBytes, errReadBody := ioutil.ReadAll(resp.Body)
+ if errReadBody != nil {
+ return nil, errReadBody
+ }
+ reader := NewXMLReader(respBodyBytes)
+ result, err := XMLUserOptionReadMany(reader, nil)
+ if err != nil {
+ return nil, err
+ }
+ return &UserOptionsServiceListResponse{options: result}, nil
+}
+
+func (p *UserOptionsServiceListRequest) MustSend() *UserOptionsServiceListResponse {
+ if v, err := p.Send(); err != nil {
+ panic(err)
+ } else {
+ return v
+ }
+}
+
+//
+// Returns a list of user profile properties of type JSON.
+// Example request(for user with identifier `123`):
+// [source]
+// ----
+// GET /ovirt-engine/api/users/123/options
+// ----
+// The result will be the following XML document:
+// [source,xml]
+// ----
+//
+//
+// SomeName
+// ["any", "JSON"]
+//
+//
+//
+// ----
+//
+type UserOptionsServiceListResponse struct {
+ options *UserOptionSlice
+}
+
+func (p *UserOptionsServiceListResponse) Options() (*UserOptionSlice, bool) {
+ if p.options != nil {
+ return p.options, true
+ }
+ return nil, false
+}
+
+func (p *UserOptionsServiceListResponse) MustOptions() *UserOptionSlice {
+ if p.options == nil {
+ panic("options in response does not exist")
+ }
+ return p.options
+}
+
+//
+// Returns a list of user profile properties of type JSON.
+// Example request(for user with identifier `123`):
+// [source]
+// ----
+// GET /ovirt-engine/api/users/123/options
+// ----
+// The result will be the following XML document:
+// [source,xml]
+// ----
+//
+//
+// SomeName
+// ["any", "JSON"]
+//
+//
+//
+// ----
+//
+func (p *UserOptionsService) List() *UserOptionsServiceListRequest {
+ return &UserOptionsServiceListRequest{UserOptionsService: p}
+}
+
+//
+//
+func (op *UserOptionsService) OptionService(id string) *UserOptionService {
+ return NewUserOptionService(op.connection, fmt.Sprintf("%s/%s", op.path, id))
+}
+
+//
+// Service locator method, returns individual service on which the URI is dispatched.
+//
+func (op *UserOptionsService) Service(path string) (Service, error) {
+ if path == "" {
+ return op, nil
+ }
+ index := strings.Index(path, "/")
+ if index == -1 {
+ return op.OptionService(path), nil
+ }
+ return op.OptionService(path[:index]).Service(path[index+1:])
+}
+
+func (op *UserOptionsService) String() string {
+ return fmt.Sprintf("UserOptionsService:%s", op.path)
+}
+
//
// A service to manage a user in the system.
// Use this service to either get users details or remove users.
@@ -108804,7 +110115,7 @@ func (p *UserService) Remove() *UserServiceRemoveRequest {
//
//
// test
-// test1
+// ["any","JSON"]
//
//
//
@@ -108936,7 +110247,7 @@ func (p *UserServiceUpdateRequest) MustSend() *UserServiceUpdateResponse {
//
//
// test
-// test1
+// ["any","JSON"]
//
//
//
@@ -108975,7 +110286,7 @@ func (p *UserServiceUpdateResponse) MustUser() *User {
//
//
// test
-// test1
+// ["any","JSON"]
//
//
//
@@ -108998,6 +110309,12 @@ func (op *UserService) GroupsService() *DomainUserGroupsService {
return NewDomainUserGroupsService(op.connection, fmt.Sprintf("%s/groups", op.path))
}
+//
+//
+func (op *UserService) OptionsService() *UserOptionsService {
+ return NewUserOptionsService(op.connection, fmt.Sprintf("%s/options", op.path))
+}
+
//
//
func (op *UserService) PermissionsService() *AssignedPermissionsService {
@@ -109041,6 +110358,12 @@ func (op *UserService) Service(path string) (Service, error) {
if strings.HasPrefix(path, "groups/") {
return op.GroupsService().Service(path[7:])
}
+ if path == "options" {
+ return op.OptionsService(), nil
+ }
+ if strings.HasPrefix(path, "options/") {
+ return op.OptionsService().Service(path[8:])
+ }
if path == "permissions" {
return op.PermissionsService(), nil
}
diff --git a/vendor/github.com/ovirt/go-ovirt/types.go b/vendor/github.com/ovirt/go-ovirt/types.go
index 23c96dfe5d9..e92a76ed65a 100644
--- a/vendor/github.com/ovirt/go-ovirt/types.go
+++ b/vendor/github.com/ovirt/go-ovirt/types.go
@@ -2720,6 +2720,7 @@ type Cluster struct {
errorHandling *ErrorHandling
externalNetworkProviders *ExternalProviderSlice
fencingPolicy *FencingPolicy
+ fipsMode *FipsMode
firewallType *FirewallType
glusterHooks *GlusterHookSlice
glusterService *bool
@@ -3009,6 +3010,25 @@ func (p *Cluster) MustFencingPolicy() *FencingPolicy {
return p.fencingPolicy
}
+func (p *Cluster) SetFipsMode(attr FipsMode) {
+ p.fipsMode = &attr
+}
+
+func (p *Cluster) FipsMode() (FipsMode, bool) {
+ if p.fipsMode != nil {
+ return *p.fipsMode, true
+ }
+ var zero FipsMode
+ return zero, false
+}
+
+func (p *Cluster) MustFipsMode() FipsMode {
+ if p.fipsMode == nil {
+ panic("the fipsMode must not be nil, please use FipsMode() function instead")
+ }
+ return *p.fipsMode
+}
+
func (p *Cluster) SetFirewallType(attr FirewallType) {
p.firewallType = &attr
}
@@ -16150,6 +16170,7 @@ type ImageTransfer struct {
proxyUrl *string
shallow *bool
snapshot *DiskSnapshot
+ timeoutPolicy *ImageTransferTimeoutPolicy
transferUrl *string
transferred *int64
}
@@ -16453,6 +16474,25 @@ func (p *ImageTransfer) MustSnapshot() *DiskSnapshot {
return p.snapshot
}
+func (p *ImageTransfer) SetTimeoutPolicy(attr ImageTransferTimeoutPolicy) {
+ p.timeoutPolicy = &attr
+}
+
+func (p *ImageTransfer) TimeoutPolicy() (ImageTransferTimeoutPolicy, bool) {
+ if p.timeoutPolicy != nil {
+ return *p.timeoutPolicy, true
+ }
+ var zero ImageTransferTimeoutPolicy
+ return zero, false
+}
+
+func (p *ImageTransfer) MustTimeoutPolicy() ImageTransferTimeoutPolicy {
+ if p.timeoutPolicy == nil {
+ panic("the timeoutPolicy must not be nil, please use TimeoutPolicy() function instead")
+ }
+ return *p.timeoutPolicy
+}
+
func (p *ImageTransfer) SetTransferUrl(attr string) {
p.transferUrl = &attr
}
@@ -16934,62 +16974,63 @@ func (p *Initialization) MustWindowsLicenseKey() string {
type InstanceType struct {
Struct
- bios *Bios
- cdroms *CdromSlice
- cluster *Cluster
- comment *string
- console *Console
- cpu *Cpu
- cpuProfile *CpuProfile
- cpuShares *int64
- creationTime *time.Time
- customCompatibilityVersion *Version
- customCpuModel *string
- customEmulatedMachine *string
- customProperties *CustomPropertySlice
- deleteProtected *bool
- description *string
- diskAttachments *DiskAttachmentSlice
- display *Display
- domain *Domain
- graphicsConsoles *GraphicsConsoleSlice
- highAvailability *HighAvailability
- id *string
- initialization *Initialization
- io *Io
- largeIcon *Icon
- lease *StorageDomainLease
- memory *int64
- memoryPolicy *MemoryPolicy
- migration *MigrationOptions
- migrationDowntime *int64
- multiQueuesEnabled *bool
- name *string
- nics *NicSlice
- origin *string
- os *OperatingSystem
- permissions *PermissionSlice
- placementPolicy *VmPlacementPolicy
- quota *Quota
- rngDevice *RngDevice
- serialNumber *SerialNumber
- smallIcon *Icon
- soundcardEnabled *bool
- sso *Sso
- startPaused *bool
- stateless *bool
- status *TemplateStatus
- storageDomain *StorageDomain
- storageErrorResumeBehaviour *VmStorageErrorResumeBehaviour
- tags *TagSlice
- timeZone *TimeZone
- tunnelMigration *bool
- type_ *VmType
- usb *Usb
- version *TemplateVersion
- virtioScsi *VirtioScsi
- vm *Vm
- watchdogs *WatchdogSlice
+ bios *Bios
+ cdroms *CdromSlice
+ cluster *Cluster
+ comment *string
+ console *Console
+ cpu *Cpu
+ cpuProfile *CpuProfile
+ cpuShares *int64
+ creationTime *time.Time
+ customCompatibilityVersion *Version
+ customCpuModel *string
+ customEmulatedMachine *string
+ customProperties *CustomPropertySlice
+ deleteProtected *bool
+ description *string
+ diskAttachments *DiskAttachmentSlice
+ display *Display
+ domain *Domain
+ graphicsConsoles *GraphicsConsoleSlice
+ highAvailability *HighAvailability
+ id *string
+ initialization *Initialization
+ io *Io
+ largeIcon *Icon
+ lease *StorageDomainLease
+ memory *int64
+ memoryPolicy *MemoryPolicy
+ migration *MigrationOptions
+ migrationDowntime *int64
+ multiQueuesEnabled *bool
+ name *string
+ nics *NicSlice
+ origin *string
+ os *OperatingSystem
+ permissions *PermissionSlice
+ placementPolicy *VmPlacementPolicy
+ quota *Quota
+ rngDevice *RngDevice
+ serialNumber *SerialNumber
+ smallIcon *Icon
+ soundcardEnabled *bool
+ sso *Sso
+ startPaused *bool
+ stateless *bool
+ status *TemplateStatus
+ storageDomain *StorageDomain
+ storageErrorResumeBehaviour *VmStorageErrorResumeBehaviour
+ tags *TagSlice
+ timeZone *TimeZone
+ tunnelMigration *bool
+ type_ *VmType
+ usb *Usb
+ version *TemplateVersion
+ virtioScsi *VirtioScsi
+ virtioScsiMultiQueuesEnabled *bool
+ vm *Vm
+ watchdogs *WatchdogSlice
}
func (p *InstanceType) SetBios(attr *Bios) {
@@ -17984,6 +18025,25 @@ func (p *InstanceType) MustVirtioScsi() *VirtioScsi {
return p.virtioScsi
}
+func (p *InstanceType) SetVirtioScsiMultiQueuesEnabled(attr bool) {
+ p.virtioScsiMultiQueuesEnabled = &attr
+}
+
+func (p *InstanceType) VirtioScsiMultiQueuesEnabled() (bool, bool) {
+ if p.virtioScsiMultiQueuesEnabled != nil {
+ return *p.virtioScsiMultiQueuesEnabled, true
+ }
+ var zero bool
+ return zero, false
+}
+
+func (p *InstanceType) MustVirtioScsiMultiQueuesEnabled() bool {
+ if p.virtioScsiMultiQueuesEnabled == nil {
+ panic("the virtioScsiMultiQueuesEnabled must not be nil, please use VirtioScsiMultiQueuesEnabled() function instead")
+ }
+ return *p.virtioScsiMultiQueuesEnabled
+}
+
func (p *InstanceType) SetVm(attr *Vm) {
p.vm = attr
}
@@ -28084,30 +28144,6 @@ func (p *SchedulingPolicy) MustWeight() *WeightSlice {
return p.weight
}
-type SeLinux struct {
- Struct
- mode *SeLinuxMode
-}
-
-func (p *SeLinux) SetMode(attr SeLinuxMode) {
- p.mode = &attr
-}
-
-func (p *SeLinux) Mode() (SeLinuxMode, bool) {
- if p.mode != nil {
- return *p.mode, true
- }
- var zero SeLinuxMode
- return zero, false
-}
-
-func (p *SeLinux) MustMode() SeLinuxMode {
- if p.mode == nil {
- panic("the mode must not be nil, please use Mode() function instead")
- }
- return *p.mode
-}
-
type SchedulingPolicyUnit struct {
Struct
comment *string
@@ -28271,6 +28307,30 @@ func (p *SchedulingPolicyUnit) MustType() PolicyUnitType {
return *p.type_
}
+type SeLinux struct {
+ Struct
+ mode *SeLinuxMode
+}
+
+func (p *SeLinux) SetMode(attr SeLinuxMode) {
+ p.mode = &attr
+}
+
+func (p *SeLinux) Mode() (SeLinuxMode, bool) {
+ if p.mode != nil {
+ return *p.mode, true
+ }
+ var zero SeLinuxMode
+ return zero, false
+}
+
+func (p *SeLinux) MustMode() SeLinuxMode {
+ if p.mode == nil {
+ panic("the mode must not be nil, please use Mode() function instead")
+ }
+ return *p.mode
+}
+
type SerialNumber struct {
Struct
policy *SerialNumberPolicy
@@ -28566,95 +28626,96 @@ func (p *SkipIfSdActive) MustEnabled() bool {
type Snapshot struct {
Struct
- affinityLabels *AffinityLabelSlice
- applications *ApplicationSlice
- bios *Bios
- cdroms *CdromSlice
- cluster *Cluster
- comment *string
- console *Console
- cpu *Cpu
- cpuProfile *CpuProfile
- cpuShares *int64
- creationTime *time.Time
- customCompatibilityVersion *Version
- customCpuModel *string
- customEmulatedMachine *string
- customProperties *CustomPropertySlice
- date *time.Time
- deleteProtected *bool
- description *string
- diskAttachments *DiskAttachmentSlice
- disks *DiskSlice
- display *Display
- domain *Domain
- externalHostProvider *ExternalHostProvider
- floppies *FloppySlice
- fqdn *string
- graphicsConsoles *GraphicsConsoleSlice
- guestOperatingSystem *GuestOperatingSystem
- guestTimeZone *TimeZone
- hasIllegalImages *bool
- highAvailability *HighAvailability
- host *Host
- hostDevices *HostDeviceSlice
- id *string
- initialization *Initialization
- instanceType *InstanceType
- io *Io
- katelloErrata *KatelloErratumSlice
- largeIcon *Icon
- lease *StorageDomainLease
- memory *int64
- memoryPolicy *MemoryPolicy
- migration *MigrationOptions
- migrationDowntime *int64
- multiQueuesEnabled *bool
- name *string
- nextRunConfigurationExists *bool
- nics *NicSlice
- numaNodes *NumaNodeSlice
- numaTuneMode *NumaTuneMode
- origin *string
- originalTemplate *Template
- os *OperatingSystem
- payloads *PayloadSlice
- permissions *PermissionSlice
- persistMemorystate *bool
- placementPolicy *VmPlacementPolicy
- quota *Quota
- reportedDevices *ReportedDeviceSlice
- rngDevice *RngDevice
- runOnce *bool
- serialNumber *SerialNumber
- sessions *SessionSlice
- smallIcon *Icon
- snapshotStatus *SnapshotStatus
- snapshotType *SnapshotType
- snapshots *SnapshotSlice
- soundcardEnabled *bool
- sso *Sso
- startPaused *bool
- startTime *time.Time
- stateless *bool
- statistics *StatisticSlice
- status *VmStatus
- statusDetail *string
- stopReason *string
- stopTime *time.Time
- storageDomain *StorageDomain
- storageErrorResumeBehaviour *VmStorageErrorResumeBehaviour
- tags *TagSlice
- template *Template
- timeZone *TimeZone
- tunnelMigration *bool
- type_ *VmType
- usb *Usb
- useLatestTemplateVersion *bool
- virtioScsi *VirtioScsi
- vm *Vm
- vmPool *VmPool
- watchdogs *WatchdogSlice
+ affinityLabels *AffinityLabelSlice
+ applications *ApplicationSlice
+ bios *Bios
+ cdroms *CdromSlice
+ cluster *Cluster
+ comment *string
+ console *Console
+ cpu *Cpu
+ cpuProfile *CpuProfile
+ cpuShares *int64
+ creationTime *time.Time
+ customCompatibilityVersion *Version
+ customCpuModel *string
+ customEmulatedMachine *string
+ customProperties *CustomPropertySlice
+ date *time.Time
+ deleteProtected *bool
+ description *string
+ diskAttachments *DiskAttachmentSlice
+ disks *DiskSlice
+ display *Display
+ domain *Domain
+ externalHostProvider *ExternalHostProvider
+ floppies *FloppySlice
+ fqdn *string
+ graphicsConsoles *GraphicsConsoleSlice
+ guestOperatingSystem *GuestOperatingSystem
+ guestTimeZone *TimeZone
+ hasIllegalImages *bool
+ highAvailability *HighAvailability
+ host *Host
+ hostDevices *HostDeviceSlice
+ id *string
+ initialization *Initialization
+ instanceType *InstanceType
+ io *Io
+ katelloErrata *KatelloErratumSlice
+ largeIcon *Icon
+ lease *StorageDomainLease
+ memory *int64
+ memoryPolicy *MemoryPolicy
+ migration *MigrationOptions
+ migrationDowntime *int64
+ multiQueuesEnabled *bool
+ name *string
+ nextRunConfigurationExists *bool
+ nics *NicSlice
+ numaNodes *NumaNodeSlice
+ numaTuneMode *NumaTuneMode
+ origin *string
+ originalTemplate *Template
+ os *OperatingSystem
+ payloads *PayloadSlice
+ permissions *PermissionSlice
+ persistMemorystate *bool
+ placementPolicy *VmPlacementPolicy
+ quota *Quota
+ reportedDevices *ReportedDeviceSlice
+ rngDevice *RngDevice
+ runOnce *bool
+ serialNumber *SerialNumber
+ sessions *SessionSlice
+ smallIcon *Icon
+ snapshotStatus *SnapshotStatus
+ snapshotType *SnapshotType
+ snapshots *SnapshotSlice
+ soundcardEnabled *bool
+ sso *Sso
+ startPaused *bool
+ startTime *time.Time
+ stateless *bool
+ statistics *StatisticSlice
+ status *VmStatus
+ statusDetail *string
+ stopReason *string
+ stopTime *time.Time
+ storageDomain *StorageDomain
+ storageErrorResumeBehaviour *VmStorageErrorResumeBehaviour
+ tags *TagSlice
+ template *Template
+ timeZone *TimeZone
+ tunnelMigration *bool
+ type_ *VmType
+ usb *Usb
+ useLatestTemplateVersion *bool
+ virtioScsi *VirtioScsi
+ virtioScsiMultiQueuesEnabled *bool
+ vm *Vm
+ vmPool *VmPool
+ watchdogs *WatchdogSlice
}
func (p *Snapshot) SetAffinityLabels(attr *AffinityLabelSlice) {
@@ -30239,6 +30300,25 @@ func (p *Snapshot) MustVirtioScsi() *VirtioScsi {
return p.virtioScsi
}
+func (p *Snapshot) SetVirtioScsiMultiQueuesEnabled(attr bool) {
+ p.virtioScsiMultiQueuesEnabled = &attr
+}
+
+func (p *Snapshot) VirtioScsiMultiQueuesEnabled() (bool, bool) {
+ if p.virtioScsiMultiQueuesEnabled != nil {
+ return *p.virtioScsiMultiQueuesEnabled, true
+ }
+ var zero bool
+ return zero, false
+}
+
+func (p *Snapshot) MustVirtioScsiMultiQueuesEnabled() bool {
+ if p.virtioScsiMultiQueuesEnabled == nil {
+ panic("the virtioScsiMultiQueuesEnabled must not be nil, please use VirtioScsiMultiQueuesEnabled() function instead")
+ }
+ return *p.virtioScsiMultiQueuesEnabled
+}
+
func (p *Snapshot) SetVm(attr *Vm) {
p.vm = attr
}
@@ -30388,6 +30468,7 @@ type Ssh struct {
id *string
name *string
port *int64
+ publicKey *string
user *User
}
@@ -30524,6 +30605,25 @@ func (p *Ssh) MustPort() int64 {
return *p.port
}
+func (p *Ssh) SetPublicKey(attr string) {
+ p.publicKey = &attr
+}
+
+func (p *Ssh) PublicKey() (string, bool) {
+ if p.publicKey != nil {
+ return *p.publicKey, true
+ }
+ var zero string
+ return zero, false
+}
+
+func (p *Ssh) MustPublicKey() string {
+ if p.publicKey == nil {
+ panic("the publicKey must not be nil, please use PublicKey() function instead")
+ }
+ return *p.publicKey
+}
+
func (p *Ssh) SetUser(attr *User) {
p.user = attr
}
@@ -32928,62 +33028,63 @@ func (p *Tag) MustVm() *Vm {
type Template struct {
Struct
- bios *Bios
- cdroms *CdromSlice
- cluster *Cluster
- comment *string
- console *Console
- cpu *Cpu
- cpuProfile *CpuProfile
- cpuShares *int64
- creationTime *time.Time
- customCompatibilityVersion *Version
- customCpuModel *string
- customEmulatedMachine *string
- customProperties *CustomPropertySlice
- deleteProtected *bool
- description *string
- diskAttachments *DiskAttachmentSlice
- display *Display
- domain *Domain
- graphicsConsoles *GraphicsConsoleSlice
- highAvailability *HighAvailability
- id *string
- initialization *Initialization
- io *Io
- largeIcon *Icon
- lease *StorageDomainLease
- memory *int64
- memoryPolicy *MemoryPolicy
- migration *MigrationOptions
- migrationDowntime *int64
- multiQueuesEnabled *bool
- name *string
- nics *NicSlice
- origin *string
- os *OperatingSystem
- permissions *PermissionSlice
- placementPolicy *VmPlacementPolicy
- quota *Quota
- rngDevice *RngDevice
- serialNumber *SerialNumber
- smallIcon *Icon
- soundcardEnabled *bool
- sso *Sso
- startPaused *bool
- stateless *bool
- status *TemplateStatus
- storageDomain *StorageDomain
- storageErrorResumeBehaviour *VmStorageErrorResumeBehaviour
- tags *TagSlice
- timeZone *TimeZone
- tunnelMigration *bool
- type_ *VmType
- usb *Usb
- version *TemplateVersion
- virtioScsi *VirtioScsi
- vm *Vm
- watchdogs *WatchdogSlice
+ bios *Bios
+ cdroms *CdromSlice
+ cluster *Cluster
+ comment *string
+ console *Console
+ cpu *Cpu
+ cpuProfile *CpuProfile
+ cpuShares *int64
+ creationTime *time.Time
+ customCompatibilityVersion *Version
+ customCpuModel *string
+ customEmulatedMachine *string
+ customProperties *CustomPropertySlice
+ deleteProtected *bool
+ description *string
+ diskAttachments *DiskAttachmentSlice
+ display *Display
+ domain *Domain
+ graphicsConsoles *GraphicsConsoleSlice
+ highAvailability *HighAvailability
+ id *string
+ initialization *Initialization
+ io *Io
+ largeIcon *Icon
+ lease *StorageDomainLease
+ memory *int64
+ memoryPolicy *MemoryPolicy
+ migration *MigrationOptions
+ migrationDowntime *int64
+ multiQueuesEnabled *bool
+ name *string
+ nics *NicSlice
+ origin *string
+ os *OperatingSystem
+ permissions *PermissionSlice
+ placementPolicy *VmPlacementPolicy
+ quota *Quota
+ rngDevice *RngDevice
+ serialNumber *SerialNumber
+ smallIcon *Icon
+ soundcardEnabled *bool
+ sso *Sso
+ startPaused *bool
+ stateless *bool
+ status *TemplateStatus
+ storageDomain *StorageDomain
+ storageErrorResumeBehaviour *VmStorageErrorResumeBehaviour
+ tags *TagSlice
+ timeZone *TimeZone
+ tunnelMigration *bool
+ type_ *VmType
+ usb *Usb
+ version *TemplateVersion
+ virtioScsi *VirtioScsi
+ virtioScsiMultiQueuesEnabled *bool
+ vm *Vm
+ watchdogs *WatchdogSlice
}
func (p *Template) SetBios(attr *Bios) {
@@ -33978,6 +34079,25 @@ func (p *Template) MustVirtioScsi() *VirtioScsi {
return p.virtioScsi
}
+func (p *Template) SetVirtioScsiMultiQueuesEnabled(attr bool) {
+ p.virtioScsiMultiQueuesEnabled = &attr
+}
+
+func (p *Template) VirtioScsiMultiQueuesEnabled() (bool, bool) {
+ if p.virtioScsiMultiQueuesEnabled != nil {
+ return *p.virtioScsiMultiQueuesEnabled, true
+ }
+ var zero bool
+ return zero, false
+}
+
+func (p *Template) MustVirtioScsiMultiQueuesEnabled() bool {
+ if p.virtioScsiMultiQueuesEnabled == nil {
+ panic("the virtioScsiMultiQueuesEnabled must not be nil, please use VirtioScsiMultiQueuesEnabled() function instead")
+ }
+ return *p.virtioScsiMultiQueuesEnabled
+}
+
func (p *Template) SetVm(attr *Vm) {
p.vm = attr
}
@@ -34369,6 +34489,7 @@ type User struct {
loggedIn *bool
name *string
namespace *string
+ options *UserOptionSlice
password *string
permissions *PermissionSlice
principal *string
@@ -34605,6 +34726,24 @@ func (p *User) MustNamespace() string {
return *p.namespace
}
+func (p *User) SetOptions(attr *UserOptionSlice) {
+ p.options = attr
+}
+
+func (p *User) Options() (*UserOptionSlice, bool) {
+ if p.options != nil {
+ return p.options, true
+ }
+ return nil, false
+}
+
+func (p *User) MustOptions() *UserOptionSlice {
+ if p.options == nil {
+ panic("the options must not be nil, please use Options() function instead")
+ }
+ return p.options
+}
+
func (p *User) SetPassword(attr string) {
p.password = &attr
}
@@ -34752,6 +34891,129 @@ func (p *User) MustUserOptions() *PropertySlice {
return p.userOptions
}
+type UserOption struct {
+ Struct
+ comment *string
+ content *string
+ description *string
+ id *string
+ name *string
+ user *User
+}
+
+func (p *UserOption) SetComment(attr string) {
+ p.comment = &attr
+}
+
+func (p *UserOption) Comment() (string, bool) {
+ if p.comment != nil {
+ return *p.comment, true
+ }
+ var zero string
+ return zero, false
+}
+
+func (p *UserOption) MustComment() string {
+ if p.comment == nil {
+ panic("the comment must not be nil, please use Comment() function instead")
+ }
+ return *p.comment
+}
+
+func (p *UserOption) SetContent(attr string) {
+ p.content = &attr
+}
+
+func (p *UserOption) Content() (string, bool) {
+ if p.content != nil {
+ return *p.content, true
+ }
+ var zero string
+ return zero, false
+}
+
+func (p *UserOption) MustContent() string {
+ if p.content == nil {
+ panic("the content must not be nil, please use Content() function instead")
+ }
+ return *p.content
+}
+
+func (p *UserOption) SetDescription(attr string) {
+ p.description = &attr
+}
+
+func (p *UserOption) Description() (string, bool) {
+ if p.description != nil {
+ return *p.description, true
+ }
+ var zero string
+ return zero, false
+}
+
+func (p *UserOption) MustDescription() string {
+ if p.description == nil {
+ panic("the description must not be nil, please use Description() function instead")
+ }
+ return *p.description
+}
+
+func (p *UserOption) SetId(attr string) {
+ p.id = &attr
+}
+
+func (p *UserOption) Id() (string, bool) {
+ if p.id != nil {
+ return *p.id, true
+ }
+ var zero string
+ return zero, false
+}
+
+func (p *UserOption) MustId() string {
+ if p.id == nil {
+ panic("the id must not be nil, please use Id() function instead")
+ }
+ return *p.id
+}
+
+func (p *UserOption) SetName(attr string) {
+ p.name = &attr
+}
+
+func (p *UserOption) Name() (string, bool) {
+ if p.name != nil {
+ return *p.name, true
+ }
+ var zero string
+ return zero, false
+}
+
+func (p *UserOption) MustName() string {
+ if p.name == nil {
+ panic("the name must not be nil, please use Name() function instead")
+ }
+ return *p.name
+}
+
+func (p *UserOption) SetUser(attr *User) {
+ p.user = attr
+}
+
+func (p *UserOption) User() (*User, bool) {
+ if p.user != nil {
+ return p.user, true
+ }
+ return nil, false
+}
+
+func (p *UserOption) MustUser() *User {
+ if p.user == nil {
+ panic("the user must not be nil, please use User() function instead")
+ }
+ return p.user
+}
+
type Value struct {
Struct
datum *float64
@@ -35417,89 +35679,90 @@ func (p *Vlan) MustId() int64 {
type Vm struct {
Struct
- affinityLabels *AffinityLabelSlice
- applications *ApplicationSlice
- bios *Bios
- cdroms *CdromSlice
- cluster *Cluster
- comment *string
- console *Console
- cpu *Cpu
- cpuProfile *CpuProfile
- cpuShares *int64
- creationTime *time.Time
- customCompatibilityVersion *Version
- customCpuModel *string
- customEmulatedMachine *string
- customProperties *CustomPropertySlice
- deleteProtected *bool
- description *string
- diskAttachments *DiskAttachmentSlice
- display *Display
- domain *Domain
- externalHostProvider *ExternalHostProvider
- floppies *FloppySlice
- fqdn *string
- graphicsConsoles *GraphicsConsoleSlice
- guestOperatingSystem *GuestOperatingSystem
- guestTimeZone *TimeZone
- hasIllegalImages *bool
- highAvailability *HighAvailability
- host *Host
- hostDevices *HostDeviceSlice
- id *string
- initialization *Initialization
- instanceType *InstanceType
- io *Io
- katelloErrata *KatelloErratumSlice
- largeIcon *Icon
- lease *StorageDomainLease
- memory *int64
- memoryPolicy *MemoryPolicy
- migration *MigrationOptions
- migrationDowntime *int64
- multiQueuesEnabled *bool
- name *string
- nextRunConfigurationExists *bool
- nics *NicSlice
- numaNodes *NumaNodeSlice
- numaTuneMode *NumaTuneMode
- origin *string
- originalTemplate *Template
- os *OperatingSystem
- payloads *PayloadSlice
- permissions *PermissionSlice
- placementPolicy *VmPlacementPolicy
- quota *Quota
- reportedDevices *ReportedDeviceSlice
- rngDevice *RngDevice
- runOnce *bool
- serialNumber *SerialNumber
- sessions *SessionSlice
- smallIcon *Icon
- snapshots *SnapshotSlice
- soundcardEnabled *bool
- sso *Sso
- startPaused *bool
- startTime *time.Time
- stateless *bool
- statistics *StatisticSlice
- status *VmStatus
- statusDetail *string
- stopReason *string
- stopTime *time.Time
- storageDomain *StorageDomain
- storageErrorResumeBehaviour *VmStorageErrorResumeBehaviour
- tags *TagSlice
- template *Template
- timeZone *TimeZone
- tunnelMigration *bool
- type_ *VmType
- usb *Usb
- useLatestTemplateVersion *bool
- virtioScsi *VirtioScsi
- vmPool *VmPool
- watchdogs *WatchdogSlice
+ affinityLabels *AffinityLabelSlice
+ applications *ApplicationSlice
+ bios *Bios
+ cdroms *CdromSlice
+ cluster *Cluster
+ comment *string
+ console *Console
+ cpu *Cpu
+ cpuProfile *CpuProfile
+ cpuShares *int64
+ creationTime *time.Time
+ customCompatibilityVersion *Version
+ customCpuModel *string
+ customEmulatedMachine *string
+ customProperties *CustomPropertySlice
+ deleteProtected *bool
+ description *string
+ diskAttachments *DiskAttachmentSlice
+ display *Display
+ domain *Domain
+ externalHostProvider *ExternalHostProvider
+ floppies *FloppySlice
+ fqdn *string
+ graphicsConsoles *GraphicsConsoleSlice
+ guestOperatingSystem *GuestOperatingSystem
+ guestTimeZone *TimeZone
+ hasIllegalImages *bool
+ highAvailability *HighAvailability
+ host *Host
+ hostDevices *HostDeviceSlice
+ id *string
+ initialization *Initialization
+ instanceType *InstanceType
+ io *Io
+ katelloErrata *KatelloErratumSlice
+ largeIcon *Icon
+ lease *StorageDomainLease
+ memory *int64
+ memoryPolicy *MemoryPolicy
+ migration *MigrationOptions
+ migrationDowntime *int64
+ multiQueuesEnabled *bool
+ name *string
+ nextRunConfigurationExists *bool
+ nics *NicSlice
+ numaNodes *NumaNodeSlice
+ numaTuneMode *NumaTuneMode
+ origin *string
+ originalTemplate *Template
+ os *OperatingSystem
+ payloads *PayloadSlice
+ permissions *PermissionSlice
+ placementPolicy *VmPlacementPolicy
+ quota *Quota
+ reportedDevices *ReportedDeviceSlice
+ rngDevice *RngDevice
+ runOnce *bool
+ serialNumber *SerialNumber
+ sessions *SessionSlice
+ smallIcon *Icon
+ snapshots *SnapshotSlice
+ soundcardEnabled *bool
+ sso *Sso
+ startPaused *bool
+ startTime *time.Time
+ stateless *bool
+ statistics *StatisticSlice
+ status *VmStatus
+ statusDetail *string
+ stopReason *string
+ stopTime *time.Time
+ storageDomain *StorageDomain
+ storageErrorResumeBehaviour *VmStorageErrorResumeBehaviour
+ tags *TagSlice
+ template *Template
+ timeZone *TimeZone
+ tunnelMigration *bool
+ type_ *VmType
+ usb *Usb
+ useLatestTemplateVersion *bool
+ virtioScsi *VirtioScsi
+ virtioScsiMultiQueuesEnabled *bool
+ vmPool *VmPool
+ watchdogs *WatchdogSlice
}
func (p *Vm) SetAffinityLabels(attr *AffinityLabelSlice) {
@@ -36990,6 +37253,25 @@ func (p *Vm) MustVirtioScsi() *VirtioScsi {
return p.virtioScsi
}
+func (p *Vm) SetVirtioScsiMultiQueuesEnabled(attr bool) {
+ p.virtioScsiMultiQueuesEnabled = &attr
+}
+
+func (p *Vm) VirtioScsiMultiQueuesEnabled() (bool, bool) {
+ if p.virtioScsiMultiQueuesEnabled != nil {
+ return *p.virtioScsiMultiQueuesEnabled, true
+ }
+ var zero bool
+ return zero, false
+}
+
+func (p *Vm) MustVirtioScsiMultiQueuesEnabled() bool {
+ if p.virtioScsiMultiQueuesEnabled == nil {
+ panic("the virtioScsiMultiQueuesEnabled must not be nil, please use VirtioScsiMultiQueuesEnabled() function instead")
+ }
+ return *p.virtioScsiMultiQueuesEnabled
+}
+
func (p *Vm) SetVmPool(attr *VmPool) {
p.vmPool = attr
}
@@ -37028,52 +37310,53 @@ func (p *Vm) MustWatchdogs() *WatchdogSlice {
type VmBase struct {
Struct
- bios *Bios
- cluster *Cluster
- comment *string
- console *Console
- cpu *Cpu
- cpuProfile *CpuProfile
- cpuShares *int64
- creationTime *time.Time
- customCompatibilityVersion *Version
- customCpuModel *string
- customEmulatedMachine *string
- customProperties *CustomPropertySlice
- deleteProtected *bool
- description *string
- display *Display
- domain *Domain
- highAvailability *HighAvailability
- id *string
- initialization *Initialization
- io *Io
- largeIcon *Icon
- lease *StorageDomainLease
- memory *int64
- memoryPolicy *MemoryPolicy
- migration *MigrationOptions
- migrationDowntime *int64
- multiQueuesEnabled *bool
- name *string
- origin *string
- os *OperatingSystem
- placementPolicy *VmPlacementPolicy
- quota *Quota
- rngDevice *RngDevice
- serialNumber *SerialNumber
- smallIcon *Icon
- soundcardEnabled *bool
- sso *Sso
- startPaused *bool
- stateless *bool
- storageDomain *StorageDomain
- storageErrorResumeBehaviour *VmStorageErrorResumeBehaviour
- timeZone *TimeZone
- tunnelMigration *bool
- type_ *VmType
- usb *Usb
- virtioScsi *VirtioScsi
+ bios *Bios
+ cluster *Cluster
+ comment *string
+ console *Console
+ cpu *Cpu
+ cpuProfile *CpuProfile
+ cpuShares *int64
+ creationTime *time.Time
+ customCompatibilityVersion *Version
+ customCpuModel *string
+ customEmulatedMachine *string
+ customProperties *CustomPropertySlice
+ deleteProtected *bool
+ description *string
+ display *Display
+ domain *Domain
+ highAvailability *HighAvailability
+ id *string
+ initialization *Initialization
+ io *Io
+ largeIcon *Icon
+ lease *StorageDomainLease
+ memory *int64
+ memoryPolicy *MemoryPolicy
+ migration *MigrationOptions
+ migrationDowntime *int64
+ multiQueuesEnabled *bool
+ name *string
+ origin *string
+ os *OperatingSystem
+ placementPolicy *VmPlacementPolicy
+ quota *Quota
+ rngDevice *RngDevice
+ serialNumber *SerialNumber
+ smallIcon *Icon
+ soundcardEnabled *bool
+ sso *Sso
+ startPaused *bool
+ stateless *bool
+ storageDomain *StorageDomain
+ storageErrorResumeBehaviour *VmStorageErrorResumeBehaviour
+ timeZone *TimeZone
+ tunnelMigration *bool
+ type_ *VmType
+ usb *Usb
+ virtioScsi *VirtioScsi
+ virtioScsiMultiQueuesEnabled *bool
}
func (p *VmBase) SetBios(attr *Bios) {
@@ -37923,6 +38206,25 @@ func (p *VmBase) MustVirtioScsi() *VirtioScsi {
return p.virtioScsi
}
+func (p *VmBase) SetVirtioScsiMultiQueuesEnabled(attr bool) {
+ p.virtioScsiMultiQueuesEnabled = &attr
+}
+
+func (p *VmBase) VirtioScsiMultiQueuesEnabled() (bool, bool) {
+ if p.virtioScsiMultiQueuesEnabled != nil {
+ return *p.virtioScsiMultiQueuesEnabled, true
+ }
+ var zero bool
+ return zero, false
+}
+
+func (p *VmBase) MustVirtioScsiMultiQueuesEnabled() bool {
+ if p.virtioScsiMultiQueuesEnabled == nil {
+ panic("the virtioScsiMultiQueuesEnabled must not be nil, please use VirtioScsiMultiQueuesEnabled() function instead")
+ }
+ return *p.virtioScsiMultiQueuesEnabled
+}
+
type VmPlacementPolicy struct {
Struct
affinity *VmAffinity
@@ -39260,6 +39562,7 @@ type Action struct {
modifiedLabels *NetworkLabelSlice
modifiedNetworkAttachments *NetworkAttachmentSlice
name *string
+ optimizeCpuSettings *bool
option *Option
pause *bool
permission *Permission
@@ -40285,6 +40588,25 @@ func (p *Action) MustName() string {
return *p.name
}
+func (p *Action) SetOptimizeCpuSettings(attr bool) {
+ p.optimizeCpuSettings = &attr
+}
+
+func (p *Action) OptimizeCpuSettings() (bool, bool) {
+ if p.optimizeCpuSettings != nil {
+ return *p.optimizeCpuSettings, true
+ }
+ var zero bool
+ return zero, false
+}
+
+func (p *Action) MustOptimizeCpuSettings() bool {
+ if p.optimizeCpuSettings == nil {
+ panic("the optimizeCpuSettings must not be nil, please use OptimizeCpuSettings() function instead")
+ }
+ return *p.optimizeCpuSettings
+}
+
func (p *Action) SetOption(attr *Option) {
p.option = attr
}
@@ -44961,51 +45283,51 @@ func (op *SchedulingPolicySlice) SetSlice(slice []*SchedulingPolicy) {
op.slice = slice
}
-type SeLinuxSlice struct {
+type SchedulingPolicyUnitSlice struct {
href *string
- slice []*SeLinux
+ slice []*SchedulingPolicyUnit
}
-func (op *SeLinuxSlice) Href() (string, bool) {
+func (op *SchedulingPolicyUnitSlice) Href() (string, bool) {
if op.href == nil {
return "", false
}
return *op.href, true
}
-func (op *SeLinuxSlice) SetHref(href string) {
+func (op *SchedulingPolicyUnitSlice) SetHref(href string) {
op.href = &href
}
-func (op *SeLinuxSlice) Slice() []*SeLinux {
+func (op *SchedulingPolicyUnitSlice) Slice() []*SchedulingPolicyUnit {
return op.slice
}
-func (op *SeLinuxSlice) SetSlice(slice []*SeLinux) {
+func (op *SchedulingPolicyUnitSlice) SetSlice(slice []*SchedulingPolicyUnit) {
op.slice = slice
}
-type SchedulingPolicyUnitSlice struct {
+type SeLinuxSlice struct {
href *string
- slice []*SchedulingPolicyUnit
+ slice []*SeLinux
}
-func (op *SchedulingPolicyUnitSlice) Href() (string, bool) {
+func (op *SeLinuxSlice) Href() (string, bool) {
if op.href == nil {
return "", false
}
return *op.href, true
}
-func (op *SchedulingPolicyUnitSlice) SetHref(href string) {
+func (op *SeLinuxSlice) SetHref(href string) {
op.href = &href
}
-func (op *SchedulingPolicyUnitSlice) Slice() []*SchedulingPolicyUnit {
+func (op *SeLinuxSlice) Slice() []*SeLinux {
return op.slice
}
-func (op *SchedulingPolicyUnitSlice) SetSlice(slice []*SchedulingPolicyUnit) {
+func (op *SeLinuxSlice) SetSlice(slice []*SeLinux) {
op.slice = slice
}
@@ -45657,6 +45979,30 @@ func (op *UserSlice) SetSlice(slice []*User) {
op.slice = slice
}
+type UserOptionSlice struct {
+ href *string
+ slice []*UserOption
+}
+
+func (op *UserOptionSlice) Href() (string, bool) {
+ if op.href == nil {
+ return "", false
+ }
+ return *op.href, true
+}
+
+func (op *UserOptionSlice) SetHref(href string) {
+ op.href = &href
+}
+
+func (op *UserOptionSlice) Slice() []*UserOption {
+ return op.slice
+}
+
+func (op *UserOptionSlice) SetSlice(slice []*UserOption) {
+ op.slice = slice
+}
+
type ValueSlice struct {
href *string
slice []*Value
@@ -49528,6 +49874,15 @@ func (builder *ClusterBuilder) FencingPolicyBuilder(attrBuilder *FencingPolicyBu
return builder.FencingPolicy(attr)
}
+func (builder *ClusterBuilder) FipsMode(attr FipsMode) *ClusterBuilder {
+ if builder.err != nil {
+ return builder
+ }
+
+ builder.cluster.SetFipsMode(attr)
+ return builder
+}
+
func (builder *ClusterBuilder) FirewallType(attr FirewallType) *ClusterBuilder {
if builder.err != nil {
return builder
@@ -62658,6 +63013,15 @@ func (builder *ImageTransferBuilder) SnapshotBuilder(attrBuilder *DiskSnapshotBu
return builder.Snapshot(attr)
}
+func (builder *ImageTransferBuilder) TimeoutPolicy(attr ImageTransferTimeoutPolicy) *ImageTransferBuilder {
+ if builder.err != nil {
+ return builder
+ }
+
+ builder.imageTransfer.SetTimeoutPolicy(attr)
+ return builder
+}
+
func (builder *ImageTransferBuilder) TransferUrl(attr string) *ImageTransferBuilder {
if builder.err != nil {
return builder
@@ -64173,6 +64537,15 @@ func (builder *InstanceTypeBuilder) VirtioScsiBuilder(attrBuilder *VirtioScsiBui
return builder.VirtioScsi(attr)
}
+func (builder *InstanceTypeBuilder) VirtioScsiMultiQueuesEnabled(attr bool) *InstanceTypeBuilder {
+ if builder.err != nil {
+ return builder
+ }
+
+ builder.instanceType.SetVirtioScsiMultiQueuesEnabled(attr)
+ return builder
+}
+
func (builder *InstanceTypeBuilder) Vm(attr *Vm) *InstanceTypeBuilder {
if builder.err != nil {
return builder
@@ -74608,47 +74981,6 @@ func (builder *SchedulingPolicyBuilder) MustBuild() *SchedulingPolicy {
return builder.schedulingPolicy
}
-type SeLinuxBuilder struct {
- seLinux *SeLinux
- err error
-}
-
-func NewSeLinuxBuilder() *SeLinuxBuilder {
- return &SeLinuxBuilder{seLinux: &SeLinux{}, err: nil}
-}
-
-func (builder *SeLinuxBuilder) Mode(attr SeLinuxMode) *SeLinuxBuilder {
- if builder.err != nil {
- return builder
- }
-
- builder.seLinux.SetMode(attr)
- return builder
-}
-
-func (builder *SeLinuxBuilder) Href(href string) *SeLinuxBuilder {
- if builder.err != nil {
- return builder
- }
-
- builder.seLinux.SetHref(href)
- return builder
-}
-
-func (builder *SeLinuxBuilder) Build() (*SeLinux, error) {
- if builder.err != nil {
- return nil, builder.err
- }
- return builder.seLinux, nil
-}
-
-func (builder *SeLinuxBuilder) MustBuild() *SeLinux {
- if builder.err != nil {
- panic(fmt.Sprintf("Failed to build SeLinux instance, reason: %v", builder.err))
- }
- return builder.seLinux
-}
-
type SchedulingPolicyUnitBuilder struct {
schedulingPolicyUnit *SchedulingPolicyUnit
err error
@@ -74785,6 +75117,47 @@ func (builder *SchedulingPolicyUnitBuilder) MustBuild() *SchedulingPolicyUnit {
return builder.schedulingPolicyUnit
}
+type SeLinuxBuilder struct {
+ seLinux *SeLinux
+ err error
+}
+
+func NewSeLinuxBuilder() *SeLinuxBuilder {
+ return &SeLinuxBuilder{seLinux: &SeLinux{}, err: nil}
+}
+
+func (builder *SeLinuxBuilder) Mode(attr SeLinuxMode) *SeLinuxBuilder {
+ if builder.err != nil {
+ return builder
+ }
+
+ builder.seLinux.SetMode(attr)
+ return builder
+}
+
+func (builder *SeLinuxBuilder) Href(href string) *SeLinuxBuilder {
+ if builder.err != nil {
+ return builder
+ }
+
+ builder.seLinux.SetHref(href)
+ return builder
+}
+
+func (builder *SeLinuxBuilder) Build() (*SeLinux, error) {
+ if builder.err != nil {
+ return nil, builder.err
+ }
+ return builder.seLinux, nil
+}
+
+func (builder *SeLinuxBuilder) MustBuild() *SeLinux {
+ if builder.err != nil {
+ panic(fmt.Sprintf("Failed to build SeLinux instance, reason: %v", builder.err))
+ }
+ return builder.seLinux
+}
+
type SerialNumberBuilder struct {
serialNumber *SerialNumber
err error
@@ -77042,6 +77415,15 @@ func (builder *SnapshotBuilder) VirtioScsiBuilder(attrBuilder *VirtioScsiBuilder
return builder.VirtioScsi(attr)
}
+func (builder *SnapshotBuilder) VirtioScsiMultiQueuesEnabled(attr bool) *SnapshotBuilder {
+ if builder.err != nil {
+ return builder
+ }
+
+ builder.snapshot.SetVirtioScsiMultiQueuesEnabled(attr)
+ return builder
+}
+
func (builder *SnapshotBuilder) Vm(attr *Vm) *SnapshotBuilder {
if builder.err != nil {
return builder
@@ -77364,6 +77746,15 @@ func (builder *SshBuilder) Port(attr int64) *SshBuilder {
return builder
}
+func (builder *SshBuilder) PublicKey(attr string) *SshBuilder {
+ if builder.err != nil {
+ return builder
+ }
+
+ builder.ssh.SetPublicKey(attr)
+ return builder
+}
+
func (builder *SshBuilder) User(attr *User) *SshBuilder {
if builder.err != nil {
return builder
@@ -80904,6 +81295,15 @@ func (builder *TemplateBuilder) VirtioScsiBuilder(attrBuilder *VirtioScsiBuilder
return builder.VirtioScsi(attr)
}
+func (builder *TemplateBuilder) VirtioScsiMultiQueuesEnabled(attr bool) *TemplateBuilder {
+ if builder.err != nil {
+ return builder
+ }
+
+ builder.template.SetVirtioScsiMultiQueuesEnabled(attr)
+ return builder
+}
+
func (builder *TemplateBuilder) Vm(attr *Vm) *TemplateBuilder {
if builder.err != nil {
return builder
@@ -81547,6 +81947,47 @@ func (builder *UserBuilder) Namespace(attr string) *UserBuilder {
return builder
}
+func (builder *UserBuilder) Options(attr *UserOptionSlice) *UserBuilder {
+ if builder.err != nil {
+ return builder
+ }
+
+ builder.user.SetOptions(attr)
+ return builder
+}
+
+func (builder *UserBuilder) OptionsOfAny(anys ...*UserOption) *UserBuilder {
+ if builder.err != nil {
+ return builder
+ }
+
+ if builder.user.options == nil {
+ builder.user.options = new(UserOptionSlice)
+ }
+ builder.user.options.slice = append(builder.user.options.slice, anys...)
+ return builder
+}
+
+func (builder *UserBuilder) OptionsBuilderOfAny(anyBuilders ...UserOptionBuilder) *UserBuilder {
+ if builder.err != nil || len(anyBuilders) == 0 {
+ return builder
+ }
+
+ for _, b := range anyBuilders {
+ if b.err != nil {
+ builder.err = b.err
+ return builder
+ }
+ attr, err := b.Build()
+ if err != nil {
+ builder.err = b.err
+ return builder
+ }
+ builder.OptionsOfAny(attr)
+ }
+ return builder
+}
+
func (builder *UserBuilder) Password(attr string) *UserBuilder {
if builder.err != nil {
return builder
@@ -81802,6 +82243,109 @@ func (builder *UserBuilder) MustBuild() *User {
return builder.user
}
+type UserOptionBuilder struct {
+ userOption *UserOption
+ err error
+}
+
+func NewUserOptionBuilder() *UserOptionBuilder {
+ return &UserOptionBuilder{userOption: &UserOption{}, err: nil}
+}
+
+func (builder *UserOptionBuilder) Comment(attr string) *UserOptionBuilder {
+ if builder.err != nil {
+ return builder
+ }
+
+ builder.userOption.SetComment(attr)
+ return builder
+}
+
+func (builder *UserOptionBuilder) Content(attr string) *UserOptionBuilder {
+ if builder.err != nil {
+ return builder
+ }
+
+ builder.userOption.SetContent(attr)
+ return builder
+}
+
+func (builder *UserOptionBuilder) Description(attr string) *UserOptionBuilder {
+ if builder.err != nil {
+ return builder
+ }
+
+ builder.userOption.SetDescription(attr)
+ return builder
+}
+
+func (builder *UserOptionBuilder) Id(attr string) *UserOptionBuilder {
+ if builder.err != nil {
+ return builder
+ }
+
+ builder.userOption.SetId(attr)
+ return builder
+}
+
+func (builder *UserOptionBuilder) Name(attr string) *UserOptionBuilder {
+ if builder.err != nil {
+ return builder
+ }
+
+ builder.userOption.SetName(attr)
+ return builder
+}
+
+func (builder *UserOptionBuilder) User(attr *User) *UserOptionBuilder {
+ if builder.err != nil {
+ return builder
+ }
+
+ builder.userOption.SetUser(attr)
+ return builder
+}
+
+func (builder *UserOptionBuilder) UserBuilder(attrBuilder *UserBuilder) *UserOptionBuilder {
+ if builder.err != nil {
+ return builder
+ }
+
+ if attrBuilder.err != nil {
+ builder.err = attrBuilder.err
+ return builder
+ }
+ attr, err := attrBuilder.Build()
+ if err != nil {
+ builder.err = err
+ return builder
+ }
+ return builder.User(attr)
+}
+
+func (builder *UserOptionBuilder) Href(href string) *UserOptionBuilder {
+ if builder.err != nil {
+ return builder
+ }
+
+ builder.userOption.SetHref(href)
+ return builder
+}
+
+func (builder *UserOptionBuilder) Build() (*UserOption, error) {
+ if builder.err != nil {
+ return nil, builder.err
+ }
+ return builder.userOption, nil
+}
+
+func (builder *UserOptionBuilder) MustBuild() *UserOption {
+ if builder.err != nil {
+ panic(fmt.Sprintf("Failed to build UserOption instance, reason: %v", builder.err))
+ }
+ return builder.userOption
+}
+
type ValueBuilder struct {
value *Value
err error
@@ -84304,6 +84848,15 @@ func (builder *VmBuilder) VirtioScsiBuilder(attrBuilder *VirtioScsiBuilder) *VmB
return builder.VirtioScsi(attr)
}
+func (builder *VmBuilder) VirtioScsiMultiQueuesEnabled(attr bool) *VmBuilder {
+ if builder.err != nil {
+ return builder
+ }
+
+ builder.vm.SetVirtioScsiMultiQueuesEnabled(attr)
+ return builder
+}
+
func (builder *VmBuilder) VmPool(attr *VmPool) *VmBuilder {
if builder.err != nil {
return builder
@@ -85291,6 +85844,15 @@ func (builder *VmBaseBuilder) VirtioScsiBuilder(attrBuilder *VirtioScsiBuilder)
return builder.VirtioScsi(attr)
}
+func (builder *VmBaseBuilder) VirtioScsiMultiQueuesEnabled(attr bool) *VmBaseBuilder {
+ if builder.err != nil {
+ return builder
+ }
+
+ builder.vmBase.SetVirtioScsiMultiQueuesEnabled(attr)
+ return builder
+}
+
func (builder *VmBaseBuilder) Href(href string) *VmBaseBuilder {
if builder.err != nil {
return builder
@@ -87703,6 +88265,15 @@ func (builder *ActionBuilder) Name(attr string) *ActionBuilder {
return builder
}
+func (builder *ActionBuilder) OptimizeCpuSettings(attr bool) *ActionBuilder {
+ if builder.err != nil {
+ return builder
+ }
+
+ builder.action.SetOptimizeCpuSettings(attr)
+ return builder
+}
+
func (builder *ActionBuilder) Option(attr *Option) *ActionBuilder {
if builder.err != nil {
return builder
@@ -88780,6 +89351,14 @@ const (
FENCETYPE_STOP FenceType = "stop"
)
+type FipsMode string
+
+const (
+ FIPSMODE_DISABLED FipsMode = "disabled"
+ FIPSMODE_ENABLED FipsMode = "enabled"
+ FIPSMODE_UNDEFINED FipsMode = "undefined"
+)
+
type FirewallType string
const (
@@ -88909,6 +89488,14 @@ const (
IMAGETRANSFERPHASE_UNKNOWN ImageTransferPhase = "unknown"
)
+type ImageTransferTimeoutPolicy string
+
+const (
+ IMAGETRANSFERTIMEOUTPOLICY_CANCEL ImageTransferTimeoutPolicy = "cancel"
+ IMAGETRANSFERTIMEOUTPOLICY_LEGACY ImageTransferTimeoutPolicy = "legacy"
+ IMAGETRANSFERTIMEOUTPOLICY_PAUSE ImageTransferTimeoutPolicy = "pause"
+)
+
type InheritableBoolean string
const (
diff --git a/vendor/github.com/ovirt/go-ovirt/writers.go b/vendor/github.com/ovirt/go-ovirt/writers.go
index c53d7d2f30c..01a257bb112 100644
--- a/vendor/github.com/ovirt/go-ovirt/writers.go
+++ b/vendor/github.com/ovirt/go-ovirt/writers.go
@@ -1137,6 +1137,9 @@ func XMLClusterWriteOne(writer *XMLWriter, object *Cluster, tag string) error {
if r, ok := object.FencingPolicy(); ok {
XMLFencingPolicyWriteOne(writer, r, "fencing_policy")
}
+ if r, ok := object.FipsMode(); ok {
+ XMLFipsModeWriteOne(writer, r, "fips_mode")
+ }
if r, ok := object.FirewallType(); ok {
XMLFirewallTypeWriteOne(writer, r, "firewall_type")
}
@@ -5038,6 +5041,9 @@ func XMLImageTransferWriteOne(writer *XMLWriter, object *ImageTransfer, tag stri
if r, ok := object.Snapshot(); ok {
XMLDiskSnapshotWriteOne(writer, r, "snapshot")
}
+ if r, ok := object.TimeoutPolicy(); ok {
+ XMLImageTransferTimeoutPolicyWriteOne(writer, r, "timeout_policy")
+ }
if r, ok := object.TransferUrl(); ok {
writer.WriteCharacter("transfer_url", r)
}
@@ -5330,6 +5336,9 @@ func XMLInstanceTypeWriteOne(writer *XMLWriter, object *InstanceType, tag string
if r, ok := object.VirtioScsi(); ok {
XMLVirtioScsiWriteOne(writer, r, "virtio_scsi")
}
+ if r, ok := object.VirtioScsiMultiQueuesEnabled(); ok {
+ writer.WriteBool("virtio_scsi_multi_queues_enabled", r)
+ }
if r, ok := object.Vm(); ok {
XMLVmWriteOne(writer, r, "vm")
}
@@ -8981,36 +8990,6 @@ func XMLSchedulingPolicyWriteMany(writer *XMLWriter, structSlice *SchedulingPoli
return nil
}
-func XMLSeLinuxWriteOne(writer *XMLWriter, object *SeLinux, tag string) error {
- if object == nil {
- return fmt.Errorf("input object pointer is nil")
- }
- if tag == "" {
- tag = "se_linux"
- }
- writer.WriteStart("", tag, nil)
- if r, ok := object.Mode(); ok {
- XMLSeLinuxModeWriteOne(writer, r, "mode")
- }
- writer.WriteEnd(tag)
- return nil
-}
-
-func XMLSeLinuxWriteMany(writer *XMLWriter, structSlice *SeLinuxSlice, plural, singular string) error {
- if plural == "" {
- plural = "se_linuxs"
- }
- if singular == "" {
- singular = "se_linux"
- }
- writer.WriteStart("", plural, nil)
- for _, o := range structSlice.Slice() {
- XMLSeLinuxWriteOne(writer, o, singular)
- }
- writer.WriteEnd(plural)
- return nil
-}
-
func XMLSchedulingPolicyUnitWriteOne(writer *XMLWriter, object *SchedulingPolicyUnit, tag string) error {
if object == nil {
return fmt.Errorf("input object pointer is nil")
@@ -9066,6 +9045,36 @@ func XMLSchedulingPolicyUnitWriteMany(writer *XMLWriter, structSlice *Scheduling
return nil
}
+func XMLSeLinuxWriteOne(writer *XMLWriter, object *SeLinux, tag string) error {
+ if object == nil {
+ return fmt.Errorf("input object pointer is nil")
+ }
+ if tag == "" {
+ tag = "se_linux"
+ }
+ writer.WriteStart("", tag, nil)
+ if r, ok := object.Mode(); ok {
+ XMLSeLinuxModeWriteOne(writer, r, "mode")
+ }
+ writer.WriteEnd(tag)
+ return nil
+}
+
+func XMLSeLinuxWriteMany(writer *XMLWriter, structSlice *SeLinuxSlice, plural, singular string) error {
+ if plural == "" {
+ plural = "se_linuxs"
+ }
+ if singular == "" {
+ singular = "se_linux"
+ }
+ writer.WriteStart("", plural, nil)
+ for _, o := range structSlice.Slice() {
+ XMLSeLinuxWriteOne(writer, o, singular)
+ }
+ writer.WriteEnd(plural)
+ return nil
+}
+
func XMLSerialNumberWriteOne(writer *XMLWriter, object *SerialNumber, tag string) error {
if object == nil {
return fmt.Errorf("input object pointer is nil")
@@ -9490,6 +9499,9 @@ func XMLSnapshotWriteOne(writer *XMLWriter, object *Snapshot, tag string) error
if r, ok := object.VirtioScsi(); ok {
XMLVirtioScsiWriteOne(writer, r, "virtio_scsi")
}
+ if r, ok := object.VirtioScsiMultiQueuesEnabled(); ok {
+ writer.WriteBool("virtio_scsi_multi_queues_enabled", r)
+ }
if r, ok := object.Vm(); ok {
XMLVmWriteOne(writer, r, "vm")
}
@@ -9617,6 +9629,9 @@ func XMLSshWriteOne(writer *XMLWriter, object *Ssh, tag string) error {
if r, ok := object.Port(); ok {
writer.WriteInt64("port", r)
}
+ if r, ok := object.PublicKey(); ok {
+ writer.WriteCharacter("public_key", r)
+ }
if r, ok := object.User(); ok {
XMLUserWriteOne(writer, r, "user")
}
@@ -10499,6 +10514,9 @@ func XMLTemplateWriteOne(writer *XMLWriter, object *Template, tag string) error
if r, ok := object.VirtioScsi(); ok {
XMLVirtioScsiWriteOne(writer, r, "virtio_scsi")
}
+ if r, ok := object.VirtioScsiMultiQueuesEnabled(); ok {
+ writer.WriteBool("virtio_scsi_multi_queues_enabled", r)
+ }
if r, ok := object.Vm(); ok {
XMLVmWriteOne(writer, r, "vm")
}
@@ -10786,6 +10804,9 @@ func XMLUserWriteOne(writer *XMLWriter, object *User, tag string) error {
if r, ok := object.Namespace(); ok {
writer.WriteCharacter("namespace", r)
}
+ if r, ok := object.Options(); ok {
+ XMLUserOptionWriteMany(writer, r, "options", "user_option")
+ }
if r, ok := object.Password(); ok {
writer.WriteCharacter("password", r)
}
@@ -10829,6 +10850,55 @@ func XMLUserWriteMany(writer *XMLWriter, structSlice *UserSlice, plural, singula
return nil
}
+func XMLUserOptionWriteOne(writer *XMLWriter, object *UserOption, tag string) error {
+ if object == nil {
+ return fmt.Errorf("input object pointer is nil")
+ }
+ if tag == "" {
+ tag = "user_option"
+ }
+ var attrs map[string]string
+ if r, ok := object.Id(); ok {
+ if attrs == nil {
+ attrs = make(map[string]string)
+ }
+ attrs["id"] = r
+ }
+ writer.WriteStart("", tag, attrs)
+ if r, ok := object.Comment(); ok {
+ writer.WriteCharacter("comment", r)
+ }
+ if r, ok := object.Content(); ok {
+ writer.WriteCharacter("content", r)
+ }
+ if r, ok := object.Description(); ok {
+ writer.WriteCharacter("description", r)
+ }
+ if r, ok := object.Name(); ok {
+ writer.WriteCharacter("name", r)
+ }
+ if r, ok := object.User(); ok {
+ XMLUserWriteOne(writer, r, "user")
+ }
+ writer.WriteEnd(tag)
+ return nil
+}
+
+func XMLUserOptionWriteMany(writer *XMLWriter, structSlice *UserOptionSlice, plural, singular string) error {
+ if plural == "" {
+ plural = "user_options"
+ }
+ if singular == "" {
+ singular = "user_option"
+ }
+ writer.WriteStart("", plural, nil)
+ for _, o := range structSlice.Slice() {
+ XMLUserOptionWriteOne(writer, o, singular)
+ }
+ writer.WriteEnd(plural)
+ return nil
+}
+
func XMLValueWriteOne(writer *XMLWriter, object *Value, tag string) error {
if object == nil {
return fmt.Errorf("input object pointer is nil")
@@ -11385,6 +11455,9 @@ func XMLVmWriteOne(writer *XMLWriter, object *Vm, tag string) error {
if r, ok := object.VirtioScsi(); ok {
XMLVirtioScsiWriteOne(writer, r, "virtio_scsi")
}
+ if r, ok := object.VirtioScsiMultiQueuesEnabled(); ok {
+ writer.WriteBool("virtio_scsi_multi_queues_enabled", r)
+ }
if r, ok := object.VmPool(); ok {
XMLVmPoolWriteOne(writer, r, "vm_pool")
}
@@ -11560,6 +11633,9 @@ func XMLVmBaseWriteOne(writer *XMLWriter, object *VmBase, tag string) error {
if r, ok := object.VirtioScsi(); ok {
XMLVirtioScsiWriteOne(writer, r, "virtio_scsi")
}
+ if r, ok := object.VirtioScsiMultiQueuesEnabled(); ok {
+ writer.WriteBool("virtio_scsi_multi_queues_enabled", r)
+ }
writer.WriteEnd(tag)
return nil
}
@@ -12256,6 +12332,9 @@ func XMLActionWriteOne(writer *XMLWriter, object *Action, tag string) error {
if r, ok := object.Name(); ok {
writer.WriteCharacter("name", r)
}
+ if r, ok := object.OptimizeCpuSettings(); ok {
+ writer.WriteBool("optimize_cpu_settings", r)
+ }
if r, ok := object.Option(); ok {
XMLOptionWriteOne(writer, r, "option")
}
@@ -13077,6 +13156,28 @@ func XMLFenceTypeWriteMany(writer *XMLWriter, enums []FenceType, plural, singula
return nil
}
+func XMLFipsModeWriteOne(writer *XMLWriter, enum FipsMode, tag string) {
+ if tag == "" {
+ tag = "fips_mode"
+ }
+ writer.WriteCharacter(tag, string(enum))
+}
+
+func XMLFipsModeWriteMany(writer *XMLWriter, enums []FipsMode, plural, singular string) error {
+ if plural == "" {
+ plural = "fips_modes"
+ }
+ if singular == "" {
+ singular = "fips_mode"
+ }
+ writer.WriteStart("", plural, nil)
+ for _, e := range enums {
+ writer.WriteCharacter(singular, string(e))
+ }
+ writer.WriteEnd(plural)
+ return nil
+}
+
func XMLFirewallTypeWriteOne(writer *XMLWriter, enum FirewallType, tag string) {
if tag == "" {
tag = "firewall_type"
@@ -13363,6 +13464,28 @@ func XMLImageTransferPhaseWriteMany(writer *XMLWriter, enums []ImageTransferPhas
return nil
}
+func XMLImageTransferTimeoutPolicyWriteOne(writer *XMLWriter, enum ImageTransferTimeoutPolicy, tag string) {
+ if tag == "" {
+ tag = "image_transfer_timeout_policy"
+ }
+ writer.WriteCharacter(tag, string(enum))
+}
+
+func XMLImageTransferTimeoutPolicyWriteMany(writer *XMLWriter, enums []ImageTransferTimeoutPolicy, plural, singular string) error {
+ if plural == "" {
+ plural = "image_transfer_timeout_policies"
+ }
+ if singular == "" {
+ singular = "image_transfer_timeout_policy"
+ }
+ writer.WriteStart("", plural, nil)
+ for _, e := range enums {
+ writer.WriteCharacter(singular, string(e))
+ }
+ writer.WriteEnd(plural)
+ return nil
+}
+
func XMLInheritableBooleanWriteOne(writer *XMLWriter, enum InheritableBoolean, tag string) {
if tag == "" {
tag = "inheritable_boolean"
diff --git a/vendor/github.com/polyfloyd/go-errorlint/LICENSE b/vendor/github.com/polyfloyd/go-errorlint/LICENSE
new file mode 100644
index 00000000000..b7f88cf1c21
--- /dev/null
+++ b/vendor/github.com/polyfloyd/go-errorlint/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2019 polyfloyd
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+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.
diff --git a/vendor/github.com/polyfloyd/go-errorlint/errorlint/analysis.go b/vendor/github.com/polyfloyd/go-errorlint/errorlint/analysis.go
new file mode 100644
index 00000000000..20d1c1e7cb5
--- /dev/null
+++ b/vendor/github.com/polyfloyd/go-errorlint/errorlint/analysis.go
@@ -0,0 +1,44 @@
+package errorlint
+
+import (
+ "flag"
+ "sort"
+
+ "golang.org/x/tools/go/analysis"
+)
+
+func NewAnalyzer() *analysis.Analyzer {
+ return &analysis.Analyzer{
+ Name: "errorlint",
+ Doc: "Source code linter for Go software that can be used to find code that will cause problems with the error wrapping scheme introduced in Go 1.13.",
+ Run: run,
+ Flags: flagSet,
+ }
+}
+
+var (
+ flagSet flag.FlagSet
+ checkErrorf bool
+)
+
+func init() {
+ flagSet.BoolVar(&checkErrorf, "errorf", false, "Check whether fmt.Errorf uses the %w verb for formatting errors. See the readme for caveats")
+}
+
+func run(pass *analysis.Pass) (interface{}, error) {
+ lints := []Lint{}
+ if checkErrorf {
+ l := LintFmtErrorfCalls(pass.Fset, *pass.TypesInfo)
+ lints = append(lints, l...)
+ }
+ l := LintErrorComparisons(pass.Fset, *pass.TypesInfo)
+ lints = append(lints, l...)
+ l = LintErrorTypeAssertions(pass.Fset, *pass.TypesInfo)
+ lints = append(lints, l...)
+ sort.Sort(ByPosition(lints))
+
+ for _, l := range lints {
+ pass.Report(analysis.Diagnostic{Pos: l.Pos, Message: l.Message})
+ }
+ return nil, nil
+}
diff --git a/vendor/github.com/polyfloyd/go-errorlint/errorlint/lint.go b/vendor/github.com/polyfloyd/go-errorlint/errorlint/lint.go
new file mode 100644
index 00000000000..fcf506c6172
--- /dev/null
+++ b/vendor/github.com/polyfloyd/go-errorlint/errorlint/lint.go
@@ -0,0 +1,233 @@
+package errorlint
+
+import (
+ "fmt"
+ "go/ast"
+ "go/constant"
+ "go/token"
+ "go/types"
+ "regexp"
+)
+
+type Lint struct {
+ Message string
+ Pos token.Pos
+}
+
+type ByPosition []Lint
+
+func (l ByPosition) Len() int { return len(l) }
+func (l ByPosition) Swap(i, j int) { l[i], l[j] = l[j], l[i] }
+
+func (l ByPosition) Less(i, j int) bool {
+ return l[i].Pos < l[j].Pos
+}
+
+func LintFmtErrorfCalls(fset *token.FileSet, info types.Info) []Lint {
+ lints := []Lint{}
+ for expr, t := range info.Types {
+ // Search for error expressions that are the result of fmt.Errorf
+ // invocations.
+ if t.Type.String() != "error" {
+ continue
+ }
+ call, ok := isFmtErrorfCallExpr(info, expr)
+ if !ok {
+ continue
+ }
+
+ // Find all % fields in the format string.
+ formatVerbs, ok := printfFormatStringVerbs(info, call)
+ if !ok {
+ continue
+ }
+ // For all arguments that are errors, check whether the wrapping verb
+ // is used.
+ for i, arg := range call.Args[1:] {
+ if info.Types[arg].Type.String() != "error" && !isErrorStringCall(info, arg) {
+ continue
+ }
+
+ if len(formatVerbs) >= i && formatVerbs[i] != "%w" {
+ lints = append(lints, Lint{
+ Message: "non-wrapping format verb for fmt.Errorf. Use `%w` to format errors",
+ Pos: arg.Pos(),
+ })
+ }
+ }
+ }
+ return lints
+}
+
+// isErrorStringCall tests whether the expression is a string expression that
+// is the result of an `(error).Error()` method call.
+func isErrorStringCall(info types.Info, expr ast.Expr) bool {
+ if info.Types[expr].Type.String() == "string" {
+ if call, ok := expr.(*ast.CallExpr); ok {
+ if callSel, ok := call.Fun.(*ast.SelectorExpr); ok {
+ fun := info.Uses[callSel.Sel].(*types.Func)
+ return fun.Type().String() == "func() string" && fun.Name() == "Error"
+ }
+ }
+ }
+ return false
+}
+
+func printfFormatStringVerbs(info types.Info, call *ast.CallExpr) ([]string, bool) {
+ if len(call.Args) <= 1 {
+ return nil, false
+ }
+ strLit, ok := call.Args[0].(*ast.BasicLit)
+ if !ok {
+ // Ignore format strings that are not literals.
+ return nil, false
+ }
+ formatString := constant.StringVal(info.Types[strLit].Value)
+
+ // Naive format string argument verb. This does not take modifiers such as
+ // padding into account...
+ re := regexp.MustCompile(`%[^%]`)
+ return re.FindAllString(formatString, -1), true
+}
+
+func isFmtErrorfCallExpr(info types.Info, expr ast.Expr) (*ast.CallExpr, bool) {
+ call, ok := expr.(*ast.CallExpr)
+ if !ok {
+ return nil, false
+ }
+ fn, ok := call.Fun.(*ast.SelectorExpr)
+ if !ok {
+ // TODO: Support fmt.Errorf variable aliases?
+ return nil, false
+ }
+ obj := info.Uses[fn.Sel]
+
+ pkg := obj.Pkg()
+ if pkg != nil && pkg.Name() == "fmt" && obj.Name() == "Errorf" {
+ return call, true
+ }
+ return nil, false
+}
+
+func LintErrorComparisons(fset *token.FileSet, info types.Info) []Lint {
+ lints := []Lint{}
+
+ for expr := range info.Types {
+ // Find == and != operations.
+ binExpr, ok := expr.(*ast.BinaryExpr)
+ if !ok {
+ continue
+ }
+ if binExpr.Op != token.EQL && binExpr.Op != token.NEQ {
+ continue
+ }
+ // Comparing errors with nil is okay.
+ if isNilComparison(binExpr) {
+ continue
+ }
+ // Find comparisons of which one side is a of type error.
+ if !isErrorComparison(info, binExpr) {
+ continue
+ }
+
+ lints = append(lints, Lint{
+ Message: fmt.Sprintf("comparing with %s will fail on wrapped errors. Use errors.Is to check for a specific error", binExpr.Op),
+ Pos: binExpr.Pos(),
+ })
+ }
+
+ for scope := range info.Scopes {
+ // Find value switch blocks.
+ switchStmt, ok := scope.(*ast.SwitchStmt)
+ if !ok {
+ continue
+ }
+ // Check whether the switch operates on an error type.
+ if switchStmt.Tag == nil {
+ continue
+ }
+ tagType := info.Types[switchStmt.Tag]
+ if tagType.Type.String() != "error" {
+ continue
+ }
+
+ lints = append(lints, Lint{
+ Message: "switch on an error will fail on wrapped errors. Use errors.Is to check for specific errors",
+ Pos: switchStmt.Pos(),
+ })
+ }
+
+ return lints
+}
+
+func isNilComparison(binExpr *ast.BinaryExpr) bool {
+ if ident, ok := binExpr.X.(*ast.Ident); ok && ident.Name == "nil" {
+ return true
+ }
+ if ident, ok := binExpr.Y.(*ast.Ident); ok && ident.Name == "nil" {
+ return true
+ }
+ return false
+}
+
+func isErrorComparison(info types.Info, binExpr *ast.BinaryExpr) bool {
+ tx := info.Types[binExpr.X]
+ ty := info.Types[binExpr.Y]
+ return tx.Type.String() == "error" || ty.Type.String() == "error"
+}
+
+func LintErrorTypeAssertions(fset *token.FileSet, info types.Info) []Lint {
+ lints := []Lint{}
+
+ for expr := range info.Types {
+ // Find type assertions.
+ typeAssert, ok := expr.(*ast.TypeAssertExpr)
+ if !ok {
+ continue
+ }
+
+ // Find type assertions that operate on values of type error.
+ if !isErrorTypeAssertion(info, typeAssert) {
+ continue
+ }
+
+ lints = append(lints, Lint{
+ Message: "type assertion on error will fail on wrapped errors. Use errors.As to check for specific errors",
+ Pos: typeAssert.Pos(),
+ })
+ }
+
+ for scope := range info.Scopes {
+ // Find type switches.
+ typeSwitch, ok := scope.(*ast.TypeSwitchStmt)
+ if !ok {
+ continue
+ }
+
+ // Find the type assertion in the type switch.
+ var typeAssert *ast.TypeAssertExpr
+ switch t := typeSwitch.Assign.(type) {
+ case *ast.ExprStmt:
+ typeAssert = t.X.(*ast.TypeAssertExpr)
+ case *ast.AssignStmt:
+ typeAssert = t.Rhs[0].(*ast.TypeAssertExpr)
+ }
+
+ // Check whether the type switch is on a value of type error.
+ if !isErrorTypeAssertion(info, typeAssert) {
+ continue
+ }
+
+ lints = append(lints, Lint{
+ Message: "type switch on error will fail on wrapped errors. Use errors.As to check for specific errors",
+ Pos: typeAssert.Pos(),
+ })
+ }
+
+ return lints
+}
+
+func isErrorTypeAssertion(info types.Info, typeAssert *ast.TypeAssertExpr) bool {
+ t := info.Types[typeAssert.X]
+ return t.Type.String() == "error"
+}
diff --git a/vendor/github.com/sourcegraph/go-diff/diff/parse.go b/vendor/github.com/sourcegraph/go-diff/diff/parse.go
index 674350230ee..8d5cfc238ec 100644
--- a/vendor/github.com/sourcegraph/go-diff/diff/parse.go
+++ b/vendor/github.com/sourcegraph/go-diff/diff/parse.go
@@ -61,6 +61,7 @@ func (r *MultiFileDiffReader) ReadFile() (*FileDiff, error) {
if e.Err == ErrNoFileHeader || e.Err == ErrExtendedHeadersEOF {
return nil, io.EOF
}
+ return nil, err
case OverflowError:
r.nextFileFirstLine = []byte(e)
@@ -513,9 +514,22 @@ func (r *HunksReader) ReadHunk() (*Hunk, error) {
r.hunk.Section = section
} else {
// Read hunk body line.
+
+ // If the line starts with `---` and the next one with `+++` we're
+ // looking at a non-extended file header and need to abort.
+ if bytes.HasPrefix(line, []byte("---")) {
+ ok, err := peekPrefix(r.reader, "+++")
+ if err != nil {
+ return r.hunk, err
+ }
+ if ok {
+ return r.hunk, &ParseError{r.line, r.offset, &ErrBadHunkLine{Line: line}}
+ }
+ }
+
+ // If the line starts with the hunk prefix, this hunk is complete.
if bytes.HasPrefix(line, hunkPrefix) {
- // Saw start of new hunk, so this hunk is
- // complete. But we've already read in the next hunk's
+ // But we've already read in the next hunk's
// header, so we need to be sure that the next call to
// ReadHunk starts with that header.
r.nextHunkHeaderLine = line
@@ -527,7 +541,7 @@ func (r *HunksReader) ReadHunk() (*Hunk, error) {
return r.hunk, nil
}
- if len(line) >= 1 && (!linePrefix(line[0]) || bytes.HasPrefix(line, []byte("--- "))) {
+ if len(line) >= 1 && !linePrefix(line[0]) {
// Bad hunk header line. If we're reading a multi-file
// diff, this may be the end of the current
// file. Return a "rich" error that lets our caller
@@ -579,6 +593,19 @@ func linePrefix(c byte) bool {
return false
}
+// peekPrefix peeks into the given reader to check whether the next
+// bytes match the given prefix.
+func peekPrefix(reader *bufio.Reader, prefix string) (bool, error) {
+ next, err := reader.Peek(len(prefix))
+ if err != nil {
+ if err == io.EOF {
+ return false, nil
+ }
+ return false, err
+ }
+ return bytes.HasPrefix(next, []byte(prefix)), nil
+}
+
// normalizeHeader takes a header of the form:
// "@@ -linestart[,chunksize] +linestart[,chunksize] @@ section"
// and returns two strings, with the first in the form:
diff --git a/vendor/github.com/tetafro/godot/godot.go b/vendor/github.com/tetafro/godot/godot.go
index 81211d72585..29e94d98afe 100644
--- a/vendor/github.com/tetafro/godot/godot.go
+++ b/vendor/github.com/tetafro/godot/godot.go
@@ -49,8 +49,8 @@ var (
// Special tags in comments like "// nolint:", or "// +k8s:".
tags = regexp.MustCompile(`^\+?[a-z0-9]+:`)
- // Special hashtags in comments like "#nosec".
- hashtags = regexp.MustCompile("^#[a-z]+ ")
+ // Special hashtags in comments like "// #nosec".
+ hashtags = regexp.MustCompile(`^#[a-z]+($|\s)`)
// URL at the end of the line.
endURL = regexp.MustCompile(`[a-z]+://[^\s]+$`)
@@ -138,33 +138,6 @@ func sortIssues(iss []Issue) {
})
}
-// checkTopLevel checks all top-level comments.
-func checkTopLevel(file *ast.File, fset *token.FileSet) (issues []Issue) {
- for _, group := range file.Comments {
- if iss, ok := check(fset, group, topLevelColumn); !ok {
- issues = append(issues, iss)
- }
- }
- return issues
-}
-
-// checkDeclarations checks top level declaration comments.
-func checkDeclarations(file *ast.File, fset *token.FileSet) (issues []Issue) {
- for _, decl := range file.Decls {
- switch d := decl.(type) {
- case *ast.GenDecl:
- if iss, ok := check(fset, d.Doc, topLevelColumn); !ok {
- issues = append(issues, iss)
- }
- case *ast.FuncDecl:
- if iss, ok := check(fset, d.Doc, topLevelColumn); !ok {
- issues = append(issues, iss)
- }
- }
- }
- return issues
-}
-
// checkBlocks checks comments inside top level blocks (var (...), const (...), etc).
func checkBlocks(file *ast.File, fset *token.FileSet) (issues []Issue) {
for _, decl := range file.Decls {
@@ -193,6 +166,33 @@ func checkBlocks(file *ast.File, fset *token.FileSet) (issues []Issue) {
return issues
}
+// checkTopLevel checks all top-level comments.
+func checkTopLevel(file *ast.File, fset *token.FileSet) (issues []Issue) {
+ for _, group := range file.Comments {
+ if iss, ok := check(fset, group, topLevelColumn); !ok {
+ issues = append(issues, iss)
+ }
+ }
+ return issues
+}
+
+// checkDeclarations checks top level declaration comments.
+func checkDeclarations(file *ast.File, fset *token.FileSet) (issues []Issue) {
+ for _, decl := range file.Decls {
+ switch d := decl.(type) {
+ case *ast.GenDecl:
+ if iss, ok := check(fset, d.Doc, topLevelColumn); !ok {
+ issues = append(issues, iss)
+ }
+ case *ast.FuncDecl:
+ if iss, ok := check(fset, d.Doc, topLevelColumn); !ok {
+ issues = append(issues, iss)
+ }
+ }
+ }
+ return issues
+}
+
func check(fset *token.FileSet, group *ast.CommentGroup, level int) (iss Issue, ok bool) {
if group == nil || len(group.List) == 0 {
return Issue{}, true
@@ -275,7 +275,7 @@ func checkLastChar(s string) bool {
return true
}
// Skip cgo export tags: https://golang.org/cmd/cgo/#hdr-C_references_to_Go
- if strings.HasPrefix(s, "export") {
+ if strings.HasPrefix(s, "export ") {
return true
}
s = strings.TrimSpace(s)
@@ -291,6 +291,11 @@ func checkLastChar(s string) bool {
}
// Trim parenthesis for cases when the whole sentence is inside parenthesis
s = strings.TrimRight(s, ")")
+ // Don't panic when comment looks like this: `// )`
+ // TODO: Check previous line (which is not available in this function right now)
+ if len(s) == 0 {
+ return true
+ }
for _, ch := range lastChars {
if string(s[len(s)-1]) == ch {
return true
diff --git a/vendor/github.com/tomarrell/wrapcheck/LICENSE b/vendor/github.com/tomarrell/wrapcheck/LICENSE
new file mode 100644
index 00000000000..b5d9d30d385
--- /dev/null
+++ b/vendor/github.com/tomarrell/wrapcheck/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2020 Tom Arrell
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+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.
diff --git a/vendor/github.com/tomarrell/wrapcheck/wrapcheck/wrapcheck.go b/vendor/github.com/tomarrell/wrapcheck/wrapcheck/wrapcheck.go
new file mode 100644
index 00000000000..e249a7ed25f
--- /dev/null
+++ b/vendor/github.com/tomarrell/wrapcheck/wrapcheck/wrapcheck.go
@@ -0,0 +1,226 @@
+package wrapcheck
+
+import (
+ "go/ast"
+ "go/types"
+
+ "golang.org/x/tools/go/analysis"
+)
+
+var ignoredIDs = []string{
+ "func fmt.Errorf(format string, a ...interface{}) error",
+ "func errors.New(text string) error",
+ "func errors.Unwrap(err error) error",
+}
+
+var Analyzer = &analysis.Analyzer{
+ Name: "wrapcheck",
+ Doc: "Checks that errors returned from external packages are wrapped",
+ Run: run,
+}
+
+func run(pass *analysis.Pass) (interface{}, error) {
+ for _, file := range pass.Files {
+ ast.Inspect(file, func(n ast.Node) bool {
+ if _, ok := n.(*ast.AssignStmt); ok {
+ return true
+ }
+
+ ret, ok := n.(*ast.ReturnStmt)
+ if !ok {
+ return true
+ }
+
+ if len(ret.Results) < 1 {
+ return true
+ }
+
+ // Iterate over the values to be returned looking for errors
+ for _, expr := range ret.Results {
+ if !isError(pass.TypesInfo.TypeOf(expr)) {
+ continue
+ }
+
+ ident, ok := expr.(*ast.Ident)
+ if !ok {
+ return true
+ }
+
+ var (
+ call *ast.CallExpr
+ )
+
+ // Attempt to find the most recent short assign
+ if shortAss := prevErrAssign(pass, file, ident); shortAss != nil {
+ call, ok = shortAss.Rhs[0].(*ast.CallExpr)
+ if !ok {
+ return true
+ }
+ } else if isUnresolved(file, ident) {
+ // TODO Check if the identifier is unresolved, and try to resolve it in
+ // another file.
+ return true
+ } else {
+ // Check for ValueSpec nodes in order to locate a possible var
+ // declaration.
+ if ident.Obj == nil {
+ return true
+ }
+
+ vSpec, ok := ident.Obj.Decl.(*ast.ValueSpec)
+ if !ok {
+ // We couldn't find a short or var assign for this error return.
+ // This is an error. Where did this identifier come from? Possibly a
+ // function param.
+ //
+ // TODO decide how to handle this case, whether to follow function
+ // param back, or assert wrapping at call site.
+
+ return true
+ }
+
+ if len(vSpec.Values) < 1 {
+ return true
+ }
+
+ call, ok = vSpec.Values[0].(*ast.CallExpr)
+ if !ok {
+ return true
+ }
+ }
+
+ // Make sure there is a call identified as producing the error being
+ // returned, otherwise just bail
+ if call == nil {
+ return true
+ }
+
+ sel, ok := call.Fun.(*ast.SelectorExpr)
+ if !ok {
+ return true
+ }
+
+ // Check if the underlying type of the "x" in x.y.z is an interface, as
+ // errors returned from interface types should be wrapped.
+ if isInterface(pass, sel, ident) {
+ pass.Reportf(ident.NamePos, "error returned from interface method should be wrapped")
+ return true
+ }
+
+ // Check whether the function being called comes from another package,
+ // as functions called across package boundaries which returns errors
+ // should be wrapped
+ if isFromOtherPkg(pass, sel, ident) {
+ pass.Reportf(ident.NamePos, "error returned from external package is unwrapped")
+ return true
+ }
+ }
+
+ return true
+ })
+ }
+
+ return nil, nil
+}
+
+// isInterface returns whether the function call is one defined on an interface.
+func isInterface(pass *analysis.Pass, sel *ast.SelectorExpr, ident *ast.Ident) bool {
+ _, ok := pass.TypesInfo.TypeOf(sel.X).Underlying().(*types.Interface)
+
+ return ok
+}
+
+func isFromOtherPkg(pass *analysis.Pass, sel *ast.SelectorExpr, ident *ast.Ident) bool {
+ // The package of the function that we are calling which returns the error
+ fn := pass.TypesInfo.ObjectOf(sel.Sel)
+
+ // If it's not a package name, then we should check the selector to make sure
+ // that it's an identifier from the same package
+ if pass.Pkg.Path() == fn.Pkg().Path() {
+ return false
+ } else if contains(ignoredIDs, fn.String()) {
+ return false
+ }
+
+ return true
+}
+
+// prevErrAssign traverses the AST of a file looking for the most recent
+// assignment to an error declaration which is specified by the returnIdent
+// identifier.
+//
+// This only returns short form assignments and reassignments, e.g. `:=` and
+// `=`. This does not include `var` statements. This function will return nil if
+// the only declaration is a `var` (aka ValueSpec) declaration.
+func prevErrAssign(pass *analysis.Pass, file *ast.File, returnIdent *ast.Ident) *ast.AssignStmt {
+ // A slice containing all the assignments which contain an identifer
+ // referring to the source declaration of the error. This is to catch
+ // cases where err is defined once, and then reassigned multiple times
+ // within the same block. In these cases, we should check the method of
+ // the most recent call.
+ var assigns []*ast.AssignStmt
+
+ // Find all assignments which have the same declaration
+ ast.Inspect(file, func(n ast.Node) bool {
+ if ass, ok := n.(*ast.AssignStmt); ok {
+ for _, expr := range ass.Lhs {
+ if !isError(pass.TypesInfo.TypeOf(expr)) {
+ continue
+ }
+ if assIdent, ok := expr.(*ast.Ident); ok {
+ if assIdent.Obj == nil || returnIdent.Obj == nil {
+ // If we can't find the Obj for one of the identifiers, just skip
+ // it.
+ return true
+ } else if assIdent.Obj.Decl == returnIdent.Obj.Decl {
+ assigns = append(assigns, ass)
+ }
+ }
+ }
+ }
+
+ return true
+ })
+
+ // Iterate through the assignments, comparing the token positions to
+ // find the assignment that directly precedes the return position
+ var mostRecentAssign *ast.AssignStmt
+
+ for _, ass := range assigns {
+ if ass.Pos() > returnIdent.Pos() {
+ break
+ }
+ mostRecentAssign = ass
+ }
+
+ return mostRecentAssign
+}
+
+func contains(slice []string, el string) bool {
+ for _, s := range slice {
+ if s == el {
+ return true
+ }
+ }
+
+ return false
+}
+
+// isError returns whether or not the provided type interface is an error
+func isError(typ types.Type) bool {
+ if typ == nil {
+ return false
+ }
+
+ return typ.String() == "error"
+}
+
+func isUnresolved(file *ast.File, ident *ast.Ident) bool {
+ for _, unresolvedIdent := range file.Unresolved {
+ if unresolvedIdent.Pos() == ident.Pos() {
+ return true
+ }
+ }
+
+ return false
+}
diff --git a/vendor/github.com/vmware/govmomi/.mailmap b/vendor/github.com/vmware/govmomi/.mailmap
index 5eab201ed95..057bc427c3c 100644
--- a/vendor/github.com/vmware/govmomi/.mailmap
+++ b/vendor/github.com/vmware/govmomi/.mailmap
@@ -1,12 +1,16 @@
-Amanda H. L. de Andrade amandahla
Amanda H. L. de Andrade Amanda Hager Lopes de Andrade Katz
+Amanda H. L. de Andrade amandahla
Amit Bathla
-Andrew Kutz akutz
Andrew Kutz
Andrew Kutz Andrew Kutz <101085+akutz@users.noreply.github.com>
+Andrew Kutz akutz
+Anfernee Yongkun Gui
+Anfernee Yongkun Gui Yongkun Anfernee Gui
+Anna Carrigan Anna
+Balu Dontu BaluDontu
Bruce Downs
-Bruce Downs
Bruce Downs
+Bruce Downs
Clint Greenwood
Cédric Blomart
Cédric Blomart cedric
@@ -14,17 +18,21 @@ David Stark
Eric Gray
Eric Yutao eric
Fabio Rapposelli
+Faiyaz Ahmed Faiyaz Ahmed
+Faiyaz Ahmed Faiyaz Ahmed
+Faiyaz Ahmed Faiyaz Ahmed
Henrik Hodne
Jeremy Canady
+Jiatong Wang jiatongw
+Lintong Jiang lintongj <55512168+lintongj@users.noreply.github.com>
Pieter Noordhuis
Takaaki Furukawa takaaki.furukawa
Takaaki Furukawa tkak
+Uwe Bessle Uwe Bessle
+Uwe Bessle Uwe Bessle
Vadim Egorov
-Anfernee Yongkun Gui
-Anfernee Yongkun Gui Yongkun Anfernee Gui
Zach Tucker
Zee Yang
-Jiatong Wang jiatongw
-Uwe Bessle Uwe Bessle
-Uwe Bessle Uwe Bessle
-Lintong Jiang lintongj <55512168+lintongj@users.noreply.github.com>
+Ian Eyberg
+Parveen Chahal
+Yun Zhou <41678287+gh05tn0va@users.noreply.github.com>
diff --git a/vendor/github.com/vmware/govmomi/.travis.yml b/vendor/github.com/vmware/govmomi/.travis.yml
index b9f5ba2fa40..fc7006ae828 100644
--- a/vendor/github.com/vmware/govmomi/.travis.yml
+++ b/vendor/github.com/vmware/govmomi/.travis.yml
@@ -12,7 +12,7 @@ services: false
# Set the version of Go.
language: go
-go: 1.13
+go: 1.15
# Always set the project's Go import path to ensure that forked
# builds get cloned to the correct location.
@@ -44,23 +44,14 @@ jobs:
install: true
script: make install
- - <<: *build-stage
- env: GOOS=linux GOARCH=386
-
- <<: *build-stage
env: GOOS=darwin GOARCH=amd64
- - <<: *build-stage
- env: GOOS=darwin GOARCH=386
- <<: *build-stage
env: GOOS=freebsd GOARCH=amd64
- - <<: *build-stage
- env: GOOS=freebsd GOARCH=386
- <<: *build-stage
env: GOOS=windows GOARCH=amd64
- - <<: *build-stage
- env: GOOS=windows GOARCH=386
# The test stage executes the test target.
- stage: test
diff --git a/vendor/github.com/vmware/govmomi/CHANGELOG.md b/vendor/github.com/vmware/govmomi/CHANGELOG.md
index e27a939ec47..bdc547462f3 100644
--- a/vendor/github.com/vmware/govmomi/CHANGELOG.md
+++ b/vendor/github.com/vmware/govmomi/CHANGELOG.md
@@ -1,5 +1,41 @@
# changelog
+### 0.24.0 (2020-12-20)
+
+* Update generated API bindings to vSphere 7.0U1 release
+
+* Add vSAN 7.0 API bindings
+
+* Add AuthorizationManager.HasUserPrivilegeOnEntities wrapper
+
+* Add sms generated types and methods
+
+* Add ExtendDisk and InflateDisk wrappers to vlsm.ObjectManager
+
+* Add vSAN Performance Data Collection API
+
+### 0.23.0 (2020-06-11)
+
+* Finder: support DistributedVirtualSwitch traversal
+
+* Update to vSphere 7 APIs
+
+* Avoid possible nil pointer dereference in guest TransferURL
+
+* Refactor govc session persistence into session/cache package
+
+* Add SetTaskState SetTaskDescription UpdateProgress to object package
+
+* Add Content Library subscriptions support
+
+* Add Content Library item copy support
+
+* Sync vim25/xml with golang 1.13 encoding/xml
+
+* vapi: Add cluster modules client and simulator
+
+* Expose soap client default transport
+
### 0.22.1 (2020-01-13)
* Fix SAML token auth using Holder-of-Key with delegated Bearer identity against 6.7 U3b+
diff --git a/vendor/github.com/vmware/govmomi/CONTRIBUTING.md b/vendor/github.com/vmware/govmomi/CONTRIBUTING.md
index f6645cbf4f1..defa3371891 100644
--- a/vendor/github.com/vmware/govmomi/CONTRIBUTING.md
+++ b/vendor/github.com/vmware/govmomi/CONTRIBUTING.md
@@ -96,6 +96,9 @@ We follow the conventions on [How to Write a Git Commit Message](http://chris.be
Be sure to include any related GitHub issue references in the commit message.
+### Running CI checks and tests
+You can run both `make check` and `make test` from the top level of the repository. While `make check` will catch formatting and import errors, it will not apply any fixes. The developer is expected to do that.
+
## Reporting Bugs and Creating Issues
When opening a new issue, try to roughly follow the commit message format conventions above.
diff --git a/vendor/github.com/vmware/govmomi/CONTRIBUTORS b/vendor/github.com/vmware/govmomi/CONTRIBUTORS
index 115e65d02bb..bf849d6442b 100644
--- a/vendor/github.com/vmware/govmomi/CONTRIBUTORS
+++ b/vendor/github.com/vmware/govmomi/CONTRIBUTORS
@@ -6,10 +6,11 @@
Abhijeet Kasurde
abrarshivani
Adam Shannon
+Al Biheiri
Alessandro Cortiana
+Alex
Alex Bozhenko
Alex Ellis (VMware)
-Alex
Alvaro Miranda
Amanda H. L. de Andrade
Amit Bathla
@@ -21,6 +22,8 @@ Andrey Klimentyev
Anfernee Yongkun Gui
angystardust
aniketGslab
+Ankit Vaidya
+Anna Carrigan
Arran Walker
Artem Anisimov
Aryeh Weinreb
@@ -28,26 +31,36 @@ Austin Parker
Balu Dontu
bastienbc
Ben Corrie
+Ben Vickers
+Benjamin Davini
Benjamin Peterson
+Bhavya Choudhary
Bob Killen
Brad Fitzpatrick
+brian57860
Bruce Downs
-Cédric Blomart
+Cheng Cheng
+Chethan Venkatesh
Chris Marchesi
Christian Höltje
Clint Greenwood
CuiHaozhi
+Cédric Blomart
+Dan Ilan
Daniel Mueller
Danny Lockard
Dave Gress
Dave Smith-Uchida
Dave Tucker
-Davide Agnello
+David Gress
David Stark
+Davide Agnello
Davinder Kumar
+demarey
dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Deric Crago
Divyen Patel
+Dnyanesh Gate
Doug MacEachern
Eloy Coto
Eric Edens
@@ -56,8 +69,10 @@ Eric Gray
Eric Yutao
Erik Hollensbe
Ethan Kaley
+Evan Chu
Fabio Rapposelli
-Faiyaz Ahmed
+Faiyaz Ahmed
+Federico Pellegatta <12744504+federico-pellegatta@users.noreply.github.com>
forkbomber
François Rigault
freebsdly
@@ -70,6 +85,7 @@ Hasan Mahmood
Henrik Hodne
hkumar
hui luo
+Ian Eyberg
Isaac Rodman
Ivan Mikushin